PageSourceSearch

https://water-simulation.vercel.app/assets/index-D-D6s_CH.js

js water-simulation.vercel.app collected 2026-10-03 08:01:10 UTC 1,475,366 bytes, 5,761 lines download raw bytes

vendor: 5,323 bytes, lines 1-9
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function XS(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var kb={exports:{}},lv={},zb={exports:{}},Kt={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Wd=Symbol.for("react.element"),FF=Symbol.for("react.portal"),NF=Symbol.for("react.fragment"),UF=Symbol.for("react.strict_mode"),OF=Symbol.for("react.profiler"),kF=Symbol.for("react.provider"),zF=Symbol.for("react.context"),HF=Symbol.for("react.forward_ref"),GF=Symbol.for("react.suspense"),VF=Symbol.for("react.memo"),WF=Symbol.for("react.lazy"),qw=Symbol.iterator;function XF(n){return n===null||typeof n!="object"?null:(n=qw&&n[qw]||n["@@iterator"],typeof n=="function"?n:null)}var Hb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gb=Object.assign,Vb={};function _f(n,e,t){this.props=n,this.context=e,this.refs=Vb,this.updater=t||Hb}_f.prototype.isReactComponent={};_f.prototype.setState=function(n,e){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,e,"setState")};_f.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function Wb(){}Wb.prototype=_f.prototype;function jS(n,e,t){this.props=n,this.context=e,this.refs=Vb,this.updater=t||Hb}var JS=jS.prototype=new Wb;JS.constructor=jS;Gb(JS,_f.prototype);JS.isPureReactComponent=!0;var $w=Array.isArray,Xb=Object.prototype.hasOwnProperty,YS={current:null},jb={key:!0,ref:!0,__self:!0,__source:!0};function Jb(n,e,t){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)Xb.call(e,i)&&!jb.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=t;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(n&&n.defaultProps)for(i in a=n.defaultProps,a)r[i]===void 0&&(r[i]=a[i]);return{$$typeof:Wd,type:n,key:s,ref:o,props:r,_owner:YS.current}}function jF(n,e){return{$$typeof:Wd,type:n.type,key:e,ref:n.ref,props:n.props,_owner:n._owner}}function KS(n){return typeof n=="object"&&n!==null&&n.$$typeof===Wd}function JF(n){var e={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(t){return e[t]})}var eT=/\/+/g;function dx(n,e){return typeof n=="object"&&n!==null&&n.key!=null?JF(""+n.key):e.toString(36)}function Mg(n,e,t,i,r){var s=typeof n;(s==="undefined"||s==="boolean")&&(n=null);var o=!1;if(n===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(n.$$typeof){case Wd:case FF:o=!0}}if(o)return o=n,r=r(o),n=i===""?"."+dx(o,0):i,$w(r)?(t="",n!=null&&(t=n.replace(eT,"$&/")+"/"),Mg(r,e,t,"",function(c){return c})):r!=null&&(KS(r)&&(r=jF(r,t+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(eT,"$&/")+"/")+n)),e.push(r)),1;if(o=0,i=i===""?".":i+":",$w(n))for(var a=0;a<n.length;a++){s=n[a];var l=i+dx(s,a);o+=Mg(s,e,t,l,r)}else if(l=XF(n),typeof l=="function")for(n=l.call(n),a=0;!(s=n.next()).done;)s=s.value,l=i+dx(s,a++),o+=Mg(s,e,t,l,r);else if(s==="object")throw e=String(n),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function sm(n,e,t){if(n==null)return n;var i=[],r=0;return Mg(n,i,"","",function(s){return e.call(t,s,r++)}),i}function YF(n){if(n._status===-1){var e=n._result;e=e(),e.then(function(t){(n._status===0||n._status===-1)&&(n._status=1,n._result=t)},function(t){(n._status===0||n._status===-1)&&(n._status=2,n._result=t)}),n._status===-1&&(n._status=0,n._result=e)}if(n._status===1)return n._result.default;throw n._result}var or={current:null},Eg={transition:null},KF={ReactCurrentDispatcher:or,ReactCurrentBatchConfig:Eg,ReactCurrentOwner:YS};function Yb(){throw Error("act(...) is not supported in production builds of React.")}Kt.Children={map:sm,forEach:function(n,e,t){sm(n,function(){e.apply(this,arguments)},t)},count:function(n){var e=0;return sm(n,function(){e++}),e},toArray:function(n){return sm(n,function(e){return e})||[]},only:function(n){if(!KS(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Kt.Component=_f;Kt.Fragment=NF;Kt.Profiler=OF;Kt.PureComponent=jS;Kt.StrictMode=UF;Kt.Suspense=GF;
vendor: 4,071 bytes, lines 9-25
9Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KF;Kt.act=Yb;Kt.cloneElement=function(n,e,t){if(n==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+n+".");var i=Gb({},n.props),r=n.key,s=n.ref,o=n._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=YS.current),e.key!==void 0&&(r=""+e.key),n.type&&n.type.defaultProps)var a=n.type.defaultProps;for(l in e)Xb.call(e,l)&&!jb.hasOwnProperty(l)&&(i[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)i.children=t;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];i.children=a}return{$$typeof:Wd,type:n.type,key:r,ref:s,props:i,_owner:o}};Kt.createContext=function(n){return n={$$typeof:zF,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},n.Provider={$$typeof:kF,_context:n},n.Consumer=n};Kt.createElement=Jb;Kt.createFactory=function(n){var e=Jb.bind(null,n);return e.type=n,e};Kt.createRef=function(){return{current:null}};Kt.forwardRef=function(n){return{$$typeof:HF,render:n}};Kt.isValidElement=KS;Kt.lazy=function(n){return{$$typeof:WF,_payload:{_status:-1,_result:n},_init:YF}};Kt.memo=function(n,e){return{$$typeof:VF,type:n,compare:e===void 0?null:e}};Kt.startTransition=function(n){var e=Eg.transition;Eg.transition={};try{n()}finally{Eg.transition=e}};Kt.unstable_act=Yb;Kt.useCallback=function(n,e){return or.current.useCallback(n,e)};Kt.useContext=function(n){return or.current.useContext(n)};Kt.useDebugValue=function(){};Kt.useDeferredValue=function(n){return or.current.useDeferredValue(n)};Kt.useEffect=function(n,e){return or.current.useEffect(n,e)};Kt.useId=function(){return or.current.useId()};Kt.useImperativeHandle=function(n,e,t){return or.current.useImperativeHandle(n,e,t)};Kt.useInsertionEffect=function(n,e){return or.current.useInsertionEffect(n,e)};Kt.useLayoutEffect=function(n,e){return or.current.useLayoutEffect(n,e)};Kt.useMemo=function(n,e){return or.current.useMemo(n,e)};Kt.useReducer=function(n,e,t){return or.current.useReducer(n,e,t)};Kt.useRef=function(n){return or.current.useRef(n)};Kt.useState=function(n){return or.current.useState(n)};Kt.useSyncExternalStore=function(n,e,t){return or.current.useSyncExternalStore(n,e,t)};Kt.useTransition=function(){return or.current.useTransition()};Kt.version="18.3.1";zb.exports=Kt;var ne=zb.exports;const hc=XS(ne);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var QF=ne,ZF=Symbol.for("react.element"),qF=Symbol.for("react.fragment"),$F=Object.prototype.hasOwnProperty,eN=QF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tN={key:!0,ref:!0,__self:!0,__source:!0};function Kb(n,e,t){var i,r={},s=null,o=null;t!==void 0&&(s=""+t),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(i in e)$F.call(e,i)&&!tN.hasOwnProperty(i)&&(r[i]=e[i]);if(n&&n.defaultProps)for(i in e=n.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:ZF,type:n,key:s,ref:o,props:r,_owner:eN.current}}lv.Fragment=qF;lv.jsx=Kb;lv.jsxs=Kb;kb.exports=lv;var re=kb.exports,a1={},Qb={exports:{}},Yr={},Zb={exports:{}},qb={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(n){function e(W,ue){var oe=W.length;W.push(ue);e:for(;0<oe;){var de=oe-1>>>1,we=W[de];if(0<r(we,ue))W[de]=ue,W[oe]=we,oe=de;else break e}}function t(W){return W.length===0?null:W[0]}function i(W){if(W.length===0)return null;var ue=W[0],oe=W.pop();if(oe!==ue){W[0]=oe;e:for(var de=0,we=W.length,Ue=we>>>1;de<Ue;){var pe=2*(de+1)-1,be=W[pe],Ne=pe+1,ke=W[Ne];if(0>r(be,oe))Ne<we&&0>r(ke,be)?(W[de]=ke,W[Ne]=oe,de=Ne):(W[de]=be,W[pe]=oe,de=pe);else if(Ne<we&&0>r(ke,oe))W[de]=ke,W[Ne]=oe,de=Ne;else break e}}return ue}
vendor: 10,261 bytes, lines 25-34
25function r(W,ue){var oe=W.sortIndex-ue.sortIndex;return oe!==0?oe:W.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,d=null,p=3,m=!1,v=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(W){for(var ue=t(c);ue!==null;){if(ue.callback===null)i(c);else if(ue.startTime<=W)i(c),ue.sortIndex=ue.expirationTime,e(l,ue);else break;ue=t(c)}}function E(W){if(_=!1,A(W),!v)if(t(l)!==null)v=!0,ie(I);else{var ue=t(c);ue!==null&&ye(E,ue.startTime-W)}}function I(W,ue){v=!1,_&&(_=!1,g(D),D=-1),m=!0;var oe=p;try{for(A(ue),d=t(l);d!==null&&(!(d.expirationTime>ue)||W&&!B());){var de=d.callback;if(typeof de=="function"){d.callback=null,p=d.priorityLevel;var we=de(d.expirationTime<=ue);ue=n.unstable_now(),typeof we=="function"?d.callback=we:d===t(l)&&i(l),A(ue)}else i(l);d=t(l)}if(d!==null)var Ue=!0;else{var pe=t(c);pe!==null&&ye(E,pe.startTime-ue),Ue=!1}return Ue}finally{d=null,p=oe,m=!1}}var b=!1,P=null,D=-1,O=5,C=-1;function B(){return!(n.unstable_now()-C<O)}function Y(){if(P!==null){var W=n.unstable_now();C=W;var ue=!0;try{ue=P(!0,W)}finally{ue?$():(b=!1,P=null)}}else b=!1}var $;if(typeof S=="function")$=function(){S(Y)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=Y,$=function(){ce.postMessage(null)}}else $=function(){x(Y,0)};function ie(W){P=W,b||(b=!0,$())}function ye(W,ue){D=x(function(){W(n.unstable_now())},ue)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(W){W.callback=null},n.unstable_continueExecution=function(){v||m||(v=!0,ie(I))},n.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<W?Math.floor(1e3/W):5},n.unstable_getCurrentPriorityLevel=function(){return p},n.unstable_getFirstCallbackNode=function(){return t(l)},n.unstable_next=function(W){switch(p){case 1:case 2:case 3:var ue=3;break;default:ue=p}var oe=p;p=ue;try{return W()}finally{p=oe}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(W,ue){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var oe=p;p=W;try{return ue()}finally{p=oe}},n.unstable_scheduleCallback=function(W,ue,oe){var de=n.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?de+oe:de):oe=de,W){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=oe+we,W={id:f++,callback:ue,priorityLevel:W,startTime:oe,expirationTime:we,sortIndex:-1},oe>de?(W.sortIndex=oe,e(c,W),t(l)===null&&W===t(c)&&(_?(g(D),D=-1):_=!0,ye(E,oe-de))):(W.sortIndex=we,e(l,W),v||m||(v=!0,ie(I))),W},n.unstable_shouldYield=B,n.unstable_wrapCallback=function(W){var ue=p;return function(){var oe=p;p=ue;try{return W.apply(this,arguments)}finally{p=oe}}}})(qb);Zb.exports=qb;var nN=Zb.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var iN=ne,Wr=nN;function Je(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+n+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var $b=new Set,sd={};function Cc(n,e){Zu(n,e),Zu(n+"Capture",e)}function Zu(n,e){for(sd[n]=e,n=0;n<e.length;n++)$b.add(e[n])}var Yo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l1=Object.prototype.hasOwnProperty,rN=/^[: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]*$/,tT={},nT={};function sN(n){return l1.call(nT,n)?!0:l1.call(tT,n)?!1:rN.test(n)?nT[n]=!0:(tT[n]=!0,!1)}function oN(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function aN(n,e,t,i){if(e===null||typeof e>"u"||oN(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ar(n,e,t,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Pi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Pi[n]=new ar(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Pi[e]=new ar(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Pi[n]=new ar(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Pi[n]=new ar(n,2,!1,n,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){Pi[n]=new ar(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Pi[n]=new ar(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Pi[n]=new ar(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Pi[n]=new ar(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Pi[n]=new ar(n,5,!1,n.toLowerCase(),null,!1,!1)});var QS=/[\-:]([a-z])/g;function ZS(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var e=n.replace(QS,ZS);Pi[e]=new ar(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(QS,ZS);Pi[e]=new ar(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(QS,ZS);Pi[e]=new ar(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Pi[n]=new ar(n,1,!1,n.toLowerCase(),null,!1,!1)});Pi.xlinkHref=new ar("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Pi[n]=new ar(n,1,!1,n.toLowerCase(),null,!0,!0)});function qS(n,e,t,i){var r=Pi.hasOwnProperty(e)?Pi[e]:null;(r!==null?r.type!==0:i||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(aN(e,t,r,i)&&(t=null),i||r===null?sN(e)&&(t===null?n.removeAttribute(e):n.setAttribute(e,""+t)):r.mustUseProperty?n[r.propertyName]=t===null?r.type===3?!1:"":t:(e=r.attributeName,i=r.attributeNamespace,t===null?n.removeAttribute(e):(r=r.type,t=r===3||r===4&&t===!0?"":""+t,i?n.setAttributeNS(i,e,t):n.setAttribute(e,t))))}var ia=iN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,om=Symbol.for("react.element"),xu=Symbol.for("react.portal"),_u=Symbol.for("react.fragment"),$S=Symbol.for("react.strict_mode"),c1=Symbol.for("react.profiler"),eI=Symbol.for("react.provider"),tI=Symbol.for("react.context"),eA=Symbol.for("react.forward_ref"),u1=Symbol.for("react.suspense"),f1=Symbol.for("react.suspense_list"),tA=Symbol.for("react.memo"),Ta=Symbol.for("react.lazy"),nI=Symbol.for("react.offscreen"),iT=Symbol.iterator;function Kf(n){return n===null||typeof n!="object"?null:(n=iT&&n[iT]||n["@@iterator"],typeof n=="function"?n:null)}var Gn=Object.assign,px;function Ch(n){if(px===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);px=e&&e[1]||""}return`
34`+px+n}var mx=!1;function gx(n,e){if(!n||mx)return"";mx=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var i=c}Reflect.construct(n,[],e)}else{try{e.call()}catch(c){i=c}n.call(e.prototype)}else{try{throw Error()}catch(c){i=c}n()}}
vendor: 7,488 bytes, lines 34-37
34catch(c){if(c&&i&&typeof c.stack=="string"){for(var r=c.stack.split(`
35`),s=i.stack.split(`
36`),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||r[o]!==s[a]){var l=`
37`+r[o].replace(" at new "," at ");return n.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{mx=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?Ch(n):""}function lN(n){switch(n.tag){case 5:return Ch(n.type);case 16:return Ch("Lazy");case 13:return Ch("Suspense");case 19:return Ch("SuspenseList");case 0:case 2:case 15:return n=gx(n.type,!1),n;case 11:return n=gx(n.type.render,!1),n;case 1:return n=gx(n.type,!0),n;default:return""}}function h1(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _u:return"Fragment";case xu:return"Portal";case c1:return"Profiler";case $S:return"StrictMode";case u1:return"Suspense";case f1:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case tI:return(n.displayName||"Context")+".Consumer";case eI:return(n._context.displayName||"Context")+".Provider";case eA:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case tA:return e=n.displayName||null,e!==null?e:h1(n.type)||"Memo";case Ta:e=n._payload,n=n._init;try{return h1(n(e))}catch{}}return null}function cN(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return h1(e);case 8:return e===$S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ya(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function iI(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function uN(n){var e=iI(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function am(n){n._valueTracker||(n._valueTracker=uN(n))}function rI(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=iI(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function Gg(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function d1(n,e){var t=e.checked;return Gn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function rT(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=Ya(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function sI(n,e){e=e.checked,e!=null&&qS(n,"checked",e,!1)}function p1(n,e){sI(n,e);var t=Ya(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?m1(n,e.type,t):e.hasOwnProperty("defaultValue")&&m1(n,e.type,Ya(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function sT(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function m1(n,e,t){(e!=="number"||Gg(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var Rh=Array.isArray;function Ou(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r<t.length;r++)e["$"+t[r]]=!0;for(t=0;t<n.length;t++)r=e.hasOwnProperty("$"+n[t].value),n[t].selected!==r&&(n[t].selected=r),r&&i&&(n[t].defaultSelected=!0)}else{for(t=""+Ya(t),e=null,r=0;r<n.length;r++){if(n[r].value===t){n[r].selected=!0,i&&(n[r].defaultSelected=!0);return}e!==null||n[r].disabled||(e=n[r])}e!==null&&(e.selected=!0)}}function g1(n,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Je(91));return Gn({},e,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function oT(n,e){var t=e.value;if(t==null){if(t=e.children,e=e.defaultValue,t!=null){if(e!=null)throw Error(Je(92));if(Rh(t)){if(1<t.length)throw Error(Je(93));t=t[0]}e=t}e==null&&(e=""),t=e}n._wrapperState={initialValue:Ya(t)}}function oI(n,e){var t=Ya(e.value),i=Ya(e.defaultValue);t!=null&&(t=""+t,t!==n.value&&(n.value=t),e.defaultValue==null&&n.defaultValue!==t&&(n.defaultValue=t)),i!=null&&(n.defaultValue=""+i)}function aT(n){var e=n.textContent;e===n._wrapperState.initialValue&&e!==""&&e!==null&&(n.value=e)}function aI(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function v1(n,e){return n==null||n==="http://www.w3.org/1999/xhtml"?aI(e):n==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var lm,lI=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,t,i,r){MSApp.execUnsafeLocalFunction(function(){return n(e,t,i,r)})}:n}(function(n,e){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=e;else{for(lm=lm||document.createElement("div"),lm.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=lm.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function od(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var Nh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fN=["Webkit","ms","Moz","O"];
vendor: 2,657 bytes, line 37
37Object.keys(Nh).forEach(function(n){fN.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),Nh[e]=Nh[n]})});function cI(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||Nh.hasOwnProperty(n)&&Nh[n]?(""+e).trim():e+"px"}function uI(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=cI(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var hN=Gn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function y1(n,e){if(e){if(hN[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Je(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Je(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Je(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Je(62))}}function x1(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _1=null;function nA(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var S1=null,ku=null,zu=null;function lT(n){if(n=Jd(n)){if(typeof S1!="function")throw Error(Je(280));var e=n.stateNode;e&&(e=dv(e),S1(n.stateNode,n.type,e))}}function fI(n){ku?zu?zu.push(n):zu=[n]:ku=n}function hI(){if(ku){var n=ku,e=zu;if(zu=ku=null,lT(n),e)for(n=0;n<e.length;n++)lT(e[n])}}function dI(n,e){return n(e)}function pI(){}var vx=!1;function mI(n,e,t){if(vx)return n(e,t);vx=!0;try{return dI(n,e,t)}finally{vx=!1,(ku!==null||zu!==null)&&(pI(),hI())}}function ad(n,e){var t=n.stateNode;if(t===null)return null;var i=dv(t);if(i===null)return null;t=i[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(n=n.type,i=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!i;break e;default:n=!1}if(n)return null;if(t&&typeof t!="function")throw Error(Je(231,e,typeof t));return t}var A1=!1;if(Yo)try{var Qf={};Object.defineProperty(Qf,"passive",{get:function(){A1=!0}}),window.addEventListener("test",Qf,Qf),window.removeEventListener("test",Qf,Qf)}catch{A1=!1}function dN(n,e,t,i,r,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(t,c)}catch(f){this.onError(f)}}
vendor: 8,048 bytes, line 37
37var Uh=!1,Vg=null,Wg=!1,M1=null,pN={onError:function(n){Uh=!0,Vg=n}};function mN(n,e,t,i,r,s,o,a,l){Uh=!1,Vg=null,dN.apply(pN,arguments)}function gN(n,e,t,i,r,s,o,a,l){if(mN.apply(this,arguments),Uh){if(Uh){var c=Vg;Uh=!1,Vg=null}else throw Error(Je(198));Wg||(Wg=!0,M1=c)}}function Rc(n){var e=n,t=n;if(n.alternate)for(;e.return;)e=e.return;else{n=e;do e=n,e.flags&4098&&(t=e.return),n=e.return;while(n)}return e.tag===3?t:null}function gI(n){if(n.tag===13){var e=n.memoizedState;if(e===null&&(n=n.alternate,n!==null&&(e=n.memoizedState)),e!==null)return e.dehydrated}return null}function cT(n){if(Rc(n)!==n)throw Error(Je(188))}function vN(n){var e=n.alternate;if(!e){if(e=Rc(n),e===null)throw Error(Je(188));return e!==n?null:n}for(var t=n,i=e;;){var r=t.return;if(r===null)break;var s=r.alternate;if(s===null){if(i=r.return,i!==null){t=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===t)return cT(r),n;if(s===i)return cT(r),e;s=s.sibling}throw Error(Je(188))}if(t.return!==i.return)t=r,i=s;else{for(var o=!1,a=r.child;a;){if(a===t){o=!0,t=r,i=s;break}if(a===i){o=!0,i=r,t=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===t){o=!0,t=s,i=r;break}if(a===i){o=!0,i=s,t=r;break}a=a.sibling}if(!o)throw Error(Je(189))}}if(t.alternate!==i)throw Error(Je(190))}if(t.tag!==3)throw Error(Je(188));return t.stateNode.current===t?n:e}function vI(n){return n=vN(n),n!==null?yI(n):null}function yI(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var e=yI(n);if(e!==null)return e;n=n.sibling}return null}var xI=Wr.unstable_scheduleCallback,uT=Wr.unstable_cancelCallback,yN=Wr.unstable_shouldYield,xN=Wr.unstable_requestPaint,$n=Wr.unstable_now,_N=Wr.unstable_getCurrentPriorityLevel,iA=Wr.unstable_ImmediatePriority,_I=Wr.unstable_UserBlockingPriority,Xg=Wr.unstable_NormalPriority,SN=Wr.unstable_LowPriority,SI=Wr.unstable_IdlePriority,cv=null,uo=null;function AN(n){if(uo&&typeof uo.onCommitFiberRoot=="function")try{uo.onCommitFiberRoot(cv,n,void 0,(n.current.flags&128)===128)}catch{}}var ks=Math.clz32?Math.clz32:wN,MN=Math.log,EN=Math.LN2;function wN(n){return n>>>=0,n===0?32:31-(MN(n)/EN|0)|0}var cm=64,um=4194304;function bh(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function jg(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=bh(a):(s&=o,s!==0&&(i=bh(s)))}else o=t&~r,o!==0?i=bh(o):s!==0&&(i=bh(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0<e;)t=31-ks(e),r=1<<t,i|=n[t],e&=~r;return i}function TN(n,e){switch(n){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function CN(n,e){for(var t=n.suspendedLanes,i=n.pingedLanes,r=n.expirationTimes,s=n.pendingLanes;0<s;){var o=31-ks(s),a=1<<o,l=r[o];l===-1?(!(a&t)||a&i)&&(r[o]=TN(a,e)):l<=e&&(n.expiredLanes|=a),s&=~a}}function E1(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function AI(){var n=cm;return cm<<=1,!(cm&4194240)&&(cm=64),n}function yx(n){for(var e=[],t=0;31>t;t++)e.push(n);return e}function Xd(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-ks(e),n[e]=t}function RN(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0<t;){var r=31-ks(t),s=1<<r;e[r]=0,i[r]=-1,n[r]=-1,t&=~s}}function rA(n,e){var t=n.entangledLanes|=e;for(n=n.entanglements;t;){var i=31-ks(t),r=1<<i;r&e|n[i]&e&&(n[i]|=e),t&=~r}}var fn=0;function MI(n){return n&=-n,1<n?4<n?n&268435455?16:536870912:4:1}var EI,sA,wI,TI,CI,w1=!1,fm=[],Ua=null,Oa=null,ka=null,ld=new Map,cd=new Map,Ra=[],bN="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fT(n,e){switch(n){case"focusin":case"focusout":Ua=null;break;case"dragenter":case"dragleave":Oa=null;break;case"mouseover":case"mouseout":ka=null;break;case"pointerover":case"pointerout":ld.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":cd.delete(e.pointerId)}}function Zf(n,e,t,i,r,s){return n===null||n.nativeEvent!==s?(n={blockedOn:e,domEventName:t,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},e!==null&&(e=Jd(e),e!==null&&sA(e)),n):(n.eventSystemFlags|=i,e=n.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),n)}function IN(n,e,t,i,r){switch(e){case"focusin":return Ua=Zf(Ua,n,e,t,i,r),!0;case"dragenter":return Oa=Zf(Oa,n,e,t,i,r),!0;case"mouseover":return ka=Zf(ka,n,e,t,i,r),!0;case"pointerover":var s=r.pointerId;return ld.set(s,Zf(ld.get(s)||null,n,e,t,i,r)),!0;case"gotpointercapture":return s=r.pointerId,cd.set(s,Zf(cd.get(s)||null,n,e,t,i,r)),!0}return!1}function RI(n){var e=Vl(n.target);if(e!==null){var t=Rc(e);if(t!==null){if(e=t.tag,e===13){if(e=gI(t),e!==null){n.blockedOn=e,CI(n.priority,function(){wI(t)});return}}else if(e===3&&t.stateNode.current.memoizedState.isDehydrated){n.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}n.blockedOn=null}function wg(n){if(n.blockedOn!==null)return!1;for(var e=n.targetContainers;0<e.length;){var t=T1(n.domEventName,n.eventSystemFlags,e[0],n.nativeEvent);if(t===null){t=n.nativeEvent;var i=new t.constructor(t.type,t);_1=i,t.target.dispatchEvent(i),_1=null}else return e=Jd(t),e!==null&&sA(e),n.blockedOn=t,!1;e.shift()}return!0}function hT(n,e,t){wg(n)&&t.delete(e)}function PN(){w1=!1,Ua!==null&&wg(Ua)&&(Ua=null),Oa!==null&&wg(Oa)&&(Oa=null),ka!==null&&wg(ka)&&(ka=null),ld.forEach(hT),cd.forEach(hT)}function qf(n,e){n.blockedOn===e&&(n.blockedOn=null,w1||(w1=!0,Wr.unstable_scheduleCallback(Wr.unstable_NormalPriority,PN)))}function ud(n){function e(r){return qf(r,n)}if(0<fm.length){qf(fm[0],n);for(var t=1;t<fm.length;t++){var i=fm[t];i.blockedOn===n&&(i.blockedOn=null)}}for(Ua!==null&&qf(Ua,n),Oa!==null&&qf(Oa,n),ka!==null&&qf(ka,n),ld.forEach(e),cd.forEach(e),t=0;t<Ra.length;t++)i=Ra[t],i.blockedOn===n&&(i.blockedOn=null);for(;0<Ra.length&&(t=Ra[0],t.blockedOn===null);)RI(t),t.blockedOn===null&&Ra.shift()}var Hu=ia.ReactCurrentBatchConfig,Jg=!0;function BN(n,e,t,i){var r=fn,s=Hu.transition;Hu.transition=null;try{fn=1,oA(n,e,t,i)}finally{fn=r,Hu.transition=s}}function DN(n,e,t,i){var r=fn,s=Hu.transition;Hu.transition=null;try{fn=4,oA(n,e,t,i)}finally{fn=r,Hu.transition=s}}function oA(n,e,t,i){if(Jg){var r=T1(n,e,t,i);if(r===null)Rx(n,e,i,Yg,t),fT(n,i);else if(IN(r,n,e,t,i))i.stopPropagation();else if(fT(n,i),e&4&&-1<bN.indexOf(n)){for(;r!==null;){var s=Jd(r);if(s!==null&&EI(s),s=T1(n,e,t,i),s===null&&Rx(n,e,i,Yg,t),s===r)break;r=s}r!==null&&i.stopPropagation()}else Rx(n,e,i,null,t)}}var Yg=null;function T1(n,e,t,i){if(Yg=null,n=nA(i),n=Vl(n),n!==null)if(e=Rc(n),e===null)n=null;else if(t=e.tag,t===13){if(n=gI(e),n!==null)return n;n=null}else if(t===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;n=null}else e!==n&&(n=null);return Yg=n,null}
vendor: 10,401 bytes, line 37
37function bI(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(_N()){case iA:return 1;case _I:return 4;case Xg:case SN:return 16;case SI:return 536870912;default:return 16}default:return 16}}var Pa=null,aA=null,Tg=null;function II(){if(Tg)return Tg;var n,e=aA,t=e.length,i,r="value"in Pa?Pa.value:Pa.textContent,s=r.length;for(n=0;n<t&&e[n]===r[n];n++);var o=t-n;for(i=1;i<=o&&e[t-i]===r[s-i];i++);return Tg=r.slice(n,1<i?1-i:void 0)}function Cg(n){var e=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&e===13&&(n=13)):n=e,n===10&&(n=13),32<=n||n===13?n:0}function hm(){return!0}function dT(){return!1}function Kr(n){function e(t,i,r,s,o){this._reactName=t,this._targetInst=r,this.type=i,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in n)n.hasOwnProperty(a)&&(t=n[a],this[a]=t?t(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?hm:dT,this.isPropagationStopped=dT,this}return Gn(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=hm)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=hm)},persist:function(){},isPersistent:hm}),e}var Sf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lA=Kr(Sf),jd=Gn({},Sf,{view:0,detail:0}),LN=Kr(jd),xx,_x,$f,uv=Gn({},jd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cA,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==$f&&($f&&n.type==="mousemove"?(xx=n.screenX-$f.screenX,_x=n.screenY-$f.screenY):_x=xx=0,$f=n),xx)},movementY:function(n){return"movementY"in n?n.movementY:_x}}),pT=Kr(uv),FN=Gn({},uv,{dataTransfer:0}),NN=Kr(FN),UN=Gn({},jd,{relatedTarget:0}),Sx=Kr(UN),ON=Gn({},Sf,{animationName:0,elapsedTime:0,pseudoElement:0}),kN=Kr(ON),zN=Gn({},Sf,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),HN=Kr(zN),GN=Gn({},Sf,{data:0}),mT=Kr(GN),VN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WN={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"},XN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jN(n){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(n):(n=XN[n])?!!e[n]:!1}function cA(){return jN}var JN=Gn({},jd,{key:function(n){if(n.key){var e=VN[n.key]||n.key;if(e!=="Unidentified")return e}return n.type==="keypress"?(n=Cg(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?WN[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cA,charCode:function(n){return n.type==="keypress"?Cg(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Cg(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),YN=Kr(JN),KN=Gn({},uv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gT=Kr(KN),QN=Gn({},jd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cA}),ZN=Kr(QN),qN=Gn({},Sf,{propertyName:0,elapsedTime:0,pseudoElement:0}),$N=Kr(qN),e3=Gn({},uv,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),t3=Kr(e3),n3=[9,13,27,32],uA=Yo&&"CompositionEvent"in window,Oh=null;Yo&&"documentMode"in document&&(Oh=document.documentMode);var i3=Yo&&"TextEvent"in window&&!Oh,PI=Yo&&(!uA||Oh&&8<Oh&&11>=Oh),vT=" ",yT=!1;function BI(n,e){switch(n){case"keyup":return n3.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function DI(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Su=!1;function r3(n,e){switch(n){case"compositionend":return DI(e);case"keypress":return e.which!==32?null:(yT=!0,vT);case"textInput":return n=e.data,n===vT&&yT?null:n;default:return null}}function s3(n,e){if(Su)return n==="compositionend"||!uA&&BI(n,e)?(n=II(),Tg=aA=Pa=null,Su=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return PI&&e.locale!=="ko"?null:e.data;default:return null}}var o3={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 xT(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e==="input"?!!o3[n.type]:e==="textarea"}function LI(n,e,t,i){fI(i),e=Kg(e,"onChange"),0<e.length&&(t=new lA("onChange","change",null,t,i),n.push({event:t,listeners:e}))}var kh=null,fd=null;function a3(n){XI(n,0)}function fv(n){var e=Eu(n);if(rI(e))return n}function l3(n,e){if(n==="change")return e}var FI=!1;if(Yo){var Ax;if(Yo){var Mx="oninput"in document;if(!Mx){var _T=document.createElement("div");_T.setAttribute("oninput","return;"),Mx=typeof _T.oninput=="function"}Ax=Mx}else Ax=!1;FI=Ax&&(!document.documentMode||9<document.documentMode)}function ST(){kh&&(kh.detachEvent("onpropertychange",NI),fd=kh=null)}function NI(n){if(n.propertyName==="value"&&fv(fd)){var e=[];LI(e,fd,n,nA(n)),mI(a3,e)}}function c3(n,e,t){n==="focusin"?(ST(),kh=e,fd=t,kh.attachEvent("onpropertychange",NI)):n==="focusout"&&ST()}function u3(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return fv(fd)}function f3(n,e){if(n==="click")return fv(e)}function h3(n,e){if(n==="input"||n==="change")return fv(e)}function d3(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}var Gs=typeof Object.is=="function"?Object.is:d3;function hd(n,e){if(Gs(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;var t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;for(i=0;i<t.length;i++){var r=t[i];if(!l1.call(e,r)||!Gs(n[r],e[r]))return!1}return!0}function AT(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function MT(n,e){var t=AT(n);n=0;for(var i;t;){if(t.nodeType===3){if(i=n+t.textContent.length,n<=e&&i>=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=AT(t)}}function UI(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?UI(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function OI(){for(var n=window,e=Gg();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=Gg(n.document)}return e}function fA(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function p3(n){var e=OI(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&UI(t.ownerDocument.documentElement,t)){if(i!==null&&fA(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=MT(t,s);var o=MT(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)n=e[t],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var m3=Yo&&"documentMode"in document&&11>=document.documentMode,Au=null,C1=null,zh=null,R1=!1;function ET(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;R1||Au==null||Au!==Gg(i)||(i=Au,"selectionStart"in i&&fA(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:i.focusNode,focusOffset:i.focusOffset}),zh&&hd(zh,i)||(zh=i,i=Kg(C1,"onSelect"),0<i.length&&(e=new lA("onSelect","select",null,e,t),n.push({event:e,listeners:i}),e.target=Au)))}function dm(n,e){var t={};return t[n.toLowerCase()]=e.toLowerCase(),t["Webkit"+n]="webkit"+e,t["Moz"+n]="moz"+e,t}var Mu={animationend:dm("Animation","AnimationEnd"),animationiteration:dm("Animation","AnimationIteration"),animationstart:dm("Animation","AnimationStart"),transitionend:dm("Transition","TransitionEnd")},Ex={},kI={};Yo&&(kI=document.createElement("div").style,"AnimationEvent"in window||(delete Mu.animationend.animation,delete Mu.animationiteration.animation,delete Mu.animationstart.animation),"TransitionEvent"in window||delete Mu.transitionend.transition);function hv(n){if(Ex[n])return Ex[n];if(!Mu[n])return n;var e=Mu[n],t;for(t in e)if(e.hasOwnProperty(t)&&t in kI)return Ex[n]=e[t];return n}var zI=hv("animationend"),HI=hv("animationiteration"),GI=hv("animationstart"),VI=hv("transitionend"),WI=new Map,wT="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function il(n,e){WI.set(n,e),Cc(e,[n])}for(var wx=0;wx<wT.length;wx++){var Tx=wT[wx],g3=Tx.toLowerCase(),v3=Tx[0].toUpperCase()+Tx.slice(1);il(g3,"on"+v3)}il(zI,"onAnimationEnd");il(HI,"onAnimationIteration");il(GI,"onAnimationStart");il("dblclick","onDoubleClick");il("focusin","onFocus");il("focusout","onBlur");il(VI,"onTransitionEnd");Zu("onMouseEnter",["mouseout","mouseover"]);Zu("onMouseLeave",["mouseout","mouseover"]);Zu("onPointerEnter",["pointerout","pointerover"]);Zu("onPointerLeave",["pointerout","pointerover"]);Cc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Cc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Cc("onBeforeInput",["compositionend","keypress","textInput","paste"]);Cc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Cc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Cc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ih="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(" "),y3=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ih));function TT(n,e,t){var i=n.type||"unknown-event";n.currentTarget=t,gN(i,e,void 0,n),n.currentTarget=null}function XI(n,e){e=(e&4)!==0;for(var t=0;t<n.length;t++){var i=n[t],r=i.event;i=i.listeners;e:{var s=void 0;if(e)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break e;TT(r,a,c),s=l}else for(o=0;o<i.length;o++){if(a=i[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break e;TT(r,a,c),s=l}}}if(Wg)throw n=M1,Wg=!1,M1=null,n}function wn(n,e){var t=e[D1];t===void 0&&(t=e[D1]=new Set);var i=n+"__bubble";t.has(i)||(jI(e,n,2,!1),t.add(i))}function Cx(n,e,t){var i=0;e&&(i|=4),jI(t,n,i,e)}var pm="_reactListening"+Math.random().toString(36).slice(2);function dd(n){if(!n[pm]){n[pm]=!0,$b.forEach(function(t){t!=="selectionchange"&&(y3.has(t)||Cx(t,!1,n),Cx(t,!0,n))});var e=n.nodeType===9?n:n.ownerDocument;e===null||e[pm]||(e[pm]=!0,Cx("selectionchange",!1,e))}}function jI(n,e,t,i){switch(bI(e)){case 1:var r=BN;break;case 4:r=DN;break;default:r=oA}t=r.bind(null,e,t,n),r=void 0,!A1||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),i?r!==void 0?n.addEventListener(e,t,{capture:!0,passive:r}):n.addEventListener(e,t,!0):r!==void 0?n.addEventListener(e,t,{passive:r}):n.addEventListener(e,t,!1)}function Rx(n,e,t,i,r){var s=i;if(!(e&1)&&!(e&2)&&i!==null)e:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var a=i.stateNode.containerInfo;
vendor: 22,715 bytes, lines 37-38
37if(a===r||a.nodeType===8&&a.parentNode===r)break;if(o===4)for(o=i.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===r||l.nodeType===8&&l.parentNode===r))return;o=o.return}for(;a!==null;){if(o=Vl(a),o===null)return;if(l=o.tag,l===5||l===6){i=s=o;continue e}a=a.parentNode}}i=i.return}mI(function(){var c=s,f=nA(t),d=[];e:{var p=WI.get(n);if(p!==void 0){var m=lA,v=n;switch(n){case"keypress":if(Cg(t)===0)break e;case"keydown":case"keyup":m=YN;break;case"focusin":v="focus",m=Sx;break;case"focusout":v="blur",m=Sx;break;case"beforeblur":case"afterblur":m=Sx;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=pT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=NN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=ZN;break;case zI:case HI:case GI:m=kN;break;case VI:m=$N;break;case"scroll":m=LN;break;case"wheel":m=t3;break;case"copy":case"cut":case"paste":m=HN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=gT}var _=(e&4)!==0,x=!_&&n==="scroll",g=_?p!==null?p+"Capture":null:p;_=[];for(var S=c,A;S!==null;){A=S;var E=A.stateNode;if(A.tag===5&&E!==null&&(A=E,g!==null&&(E=ad(S,g),E!=null&&_.push(pd(S,E,A)))),x)break;S=S.return}0<_.length&&(p=new m(p,v,null,t,f),d.push({event:p,listeners:_}))}}if(!(e&7)){e:{if(p=n==="mouseover"||n==="pointerover",m=n==="mouseout"||n==="pointerout",p&&t!==_1&&(v=t.relatedTarget||t.fromElement)&&(Vl(v)||v[Ko]))break e;if((m||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,m?(v=t.relatedTarget||t.toElement,m=c,v=v?Vl(v):null,v!==null&&(x=Rc(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=c),m!==v)){if(_=pT,E="onMouseLeave",g="onMouseEnter",S="mouse",(n==="pointerout"||n==="pointerover")&&(_=gT,E="onPointerLeave",g="onPointerEnter",S="pointer"),x=m==null?p:Eu(m),A=v==null?p:Eu(v),p=new _(E,S+"leave",m,t,f),p.target=x,p.relatedTarget=A,E=null,Vl(f)===c&&(_=new _(g,S+"enter",v,t,f),_.target=A,_.relatedTarget=x,E=_),x=E,m&&v)t:{for(_=m,g=v,S=0,A=_;A;A=Kc(A))S++;for(A=0,E=g;E;E=Kc(E))A++;for(;0<S-A;)_=Kc(_),S--;for(;0<A-S;)g=Kc(g),A--;for(;S--;){if(_===g||g!==null&&_===g.alternate)break t;_=Kc(_),g=Kc(g)}_=null}else _=null;m!==null&&CT(d,p,m,_,!1),v!==null&&x!==null&&CT(d,x,v,_,!0)}}e:{if(p=c?Eu(c):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var I=l3;else if(xT(p))if(FI)I=h3;else{I=u3;var b=c3}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(I=f3);if(I&&(I=I(n,c))){LI(d,I,t,f);break e}b&&b(n,p,c),n==="focusout"&&(b=p._wrapperState)&&b.controlled&&p.type==="number"&&m1(p,"number",p.value)}switch(b=c?Eu(c):window,n){case"focusin":(xT(b)||b.contentEditable==="true")&&(Au=b,C1=c,zh=null);break;case"focusout":zh=C1=Au=null;break;case"mousedown":R1=!0;break;case"contextmenu":case"mouseup":case"dragend":R1=!1,ET(d,t,f);break;case"selectionchange":if(m3)break;case"keydown":case"keyup":ET(d,t,f)}var P;if(uA)e:{switch(n){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Su?BI(n,t)&&(D="onCompositionEnd"):n==="keydown"&&t.keyCode===229&&(D="onCompositionStart");D&&(PI&&t.locale!=="ko"&&(Su||D!=="onCompositionStart"?D==="onCompositionEnd"&&Su&&(P=II()):(Pa=f,aA="value"in Pa?Pa.value:Pa.textContent,Su=!0)),b=Kg(c,D),0<b.length&&(D=new mT(D,n,null,t,f),d.push({event:D,listeners:b}),P?D.data=P:(P=DI(t),P!==null&&(D.data=P)))),(P=i3?r3(n,t):s3(n,t))&&(c=Kg(c,"onBeforeInput"),0<c.length&&(f=new mT("onBeforeInput","beforeinput",null,t,f),d.push({event:f,listeners:c}),f.data=P))}XI(d,e)})}function pd(n,e,t){return{instance:n,listener:e,currentTarget:t}}function Kg(n,e){for(var t=e+"Capture",i=[];n!==null;){var r=n,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=ad(n,t),s!=null&&i.unshift(pd(n,s,r)),s=ad(n,e),s!=null&&i.push(pd(n,s,r))),n=n.return}return i}function Kc(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function CT(n,e,t,i,r){for(var s=e._reactName,o=[];t!==null&&t!==i;){var a=t,l=a.alternate,c=a.stateNode;if(l!==null&&l===i)break;a.tag===5&&c!==null&&(a=c,r?(l=ad(t,s),l!=null&&o.unshift(pd(t,l,a))):r||(l=ad(t,s),l!=null&&o.push(pd(t,l,a)))),t=t.return}o.length!==0&&n.push({event:e,listeners:o})}var x3=/\r\n?/g,_3=/\u0000|\uFFFD/g;function RT(n){return(typeof n=="string"?n:""+n).replace(x3,`
38`).replace(_3,"")}function mm(n,e,t){if(e=RT(e),RT(n)!==e&&t)throw Error(Je(425))}function Qg(){}var b1=null,I1=null;function P1(n,e){return n==="textarea"||n==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var B1=typeof setTimeout=="function"?setTimeout:void 0,S3=typeof clearTimeout=="function"?clearTimeout:void 0,bT=typeof Promise=="function"?Promise:void 0,A3=typeof queueMicrotask=="function"?queueMicrotask:typeof bT<"u"?function(n){return bT.resolve(null).then(n).catch(M3)}:B1;function M3(n){setTimeout(function(){throw n})}function bx(n,e){var t=e,i=0;do{var r=t.nextSibling;if(n.removeChild(t),r&&r.nodeType===8)if(t=r.data,t==="/$"){if(i===0){n.removeChild(r),ud(e);return}i--}else t!=="$"&&t!=="$?"&&t!=="$!"||i++;t=r}while(t);ud(e)}function za(n){for(;n!=null;n=n.nextSibling){var e=n.nodeType;if(e===1||e===3)break;if(e===8){if(e=n.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return n}function IT(n){n=n.previousSibling;for(var e=0;n;){if(n.nodeType===8){var t=n.data;if(t==="$"||t==="$!"||t==="$?"){if(e===0)return n;e--}else t==="/$"&&e++}n=n.previousSibling}return null}var Af=Math.random().toString(36).slice(2),so="__reactFiber$"+Af,md="__reactProps$"+Af,Ko="__reactContainer$"+Af,D1="__reactEvents$"+Af,E3="__reactListeners$"+Af,w3="__reactHandles$"+Af;function Vl(n){var e=n[so];if(e)return e;for(var t=n.parentNode;t;){if(e=t[Ko]||t[so]){if(t=e.alternate,e.child!==null||t!==null&&t.child!==null)for(n=IT(n);n!==null;){if(t=n[so])return t;n=IT(n)}return e}n=t,t=n.parentNode}return null}function Jd(n){return n=n[so]||n[Ko],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Eu(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(Je(33))}function dv(n){return n[md]||null}var L1=[],wu=-1;function rl(n){return{current:n}}function Rn(n){0>wu||(n.current=L1[wu],L1[wu]=null,wu--)}function Mn(n,e){wu++,L1[wu]=n.current,n.current=e}var Ka={},Yi=rl(Ka),gr=rl(!1),dc=Ka;function qu(n,e){var t=n.type.contextTypes;if(!t)return Ka;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function vr(n){return n=n.childContextTypes,n!=null}function Zg(){Rn(gr),Rn(Yi)}function PT(n,e,t){if(Yi.current!==Ka)throw Error(Je(168));Mn(Yi,e),Mn(gr,t)}function JI(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Je(108,cN(n)||"Unknown",r));return Gn({},t,i)}function qg(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Ka,dc=Yi.current,Mn(Yi,n),Mn(gr,gr.current),!0}function BT(n,e,t){var i=n.stateNode;if(!i)throw Error(Je(169));t?(n=JI(n,e,dc),i.__reactInternalMemoizedMergedChildContext=n,Rn(gr),Rn(Yi),Mn(Yi,n)):Rn(gr),Mn(gr,t)}var No=null,pv=!1,Ix=!1;function YI(n){No===null?No=[n]:No.push(n)}function T3(n){pv=!0,YI(n)}function sl(){if(!Ix&&No!==null){Ix=!0;var n=0,e=fn;try{var t=No;for(fn=1;n<t.length;n++){var i=t[n];do i=i(!0);while(i!==null)}No=null,pv=!1}catch(r){throw No!==null&&(No=No.slice(n+1)),xI(iA,sl),r}finally{fn=e,Ix=!1}}return null}var Tu=[],Cu=0,$g=null,e0=0,ls=[],cs=0,pc=null,Ho=1,Go="";function Fl(n,e){Tu[Cu++]=e0,Tu[Cu++]=$g,$g=n,e0=e}function KI(n,e,t){ls[cs++]=Ho,ls[cs++]=Go,ls[cs++]=pc,pc=n;var i=Ho;n=Go;var r=32-ks(i)-1;i&=~(1<<r),t+=1;var s=32-ks(e)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,Ho=1<<32-ks(e)+r|t<<r|i,Go=s+n}else Ho=1<<s|t<<r|i,Go=n}function hA(n){n.return!==null&&(Fl(n,1),KI(n,1,0))}function dA(n){for(;n===$g;)$g=Tu[--Cu],Tu[Cu]=null,e0=Tu[--Cu],Tu[Cu]=null;for(;n===pc;)pc=ls[--cs],ls[cs]=null,Go=ls[--cs],ls[cs]=null,Ho=ls[--cs],ls[cs]=null}var Hr=null,Or=null,Pn=!1,Us=null;function QI(n,e){var t=hs(5,null,null,0);t.elementType="DELETED",t.stateNode=e,t.return=n,e=n.deletions,e===null?(n.deletions=[t],n.flags|=16):e.push(t)}function DT(n,e){switch(n.tag){case 5:var t=n.type;return e=e.nodeType!==1||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(n.stateNode=e,Hr=n,Or=za(e.firstChild),!0):!1;case 6:return e=n.pendingProps===""||e.nodeType!==3?null:e,e!==null?(n.stateNode=e,Hr=n,Or=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(t=pc!==null?{id:Ho,overflow:Go}:null,n.memoizedState={dehydrated:e,treeContext:t,retryLane:1073741824},t=hs(18,null,null,0),t.stateNode=e,t.return=n,n.child=t,Hr=n,Or=null,!0):!1;default:return!1}}function F1(n){return(n.mode&1)!==0&&(n.flags&128)===0}function N1(n){if(Pn){var e=Or;if(e){var t=e;if(!DT(n,e)){if(F1(n))throw Error(Je(418));e=za(t.nextSibling);var i=Hr;e&&DT(n,e)?QI(i,t):(n.flags=n.flags&-4097|2,Pn=!1,Hr=n)}}else{if(F1(n))throw Error(Je(418));n.flags=n.flags&-4097|2,Pn=!1,Hr=n}}}function LT(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Hr=n}function gm(n){if(n!==Hr)return!1;if(!Pn)return LT(n),Pn=!0,!1;var e;if((e=n.tag!==3)&&!(e=n.tag!==5)&&(e=n.type,e=e!=="head"&&e!=="body"&&!P1(n.type,n.memoizedProps)),e&&(e=Or)){if(F1(n))throw ZI(),Error(Je(418));for(;e;)QI(n,e),e=za(e.nextSibling)}if(LT(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(Je(317));e:{for(n=n.nextSibling,e=0;n;){if(n.nodeType===8){var t=n.data;if(t==="/$"){if(e===0){Or=za(n.nextSibling);break e}e--}else t!=="$"&&t!=="$!"&&t!=="$?"||e++}n=n.nextSibling}Or=null}}else Or=Hr?za(n.stateNode.nextSibling):null;return!0}function ZI(){for(var n=Or;n;)n=za(n.nextSibling)}function $u(){Or=Hr=null,Pn=!1}function pA(n){Us===null?Us=[n]:Us.push(n)}var C3=ia.ReactCurrentBatchConfig;function eh(n,e,t){if(n=t.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(Je(309));var i=t.stateNode}if(!i)throw Error(Je(147,n));var r=i,s=""+n;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=r.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof n!="string")throw Error(Je(284));if(!t._owner)throw Error(Je(290,n))}return n}function vm(n,e){throw n=Object.prototype.toString.call(e),Error(Je(31,n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n))}function FT(n){var e=n._init;return e(n._payload)}function qI(n){function e(g,S){if(n){var A=g.deletions;A===null?(g.deletions=[S],g.flags|=16):A.push(S)}}function t(g,S){if(!n)return null;for(;S!==null;)e(g,S),S=S.sibling;return null}function i(g,S){for(g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function r(g,S){return g=Wa(g,S),g.index=0,g.sibling=null,g}function s(g,S,A){return g.index=A,n?(A=g.alternate,A!==null?(A=A.index,A<S?(g.flags|=2,S):A):(g.flags|=2,S)):(g.flags|=1048576,S)}function o(g){return n&&g.alternate===null&&(g.flags|=2),g}function a(g,S,A,E){return S===null||S.tag!==6?(S=Ux(A,g.mode,E),S.return=g,S):(S=r(S,A),S.return=g,S)}function l(g,S,A,E){var I=A.type;return I===_u?f(g,S,A.props.children,E,A.key):S!==null&&(S.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ta&&FT(I)===S.type)?(E=r(S,A.props),E.ref=eh(g,S,A),E.return=g,E):(E=Lg(A.type,A.key,A.props,null,g.mode,E),E.ref=eh(g,S,A),E.return=g,E)}function c(g,S,A,E){return S===null||S.tag!==4||S.stateNode.containerInfo!==A.containerInfo||S.stateNode.implementation!==A.implementation?(S=Ox(A,g.mode,E),S.return=g,S):(S=r(S,A.children||[]),S.return=g,S)}function f(g,S,A,E,I){return S===null||S.tag!==7?(S=nc(A,g.mode,E,I),S.return=g,S):(S=r(S,A),S.return=g,S)}function d(g,S,A){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Ux(""+S,g.mode,A),S.return=g,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case om:return A=Lg(S.type,S.key,S.props,null,g.mode,A),A.ref=eh(g,null,S),A.return=g,A;case xu:return S=Ox(S,g.mode,A),S.return=g,S;case Ta:var E=S._init;return d(g,E(S._payload),A)}if(Rh(S)||Kf(S))return S=nc(S,g.mode,A,null),S.return=g,S;vm(g,S)}return null}function p(g,S,A,E){var I=S!==null?S.key:null;if(typeof A=="string"&&A!==""||typeof A=="number")return I!==null?null:a(g,S,""+A,E);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case om:return A.key===I?l(g,S,A,E):null;case xu:return A.key===I?c(g,S,A,E):null;case Ta:return I=A._init,p(g,S,I(A._payload),E)}if(Rh(A)||Kf(A))return I!==null?null:f(g,S,A,E,null);vm(g,A)}return null}function m(g,S,A,E,I){if(typeof E=="string"&&E!==""||typeof E=="number")return g=g.get(A)||null,a(S,g,""+E,I);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case om:return g=g.get(E.key===null?A:E.key)||null,l(S,g,E,I);case xu:return g=g.get(E.key===null?A:E.key)||null,c(S,g,E,I);case Ta:var b=E._init;return m(g,S,A,b(E._payload),I)}if(Rh(E)||Kf(E))return g=g.get(A)||null,f(S,g,E,I,null);vm(S,E)}return null}function v(g,S,A,E){for(var I=null,b=null,P=S,D=S=0,O=null;P!==null&&D<A.length;D++){P.index>D?(O=P,P=null):O=P.sibling;var C=p(g,P,A[D],E);if(C===null){P===null&&(P=O);break}n&&P&&C.alternate===null&&e(g,P),S=s(C,S,D),b===null?I=C:b.sibling=C,b=C,P=O}if(D===A.length)return t(g,P),Pn&&Fl(g,D),I;if(P===null){for(;D<A.length;D++)P=d(g,A[D],E),P!==null&&(S=s(P,S,D),b===null?I=P:b.sibling=P,b=P);return Pn&&Fl(g,D),I}for(P=i(g,P);D<A.length;D++)O=m(P,g,D,A[D],E),O!==null&&(n&&O.alternate!==null&&P.delete(O.key===null?D:O.key),S=s(O,S,D),b===null?I=O:b.sibling=O,b=O);return n&&P.forEach(function(B){return e(g,B)}),Pn&&Fl(g,D),I}function _(g,S,A,E){var I=Kf(A);if(typeof I!="function")throw Error(Je(150));if(A=I.call(A),A==null)throw Error(Je(151));for(var b=I=null,P=S,D=S=0,O=null,C=A.next();P!==null&&!C.done;D++,C=A.next()){P.index>D?(O=P,P=null):O=P.sibling;var B=p(g,P,C.value,E);if(B===null){P===null&&(P=O);break}n&&P&&B.alternate===null&&e(g,P),S=s(B,S,D),b===null?I=B:b.sibling=B,b=B,P=O}if(C.done)return t(g,P),Pn&&Fl(g,D),I;if(P===null){for(;!C.done;D++,C=A.next())C=d(g,C.value,E),C!==null&&(S=s(C,S,D),b===null?I=C:b.sibling=C,b=C);return Pn&&Fl(g,D),I}for(P=i(g,P);!C.done;D++,C=A.next())C=m(P,g,D,C.value,E),C!==null&&(n&&C.alternate!==null&&P.delete(C.key===null?D:C.key),S=s(C,S,D),b===null?I=C:b.sibling=C,b=C);return n&&P.forEach(function(Y){return e(g,Y)}),Pn&&Fl(g,D),I}function x(g,S,A,E){if(typeof A=="object"&&A!==null&&A.type===_u&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case om:e:{for(var I=A.key,b=S;b!==null;){if(b.key===I){if(I=A.type,I===_u){if(b.tag===7){t(g,b.sibling),S=r(b,A.props.children),S.return=g,g=S;break e}}else if(b.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ta&&FT(I)===b.type){t(g,b.sibling),S=r(b,A.props),S.ref=eh(g,b,A),S.return=g,g=S;break e}t(g,b);break}else e(g,b);b=b.sibling}A.type===_u?(S=nc(A.props.children,g.mode,E,A.key),S.return=g,g=S):(E=Lg(A.type,A.key,A.props,null,g.mode,E),E.ref=eh(g,S,A),E.return=g,g=E)}return o(g);case xu:e:{for(b=A.key;S!==null;){if(S.key===b)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){t(g,S.sibling),S=r(S,A.children||[]),S.return=g,g=S;break e}else{t(g,S);break}else e(g,S);S=S.sibling}S=Ox(A,g.mode,E),S.return=g,g=S}return o(g);case Ta:return b=A._init,x(g,S,b(A._payload),E)}if(Rh(A))return v(g,S,A,E);if(Kf(A))return _(g,S,A,E);vm(g,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,S!==null&&S.tag===6?(t(g,S.sibling),S=r(S,A),S.return=g,g=S):(t(g,S),S=Ux(A,g.mode,E),S.return=g,g=S),o(g)):t(g,S)}return x}var ef=qI(!0),$I=qI(!1),t0=rl(null),n0=null,Ru=null,mA=null;function gA(){mA=Ru=n0=null}function vA(n){var e=t0.current;Rn(t0),n._currentValue=e}function U1(n,e,t){for(;n!==null;){var i=n.alternate;if((n.childLanes&e)!==e?(n.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),n===t)break;n=n.return}}function Gu(n,e){n0=n,mA=Ru=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&e&&(pr=!0),n.firstContext=null)}function ys(n){var e=n._currentValue;if(mA!==n)if(n={context:n,memoizedValue:e,next:null},Ru===null){if(n0===null)throw Error(Je(308));Ru=n,n0.dependencies={lanes:0,firstContext:n}}else Ru=Ru.next=n;return e}var Wl=null;function yA(n){Wl===null?Wl=[n]:Wl.push(n)}function e2(n,e,t,i){var r=e.interleaved;return r===null?(t.next=t,yA(e)):(t.next=r.next,r.next=t),e.interleaved=t,Qo(n,i)}function Qo(n,e){n.lanes|=e;var t=n.alternate;for(t!==null&&(t.lanes|=e),t=n,n=n.return;n!==null;)n.childLanes|=e,t=n.alternate,t!==null&&(t.childLanes|=e),t=n,n=n.return;return t.tag===3?t.stateNode:null}var Ca=!1;function xA(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function t2(n,e){n=n.updateQueue,e.updateQueue===n&&(e.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Xo(n,e){return{eventTime:n,lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(n,e,t){var i=n.updateQueue;if(i===null)return null;if(i=i.shared,sn&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,Qo(n,t)}return r=i.interleaved,r===null?(e.next=e,yA(i)):(e.next=r.next,r.next=e),i.interleaved=e,Qo(n,t)}function Rg(n,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,rA(n,t)}}function NT(n,e){var t=n.updateQueue,i=n.alternate;if(i!==null&&(i=i.updateQueue,t===i)){var r=null,s=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};s===null?r=s=o:s=s.next=o,t=t.next}while(t!==null);s===null?r=s=e:s=s.next=e}else r=s=e;t={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},n.updateQueue=t;return}n=t.lastBaseUpdate,n===null?t.firstBaseUpdate=e:n.next=e,t.lastBaseUpdate=e}function i0(n,e,t,i){var r=n.updateQueue;Ca=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=n.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var d=r.baseState;o=0,f=c=l=null,a=s;do{var p=a.lane,m=a.eventTime;if((i&p)===p){f!==null&&(f=f.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=n,_=a;switch(p=e,m=t,_.tag){case 1:if(v=_.payload,typeof v=="function"){d=v.call(m,d,p);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=_.payload,p=typeof v=="function"?v.call(m,d,p):v,p==null)break e;d=Gn({},d,p);break e;case 2:Ca=!0}}a.callback!==null&&a.lane!==0&&(n.flags|=64,p=r.effects,p===null?r.effects=[a]:p.push(a))}else m={eventTime:m,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=m,l=d):f=f.next=m,o|=p;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;p=a,a=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);if(f===null&&(l=d),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=f,e=r.shared.interleaved,e!==null){r=e;do o|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);gc|=o,n.lanes=o,n.memoizedState=d}}function UT(n,e,t){if(n=e.effects,e.effects=null,n!==null)for(e=0;e<n.length;e++){var i=n[e],r=i.callback;if(r!==null){if(i.callback=null,i=t,typeof r!="function")throw Error(Je(191,r));r.call(i)}}}var Yd={},fo=rl(Yd),gd=rl(Yd),vd=rl(Yd);function Xl(n){if(n===Yd)throw Error(Je(174));return n}function _A(n,e){switch(Mn(vd,e),Mn(gd,n),Mn(fo,Yd),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:v1(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=v1(e,n)}Rn(fo),Mn(fo,e)}function tf(){Rn(fo),Rn(gd),Rn(vd)}function n2(n){Xl(vd.current);var e=Xl(fo.current),t=v1(e,n.type);e!==t&&(Mn(gd,n),Mn(fo,t))}function SA(n){gd.current===n&&(Rn(fo),Rn(gd))}var Nn=rl(0);function r0(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Px=[];function AA(){for(var n=0;n<Px.length;n++)Px[n]._workInProgressVersionPrimary=null;Px.length=0}var bg=ia.ReactCurrentDispatcher,Bx=ia.ReactCurrentBatchConfig,mc=0,zn=null,ui=null,Si=null,s0=!1,Hh=!1,yd=0,R3=0;function Oi(){throw Error(Je(321))}function MA(n,e){if(e===null)return!1;for(var t=0;t<e.length&&t<n.length;t++)if(!Gs(n[t],e[t]))return!1;return!0}function EA(n,e,t,i,r,s){if(mc=s,zn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,bg.current=n===null||n.memoizedState===null?B3:D3,n=t(i,r),Hh){s=0;do{if(Hh=!1,yd=0,25<=s)throw Error(Je(301));s+=1,Si=ui=null,e.updateQueue=null,bg.current=L3,n=t(i,r)}while(Hh)}if(bg.current=o0,e=ui!==null&&ui.next!==null,mc=0,Si=ui=zn=null,s0=!1,e)throw Error(Je(300));return n}function wA(){var n=yd!==0;return yd=0,n}function io(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Si===null?zn.memoizedState=Si=n:Si=Si.next=n,Si}function xs(){if(ui===null){var n=zn.alternate;n=n!==null?n.memoizedState:null}else n=ui.next;var e=Si===null?zn.memoizedState:Si.next;if(e!==null)Si=e,ui=n;else{if(n===null)throw Error(Je(310));ui=n,n={memoizedState:ui.memoizedState,baseState:ui.baseState,baseQueue:ui.baseQueue,queue:ui.queue,next:null},Si===null?zn.memoizedState=Si=n:Si=Si.next=n}return Si}function xd(n,e){return typeof e=="function"?e(n):e}function Dx(n){var e=xs(),t=e.queue;if(t===null)throw Error(Je(311));t.lastRenderedReducer=n;var i=ui,r=i.baseQueue,s=t.pending;if(s!==null){if(r!==null){var o=r.next;
vendor: 2,054 bytes, line 38
38r.next=s.next,s.next=o}i.baseQueue=r=s,t.pending=null}if(r!==null){s=r.next,i=i.baseState;var a=o=null,l=null,c=s;do{var f=c.lane;if((mc&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:n(i,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=i):l=l.next=d,zn.lanes|=f,gc|=f}c=c.next}while(c!==null&&c!==s);l===null?o=i:l.next=a,Gs(i,e.memoizedState)||(pr=!0),e.memoizedState=i,e.baseState=o,e.baseQueue=l,t.lastRenderedState=i}if(n=t.interleaved,n!==null){r=n;do s=r.lane,zn.lanes|=s,gc|=s,r=r.next;while(r!==n)}else r===null&&(t.lanes=0);return[e.memoizedState,t.dispatch]}function Lx(n){var e=xs(),t=e.queue;if(t===null)throw Error(Je(311));t.lastRenderedReducer=n;var i=t.dispatch,r=t.pending,s=e.memoizedState;if(r!==null){t.pending=null;var o=r=r.next;do s=n(s,o.action),o=o.next;while(o!==r);Gs(s,e.memoizedState)||(pr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),t.lastRenderedState=s}return[s,i]}function i2(){}function r2(n,e){var t=zn,i=xs(),r=e(),s=!Gs(i.memoizedState,r);if(s&&(i.memoizedState=r,pr=!0),i=i.queue,TA(a2.bind(null,t,i,n),[n]),i.getSnapshot!==e||s||Si!==null&&Si.memoizedState.tag&1){if(t.flags|=2048,_d(9,o2.bind(null,t,i,r,e),void 0,null),Mi===null)throw Error(Je(349));mc&30||s2(t,e,r)}return r}function s2(n,e,t){n.flags|=16384,n={getSnapshot:e,value:t},e=zn.updateQueue,e===null?(e={lastEffect:null,stores:null},zn.updateQueue=e,e.stores=[n]):(t=e.stores,t===null?e.stores=[n]:t.push(n))}function o2(n,e,t,i){e.value=t,e.getSnapshot=i,l2(e)&&c2(n)}function a2(n,e,t){return t(function(){l2(e)&&c2(n)})}function l2(n){var e=n.getSnapshot;n=n.value;try{var t=e();return!Gs(n,t)}catch{return!0}}function c2(n){var e=Qo(n,1);e!==null&&zs(e,n,1,-1)}function OT(n){var e=io();return typeof n=="function"&&(n=n()),e.memoizedState=e.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xd,lastRenderedState:n}
vendor: 3,499 bytes, line 38
38,e.queue=n,n=n.dispatch=P3.bind(null,zn,n),[e.memoizedState,n]}function _d(n,e,t,i){return n={tag:n,create:e,destroy:t,deps:i,next:null},e=zn.updateQueue,e===null?(e={lastEffect:null,stores:null},zn.updateQueue=e,e.lastEffect=n.next=n):(t=e.lastEffect,t===null?e.lastEffect=n.next=n:(i=t.next,t.next=n,n.next=i,e.lastEffect=n)),n}function u2(){return xs().memoizedState}function Ig(n,e,t,i){var r=io();zn.flags|=n,r.memoizedState=_d(1|e,t,void 0,i===void 0?null:i)}function mv(n,e,t,i){var r=xs();i=i===void 0?null:i;var s=void 0;if(ui!==null){var o=ui.memoizedState;if(s=o.destroy,i!==null&&MA(i,o.deps)){r.memoizedState=_d(e,t,s,i);return}}zn.flags|=n,r.memoizedState=_d(1|e,t,s,i)}function kT(n,e){return Ig(8390656,8,n,e)}function TA(n,e){return mv(2048,8,n,e)}function f2(n,e){return mv(4,2,n,e)}function h2(n,e){return mv(4,4,n,e)}function d2(n,e){if(typeof e=="function")return n=n(),e(n),function(){e(null)};if(e!=null)return n=n(),e.current=n,function(){e.current=null}}function p2(n,e,t){return t=t!=null?t.concat([n]):null,mv(4,4,d2.bind(null,e,n),t)}function CA(){}function m2(n,e){var t=xs();e=e===void 0?null:e;var i=t.memoizedState;return i!==null&&e!==null&&MA(e,i[1])?i[0]:(t.memoizedState=[n,e],n)}function g2(n,e){var t=xs();e=e===void 0?null:e;var i=t.memoizedState;return i!==null&&e!==null&&MA(e,i[1])?i[0]:(n=n(),t.memoizedState=[n,e],n)}function v2(n,e,t){return mc&21?(Gs(t,e)||(t=AI(),zn.lanes|=t,gc|=t,n.baseState=!0),e):(n.baseState&&(n.baseState=!1,pr=!0),n.memoizedState=t)}function b3(n,e){var t=fn;fn=t!==0&&4>t?t:4,n(!0);var i=Bx.transition;Bx.transition={};try{n(!1),e()}finally{fn=t,Bx.transition=i}}function y2(){return xs().memoizedState}function I3(n,e,t){var i=Va(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},x2(n))_2(e,t);else if(t=e2(n,e,t,i),t!==null){var r=ir();zs(t,n,i,r),S2(t,e,i)}}function P3(n,e,t){var i=Va(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(x2(n))_2(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,Gs(a,o)){var l=e.interleaved;l===null?(r.next=r,yA(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=e2(n,e,r,i),t!==null&&(r=ir(),zs(t,n,i,r),S2(t,e,i))}}function x2(n){var e=n.alternate;return n===zn||e!==null&&e===zn}function _2(n,e){Hh=s0=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function S2(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,rA(n,t)}}var o0={readContext:ys,useCallback:Oi,useContext:Oi,useEffect:Oi,useImperativeHandle:Oi,useInsertionEffect:Oi,useLayoutEffect:Oi,useMemo:Oi,useReducer:Oi,useRef:Oi,useState:Oi,useDebugValue:Oi,useDeferredValue:Oi,useTransition:Oi,useMutableSource:Oi,useSyncExternalStore:Oi,useId:Oi,unstable_isNewReconciler:!1},B3={readContext:ys,useCallback:function(n,e){return io().memoizedState=[n,e===void 0?null:e],n},useContext:ys,useEffect:kT,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,Ig(4194308,4,d2.bind(null,e,n),t)},useLayoutEffect:function(n,e){return Ig(4194308,4,n,e)},useInsertionEffect:function(n,e){return Ig(4,2,n,e)},useMemo:function(n,e){var t=io();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=io();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e}
vendor: 5,818 bytes, lines 38-40
38,i.queue=n,n=n.dispatch=I3.bind(null,zn,n),[i.memoizedState,n]},useRef:function(n){var e=io();return n={current:n},e.memoizedState=n},useState:OT,useDebugValue:CA,useDeferredValue:function(n){return io().memoizedState=n},useTransition:function(){var n=OT(!1),e=n[0];return n=b3.bind(null,n[1]),io().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=zn,r=io();if(Pn){if(t===void 0)throw Error(Je(407));t=t()}else{if(t=e(),Mi===null)throw Error(Je(349));mc&30||s2(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,kT(a2.bind(null,i,s,n),[n]),i.flags|=2048,_d(9,o2.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=io(),e=Mi.identifierPrefix;if(Pn){var t=Go,i=Ho;t=(i&~(1<<32-ks(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=yd++,0<t&&(e+="H"+t.toString(32)),e+=":"}else t=R3++,e=":"+e+"r"+t.toString(32)+":";return n.memoizedState=e},unstable_isNewReconciler:!1},D3={readContext:ys,useCallback:m2,useContext:ys,useEffect:TA,useImperativeHandle:p2,useInsertionEffect:f2,useLayoutEffect:h2,useMemo:g2,useReducer:Dx,useRef:u2,useState:function(){return Dx(xd)},useDebugValue:CA,useDeferredValue:function(n){var e=xs();return v2(e,ui.memoizedState,n)},useTransition:function(){var n=Dx(xd)[0],e=xs().memoizedState;return[n,e]},useMutableSource:i2,useSyncExternalStore:r2,useId:y2,unstable_isNewReconciler:!1},L3={readContext:ys,useCallback:m2,useContext:ys,useEffect:TA,useImperativeHandle:p2,useInsertionEffect:f2,useLayoutEffect:h2,useMemo:g2,useReducer:Lx,useRef:u2,useState:function(){return Lx(xd)},useDebugValue:CA,useDeferredValue:function(n){var e=xs();return ui===null?e.memoizedState=n:v2(e,ui.memoizedState,n)},useTransition:function(){var n=Lx(xd)[0],e=xs().memoizedState;return[n,e]},useMutableSource:i2,useSyncExternalStore:r2,useId:y2,unstable_isNewReconciler:!1};function Ls(n,e){if(n&&n.defaultProps){e=Gn({},e),n=n.defaultProps;for(var t in n)e[t]===void 0&&(e[t]=n[t]);return e}return e}function O1(n,e,t,i){e=n.memoizedState,t=t(i,e),t=t==null?e:Gn({},e,t),n.memoizedState=t,n.lanes===0&&(n.updateQueue.baseState=t)}var gv={isMounted:function(n){return(n=n._reactInternals)?Rc(n)===n:!1},enqueueSetState:function(n,e,t){n=n._reactInternals;var i=ir(),r=Va(n),s=Xo(i,r);s.payload=e,t!=null&&(s.callback=t),e=Ha(n,s,r),e!==null&&(zs(e,n,r,i),Rg(e,n,r))},enqueueReplaceState:function(n,e,t){n=n._reactInternals;var i=ir(),r=Va(n),s=Xo(i,r);s.tag=1,s.payload=e,t!=null&&(s.callback=t),e=Ha(n,s,r),e!==null&&(zs(e,n,r,i),Rg(e,n,r))},enqueueForceUpdate:function(n,e){n=n._reactInternals;var t=ir(),i=Va(n),r=Xo(t,i);r.tag=2,e!=null&&(r.callback=e),e=Ha(n,r,i),e!==null&&(zs(e,n,i,t),Rg(e,n,i))}};function zT(n,e,t,i,r,s,o){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(i,s,o):e.prototype&&e.prototype.isPureReactComponent?!hd(t,i)||!hd(r,s):!0}function A2(n,e,t){var i=!1,r=Ka,s=e.contextType;return typeof s=="object"&&s!==null?s=ys(s):(r=vr(e)?dc:Yi.current,i=e.contextTypes,s=(i=i!=null)?qu(n,r):Ka),e=new e(t,s),n.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=gv,n.stateNode=e,e._reactInternals=n,i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=s),e}function HT(n,e,t,i){n=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(t,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(t,i),e.state!==n&&gv.enqueueReplaceState(e,e.state,null)}function k1(n,e,t,i){var r=n.stateNode;r.props=t,r.state=n.memoizedState,r.refs={},xA(n);var s=e.contextType;typeof s=="object"&&s!==null?r.context=ys(s):(s=vr(e)?dc:Yi.current,r.context=qu(n,s)),r.state=n.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(O1(n,e,s,t),r.state=n.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(e=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),e!==r.state&&gv.enqueueReplaceState(r,r.state,null),i0(n,t,r,i),r.state=n.memoizedState),typeof r.componentDidMount=="function"&&(n.flags|=4194308)}function nf(n,e){try{var t="",i=e;do t+=lN(i),i=i.return;while(i);var r=t}catch(s){r=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:n,source:e,stack:r,digest:null}}function Fx(n,e,t){return{value:n,source:null,stack:t??null,digest:e??null}}function z1(n,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var F3=typeof WeakMap=="function"?WeakMap:Map;function M2(n,e,t){t=Xo(-1,t),t.tag=3,t.payload={element:null};var i=e.value;return t.callback=function(){l0||(l0=!0,Q1=i),z1(n,e)},t}function E2(n,e,t){t=Xo(-1,t),t.tag=3;var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;t.payload=function(){return i(r)},t.callback=function(){z1(n,e)}}var s=n.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){z1(n,e),typeof i!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function GT(n,e,t){var i=n.pingCache;if(i===null){i=n.pingCache=new F3;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(t)||(r.add(t),n=K3.bind(null,n,e,t),e.then(n,n))}function VT(n){do{var e;if((e=n.tag===13)&&(e=n.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return n;n=n.return}while(n!==null);return null}function WT(n,e,t,i,r){return n.mode&1?(n.flags|=65536,n.lanes=r,n):(n===e?n.flags|=65536:(n.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=Xo(-1,1),e.tag=2,Ha(t,e,1)
vendor: 6,389 bytes, line 40
40)),t.lanes|=1),n)}var N3=ia.ReactCurrentOwner,pr=!1;function er(n,e,t,i){e.child=n===null?$I(e,null,t,i):ef(e,n.child,t,i)}function XT(n,e,t,i,r){t=t.render;var s=e.ref;return Gu(e,r),i=EA(n,e,t,i,s,r),t=wA(),n!==null&&!pr?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Zo(n,e,r)):(Pn&&t&&hA(e),e.flags|=1,er(n,e,i,r),e.child)}function jT(n,e,t,i,r){if(n===null){var s=t.type;return typeof s=="function"&&!FA(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,w2(n,e,s,i,r)):(n=Lg(t.type,null,i,e,e.mode,r),n.ref=e.ref,n.return=e,e.child=n)}if(s=n.child,!(n.lanes&r)){var o=s.memoizedProps;if(t=t.compare,t=t!==null?t:hd,t(o,i)&&n.ref===e.ref)return Zo(n,e,r)}return e.flags|=1,n=Wa(s,i),n.ref=e.ref,n.return=e,e.child=n}function w2(n,e,t,i,r){if(n!==null){var s=n.memoizedProps;if(hd(s,i)&&n.ref===e.ref)if(pr=!1,e.pendingProps=i=s,(n.lanes&r)!==0)n.flags&131072&&(pr=!0);else return e.lanes=n.lanes,Zo(n,e,r)}return H1(n,e,t,i,r)}function T2(n,e,t){var i=e.pendingProps,r=i.children,s=n!==null?n.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mn(Iu,Fr),Fr|=t;else{if(!(t&1073741824))return n=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:n,cachePool:null,transitions:null},e.updateQueue=null,Mn(Iu,Fr),Fr|=n,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:t,Mn(Iu,Fr),Fr|=i}else s!==null?(i=s.baseLanes|t,e.memoizedState=null):i=t,Mn(Iu,Fr),Fr|=i;return er(n,e,r,t),e.child}function C2(n,e){var t=e.ref;(n===null&&t!==null||n!==null&&n.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function H1(n,e,t,i,r){var s=vr(t)?dc:Yi.current;return s=qu(e,s),Gu(e,r),t=EA(n,e,t,i,s,r),i=wA(),n!==null&&!pr?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Zo(n,e,r)):(Pn&&i&&hA(e),e.flags|=1,er(n,e,t,r),e.child)}function JT(n,e,t,i,r){if(vr(t)){var s=!0;qg(e)}else s=!1;if(Gu(e,r),e.stateNode===null)Pg(n,e),A2(e,t,i),k1(e,t,i,r),i=!0;else if(n===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=t.contextType;typeof c=="object"&&c!==null?c=ys(c):(c=vr(t)?dc:Yi.current,c=qu(e,c));var f=t.getDerivedStateFromProps,d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==c)&&HT(e,o,i,c),Ca=!1;var p=e.memoizedState;o.state=p,i0(e,i,o,r),l=e.memoizedState,a!==i||p!==l||gr.current||Ca?(typeof f=="function"&&(O1(e,t,f,i),l=e.memoizedState),(a=Ca||zT(e,t,a,i,p,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,t2(n,e),a=e.memoizedProps,c=e.type===e.elementType?a:Ls(e.type,a),o.props=c,d=e.pendingProps,p=o.context,l=t.contextType,typeof l=="object"&&l!==null?l=ys(l):(l=vr(t)?dc:Yi.current,l=qu(e,l));var m=t.getDerivedStateFromProps;(f=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||p!==l)&&HT(e,o,i,l),Ca=!1,p=e.memoizedState,o.state=p,i0(e,i,o,r);var v=e.memoizedState;a!==d||p!==v||gr.current||Ca?(typeof m=="function"&&(O1(e,t,m,i),v=e.memoizedState),(c=Ca||zT(e,t,c,i,p,v,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=v),o.props=i,o.state=v,o.context=l,i=c):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),i=!1)}return G1(n,e,t,i,s,r)}function G1(n,e,t,i,r,s){C2(n,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&BT(e,t,!1),Zo(n,e,s);i=e.stateNode,N3.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,n!==null&&o?(e.child=ef(e,n.child,null,s),e.child=ef(e,null,a,s)):er(n,e,a,s),e.memoizedState=i.state,r&&BT(e,t,!0),e.child}function R2(n){var e=n.stateNode;e.pendingContext?PT(n,e.pendingContext,e.pendingContext!==e.context):e.context&&PT(n,e.context,!1),_A(n,e.containerInfo)}function YT(n,e,t,i,r){return $u(),pA(r),e.flags|=256,er(n,e,t,i),e.child}var V1={dehydrated:null,treeContext:null,retryLane:0};function W1(n){return{baseLanes:n,cachePool:null,transitions:null}}function b2(n,e,t){var i=e.pendingProps,r=Nn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=n!==null&&n.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(n===null||n.memoizedState!==null)&&(r|=1),Mn(Nn,r&1),n===null)return N1(e),n=e.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(e.mode&1?n.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,n=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=xv(o,i,0,null),n=nc(n,i,t,null),s.return=e,n.return=e,s.sibling=n,e.child=s,e.child.memoizedState=W1(t),e.memoizedState=V1,n):RA(e,o));if(r=n.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return U3(n,e,o,i,a,r,t);if(s){s=i.fallback,o=e.mode,r=n.child,a=r.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=l,e.deletions=null):(i=Wa(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=Wa(a,s):(s=nc(s,o,t,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=n.child.memoizedState,o=o===null?W1(t):{base
vendor: 5,398 bytes, line 40
40Lanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=n.childLanes&~t,e.memoizedState=V1,i}return s=n.child,n=s.sibling,i=Wa(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=t),i.return=e,i.sibling=null,n!==null&&(t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)),e.child=i,e.memoizedState=null,i}function RA(n,e){return e=xv({mode:"visible",children:e},n.mode,0,null),e.return=n,n.child=e}function ym(n,e,t,i){return i!==null&&pA(i),ef(e,n.child,null,t),n=RA(e,e.pendingProps.children),n.flags|=2,e.memoizedState=null,n}function U3(n,e,t,i,r,s,o){if(t)return e.flags&256?(e.flags&=-257,i=Fx(Error(Je(422))),ym(n,e,o,i)):e.memoizedState!==null?(e.child=n.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=xv({mode:"visible",children:i.children},r,0,null),s=nc(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&ef(e,n.child,null,o),e.child.memoizedState=W1(o),e.memoizedState=V1,s);if(!(e.mode&1))return ym(n,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(Je(419)),i=Fx(s,i,void 0),ym(n,e,o,i)}if(a=(o&n.childLanes)!==0,pr||a){if(i=Mi,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Qo(n,r),zs(i,n,r,-1))}return LA(),i=Fx(Error(Je(421))),ym(n,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=n.child,e=Q3.bind(null,n),r._reactRetry=e,null):(n=s.treeContext,Or=za(r.nextSibling),Hr=e,Pn=!0,Us=null,n!==null&&(ls[cs++]=Ho,ls[cs++]=Go,ls[cs++]=pc,Ho=n.id,Go=n.overflow,pc=e),e=RA(e,i.children),e.flags|=4096,e)}function KT(n,e,t){n.lanes|=e;var i=n.alternate;i!==null&&(i.lanes|=e),U1(n.return,e,t)}function Nx(n,e,t,i,r){var s=n.memoizedState;s===null?n.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:t,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=t,s.tailMode=r)}function I2(n,e,t){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(er(n,e,i.children,t),i=Nn.current,i&2)i=i&1|2,e.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=e.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&KT(n,t,e);else if(n.tag===19)KT(n,t,e);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}i&=1}if(Mn(Nn,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(t=e.child,r=null;t!==null;)n=t.alternate,n!==null&&r0(n)===null&&(r=t),t=t.sibling;t=r,t===null?(r=e.child,e.child=null):(r=t.sibling,t.sibling=null),Nx(e,!1,r,t,s);break;case"backwards":for(t=null,r=e.child,e.child=null;r!==null;){if(n=r.alternate,n!==null&&r0(n)===null){e.child=r;break}n=r.sibling,r.sibling=t,t=r,r=n}Nx(e,!0,t,null,s);break;case"together":Nx(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Pg(n,e){!(e.mode&1)&&n!==null&&(n.alternate=null,e.alternate=null,e.flags|=2)}function Zo(n,e,t){if(n!==null&&(e.dependencies=n.dependencies),gc|=e.lanes,!(t&e.childLanes))return null;if(n!==null&&e.child!==n.child)throw Error(Je(153));if(e.child!==null){for(n=e.child,t=Wa(n,n.pendingProps),e.child=t,t.return=e;n.sibling!==null;)n=n.sibling,t=t.sibling=Wa(n,n.pendingProps),t.return=e;t.sibling=null}return e.child}function O3(n,e,t){switch(e.tag){case 3:R2(e),$u();break;case 5:n2(e);break;case 1:vr(e.type)&&qg(e);break;case 4:_A(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;Mn(t0,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(Mn(Nn,Nn.current&1),e.flags|=128,null):t&e.child.childLanes?b2(n,e,t):(Mn(Nn,Nn.current&1),n=Zo(n,e,t),n!==null?n.sibling:null);Mn(Nn,Nn.current&1);break;case 19:if(i=(t&e.childLanes)!==0,n.flags&128){if(i)return I2(n,e,t);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Mn(Nn,Nn.current),i)break;return null;case 22:case 23:return e.lanes=0,T2(n,e,t)}return Zo(n,e,t)}var P2,X1,B2,D2;P2=function(n,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)n.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};X1=function(){};B2=function(n,e,t,i){var r=n.memoizedProps;if(r!==i){n=e.stateNode,Xl(fo.current);var s=null;switch(t){case"input":r=d1(n,r),i=d1(n,i),s=[];break;case"select":r=Gn({},r,{value:void 0}),i=Gn({},i,{value:void 0}),s=[];break;case"textarea":r=g1(n,r),i=g1(n,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(n.onclick=Qg)}y1(t,i);var o;t=null;for(c in r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var a=r[c];for(o in a)a.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(sd.hasOwnProperty(c)?s||
vendor: 5,321 bytes, line 40
40(s=[]):(s=s||[]).push(c,null));for(c in i){var l=i[c];if(a=r!=null?r[c]:void 0,i.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(t||(t={}),t[o]=l[o])}else t||(s||(s=[]),s.push(c,t)),t=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(sd.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&wn("scroll",n),s||a===l||(s=[])):(s=s||[]).push(c,l))}t&&(s=s||[]).push("style",t);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};D2=function(n,e,t,i){t!==i&&(e.flags|=4)};function th(n,e){if(!Pn)switch(n.tailMode){case"hidden":e=n.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?n.tail=null:t.sibling=null;break;case"collapsed":t=n.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e||n.tail===null?n.tail=null:n.tail.sibling=null:i.sibling=null}}function ki(n){var e=n.alternate!==null&&n.alternate.child===n.child,t=0,i=0;if(e)for(var r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=n,r=r.sibling;else for(r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=n,r=r.sibling;return n.subtreeFlags|=i,n.childLanes=t,e}function k3(n,e,t){var i=e.pendingProps;switch(dA(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ki(e),null;case 1:return vr(e.type)&&Zg(),ki(e),null;case 3:return i=e.stateNode,tf(),Rn(gr),Rn(Yi),AA(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(gm(e)?e.flags|=4:n===null||n.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Us!==null&&($1(Us),Us=null))),X1(n,e),ki(e),null;case 5:SA(e);var r=Xl(vd.current);if(t=e.type,n!==null&&e.stateNode!=null)B2(n,e,t,i,r),n.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(Je(166));return ki(e),null}if(n=Xl(fo.current),gm(e)){i=e.stateNode,t=e.type;var s=e.memoizedProps;switch(i[so]=e,i[md]=s,n=(e.mode&1)!==0,t){case"dialog":wn("cancel",i),wn("close",i);break;case"iframe":case"object":case"embed":wn("load",i);break;case"video":case"audio":for(r=0;r<Ih.length;r++)wn(Ih[r],i);break;case"source":wn("error",i);break;case"img":case"image":case"link":wn("error",i),wn("load",i);break;case"details":wn("toggle",i);break;case"input":rT(i,s),wn("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},wn("invalid",i);break;case"textarea":oT(i,s),wn("invalid",i)}y1(t,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?i.textContent!==a&&(s.suppressHydrationWarning!==!0&&mm(i.textContent,a,n),r=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&mm(i.textContent,a,n),r=["children",""+a]):sd.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&wn("scroll",i)}switch(t){case"input":am(i),sT(i,s,!0);break;case"textarea":am(i),aT(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=Qg)}i=r,e.updateQueue=i,i!==null&&(e.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=aI(t)),n==="http://www.w3.org/1999/xhtml"?t==="script"?(n=o.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[so]=e,n[md]=i,P2(n,e,!1,!1),e.stateNode=n;e:{switch(o=x1(t,i),t){case"dialog":wn("cancel",n),wn("close",n),r=i;break;case"iframe":case"object":case"embed":wn("load",n),r=i;break;case"video":case"audio":for(r=0;r<Ih.length;r++)wn(Ih[r],n);r=i;break;case"source":wn("error",n),r=i;break;case"img":case"image":case"link":wn("error",n),wn("load",n),r=i;break;case"details":wn("toggle",n),r=i;break;case"input":rT(n,i),r=d1(n,i),wn("invalid",n);break;case"option":r=i;break;case"select":n._wrapperState={wasMultiple:!!i.multiple},r=Gn({},i,{value:void 0}),wn("invalid",n);break;case"textarea":oT(n,i),r=g1(n,i),wn("invalid",n);break;default:r=i}y1(t,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?uI(n,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&lI(n,l)):s==="children"?typeof l=="string"?(t!=="textarea"||l!=="")&&od(n,l):typeof l=="number"&&od(n,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(sd.hasOwnProperty(s)?l!=null&&s==="onScroll"&&wn("scroll",n):l!=null&&qS(n,s,l,o))}switch(t){case"input":am(n),sT(n,i,!1);break;case"textarea":am(n),aT(n);break;case"option":i.value!=null&&n.setAttribute("value",""+Ya(i.value));break;case"select":n.multiple=!!i.multiple,s=i.value,s!=null?Ou(n,!!i.multiple,s,!1):i.defaultValue!=null&&Ou(n,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(n.onclick=Qg)}switch(t){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}
vendor: 27,714 bytes, line 40
40return ki(e),null;case 6:if(n&&e.stateNode!=null)D2(n,e,n.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(Je(166));if(t=Xl(vd.current),Xl(fo.current),gm(e)){if(i=e.stateNode,t=e.memoizedProps,i[so]=e,(s=i.nodeValue!==t)&&(n=Hr,n!==null))switch(n.tag){case 3:mm(i.nodeValue,t,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&mm(i.nodeValue,t,(n.mode&1)!==0)}s&&(e.flags|=4)}else i=(t.nodeType===9?t:t.ownerDocument).createTextNode(i),i[so]=e,e.stateNode=i}return ki(e),null;case 13:if(Rn(Nn),i=e.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Pn&&Or!==null&&e.mode&1&&!(e.flags&128))ZI(),$u(),e.flags|=98560,s=!1;else if(s=gm(e),i!==null&&i.dehydrated!==null){if(n===null){if(!s)throw Error(Je(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Je(317));s[so]=e}else $u(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;ki(e),s=!1}else Us!==null&&($1(Us),Us=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=t,e):(i=i!==null,i!==(n!==null&&n.memoizedState!==null)&&i&&(e.child.flags|=8192,e.mode&1&&(n===null||Nn.current&1?hi===0&&(hi=3):LA())),e.updateQueue!==null&&(e.flags|=4),ki(e),null);case 4:return tf(),X1(n,e),n===null&&dd(e.stateNode.containerInfo),ki(e),null;case 10:return vA(e.type._context),ki(e),null;case 17:return vr(e.type)&&Zg(),ki(e),null;case 19:if(Rn(Nn),s=e.memoizedState,s===null)return ki(e),null;if(i=(e.flags&128)!==0,o=s.rendering,o===null)if(i)th(s,!1);else{if(hi!==0||n!==null&&n.flags&128)for(n=e.child;n!==null;){if(o=r0(n),o!==null){for(e.flags|=128,th(s,!1),i=o.updateQueue,i!==null&&(e.updateQueue=i,e.flags|=4),e.subtreeFlags=0,i=t,t=e.child;t!==null;)s=t,n=i,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=n,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,n=o.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t=t.sibling;return Mn(Nn,Nn.current&1|2),e.child}n=n.sibling}s.tail!==null&&$n()>rf&&(e.flags|=128,i=!0,th(s,!1),e.lanes=4194304)}else{if(!i)if(n=r0(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),th(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Pn)return ki(e),null}else 2*$n()-s.renderingStartTime>rf&&t!==1073741824&&(e.flags|=128,i=!0,th(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=$n(),e.sibling=null,t=Nn.current,Mn(Nn,i?t&1|2:t&1),e):(ki(e),null);case 22:case 23:return DA(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Fr&1073741824&&(ki(e),e.subtreeFlags&6&&(e.flags|=8192)):ki(e),null;case 24:return null;case 25:return null}throw Error(Je(156,e.tag))}function z3(n,e){switch(dA(e),e.tag){case 1:return vr(e.type)&&Zg(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return tf(),Rn(gr),Rn(Yi),AA(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return SA(e),null;case 13:if(Rn(Nn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Je(340));$u()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Rn(Nn),null;case 4:return tf(),null;case 10:return vA(e.type._context),null;case 22:case 23:return DA(),null;case 24:return null;default:return null}}var xm=!1,Vi=!1,H3=typeof WeakSet=="function"?WeakSet:Set,mt=null;function bu(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){Xn(n,e,i)}else t.current=null}function j1(n,e,t){try{t()}catch(i){Xn(n,e,i)}}var QT=!1;function G3(n,e){if(b1=Jg,n=OI(),fA(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,c=0,f=0,d=n,p=null;t:for(;;){for(var m;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===n)break t;if(p===t&&++c===r&&(a=o),p===s&&++f===i&&(l=o),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(I1={focusedElem:n,selectionRange:t},Jg=!1,mt=e;mt!==null;)if(e=mt,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,mt=n;else for(;mt!==null;){e=mt;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var _=v.memoizedProps,x=v.memoizedState,g=e.stateNode,S=g.getSnapshotBeforeUpdate(e.elementType===e.type?_:Ls(e.type,_),x);g.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Je(163))}}catch(E){Xn(e,e.return,E)}if(n=e.sibling,n!==null){n.return=e.return,mt=n;break}mt=e.return}return v=QT,QT=!1,v}function Gh(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&j1(e,t,s)}r=r.next}while(r!==i)}}function vv(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function J1(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function L2(n){var e=n.alternate;e!==null&&(n.alternate=null,L2(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[so],delete e[md],delete e[D1],delete e[E3],delete e[w3])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function F2(n){return n.tag===5||n.tag===3||n.tag===4}function ZT(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||F2(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Y1(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=Qg));else if(i!==4&&(n=n.child,n!==null))for(Y1(n,e,t),n=n.sibling;n!==null;)Y1(n,e,t),n=n.sibling}function K1(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(K1(n,e,t),n=n.sibling;n!==null;)K1(n,e,t),n=n.sibling}var Ri=null,Ns=!1;function pa(n,e,t){for(t=t.child;t!==null;)N2(n,e,t),t=t.sibling}function N2(n,e,t){if(uo&&typeof uo.onCommitFiberUnmount=="function")try{uo.onCommitFiberUnmount(cv,t)}catch{}switch(t.tag){case 5:Vi||bu(t,e);case 6:var i=Ri,r=Ns;Ri=null,pa(n,e,t),Ri=i,Ns=r,Ri!==null&&(Ns?(n=Ri,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Ri.removeChild(t.stateNode));break;case 18:Ri!==null&&(Ns?(n=Ri,t=t.stateNode,n.nodeType===8?bx(n.parentNode,t):n.nodeType===1&&bx(n,t),ud(n)):bx(Ri,t.stateNode));break;case 4:i=Ri,r=Ns,Ri=t.stateNode.containerInfo,Ns=!0,pa(n,e,t),Ri=i,Ns=r;break;case 0:case 11:case 14:case 15:if(!Vi&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&j1(t,e,o),r=r.next}while(r!==i)}pa(n,e,t);break;case 1:if(!Vi&&(bu(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){Xn(t,e,a)}pa(n,e,t);break;case 21:pa(n,e,t);break;case 22:t.mode&1?(Vi=(i=Vi)||t.memoizedState!==null,pa(n,e,t),Vi=i):pa(n,e,t);break;default:pa(n,e,t)}}function qT(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new H3),e.forEach(function(i){var r=Z3.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function bs(n,e){var t=e.deletions;if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];try{var s=n,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ri=a.stateNode,Ns=!1;break e;case 3:Ri=a.stateNode.containerInfo,Ns=!0;break e;case 4:Ri=a.stateNode.containerInfo,Ns=!0;break e}a=a.return}if(Ri===null)throw Error(Je(160));N2(s,o,r),Ri=null,Ns=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(c){Xn(r,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)U2(e,n),e=e.sibling}function U2(n,e){var t=n.alternate,i=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(bs(e,n),no(n),i&4){try{Gh(3,n,n.return),vv(3,n)}catch(_){Xn(n,n.return,_)}try{Gh(5,n,n.return)}catch(_){Xn(n,n.return,_)}}break;case 1:bs(e,n),no(n),i&512&&t!==null&&bu(t,t.return);break;case 5:if(bs(e,n),no(n),i&512&&t!==null&&bu(t,t.return),n.flags&32){var r=n.stateNode;try{od(r,"")}catch(_){Xn(n,n.return,_)}}if(i&4&&(r=n.stateNode,r!=null)){var s=n.memoizedProps,o=t!==null?t.memoizedProps:s,a=n.type,l=n.updateQueue;if(n.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&sI(r,s),x1(a,o);var c=x1(a,s);for(o=0;o<l.length;o+=2){var f=l[o],d=l[o+1];f==="style"?uI(r,d):f==="dangerouslySetInnerHTML"?lI(r,d):f==="children"?od(r,d):qS(r,f,d,c)}switch(a){case"input":p1(r,s);break;case"textarea":oI(r,s);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?Ou(r,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?Ou(r,!!s.multiple,s.defaultValue,!0):Ou(r,!!s.multiple,s.multiple?[]:"",!1))}r[md]=s}catch(_){Xn(n,n.return,_)}}break;case 6:if(bs(e,n),no(n),i&4){if(n.stateNode===null)throw Error(Je(162));r=n.stateNode,s=n.memoizedProps;try{r.nodeValue=s}catch(_){Xn(n,n.return,_)}}break;case 3:if(bs(e,n),no(n),i&4&&t!==null&&t.memoizedState.isDehydrated)try{ud(e.containerInfo)}catch(_){Xn(n,n.return,_)}break;case 4:bs(e,n),no(n);break;case 13:bs(e,n),no(n),r=n.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(PA=$n())),i&4&&qT(n);break;case 22:if(f=t!==null&&t.memoizedState!==null,n.mode&1?(Vi=(c=Vi)||f,bs(e,n),Vi=c):bs(e,n),no(n),i&8192){if(c=n.memoizedState!==null,(n.stateNode.isHidden=c)&&!f&&n.mode&1)for(mt=n,f=n.child;f!==null;){for(d=mt=f;mt!==null;){switch(p=mt,m=p.child,p.tag){case 0:case 11:case 14:case 15:Gh(4,p,p.return);break;case 1:bu(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){i=p,t=p.return;try{e=i,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(_){Xn(i,t,_)}}break;case 5:bu(p,p.return);break;case 22:if(p.memoizedState!==null){eC(d);continue}}m!==null?(m.return=p,mt=m):eC(d)}f=f.sibling}e:for(f=null,d=n;;){if(d.tag===5){if(f===null){f=d;try{r=d.stateNode,c?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=cI("display",o))}catch(_){Xn(n,n.return,_)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(_){Xn(n,n.return,_)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===n)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break e;for(;d.sibling===null;){if(d.return===null||d.return===n)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bs(e,n),no(n),i&4&&qT(n);break;case 21:break;default:bs(e,n),no(n)}}function no(n){var e=n.flags;if(e&2){try{e:{for(var t=n.return;t!==null;){if(F2(t)){var i=t;break e}t=t.return}throw Error(Je(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(od(r,""),i.flags&=-33);var s=ZT(n);K1(n,s,r);break;case 3:case 4:var o=i.stateNode.containerInfo,a=ZT(n);Y1(n,a,o);break;default:throw Error(Je(161))}}catch(l){Xn(n,n.return,l)}n.flags&=-3}e&4096&&(n.flags&=-4097)}function V3(n,e,t){mt=n,O2(n)}function O2(n,e,t){for(var i=(n.mode&1)!==0;mt!==null;){var r=mt,s=r.child;if(r.tag===22&&i){var o=r.memoizedState!==null||xm;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||Vi;a=xm;var c=Vi;if(xm=o,(Vi=l)&&!c)for(mt=r;mt!==null;)o=mt,l=o.child,o.tag===22&&o.memoizedState!==null?tC(r):l!==null?(l.return=o,mt=l):tC(r);for(;s!==null;)mt=s,O2(s),s=s.sibling;mt=r,xm=a,Vi=c}$T(n)}else r.subtreeFlags&8772&&s!==null?(s.return=r,mt=s):$T(n)}}function $T(n){for(;mt!==null;){var e=mt;if(e.flags&8772){var t=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Vi||vv(5,e);break;case 1:var i=e.stateNode;if(e.flags&4&&!Vi)if(t===null)i.componentDidMount();else{var r=e.elementType===e.type?t.memoizedProps:Ls(e.type,t.memoizedProps);i.componentDidUpdate(r,t.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&UT(e,s,i);break;case 3:var o=e.updateQueue;if(o!==null){if(t=null,e.child!==null)switch(e.child.tag){case 5:t=e.child.stateNode;break;case 1:t=e.child.stateNode}UT(e,o,t)}break;case 5:var a=e.stateNode;if(t===null&&e.flags&4){t=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&t.focus();break;case"img":l.src&&(t.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&ud(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Je(163))}Vi||e.flags&512&&J1(e)}catch(p){Xn(e,e.return,p)}}if(e===n){mt=null;break}if(t=e.sibling,t!==null){t.return=e.return,mt=t;break}mt=e.return}}function eC(n){for(;mt!==null;){var e=mt;if(e===n){mt=null;break}var t=e.sibling;if(t!==null){t.return=e.return,mt=t;break}mt=e.return}}function tC(n){for(;mt!==null;){var e=mt;try{switch(e.tag){case 0:case 11:case 15:var t=e.return;try{vv(4,e)}catch(l){Xn(e,t,l)}break;case 1:var i=e.stateNode;if(typeof i.componentDidMount=="function"){var r=e.return;try{i.componentDidMount()}catch(l){Xn(e,r,l)}}var s=e.return;try{J1(e)}catch(l){Xn(e,s,l)}break;case 5:var o=e.return;try{J1(e)}catch(l){Xn(e,o,l)}}}catch(l){Xn(e,e.return,l)}if(e===n){mt=null;break}var a=e.sibling;if(a!==null){a.return=e.return,mt=a;break}mt=e.return}}var W3=Math.ceil,a0=ia.ReactCurrentDispatcher,bA=ia.ReactCurrentOwner,ms=ia.ReactCurrentBatchConfig,sn=0,Mi=null,oi=null,bi=0,Fr=0,Iu=rl(0),hi=0,Sd=null,gc=0,yv=0,IA=0,Vh=null,hr=null,PA=0,rf=1/0,Do=null,l0=!1,Q1=null,Ga=null,_m=!1,Ba=null,c0=0,Wh=0,Z1=null,Bg=-1,Dg=0;function ir(){return sn&6?$n():Bg!==-1?Bg:Bg=$n()}function Va(n){return n.mode&1?sn&2&&bi!==0?bi&-bi:C3.transition!==null?(Dg===0&&(Dg=AI()),Dg):(n=fn,n!==0||(n=window.event,n=n===void 0?16:bI(n.type)),n):1}function zs(n,e,t,i){if(50<Wh)throw Wh=0,Z1=null,Error(Je(185));Xd(n,t,i),(!(sn&2)||n!==Mi)&&(n===Mi&&(!(sn&2)&&(yv|=t),hi===4&&ba(n,bi)),yr(n,i),t===1&&sn===0&&!(e.mode&1)&&(rf=$n()+500,pv&&sl()))}function yr(n,e){var t=n.callbackNode;CN(n,e);var i=jg(n,n===Mi?bi:0);if(i===0)t!==null&&uT(t),n.callbackNode=null,n.callbackPriority=0;else if(e=i&-i,n.callbackPriority!==e){if(t!=null&&uT(t),e===1)n.tag===0?T3(nC.bind(null,n)):YI(nC.bind(null,n)),A3(function(){!(sn&6)&&sl()}),t=null;else{switch(MI(i)){case 1:t=iA;break;case 4:t=_I;break;case 16:t=Xg;break;case 536870912:t=SI;break;default:t=Xg}t=j2(t,k2.bind(null,n))}n.callbackPriority=e,n.callbackNode=t}}function k2(n,e){if(Bg=-1,Dg=0,sn&6)throw Error(Je(327));var t=n.callbackNode;if(Vu()&&n.callbackNode!==t)return null;var i=jg(n,n===Mi?bi:0);if(i===0)return null;if(i&30||i&n.expiredLanes||e)e=u0(n,i);else{e=i;var r=sn;sn|=2;var s=H2();(Mi!==n||bi!==e)&&(Do=null,rf=$n()+500,tc(n,e));do try{J3();break}catch(a){z2(n,a)}while(!0);gA(),a0.current=s,sn=r,oi!==null?e=0:(Mi=null,bi=0,e=hi)}if(e!==0){if(e===2&&(r=E1(n),r!==0&&(i=r,e=q1(n,r))),e===1)throw t=Sd,tc(n,0),ba(n,i),yr(n,$n()),t;if(e===6)ba(n,i);else{if(r=n.current.alternate,!(i&30)&&!X3(r)&&(e=u0(n,i),e===2&&(s=E1(n),s!==0&&(i=s,e=q1(n,s))),e===1))throw t=Sd,tc(n,0),ba(n,i),yr(n,$n()),t;switch(n.finishedWork=r,n.finishedLanes=i,e){case 0:case 1:throw Error(Je(345));case 2:Nl(n,hr,Do);break;case 3:if(ba(n,i),(i&130023424)===i&&(e=PA+500-$n(),10<e)){if(jg(n,0)!==0)break;if(r=n.suspendedLanes,(r&i)!==i){ir(),n.pingedLanes|=n.suspendedLanes&r;break}n.timeoutHandle=B1(Nl.bind(null,n,hr,Do),e);break}Nl(n,hr,Do);break;case 4:if(ba(n,i),(i&4194240)===i)break;for(e=n.eventTimes,r=-1;0<i;){var o=31-ks(i);s=1<<o,o=e[o],o>r&&(r=o),i&=~s}if(i=r,i=$n()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*W3(i/1960))-i,10<i){n.timeoutHandle=B1(Nl.bind(null,n,hr,Do),i);break}Nl(n,hr,Do);break;case 5:Nl(n,hr,Do);break;default:throw Error(Je(329))}}}return yr(n,$n()),n.callbackNode===t?k2.bind(null,n):null}function q1(n,e){var t=Vh;return n.current.memoizedState.isDehydrated&&(tc(n,e).flags|=256),n=u0(n,e),n!==2&&(e=hr,hr=t,e!==null&&$1(e)),n}function $1(n){hr===null?hr=n:hr.push.apply(hr,n)}function X3(n){for(var e=n;;){if(e.flags&16384){var t=e.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var i=0;i<t.length;i++){var r=t[i],s=r.getSnapshot;r=r.value;try{if(!Gs(s(),r))return!1}catch{return!1}}}if(t=e.child,e.subtreeFlags&16384&&t!==null)t.return=e,e=t;else{if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ba(n,e){for(e&=~IA,e&=~yv,n.suspendedLanes|=e,n.pingedLanes&=~e,n=n.expirationTimes;0<e;){var t=31-ks(e),i=1<<t;n[t]=-1,e&=~i}}function nC(n){if(sn&6)throw Error(Je(327));Vu();var e=jg(n,0);if(!(e&1))return yr(n,$n()),null;var t=u0(n,e);if(n.tag!==0&&t===2){var i=E1(n);i!==0&&(e=i,t=q1(n,i))}if(t===1)throw t=Sd,tc(n,0),ba(n,e),yr(n,$n()),t;if(t===6)throw Error(Je(345));return n.finishedWork=n.current.alternate,n.finishedLanes=e,Nl(n,hr,Do),yr(n,$n()),null}function BA(n,e){var t=sn;sn|=1;try{return n(e)}finally{sn=t,sn===0&&(rf=$n()+500,pv&&sl())}}function vc(n){Ba!==null&&Ba.tag===0&&!(sn&6)&&Vu();var e=sn;sn|=1;var t=ms.transition,i=fn;try{if(ms.transition=null,fn=1,n)return n()}finally{fn=i,ms.transition=t,sn=e,!(sn&6)&&sl()}}function DA(){Fr=Iu.current,Rn(Iu)}function tc(n,e){n.finishedWork=null,n.finishedLanes=0;var t=n.timeoutHandle;if(t!==-1&&(n.timeoutHandle=-1,S3(t)),oi!==null)for(t=oi.return;t!==null;){var i=t;switch(dA(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Zg();break;case 3:tf(),Rn(gr),Rn(Yi),AA();break;case 5:SA(i);break;case 4:tf();break;case 13:Rn(Nn);break;case 19:Rn(Nn);break;case 10:vA(i.type._context);break;case 22:case 23:DA()}t=t.return}if(Mi=n,oi=n=Wa(n.current,null),bi=Fr=e,hi=0,Sd=null,IA=yv=gc=0,hr=Vh=null,Wl!==null){for(e=0;e<Wl.length;e++)if(t=Wl[e],i=t.interleaved,i!==null){t.interleaved=null;var r=i.next,s=t.pending;if(s!==null){var o=s.next;s.next=r,i.next=o}t.pending=i}Wl=null}return n}function z2(n,e){do{var t=oi;try{if(gA(),bg.current=o0,s0){for(var i=zn.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}s0=!1}if(mc=0,Si=ui=zn=null,Hh=!1,yd=0,bA.current=null,t===null||t.return===null){hi=1,Sd=e,oi=null;break}e:{var s=n,o=t.return,a=t,l=e;if(e=bi,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,f=a,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=VT(o);if(m!==null){m.flags&=-257,WT(m,o,a,s,e),m.mode&1&&GT(s,c,e),e=m,l=c;var v=e.updateQueue;if(v===null){var _=new Set;_.add(l),e.updateQueue=_}else v.add(l);break e}else{if(!(e&1)){GT(s,c,e),LA();break e}l=Error(Je(426))}}else if(Pn&&a.mode&1){var x=VT(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),WT(x,o,a,s,e),pA(nf(l,a));break e}}s=l=nf(l,a),hi!==4&&(hi=2),Vh===null?Vh=[s]:Vh.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var g=M2(s,l,e);NT(s,g);break e;case 1:a=l;var S=s.type,A=s.stateNode;if(!(s.flags&128)&&(typeof S.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(Ga===null||!Ga.has(A)))){s.flags|=65536,e&=-e,s.lanes|=e;var E=E2(s,a,e);NT(s,E);break e}}s=s.return}while(s!==null)}V2(t)}catch(I){e=I,oi===t&&t!==null&&(oi=t=t.return);continue}break}while(!0)}function H2(){var n=a0.current;return a0.current=o0,n===null?o0:n}function LA(){(hi===0||hi===3||hi===2)&&(hi=4),Mi===null||!(gc&268435455)&&!(yv&268435455)||ba(Mi,bi)}function u0(n,e){var t=sn;sn|=2;var i=H2();(Mi!==n||bi!==e)&&(Do=null,tc(n,e));do try{j3();break}catch(r){z2(n,r)}while(!0);if(gA(),sn=t,a0.current=i,oi!==null)throw Error(Je(261));return Mi=null,bi=0,hi}function j3(){for(;oi!==null;)G2(oi)}function J3(){for(;oi!==null&&!yN();)G2(oi)}function G2(n){var e=X2(n.alternate,n,Fr);n.memoizedProps=n.pendingProps,e===null?V2(n):oi=e,bA.current=null}function V2(n){var e=n;do{var t=e.alternate;if(n=e.return,e.flags&32768){if(t=z3(t,e),t!==null){t.flags&=32767,oi=t;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{hi=6,oi=null;return}}else if(t=k3(t,e,Fr),t!==null){oi=t;return}if(e=e.sibling,e!==null){oi=e;return}oi=e=n}while(e!==null);hi===0&&(hi=5)}function Nl(n,e,t){var i=fn,r=ms.transition;try{ms.transition=null,fn=1,Y3(n,e,t,i)}finally{ms.transition=r,fn=i}return null}function Y3(n,e,t,i){do Vu();while(Ba!==null);if(sn&6)throw Error(Je(327));t=n.finishedWork;var r=n.finishedLanes;if(t===null)return null;if(n.finishedWork=null,n.finishedLanes=0,t===n.current)throw Error(Je(177));n.callbackNode=null,n.callbackPriority=0;var s=t.lanes|t.childLanes;if(RN(n,s),n===Mi&&(oi=Mi=null,bi=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||_m||(_m=!0,j2(Xg,function(){return Vu(),null})),s=(t.flags&15990)!==0,t.subtreeFlags&15990||s){s=ms.transition,ms.transition=null;var o=fn;fn=1;var a=sn;sn|=4,bA.current=null,G3(n,t),U2(t,n),p3(I1),Jg=!!b1,I1=b1=null,n.current=t,V3(t),xN(),sn=a,fn=o,ms.transition=s}else n.current=t;if(_m&&(_m=!1,Ba=n,c0=r),s=n.pendingLanes,s===0&&(Ga=null),AN(t.stateNode),yr(n,$n()),e!==null)for(i=n.onRecoverableError,t=0;t<e.length;t++)r=e[t],i(r.value,{componentStack:r.stack,digest:r.digest});if(l0)throw l0=!1,n=Q1,Q1=null,n;return c0&1&&n.tag!==0&&Vu(),s=n.pendingLanes,s&1?n===Z1?Wh++:(Wh=0,Z1=n):Wh=0,sl(),null}function Vu(){if(Ba!==null){var n=MI(c0),e=ms.transition,t=fn;try{if(ms.transition=null,fn=16>n?16:n,Ba===null)var i=!1;else{if(n=Ba,Ba=null,c0=0,sn&6)throw Error(Je(331));var r=sn;for(sn|=4,mt=n.current;mt!==null;){var s=mt,o=s.child;if(mt.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(mt=c;mt!==null;){var f=mt;switch(f.tag){case 0:case 11:case 15:Gh(8,f,s)}var d=f.child;if(d!==null)d.return=f,mt=d;else for(;mt!==null;){f=mt;var p=f.sibling,m=f.return;if(L2(f),f===c){mt=null;break}if(p!==null){p.return=m,mt=p;break}mt=m}}}var v=s.alternate;if(v!==null){var _=v.child;if(_!==null){v.child=null;do{var x=_.sibling;_.sibling=null,_=x}while(_!==null)}}mt=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,mt=o;else e:for(;mt!==null;){if(s=mt,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Gh(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,mt=g;break e}mt=s.return}}var S=n.current;for(mt=S;mt!==null;){o=mt;var A=o.child;if(o.subtreeFlags&2064&&A!==null)A.return=o,mt=A;else e:for(o=S;mt!==null;){if(a=mt,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:vv(9,a)}}catch(I){Xn(a,a.return,I)}if(a===o){mt=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,mt=E;break e}mt=a.return}}if(sn=r,sl(),uo&&typeof uo.onPostCommitFiberRoot=="function")try{uo.onPostCommitFiberRoot(cv,n)}catch{}i=!0}return i}finally{fn=t,ms.transition=e}}return!1}function iC(n,e,t){e=nf(t,e),e=M2(n,e,1),n=Ha(n,e,1),e=ir(),n!==null&&(Xd(n,1,e),yr(n,e))}function Xn(n,e,t){if(n.tag===3)iC(n,n,t);else for(;e!==null;){if(e.tag===3){iC(e,n,t);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ga===null||!Ga.has(i))){n=nf(t,n),n=E2(e,n,1),e=Ha(e,n,1),n=ir(),e!==null&&(Xd(e,1,n),yr(e,n));break}}e=e.return}}function K3(n,e,t){var i=n.pingCache;i!==null&&i.delete(e),e=ir(),n.pingedLanes|=n.suspendedLanes&t,Mi===n&&(bi&t)===t&&(hi===4||hi===3&&(bi&130023424)===bi&&500>$n()-PA?tc(n,0):IA|=t),yr(n,e)}function W2(n,e){e===0&&(n.mode&1?(e=um,um<<=1,!(um&130023424)&&(um=4194304)):e=1);var t=ir();n=Qo(n,e),n!==null&&(Xd(n,e,t),yr(n,t))}function Q3(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),W2(n,t)}function Z3(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Je(314))}i!==null&&i.delete(e),W2(n,t)}var X2;X2=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||gr.current)pr=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return pr=!1,O3(n,e,t);pr=!!(n.flags&131072)}else pr=!1,Pn&&e.flags&1048576&&KI(e,e0,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Pg(n,e),n=e.pendingProps;var r=qu(e,Yi.current);Gu(e,t),r=EA(null,e,i,n,r,t);var s=wA();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,vr(i)?(s=!0,qg(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,xA(e),r.updater=gv,e.stateNode=r,r._reactInternals=e,k1(e,i,n,t),e=G1(null,e,i,!0,s,t)):(e.tag=0,Pn&&s&&hA(e),er(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(Pg(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=$3(i),n=Ls(i,n),r){case 0:e=H1(null,e,i,n,t);break e;case 1:e=JT(null,e,i,n,t);break e;case 11:e=XT(null,e,i,n,t);break e;case 14:e=jT(null,e,i,Ls(i.type,n),t);break e}throw Error(Je(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Ls(i,r),H1(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Ls(i,r),JT(n,e,i,r,t);case 3:e:{if(R2(e),n===null)throw Error(Je(387));i=e.pendingProps,s=e.memoizedState,r=s.element,t2(n,e),i0(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=nf(Error(Je(423)),e),e=YT(n,e,i,t,r);break e}else if(i!==r){r=nf(Error(Je(424)),e),e=YT(n,e,i,t,r);break e}else for(Or=za(e.stateNode.containerInfo.firstChild),Hr=e,Pn=!0,Us=null,t=$I(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if($u(),i===r){e=Zo(n,e,t);break e}er(n,e,i,t)}e=e.child}return e;case 5:return n2(e),n===null&&N1(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,P1(i,r)?o=null:s!==null&&P1(i,s)&&(e.flags|=32),C2(n,e),er(n,e,o,t),e.child;case 6:return n===null&&N1(e),null;case 13:return b2(n,e,t);case 4:return _A(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=ef(e,null,i,t):er(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Ls(i,r),XT(n,e,i,r,t);case 7:return er(n,e,e.pendingProps,t),e.child;case 8:return er(n,e,e.pendingProps.children,t),e.child;case 12:return er(n,e,e.pendingProps.children,t),e.child;
vendor: 5,674 bytes, line 40
40case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Mn(t0,i._currentValue),i._currentValue=o,s!==null)if(Gs(s.value,o)){if(s.children===r.children&&!gr.current){e=Zo(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=Xo(-1,t&-t),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),U1(s.return,t,e),a.lanes|=t;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Je(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),U1(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}er(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Gu(e,t),r=ys(r),i=i(r),e.flags|=1,er(n,e,i,t),e.child;case 14:return i=e.type,r=Ls(i,e.pendingProps),r=Ls(i.type,r),jT(n,e,i,r,t);case 15:return w2(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Ls(i,r),Pg(n,e),e.tag=1,vr(i)?(n=!0,qg(e)):n=!1,Gu(e,t),A2(e,i,r),k1(e,i,r,t),G1(null,e,i,!0,n,t);case 19:return I2(n,e,t);case 22:return T2(n,e,t)}throw Error(Je(156,e.tag))};function j2(n,e){return xI(n,e)}function q3(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hs(n,e,t,i){return new q3(n,e,t,i)}function FA(n){return n=n.prototype,!(!n||!n.isReactComponent)}function $3(n){if(typeof n=="function")return FA(n)?1:0;if(n!=null){if(n=n.$$typeof,n===eA)return 11;if(n===tA)return 14}return 2}function Wa(n,e){var t=n.alternate;return t===null?(t=hs(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function Lg(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")FA(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case _u:return nc(t.children,r,s,e);case $S:o=8,r|=8;break;case c1:return n=hs(12,t,e,r|2),n.elementType=c1,n.lanes=s,n;case u1:return n=hs(13,t,e,r),n.elementType=u1,n.lanes=s,n;case f1:return n=hs(19,t,e,r),n.elementType=f1,n.lanes=s,n;case nI:return xv(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case eI:o=10;break e;case tI:o=9;break e;case eA:o=11;break e;case tA:o=14;break e;case Ta:o=16,i=null;break e}throw Error(Je(130,n==null?n:typeof n,""))}return e=hs(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function nc(n,e,t,i){return n=hs(7,n,i,e),n.lanes=t,n}function xv(n,e,t,i){return n=hs(22,n,i,e),n.elementType=nI,n.lanes=t,n.stateNode={isHidden:!1},n}function Ux(n,e,t){return n=hs(6,n,null,e),n.lanes=t,n}function Ox(n,e,t){return e=hs(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function eU(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yx(0),this.expirationTimes=yx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yx(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function NA(n,e,t,i,r,s,o,a,l){return n=new eU(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=hs(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},xA(s),n}function tU(n,e,t){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xu,key:i==null?null:""+i,children:n,containerInfo:e,implementation:t}}function J2(n){if(!n)return Ka;n=n._reactInternals;e:{if(Rc(n)!==n||n.tag!==1)throw Error(Je(170));var e=n;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(vr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Je(171))}if(n.tag===1){var t=n.type;if(vr(t))return JI(n,t,e)}return e}function Y2(n,e,t,i,r,s,o,a,l){return n=NA(t,i,!0,n,r,s,o,a,l),n.context=J2(null),t=n.current,i=ir(),r=Va(t),s=Xo(i,r),s.callback=e??null,Ha(t,s,r),n.current.lanes=r,Xd(n,r,i),yr(n,i),n}function _v(n,e,t,i){var r=e.current,s=ir(),o=Va(r);return t=J2(t),e.context===null?e.context=t:e.pendingContext=t,e=Xo(s,o),e.payload={element:n},i=i===void 0?null:i,i!==null&&(e.callback=i),n=Ha(r,e,o),n!==null&&(zs(n,r,o,s),Rg(n,r,o)),o}function f0(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function rC(n,e){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var t=n.retryLane;n.retryLane=t!==0&&t<e?t:e}}
vendor: 8,709 bytes, lines 40-44
40function UA(n,e){rC(n,e),(n=n.alternate)&&rC(n,e)}function nU(){return null}var K2=typeof reportError=="function"?reportError:function(n){console.error(n)};function OA(n){this._internalRoot=n}Sv.prototype.render=OA.prototype.render=function(n){var e=this._internalRoot;if(e===null)throw Error(Je(409));_v(n,e,null,null)};Sv.prototype.unmount=OA.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var e=n.containerInfo;vc(function(){_v(null,n,null,null)}),e[Ko]=null}};function Sv(n){this._internalRoot=n}Sv.prototype.unstable_scheduleHydration=function(n){if(n){var e=TI();n={blockedOn:null,target:n,priority:e};for(var t=0;t<Ra.length&&e!==0&&e<Ra[t].priority;t++);Ra.splice(t,0,n),t===0&&RI(n)}};function kA(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Av(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function sC(){}function iU(n,e,t,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var c=f0(o);s.call(c)}}var o=Y2(e,i,n,0,null,!1,!1,"",sC);return n._reactRootContainer=o,n[Ko]=o.current,dd(n.nodeType===8?n.parentNode:n),vc(),o}for(;r=n.lastChild;)n.removeChild(r);if(typeof i=="function"){var a=i;i=function(){var c=f0(l);a.call(c)}}var l=NA(n,0,!1,null,null,!1,!1,"",sC);return n._reactRootContainer=l,n[Ko]=l.current,dd(n.nodeType===8?n.parentNode:n),vc(function(){_v(e,l,t,i)}),l}function Mv(n,e,t,i,r){var s=t._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var a=r;r=function(){var l=f0(o);a.call(l)}}_v(e,o,n,r)}else o=iU(t,e,n,r,i);return f0(o)}EI=function(n){switch(n.tag){case 3:var e=n.stateNode;if(e.current.memoizedState.isDehydrated){var t=bh(e.pendingLanes);t!==0&&(rA(e,t|1),yr(e,$n()),!(sn&6)&&(rf=$n()+500,sl()))}break;case 13:vc(function(){var i=Qo(n,1);if(i!==null){var r=ir();zs(i,n,1,r)}}),UA(n,1)}};sA=function(n){if(n.tag===13){var e=Qo(n,134217728);if(e!==null){var t=ir();zs(e,n,134217728,t)}UA(n,134217728)}};wI=function(n){if(n.tag===13){var e=Va(n),t=Qo(n,e);if(t!==null){var i=ir();zs(t,n,e,i)}UA(n,e)}};TI=function(){return fn};CI=function(n,e){var t=fn;try{return fn=n,e()}finally{fn=t}};S1=function(n,e,t){switch(e){case"input":if(p1(n,t),e=t.name,t.type==="radio"&&e!=null){for(t=n;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<t.length;e++){var i=t[e];if(i!==n&&i.form===n.form){var r=dv(i);if(!r)throw Error(Je(90));rI(i),p1(i,r)}}}break;case"textarea":oI(n,t);break;case"select":e=t.value,e!=null&&Ou(n,!!t.multiple,e,!1)}};dI=BA;pI=vc;var rU={usingClientEntryPoint:!1,Events:[Jd,Eu,dv,fI,hI,BA]},nh={findFiberByHostInstance:Vl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sU={bundleType:nh.bundleType,version:nh.version,rendererPackageName:nh.rendererPackageName,rendererConfig:nh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ia.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=vI(n),n===null?null:n.stateNode},findFiberByHostInstance:nh.findFiberByHostInstance||nU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sm.isDisabled&&Sm.supportsFiber)try{cv=Sm.inject(sU),uo=Sm}catch{}}Yr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rU;Yr.createPortal=function(n,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kA(e))throw Error(Je(200));return tU(n,e,null,t)};Yr.createRoot=function(n,e){if(!kA(n))throw Error(Je(299));var t=!1,i="",r=K2;return e!=null&&(e.unstable_strictMode===!0&&(t=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=NA(n,1,!1,null,null,t,!1,i,r),n[Ko]=e.current,dd(n.nodeType===8?n.parentNode:n),new OA(e)};Yr.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var e=n._reactInternals;if(e===void 0)throw typeof n.render=="function"?Error(Je(188)):(n=Object.keys(n).join(","),Error(Je(268,n)));return n=vI(e),n=n===null?null:n.stateNode,n};Yr.flushSync=function(n){return vc(n)};Yr.hydrate=function(n,e,t){if(!Av(e))throw Error(Je(200));return Mv(null,n,e,!0,t)};Yr.hydrateRoot=function(n,e,t){if(!kA(n))throw Error(Je(405));var i=t!=null&&t.hydratedSources||null,r=!1,s="",o=K2;if(t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),e=Y2(e,null,n,1,t??null,r,!1,s,o),n[Ko]=e.current,dd(n),i)for(n=0;n<i.length;n++)t=i[n],r=t._getVersion,r=r(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,r]:e.mutableSourceEagerHydrationData.push(t,r);return new Sv(e)};Yr.render=function(n,e,t){if(!Av(e))throw Error(Je(200));return Mv(null,n,e,!1,t)};Yr.unmountComponentAtNode=function(n){if(!Av(n))throw Error(Je(40));return n._reactRootContainer?(vc(function(){Mv(null,null,n,!1,function(){n._reactRootContainer=null,n[Ko]=null})}),!0):!1};Yr.unstable_batchedUpdates=BA;Yr.unstable_renderSubtreeIntoContainer=function(n,e,t,i){if(!Av(t))throw Error(Je(200));if(n==null||n._reactInternals===void 0)throw Error(Je(38));return Mv(n,e,t,!1,i)};Yr.version="18.3.1-next-f1338f8080-20240426";function Q2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Q2)}catch(n){console.error(n)}}Q2(),Qb.exports=Yr;var oU=Qb.exports,Z2,oC=oU;Z2=a1.createRoot=oC.createRoot,a1.hydrateRoot=oC.hydrateRoot;/**
41 * @license
42 * Copyright 2010-2024 Three.js Authors
43 * SPDX-License-Identifier: MIT
44 */const yo="169",Ul={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Ol={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},q2=0,eS=1,$2=2,aU=3,eP=0,Ev=1,Xh=2,Fs=3,Xr=0,ai=1,fi=2,rr=0,ic=1,tS=2,nS=3,iS=4,tP=5,Ia=100,nP=101,iP=102,rP=103,sP=104,oP=200,aP=201,lP=202,cP=203,h0=204,d0=205,uP=206,fP=207,hP=208,dP=209,pP=210,mP=211,gP=212,vP=213,yP=214,p0=0,m0=1,g0=2,yc=3,v0=4,y0=5,x0=6,_0=7,Kd=0,xP=1,_P=2,Hs=0,SP=1,AP=2,MP=3,zA=4,EP=5,wP=6,TP=7,rS="attached",CP="detached",Qa=300,mo=301,Za=302,sf=303,Ad=304,Mf=306,go=1e3,ei=1001,of=1002,Ht=1003,wv=1004,lU=1004,jl=1005,cU=1005,Ft=1006,Wu=1007,uU=1007,kr=1008,sS=1008,di=1009,Tv=1010,Cv=1011,af=1012,Qd=1013,Vs=1014,vn=1015,li=1016,Rv=1017,bv=1018,qa=1020,HA=35902,GA=1021,VA=1022,Dn=1023,WA=1024,XA=1025,rc=1026,$a=1027,Ef=1028,Zd=1029,jA=1030,Iv=1031,fU=1032,Pv=1033,jh=33776,Jh=33777,Yh=33778,Kh=33779,S0=35840,A0=35841,M0=35842,E0=35843,w0=36196,T0=37492,C0=37496,R0=37808,b0=37809,I0=37810,P0=37811,B0=37812,D0=37813,L0=37814,F0=37815,N0=37816,U0=37817,O0=37818,k0=37819,z0=37820,H0=37821,Qh=36492,G0=36494,V0=36495,JA=36283,W0=36284,X0=36285,j0=36286,RP=2200,bP=2201,IP=2202,lf=2300,cf=2301,Fg=2302,Jl=2400,Yl=2401,Md=2402,Bv=2500,YA=2501,PP=0,KA=1,J0=2,ol=3200,BP=3201,hU=3202,dU=3203,al=0,DP=1,us="",jn="srgb",Er="srgb-linear",Dv="display-p3",qd="display-p3-linear",Ed="linear",_n="srgb",wd="rec709",Td="p3",pU=0,kl=7680,mU=7681,gU=7682,vU=7683,yU=34055,xU=34056,_U=5386,SU=512,AU=513,MU=514,EU=515,wU=516,TU=517,CU=518,oS=519,LP=512,FP=513,NP=514,QA=515,UP=516,OP=517,kP=518,zP=519,Cd=35044,RU=35048,bU=35040,IU=35045,PU=35049,BU=35041,DU=35046,LU=35050,FU=35042,NU="100",aS="300 es",lo=2e3,Rd=2001;class Tr{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}}const zi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
445","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let aC=1234567;const sc=Math.PI/180,uf=180/Math.PI;function Gr(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(zi[n&255]+zi[n>>8&255]+zi[n>>16&255]+zi[n>>24&255]+"-"+zi[e&255]+zi[e>>8&255]+"-"+zi[e>>16&15|64]+zi[e>>24&255]+"-"+zi[t&63|128]+zi[t>>8&255]+"-"+zi[t>>16&255]+zi[t>>24&255]+zi[i&255]+zi[i>>8&255]+zi[i>>16&255]+zi[i>>24&255]).toLowerCase()}function Jn(n,e,t){return Math.max(e,Math.min(t,n))}function ZA(n,e){return(n%e+e)%e}function UU(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function OU(n,e,t){return n!==e?(t-n)/(e-n):0}function Zh(n,e,t){return(1-t)*n+t*e}function kU(n,e,t,i){return Zh(n,e,1-Math.exp(-t*i))}function zU(n,e=1){return e-Math.abs(ZA(n,e*2)-e)}function HU(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function GU(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function VU(n,e){return n+Math.floor(Math.random()*(e-n+1))}function WU(n,e){return n+Math.random()*(e-n)}function XU(n){return n*(.5-Math.random())}function jU(n){n!==void 0&&(aC=n);let e=aC+=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 JU(n){return n*sc}function YU(n){return n*uf}function KU(n){return(n&n-1)===0&&n!==0}function QU(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function ZU(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function qU(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),c=s((e+i)/2),f=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),m=s((i-e)/2),v=o((i-e)/2);switch(r){case"XYX":n.set(a*f,l*d,l*p,a*c);break;case"YZY":n.set(l*p,a*f,l*d,a*c);break;case"ZXZ":n.set(l*d,l*p,a*f,a*c);break;case"XZX":n.set(a*f,l*v,l*m,a*c);break;case"YXY":n.set(l*m,a*f,l*v,a*c);break;case"ZYZ":n.set(l*v,l*m,a*f,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function tr(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Ot(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const qA={DEG2RAD:sc,RAD2DEG:uf,generateUUID:Gr,clamp:Jn,euclideanModulo:ZA,mapLinear:UU,inverseLerp:OU,lerp:Zh,damp:kU,pingpong:zU,smoothstep:HU,smootherstep:GU,randInt:VU,randFloat:WU,randFloatSpread:XU,seededRandom:jU,degToRad:JU,radToDeg:YU,isPowerOfTwo:KU,ceilPowerOfTwo:QU,floorPowerOfTwo:ZU,setQuaternionFromProperEuler:qU,normalize:Ot,denormalize:tr};class _e{constructor(e=0,t=0){_e.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: 36,718 bytes, line 44
44sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=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 i=this.dot(e)/t;return Math.acos(Jn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ut{constructor(e,t,i,r,s,o,a,l,c){Ut.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,l,c)}set(e,t,i,r,s,o,a,l,c){const f=this.elements;return f[0]=e,f[1]=r,f[2]=a,f[3]=t,f[4]=s,f[5]=l,f[6]=i,f[7]=o,f[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],f=i[4],d=i[7],p=i[2],m=i[5],v=i[8],_=r[0],x=r[3],g=r[6],S=r[1],A=r[4],E=r[7],I=r[2],b=r[5],P=r[8];return s[0]=o*_+a*S+l*I,s[3]=o*x+a*A+l*b,s[6]=o*g+a*E+l*P,s[1]=c*_+f*S+d*I,s[4]=c*x+f*A+d*b,s[7]=c*g+f*E+d*P,s[2]=p*_+m*S+v*I,s[5]=p*x+m*A+v*b,s[8]=p*g+m*E+v*P,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],f=e[8];return t*o*f-t*a*c-i*s*f+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],f=e[8],d=f*o-a*c,p=a*l-f*s,m=c*s-o*l,v=t*d+i*p+r*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/v;return e[0]=d*_,e[1]=(r*c-f*i)*_,e[2]=(a*i-r*o)*_,e[3]=p*_,e[4]=(f*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=m*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*s)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(kx.makeScale(e,t)),this}rotate(e){return this.premultiply(kx.makeRotation(-e)),this}translate(e,t){return this.premultiply(kx.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),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const kx=new Ut;function HP(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const $U={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Pu(n,e){return new $U[n](e)}function bd(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function GP(){const n=bd("canvas");return n.style.display="block",n}const lC={};function Ng(n){n in lC||(lC[n]=!0,console.warn(n))}function eO(n,e,t){return new Promise(function(i,r){function s(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:i()}}setTimeout(s,t)})}function tO(n){const e=n.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function nO(n){const e=n.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const cC=new Ut().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),uC=new Ut().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),ih={[Er]:{transfer:Ed,primaries:wd,luminanceCoefficients:[.2126,.7152,.0722],toReference:n=>n,fromReference:n=>n},[jn]:{transfer:_n,primaries:wd,luminanceCoefficients:[.2126,.7152,.0722],toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[qd]:{transfer:Ed,primaries:Td,luminanceCoefficients:[.2289,.6917,.0793],toReference:n=>n.applyMatrix3(uC),fromReference:n=>n.applyMatrix3(cC)},[Dv]:{transfer:_n,primaries:Td,luminanceCoefficients:[.2289,.6917,.0793],toReference:n=>n.convertSRGBToLinear().applyMatrix3(uC),fromReference:n=>n.applyMatrix3(cC).convertLinearToSRGB()}},iO=new Set([Er,qd]),cn={enabled:!0,_workingColorSpace:Er,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!iO.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=ih[e].toReference,r=ih[t].fromReference;return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return ih[n].primaries},getTransfer:function(n){return n===us?Ed:ih[n].transfer},getLuminanceCoefficients:function(n,e=this._workingColorSpace){return n.fromArray(ih[e].luminanceCoefficients)}};function Xu(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function zx(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Qc;class VP{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Qc===void 0&&(Qc=bd("canvas")),Qc.width=e.width,Qc.height=e.height;const i=Qc.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Qc}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=bd("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=Xu(s[o]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(Xu(t[i]/255)*255):t[i]=Xu(t[i]);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 rO=0;class Kl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:rO++}),this.uuid=Gr(),this.data=e,this.dataReady=!0,this.version=0}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 i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let o=0,a=r.length;o<a;o++)r[o].isDataTexture?s.push(Hx(r[o].image)):s.push(Hx(r[o]))}else s=Hx(r);i.url=s}return t||(e.images[this.uuid]=i),i}}function Hx(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?VP.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let sO=0;class Qt extends Tr{constructor(e=Qt.DEFAULT_IMAGE,t=Qt.DEFAULT_MAPPING,i=ei,r=ei,s=Ft,o=kr,a=Dn,l=di,c=Qt.DEFAULT_ANISOTROPY,f=us){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:sO++}),this.uuid=Gr(),this.name="",this.source=new Kl(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new _e(0,0),this.repeat=new _e(1,1),this.center=new _e(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ut,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=f,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}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)}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.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.6,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&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Qa)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case go:e.x=e.x-Math.floor(e.x);break;case ei:e.x=e.x<0?0:1;break;case of:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case go:e.y=e.y-Math.floor(e.y);break;case ei:e.y=e.y<0?0:1;break;case of:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Qt.DEFAULT_IMAGE=null;Qt.DEFAULT_MAPPING=Qa;Qt.DEFAULT_ANISOTROPY=1;class rn{constructor(e=0,t=0,i=0,r=1){rn.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,c=l[0],f=l[4],d=l[8],p=l[1],m=l[5],v=l[9],_=l[2],x=l[6],g=l[10];if(Math.abs(f-p)<.01&&Math.abs(d-_)<.01&&Math.abs(v-x)<.01){if(Math.abs(f+p)<.1&&Math.abs(d+_)<.1&&Math.abs(v+x)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const A=(c+1)/2,E=(m+1)/2,I=(g+1)/2,b=(f+p)/4,P=(d+_)/4,D=(v+x)/4;return A>E&&A>I?A<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(A),r=b/i,s=P/i):E>I?E<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(E),i=b/r,s=D/r):I<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(I),i=P/s,r=D/s),this.set(i,r,s,t),this}let S=Math.sqrt((x-v)*(x-v)+(d-_)*(d-_)+(p-f)*(p-f));return Math.abs(S)<.001&&(S=1),this.x=(x-v)/S,this.y=(d-_)/S,this.z=(p-f)/S,this.w=Math.acos((c+m+g-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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class WP extends Tr{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new rn(0,0,e,t),this.scissorTest=!1,this.viewport=new rn(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Ft,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new Qt(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let r=0,s=this.textures.length;r<s;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=i;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let i=0,r=e.textures.length;i<r;i++)this.textures[i]=e.textures[i].clone(),this.textures[i].isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Kl(t),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 xn extends WP{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class Lv extends Qt{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Ht,this.minFilter=Ht,this.wrapR=ei,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class oO extends xn{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Lv(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class $A extends Qt{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Ht,this.minFilter=Ht,this.wrapR=ei,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class aO extends xn{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new $A(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class Ei{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,s,o,a){let l=i[r+0],c=i[r+1],f=i[r+2],d=i[r+3];const p=s[o+0],m=s[o+1],v=s[o+2],_=s[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=f,e[t+3]=d;return}if(a===1){e[t+0]=p,e[t+1]=m,e[t+2]=v,e[t+3]=_;return}if(d!==_||l!==p||c!==m||f!==v){let x=1-a;const g=l*p+c*m+f*v+d*_,S=g>=0?1:-1,A=1-g*g;if(A>Number.EPSILON){const I=Math.sqrt(A),b=Math.atan2(I,g*S);x=Math.sin(x*b)/I,a=Math.sin(a*b)/I}const E=a*S;if(l=l*x+p*E,c=c*x+m*E,f=f*x+v*E,d=d*x+_*E,x===1-a){const I=1/Math.sqrt(l*l+c*c+f*f+d*d);l*=I,c*=I,f*=I,d*=I}}e[t]=l,e[t+1]=c,e[t+2]=f,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],f=i[r+3],d=s[o],p=s[o+1],m=s[o+2],v=s[o+3];return e[t]=a*v+f*d+l*m-c*p,e[t+1]=l*v+f*p+c*d-a*m,e[t+2]=c*v+f*m+a*p-l*d,e[t+3]=f*v-a*d-l*p-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),f=a(r/2),d=a(s/2),p=l(i/2),m=l(r/2),v=l(s/2);switch(o){case"XYZ":this._x=p*f*d+c*m*v,this._y=c*m*d-p*f*v,this._z=c*f*v+p*m*d,this._w=c*f*d-p*m*v;break;case"YXZ":this._x=p*f*d+c*m*v,this._y=c*m*d-p*f*v,this._z=c*f*v-p*m*d,this._w=c*f*d+p*m*v;break;case"ZXY":this._x=p*f*d-c*m*v,this._y=c*m*d+p*f*v,this._z=c*f*v+p*m*d,this._w=c*f*d-p*m*v;break;case"ZYX":this._x=p*f*d-c*m*v,this._y=c*m*d+p*f*v,this._z=c*f*v-p*m*d,this._w=c*f*d+p*m*v;break;case"YZX":this._x=p*f*d+c*m*v,this._y=c*m*d+p*f*v,this._z=c*f*v-p*m*d,this._w=c*f*d-p*m*v;break;case"XZY":this._x=p*f*d-c*m*v,this._y=c*m*d-p*f*v,this._z=c*f*v+p*m*d,this._w=c*f*d+p*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],c=t[2],f=t[6],d=t[10],p=i+a+d;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(f-l)*m,this._y=(s-c)*m,this._z=(o-r)*m}else if(i>a&&i>d){const m=2*Math.sqrt(1+i-a-d);this._w=(f-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+c)/m}else if(a>d){const m=2*Math.sqrt(1+a-i-d);this._w=(s-c)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+f)/m}else{const m=2*Math.sqrt(1+d-i-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+f)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Jn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,f=t._w;return this._x=i*f+o*a+r*c-s*l,this._y=r*f+o*l+s*a-i*c,this._z=s*f+o*c+i*l-r*a,this._w=o*f-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),f=Math.atan2(c,a),d=Math.sin((1-t)*f)/c,p=Math.sin(t*f)/c;return this._w=o*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=s*d+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*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 G{constructor(e=0,t=0,i=0){G.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(fC.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(fC.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),f=2*(a*t-s*r),d=2*(s*i-o*t);return this.x=t+l*c+o*d-a*f,this.y=i+l*f+a*c-s*d,this.z=r+l*d+s*f-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Gx.copy(this).projectOnVector(e),this.sub(Gx)}reflect(e){return this.sub(Gx.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Jn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Gx=new G,fC=new Ei;class Xi{constructor(e=new G(1/0,1/0,1/0),t=new G(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(Is.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Is.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=Is.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),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 i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Is):Is.fromBufferAttribute(s,o),Is.applyMatrix4(e.matrixWorld),this.expandByPoint(Is);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Am.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Am.copy(i.boundingBox)),Am.applyMatrix4(e.matrixWorld),this.union(Am)}
vendor: 4,382 bytes, line 44
44const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],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,Is),Is.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(rh),Mm.subVectors(this.max,rh),Zc.subVectors(e.a,rh),qc.subVectors(e.b,rh),$c.subVectors(e.c,rh),ma.subVectors(qc,Zc),ga.subVectors($c,qc),_l.subVectors(Zc,$c);let t=[0,-ma.z,ma.y,0,-ga.z,ga.y,0,-_l.z,_l.y,ma.z,0,-ma.x,ga.z,0,-ga.x,_l.z,0,-_l.x,-ma.y,ma.x,0,-ga.y,ga.x,0,-_l.y,_l.x,0];return!Vx(t,Zc,qc,$c,Mm)||(t=[1,0,0,0,1,0,0,0,1],!Vx(t,Zc,qc,$c,Mm))?!1:(Em.crossVectors(ma,ga),t=[Em.x,Em.y,Em.z],Vx(t,Zc,qc,$c,Mm))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Is).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Is).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:(Co[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Co[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Co[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Co[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Co[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Co[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Co[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Co[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Co),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 Co=[new G,new G,new G,new G,new G,new G,new G,new G],Is=new G,Am=new Xi,Zc=new G,qc=new G,$c=new G,ma=new G,ga=new G,_l=new G,rh=new G,Mm=new G,Em=new G,Sl=new G;function Vx(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Sl.fromArray(n,s);const a=r.x*Math.abs(Sl.x)+r.y*Math.abs(Sl.y)+r.z*Math.abs(Sl.z),l=e.dot(Sl),c=t.dot(Sl),f=i.dot(Sl);if(Math.max(-Math.max(l,c,f),Math.min(l,c,f))>a)return!1}return!0}const lO=new Xi,sh=new G,Wx=new G;let wi=class{constructor(e=new G,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 i=this.center;t!==void 0?i.copy(t):lO.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(r),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 i=this.center.distanceToSquared(e);return t.copy(e),i>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)}
vendor: 6,766 bytes, line 44
44applyMatrix4(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;sh.subVectors(e,this.center);const t=sh.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(sh,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Wx.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(sh.copy(e.center).add(Wx)),this.expandByPoint(sh.copy(e.center).sub(Wx))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};const Ro=new G,Xx=new G,wm=new G,va=new G,jx=new G,Tm=new G,Jx=new G;class bc{constructor(e=new G,t=new G(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,Ro)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Ro.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ro.copy(this.origin).addScaledVector(this.direction,t),Ro.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Xx.copy(e).add(t).multiplyScalar(.5),wm.copy(t).sub(e).normalize(),va.copy(this.origin).sub(Xx);const s=e.distanceTo(t)*.5,o=-this.direction.dot(wm),a=va.dot(this.direction),l=-va.dot(wm),c=va.lengthSq(),f=Math.abs(1-o*o);let d,p,m,v;if(f>0)if(d=o*l-a,p=o*a-l,v=s*f,d>=0)if(p>=-v)if(p<=v){const _=1/f;d*=_,p*=_,m=d*(d+o*p+2*a)+p*(o*d+p+2*l)+c}else p=s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+c;else p=-s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+c;else p<=-v?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+c):p<=v?(d=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+c):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+c);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Xx).addScaledVector(wm,p),m}intersectSphere(e,t){Ro.subVectors(e.center,this.origin);const i=Ro.dot(this.direction),r=Ro.dot(Ro)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const c=1/this.direction.x,f=1/this.direction.y,d=1/this.direction.z,p=this.origin;return c>=0?(i=(e.min.x-p.x)*c,r=(e.max.x-p.x)*c):(i=(e.max.x-p.x)*c,r=(e.min.x-p.x)*c),f>=0?(s=(e.min.y-p.y)*f,o=(e.max.y-p.y)*f):(s=(e.max.y-p.y)*f,o=(e.min.y-p.y)*f),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),d>=0?(a=(e.min.z-p.z)*d,l=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,l=(e.min.z-p.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,Ro)!==null}intersectTriangle(e,t,i,r,s){jx.subVectors(t,e),Tm.subVectors(i,e),Jx.crossVectors(jx,Tm);let o=this.direction.dot(Jx),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;va.subVectors(this.origin,e);const l=a*this.direction.dot(Tm.crossVectors(va,Tm));if(l<0)return null;const c=a*this.direction.dot(jx.cross(va));if(c<0||l+c>o)return null;const f=-a*va.dot(Jx);return f<0?null:this.at(f/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ct{constructor(e,t,i,r,s,o,a,l,c,f,d,p,m,v,_,x){ct.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,i,r,s,o,a,l,c,f,d,p,m,v,_,x)}set(e,t,i,r,s,o,a,l,c,f,d,p,m,v,_,x){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=f,g[10]=d,g[14]=p,g[3]=m,g[7]=v,g[11]=_,g[15]=x,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new ct().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/eu.setFromMatrixColumn(e,0).length(),s=1/eu.setFromMatrixColumn(e,1).length(),o=1/eu.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),f=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*f,m=o*d,v=a*f,_=a*d;t[0]=l*f,t[4]=-l*d,t[8]=c,t[1]=m+v*c,t[5]=p-_*c,t[9]=-a*l,t[2]=_-p*c,t[6]=v+m*c,t[10]=o*l}else if(e.order==="YXZ"){const p=l*f,m=l*d,v=c*f,_=c*d;t[0]=p+_*a,t[4]=v*a-m,t[8]=o*c,t[1]=o*d,t[5]=o*f,t[9]=-a,t[2]=m*a-v,t[6]=_+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*f,m=l*d,v=c*f,_=c*d;t[0]=p-_*a,t[4]=-o*d,t[8]=v+m*a,t[1]=m+v*a,t[5]=o*f,t[9]=_-p*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*f,m=o*d,v=a*f,_=a*d;t[0]=l*f,t[4]=v*c-m,t[8]=p*c+_,t[1]=l*d,t[5]=_*c+p,t[9]=m*c-v,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*c,v=a*l,_=a*c;
vendor: 13,249 bytes, line 44
44t[0]=l*f,t[4]=_-p*d,t[8]=v*d+m,t[1]=d,t[5]=o*f,t[9]=-a*f,t[2]=-c*f,t[6]=m*d+v,t[10]=p-_*d}else if(e.order==="XZY"){const p=o*l,m=o*c,v=a*l,_=a*c;t[0]=l*f,t[4]=-d,t[8]=c*f,t[1]=p*d+_,t[5]=o*f,t[9]=m*d-v,t[2]=v*d-m,t[6]=a*f,t[10]=_*d+p}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(cO,e,uO)}lookAt(e,t,i){const r=this.elements;return Br.subVectors(e,t),Br.lengthSq()===0&&(Br.z=1),Br.normalize(),ya.crossVectors(i,Br),ya.lengthSq()===0&&(Math.abs(i.z)===1?Br.x+=1e-4:Br.z+=1e-4,Br.normalize(),ya.crossVectors(i,Br)),ya.normalize(),Cm.crossVectors(Br,ya),r[0]=ya.x,r[4]=Cm.x,r[8]=Br.x,r[1]=ya.y,r[5]=Cm.y,r[9]=Br.y,r[2]=ya.z,r[6]=Cm.z,r[10]=Br.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],f=i[1],d=i[5],p=i[9],m=i[13],v=i[2],_=i[6],x=i[10],g=i[14],S=i[3],A=i[7],E=i[11],I=i[15],b=r[0],P=r[4],D=r[8],O=r[12],C=r[1],B=r[5],Y=r[9],$=r[13],se=r[2],ce=r[6],ie=r[10],ye=r[14],W=r[3],ue=r[7],oe=r[11],de=r[15];return s[0]=o*b+a*C+l*se+c*W,s[4]=o*P+a*B+l*ce+c*ue,s[8]=o*D+a*Y+l*ie+c*oe,s[12]=o*O+a*$+l*ye+c*de,s[1]=f*b+d*C+p*se+m*W,s[5]=f*P+d*B+p*ce+m*ue,s[9]=f*D+d*Y+p*ie+m*oe,s[13]=f*O+d*$+p*ye+m*de,s[2]=v*b+_*C+x*se+g*W,s[6]=v*P+_*B+x*ce+g*ue,s[10]=v*D+_*Y+x*ie+g*oe,s[14]=v*O+_*$+x*ye+g*de,s[3]=S*b+A*C+E*se+I*W,s[7]=S*P+A*B+E*ce+I*ue,s[11]=S*D+A*Y+E*ie+I*oe,s[15]=S*O+A*$+E*ye+I*de,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],f=e[2],d=e[6],p=e[10],m=e[14],v=e[3],_=e[7],x=e[11],g=e[15];return v*(+s*l*d-r*c*d-s*a*p+i*c*p+r*a*m-i*l*m)+_*(+t*l*m-t*c*p+s*o*p-r*o*m+r*c*f-s*l*f)+x*(+t*c*d-t*a*m-s*o*d+i*o*m+s*a*f-i*c*f)+g*(-r*a*f-t*l*d+t*a*p+r*o*d-i*o*p+i*l*f)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],f=e[8],d=e[9],p=e[10],m=e[11],v=e[12],_=e[13],x=e[14],g=e[15],S=d*x*c-_*p*c+_*l*m-a*x*m-d*l*g+a*p*g,A=v*p*c-f*x*c-v*l*m+o*x*m+f*l*g-o*p*g,E=f*_*c-v*d*c+v*a*m-o*_*m-f*a*g+o*d*g,I=v*d*l-f*_*l-v*a*p+o*_*p+f*a*x-o*d*x,b=t*S+i*A+r*E+s*I;if(b===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/b;return e[0]=S*P,e[1]=(_*p*s-d*x*s-_*r*m+i*x*m+d*r*g-i*p*g)*P,e[2]=(a*x*s-_*l*s+_*r*c-i*x*c-a*r*g+i*l*g)*P,e[3]=(d*l*s-a*p*s-d*r*c+i*p*c+a*r*m-i*l*m)*P,e[4]=A*P,e[5]=(f*x*s-v*p*s+v*r*m-t*x*m-f*r*g+t*p*g)*P,e[6]=(v*l*s-o*x*s-v*r*c+t*x*c+o*r*g-t*l*g)*P,e[7]=(o*p*s-f*l*s+f*r*c-t*p*c-o*r*m+t*l*m)*P,e[8]=E*P,e[9]=(v*d*s-f*_*s-v*i*m+t*_*m+f*i*g-t*d*g)*P,e[10]=(o*_*s-v*a*s+v*i*c-t*_*c-o*i*g+t*a*g)*P,e[11]=(f*a*s-o*d*s-f*i*c+t*d*c+o*i*m-t*a*m)*P,e[12]=I*P,e[13]=(f*_*r-v*d*r+v*i*p-t*_*p-f*i*x+t*d*x)*P,e[14]=(v*a*r-o*_*r-v*i*l+t*_*l+o*i*x-t*a*x)*P,e[15]=(o*d*r-f*a*r+f*i*l-t*d*l-o*i*p+t*a*p)*P,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return 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,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,f=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,f*a+i,f*l-r*o,0,c*l-r*a,f*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,f=o+o,d=a+a,p=s*c,m=s*f,v=s*d,_=o*f,x=o*d,g=a*d,S=l*c,A=l*f,E=l*d,I=i.x,b=i.y,P=i.z;return r[0]=(1-(_+g))*I,r[1]=(m+E)*I,r[2]=(v-A)*I,r[3]=0,r[4]=(m-E)*b,r[5]=(1-(p+g))*b,r[6]=(x+S)*b,r[7]=0,r[8]=(v+A)*P,r[9]=(x-S)*P,r[10]=(1-(p+_))*P,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=eu.set(r[0],r[1],r[2]).length();const o=eu.set(r[4],r[5],r[6]).length(),a=eu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Ps.copy(this);const c=1/s,f=1/o,d=1/a;return Ps.elements[0]*=c,Ps.elements[1]*=c,Ps.elements[2]*=c,Ps.elements[4]*=f,Ps.elements[5]*=f,Ps.elements[6]*=f,Ps.elements[8]*=d,Ps.elements[9]*=d,Ps.elements[10]*=d,t.setFromRotationMatrix(Ps),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=lo){const l=this.elements,c=2*s/(t-e),f=2*s/(i-r),d=(t+e)/(t-e),p=(i+r)/(i-r);let m,v;if(a===lo)m=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===Rd)m=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=f,l[9]=p,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=lo){const l=this.elements,c=1/(t-e),f=1/(i-r),d=1/(o-s),p=(t+e)*c,m=(i+r)*f;let v,_;if(a===lo)v=(o+s)*d,_=-2*d;else if(a===Rd)v=s*d,_=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-p,l[1]=0,l[5]=2*f,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=_,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const eu=new G,Ps=new ct,cO=new G(0,0,0),uO=new G(1,1,1),ya=new G,Cm=new G,Br=new G,hC=new ct,dC=new Ei;class jr{constructor(e=0,t=0,i=0,r=jr.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],f=r[9],d=r[2],p=r[6],m=r[10];switch(t){case"XYZ":this._y=Math.asin(Jn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-f,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Jn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(Jn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Jn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Jn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-f,c),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Jn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-f,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return hC.makeRotationFromQuaternion(e),this.setFromRotationMatrix(hC,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return dC.setFromEuler(this),this.setFromQuaternion(dC,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}}jr.DEFAULT_ORDER="XYZ";class oc{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}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let fO=0;const pC=new G,tu=new Ei,bo=new ct,Rm=new G,oh=new G,hO=new G,dO=new Ei,mC=new G(1,0,0),gC=new G(0,1,0),vC=new G(0,0,1),yC={type:"added"},pO={type:"removed"},nu={type:"childadded",child:null},Yx={type:"childremoved",child:null};class jt extends Tr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:fO++}),this.uuid=Gr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=jt.DEFAULT_UP.clone();const e=new G,t=new jr,i=new Ei,r=new G(1,1,1);function s(){i.setFromEuler(t,!1)}function o(){t.setFromQuaternion(i,void 0,!1)}t._onChange(s),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new ct},normalMatrix:{value:new Ut}}),this.matrix=new ct,this.matrixWorld=new ct,this.matrixAutoUpdate=jt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=jt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new oc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],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 tu.setFromAxisAngle(e,t),this.quaternion.multiply(tu),this}rotateOnWorldAxis(e,t){return tu.setFromAxisAngle(e,t),this.quaternion.premultiply(tu),this}rotateX(e){return this.rotateOnAxis(mC,e)}rotateY(e){return this.rotateOnAxis(gC,e)}rotateZ(e){return this.rotateOnAxis(vC,e)}translateOnAxis(e,t){return pC.copy(e).applyQuaternion(this.quaternion),this.position.add(pC.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(mC,e)}translateY(e){return this.translateOnAxis(gC,e)}translateZ(e){return this.translateOnAxis(vC,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(bo.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?Rm.copy(e):Rm.set(e,t,i);const r=this.parent;this.updateWorldMatrix(!0,!1),oh.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?bo.lookAt(oh,Rm,this.up):bo.lookAt(Rm,oh,this.up),this.quaternion.setFromRotationMatrix(bo),r&&(bo.extractRotation(r.matrixWorld),tu.setFromRotationMatrix(bo),this.quaternion.premultiply(tu.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(yC),nu.child=e,this.dispatchEvent(nu),nu.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(pO),Yx.child=e,this.dispatchEvent(Yx),Yx.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}
vendor: 4,189 bytes, line 44
44attach(e){return this.updateWorldMatrix(!0,!1),bo.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),bo.multiply(e.parent.matrixWorld)),e.applyMatrix4(bo),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(yC),nu.child=e,this.dispatchEvent(nu),nu.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 i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(oh,e,hO),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(oh,dO,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].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):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boun
vendor: 15,652 bytes, line 44
44dingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,f=l.length;c<f;c++){const d=l[c];s(e.shapes,d)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(e.materials,this.material[l]));r.material=a}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];r.animations.push(s(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),f=o(e.images),d=o(e.shapes),p=o(e.skeletons),m=o(e.animations),v=o(e.nodes);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),f.length>0&&(i.images=f),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),m.length>0&&(i.animations=m),v.length>0&&(i.nodes=v)}return i.object=r,i;function o(a){const l=[];for(const c in a){const f=a[c];delete f.metadata,l.push(f)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.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 i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}jt.DEFAULT_UP=new G(0,1,0);jt.DEFAULT_MATRIX_AUTO_UPDATE=!0;jt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Bs=new G,Io=new G,Kx=new G,Po=new G,iu=new G,ru=new G,xC=new G,Qx=new G,Zx=new G,qx=new G,$x=new rn,e_=new rn,t_=new rn;class dr{constructor(e=new G,t=new G,i=new G){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),Bs.subVectors(e,t),r.cross(Bs);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Bs.subVectors(r,t),Io.subVectors(i,t),Kx.subVectors(e,t);const o=Bs.dot(Bs),a=Bs.dot(Io),l=Bs.dot(Kx),c=Io.dot(Io),f=Io.dot(Kx),d=o*c-a*a;if(d===0)return s.set(0,0,0),null;const p=1/d,m=(c*l-a*f)*p,v=(o*f-a*l)*p;return s.set(1-m-v,v,m)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Po)===null?!1:Po.x>=0&&Po.y>=0&&Po.x+Po.y<=1}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,Po)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Po.x),l.addScaledVector(o,Po.y),l.addScaledVector(a,Po.z),l)}static getInterpolatedAttribute(e,t,i,r,s,o){return $x.setScalar(0),e_.setScalar(0),t_.setScalar(0),$x.fromBufferAttribute(e,t),e_.fromBufferAttribute(e,i),t_.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector($x,s.x),o.addScaledVector(e_,s.y),o.addScaledVector(t_,s.z),o}static isFrontFacing(e,t,i,r){return Bs.subVectors(i,t),Io.subVectors(e,t),Bs.cross(Io).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Bs.subVectors(this.c,this.b),Io.subVectors(this.a,this.b),Bs.cross(Io).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return dr.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return dr.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return dr.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return dr.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return dr.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;iu.subVectors(r,i),ru.subVectors(s,i),Qx.subVectors(e,i);const l=iu.dot(Qx),c=ru.dot(Qx);if(l<=0&&c<=0)return t.copy(i);Zx.subVectors(e,r);const f=iu.dot(Zx),d=ru.dot(Zx);if(f>=0&&d<=f)return t.copy(r);const p=l*d-f*c;if(p<=0&&l>=0&&f<=0)return o=l/(l-f),t.copy(i).addScaledVector(iu,o);qx.subVectors(e,s);const m=iu.dot(qx),v=ru.dot(qx);if(v>=0&&m<=v)return t.copy(s);const _=m*c-l*v;if(_<=0&&c>=0&&v<=0)return a=c/(c-v),t.copy(i).addScaledVector(ru,a);const x=f*v-m*d;if(x<=0&&d-f>=0&&m-v>=0)return xC.subVectors(s,r),a=(d-f)/(d-f+(m-v)),t.copy(r).addScaledVector(xC,a);const g=1/(x+_+p);return o=_*g,a=p*g,t.copy(i).addScaledVector(iu,o).addScaledVector(ru,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const XP={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},xa={h:0,s:0,l:0},bm={h:0,s:0,l:0};function n_(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class qe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=jn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,cn.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=cn.workingColorSpace){return this.r=e,this.g=t,this.b=i,cn.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=cn.workingColorSpace){if(e=ZA(e,1),t=Jn(t,0,1),i=Jn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=n_(o,s,e+1/3),this.g=n_(o,s,e),this.b=n_(o,s,e-1/3)}return cn.toWorkingColorSpace(this,r),this}setStyle(e,t=jn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=jn){const i=XP[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Xu(e.r),this.g=Xu(e.g),this.b=Xu(e.b),this}copyLinearToSRGB(e){return this.r=zx(e.r),this.g=zx(e.g),this.b=zx(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jn){return cn.fromWorkingColorSpace(Hi.copy(this),e),Math.round(Jn(Hi.r*255,0,255))*65536+Math.round(Jn(Hi.g*255,0,255))*256+Math.round(Jn(Hi.b*255,0,255))}getHexString(e=jn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=cn.workingColorSpace){cn.fromWorkingColorSpace(Hi.copy(this),t);const i=Hi.r,r=Hi.g,s=Hi.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const f=(a+o)/2;if(a===o)l=0,c=0;else{const d=o-a;switch(c=f<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r<s?6:0);break;case r:l=(s-i)/d+2;break;case s:l=(i-r)/d+4;break}l/=6}return e.h=l,e.s=c,e.l=f,e}getRGB(e,t=cn.workingColorSpace){return cn.fromWorkingColorSpace(Hi.copy(this),t),e.r=Hi.r,e.g=Hi.g,e.b=Hi.b,e}getStyle(e=jn){cn.fromWorkingColorSpace(Hi.copy(this),e);const t=Hi.r,i=Hi.g,r=Hi.b;return e!==jn?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(xa),this.setHSL(xa.h+e,xa.s+t,xa.l+i)}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,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(xa),e.getHSL(bm);const i=Zh(xa.h,bm.h,t),r=Zh(xa.s,bm.s,t),s=Zh(xa.l,bm.l,t);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*t+s[3]*i+s[6]*r,this.g=s[1]*t+s[4]*i+s[7]*r,this.b=s[2]*t+s[5]*i+s[8]*r,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 Hi=new qe;qe.NAMES=XP;let mO=0;class Hn extends Tr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:mO++}),this.uuid=Gr(),this.name="",this.type="Material",this.blending=ic,this.side=Xr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=h0,this.blendDst=d0,this.blendEquation=Ia,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new qe(0,0,0),this.blendAlpha=0,this.depthFunc=yc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=oS,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=kl,this.stencilZFail=kl,this.stencilZPass=kl,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};
vendor: 8,832 bytes, line 44
44i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==ic&&(i.blending=this.blending),this.side!==Xr&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==h0&&(i.blendSrc=this.blendSrc),this.blendDst!==d0&&(i.blendDst=this.blendDst),this.blendEquation!==Ia&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==yc&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==oS&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==kl&&(i.stencilFail=this.stencilFail),this.stencilZFail!==kl&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==kl&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.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 i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipSh
vendor: 3,195 bytes, line 44
44adows,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++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class mr extends Hn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new qe(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 jr,this.combine=Kd,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 zo=gO();function gO(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,r[l]=24,r[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,r[l]=-c-1,r[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,r[l]=13,r[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,f=0;for(;!(c&8388608);)c<<=1,f-=8388608;c&=-8388609,f+=947912704,s[l]=c|f}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function fr(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=Jn(n,-65504,65504),zo.floatView[0]=n;const e=zo.uint32View[0],t=e>>23&511;return zo.baseTable[t]+((e&8388607)>>zo.shiftTable[t])}function Ph(n){const e=n>>10;return zo.uint32View[0]=zo.mantissaTable[zo.offsetTable[e]+(n&1023)]+zo.exponentTable[e],zo.floatView[0]}const Ql={toHalfFloat:fr,fromHalfFloat:Ph},ri=new G,Im=new _e;
vendor: 17,293 bytes, line 44
44class Yt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Cd,this.updateRanges=[],this.gpuType=vn,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,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)Im.fromBufferAttribute(this,t),Im.applyMatrix3(e),this.setXY(t,Im.x,Im.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)ri.fromBufferAttribute(this,t),ri.applyMatrix3(e),this.setXYZ(t,ri.x,ri.y,ri.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)ri.fromBufferAttribute(this,t),ri.applyMatrix4(e),this.setXYZ(t,ri.x,ri.y,ri.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)ri.fromBufferAttribute(this,t),ri.applyNormalMatrix(e),this.setXYZ(t,ri.x,ri.y,ri.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)ri.fromBufferAttribute(this,t),ri.transformDirection(e),this.setXYZ(t,ri.x,ri.y,ri.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=tr(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Ot(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=tr(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ot(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=tr(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ot(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=tr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ot(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=tr(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ot(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array),r=Ot(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,s){return e*=this.itemSize,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array),r=Ot(r,this.array),s=Ot(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,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!==Cd&&(e.usage=this.usage),e}}class vO extends Yt{constructor(e,t,i){super(new Int8Array(e),t,i)}}class yO extends Yt{constructor(e,t,i){super(new Uint8Array(e),t,i)}}class xO extends Yt{constructor(e,t,i){super(new Uint8ClampedArray(e),t,i)}}class _O extends Yt{constructor(e,t,i){super(new Int16Array(e),t,i)}}class eM extends Yt{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class SO extends Yt{constructor(e,t,i){super(new Int32Array(e),t,i)}}class tM extends Yt{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class AO extends Yt{constructor(e,t,i){super(new Uint16Array(e),t,i),this.isFloat16BufferAttribute=!0}getX(e){let t=Ph(this.array[e*this.itemSize]);return this.normalized&&(t=tr(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ot(t,this.array)),this.array[e*this.itemSize]=fr(t),this}getY(e){let t=Ph(this.array[e*this.itemSize+1]);return this.normalized&&(t=tr(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ot(t,this.array)),this.array[e*this.itemSize+1]=fr(t),this}getZ(e){let t=Ph(this.array[e*this.itemSize+2]);return this.normalized&&(t=tr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ot(t,this.array)),this.array[e*this.itemSize+2]=fr(t),this}getW(e){let t=Ph(this.array[e*this.itemSize+3]);return this.normalized&&(t=tr(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ot(t,this.array)),this.array[e*this.itemSize+3]=fr(t),this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array)),this.array[e+0]=fr(t),this.array[e+1]=fr(i),this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array),r=Ot(r,this.array)),this.array[e+0]=fr(t),this.array[e+1]=fr(i),this.array[e+2]=fr(r),this}setXYZW(e,t,i,r,s){return e*=this.itemSize,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array),r=Ot(r,this.array),s=Ot(s,this.array)),this.array[e+0]=fr(t),this.array[e+1]=fr(i),this.array[e+2]=fr(r),this.array[e+3]=fr(s),this}}class yt extends Yt{constructor(e,t,i){super(new Float32Array(e),t,i)}}let MO=0;const rs=new ct,i_=new jt,su=new G,Dr=new Xi,ah=new Xi,_i=new G;class bt extends Tr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:MO++}),this.uuid=Gr(),this.name="",this.type="BufferGeometry",this.index=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(HP(e)?tM:eM)(e,1):this.index=e,this}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,i=0){this.groups.push({start:e,count:t,materialIndex:i})}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 i=this.attributes.normal;if(i!==void 0){const s=new Ut().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return rs.makeRotationFromQuaternion(e),this.applyMatrix4(rs),this}rotateX(e){return rs.makeRotationX(e),this.applyMatrix4(rs),this}rotateY(e){return rs.makeRotationY(e),this.applyMatrix4(rs),this}rotateZ(e){return rs.makeRotationZ(e),this.applyMatrix4(rs),this}translate(e,t,i){return rs.makeTranslation(e,t,i),this.applyMatrix4(rs),this}scale(e,t,i){return rs.makeScale(e,t,i),this.applyMatrix4(rs),this}lookAt(e){return i_.lookAt(e),i_.updateMatrix(),this.applyMatrix4(i_.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(su).negate(),this.translate(su.x,su.y,su.z),this}setFromPoints(e){const t=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];t.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new yt(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Xi);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 G(-1/0,-1/0,-1/0),new G(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){const s=t[i];Dr.setFromBufferAttribute(s),this.morphTargetsRelative?(_i.addVectors(this.boundingBox.min,Dr.min),this.boundingBox.expandByPoint(_i),_i.addVectors(this.boundingBox.max,Dr.max),this.boundingBox.expandByPoint(_i)):(this.boundingBox.expandByPoint(Dr.min),this.boundingBox.expandByPoint(Dr.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 wi);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 G,1/0);return}if(e){const i=this.boundingSphere.center;if(Dr.setFromBufferAttribute(e),t)for(let s=0,o=t.length;s<o;s++){const a=t[s];ah.setFromBufferAttribute(a),this.morphTargetsRelative?(_i.addVectors(Dr.min,ah.min),Dr.expandByPoint(_i),_i.addVectors(Dr.max,ah.max),Dr.expandByPoint(_i)):(Dr.expandByPoint(ah.min),Dr.expandByPoint(ah.max))}Dr.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;s++)_i.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(_i));if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s],l=this.morphTargetsRelative;for(let c=0,f=a.count;c<f;c++)_i.fromBufferAttribute(a,c),l&&(su.fromBufferAttribute(e,c),_i.add(su)),r=Math.max(r,i.distanceToSquared(_i))}this.boundingSphere.radius=Math.sqrt(r),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 i=t.position,r=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Yt(new Float32Array(4*i.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let D=0;D<i.count;D++)a[D]=new G,l[D]=new G;const c=new G,f=new G,d=new G,p=new _e,m=new _e,v=new _e,_=new G,x=new G;function g(D,O,C){c.fromBufferAttribute(i,D),f.fromBufferAttribute(i,O),d.fromBufferAttribute(i,C),p.fromBufferAttribute(s,D),m.fromBufferAttribute(s,O),v.fromBufferAttribute(s,C),f.sub(c),d.sub(c),m.sub(p),v.sub(p);const B=1/(m.x*v.y-v.x*m.y);isFinite(B)&&(_.copy(f).multiplyScalar(v.y).addScaledVector(d,-m.y).multiplyScalar(B),x.copy(d).multiplyScalar(m.x).addScaledVector(f,-v.x).multiplyScalar(B),a[D].add(_),a[O].add(_),a[C].add(_),l[D].add(x),l[O].add(x),l[C].add(x))}let S=this.groups;S.length===0&&(S=[{start:0,count:e.count}]);for(let D=0,O=S.length;D<O;++D){const C=S[D],B=C.start,Y=C.count;for(let $=B,se=B+Y;$<se;$+=3)g(e.getX($+0),e.getX($+1),e.getX($+2))}const A=new G,E=new G,I=new G,b=new G;function P(D){I.fromBufferAttribute(r,D),b.copy(I);const O=a[D];A.copy(O),A.sub(I.multiplyScalar(I.dot(O))).normalize(),E.crossVectors(b,O);const B=E.dot(l[D])<0?-1:1;o.setXYZW(D,A.x,A.y,A.z,B)}for(let D=0,O=S.length;D<O;++D){const C=S[D],B=C.start,Y=C.count;for(let $=B,se=B+Y;$<se;$+=3)P(e.getX($+0)),P(e.getX($+1)),P(e.getX($+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Yt(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let p=0,m=i.count;p<m;p++)i.setXYZ(p,0,0,0);const r=new G,s=new G,o=new G,a=new G,l=new G,c=new G,f=new G,d=new G;if(e)for(let p=0,m=e.count;p<m;p+=3){const v=e.getX(p+0),_=e.getX(p+1),x=e.getX(p+2);r.fromBufferAttribute(t,v),s.fromBufferAttribute(t,_),o.fromBufferAttribute(t,x),f.subVectors(o,s),d.subVectors(r,s),f.cross(d),a.fromBufferAttribute(i,v),l.fromBufferAttribute(i,_),c.fromBufferAttribute(i,x),a.add(f),l.add(f),c.add(f),i.setXYZ(v,a.x,a.y,a.z),i.setXYZ(_,l.x,l.y,l.z),i.setXYZ(x,c.x,c.y,c.z)}else for(let p=0,m=t.count;p<m;p+=3)r.fromBufferAttribute(t,p+0),s.fromBufferAttribute(t,p+1),o.fromBufferAttribute(t,p+2),f.subVectors(o,s),d.subVectors(r,s),f.cross(d),i.setXYZ(p+0,f.x,f.y,f.z),i.setXYZ(p+1,f.x,f.y,f.z),i.setXYZ(p+2,f.x,f.y,f.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)_i.fromBufferAttribute(e,t),_i.normalize(),e.setXYZ(t,_i.x,_i.y,_i.z)}toNonIndexed(){function e(a,l){const c=a.array,f=a.itemSize,d=a.normalized,p=new c.constructor(l.length*f);let m=0,v=0;for(let _=0,x=l.length;_<x;_++){a.isInterleavedBufferAttribute?m=l[_]*a.data.stride+a.offset:m=l[_]*f;for(let g=0;g<f;g++)p[v++]=c[m++]}return new Yt(p,f,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new bt,i=this.index.array,r=this.attributes;for(const a in r){const l=r[a],c=e(l,i);t.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let f=0,d=c.length;f<d;f++){const p=c[f],m=e(p,i);l.push(m)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(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 l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],f=[];for(let d=0,p=c.length;d<p;d++){const m=c[d];f.push(m.toJSON(e.data))}f.length>0&&(r[l]=f,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const c in r){const f=r[c];this.setAttribute(c,f.clone(t))}const s=e.morphAttributes;for(const c in s){const f=[],d=s[c];for(let p=0,m=d.length;p<m;p++)f.push(d[p].clone(t));this.morphAttributes[c]=f}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,f=o.length;c<f;c++){const d=o[c];this.addGroup(d.start,d.count,d.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const _C=new ct,Al=new bc,Pm=new wi,SC=new G,Bm=new G,Dm=new G,Lm=new G,r_=new G,Fm=new G,AC=new G,Nm=new G;class yn extends jt{constructor(e=new bt,t=new mr){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,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,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(e,t){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,o=i.morphTargetsRelative;t.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){Fm.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const f=a[l],d=s[l];f!==0&&(r_.fromBufferAttribute(d,e),o?Fm.addScaledVector(r_,f):Fm.addScaledVector(r_.sub(t),f))}t.add(Fm)}return t}raycast(e,t){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Pm.copy(i.boundingSphere),Pm.applyMatrix4(s),Al.copy(e.ray).recast(e.near),!(Pm.containsPoint(Al.origin)===!1&&(Al.intersectSphere(Pm,SC)===null||Al.origin.distanceToSquared(SC)>(e.far-e.near)**2))&&(_C.copy(s).invert(),Al.copy(e.ray).applyMatrix4(_C),!(i.boundingBox!==null&&Al.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Al)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,f
vendor: 7,683 bytes, lines 44-48
44=s.attributes.uv1,d=s.attributes.normal,p=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,_=p.length;v<_;v++){const x=p[v],g=o[x.materialIndex],S=Math.max(x.start,m.start),A=Math.min(a.count,Math.min(x.start+x.count,m.start+m.count));for(let E=S,I=A;E<I;E+=3){const b=a.getX(E),P=a.getX(E+1),D=a.getX(E+2);r=Um(this,g,e,i,c,f,d,b,P,D),r&&(r.faceIndex=Math.floor(E/3),r.face.materialIndex=x.materialIndex,t.push(r))}}else{const v=Math.max(0,m.start),_=Math.min(a.count,m.start+m.count);for(let x=v,g=_;x<g;x+=3){const S=a.getX(x),A=a.getX(x+1),E=a.getX(x+2);r=Um(this,o,e,i,c,f,d,S,A,E),r&&(r.faceIndex=Math.floor(x/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,_=p.length;v<_;v++){const x=p[v],g=o[x.materialIndex],S=Math.max(x.start,m.start),A=Math.min(l.count,Math.min(x.start+x.count,m.start+m.count));for(let E=S,I=A;E<I;E+=3){const b=E,P=E+1,D=E+2;r=Um(this,g,e,i,c,f,d,b,P,D),r&&(r.faceIndex=Math.floor(E/3),r.face.materialIndex=x.materialIndex,t.push(r))}}else{const v=Math.max(0,m.start),_=Math.min(l.count,m.start+m.count);for(let x=v,g=_;x<g;x+=3){const S=x,A=x+1,E=x+2;r=Um(this,o,e,i,c,f,d,S,A,E),r&&(r.faceIndex=Math.floor(x/3),t.push(r))}}}}function EO(n,e,t,i,r,s,o,a){let l;if(e.side===ai?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===Xr,a),l===null)return null;Nm.copy(a),Nm.applyMatrix4(n.matrixWorld);const c=t.ray.origin.distanceTo(Nm);return c<t.near||c>t.far?null:{distance:c,point:Nm.clone(),object:n}}function Um(n,e,t,i,r,s,o,a,l,c){n.getVertexPosition(a,Bm),n.getVertexPosition(l,Dm),n.getVertexPosition(c,Lm);const f=EO(n,e,t,i,Bm,Dm,Lm,AC);if(f){const d=new G;dr.getBarycoord(AC,Bm,Dm,Lm,d),r&&(f.uv=dr.getInterpolatedAttribute(r,a,l,c,d,new _e)),s&&(f.uv1=dr.getInterpolatedAttribute(s,a,l,c,d,new _e)),o&&(f.normal=dr.getInterpolatedAttribute(o,a,l,c,d,new G),f.normal.dot(i.direction)>0&&f.normal.multiplyScalar(-1));const p={a,b:l,c,normal:new G,materialIndex:0};dr.getNormal(Bm,Dm,Lm,p.normal),f.face=p,f.barycoord=d}return f}class Ic extends bt{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],f=[],d=[];let p=0,m=0;v("z","y","x",-1,-1,i,t,e,o,s,0),v("z","y","x",1,-1,i,t,-e,o,s,1),v("x","z","y",1,1,e,i,t,r,o,2),v("x","z","y",1,-1,e,i,-t,r,o,3),v("x","y","z",1,-1,e,t,i,r,s,4),v("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new yt(c,3)),this.setAttribute("normal",new yt(f,3)),this.setAttribute("uv",new yt(d,2));function v(_,x,g,S,A,E,I,b,P,D,O){const C=E/P,B=I/D,Y=E/2,$=I/2,se=b/2,ce=P+1,ie=D+1;let ye=0,W=0;const ue=new G;for(let oe=0;oe<ie;oe++){const de=oe*B-$;for(let we=0;we<ce;we++){const Ue=we*C-Y;ue[_]=Ue*S,ue[x]=de*A,ue[g]=se,c.push(ue.x,ue.y,ue.z),ue[_]=0,ue[x]=0,ue[g]=b>0?1:-1,f.push(ue.x,ue.y,ue.z),d.push(we/P),d.push(1-oe/D),ye+=1}}for(let oe=0;oe<D;oe++)for(let de=0;de<P;de++){const we=p+de+ce*oe,Ue=p+de+ce*(oe+1),pe=p+(de+1)+ce*(oe+1),be=p+(de+1)+ce*oe;l.push(we,Ue,be),l.push(Ue,pe,be),W+=6}a.addGroup(m,W,O),m+=W,p+=ye}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ic(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function ff(n){const e={};for(const t in n){e[t]={};for(const i in n[t]){const r=n[t][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=r.clone():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function $i(n){const e={};for(let t=0;t<n.length;t++){const i=ff(n[t]);for(const r in i)e[r]=i[r]}return e}function wO(n){const e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function jP(n){const e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:cn.workingColorSpace}const JP={clone:ff,merge:$i};var TO=`void main() {
45	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
46}`,CO=`void main() {
47	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
48}`;class nn extends Hn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=TO,this.fragmentShader=CO,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=ff(e.uniforms),this.uniformsGroups=wO(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class wf extends jt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ct,this.projectionMatrix=new ct,this.projectionMatrixInverse=new ct,this.coordinateSystem=lo}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 _a=new G,MC=new _e,EC=new _e;class Tn extends wf{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=uf*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(sc*.5*this.fov);return .5*this.getFilmHeight()/e}
vendor: 8,888 bytes, lines 48-83
48getEffectiveFOV(){return uf*2*Math.atan(Math.tan(sc*.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,i){_a.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(_a.x,_a.y).multiplyScalar(-e/_a.z),_a.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(_a.x,_a.y).multiplyScalar(-e/_a.z)}getViewSize(e,t){return this.getViewBounds(e,MC,EC),t.subVectors(EC,MC)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(sc*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far,this.coordinateSystem),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 ou=-90,au=1;class YP extends jt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new Tn(ou,au,e,t);r.layers=this.layers,this.add(r);const s=new Tn(ou,au,e,t);s.layers=this.layers,this.add(s);const o=new Tn(ou,au,e,t);o.layers=this.layers,this.add(o);const a=new Tn(ou,au,e,t);a.layers=this.layers,this.add(a);const l=new Tn(ou,au,e,t);l.layers=this.layers,this.add(l);const c=new Tn(ou,au,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===lo)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Rd)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,f]=this.children,d=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const _=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,c),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(t,f),e.setRenderTarget(d,p,m),e.xr.enabled=v,i.texture.needsPMREMUpdate=!0}}class $d extends Qt{constructor(e,t,i,r,s,o,a,l,c,f){e=e!==void 0?e:[],t=t!==void 0?t:mo,super(e,t,i,r,s,o,a,l,c,f),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class nM extends xn{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new $d(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Ft}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`
49
50				varying vec3 vWorldDirection;
51
52				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
53
54					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
55
56				}
57
58				void main() {
59
60					vWorldDirection = transformDirection( position, modelMatrix );
61
62					#include <begin_vertex>
63					#include <project_vertex>
64
65				}
66			`,fragmentShader:`
67
68				uniform sampler2D tEquirect;
69
70				varying vec3 vWorldDirection;
71
72				#include <common>
73
74				void main() {
75
76					vec3 direction = normalize( vWorldDirection );
77
78					vec2 sampleUV = equirectUv( direction );
79
80					gl_FragColor = texture2D( tEquirect, sampleUV );
81
82				}
83			`},r=new Ic(5,5,5),s=new nn({name:"CubemapFromEquirect",uniforms:ff(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:ai,blending:rr});s.uniforms.tEquirect.value=t;const o=new yn(r,s),a=t.minFilter;return t.minFilter===kr&&(t.minFilter=Ft),new YP(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const s_=new G,RO=new G,bO=new Ut;class Uo{constructor(e=new G(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=s_.subVectors(i,t).cross(RO.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(s_),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||bO.getNormalMatrix(e),r=this.coplanarPoint(s_).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Ml=new wi,Om=new G;class ep{constructor(e=new Uo,t=new Uo,i=new Uo,r=new Uo,s=new Uo,o=new Uo){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=lo){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],f=r[5],d=r[6],p=r[7],m=r[8],v=r[9],_=r[10],x=r[11],g=r[12],S=r[13],A=r[14],E=r[15];if(i[0].setComponents(l-s,p-c,x-m,E-g).normalize(),i[1].setComponents(l+s,p+c,x+m,E+g).normalize(),i[2].setComponents(l+o,p+f,x+v,E+S).normalize(),i[3].setComponents(l-o,p-f,x-v,E-S).normalize(),i[4].setComponents(l-a,p-d,x-_,E-A).normalize(),t===lo)i[5].setComponents(l+a,p+d,x+_,E+A).normalize();else if(t===Rd)i[5].setComponents(a,d,_,A).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(),Ml.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ml.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ml)}intersectsSprite(e){return Ml.center.set(0,0,0),Ml.radius=.7071067811865476,Ml.applyM
vendor: 5,757 bytes, lines 83-142
83atrix4(e.matrixWorld),this.intersectsSphere(Ml)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let i=0;i<6;i++){const r=t[i];if(Om.x=r.normal.x>0?e.max.x:e.min.x,Om.y=r.normal.y>0?e.max.y:e.min.y,Om.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Om)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function KP(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function IO(n){const e=new WeakMap;function t(a,l){const c=a.array,f=a.usage,d=c.byteLength,p=n.createBuffer();n.bindBuffer(l,p),n.bufferData(l,c,f),a.onUploadCallback();let m;if(c instanceof Float32Array)m=n.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=n.HALF_FLOAT:m=n.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=n.SHORT;else if(c instanceof Uint32Array)m=n.UNSIGNED_INT;else if(c instanceof Int32Array)m=n.INT;else if(c instanceof Int8Array)m=n.BYTE;else if(c instanceof Uint8Array)m=n.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:p,type:m,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:d}}function i(a,l,c){const f=l.array,d=l.updateRanges;if(n.bindBuffer(c,a),d.length===0)n.bufferSubData(c,0,f);else{d.sort((m,v)=>m.start-v.start);let p=0;for(let m=1;m<d.length;m++){const v=d[p],_=d[m];_.start<=v.start+v.count+1?v.count=Math.max(v.count,_.start+_.count-v.start):(++p,d[p]=_)}d.length=p+1;for(let m=0,v=d.length;m<v;m++){const _=d[m];n.bufferSubData(c,_.start*f.BYTES_PER_ELEMENT,f,_.start,_.count)}l.clearUpdateRanges()}l.onUploadCallback()}function r(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(n.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const f=e.get(a);(!f||f.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}const c=e.get(a);if(c===void 0)e.set(a,t(a,l));else if(c.version<a.version){if(c.size!==a.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.");i(c.buffer,a,l),c.version=a.version}}return{get:r,remove:s,update:o}}class xo extends bt{constructor(e=1,t=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:r};const s=e/2,o=t/2,a=Math.floor(i),l=Math.floor(r),c=a+1,f=l+1,d=e/a,p=t/l,m=[],v=[],_=[],x=[];for(let g=0;g<f;g++){const S=g*p-o;for(let A=0;A<c;A++){const E=A*d-s;v.push(E,-S,0),_.push(0,0,1),x.push(A/a),x.push(1-g/l)}}for(let g=0;g<l;g++)for(let S=0;S<a;S++){const A=S+c*g,E=S+c*(g+1),I=S+1+c*(g+1),b=S+1+c*g;m.push(A,E,b),m.push(E,I,b)}this.setIndex(m),this.setAttribute("position",new yt(v,3)),this.setAttribute("normal",new yt(_,3)),this.setAttribute("uv",new yt(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new xo(e.width,e.height,e.widthSegments,e.heightSegments)}}var PO=`#ifdef USE_ALPHAHASH
84	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
85#endif`,BO=`#ifdef USE_ALPHAHASH
86	const float ALPHA_HASH_SCALE = 0.05;
87	float hash2D( vec2 value ) {
88		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
89	}
90	float hash3D( vec3 value ) {
91		return hash2D( vec2( hash2D( value.xy ), value.z ) );
92	}
93	float getAlphaHashThreshold( vec3 position ) {
94		float maxDeriv = max(
95			length( dFdx( position.xyz ) ),
96			length( dFdy( position.xyz ) )
97		);
98		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
99		vec2 pixScales = vec2(
100			exp2( floor( log2( pixScale ) ) ),
101			exp2( ceil( log2( pixScale ) ) )
102		);
103		vec2 alpha = vec2(
104			hash3D( floor( pixScales.x * position.xyz ) ),
105			hash3D( floor( pixScales.y * position.xyz ) )
106		);
107		float lerpFactor = fract( log2( pixScale ) );
108		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
109		float a = min( lerpFactor, 1.0 - lerpFactor );
110		vec3 cases = vec3(
111			x * x / ( 2.0 * a * ( 1.0 - a ) ),
112			( x - 0.5 * a ) / ( 1.0 - a ),
113			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
114		);
115		float threshold = ( x < ( 1.0 - a ) )
116			? ( ( x < a ) ? cases.x : cases.y )
117			: cases.z;
118		return clamp( threshold , 1.0e-6, 1.0 );
119	}
120#endif`,DO=`#ifdef USE_ALPHAMAP
121	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
122#endif`,LO=`#ifdef USE_ALPHAMAP
123	uniform sampler2D alphaMap;
124#endif`,FO=`#ifdef USE_ALPHATEST
125	#ifdef ALPHA_TO_COVERAGE
126	diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
127	if ( diffuseColor.a == 0.0 ) discard;
128	#else
129	if ( diffuseColor.a < alphaTest ) discard;
130	#endif
131#endif`,NO=`#ifdef USE_ALPHATEST
132	uniform float alphaTest;
133#endif`,UO=`#ifdef USE_AOMAP
134	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
135	reflectedLight.indirectDiffuse *= ambientOcclusion;
136	#if defined( USE_CLEARCOAT ) 
137		clearcoatSpecularIndirect *= ambientOcclusion;
138	#endif
139	#if defined( USE_SHEEN ) 
140		sheenSpecularIndirect *= ambientOcclusion;
141	#endif
142	#if defined( USE_ENVMAP ) && defined( STANDARD )
143		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
144		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
145	#endif
146#endif`,OO=`#ifdef USE_AOMAP
147	uniform sampler2D aoMap;
148	uniform float aoMapIntensity;
149#endif`,kO=`#ifdef USE_BATCHING
150	#if ! defined( GL_ANGLE_multi_draw )
151	#define gl_DrawID _gl_DrawID
152	uniform int _gl_DrawID;
153	#endif
154	uniform highp sampler2D batchingTexture;
155	uniform highp usampler2D batchingIdTexture;
156	mat4 getBatchingMatrix( const in float i ) {
157		int size = textureSize( batchingTexture, 0 ).x;
158		int j = int( i ) * 4;
159		int x = j % size;
160		int y = j / size;
161		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
162		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
163		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
164		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
165		return mat4( v1, v2, v3, v4 );
166	}
167	float getIndirectIndex( const in int i ) {
168		int size = textureSize( batchingIdTexture, 0 ).x;
169		int x = i % size;
170		int y = i / size;
171		return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
172	}
173#endif
174#ifdef USE_BATCHING_COLOR
175	uniform sampler2D batchingColorTexture;
176	vec3 getBatchingColor( const in float i ) {
177		int size = textureSize( batchingColorTexture, 0 ).x;
178		int j = int( i );
179		int x = j % size;
180		int y = j / size;
181		return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
182	}
183#endif`,zO=`#ifdef USE_BATCHING
184	mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
185#endif`,HO=`vec3 transformed = vec3( position );
186#ifdef USE_ALPHAHASH
187	vPosition = vec3( position );
188#endif`,GO=`vec3 objectNormal = vec3( normal );
189#ifdef USE_TANGENT
190	vec3 objectTangent = vec3( tangent.xyz );
191#endif`,VO=`float G_BlinnPhong_Implicit( ) {
192	return 0.25;
193}
194float D_BlinnPhong( const in float shininess, const in float dotNH ) {
195	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
196}
197vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
198	vec3 halfDir = normalize( lightDir + viewDir );
199	float dotNH = saturate( dot( normal, halfDir ) );
200	float dotVH = saturate( dot( viewDir, halfDir ) );
201	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
202	float G = G_BlinnPhong_Implicit( );
203	float D = D_BlinnPhong( shininess, dotNH );
204	return F * ( G * D );
205} // validated`,WO=`#ifdef USE_IRIDESCENCE
206	const mat3 XYZ_TO_REC709 = mat3(
207		 3.2404542, -0.9692660,  0.0556434,
208		-1.5371385,  1.8760108, -0.2040259,
209		-0.4985314,  0.0415560,  1.0572252
210	);
211	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
212		vec3 sqrtF0 = sqrt( fresnel0 );
213		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
214	}
215	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
216		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
217	}
218	float IorToFresnel0( float transmittedIor, float incidentIor ) {
219		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
220	}
221	vec3 evalSensitivity( float OPD, vec3 shift ) {
222		float phase = 2.0 * PI * OPD * 1.0e-9;
223		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
224		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
225		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
226		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
227		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 ) );
228		xyz /= 1.0685e-7;
229		vec3 rgb = XYZ_TO_REC709 * xyz;
230		return rgb;
231	}
232	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
233		vec3 I;
234		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
235		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
236		float cosTheta2Sq = 1.0 - sinTheta2Sq;
237		if ( cosTheta2Sq < 0.0 ) {
238			return vec3( 1.0 );
239		}
240		float cosTheta2 = sqrt( cosTheta2Sq );
241		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
242		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
243		float T121 = 1.0 - R12;
244		float phi12 = 0.0;
245		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
246		float phi21 = PI - phi12;
247		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
248		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
249		vec3 phi23 = vec3( 0.0 );
250		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
251		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
252		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
253		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
254		vec3 phi = vec3( phi21 ) + phi23;
255		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
256		vec3 r123 = sqrt( R123 );
257		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
258		vec3 C0 = R12 + Rs;
259		I = C0;
260		vec3 Cm = Rs - T121;
261		for ( int m = 1; m <= 2; ++ m ) {
262			Cm *= r123;
263			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
264			I += Cm * Sm;
265		}
266		return max( I, vec3( 0.0 ) );
267	}
268#endif`,XO=`#ifdef USE_BUMPMAP
269	uniform sampler2D bumpMap;
270	uniform float bumpScale;
271	vec2 dHdxy_fwd() {
272		vec2 dSTdx = dFdx( vBumpMapUv );
273		vec2 dSTdy = dFdy( vBumpMapUv );
274		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
275		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
276		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
277		return vec2( dBx, dBy );
278	}
279	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
280		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
281		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
282		vec3 vN = surf_norm;
283		vec3 R1 = cross( vSigmaY, vN );
284		vec3 R2 = cross( vN, vSigmaX );
285		float fDet = dot( vSigmaX, R1 ) * faceDirection;
286		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
287		return normalize( abs( fDet ) * surf_norm - vGrad );
288	}
289#endif`,jO=`#if NUM_CLIPPING_PLANES > 0
290	vec4 plane;
291	#ifdef ALPHA_TO_COVERAGE
292		float distanceToPlane, distanceGradient;
293		float clipOpacity = 1.0;
294		#pragma unroll_loop_start
295		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
296			plane = clippingPlanes[ i ];
297			distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
298			distanceGradient = fwidth( distanceToPlane ) / 2.0;
299			clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
300			if ( clipOpacity == 0.0 ) discard;
301		}
302		#pragma unroll_loop_end
303		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
304			float unionClipOpacity = 1.0;
305			#pragma unroll_loop_start
306			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
307				plane = clippingPlanes[ i ];
308				distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
309				distanceGradient = fwidth( distanceToPlane ) / 2.0;
310				unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
311			}
312			#pragma unroll_loop_end
313			clipOpacity *= 1.0 - unionClipOpacity;
314		#endif
315		diffuseColor.a *= clipOpacity;
316		if ( diffuseColor.a == 0.0 ) discard;
317	#else
318		#pragma unroll_loop_start
319		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
320			plane = clippingPlanes[ i ];
321			if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
322		}
323		#pragma unroll_loop_end
324		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
325			bool clipped = true;
326			#pragma unroll_loop_start
327			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
328				plane = clippingPlanes[ i ];
329				clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
330			}
331			#pragma unroll_loop_end
332			if ( clipped ) discard;
333		#endif
334	#endif
335#endif`,JO=`#if NUM_CLIPPING_PLANES > 0
336	varying vec3 vClipPosition;
337	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
338#endif`,YO=`#if NUM_CLIPPING_PLANES > 0
339	varying vec3 vClipPosition;
340#endif`,KO=`#if NUM_CLIPPING_PLANES > 0
341	vClipPosition = - mvPosition.xyz;
342#endif`,QO=`#if defined( USE_COLOR_ALPHA )
343	diffuseColor *= vColor;
344#elif defined( USE_COLOR )
345	diffuseColor.rgb *= vColor;
346#endif`,ZO=`#if defined( USE_COLOR_ALPHA )
347	varying vec4 vColor;
348#elif defined( USE_COLOR )
349	varying vec3 vColor;
350#endif`,qO=`#if defined( USE_COLOR_ALPHA )
351	varying vec4 vColor;
352#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
353	varying vec3 vColor;
354#endif`,$O=`#if defined( USE_COLOR_ALPHA )
355	vColor = vec4( 1.0 );
356#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
357	vColor = vec3( 1.0 );
358#endif
359#ifdef USE_COLOR
360	vColor *= color;
361#endif
362#ifdef USE_INSTANCING_COLOR
363	vColor.xyz *= instanceColor.xyz;
364#endif
365#ifdef USE_BATCHING_COLOR
366	vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
367	vColor.xyz *= batchingColor.xyz;
368#endif`,ek=`#define PI 3.141592653589793
369#define PI2 6.283185307179586
370#define PI_HALF 1.5707963267948966
371#define RECIPROCAL_PI 0.3183098861837907
372#define RECIPROCAL_PI2 0.15915494309189535
373#define EPSILON 1e-6
374#ifndef saturate
375#define saturate( a ) clamp( a, 0.0, 1.0 )
376#endif
377#define whiteComplement( a ) ( 1.0 - saturate( a ) )
378float pow2( const in float x ) { return x*x; }
379vec3 pow2( const in vec3 x ) { return x*x; }
380float pow3( const in float x ) { return x*x*x; }
381float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
382float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
383float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
384highp float rand( const in vec2 uv ) {
385	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
386	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
387	return fract( sin( sn ) * c );
388}
389#ifdef HIGH_PRECISION
390	float precisionSafeLength( vec3 v ) { return length( v ); }
391#else
392	float precisionSafeLength( vec3 v ) {
393		float maxComponent = max3( abs( v ) );
394		return length( v / maxComponent ) * maxComponent;
395	}
396#endif
397struct IncidentLight {
398	vec3 color;
399	vec3 direction;
400	bool visible;
401};
402struct ReflectedLight {
403	vec3 directDiffuse;
404	vec3 directSpecular;
405	vec3 indirectDiffuse;
406	vec3 indirectSpecular;
407};
408#ifdef USE_ALPHAHASH
409	varying vec3 vPosition;
410#endif
411vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
412	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
413}
414vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
415	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
416}
417mat3 transposeMat3( const in mat3 m ) {
418	mat3 tmp;
419	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
420	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
421	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
422	return tmp;
423}
424bool isPerspectiveMatrix( mat4 m ) {
425	return m[ 2 ][ 3 ] == - 1.0;
426}
427vec2 equirectUv( in vec3 dir ) {
428	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
429	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
430	return vec2( u, v );
431}
432vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
433	return RECIPROCAL_PI * diffuseColor;
434}
435vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
436	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
437	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
438}
439float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
440	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
441	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
442} // validated`,tk=`#ifdef ENVMAP_TYPE_CUBE_UV
443	#define cubeUV_minMipLevel 4.0
444	#define cubeUV_minTileSize 16.0
445	float getFace( vec3 direction ) {
446		vec3 absDirection = abs( direction );
447		float face = - 1.0;
448		if ( absDirection.x > absDirection.z ) {
449			if ( absDirection.x > absDirection.y )
450				face = direction.x > 0.0 ? 0.0 : 3.0;
451			else
452				face = direction.y > 0.0 ? 1.0 : 4.0;
453		} else {
454			if ( absDirection.z > absDirection.y )
455				face = direction.z > 0.0 ? 2.0 : 5.0;
456			else
457				face = direction.y > 0.0 ? 1.0 : 4.0;
458		}
459		return face;
460	}
461	vec2 getUV( vec3 direction, float face ) {
462		vec2 uv;
463		if ( face == 0.0 ) {
464			uv = vec2( direction.z, direction.y ) / abs( direction.x );
465		} else if ( face == 1.0 ) {
466			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
467		} else if ( face == 2.0 ) {
468			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
469		} else if ( face == 3.0 ) {
470			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
471		} else if ( face == 4.0 ) {
472			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
473		} else {
474			uv = vec2( direction.x, direction.y ) / abs( direction.z );
475		}
476		return 0.5 * ( uv + 1.0 );
477	}
478	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
479		float face = getFace( direction );
480		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
481		mipInt = max( mipInt, cubeUV_minMipLevel );
482		float faceSize = exp2( mipInt );
483		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
484		if ( face > 2.0 ) {
485			uv.y += faceSize;
486			face -= 3.0;
487		}
488		uv.x += face * faceSize;
489		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
490		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
491		uv.x *= CUBEUV_TEXEL_WIDTH;
492		uv.y *= CUBEUV_TEXEL_HEIGHT;
493		#ifdef texture2DGradEXT
494			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
495		#else
496			return texture2D( envMap, uv ).rgb;
497		#endif
498	}
499	#define cubeUV_r0 1.0
500	#define cubeUV_m0 - 2.0
501	#define cubeUV_r1 0.8
502	#define cubeUV_m1 - 1.0
503	#define cubeUV_r4 0.4
504	#define cubeUV_m4 2.0
505	#define cubeUV_r5 0.305
506	#define cubeUV_m5 3.0
507	#define cubeUV_r6 0.21
508	#define cubeUV_m6 4.0
509	float roughnessToMip( float roughness ) {
510		float mip = 0.0;
511		if ( roughness >= cubeUV_r1 ) {
512			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
513		} else if ( roughness >= cubeUV_r4 ) {
514			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
515		} else if ( roughness >= cubeUV_r5 ) {
516			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
517		} else if ( roughness >= cubeUV_r6 ) {
518			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
519		} else {
520			mip = - 2.0 * log2( 1.16 * roughness );		}
521		return mip;
522	}
523	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
524		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
525		float mipF = fract( mip );
526		float mipInt = floor( mip );
527		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
528		if ( mipF == 0.0 ) {
529			return vec4( color0, 1.0 );
530		} else {
531			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
532			return vec4( mix( color0, color1, mipF ), 1.0 );
533		}
534	}
535#endif`,nk=`vec3 transformedNormal = objectNormal;
536#ifdef USE_TANGENT
537	vec3 transformedTangent = objectTangent;
538#endif
539#ifdef USE_BATCHING
540	mat3 bm = mat3( batchingMatrix );
541	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
542	transformedNormal = bm * transformedNormal;
543	#ifdef USE_TANGENT
544		transformedTangent = bm * transformedTangent;
545	#endif
546#endif
547#ifdef USE_INSTANCING
548	mat3 im = mat3( instanceMatrix );
549	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
550	transformedNormal = im * transformedNormal;
551	#ifdef USE_TANGENT
552		transformedTangent = im * transformedTangent;
553	#endif
554#endif
555transformedNormal = normalMatrix * transformedNormal;
556#ifdef FLIP_SIDED
557	transformedNormal = - transformedNormal;
558#endif
559#ifdef USE_TANGENT
560	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
561	#ifdef FLIP_SIDED
562		transformedTangent = - transformedTangent;
563	#endif
564#endif`,ik=`#ifdef USE_DISPLACEMENTMAP
565	uniform sampler2D displacementMap;
566	uniform float displacementScale;
567	uniform float displacementBias;
568#endif`,rk=`#ifdef USE_DISPLACEMENTMAP
569	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
569placementBias );
570#endif`,sk=`#ifdef USE_EMISSIVEMAP
571	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
572	totalEmissiveRadiance *= emissiveColor.rgb;
573#endif`,ok=`#ifdef USE_EMISSIVEMAP
574	uniform sampler2D emissiveMap;
575#endif`,ak="gl_FragColor = linearToOutputTexel( gl_FragColor );",lk=`
576const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(
577	vec3( 0.8224621, 0.177538, 0.0 ),
578	vec3( 0.0331941, 0.9668058, 0.0 ),
579	vec3( 0.0170827, 0.0723974, 0.9105199 )
580);
581const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(
582	vec3( 1.2249401, - 0.2249404, 0.0 ),
583	vec3( - 0.0420569, 1.0420571, 0.0 ),
584	vec3( - 0.0196376, - 0.0786361, 1.0982735 )
585);
586vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {
587	return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );
588}
589vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {
590	return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );
591}
592vec4 LinearTransferOETF( in vec4 value ) {
593	return value;
594}
595vec4 sRGBTransferOETF( in vec4 value ) {
596	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 );
597}`,ck=`#ifdef USE_ENVMAP
598	#ifdef ENV_WORLDPOS
599		vec3 cameraToFrag;
600		if ( isOrthographic ) {
601			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
602		} else {
603			cameraToFrag = normalize( vWorldPosition - cameraPosition );
604		}
605		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
606		#ifdef ENVMAP_MODE_REFLECTION
607			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
608		#else
609			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
610		#endif
611	#else
612		vec3 reflectVec = vReflect;
613	#endif
614	#ifdef ENVMAP_TYPE_CUBE
615		vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
616	#else
617		vec4 envColor = vec4( 0.0 );
618	#endif
619	#ifdef ENVMAP_BLENDING_MULTIPLY
620		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
621	#elif defined( ENVMAP_BLENDING_MIX )
622		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
623	#elif defined( ENVMAP_BLENDING_ADD )
624		outgoingLight += envColor.xyz * specularStrength * reflectivity;
625	#endif
626#endif`,uk=`#ifdef USE_ENVMAP
627	uniform float envMapIntensity;
628	uniform float flipEnvMap;
629	uniform mat3 envMapRotation;
630	#ifdef ENVMAP_TYPE_CUBE
631		uniform samplerCube envMap;
632	#else
633		uniform sampler2D envMap;
634	#endif
635	
636#endif`,fk=`#ifdef USE_ENVMAP
637	uniform float reflectivity;
638	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
639		#define ENV_WORLDPOS
640	#endif
641	#ifdef ENV_WORLDPOS
642		varying vec3 vWorldPosition;
643		uniform float refractionRatio;
644	#else
645		varying vec3 vReflect;
646	#endif
647#endif`,hk=`#ifdef USE_ENVMAP
648	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
649		#define ENV_WORLDPOS
650	#endif
651	#ifdef ENV_WORLDPOS
652		
653		varying vec3 vWorldPosition;
654	#else
655		varying vec3 vReflect;
656		uniform float refractionRatio;
657	#endif
658#endif`,dk=`#ifdef USE_ENVMAP
659	#ifdef ENV_WORLDPOS
660		vWorldPosition = worldPosition.xyz;
661	#else
662		vec3 cameraToVertex;
663		if ( isOrthographic ) {
664			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
665		} else {
666			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
667		}
668		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
669		#ifdef ENVMAP_MODE_REFLECTION
670			vReflect = reflect( cameraToVertex, worldNormal );
671		#else
672			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
673		#endif
674	#endif
675#endif`,pk=`#ifdef USE_FOG
676	vFogDepth = - mvPosition.z;
677#endif`,mk=`#ifdef USE_FOG
678	varying float vFogDepth;
679#endif`,gk=`#ifdef USE_FOG
680	#ifdef FOG_EXP2
681		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
682	#else
683		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
684	#endif
685	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
686#endif`,vk=`#ifdef USE_FOG
687	uniform vec3 fogColor;
688	varying float vFogDepth;
689	#ifdef FOG_EXP2
690		uniform float fogDensity;
691	#else
692		uniform float fogNear;
693		uniform float fogFar;
694	#endif
695#endif`,yk=`#ifdef USE_GRADIENTMAP
696	uniform sampler2D gradientMap;
697#endif
698vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
699	float dotNL = dot( normal, lightDirection );
700	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
701	#ifdef USE_GRADIENTMAP
702		return vec3( texture2D( gradientMap, coord ).r );
703	#else
704		vec2 fw = fwidth( coord ) * 0.5;
705		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
706	#endif
707}`,xk=`#ifdef USE_LIGHTMAP
708	uniform sampler2D lightMap;
709	uniform float lightMapIntensity;
710#endif`,_k=`LambertMaterial material;
711material.diffuseColor = diffuseColor.rgb;
712material.specularStrength = specularStrength;`,Sk=`varying vec3 vViewPosition;
713struct LambertMaterial {
714	vec3 diffuseColor;
715	float specularStrength;
716};
717void 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 ) {
718	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
719	vec3 irradiance = dotNL * directLight.color;
720	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
721}
722void 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 ) {
723	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
724}
725#define RE_Direct				RE_Direct_Lambert
726#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,Ak=`uniform bool receiveShadow;
727uniform vec3 ambientLightColor;
728#if defined( USE_LIGHT_PROBES )
729	uniform vec3 lightProbe[ 9 ];
730#endif
731vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
732	float x = normal.x, y = normal.y, z = normal.z;
733	vec3 result = shCoefficients[ 0 ] * 0.886227;
734	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
735	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
736	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
737	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
738	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
739	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
740	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
741	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
742	return result;
743}
744vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
745	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
746	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
747	return irradiance;
748}
749vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
750	vec3 irradiance = ambientLightColor;
751	return irradiance;
752}
753float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
754	float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
755	if ( cutoffDistance > 0.0 ) {
756		distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
757	}
758	return distanceFalloff;
759}
760float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
761	return smoothstep( coneCosine, penumbraCosine, angleCosine );
762}
763#if NUM_DIR_LIGHTS > 0
764	struct DirectionalLight {
765		vec3 direction;
766		vec3 color;
767	};
768	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
769	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
770		light.color = directionalLight.color;
771		light.direction = directionalLight.direction;
772		light.visible = true;
773	}
774#endif
775#if NUM_POINT_LIGHTS > 0
776	struct PointLight {
777		vec3 position;
778		vec3 color;
779		float distance;
780		float decay;
781	};
782	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
783	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
784		vec3 lVector = pointLight.position - geometryPosition;
785		light.direction = normalize( lVector );
786		float lightDistance = length( lVector );
787		light.color = pointLight.color;
788		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
789		light.visible = ( light.color != vec3( 0.0 ) );
790	}
791#endif
792#if NUM_SPOT_LIGHTS > 0
793	struct SpotLight {
794		vec3 position;
795		vec3 direction;
796		vec3 color;
797		float distance;
798		float decay;
799		float coneCos;
800		float penumbraCos;
801	};
802	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
803	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
804		vec3 lVector = spotLight.position - geometryPosition;
805		light.direction = normalize( lVector );
806		float angleCos = dot( light.direction, spotLight.direction );
807		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
808		if ( spotAttenuation > 0.0 ) {
809			float lightDistance = length( lVector );
810			light.color = spotLight.color * spotAttenuation;
811			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
812			light.visible = ( light.color != vec3( 0.0 ) );
813		} else {
814			light.color = vec3( 0.0 );
815			light.visible = false;
816		}
817	}
818#endif
819#if NUM_RECT_AREA_LIGHTS > 0
820	struct RectAreaLight {
821		vec3 color;
822		vec3 position;
823		vec3 halfWidth;
824		vec3 halfHeight;
825	};
826	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
827	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
828#endif
829#if NUM_HEMI_LIGHTS > 0
830	struct HemisphereLight {
831		vec3 direction;
832		vec3 skyColor;
833		vec3 groundColor;
834	};
835	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
836	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
837		float dotNL = dot( normal, hemiLight.direction );
838		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
839		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
840		return irradiance;
841	}
842#endif`,Mk=`#ifdef USE_ENVMAP
843	vec3 getIBLIrradiance( const in vec3 normal ) {
844		#ifdef ENVMAP_TYPE_CUBE_UV
845			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
846			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
847			return PI * envMapColor.rgb * envMapIntensity;
848		#else
849			return vec3( 0.0 );
850		#endif
851	}
852	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
853		#ifdef ENVMAP_TYPE_CUBE_UV
854			vec3 reflectVec = reflect( - viewDir, normal );
855			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
856			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
857			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
858			return envMapColor.rgb * envMapIntensity;
859		#else
860			return vec3( 0.0 );
861		#endif
862	}
863	#ifdef USE_ANISOTROPY
864		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
865			#ifdef ENVMAP_TYPE_CUBE_UV
866				vec3 bentNormal = cross( bitangent, viewDir );
867				bentNormal = normalize( cross( bentNormal, bitangent ) );
868				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
869				return getIBLRadiance( viewDir, bentNormal, roughness );
870			#else
871				return vec3( 0.0 );
872			#endif
873		}
874	#endif
875#endif`,Ek=`ToonMaterial material;
876material.diffuseColor = diffuseColor.rgb;`,wk=`varying vec3 vViewPosition;
877struct ToonMaterial {
878	vec3 diffuseColor;
879};
880void 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 ) {
881	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
882	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
883}
884void 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 ) {
885	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
886}
887#define RE_Direct				RE_Direct_Toon
888#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,Tk=`BlinnPhongMaterial material;
889material.diffuseColor = diffuseColor.rgb;
890material.specularColor = specular;
891material.specularShininess = shininess;
892material.specularStrength = specularStrength;`,Ck=`varying vec3 vViewPosition;
893struct BlinnPhongMaterial {
894	vec3 diffuseColor;
895	vec3 specularColor;
896	float specularShininess;
897	float specularStrength;
898};
899void 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 ) {
900	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
901	vec3 irradiance = dotNL * directLight.color;
902	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
903	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
904}
905void 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 ) {
906	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
907}
908#define RE_Direct				RE_Direct_BlinnPhong
909#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,Rk=`PhysicalMaterial material;
910material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
911vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
912float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
913material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
914material.roughness = min( material.roughness, 1.0 );
915#ifdef IOR
916	material.ior = ior;
917	#ifdef USE_SPECULAR
918		float specularIntensityFactor = specularIntensity;
919		vec3 specularColorFactor = specularColor;
920		#ifdef USE_SPECULAR_COLORMAP
921			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
922		#endif
923		#ifdef USE_SPECULAR_INTENSITYMAP
924			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
925		#endif
926		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
927	#else
928		float specularIntensityFactor = 1.0;
929		vec3 specularColorFactor = vec3( 1.0 );
930		material.specularF90 = 1.0;
931	#endif
932	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
933#else
934	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
935	material.specularF90 = 1.0;
936#endif
937#ifdef USE_CLEARCOAT
938	material.clearcoat = clearcoat;
939	material.clearcoatRoughness = clearcoatRoughness;
940	material.clearcoatF0 = vec3( 0.04 );
941	material.clearcoatF90 = 1.0;
942	#ifdef USE_CLEARCOATMAP
943		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
944	#endif
945	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
946		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
947	#endif
948	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
949	material.clearcoatRoughness += geometryRoughness;
950	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
951#endif
952#ifdef USE_DISPERSION
953	material.dispersion = dispersion;
954#endif
955#ifdef USE_IRIDESCENCE
956	material.iridescence = iridescence;
957	material.iridescenceIOR = iridescenceIOR;
958	#ifdef USE_IRIDESCENCEMAP
959		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
960	#endif
961	#ifdef USE_IRIDESCENCE_THICKNESSMAP
962		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
963	#else
964		material.iridescenceThickness = iridescenceThicknessMaximum;
965	#endif
966#endif
967#ifdef USE_SHEEN
968	material.sheenColor = sheenColor;
969	#ifdef USE_SHEEN_COLORMAP
970		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
971	#endif
972	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
973	#ifdef USE_SHEEN_ROUGHNESSMAP
974		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
975	#endif
976#endif
977#ifdef USE_ANISOTROPY
978	#ifdef USE_ANISOTROPYMAP
979		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
980		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
981		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
982	#else
983		vec2 anisotropyV = anisotropyVector;
984	#endif
985	material.anisotropy = length( anisotropyV );
986	if( material.anisotropy == 0.0 ) {
987		anisotropyV = vec2( 1.0, 0.0 );
988	} else {
989		anisotropyV /= material.anisotropy;
990		material.anisotropy = saturate( material.anisotropy );
991	}
992	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
993	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
994	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
995#endif`,bk
vendor: 14,687 bytes, lines 995-1296
995=`struct PhysicalMaterial {
996	vec3 diffuseColor;
997	float roughness;
998	vec3 specularColor;
999	float specularF90;
1000	float dispersion;
1001	#ifdef USE_CLEARCOAT
1002		float clearcoat;
1003		float clearcoatRoughness;
1004		vec3 clearcoatF0;
1005		float clearcoatF90;
1006	#endif
1007	#ifdef USE_IRIDESCENCE
1008		float iridescence;
1009		float iridescenceIOR;
1010		float iridescenceThickness;
1011		vec3 iridescenceFresnel;
1012		vec3 iridescenceF0;
1013	#endif
1014	#ifdef USE_SHEEN
1015		vec3 sheenColor;
1016		float sheenRoughness;
1017	#endif
1018	#ifdef IOR
1019		float ior;
1020	#endif
1021	#ifdef USE_TRANSMISSION
1022		float transmission;
1023		float transmissionAlpha;
1024		float thickness;
1025		float attenuationDistance;
1026		vec3 attenuationColor;
1027	#endif
1028	#ifdef USE_ANISOTROPY
1029		float anisotropy;
1030		float alphaT;
1031		vec3 anisotropyT;
1032		vec3 anisotropyB;
1033	#endif
1034};
1035vec3 clearcoatSpecularDirect = vec3( 0.0 );
1036vec3 clearcoatSpecularIndirect = vec3( 0.0 );
1037vec3 sheenSpecularDirect = vec3( 0.0 );
1038vec3 sheenSpecularIndirect = vec3(0.0 );
1039vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
1040    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
1041    float x2 = x * x;
1042    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
1043    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
1044}
1045float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
1046	float a2 = pow2( alpha );
1047	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
1048	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
1049	return 0.5 / max( gv + gl, EPSILON );
1050}
1051float D_GGX( const in float alpha, const in float dotNH ) {
1052	float a2 = pow2( alpha );
1053	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
1054	return RECIPROCAL_PI * a2 / pow2( denom );
1055}
1056#ifdef USE_ANISOTROPY
1057	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 ) {
1058		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
1059		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
1060		float v = 0.5 / ( gv + gl );
1061		return saturate(v);
1062	}
1063	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
1064		float a2 = alphaT * alphaB;
1065		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
1066		highp float v2 = dot( v, v );
1067		float w2 = a2 / v2;
1068		return RECIPROCAL_PI * a2 * pow2 ( w2 );
1069	}
1070#endif
1071#ifdef USE_CLEARCOAT
1072	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
1073		vec3 f0 = material.clearcoatF0;
1074		float f90 = material.clearcoatF90;
1075		float roughness = material.clearcoatRoughness;
1076		float alpha = pow2( roughness );
1077		vec3 halfDir = normalize( lightDir + viewDir );
1078		float dotNL = saturate( dot( normal, lightDir ) );
1079		float dotNV = saturate( dot( normal, viewDir ) );
1080		float dotNH = saturate( dot( normal, halfDir ) );
1081		float dotVH = saturate( dot( viewDir, halfDir ) );
1082		vec3 F = F_Schlick( f0, f90, dotVH );
1083		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1084		float D = D_GGX( alpha, dotNH );
1085		return F * ( V * D );
1086	}
1087#endif
1088vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
1089	vec3 f0 = material.specularColor;
1090	float f90 = material.specularF90;
1091	float roughness = material.roughness;
1092	float alpha = pow2( roughness );
1093	vec3 halfDir = normalize( lightDir + viewDir );
1094	float dotNL = saturate( dot( normal, lightDir ) );
1095	float dotNV = saturate( dot( normal, viewDir ) );
1096	float dotNH = saturate( dot( normal, halfDir ) );
1097	float dotVH = saturate( dot( viewDir, halfDir ) );
1098	vec3 F = F_Schlick( f0, f90, dotVH );
1099	#ifdef USE_IRIDESCENCE
1100		F = mix( F, material.iridescenceFresnel, material.iridescence );
1101	#endif
1102	#ifdef USE_ANISOTROPY
1103		float dotTL = dot( material.anisotropyT, lightDir );
1104		float dotTV = dot( material.anisotropyT, viewDir );
1105		float dotTH = dot( material.anisotropyT, halfDir );
1106		float dotBL = dot( material.anisotropyB, lightDir );
1107		float dotBV = dot( material.anisotropyB, viewDir );
1108		float dotBH = dot( material.anisotropyB, halfDir );
1109		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
1110		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
1111	#else
1112		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1113		float D = D_GGX( alpha, dotNH );
1114	#endif
1115	return F * ( V * D );
1116}
1117vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
1118	const float LUT_SIZE = 64.0;
1119	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
1120	const float LUT_BIAS = 0.5 / LUT_SIZE;
1121	float dotNV = saturate( dot( N, V ) );
1122	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
1123	uv = uv * LUT_SCALE + LUT_BIAS;
1124	return uv;
1125}
1126float LTC_ClippedSphereFormFactor( const in vec3 f ) {
1127	float l = length( f );
1128	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
1129}
1130vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
1131	float x = dot( v1, v2 );
1132	float y = abs( x );
1133	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
1134	float b = 3.4175940 + ( 4.1616724 + y ) * y;
1135	float v = a / b;
1136	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
1137	return cross( v1, v2 ) * theta_sintheta;
1138}
1139vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
1140	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
1141	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
1142	vec3 lightNormal = cross( v1, v2 );
1143	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
1144	vec3 T1, T2;
1145	T1 = normalize( V - N * dot( V, N ) );
1146	T2 = - cross( N, T1 );
1147	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
1148	vec3 coords[ 4 ];
1149	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
1150	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
1151	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
1152	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
1153	coords[ 0 ] = normalize( coords[ 0 ] );
1154	coords[ 1 ] = normalize( coords[ 1 ] );
1155	coords[ 2 ] = normalize( coords[ 2 ] );
1156	coords[ 3 ] = normalize( coords[ 3 ] );
1157	vec3 vectorFormFactor = vec3( 0.0 );
1158	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
1159	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
1160	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
1161	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
1162	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
1163	return vec3( result );
1164}
1165#if defined( USE_SHEEN )
1166float D_Charlie( float roughness, float dotNH ) {
1167	float alpha = pow2( roughness );
1168	float invAlpha = 1.0 / alpha;
1169	float cos2h = dotNH * dotNH;
1170	float sin2h = max( 1.0 - cos2h, 0.0078125 );
1171	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
1172}
1173float V_Neubelt( float dotNV, float dotNL ) {
1174	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
1175}
1176vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
1177	vec3 halfDir = normalize( lightDir + viewDir );
1178	float dotNL = saturate( dot( normal, lightDir ) );
1179	float dotNV = saturate( dot( normal, viewDir ) );
1180	float dotNH = saturate( dot( normal, halfDir ) );
1181	float D = D_Charlie( sheenRoughness, dotNH );
1182	float V = V_Neubelt( dotNV, dotNL );
1183	return sheenColor * ( D * V );
1184}
1185#endif
1186float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1187	float dotNV = saturate( dot( normal, viewDir ) );
1188	float r2 = roughness * roughness;
1189	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
1190	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
1191	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
1192	return saturate( DG * RECIPROCAL_PI );
1193}
1194vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1195	float dotNV = saturate( dot( normal, viewDir ) );
1196	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
1197	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
1198	vec4 r = roughness * c0 + c1;
1199	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
1200	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
1201	return fab;
1202}
1203vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
1204	vec2 fab = DFGApprox( normal, viewDir, roughness );
1205	return specularColor * fab.x + specularF90 * fab.y;
1206}
1207#ifdef USE_IRIDESCENCE
1208void 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 ) {
1209#else
1210void 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 ) {
1211#endif
1212	vec2 fab = DFGApprox( normal, viewDir, roughness );
1213	#ifdef USE_IRIDESCENCE
1214		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
1215	#else
1216		vec3 Fr = specularColor;
1217	#endif
1218	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
1219	float Ess = fab.x + fab.y;
1220	float Ems = 1.0 - Ess;
1221	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
1222	singleScatter += FssEss;
1223	multiScatter += Fms * Ems;
1224}
1225#if NUM_RECT_AREA_LIGHTS > 0
1226	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 ) {
1227		vec3 normal = geometryNormal;
1228		vec3 viewDir = geometryViewDir;
1229		vec3 position = geometryPosition;
1230		vec3 lightPos = rectAreaLight.position;
1231		vec3 halfWidth = rectAreaLight.halfWidth;
1232		vec3 halfHeight = rectAreaLight.halfHeight;
1233		vec3 lightColor = rectAreaLight.color;
1234		float roughness = material.roughness;
1235		vec3 rectCoords[ 4 ];
1236		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
1237		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
1238		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
1239		vec2 uv = LTC_Uv( normal, viewDir, roughness );
1240		vec4 t1 = texture2D( ltc_1, uv );
1241		vec4 t2 = texture2D( ltc_2, uv );
1242		mat3 mInv = mat3(
1243			vec3( t1.x, 0, t1.y ),
1244			vec3(    0, 1,    0 ),
1245			vec3( t1.z, 0, t1.w )
1246		);
1247		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
1248		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
1249		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
1250	}
1251#endif
1252void 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 ) {
1253	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
1254	vec3 irradiance = dotNL * directLight.color;
1255	#ifdef USE_CLEARCOAT
1256		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
1257		vec3 ccIrradiance = dotNLcc * directLight.color;
1258		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
1259	#endif
1260	#ifdef USE_SHEEN
1261		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
1262	#endif
1263	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
1264	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1265}
1266void 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 ) {
1267	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1268}
1269void 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) {
1270	#ifdef USE_CLEARCOAT
1271		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
1272	#endif
1273	#ifdef USE_SHEEN
1274		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1275	#endif
1276	vec3 singleScattering = vec3( 0.0 );
1277	vec3 multiScattering = vec3( 0.0 );
1278	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
1279	#ifdef USE_IRIDESCENCE
1280		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
1281	#else
1282		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
1283	#endif
1284	vec3 totalScattering = singleScattering + multiScattering;
1285	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
1286	reflectedLight.indirectSpecular += radiance * singleScattering;
1287	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
1288	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
1289}
1290#define RE_Direct				RE_Direct_Physical
1291#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
1292#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
1293#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
1294float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
1295	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
1296}`,
1296Ik=`
1297vec3 geometryPosition = - vViewPosition;
1298vec3 geometryNormal = normal;
1299vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
1300vec3 geometryClearcoatNormal = vec3( 0.0 );
1301#ifdef USE_CLEARCOAT
1302	geometryClearcoatNormal = clearcoatNormal;
1303#endif
1304#ifdef USE_IRIDESCENCE
1305	float dotNVi = saturate( dot( normal, geometryViewDir ) );
1306	if ( material.iridescenceThickness == 0.0 ) {
1307		material.iridescence = 0.0;
1308	} else {
1309		material.iridescence = saturate( material.iridescence );
1310	}
1311	if ( material.iridescence > 0.0 ) {
1312		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
1313		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
1314	}
1315#endif
1316IncidentLight directLight;
1317#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
1318	PointLight pointLight;
1319	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
1320	PointLightShadow pointLightShadow;
1321	#endif
1322	#pragma unroll_loop_start
1323	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
1324		pointLight = pointLights[ i ];
1325		getPointLightInfo( pointLight, geometryPosition, directLight );
1326		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
1327		pointLightShadow = pointLightShadows[ i ];
1328		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
1329		#endif
1330		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1331	}
1332	#pragma unroll_loop_end
1333#endif
1334#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
1335	SpotLight spotLight;
1336	vec4 spotColor;
1337	vec3 spotLightCoord;
1338	bool inSpotLightMap;
1339	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
1340	SpotLightShadow spotLightShadow;
1341	#endif
1342	#pragma unroll_loop_start
1343	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
1344		spotLight = spotLights[ i ];
1345		getSpotLightInfo( spotLight, geometryPosition, directLight );
1346		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1347		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
1348		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1349		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
1350		#else
1351		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1352		#endif
1353		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
1354			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
1355			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
1356			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
1357			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
1358		#endif
1359		#undef SPOT_LIGHT_MAP_INDEX
1360		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1361		spotLightShadow = spotLightShadows[ i ];
1362		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
1363		#endif
1364		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1365	}
1366	#pragma unroll_loop_end
1367#endif
1368#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
1369	DirectionalLight directionalLight;
1370	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
1371	DirectionalLightShadow directionalLightShadow;
1372	#endif
1373	#pragma unroll_loop_start
1374	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
1375		directionalLight = directionalLights[ i ];
1376		getDirectionalLightInfo( directionalLight, directLight );
1377		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
1378		directionalLightShadow = directionalLightShadows[ i ];
1379		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
1380		#endif
1381		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1382	}
1383	#pragma unroll_loop_end
1384#endif
1385#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
1386	RectAreaLight rectAreaLight;
1387	#pragma unroll_loop_start
1388	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
1389		rectAreaLight = rectAreaLights[ i ];
1390		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1391	}
1392	#pragma unroll_loop_end
1393#endif
1394#if defined( RE_IndirectDiffuse )
1395	vec3 iblIrradiance = vec3( 0.0 );
1396	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
1397	#if defined( USE_LIGHT_PROBES )
1398		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
1399	#endif
1400	#if ( NUM_HEMI_LIGHTS > 0 )
1401		#pragma unroll_loop_start
1402		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
1403			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
1404		}
1405		#pragma unroll_loop_end
1406	#endif
1407#endif
1408#if defined( RE_IndirectSpecular )
1409	vec3 radiance = vec3( 0.0 );
1410	vec3 clearcoatRadiance = vec3( 0.0 );
1411#endif`,Pk=`#if defined( RE_IndirectDiffuse )
1412	#ifdef USE_LIGHTMAP
1413		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
1414		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
1415		irradiance += lightMapIrradiance;
1416	#endif
1417	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
1418		iblIrradiance += getIBLIrradiance( geometryNormal );
1419	#endif
1420#endif
1421#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
1422	#ifdef USE_ANISOTROPY
1423		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
1424	#else
1425		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
1426	#endif
1427	#ifdef USE_CLEARCOAT
1428		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
1429	#endif
1430#endif`,Bk=`#if defined( RE_IndirectDiffuse )
1431	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1432#endif
1433#if defined( RE_IndirectSpecular )
1434	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1435#endif`,Dk=`#if defined( USE_LOGDEPTHBUF )
1436	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
1437#endif`,Lk=`#if defined( USE_LOGDEPTHBUF )
1438	uniform float logDepthBufFC;
1439	varying float vFragDepth;
1440	varying float vIsPerspective;
1441#endif`,Fk=`#ifdef USE_LOGDEPTHBUF
1442	varying float vFragDepth;
1443	varying float vIsPerspective;
1444#endif`,Nk=`#ifdef USE_LOGDEPTHBUF
1445	vFragDepth = 1.0 + gl_Position.w;
1446	vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
1447#endif`,Uk=`#ifdef USE_MAP
1448	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
1449	#ifdef DECODE_VIDEO_TEXTURE
1450		sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );
1451	
1452	#endif
1453	diffuseColor *= sampledDiffuseColor;
1454#endif`,Ok=`#ifdef USE_MAP
1455	uniform sampler2D map;
1456#endif`,kk=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1457	#if defined( USE_POINTS_UV )
1458		vec2 uv = vUv;
1459	#else
1460		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
1461	#endif
1462#endif
1463#ifdef USE_MAP
1464	diffuseColor *= texture2D( map, uv );
1465#endif
1466#ifdef USE_ALPHAMAP
1467	diffuseColor.a *= texture2D( alphaMap, uv ).g;
1468#endif`,zk=`#if defined( USE_POINTS_UV )
1469	varying vec2 vUv;
1470#else
1471	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1472		uniform mat3 uvTransform;
1473	#endif
1474#endif
1475#ifdef USE_MAP
1476	uniform sampler2D map;
1477#endif
1478#ifdef USE_ALPHAMAP
1479	uniform sampler2D alphaMap;
1480#endif`,Hk=`float metalnessFactor = metalness;
1481#ifdef USE_METALNESSMAP
1482	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
1483	metalnessFactor *= texelMetalness.b;
1484#endif`,Gk=`#ifdef USE_METALNESSMAP
1485	uniform sampler2D metalnessMap;
1486#endif`,Vk=`#ifdef USE_INSTANCING_MORPH
1487	float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1488	float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
1489	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1490		morphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
1491	}
1492#endif`,Wk=`#if defined( USE_MORPHCOLORS )
1493	vColor *= morphTargetBaseInfluence;
1494	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1495		#if defined( USE_COLOR_ALPHA )
1496			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
1497		#elif defined( USE_COLOR )
1498			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
1499		#endif
1500	}
1501#endif`,Xk=`#ifdef USE_MORPHNORMALS
1502	objectNormal *= morphTargetBaseInfluence;
1503	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1504		if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
1505	}
1506#endif`,jk=`#ifdef USE_MORPHTARGETS
1507	#ifndef USE_INSTANCING_MORPH
1508		uniform float morphTargetBaseInfluence;
1509		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1510	#endif
1511	uniform sampler2DArray morphTargetsTexture;
1512	uniform ivec2 morphTargetsTextureSize;
1513	vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
1514		int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
1515		int y = texelIndex / morphTargetsTextureSize.x;
1516		int x = texelIndex - y * morphTargetsTextureSize.x;
1517		ivec3 morphUV = ivec3( x, y, morphTargetIndex );
1518		return texelFetch( morphTargetsTexture, morphUV, 0 );
1519	}
1520#endif`,Jk=`#ifdef USE_MORPHTARGETS
1521	transformed *= morphTargetBaseInfluence;
1522	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1523		if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
1524	}
1525#endif`,Yk=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
1526#ifdef FLAT_SHADED
1527	vec3 fdx = dFdx( vViewPosition );
1528	vec3 fdy = dFdy( vViewPosition );
1529	vec3 normal = normalize( cross( fdx, fdy ) );
1530#else
1531	vec3 normal = normalize( vNormal );
1532	#ifdef DOUBLE_SIDED
1533		normal *= faceDirection;
1534	#endif
1535#endif
1536#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
1537	#ifdef USE_TANGENT
1538		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1539	#else
1540		mat3 tbn = getTangentFrame( - vViewPosition, normal,
1541		#if defined( USE_NORMALMAP )
1542			vNormalMapUv
1543		#elif defined( USE_CLEARCOAT_NORMALMAP )
1544			vClearcoatNormalMapUv
1545		#else
1546			vUv
1547		#endif
1548		);
1549	#endif
1550	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1551		tbn[0] *= faceDirection;
1552		tbn[1] *= faceDirection;
1553	#endif
1554#endif
1555#ifdef USE_CLEARCOAT_NORMALMAP
1556	#ifdef USE_TANGENT
1557		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1558	#else
1559		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
1560	#endif
1561	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1562		tbn2[0] *= faceDirection;
1563		tbn2[1] *= faceDirection;
1564	#endif
1565#endif
1566vec3 nonPerturbedNormal = normal;`,Kk=`#ifdef USE_NORMALMAP_OBJECTSPACE
1567	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1568	#ifdef FLIP_SIDED
1569		normal = - normal;
1570	#endif
1571	#ifdef DOUBLE_SIDED
1572		normal = normal * faceDirection;
1573	#endif
1574	normal = normalize( normalMatrix * normal );
1575#elif defined( USE_NORMALMAP_TANGENTSPACE )
1576	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1577	mapN.xy *= normalScale;
1578	normal = normalize( tbn * mapN );
1579#elif defined( USE_BUMPMAP )
1580	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
1581#endif`,Qk=`#ifndef FLAT_SHADED
1582	varying vec3 vNormal;
1583	#ifdef USE_TANGENT
1584		varying vec3 vTangent;
1585		varying vec3 vBitangent;
1586	#endif
1587#endif`,Zk=`#ifndef FLAT_SHADED
1588	varying vec3 vNormal;
1589	#ifdef USE_TANGENT
1590		varying vec3 vTangent;
1591		varying vec3 vBitangent;
1592	#endif
1593#endif`,qk=`#ifndef FLAT_SHADED
1594	vNormal = normalize( transformedNormal );
1595	#ifdef USE_TANGENT
1596		vTangent = normalize( transformedTangent );
1597		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
1598	#endif
1599#endif`,$k=`#ifdef USE_NORMALMAP
1600	uniform sampler2D normalMap;
1601	uniform vec2 normalScale;
1602#endif
1603#ifdef USE_NORMALMAP_OBJECTSPACE
1604	uniform mat3 normalMatrix;
1605#endif
1606#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
1607	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
1608		vec3 q0 = dFdx( eye_pos.xyz );
1609		vec3 q1 = dFdy( eye_pos.xyz );
1610		vec2 st0 = dFdx( uv.st );
1611		vec2 st1 = dFdy( uv.st );
1612		vec3 N = surf_norm;
1613		vec3 q1perp = cross( q1, N );
1614		vec3 q0perp = cross( N, q0 );
1615		vec3 T = q1perp * st0.x + q0perp * st1.x;
1616		vec3 B = q1perp * st0.y + q0perp * st1.y;
1617		float det = max( dot( T, T ), dot( B, B ) );
1618		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
1619		return mat3( T * scale, B * scale, N );
1620	}
1621#endif`,ez=`#ifdef USE_CLEARCOAT
1622	vec3 clearcoatNormal = nonPerturbedNormal;
1623#endif`,tz=`#ifdef USE_CLEARCOAT_NORMALMAP
1624	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
1625	clearcoatMapN.xy *= clearcoatNormalScale;
1626	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
1627#endif`,nz=`#ifdef USE_CLEARCOATMAP
1628	uniform sampler2D clearcoatMap;
1629#endif
1630#ifdef USE_CLEARCOAT_NORMALMAP
1631	uniform sampler2D clearcoatNormalMap;
1632	uniform vec2 clearcoatNormalScale;
1633#endif
1634#ifdef USE_CLEARCOAT_ROUGHNESSMAP
1635	uniform sampler2D clearcoatRoughnessMap;
1636#endif`,iz=`#ifdef USE_IRIDESCENCEMAP
1637	uniform sampler2D iridescenceMap;
1638#endif
1639#ifdef USE_IRIDESCENCE_THICKNESSMAP
1640	uniform sampler2D iridescenceThicknessMap;
1641#endif`,rz=`#ifdef OPAQUE
1642diffuseColor.a = 1.0;
1643#endif
1644#ifdef USE_TRANSMISSION
1645diffuseColor.a *= material.transmissionAlpha;
1646#endif
1647gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,sz=`vec3 packNormalToRGB( const in vec3 normal ) {
1648	return normalize( normal ) * 0.5 + 0.5;
1649}
1650vec3 unpackRGBToNormal( const in vec3 rgb ) {
1651	return 2.0 * rgb.xyz - 1.0;
1652}
1653const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
1654const float Inv255 = 1. / 255.;
1655const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
1656const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
1657const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
1658const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
1659vec4 packDepthToRGBA( const in float v ) {
1660	if( v <= 0.0 )
1661		return vec4( 0., 0., 0., 0. );
1662	if( v >= 1.0 )
1663		return vec4( 1., 1., 1., 1. );
1664	float vuf;
1665	float af = modf( v * PackFactors.a, vuf );
1666	float bf = modf( vuf * ShiftRight8, vuf );
1667	float gf = modf( vuf * ShiftRight8, vuf );
1668	return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
1669}
1670vec3 packDepthToRGB( const in float v ) {
1671	if( v <= 0.0 )
1672		return vec3( 0., 0., 0. );
1673	if( v >= 1.0 )
1674		return vec3( 1., 1., 1. );
1675	float vuf;
1676	float bf = modf( v * PackFactors.b, vuf );
1677	float gf = modf( vuf * ShiftRight8, vuf );
1678	return vec3( vuf * Inv255, gf * PackUpscale, bf );
1679}
1680vec2 packDepthToRG( const in float v ) {
1681	if( v <= 0.0 )
1682		return vec2( 0., 0. );
1683	if( v >= 1.0 )
1684		return vec2( 1., 1. );
1685	float vuf;
1686	float gf = modf( v * 256., vuf );
1687	return vec2( vuf * Inv255, gf );
1688}
1689float unpackRGBAToDepth( const in vec4 v ) {
1690	return dot( v, UnpackFactors4 );
1691}
1692float unpackRGBToDepth( const in vec3 v ) {
1693	return dot( v, UnpackFactors3 );
1694}
1695float unpackRGToDepth( const in vec2 v ) {
1696	return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
1697}
1698vec4 pack2HalfToRGBA( const in vec2 v ) {
1699	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
1700	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
1701}
1702vec2 unpackRGBATo2Half( const in vec4 v ) {
1703	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
1704}
1705float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
1706	return ( viewZ + near ) / ( near - far );
1707}
1708float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
1709	return depth * ( near - far ) - near;
1710}
1711float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
1712	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
1713}
1714float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
1715	return ( near * far ) / ( ( far - near ) * depth - far );
1716}`,oz=`#ifdef PREMULTIPLIED_ALPHA
1717	gl_FragColor.rgb *= gl_FragColor.a;
1718#endif`,az=`vec4 mvPosition = vec4( transformed, 1.0 );
1719#ifdef USE_BATCHING
1720	mvPosition = batchingMatrix * mvPosition;
1721#endif
1722#ifdef USE_INSTANCING
1723	mvPosition = instanceMatrix * mvPosition;
1724#endif
1725mvPosition = modelViewMatrix * mvPosition;
1726gl_Position = projectionMatrix * mvPosition;`,lz=`#ifdef DITHERING
1727	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
1728#endif`,cz=`#ifdef DITHERING
1729	vec3 dithering( vec3 color ) {
1730		float grid_position = rand( gl_FragCoord.xy );
1731		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
1732		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
1733		return color + dither_shift_RGB;
1734	}
1735#endif`,uz=`float roughnessFactor = roughness;
1736#ifdef USE_ROUGHNESSMAP
1737	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
1738	roughnessFactor *= texelRoughness.g;
1739#endif`,fz=`#ifdef USE_ROUGHNESSMAP
1740	uniform sampler2D roughnessMap;
1741#endif`,hz=
vendor: 8,887 bytes, lines 1741-1927
1741`#if NUM_SPOT_LIGHT_COORDS > 0
1742	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1743#endif
1744#if NUM_SPOT_LIGHT_MAPS > 0
1745	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
1746#endif
1747#ifdef USE_SHADOWMAP
1748	#if NUM_DIR_LIGHT_SHADOWS > 0
1749		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
1750		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1751		struct DirectionalLightShadow {
1752			float shadowIntensity;
1753			float shadowBias;
1754			float shadowNormalBias;
1755			float shadowRadius;
1756			vec2 shadowMapSize;
1757		};
1758		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1759	#endif
1760	#if NUM_SPOT_LIGHT_SHADOWS > 0
1761		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
1762		struct SpotLightShadow {
1763			float shadowIntensity;
1764			float shadowBias;
1765			float shadowNormalBias;
1766			float shadowRadius;
1767			vec2 shadowMapSize;
1768		};
1769		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1770	#endif
1771	#if NUM_POINT_LIGHT_SHADOWS > 0
1772		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
1773		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1774		struct PointLightShadow {
1775			float shadowIntensity;
1776			float shadowBias;
1777			float shadowNormalBias;
1778			float shadowRadius;
1779			vec2 shadowMapSize;
1780			float shadowCameraNear;
1781			float shadowCameraFar;
1782		};
1783		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1784	#endif
1785	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
1786		return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
1787	}
1788	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
1789		return unpackRGBATo2Half( texture2D( shadow, uv ) );
1790	}
1791	float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
1792		float occlusion = 1.0;
1793		vec2 distribution = texture2DDistribution( shadow, uv );
1794		float hard_shadow = step( compare , distribution.x );
1795		if (hard_shadow != 1.0 ) {
1796			float distance = compare - distribution.x ;
1797			float variance = max( 0.00000, distribution.y * distribution.y );
1798			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 );
1799		}
1800		return occlusion;
1801	}
1802	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
1803		float shadow = 1.0;
1804		shadowCoord.xyz /= shadowCoord.w;
1805		shadowCoord.z += shadowBias;
1806		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
1807		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
1808		if ( frustumTest ) {
1809		#if defined( SHADOWMAP_TYPE_PCF )
1810			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1811			float dx0 = - texelSize.x * shadowRadius;
1812			float dy0 = - texelSize.y * shadowRadius;
1813			float dx1 = + texelSize.x * shadowRadius;
1814			float dy1 = + texelSize.y * shadowRadius;
1815			float dx2 = dx0 / 2.0;
1816			float dy2 = dy0 / 2.0;
1817			float dx3 = dx1 / 2.0;
1818			float dy3 = dy1 / 2.0;
1819			shadow = (
1820				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
1821				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
1822				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
1823				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
1824				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
1825				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
1826				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
1827				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
1828				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
1829				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
1830				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
1831				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
1832				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
1833				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
1834				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
1835				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
1836				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
1837			) * ( 1.0 / 17.0 );
1838		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
1839			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1840			float dx = texelSize.x;
1841			float dy = texelSize.y;
1842			vec2 uv = shadowCoord.xy;
1843			vec2 f = fract( uv * shadowMapSize + 0.5 );
1844			uv -= f * texelSize;
1845			shadow = (
1846				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
1847				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
1848				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
1849				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
1850				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
1851					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
1852					 f.x ) +
1853				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
1854					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
1855					 f.x ) +
1856				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
1857					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
1858					 f.y ) +
1859				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
1860					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
1861					 f.y ) +
1862				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
1863						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
1864						  f.x ),
1865					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
1866						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
1867						  f.x ),
1868					 f.y )
1869			) * ( 1.0 / 9.0 );
1870		#elif defined( SHADOWMAP_TYPE_VSM )
1871			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
1872		#else
1873			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
1874		#endif
1875		}
1876		return mix( 1.0, shadow, shadowIntensity );
1877	}
1878	vec2 cubeToUV( vec3 v, float texelSizeY ) {
1879		vec3 absV = abs( v );
1880		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
1881		absV *= scaleToCube;
1882		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
1883		vec2 planar = v.xy;
1884		float almostATexel = 1.5 * texelSizeY;
1885		float almostOne = 1.0 - almostATexel;
1886		if ( absV.z >= almostOne ) {
1887			if ( v.z > 0.0 )
1888				planar.x = 4.0 - v.x;
1889		} else if ( absV.x >= almostOne ) {
1890			float signX = sign( v.x );
1891			planar.x = v.z * signX + 2.0 * signX;
1892		} else if ( absV.y >= almostOne ) {
1893			float signY = sign( v.y );
1894			planar.x = v.x + 2.0 * signY + 2.0;
1895			planar.y = v.z * signY - 2.0;
1896		}
1897		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
1898	}
1899	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
1900		float shadow = 1.0;
1901		vec3 lightToPosition = shadowCoord.xyz;
1902		
1903		float lightToPositionLength = length( lightToPosition );
1904		if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
1905			float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );			dp += shadowBias;
1906			vec3 bd3D = normalize( lightToPosition );
1907			vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
1908			#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
1909				vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
1910				shadow = (
1911					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
1912					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
1913					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
1914					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
1915					texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
1916					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
1917					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
1918					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
1919					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
1920				) * ( 1.0 / 9.0 );
1921			#else
1922				shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
1923			#endif
1924		}
1925		return mix( 1.0, shadow, shadowIntensity );
1926	}
1927#endif`,
1927dz=`#if NUM_SPOT_LIGHT_COORDS > 0
1928	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
1929	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1930#endif
1931#ifdef USE_SHADOWMAP
1932	#if NUM_DIR_LIGHT_SHADOWS > 0
1933		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
1934		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1935		struct DirectionalLightShadow {
1936			float shadowIntensity;
1937			float shadowBias;
1938			float shadowNormalBias;
1939			float shadowRadius;
1940			vec2 shadowMapSize;
1941		};
1942		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1943	#endif
1944	#if NUM_SPOT_LIGHT_SHADOWS > 0
1945		struct SpotLightShadow {
1946			float shadowIntensity;
1947			float shadowBias;
1948			float shadowNormalBias;
1949			float shadowRadius;
1950			vec2 shadowMapSize;
1951		};
1952		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1953	#endif
1954	#if NUM_POINT_LIGHT_SHADOWS > 0
1955		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
1956		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1957		struct PointLightShadow {
1958			float shadowIntensity;
1959			float shadowBias;
1960			float shadowNormalBias;
1961			float shadowRadius;
1962			vec2 shadowMapSize;
1963			float shadowCameraNear;
1964			float shadowCameraFar;
1965		};
1966		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1967	#endif
1968#endif`,pz=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
1969	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
1970	vec4 shadowWorldPosition;
1971#endif
1972#if defined( USE_SHADOWMAP )
1973	#if NUM_DIR_LIGHT_SHADOWS > 0
1974		#pragma unroll_loop_start
1975		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
1976			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
1977			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
1978		}
1979		#pragma unroll_loop_end
1980	#endif
1981	#if NUM_POINT_LIGHT_SHADOWS > 0
1982		#pragma unroll_loop_start
1983		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
1984			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
1985			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
1986		}
1987		#pragma unroll_loop_end
1988	#endif
1989#endif
1990#if NUM_SPOT_LIGHT_COORDS > 0
1991	#pragma unroll_loop_start
1992	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
1993		shadowWorldPosition = worldPosition;
1994		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1995			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
1996		#endif
1997		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
1998	}
1999	#pragma unroll_loop_end
2000#endif`,mz=`float getShadowMask() {
2001	float shadow = 1.0;
2002	#ifdef USE_SHADOWMAP
2003	#if NUM_DIR_LIGHT_SHADOWS > 0
2004	DirectionalLightShadow directionalLight;
2005	#pragma unroll_loop_start
2006	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2007		directionalLight = directionalLightShadows[ i ];
2008		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
2009	}
2010	#pragma unroll_loop_end
2011	#endif
2012	#if NUM_SPOT_LIGHT_SHADOWS > 0
2013	SpotLightShadow spotLight;
2014	#pragma unroll_loop_start
2015	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
2016		spotLight = spotLightShadows[ i ];
2017		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
2018	}
2019	#pragma unroll_loop_end
2020	#endif
2021	#if NUM_POINT_LIGHT_SHADOWS > 0
2022	PointLightShadow pointLight;
2023	#pragma unroll_loop_start
2024	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2025		pointLight = pointLightShadows[ i ];
2026		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
2027	}
2028	#pragma unroll_loop_end
2029	#endif
2030	#endif
2031	return shadow;
2032}`,gz=`#ifdef USE_SKINNING
2033	mat4 boneMatX = getBoneMatrix( skinIndex.x );
2034	mat4 boneMatY = getBoneMatrix( skinIndex.y );
2035	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
2036	mat4 boneMatW = getBoneMatrix( skinIndex.w );
2037#endif`,vz=`#ifdef USE_SKINNING
2038	uniform mat4 bindMatrix;
2039	uniform mat4 bindMatrixInverse;
2040	uniform highp sampler2D boneTexture;
2041	mat4 getBoneMatrix( const in float i ) {
2042		int size = textureSize( boneTexture, 0 ).x;
2043		int j = int( i ) * 4;
2044		int x = j % size;
2045		int y = j / size;
2046		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
2047		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
2048		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
2049		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
2050		return mat4( v1, v2, v3, v4 );
2051	}
2052#endif`,yz=`#ifdef USE_SKINNING
2053	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
2054	vec4 skinned = vec4( 0.0 );
2055	skinned += boneMatX * skinVertex * skinWeight.x;
2056	skinned += boneMatY * skinVertex * skinWeight.y;
2057	skinned += boneMatZ * skinVertex * skinWeight.z;
2058	skinned += boneMatW * skinVertex * skinWeight.w;
2059	transformed = ( bindMatrixInverse * skinned ).xyz;
2060#endif`,xz=`#ifdef USE_SKINNING
2061	mat4 skinMatrix = mat4( 0.0 );
2062	skinMatrix += skinWeight.x * boneMatX;
2063	skinMatrix += skinWeight.y * boneMatY;
2064	skinMatrix += skinWeight.z * boneMatZ;
2065	skinMatrix += skinWeight.w * boneMatW;
2066	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
2067	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
2068	#ifdef USE_TANGENT
2069		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
2070	#endif
2071#endif`,_z=`float specularStrength;
2072#ifdef USE_SPECULARMAP
2073	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
2074	specularStrength = texelSpecular.r;
2075#else
2076	specularStrength = 1.0;
2077#endif`,Sz=`#ifdef USE_SPECULARMAP
2078	uniform sampler2D specularMap;
2079#endif`,Az=`#if defined( TONE_MAPPING )
2080	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
2081#endif`,Mz=`#ifndef saturate
2082#define saturate( a ) clamp( a, 0.0, 1.0 )
2083#endif
2084uniform float toneMappingExposure;
2085vec3 LinearToneMapping( vec3 color ) {
2086	return saturate( toneMappingExposure * color );
2087}
2088vec3 ReinhardToneMapping( vec3 color ) {
2089	color *= toneMappingExposure;
2090	return saturate( color / ( vec3( 1.0 ) + color ) );
2091}
2092vec3 CineonToneMapping( vec3 color ) {
2093	color *= toneMappingExposure;
2094	color = max( vec3( 0.0 ), color - 0.004 );
2095	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
2096}
2097vec3 RRTAndODTFit( vec3 v ) {
2098	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
2099	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
2100	return a / b;
2101}
2102vec3 ACESFilmicToneMapping( vec3 color ) {
2103	const mat3 ACESInputMat = mat3(
2104		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
2105		vec3( 0.04823, 0.01566, 0.83777 )
2106	);
2107	const mat3 ACESOutputMat = mat3(
2108		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
2109		vec3( -0.07367, -0.00605,  1.07602 )
2110	);
2111	color *= toneMappingExposure / 0.6;
2112	color = ACESInputMat * color;
2113	color = RRTAndODTFit( color );
2114	color = ACESOutputMat * color;
2115	return saturate( color );
2116}
2117const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
2118	vec3( 1.6605, - 0.1246, - 0.0182 ),
2119	vec3( - 0.5876, 1.1329, - 0.1006 ),
2120	vec3( - 0.0728, - 0.0083, 1.1187 )
2121);
2122const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
2123	vec3( 0.6274, 0.0691, 0.0164 ),
2124	vec3( 0.3293, 0.9195, 0.0880 ),
2125	vec3( 0.0433, 0.0113, 0.8956 )
2126);
2127vec3 agxDefaultContrastApprox( vec3 x ) {
2128	vec3 x2 = x * x;
2129	vec3 x4 = x2 * x2;
2130	return + 15.5 * x4 * x2
2131		- 40.14 * x4 * x
2132		+ 31.96 * x4
2133		- 6.868 * x2 * x
2134		+ 0.4298 * x2
2135		+ 0.1191 * x
2136		- 0.00232;
2137}
2138vec3 AgXToneMapping( vec3 color ) {
2139	const mat3 AgXInsetMatrix = mat3(
2140		vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
2141		vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
2142		vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
2143	);
2144	const mat3 AgXOutsetMatrix = mat3(
2145		vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
2146		vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
2147		vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
2148	);
2149	const float AgxMinEv = - 12.47393;	const float AgxMaxEv = 4.026069;
2150	color *= toneMappingExposure;
2151	color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
2152	color = AgXInsetMatrix * color;
2153	color = max( color, 1e-10 );	color = log2( color );
2154	color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
2155	color = clamp( color, 0.0, 1.0 );
2156	color = agxDefaultContrastApprox( color );
2157	color = AgXOutsetMatrix * color;
2158	color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
2159	color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
2160	color = clamp( color, 0.0, 1.0 );
2161	return color;
2162}
2163vec3 NeutralToneMapping( vec3 color ) {
2164	const float StartCompression = 0.8 - 0.04;
2165	const float Desaturation = 0.15;
2166	color *= toneMappingExposure;
2167	float x = min( color.r, min( color.g, color.b ) );
2168	float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
2169	color -= offset;
2170	float peak = max( color.r, max( color.g, color.b ) );
2171	if ( peak < StartCompression ) return color;
2172	float d = 1. - StartCompression;
2173	float newPeak = 1. - d * d / ( peak + d - StartCompression );
2174	color *= newPeak / peak;
2175	float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
2176	return mix( color, vec3( newPeak ), g );
2177}
2178vec3 CustomToneMapping( vec3 color ) { return color; }`,Ez=`#ifdef USE_TRANSMISSION
2179	material.transmission = transmission;
2180	material.transmissionAlpha = 1.0;
2181	material.thickness = thickness;
2182	material.attenuationDistance = attenuationDistance;
2183	material.attenuationColor = attenuationColor;
2184	#ifdef USE_TRANSMISSIONMAP
2185		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
2186	#endif
2187	#ifdef USE_THICKNESSMAP
2188		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
2189	#endif
2190	vec3 pos = vWorldPosition;
2191	vec3 v = normalize( cameraPosition - pos );
2192	vec3 n = inverseTransformDirection( normal, viewMatrix );
2193	vec4 transmitted = getIBLVolumeRefraction(
2194		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
2195		pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
2196		material.attenuationColor, material.attenuationDistance );
2197	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
2198	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
2199#endif`,wz=`#ifdef USE_TRANSMISSION
2200	uniform float transmission;
2201	uniform float thickness;
2202	uniform float attenuationDistance;
2203	uniform vec3 attenuationColor;
2204	#ifdef USE_TRANSMISSIONMAP
2205		uniform sampler2D transmissionMap;
2206	#endif
2207	#ifdef USE_THICKNESSMAP
2208		uniform sampler2D thicknessMap;
2209	#endif
2210	uniform vec2 transmissionSamplerSize;
2211	uniform sampler2D transmissionSamplerMap;
2212	uniform mat4 modelMatrix;
2213	uniform mat4 projectionMatrix;
2214	varying vec3 vWorldPosition;
2215	float w0( float a ) {
2216		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
2217	}
2218	float w1( float a ) {
2219		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
2220	}
2221	float w2( float a ){
2222		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
2223	}
2224	float w3( float a ) {
2225		return ( 1.0 / 6.0 ) * ( a * a * a );
2226	}
2227	float g0( float a ) {
2228		return w0( a ) + w1( a );
2229	}
2230	float g1( float a ) {
2231		return w2( a ) + w3( a );
2232	}
2233	float h0( float a ) {
2234		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
2235	}
2236	float h1( float a ) {
2237		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
2238	}
2239	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
2240		uv = uv * texelSize.zw + 0.5;
2241		vec2 iuv = floor( uv );
2242		vec2 fuv = fract( uv );
2243		float g0x = g0( fuv.x );
2244		float g1x = g1( fuv.x );
2245		float h0x = h0( fuv.x );
2246		float h1x = h1( fuv.x );
2247		float h0y = h0( fuv.y );
2248		float h1y = h1( fuv.y );
2249		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2250		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2251		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2252		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2253		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
2254			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
2255	}
2256	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
2257		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
2258		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
2259		vec2 fLodSizeInv = 1.0 / fLodSize;
2260		vec2 cLodSizeInv = 1.0 / cLodSize;
2261		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
2262		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
2263		return mix( fSample, cSample, fract( lod ) );
2264	}
2265	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
2266		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
2267		vec3 modelScale;
2268		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
2269		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
2270		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
2271		return normalize( refractionVector ) * thickness * modelScale;
2272	}
2273	float applyIorToRoughness( const in float roughness, const in float ior ) {
2274		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
2275	}
2276	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
2277		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
2278		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
2279	}
2280	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
2281		if ( isinf( attenuationDistance ) ) {
2282			return vec3( 1.0 );
2283		} else {
2284			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
2285			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
2286		}
2287	}
2288	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
2289		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
2290		const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
2291		const in vec3 attenuationColor, const in float attenuationDistance ) {
2292		vec4 transmittedLight;
2293		vec3 transmittance;
2294		#ifdef USE_DISPERSION
2295			float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
2296			vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
2297			for ( int i = 0; i < 3; i ++ ) {
2298				vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
2299				vec3 refractedRayExit = position + transmissionRay;
2300		
2301				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2302				vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2303				refractionCoords += 1.0;
2304				refractionCoords /= 2.0;
2305		
2306				vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
2307				transmittedLight[ i ] = transmissionSample[ i ];
2308				transmittedLight.a += transmissionSample.a;
2309				transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
2310			}
2311			transmittedLight.a /= 3.0;
2312		
2313		#else
2314		
2315			vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
2316			vec3 refractedRayExit = position + transmissionRay;
2317			vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2318			vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2319			refractionCoords += 1.0;
2320			refractionCoords /= 2.0;
2321			transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
2322			transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
2323		
2324		#endif
2325		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
2326		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
2327		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
2328		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
2329	}
2330#endif`,Tz=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2331	varying vec2 vUv;
2332#endif
2333#ifdef USE_MAP
2334	varying vec2 vMapUv;
2335#endif
2336#ifdef USE_ALPHAMAP
2337	varying vec2 vAlphaMapUv;
2338#endif
2339#ifdef USE_LIGHTMAP
2340	varying vec2 vLightMapUv;
2341#endif
2342#ifdef USE_AOMAP
2343	varying vec2 vAoMapUv;
2344#endif
2345#ifdef USE_BUMPMAP
2346	varying vec2 vBumpMapUv;
2347#endif
2348#ifdef USE_NORMALMAP
2349	varying vec2 vNormalMapUv;
2350#endif
2351#ifdef USE_EMISSIVEMAP
2352	varying vec2 vEmissiveMapUv;
2353#endif
2354#ifdef USE_METALNESSMAP
2355	varying vec2 vMetalnessMapUv;
2356#endif
2357#ifdef USE_ROUGHNESSMAP
2358	varying vec2 vRoughnessMapUv;
2359#endif
2360#ifdef USE_ANISOTROPYMAP
2361	varying vec2 vAnisotropyMapUv;
2362#endif
2363#ifdef USE_CLEARCOATMAP
2364	varying vec2 vClearcoatMapUv;
2365#endif
2366#ifdef USE_CLEARCOAT_NORMALMAP
2367	varying vec2 vClearcoatNormalMapUv;
2368#endif
2369#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2370	varying vec2 vClearcoatRoughnessMapUv;
2371#endif
2372#ifdef USE_IRIDESCENCEMAP
2373	varying vec2 vIridescenceMapUv;
2374#endif
2375#ifdef USE_IRIDESCENCE_THICKNESSMAP
2376	varying vec2 vIridescenceThicknessMapUv;
2377#endif
2378#ifdef USE_SHEEN_COLORMAP
2379	varying vec2 vSheenColorMapUv;
2380#endif
2381#ifdef USE_SHEEN_ROUGHNESSMAP
2382	varying vec2 vSheenRoughnessMapUv;
2383#endif
2384#ifdef USE_SPECULARMAP
2385	varying vec2 vSpecularMapUv;
2386#endif
2387#ifdef USE_SPECULAR_COLORMAP
2388	varying vec2 vSpecularColorMapUv;
2389#endif
2390#ifdef USE_SPECULAR_INTENSITYMAP
2391	varying vec2 vSpecularIntensityMapUv;
2392#endif
2393#ifdef USE_TRANSMISSIONMAP
2394	uniform mat3 transmissionMapTransform;
2395	varying vec2 vTransmissionMapUv;
2396#endif
2397#ifdef USE_THICKNESSMAP
2398	uniform mat3 thicknessMapTransform;
2399	varying vec2 vThicknessMapUv;
2400#endif`,Cz=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2401	varying vec2 vUv;
2402#endif
2403#ifdef USE_MAP
2404	uniform mat3 mapTransform;
2405	varying vec2 vMapUv;
2406#endif
2407#ifdef USE_ALPHAMAP
2408	uniform mat3 alphaMapTransform;
2409	varying vec2 vAlphaMapUv;
2410#endif
2411#ifdef USE_LIGHTMAP
2412	uniform mat3 lightMapTransform;
2413	varying vec2 vLightMapUv;
2414#endif
2415#ifdef USE_AOMAP
2416	uniform mat3 aoMapTransform;
2417	varying vec2 vAoMapUv;
2418#endif
2419#ifdef USE_BUMPMAP
2420	uniform mat3 bumpMapTransform;
2421	varying vec2 vBumpMapUv;
2422#endif
2423#ifdef USE_NORMALMAP
2424	uniform mat3 normalMapTransform;
2425	varying vec2 vNormalMapUv;
2426#endif
2427#ifdef USE_DISPLACEMENTMAP
2428	uniform mat3 displacementMapTransform;
2429	varying vec2 vDisplacementMapUv;
2430#endif
2431#ifdef USE_EMISSIVEMAP
2432	uniform mat3 emissiveMapTransform;
2433	varying vec2 vEmissiveMapUv;
2434#endif
2435#ifdef USE_METALNESSMAP
2436	uniform mat3 metalnessMapTransform;
2437	varying vec2 vMetalnessMapUv;
2438#endif
2439#ifdef USE_ROUGHNESSMAP
2440	uniform mat3 roughnessMapTransform;
2441	varying vec2 vRoughnessMapUv;
2442#endif
2443#ifdef USE_ANISOTROPYMAP
2444	uniform mat3 anisotropyMapTransform;
2445	varying vec2 vAnisotropyMapUv;
2446#endif
2447#ifdef USE_CLEARCOATMAP
2448	uniform mat3 clearcoatMapTransform;
2449	varying vec2 vClearcoatMapUv;
2450#endif
2451#ifdef USE_CLEARCOAT_NORMALMAP
2452	uniform mat3 clearcoatNormalMapTransform;
2453	varying vec2 vClearcoatNormalMapUv;
2454#endif
2455#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2456	uniform mat3 clearcoatRoughnessMapTransform;
2457	varying vec2 vClearcoatRoughnessMapUv;
2458#endif
2459#ifdef USE_SHEEN_COLORMAP
2460	uniform mat3 sheenColorMapTransform;
2461	varying vec2 vSheenColorMapUv;
2462#endif
2463#ifdef USE_SHEEN_ROUGHNESSMAP
2464	uniform mat3 sheenRoughnessMapTransform;
2465	varying vec2 vSheenRoughnessMapUv;
2466#endif
2467#ifdef USE_IRIDESCENCEMAP
2468	uniform mat3 iridescenceMapTransform;
2469	varying vec2 vIridescenceMapUv;
2470#endif
2471#ifdef USE_IRIDESCENCE_THICKNESSMAP
2472	uniform mat3 iridescenceThicknessMapTransform;
2473	varying vec2 vIridescenceThicknessMapUv;
2474#endif
2475#ifdef USE_SPECULARMAP
2476	uniform mat3 specularMapTransform;
2477	varying vec2 vSpecularMapUv;
2478#endif
2479#ifdef USE_SPECULAR_COLORMAP
2480	uniform mat3 specularColorMapTransform;
2481	varying vec2 vSpecularColorMapUv;
2482#endif
2483#ifdef USE_SPECULAR_INTENSITYMAP
2484	uniform mat3 specularIntensityMapTransform;
2485	varying vec2 vSpecularIntensityMapUv;
2486#endif
2487#ifdef USE_TRANSMISSIONMAP
2488	uniform mat3 transmissionMapTransform;
2489	varying vec2 vTransmissionMapUv;
2490#endif
2491#ifdef USE_THICKNESSMAP
2492	uniform mat3 thicknessMapTransform;
2493	varying vec2 vThicknessMapUv;
2494#endif`,Rz=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2495	vUv = vec3( uv, 1 ).xy;
2496#endif
2497#ifdef USE_MAP
2498	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
2499#endif
2500#ifdef USE_ALPHAMAP
2501	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
2502#endif
2503#ifdef USE_LIGHTMAP
2504	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
2505#endif
2506#ifdef USE_AOMAP
2507	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
2508#endif
2509#ifdef USE_BUMPMAP
2510	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
2511#endif
2512#ifdef USE_NORMALMAP
2513	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
2514#endif
2515#ifdef USE_DISPLACEMENTMAP
2516	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
2517#endif
2518#ifdef USE_EMISSIVEMAP
2519	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
2520#endif
2521#ifdef USE_METALNESSMAP
2522	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
2523#endif
2524#ifdef USE_ROUGHNESSMAP
2525	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
2526#endif
2527#ifdef USE_ANISOTROPYMAP
2528	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
2529#endif
2530#ifdef USE_CLEARCOATMAP
2531	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
2532#endif
2533#ifdef USE_CLEARCOAT_NORMALMAP
2534	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
2535#endif
2536#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2537	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
2538#endif
2539#ifdef USE_IRIDESCENCEMAP
2540	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
2541#endif
2542#ifdef USE_IRIDESCENCE_THICKNESSMAP
2543	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
2544#endif
2545#ifdef USE_SHEEN_COLORMAP
2546	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
2547#endif
2548#ifdef USE_SHEEN_ROUGHNESSMAP
2549	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
2550#endif
2551#ifdef USE_SPECULARMAP
2552	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
2553#endif
2554#ifdef USE_SPECULAR_COLORMAP
2555	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
2556#endif
2557#ifdef USE_SPECULAR_INTENSITYMAP
2558	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
2559#endif
2560#ifdef USE_TRANSMISSIONMAP
2561	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
2562#endif
2563#ifdef USE_THICKNESSMAP
2564	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
2565#endif`,bz=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
2566	vec4 worldPosition = vec4( transformed, 1.0 );
2567	#ifdef USE_BATCHING
2568		worldPosition = batchingMatrix * worldPosition;
2569	#endif
2570	#ifdef USE_INSTANCING
2571		worldPosition = instanceMatrix * worldPosition;
2572	#endif
2573	worldPosition = modelMatrix * worldPosition;
2574#endif`;const Iz=`varying vec2 vUv;
2575uniform mat3 uvTransform;
2576void main() {
2577	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
2578	gl_Position = vec4( position.xy, 1.0, 1.0 );
2579}`,Pz=`uniform sampler2D t2D;
2580uniform float backgroundIntensity;
2581varying vec2 vUv;
2582void main() {
2583	vec4 texColor = texture2D( t2D, vUv );
2584	#ifdef DECODE_VIDEO_TEXTURE
2585		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 );
2586	#endif
2587	texColor.rgb *= backgroundIntensity;
2588	gl_FragColor = texColor;
2589	#include <tonemapping_fragment>
2590	#include <colorspace_fragment>
2591}`,Bz=`varying vec3 vWorldDirection;
2592#include <common>
2593void main() {
2594	vWorldDirection = transformDirection( position, modelMatrix );
2595	#include <begin_vertex>
2596	#include <project_vertex>
2597	gl_Position.z = gl_Position.w;
2598}`,Dz=`#ifdef ENVMAP_TYPE_CUBE
2599	uniform samplerCube envMap;
2600#elif defined( ENVMAP_TYPE_CUBE_UV )
2601	uniform sampler2D envMap;
2602#endif
2603uniform float flipEnvMap;
2604uniform float backgroundBlurriness;
2605uniform float backgroundIntensity;
2606uniform mat3 backgroundRotation;
2607varying vec3 vWorldDirection;
2608#include <cube_uv_reflection_fragment>
2609void main() {
2610	#ifdef ENVMAP_TYPE_CUBE
2611		vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
2612	#elif defined( ENVMAP_TYPE_CUBE_UV )
2613		vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
2614	#else
2615		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
2616	#endif
2617	texColor.rgb *= backgroundIntensity;
2618	gl_FragColor = texColor;
2619	#include <tonemapping_fragment>
2620	#include <colorspace_fragment>
2621}`,Lz=`varying vec3 vWorldDirection;
2622#include <common>
2623void main() {
2624	vWorldDirection = transformDirection( position, modelMatrix );
2625	#include <begin_vertex>
2626	#include <project_vertex>
2627	gl_Position.z = gl_Position.w;
2628}`,Fz=`uniform samplerCube tCube;
2629uniform float tFlip;
2630uniform float opacity;
2631varying vec3 vWorldDirection;
2632void main() {
2633	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
2634	gl_FragColor = texColor;
2635	gl_FragColor.a *= opacity;
2636	#include <tonemapping_fragment>
2637	#include <colorspace_fragment>
2638}`,Nz=`#include <common>
2639#include <batching_pars_vertex>
2640#include <uv_pars_vertex>
2641#include <displacementmap_pars_vertex>
2642#include <morphtarget_pars_vertex>
2643#include <skinning_pars_vertex>
2644#include <logdepthbuf_pars_vertex>
2645#include <clipping_planes_pars_vertex>
2646varying vec2 vHighPrecisionZW;
2647void main() {
2648	#include <uv_vertex>
2649	#include <batching_vertex>
2650	#include <skinbase_vertex>
2651	#include <morphinstance_vertex>
2652	#ifdef USE_DISPLACEMENTMAP
2653		#include <beginnormal_vertex>
2654		#include <morphnormal_vertex>
2655		#include <skinnormal_vertex>
2656	#endif
2657	#include <begin_vertex>
2658	#include <morphtarget_vertex>
2659	#include <skinning_vertex>
2660	#include <displacementmap_vertex>
2661	#include <project_vertex>
2662	#include <logdepthbuf_vertex>
2663	#include <clipping_planes_vertex>
2664	vHighPrecisionZW = gl_Position.zw;
2665}`,Uz=`#if DEPTH_PACKING == 3200
2666	uniform float opacity;
2667#endif
2668#include <common>
2669#include <packing>
2670#include <uv_pars_fragment>
2671#include <map_pars_fragment>
2672#include <alphamap_pars_fragment>
2673#include <alphatest_pars_fragment>
2674#include <alphahash_pars_fragment>
2675#include <logdepthbuf_pars_fragment>
2676#include <clipping_planes_pars_fragment>
2677varying vec2 vHighPrecisionZW;
2678void main() {
2679	vec4 diffuseColor = vec4( 1.0 );
2680	#include <clipping_planes_fragment>
2681	#if DEPTH_PACKING == 3200
2682		diffuseColor.a = opacity;
2683	#endif
2684	#include <map_fragment>
2685	#include <alphamap_fragment>
2686	#include <alphatest_fragment>
2687	#include <alphahash_fragment>
2688	#include <logdepthbuf_fragment>
2689	float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
2690	#if DEPTH_PACKING == 3200
2691		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
2692	#elif DEPTH_PACKING == 3201
2693		gl_FragColor = packDepthToRGBA( fragCoordZ );
2694	#elif DEPTH_PACKING == 3202
2695		gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
2696	#elif DEPTH_PACKING == 3203
2697		gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
2698	#endif
2699}`,Oz=`#define DISTANCE
2700varying vec3 vWorldPosition;
2701#include <common>
2702#include <batching_pars_vertex>
2703#include <uv_pars_vertex>
2704#include <displacementmap_pars_vertex>
2705#include <morphtarget_pars_vertex>
2706#include <skinning_pars_vertex>
2707#include <clipping_planes_pars_vertex>
2708void main() {
2709	#include <uv_vertex>
2710	#include <batching_vertex>
2711	#include <skinbase_vertex>
2712	#include <morphinstance_vertex>
2713	#ifdef USE_DISPLACEMENTMAP
2714		#include <beginnormal_vertex>
2715		#include <morphnormal_vertex>
2716		#include <skinnormal_vertex>
2717	#endif
2718	#include <begin_vertex>
2719	#include <morphtarget_vertex>
2720	#include <skinning_vertex>
2721	#include <displacementmap_vertex>
2722	#include <project_vertex>
2723	#include <worldpos_vertex>
2724	#include <clipping_planes_vertex>
2725	vWorldPosition = worldPosition.xyz;
2726}`,kz=`#define DISTANCE
2727uniform vec3 referencePosition;
2728uniform float nearDistance;
2729uniform float farDistance;
2730varying vec3 vWorldPosition;
2731#include <common>
2732#include <packing>
2733#include <uv_pars_fragment>
2734#include <map_pars_fragment>
2735#include <alphamap_pars_fragment>
2736#include <alphatest_pars_fragment>
2737#include <alphahash_pars_fragment>
2738#include <clipping_planes_pars_fragment>
2739void main () {
2740	vec4 diffuseColor = vec4( 1.0 );
2741	#include <clipping_planes_fragment>
2742	#include <map_fragment>
2743	#include <alphamap_fragment>
2744	#include <alphatest_fragment>
2745	#include <alphahash_fragment>
2746	float dist = length( vWorldPosition - referencePosition );
2747	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
2748	dist = saturate( dist );
2749	gl_FragColor = packDepthToRGBA( dist );
2750}`,zz=`varying vec3 vWorldDirection;
2751#include <common>
2752void main() {
2753	vWorldDirection = transformDirection( position, modelMatrix );
2754	#include <begin_vertex>
2755	#include <project_vertex>
2756}`,Hz=`uniform sampler2D tEquirect;
2757varying vec3 vWorldDirection;
2758#include <common>
2759void main() {
2760	vec3 direction = normalize( vWorldDirection );
2761	vec2 sampleUV = equirectUv( direction );
2762	gl_FragColor = texture2D( tEquirect, sampleUV );
2763	#include <tonemapping_fragment>
2764	#include <colorspace_fragment>
2765}`,Gz=`uniform float scale;
2766attribute float lineDistance;
2767varying float vLineDistance;
2768#include <common>
2769#include <uv_pars_vertex>
2770#include <color_pars_vertex>
2771#include <fog_pars_vertex>
2772#include <morphtarget_pars_vertex>
2773#include <logdepthbuf_pars_vertex>
2774#include <clipping_planes_pars_vertex>
2775void main() {
2776	vLineDistance = scale * lineDistance;
2777	#include <uv_vertex>
2778	#include <color_vertex>
2779	#include <morphinstance_vertex>
2780	#include <morphcolor_vertex>
2781	#include <begin_vertex>
2782	#include <morphtarget_vertex>
2783	#include <project_vertex>
2784	#include <logdepthbuf_vertex>
2785	#include <clipping_planes_vertex>
2786	#include <fog_vertex>
2787}`,Vz=`uniform vec3 diffuse;
2788uniform float opacity;
2789uniform float dashSize;
2790uniform float totalSize;
2791varying float vLineDistance;
2792#include <common>
2793#include <color_pars_fragment>
2794#include <uv_pars_fragment>
2795#include <map_pars_fragment>
2796#include <fog_pars_fragment>
2797#include <logdepthbuf_pars_fragment>
2798#include <clipping_planes_pars_fragment>
2799void main() {
2800	vec4 diffuseColor = vec4( diffuse, opacity );
2801	#include <clipping_planes_fragment>
2802	if ( mod( vLineDistance, totalSize ) > dashSize ) {
2803		discard;
2804	}
2805	vec3 outgoingLight = vec3( 0.0 );
2806	#include <logdepthbuf_fragment>
2807	#include <map_fragment>
2808	#include <color_fragment>
2809	outgoingLight = diffuseColor.rgb;
2810	#include <opaque_fragment>
2811	#include <tonemapping_fragment>
2812	#include <colorspace_fragment>
2813	#include <fog_fragment>
2814	#include <premultiplied_alpha_fragment>
2815}`,Wz=`#include <common>
2816#include <batching_pars_vertex>
2817#include <uv_pars_vertex>
2818#include <envmap_pars_vertex>
2819#include <color_pars_vertex>
2820#include <fog_pars_vertex>
2821#include <morphtarget_pars_vertex>
2822#include <skinning_pars_vertex>
2823#include <logdepthbuf_pars_vertex>
2824#include <clipping_planes_pars_vertex>
2825void main() {
2826	#include <uv_vertex>
2827	#include <color_vertex>
2828	#include <morphinstance_vertex>
2829	#include <morphcolor_vertex>
2830	#include <batching_vertex>
2831	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
2832		#include <beginnormal_vertex>
2833		#include <morphnormal_vertex>
2834		#include <skinbase_vertex>
2835		#include <skinnormal_vertex>
2836		#include <defaultnormal_vertex>
2837	#endif
2838	#include <begin_vertex>
2839	#include <morphtarget_vertex>
2840	#include <skinning_vertex>
2841	#include <project_vertex>
2842	#include <logdepthbuf_vertex>
2843	#include <clipping_planes_vertex>
2844	#include <worldpos_vertex>
2845	#include <envmap_vertex>
2846	#include <fog_vertex>
2847}`,Xz=`uniform vec3 diffuse;
2848uniform float opacity;
2849#ifndef FLAT_SHADED
2850	varying vec3 vNormal;
2851#endif
2852#include <common>
2853#include <dithering_pars_fragment>
2854#include <color_pars_fragment>
2855#include <uv_pars_fragment>
2856#include <map_pars_fragment>
2857#include <alphamap_pars_fragment>
2858#include <alphatest_pars_fragment>
2859#include <alphahash_pars_fragment>
2860#include <aomap_pars_fragment>
2861#include <lightmap_pars_fragment>
2862#include <envmap_common_pars_fragment>
2863#include <envmap_pars_fragment>
2864#include <fog_pars_fragment>
2865#include <specularmap_pars_fragment>
2866#include <logdepthbuf_pars_fragment>
2867#include <clipping_planes_pars_fragment>
2868void main() {
2869	vec4 diffuseColor = vec4( diffuse, opacity );
2870	#include <clipping_planes_fragment>
2871	#include <logdepthbuf_fragment>
2872	#include <map_fragment>
2873	#include <color_fragment>
2874	#include <alphamap_fragment>
2875	#include <alphatest_fragment>
2876	#include <alphahash_fragment>
2877	#include <specularmap_fragment>
2878	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2879	#ifdef USE_LIGHTMAP
2880		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
2881		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
2882	#else
2883		reflectedLight.indirectDiffuse += vec3( 1.0 );
2884	#endif
2885	#include <aomap_fragment>
2886	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
2887	vec3 outgoingLight = reflectedLight.indirectDiffuse;
2888	#include <envmap_fragment>
2889	#include <opaque_fragment>
2890	#include <tonemapping_fragment>
2891	#include <colorspace_fragment>
2892	#include <fog_fragment>
2893	#include <premultiplied_alpha_fragment>
2894	#include <dithering_fragment>
2895}`,jz=`#define LAMBERT
2896varying vec3 vViewPosition;
2897#include <common>
2898#include <batching_pars_vertex>
2899#include <uv_pars_vertex>
2900#include <displacementmap_pars_vertex>
2901#include <envmap_pars_vertex>
2902#include <color_pars_vertex>
2903#include <fog_pars_vertex>
2904#include <normal_pars_vertex>
2905#include <morphtarget_pars_vertex>
2906#include <skinning_pars_vertex>
2907#include <shadowmap_pars_vertex>
2908#include <logdepthbuf_pars_vertex>
2909#include <clipping_planes_pars_vertex>
2910void main() {
2911	#include <uv_vertex>
2912	#include <color_vertex>
2913	#include <morphinstance_vertex>
2914	#include <morphcolor_vertex>
2915	#include <batching_vertex>
2916	#include <beginnormal_vertex>
2917	#include <morphnormal_vertex>
2918	#include <skinbase_vertex>
2919	#include <skinnormal_vertex>
2920	#include <defaultnormal_vertex>
2921	#include <normal_vertex>
2922	#include <begin_vertex>
2923	#include <morphtarget_vertex>
2924	#include <skinning_vertex>
2925	#include <displacementmap_vertex>
2926	#include <project_vertex>
2927	#include <logdepthbuf_vertex>
2928	#include <clipping_planes_vertex>
2929	vViewPosition = - mvPosition.xyz;
2930	#include <worldpos_vertex>
2931	#include <envmap_vertex>
2932	#include <shadowmap_vertex>
2933	#include <fog_vertex>
2934}`,Jz=`#define LAMBERT
2935uniform vec3 diffuse;
2936uniform vec3 emissive;
2937uniform float opacity;
2938#include <common>
2939#include <packing>
2940#include <dithering_pars_fragment>
2941#include <color_pars_fragment>
2942#include <uv_pars_fragment>
2943#include <map_pars_fragment>
2944#include <alphamap_pars_fragment>
2945#include <alphatest_pars_fragment>
2946#include <alphahash_pars_fragment>
2947#include <aomap_pars_fragment>
2948#include <lightmap_pars_fragment>
2949#include <emissivemap_pars_fragment>
2950#include <envmap_common_pars_fragment>
2951#include <envmap_pars_fragment>
2952#include <fog_pars_fragment>
2953#include <bsdfs>
2954#include <lights_pars_begin>
2955#include <normal_pars_fragment>
2956#include <lights_lambert_pars_fragment>
2957#include <shadowmap_pars_fragment>
2958#include <bumpmap_pars_fragment>
2959#include <normalmap_pars_fragment>
2960#include <specularmap_pars_fragment>
2961#include <logdepthbuf_pars_fragment>
2962#include <clipping_planes_pars_fragment>
2963void main() {
2964	vec4 diffuseColor = vec4( diffuse, opacity );
2965	#include <clipping_planes_fragment>
2966	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2967	vec3 totalEmissiveRadiance = emissive;
2968	#include <logdepthbuf_fragment>
2969	#include <map_fragment>
2970	#include <color_fragment>
2971	#include <alphamap_fragment>
2972	#include <alphatest_fragment>
2973	#include <alphahash_fragment>
2974	#include <specularmap_fragment>
2975	#include <normal_fragment_begin>
2976	#include <normal_fragment_maps>
2977	#include <emissivemap_fragment>
2978	#include <lights_lambert_fragment>
2979	#include <lights_fragment_begin>
2980	#include <lights_fragment_maps>
2981	#include <lights_fragment_end>
2982	#include <aomap_fragment>
2983	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
2984	#include <envmap_fragment>
2985	#include <opaque_fragment>
2986	#include <tonemapping_fragment>
2987	#include <colorspace_fragment>
2988	#include <fog_fragment>
2989	#include <premultiplied_alpha_fragment>
2990	#include <dithering_fragment>
2991}`,Yz=`#define MATCAP
2992varying vec3 vViewPosition;
2993#include <common>
2994#include <batching_pars_vertex>
2995#include <uv_pars_vertex>
2996#include <color_pars_vertex>
2997#include <displacementmap_pars_vertex>
2998#include <fog_pars_vertex>
2999#include <normal_pars_vertex>
3000#include <morphtarget_pars_vertex>
3001#include <skinning_pars_vertex>
3002#include <logdepthbuf_pars_vertex>
3003#include <clipping_planes_pars_vertex>
3004void main() {
3005	#include <uv_vertex>
3006	#include <color_vertex>
3007	#include <morphinstance_vertex>
3008	#include <morphcolor_vertex>
3009	#include <batching_vertex>
3010	#include <beginnormal_vertex>
3011	#include <morphnormal_vertex>
3012	#include <skinbase_vertex>
3013	#include <skinnormal_vertex>
3014	#include <defaultnormal_vertex>
3015	#include <normal_vertex>
3016	#include <begin_vertex>
3017	#include <morphtarget_vertex>
3018	#include <skinning_vertex>
3019	#include <displacementmap_vertex>
3020	#include <project_vertex>
3021	#include <logdepthbuf_vertex>
3022	#include <clipping_planes_vertex>
3023	#include <fog_vertex>
3024	vViewPosition = - mvPosition.xyz;
3025}`,Kz=`#define MATCAP
3026uniform vec3 diffuse;
3027uniform float opacity;
3028uniform sampler2D matcap;
3029varying vec3 vViewPosition;
3030#include <common>
3031#include <dithering_pars_fragment>
3032#include <color_pars_fragment>
3033#include <uv_pars_fragment>
3034#include <map_pars_fragment>
3035#include <alphamap_pars_fragment>
3036#include <alphatest_pars_fragment>
3037#include <alphahash_pars_fragment>
3038#include <fog_pars_fragment>
3039#include <normal_pars_fragment>
3040#include <bumpmap_pars_fragment>
3041#include <normalmap_pars_fragment>
3042#include <logdepthbuf_pars_fragment>
3043#include <clipping_planes_pars_fragment>
3044void main() {
3045	ve
3045c4 diffuseColor = vec4( diffuse, opacity );
3046	#include <clipping_planes_fragment>
3047	#include <logdepthbuf_fragment>
3048	#include <map_fragment>
3049	#include <color_fragment>
3050	#include <alphamap_fragment>
3051	#include <alphatest_fragment>
3052	#include <alphahash_fragment>
3053	#include <normal_fragment_begin>
3054	#include <normal_fragment_maps>
3055	vec3 viewDir = normalize( vViewPosition );
3056	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
3057	vec3 y = cross( viewDir, x );
3058	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
3059	#ifdef USE_MATCAP
3060		vec4 matcapColor = texture2D( matcap, uv );
3061	#else
3062		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
3063	#endif
3064	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
3065	#include <opaque_fragment>
3066	#include <tonemapping_fragment>
3067	#include <colorspace_fragment>
3068	#include <fog_fragment>
3069	#include <premultiplied_alpha_fragment>
3070	#include <dithering_fragment>
3071}`,Qz=`#define NORMAL
3072#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3073	varying vec3 vViewPosition;
3074#endif
3075#include <common>
3076#include <batching_pars_vertex>
3077#include <uv_pars_vertex>
3078#include <displacementmap_pars_vertex>
3079#include <normal_pars_vertex>
3080#include <morphtarget_pars_vertex>
3081#include <skinning_pars_vertex>
3082#include <logdepthbuf_pars_vertex>
3083#include <clipping_planes_pars_vertex>
3084void main() {
3085	#include <uv_vertex>
3086	#include <batching_vertex>
3087	#include <beginnormal_vertex>
3088	#include <morphinstance_vertex>
3089	#include <morphnormal_vertex>
3090	#include <skinbase_vertex>
3091	#include <skinnormal_vertex>
3092	#include <defaultnormal_vertex>
3093	#include <normal_vertex>
3094	#include <begin_vertex>
3095	#include <morphtarget_vertex>
3096	#include <skinning_vertex>
3097	#include <displacementmap_vertex>
3098	#include <project_vertex>
3099	#include <logdepthbuf_vertex>
3100	#include <clipping_planes_vertex>
3101#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3102	vViewPosition = - mvPosition.xyz;
3103#endif
3104}`,Zz=`#define NORMAL
3105uniform float opacity;
3106#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3107	varying vec3 vViewPosition;
3108#endif
3109#include <packing>
3110#include <uv_pars_fragment>
3111#include <normal_pars_fragment>
3112#include <bumpmap_pars_fragment>
3113#include <normalmap_pars_fragment>
3114#include <logdepthbuf_pars_fragment>
3115#include <clipping_planes_pars_fragment>
3116void main() {
3117	vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
3118	#include <clipping_planes_fragment>
3119	#include <logdepthbuf_fragment>
3120	#include <normal_fragment_begin>
3121	#include <normal_fragment_maps>
3122	gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
3123	#ifdef OPAQUE
3124		gl_FragColor.a = 1.0;
3125	#endif
3126}`,qz=`#define PHONG
3127varying vec3 vViewPosition;
3128#include <common>
3129#include <batching_pars_vertex>
3130#include <uv_pars_vertex>
3131#include <displacementmap_pars_vertex>
3132#include <envmap_pars_vertex>
3133#include <color_pars_vertex>
3134#include <fog_pars_vertex>
3135#include <normal_pars_vertex>
3136#include <morphtarget_pars_vertex>
3137#include <skinning_pars_vertex>
3138#include <shadowmap_pars_vertex>
3139#include <logdepthbuf_pars_vertex>
3140#include <clipping_planes_pars_vertex>
3141void main() {
3142	#include <uv_vertex>
3143	#include <color_vertex>
3144	#include <morphcolor_vertex>
3145	#include <batching_vertex>
3146	#include <beginnormal_vertex>
3147	#include <morphinstance_vertex>
3148	#include <morphnormal_vertex>
3149	#include <skinbase_vertex>
3150	#include <skinnormal_vertex>
3151	#include <defaultnormal_vertex>
3152	#include <normal_vertex>
3153	#include <begin_vertex>
3154	#include <morphtarget_vertex>
3155	#include <skinning_vertex>
3156	#include <displacementmap_vertex>
3157	#include <project_vertex>
3158	#include <logdepthbuf_vertex>
3159	#include <clipping_planes_vertex>
3160	vViewPosition = - mvPosition.xyz;
3161	#include <worldpos_vertex>
3162	#include <envmap_vertex>
3163	#include <shadowmap_vertex>
3164	#include <fog_vertex>
3165}`,$z=`#define PHONG
3166uniform vec3 diffuse;
3167uniform vec3 emissive;
3168uniform vec3 specular;
3169uniform float shininess;
3170uniform float opacity;
3171#include <common>
3172#include <packing>
3173#include <dithering_pars_fragment>
3174#include <color_pars_fragment>
3175#include <uv_pars_fragment>
3176#include <map_pars_fragment>
3177#include <alphamap_pars_fragment>
3178#include <alphatest_pars_fragment>
3179#include <alphahash_pars_fragment>
3180#include <aomap_pars_fragment>
3181#include <lightmap_pars_fragment>
3182#include <emissivemap_pars_fragment>
3183#include <envmap_common_pars_fragment>
3184#include <envmap_pars_fragment>
3185#include <fog_pars_fragment>
3186#include <bsdfs>
3187#include <lights_pars_begin>
3188#include <normal_pars_fragment>
3189#include <lights_phong_pars_fragment>
3190#include <shadowmap_pars_fragment>
3191#include <bumpmap_pars_fragment>
3192#include <normalmap_pars_fragment>
3193#include <specularmap_pars_fragment>
3194#include <logdepthbuf_pars_fragment>
3195#include <clipping_planes_pars_fragment>
3196void main() {
3197	vec4 diffuseColor = vec4( diffuse, opacity );
3198	#include <clipping_planes_fragment>
3199	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3200	vec3 totalEmissiveRadiance = emissive;
3201	#include <logdepthbuf_fragment>
3202	#include <map_fragment>
3203	#include <color_fragment>
3204	#include <alphamap_fragment>
3205	#include <alphatest_fragment>
3206	#include <alphahash_fragment>
3207	#include <specularmap_fragment>
3208	#include <normal_fragment_begin>
3209	#include <normal_fragment_maps>
3210	#include <emissivemap_fragment>
3211	#include <lights_phong_fragment>
3212	#include <lights_fragment_begin>
3213	#include <lights_fragment_maps>
3214	#include <lights_fragment_end>
3215	#include <aomap_fragment>
3216	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
3217	#include <envmap_fragment>
3218	#include <opaque_fragment>
3219	#include <tonemapping_fragment>
3220	#include <colorspace_fragment>
3221	#include <fog_fragment>
3222	#include <premultiplied_alpha_fragment>
3223	#include <dithering_fragment>
3224}`,e4=`#define STANDARD
3225varying vec3 vViewPosition;
3226#ifdef USE_TRANSMISSION
3227	varying vec3 vWorldPosition;
3228#endif
3229#include <common>
3230#include <batching_pars_vertex>
3231#include <uv_pars_vertex>
3232#include <displacementmap_pars_vertex>
3233#include <color_pars_vertex>
3234#include <fog_pars_vertex>
3235#include <normal_pars_vertex>
3236#include <morphtarget_pars_vertex>
3237#include <skinning_pars_vertex>
3238#include <shadowmap_pars_vertex>
3239#include <logdepthbuf_pars_vertex>
3240#include <clipping_planes_pars_vertex>
3241void main() {
3242	#include <uv_vertex>
3243	#include <color_vertex>
3244	#include <morphinstance_vertex>
3245	#include <morphcolor_vertex>
3246	#include <batching_vertex>
3247	#include <beginnormal_vertex>
3248	#include <morphnormal_vertex>
3249	#include <skinbase_vertex>
3250	#include <skinnormal_vertex>
3251	#include <defaultnormal_vertex>
3252	#include <normal_vertex>
3253	#include <begin_vertex>
3254	#include <morphtarget_vertex>
3255	#include <skinning_vertex>
3256	#include <displacementmap_vertex>
3257	#include <project_vertex>
3258	#include <logdepthbuf_vertex>
3259	#include <clipping_planes_vertex>
3260	vViewPosition = - mvPosition.xyz;
3261	#include <worldpos_vertex>
3262	#include <shadowmap_vertex>
3263	#include <fog_vertex>
3264#ifdef USE_TRANSMISSION
3265	vWorldPosition = worldPosition.xyz;
3266#endif
3267}`,t4=`#define STANDARD
3268#ifdef PHYSICAL
3269	#define IOR
3270	#define USE_SPECULAR
3271#endif
3272uniform vec3 diffuse;
3273uniform vec3 emissive;
3274uniform float roughness;
3275uniform float metalness;
3276uniform float opacity;
3277#ifdef IOR
3278	uniform float ior;
3279#endif
3280#ifdef USE_SPECULAR
3281	uniform float specularIntensity;
3282	uniform vec3 specularColor;
3283	#ifdef USE_SPECULAR_COLORMAP
3284		uniform sampler2D specularColorMap;
3285	#endif
3286	#ifdef USE_SPECULAR_INTENSITYMAP
3287		uniform sampler2D specularIntensityMap;
3288	#endif
3289#endif
3290#ifdef USE_CLEARCOAT
3291	uniform float clearcoat;
3292	uniform float clearcoatRoughness;
3293#endif
3294#ifdef USE_DISPERSION
3295	uniform float dispersion;
3296#endif
3297#ifdef USE_IRIDESCENCE
3298	uniform float iridescence;
3299	uniform float iridescenceIOR;
3300	uniform float iridescenceThicknessMinimum;
3301	uniform float iridescenceThicknessMaximum;
3302#endif
3303#ifdef USE_SHEEN
3304	uniform vec3 sheenColor;
3305	uniform float sheenRoughness;
3306	#ifdef USE_SHEEN_COLORMAP
3307		uniform sampler2D sheenColorMap;
3308	#endif
3309	#ifdef USE_SHEEN_ROUGHNESSMAP
3310		uniform sampler2D sheenRoughnessMap;
3311	#endif
3312#endif
3313#ifdef USE_ANISOTROPY
3314	uniform vec2 anisotropyVector;
3315	#ifdef USE_ANISOTROPYMAP
3316		uniform sampler2D anisotropyMap;
3317	#endif
3318#endif
3319varying vec3 vViewPosition;
3320#include <common>
3321#include <packing>
3322#include <dithering_pars_fragment>
3323#include <color_pars_fragment>
3324#include <uv_pars_fragment>
3325#include <map_pars_fragment>
3326#include <alphamap_pars_fragment>
3327#include <alphatest_pars_fragment>
3328#include <alphahash_pars_fragment>
3329#include <aomap_pars_fragment>
3330#include <lightmap_pars_fragment>
3331#include <emissivemap_pars_fragment>
3332#include <iridescence_fragment>
3333#include <cube_uv_reflection_fragment>
3334#include <envmap_common_pars_fragment>
3335#include <envmap_physical_pars_fragment>
3336#include <fog_pars_fragment>
3337#include <lights_pars_begin>
3338#include <normal_pars_fragment>
3339#include <lights_physical_pars_fragment>
3340#include <transmission_pars_fragment>
3341#include <shadowmap_pars_fragment>
3342#include <bumpmap_pars_fragment>
3343#include <normalmap_pars_fragment>
3344#include <clearcoat_pars_fragment>
3345#include <iridescence_pars_fragment>
3346#include <roughnessmap_pars_fragment>
3347#include <metalnessmap_pars_fragment>
3348#include <logdepthbuf_pars_fragment>
3349#include <clipping_planes_pars_fragment>
3350void main() {
3351	vec4 diffuseColor = vec4( diffuse, opacity );
3352	#include <clipping_planes_fragment>
3353	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3354	vec3 totalEmissiveRadiance = emissive;
3355	#include <logdepthbuf_fragment>
3356	#include <map_fragment>
3357	#include <color_fragment>
3358	#include <alphamap_fragment>
3359	#include <alphatest_fragment>
3360	#include <alphahash_fragment>
3361	#include <roughnessmap_fragment>
3362	#include <metalnessmap_fragment>
3363	#include <normal_fragment_begin>
3364	#include <normal_fragment_maps>
3365	#include <clearcoat_normal_fragment_begin>
3366	#include <clearcoat_normal_fragment_maps>
3367	#include <emissivemap_fragment>
3368	#include <lights_physical_fragment>
3369	#include <lights_fragment_begin>
3370	#include <lights_fragment_maps>
3371	#include <lights_fragment_end>
3372	#include <aomap_fragment>
3373	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
3374	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
3375	#include <transmission_fragment>
3376	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
3377	#ifdef USE_SHEEN
3378		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
3379		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
3380	#endif
3381	#ifdef USE_CLEARCOAT
3382		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
3383		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
3384		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
3385	#endif
3386	#include <opaque_fragment>
3387	#include <tonemapping_fragment>
3388	#include <colorspace_fragment>
3389	#include <fog_fragment>
3390	#include <premultiplied_alpha_fragment>
3391	#include <dithering_fragment>
3392}`,n4=`#define TOON
3393varying vec3 vViewPosition;
3394#include <common>
3395#include <batching_pars_vertex>
3396#include <uv_pars_vertex>
3397#include <displacementmap_pars_vertex>
3398#include <color_pars_vertex>
3399#include <fog_pars_vertex>
3400#include <normal_pars_vertex>
3401#include <morphtarget_pars_vertex>
3402#include <skinning_pars_vertex>
3403#include <shadowmap_pars_vertex>
3404#include <logdepthbuf_pars_vertex>
3405#include <clipping_planes_pars_vertex>
3406void main() {
3407	#include <uv_vertex>
3408	#include <color_vertex>
3409	#include <morphinstance_vertex>
3410	#include <morphcolor_vertex>
3411	#include <batching_vertex>
3412	#include <beginnormal_vertex>
3413	#include <morphnormal_vertex>
3414	#include <skinbase_vertex>
3415	#include <skinnormal_vertex>
3416	#include <defaultnormal_vertex>
3417	#include <normal_vertex>
3418	#include <begin_vertex>
3419	#include <morphtarget_vertex>
3420	#include <skinning_vertex>
3421	#include <displacementmap_vertex>
3422	#include <project_vertex>
3423	#include <logdepthbuf_vertex>
3424	#include <clipping_planes_vertex>
3425	vViewPosition = - mvPosition.xyz;
3426	#include <worldpos_vertex>
3427	#include <shadowmap_vertex>
3428	#include <fog_vertex>
3429}`,i4=`#define TOON
3430uniform vec3 diffuse;
3431uniform vec3 emissive;
3432uniform float opacity;
3433#include <common>
3434#include <packing>
3435#include <dithering_pars_fragment>
3436#include <color_pars_fragment>
3437#include <uv_pars_fragment>
3438#include <map_pars_fragment>
3439#include <alphamap_pars_fragment>
3440#include <alphatest_pars_fragment>
3441#include <alphahash_pars_fragment>
3442#include <aomap_pars_fragment>
3443#include <lightmap_pars_fragment>
3444#include <emissivemap_pars_fragment>
3445#include <gradientmap_pars_fragment>
3446#include <fog_pars_fragment>
3447#include <bsdfs>
3448#include <lights_pars_begin>
3449#include <normal_pars_fragment>
3450#include <lights_toon_pars_fragment>
3451#include <shadowmap_pars_fragment>
3452#include <bumpmap_pars_fragment>
3453#include <normalmap_pars_fragment>
3454#include <logdepthbuf_pars_fragment>
3455#include <clipping_planes_pars_fragment>
3456void main() {
3457	vec4 diffuseColor = vec4( diffuse, opacity );
3458	#include <clipping_planes_fragment>
3459	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3460	vec3 totalEmissiveRadiance = emissive;
3461	#include <logdepthbuf_fragment>
3462	#include <map_fragment>
3463	#include <color_fragment>
3464	#include <alphamap_fragment>
3465	#include <alphatest_fragment>
3466	#include <alphahash_fragment>
3467	#include <normal_fragment_begin>
3468	#include <normal_fragment_maps>
3469	#include <emissivemap_fragment>
3470	#include <lights_toon_fragment>
3471	#include <lights_fragment_begin>
3472	#include <lights_fragment_maps>
3473	#include <lights_fragment_end>
3474	#include <aomap_fragment>
3475	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3476	#include <opaque_fragment>
3477	#include <tonemapping_fragment>
3478	#include <colorspace_fragment>
3479	#include <fog_fragment>
3480	#include <premultiplied_alpha_fragment>
3481	#include <dithering_fragment>
3482}`,r4=`uniform float size;
3483uniform float scale;
3484#include <common>
3485#include <color_pars_vertex>
3486#include <fog_pars_vertex>
3487#include <morphtarget_pars_vertex>
3488#include <logdepthbuf_pars_vertex>
3489#include <clipping_planes_pars_vertex>
3490#ifdef USE_POINTS_UV
3491	varying vec2 vUv;
3492	uniform mat3 uvTransform;
3493#endif
3494void main() {
3495	#ifdef USE_POINTS_UV
3496		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
3497	#endif
3498	#include <color_vertex>
3499	#include <morphinstance_vertex>
3500	#include <morphcolor_vertex>
3501	#include <begin_vertex>
3502	#include <morphtarget_vertex>
3503	#include <project_vertex>
3504	gl_PointSize = size;
3505	#ifdef USE_SIZEATTENUATION
3506		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3507		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
3508	#endif
3509	#include <logdepthbuf_vertex>
3510	#include <clipping_planes_vertex>
3511	#include <worldpos_vertex>
3512	#include <fog_vertex>
3513}`,s4=`uniform vec3 diffuse;
3514uniform float opacity;
3515#include <common>
3516#include <color_pars_fragment>
3517#include <map_particle_pars_fragment>
3518#include <alphatest_pars_fragment>
3519#include <alphahash_pars_fragment>
3520#include <fog_pars_fragment>
3521#include <logdepthbuf_pars_fragment>
3522#include <clipping_planes_pars_fragment>
3523void main() {
3524	vec4 diffuseColor = vec4( diffuse, opacity );
3525	#include <clipping_planes_fragment>
3526	vec3 outgoingLight = vec3( 0.0 );
3527	#include <logdepthbuf_fragment>
3528	#include <map_particle_fragment>
3529	#include <color_fragment>
3530	#include <alphatest_fragment>
3531	#include <alphahash_fragment>
3532	outgoingLight = diffuseColor.rgb;
3533	#include <opaque_fragment>
3534	#include <tonemapping_fragment>
3535	#include <colorspace_fragment>
3536	#include <fog_fragment>
3537	#include <premultiplied_alpha_fragment>
3538}`,o4=`#include <common>
3539#include <batching_pars_vertex>
3540#include <fog_pars_vertex>
3541#include <morphtarget_pars_vertex>
3542#include <skinning_pars_vertex>
3543#include <logdepthbuf_pars_vertex>
3544#include <shadowmap_pars_vertex>
3545void main() {
3546	#include <batching_vertex>
3547	#include <beginnormal_vertex>
3548	#include <morphinstance_vertex>
3549	#include <morphnormal_vertex>
3550	#include <skinbase_vertex>
3551	#include <skinnormal_vertex>
3552	#include <defaultnormal_vertex>
3553	#include <begin_vertex>
3554	#include <morphtarget_vertex>
3555	#include <skinning_vertex>
3556	#include <project_vertex>
3557	#include <logdepthbuf_vertex>
3558	#include <worldpos_vertex>
3559	#include <shadowmap_vertex>
3560	#include <fog_vertex>
3561}`,a4=`uniform vec3 color;
3562uniform float opacity;
3563#include <common>
3564#include <packing>
3565#include <fog_pars_fragment>
3566#include <bsdfs>
3567#include <lights_pars_begin>
3568#include <logdepthbuf_pars_fragment>
3569#include <shadowmap_pars_fragment>
3570#include <shadowmask_pars_fragment>
3571void main() {
3572	#include <logdepthbuf_fragment>
3573	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
3574	#include <tonemapping_fragment>
3575	#include <colorspace_fragment>
3576	#include <fog_fragment>
3577}`,l4=`uniform float rotation;
3578uniform vec2 center;
3579#include <common>
3580#include <uv_pars_vertex>
3581#include <fog_pars_vertex>
3582#include <logdepthbuf_pars_vertex>
3583#include <clipping_planes_pars_vertex>
3584void main() {
3585	#include <uv_vertex>
3586	vec4 mvPosition = modelViewMatrix[ 3 ];
3587	vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
3588	#ifndef USE_SIZEATTENUATION
3589		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3590		if ( isPerspective ) scale *= - mvPosition.z;
3591	#endif
3592	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
3593	vec2 rotatedPosition;
3594	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3595	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3596	mvPosition.xy += rotatedPosition;
3597	gl_Position = projectionMatrix * mvPosition;
3598	#include <logdepthbuf_vertex>
3599	#include <clipping_planes_vertex>
3600	#include <fog_vertex>
3601}`,c4=`uniform vec3 diffuse;
3602uniform float opacity;
3603#include <common>
3604#include <uv_pars_fragment>
3605#include <map_pars_fragment>
3606#include <alphamap_pars_fragment>
3607#include <alphatest_pars_fragment>
3608#include <alphahash_pars_fragment>
3609#include <fog_pars_fragment>
3610#include <logdepthbuf_pars_fragment>
3611#include <clipping_planes_pars_fragment>
3612void main() {
3613	vec4 diffuseColor = vec4( diffuse, opacity );
3614	#include <clipping_planes_fragment>
3615	vec3 outgoingLight = vec3( 0.0 );
3616	#include <logdepthbuf_fragment>
3617	#include <map_fragment>
3618	#include <alphamap_fragment>
3619	#include <alphatest_fragment>
3620	#include <alphahash_fragment>
3621	outgoingLight = diffuseColor.rgb;
3622	#include <opaque_fragment>
3623	#include <tonemapping_fragment>
3624	#include <colorspace_fragment>
3625	#include <fog_fragment>
3626}`,Bt={alphahash_fragment:PO,alphahash_pars_fragment:BO,alphamap_fragment:DO,alphamap_pars_fragment:LO,alphatest_fragment:FO,alphatest_pars_fragment:NO,aomap_fragment:UO,aomap_pars_fragment:OO,batching_pars_vertex:kO,batching_vertex:zO,begin_vertex:HO,beginnormal_vertex:GO,bsdfs:VO,iridescence_fragment:WO,bumpmap_pars_fragment:XO,clipping_planes_fragment:jO,clipping_planes_pars_fragment:JO,clipping_planes_pars_vertex:YO,clipping_planes_vertex:KO,color_fragment:QO,color_pars_fragment:ZO,color_pars_vertex:qO,color_vertex:$O,common:ek,cube_uv_reflection_fragment:tk,defaultnormal_vertex:nk,displacementmap_pars_vertex:ik,displacementmap_vertex:rk,emissivemap_fragment:sk,emissivemap_pars_fragment:ok,colorspace_fragment:ak,colorspace_pars_fragment:lk,envmap_fragment:ck,envmap_common_pars_fragment:uk,envmap_pars_fragment:fk,envmap_pars_vertex:hk,envmap_physical_pars_fragment:Mk,envmap_vertex:dk,fog_vertex:pk,fog_pars_vertex:mk,fog_fragment:gk,fog_pars_fragment:vk,gradientmap_pars_fragment:yk,lightmap_pars_fragment:xk,lights_lambert_fragment:_k,lights_lambert_pars_fragment:Sk,lights_pars_begin:Ak,lights_toon_fragment:Ek,lights_toon_pars_fragment:wk,lights_phong_fragment:Tk,lights_phong_pars_fragment:Ck,lights_physical_fragment:Rk,lights_physical_pars_fragment:bk,lights_fragment_begin:Ik,lights_fragment_maps:Pk,lights_fragment_end:Bk,logdepthbuf_fragment:Dk,logdepthbuf_pars_fragment:Lk,logdepthbuf_pars_vertex:Fk,logdepthbuf_vertex:Nk,map_fragment:Uk,map_pars_fragment:Ok,map_particle_fragment:kk,map_particle_pars_fragment:zk,metalnessmap_fragment:Hk,metalnessmap_pars_fragment:Gk,morphinstance_vertex:Vk,morphcolor_vertex:Wk,morphnormal_vertex:Xk,morphtarget_pars_vertex:jk,morphtarget_vertex:Jk,normal_fragment_begin:Yk,normal_fragment_maps:Kk,normal_pars_fragment:Qk,normal_pars_vertex:Zk,normal_vertex:qk,normalmap_pars_fragment:$k,clearcoat_normal_fragment_begin:ez,clearcoat_normal_fragment_maps:tz,clearcoat_pars_fragment:nz,iridescence_pars_fragment:iz,opaque_fragment:rz,packing:sz,premultiplied_alpha_fragment:oz,project_vertex:az,dithering_fragment:lz,dithering_pars_fragment:cz,roughnessmap_fragment:uz,roughnessmap_pars_fragment:fz,shadowmap_pars_fragment:hz,shadowmap_pars_vertex:dz,shadowmap_vertex:pz,shadowmask_pars_fragment:mz,skinbase_vertex:gz,skinning_pars_vertex:vz,skinning_vertex:yz,skinnormal_vertex:xz,specularmap_fragment:_z,specularmap_pars_fragment:Sz,tonemapping_fragment:Az,tonemapping_pars_fragment:Mz,transmission_fragment:Ez,transmission_pars_fragment:wz,uv_pars_fragment:Tz,uv_pars_vertex:Cz,uv_vertex:Rz,worldpos_vertex:bz,background_vert:Iz,background_frag:Pz,backgroundCube_vert:Bz,backgroundCube_frag:Dz,cube_vert:Lz,cube_frag:Fz,depth_vert:Nz,depth_frag:Uz,distanceRGBA_vert:Oz,distanceRGBA_frag:kz,equirect_vert:zz,equirect_frag:Hz,linedashed_vert:Gz,linedashed_frag:Vz,meshbasic_vert:Wz,meshbasic_frag:Xz,meshlambert_vert:jz,meshlambert_frag:Jz,meshmatcap_vert:Yz,meshmatcap_frag:Kz,meshnormal_vert:Qz,meshnormal_frag:Zz,meshphong_vert:qz,meshphong_frag:$z,meshphysical_vert:e4,meshphysical_frag:t4,meshtoon_vert:n4,meshtoon_frag:i4,points_vert:r4,points_frag:s4,shadow_vert:o4,shadow_frag:a4,sprite_vert:l4,sprite_frag:c4},tt={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ut}},envmap:{envMap:{value:null},envMapRotation:{value:new Ut},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ut}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ut}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ut},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ut},normalScale:{value:new _e(1,1)}}
vendor: 6,758 bytes, line 3626
3626,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ut},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ut}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ut}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ut}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0},uvTransform:{value:new Ut}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new _e(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}}},Os={basic:{uniforms:$i([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.fog]),vertexShader:Bt.meshbasic_vert,fragmentShader:Bt.meshbasic_frag},lambert:{uniforms:$i([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,tt.lights,{emissive:{value:new qe(0)}}]),vertexShader:Bt.meshlambert_vert,fragmentShader:Bt.meshlambert_frag},phong:{uniforms:$i([tt.common,tt.specularmap,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,tt.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:Bt.meshphong_vert,fragmentShader:Bt.meshphong_frag},standard:{uniforms:$i([tt.common,tt.envmap,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.roughnessmap,tt.metalnessmap,tt.fog,tt.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Bt.meshphysical_vert,fragmentShader:Bt.meshphysical_frag},toon:{uniforms:$i([tt.common,tt.aomap,tt.lightmap,tt.emissivemap,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.gradientmap,tt.fog,tt.lights,{emissive:{value:new qe(0)}}]),vertexShader:Bt.meshtoon_vert,fragmentShader:Bt.meshtoon_frag},matcap:{uniforms:$i([tt.common,tt.bumpmap,tt.normalmap,tt.displacementmap,tt.fog,{matcap:{value:null}}]),vertexShader:Bt.meshmatcap_vert,fragmentShader:Bt.meshmatcap_frag},points:{uniforms:$i([tt.points,tt.fog]),vertexShader:Bt.points_vert,fragmentShader:Bt.points_frag},dashed:{uniforms:$i([tt.common,tt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Bt.linedashed_vert,fragmentShader:Bt.linedashed_frag},depth:{uniforms:$i([tt.common,tt.displacementmap]),vertexShader:Bt.depth_vert,fragmentShader:Bt.depth_frag},normal:{uniforms:$i([tt.common,tt.bumpmap,tt.normalmap,tt.displacementmap,{opacity:{value:1}}]),vertexShader:Bt.meshnormal_vert,fragmentShader:Bt.meshnormal_frag},sprite:{uniforms:$i([tt.sprite,tt.fog]),vertexShader:Bt.sprite_vert,fragmentShader:Bt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ut},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Bt.background_vert,fragmentShader:Bt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ut}},vertexShader:Bt.backgroundCube_vert,fragmentShader:Bt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Bt.cube_vert,fragmentShader:Bt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Bt.equirect_vert,fragmentShader:Bt.equirect_frag},distanceRGBA:{uniforms:$i([tt.common,tt.displacementmap,{referencePosition:{value:new G},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Bt.distanceRGBA_vert,fragmentShader:Bt.distanceRGBA_frag},shadow:{uniforms:$i([tt.lights,tt.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:Bt.shadow_vert,fragmentShader:Bt.shadow_frag}};Os.physical={uniforms:$i([Os.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ut},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ut},clearcoatNormalScale:{value:new _e(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ut},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ut},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ut},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ut},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ut},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ut},transmissionSamplerSize:{value:new _e},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ut},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ut},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ut},anisotropyVector:{value:new _e},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ut}}]),vertexShader:Bt.meshphysical_vert,fragmentShader:Bt.meshphysical_frag};const km={r:0,b:0,g:0}
vendor: 12,150 bytes, line 3626
3626,El=new jr,u4=new ct;function f4(n,e,t,i,r,s,o){const a=new qe(0);let l=s===!0?0:1,c,f,d=null,p=0,m=null;function v(S){let A=S.isScene===!0?S.background:null;return A&&A.isTexture&&(A=(S.backgroundBlurriness>0?t:e).get(A)),A}function _(S){let A=!1;const E=v(S);E===null?g(a,l):E&&E.isColor&&(g(E,1),A=!0);const I=n.xr.getEnvironmentBlendMode();I==="additive"?i.buffers.color.setClear(0,0,0,1,o):I==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||A)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function x(S,A){const E=v(A);E&&(E.isCubeTexture||E.mapping===Mf)?(f===void 0&&(f=new yn(new Ic(1,1,1),new nn({name:"BackgroundCubeMaterial",uniforms:ff(Os.backgroundCube.uniforms),vertexShader:Os.backgroundCube.vertexShader,fragmentShader:Os.backgroundCube.fragmentShader,side:ai,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),f.geometry.deleteAttribute("uv"),f.onBeforeRender=function(I,b,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(f.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(f)),El.copy(A.backgroundRotation),El.x*=-1,El.y*=-1,El.z*=-1,E.isCubeTexture&&E.isRenderTargetTexture===!1&&(El.y*=-1,El.z*=-1),f.material.uniforms.envMap.value=E,f.material.uniforms.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,f.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,f.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,f.material.uniforms.backgroundRotation.value.setFromMatrix4(u4.makeRotationFromEuler(El)),f.material.toneMapped=cn.getTransfer(E.colorSpace)!==_n,(d!==E||p!==E.version||m!==n.toneMapping)&&(f.material.needsUpdate=!0,d=E,p=E.version,m=n.toneMapping),f.layers.enableAll(),S.unshift(f,f.geometry,f.material,0,0,null)):E&&E.isTexture&&(c===void 0&&(c=new yn(new xo(2,2),new nn({name:"BackgroundMaterial",uniforms:ff(Os.background.uniforms),vertexShader:Os.background.vertexShader,fragmentShader:Os.background.fragmentShader,side:Xr,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=E,c.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,c.material.toneMapped=cn.getTransfer(E.colorSpace)!==_n,E.matrixAutoUpdate===!0&&E.updateMatrix(),c.material.uniforms.uvTransform.value.copy(E.matrix),(d!==E||p!==E.version||m!==n.toneMapping)&&(c.material.needsUpdate=!0,d=E,p=E.version,m=n.toneMapping),c.layers.enableAll(),S.unshift(c,c.geometry,c.material,0,0,null))}function g(S,A){S.getRGB(km,jP(n)),i.buffers.color.setClear(km.r,km.g,km.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(S,A=1){a.set(S),l=A,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(S){l=S,g(a,l)},render:_,addToRenderList:x}}function h4(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=p(null);let s=r,o=!1;function a(C,B,Y,$,se){let ce=!1;const ie=d($,Y,B);s!==ie&&(s=ie,c(s.object)),ce=m(C,$,Y,se),ce&&v(C,$,Y,se),se!==null&&e.update(se,n.ELEMENT_ARRAY_BUFFER),(ce||o)&&(o=!1,E(C,B,Y,$),se!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(se).buffer))}function l(){return n.createVertexArray()}function c(C){return n.bindVertexArray(C)}function f(C){return n.deleteVertexArray(C)}function d(C,B,Y){const $=Y.wireframe===!0;let se=i[C.id];se===void 0&&(se={},i[C.id]=se);let ce=se[B.id];ce===void 0&&(ce={},se[B.id]=ce);let ie=ce[$];return ie===void 0&&(ie=p(l()),ce[$]=ie),ie}function p(C){const B=[],Y=[],$=[];for(let se=0;se<t;se++)B[se]=0,Y[se]=0,$[se]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:B,enabledAttributes:Y,attributeDivisors:$,object:C,attributes:{},index:null}}function m(C,B,Y,$){const se=s.attributes,ce=B.attributes;let ie=0;const ye=Y.getAttributes();for(const W in ye)if(ye[W].location>=0){const oe=se[W];let de=ce[W];if(de===void 0&&(W==="instanceMatrix"&&C.instanceMatrix&&(de=C.instanceMatrix),W==="instanceColor"&&C.instanceColor&&(de=C.instanceColor)),oe===void 0||oe.attribute!==de||de&&oe.data!==de.data)return!0;ie++}return s.attributesNum!==ie||s.index!==$}function v(C,B,Y,$){const se={},ce=B.attributes;let ie=0;const ye=Y.getAttributes();for(const W in ye)if(ye[W].location>=0){let oe=ce[W];oe===void 0&&(W==="instanceMatrix"&&C.instanceMatrix&&(oe=C.instanceMatrix),W==="instanceColor"&&C.instanceColor&&(oe=C.instanceColor));const de={};de.attribute=oe,oe&&oe.data&&(de.data=oe.data),se[W]=de,ie++}s.attributes=se,s.attributesNum=ie,s.index=$}function _(){const C=s.newAttributes;for(let B=0,Y=C.length;B<Y;B++)C[B]=0}function x(C){g(C,0)}function g(C,B){const Y=s.newAttributes,$=s.enabledAttributes,se=s.attributeDivisors;Y[C]=1,$[C]===0&&(n.enableVertexAttribArray(C),$[C]=1),se[C]!==B&&(n.vertexAttribDivisor(C,B),se[C]=B)}function S(){const C=s.newAttributes,B=s.enabledAttributes;for(let Y=0,$=B.length;Y<$;Y++)B[Y]!==C[Y]&&(n.disableVertexAttribArray(Y),B[Y]=0)}function A(C,B,Y,$,se,ce,ie){ie===!0?n.vertexAttribIPointer(C,B,Y,se,ce):n.vertexAttribPointer(C,B,Y,$,se,ce)}function E(C,B,Y,$){_();const se=$.attributes,ce=Y.getAttributes(),ie=B.defaultAttributeValues;for(const ye in ce){const W=ce[ye];if(W.location>=0){let ue=se[ye];if(ue===void 0&&(ye==="instanceMatrix"&&C.instanceMatrix&&(ue=C.instanceMatrix),ye==="instanceColor"&&C.instanceColor&&(ue=C.instanceColor)),ue!==void 0){const oe=ue.normalized,de=ue.itemSize,we=e.get(ue);if(we===void 0)continue;const Ue=we.buffer,pe=we.type,be=we.bytesPerElement,Ne=pe===n.INT||pe===n.UNSIGNED_INT||ue.gpuType===Qd;if(ue.isInterleavedBufferAttribute){const ke=ue.data,nt=ke.stride,vt=ue.offset;if(ke.isInstancedInterleavedBuffer){for(let ut=0;ut<W.locationSize;ut++)g(W.location+ut,ke.meshPerAttribute);C.isInstancedMesh!==!0&&$._maxInstanceCount===void 0&&($._maxInstanceCount=ke.meshPerAttribute*ke.count)}else for(let ut=0;ut<W.locationSize;ut++)x(W.location+ut);n.bindBuffer(n.ARRAY_BUFFER,Ue);for(let ut=0;ut<W.locationSize;ut++)A(W.location+ut,de/W.locationSize,pe,oe,nt*be,(vt+de/W.locationSize*ut)*be,Ne)}else{if(ue.isInstancedBufferAttribute){for(let ke=0;ke<W.locationSize;ke++)g(W.location+ke,ue.meshPerAttribute);C.isInstancedMesh!==!0&&$._maxInstanceCount===void 0&&($._maxInstanceCount=ue.meshPerAttribute*ue.count)}else for(let ke=0;ke<W.locationSize;ke++)x(W.location+ke);n.bindBuffer(n.ARRAY_BUFFER,Ue);for(let ke=0;ke<W.locationSize;ke++)A(W.location+ke,de/W.locationSize,pe,oe,de*be,de/W.locationSize*ke*be,Ne)}}else if(ie!==void 0){const oe=ie[ye];if(oe!==void 0)switch(oe.length){case 2:n.vertexAttrib2fv(W.location,oe);break;case 3:n.vertexAttrib3fv(W.location,oe);break;case 4:n.vertexAttrib4fv(W.location,oe);break;default:n.vertexAttrib1fv(W.location,oe)}}}}S()}function I(){D();for(const C in i){const B=i[C];for(const Y in B){const $=B[Y];for(const se in $)f($[se].object),delete $[se];delete B[Y]}delete i[C]}}function b(C){if(i[C.id]===void 0)return;const B=i[C.id];for(const Y in B){const $=B[Y];for(const se in $)f($[se].object),delete $[se];delete B[Y]}delete i[C.id]}function P(C){for(const B in i){const Y=i[B];if(Y[C.id]===void 0)continue;const $=Y[C.id];for(const se in $)f($[se].object),delete $[se];delete Y[C.id]}}function D(){O(),o=!0,s!==r&&(s=r,c(s.object))}function O(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:a,reset:D,resetDefaultState:O,dispose:I,releaseStatesOfGeometry:b,releaseStatesOfProgram:P,initAttributes:_,enableAttribute:x,disableUnusedAttributes:S}}function d4(n,e,t){let i;function r(c){i=c}function s(c,f){n.drawArrays(i,c,f),t.update(f,i,1)}function o(c,f,d){d!==0&&(n.drawArraysInstanced(i,c,f,d),t.update(f,i,d))}function a(c,f,d){if(d===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,c,0,f,0,d);let m=0;for(let v=0;v<d;v++)m+=f[v];t.update(m,i,1)}function l(c,f,d,p){if(d===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let v=0;v<c.length;v++)o(c[v],f[v],p[v]);else{m.multiDrawArraysInstancedWEBGL(i,c,0,f,0,p,0,d);let v=0;for(let _=0;_<d;_++)v+=f[_];for(let _=0;_<p.length;_++)t.update(v,i,p[_])}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function p4(n,e,t,i){let r;function s(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const P=e.get("EXT_texture_filter_anisotropic");r=n.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function o(P){return!(P!==Dn&&i.convert(P)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(P){const D=P===li&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(P!==di&&i.convert(P)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_TYPE)&&P!==vn&&!D)}function l(P){if(P==="highp"){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return P==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const f=l(c);f!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",f,"instead."),c=f);const d=t.logarithmicDepthBuffer===!0,p=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control");if(p===!0){const P=e.get("EXT_clip_control");P.clipControlEXT(P.LOWER_LEFT_EXT,P.ZERO_TO_ONE_EXT)}const m=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),v=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=n.getParameter(n.MAX_TEXTURE_SIZE),x=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),g=n.getParameter(n.MAX_VERTEX_ATTRIBS),S=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),A=n.getParameter(n.MAX_VARYING_VECTORS),E=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),I=v>0,b=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:d,reverseDepthBuffer:p,maxTextures:m,maxVertexTextures:v,maxTextureSize:_,maxCubemapSize:x,maxAttributes:g,maxVertexUniforms:S,maxVaryings:A,maxFragmentUniforms:E,vertexTextures:I,maxSamples:b}}function m4(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Uo,a=new Ut,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||i!==0||r;return r=p,i=d.length,m},this.beginShadows=function(){s=!0,f(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=f(d,p,0)},this.setState=function(d,p,m){const v=d.clippingPlanes,_=d.clipIntersection,x=d.clipShadows,g=n.get(d);if(!r||v===null||v.length===0||s&&!x)s?f(null):c();else{const S=s?0:i,A=S*4;let E=g.clippingState||null;l.value=E,E=f(v,p,A,m);for(let I=0;I!==A;++I)E[I]=t[I];g.clippingState=E,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function f(d,p,m,v){const _=d!==null?d.length:0;let x=null;if(_!==0){if(x=l.value,v!==!0||x===null){const g=m+_*4,S=p.matrixWorldInverse;a.getNormalMatrix(S),(x===null||x.length<g)&&(x=new Float32Array(g));for(let A=0,E=m;A!==_;++A,E+=4)o.copy(d[A]).applyMatrix4(S,a),o.normal.toArray(x,E),x[E+3]=o.constant}l.value=x,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,x}}function g4(n){let e=new WeakMap;function t(o,a){return a===sf?o.mapping=mo:a===Ad&&(o.mapping=Za),o}function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===sf||a===Ad)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new nM(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",r),t(c.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class xr extends wf{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="Orthogra
3626phicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,f=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=f*this.view.offsetY,l=a-f*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const Bu=4,wC=[.125,.215,.35,.446,.526,.582],Gl=20,o_=new xr,TC=new qe;let a_=null,l_=0,c_=0,u_=!1;const zl=(1+Math.sqrt(5))/2,lu=1/zl,CC=[new G(-zl,lu,0),new G(zl,lu,0),new G(-lu,0,zl),new G(lu,0,zl),new G(0,zl,-lu),new G(0,zl,lu),new G(-1,1,-1),new G(1,1,-1),new G(-1,1,1),new G(1,1,1)];class lS{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){a_=this._renderer.getRenderTarget(),l_=this._renderer.getActiveCubeFace(),c_=this._renderer.getActiveMipmapLevel(),u_=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=IC(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=bC(),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(a_,l_,c_),this._renderer.xr.enabled=u_,e.scissorTest=!1,zm(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===mo||e.mapping===Za?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),a_=this._renderer.getRenderTarget(),l_=this._renderer.getActiveCubeFace(),c_=this._renderer.getActiveMipmapLevel(),u_=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:Ft,minFilter:Ft,generateMipmaps:!1,type:li,format:Dn,colorSpace:Er,depthBuffer:!1},r=RC(e,t,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=RC(e,t,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=v4(s)),this._blurMaterial=y4(s,e,t)}return r}_compileMaterial(e){const t=new yn(this._lodPlanes[0],e);this._renderer.compile(t,o_)}_sceneToCubeUV(e,t,i,r){const a=new Tn(90,1,t,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],f=this._renderer,d=f.autoClear,p=f.toneMapping;f.getClearColor(TC),f.toneMapping=Hs,f.autoClear=!1;
vendor: 5,418 bytes, lines 3626-3701
3626const m=new mr({name:"PMREM.Background",side:ai,depthWrite:!1,depthTest:!1}),v=new yn(new Ic,m);let _=!1;const x=e.background;x?x.isColor&&(m.color.copy(x),e.background=null,_=!0):(m.color.copy(TC),_=!0);for(let g=0;g<6;g++){const S=g%3;S===0?(a.up.set(0,l[g],0),a.lookAt(c[g],0,0)):S===1?(a.up.set(0,0,l[g]),a.lookAt(0,c[g],0)):(a.up.set(0,l[g],0),a.lookAt(0,0,c[g]));const A=this._cubeSize;zm(r,S*A,g>2?A:0,A,A),f.setRenderTarget(r),_&&f.render(v,a),f.render(e,a)}v.geometry.dispose(),v.material.dispose(),f.toneMapping=p,f.autoClear=d,e.background=x}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===mo||e.mapping===Za;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=IC()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=bC());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new yn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;zm(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,o_)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s<r;s++){const o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),a=CC[(r-s-1)%CC.length];this._blur(e,s-1,s,o,a)}t.autoClear=i}_blur(e,t,i,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,i,r,"latitudinal",s),this._halfBlur(o,e,i,i,r,"longitudinal",s)}_halfBlur(e,t,i,r,s,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const f=3,d=new yn(this._lodPlanes[r],c),p=c.uniforms,m=this._sizeLods[i]-1,v=isFinite(s)?Math.PI/(2*m):2*Math.PI/(2*Gl-1),_=s/v,x=isFinite(s)?1+Math.floor(f*_):Gl;x>Gl&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Gl}`);const g=[];let S=0;for(let P=0;P<Gl;++P){const D=P/_,O=Math.exp(-D*D/2);g.push(O),P===0?S+=O:P<x&&(S+=2*O)}for(let P=0;P<g.length;P++)g[P]=g[P]/S;p.envMap.value=e.texture,p.samples.value=x,p.weights.value=g,p.latitudinal.value=o==="latitudinal",a&&(p.poleAxis.value=a);const{_lodMax:A}=this;p.dTheta.value=v,p.mipInt.value=A-i;const E=this._sizeLods[r],I=3*E*(r>A-Bu?r-A+Bu:0),b=4*(this._cubeSize-E);zm(t,I,b,3*E,2*E),l.setRenderTarget(t),l.render(d,o_)}}function v4(n){const e=[],t=[],i=[];let r=n;const s=n-Bu+1+wC.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);t.push(a);let l=1/a;o>n-Bu?l=wC[o-n+Bu-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),f=-c,d=1+c,p=[f,f,d,f,d,d,f,f,d,d,f,d],m=6,v=6,_=3,x=2,g=1,S=new Float32Array(_*v*m),A=new Float32Array(x*v*m),E=new Float32Array(g*v*m);for(let b=0;b<m;b++){const P=b%3*2/3-1,D=b>2?0:-1,O=[P,D,0,P+2/3,D,0,P+2/3,D+1,0,P,D,0,P+2/3,D+1,0,P,D+1,0];S.set(O,_*v*b),A.set(p,x*v*b);const C=[b,b,b,b,b,b];E.set(C,g*v*b)}const I=new bt;I.setAttribute("position",new Yt(S,_)),I.setAttribute("uv",new Yt(A,x)),I.setAttribute("faceIndex",new Yt(E,g)),e.push(I),r>Bu&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function RC(n,e,t){const i=new xn(n,e,t);return i.texture.mapping=Mf,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function zm(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function y4(n,e,t){const i=new Float32Array(Gl),r=new G(0,1,0);return new nn({name:"SphericalGaussianBlur",defines:{n:Gl,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:iM(),fragmentShader:`
3627
3628			precision mediump float;
3629			precision mediump int;
3630
3631			varying vec3 vOutputDirection;
3632
3633			uniform sampler2D envMap;
3634			uniform int samples;
3635			uniform float weights[ n ];
3636			uniform bool latitudinal;
3637			uniform float dTheta;
3638			uniform float mipInt;
3639			uniform vec3 poleAxis;
3640
3641			#define ENVMAP_TYPE_CUBE_UV
3642			#include <cube_uv_reflection_fragment>
3643
3644			vec3 getSample( float theta, vec3 axis ) {
3645
3646				float cosTheta = cos( theta );
3647				// Rodrigues' axis-angle rotation
3648				vec3 sampleDirection = vOutputDirection * cosTheta
3649					+ cross( axis, vOutputDirection ) * sin( theta )
3650					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
3651
3652				return bilinearCubeUV( envMap, sampleDirection, mipInt );
3653
3654			}
3655
3656			void main() {
3657
3658				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
3659
3660				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
3661
3662					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
3663
3664				}
3665
3666				axis = normalize( axis );
3667
3668				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
3669				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
3670
3671				for ( int i = 1; i < n; i++ ) {
3672
3673					if ( i >= samples ) {
3674
3675						break;
3676
3677					}
3678
3679					float theta = dTheta * float( i );
3680					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
3681					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
3682
3683				}
3684
3685			}
3686		`,blending:rr,depthTest:!1,depthWrite:!1})}function bC(){return new nn({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:iM(),fragmentShader:`
3687
3688			precision mediump float;
3689			precision mediump int;
3690
3691			varying vec3 vOutputDirection;
3692
3693			uniform sampler2D envMap;
3694
3695			#include <common>
3696
3697			void main() {
3698
3699				vec3 outputDirection = normalize( vOutputDirection );
3700				vec2 uv = equirectUv( outputDirection );
3701
3702				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
3703
3704			}
3705		`,blending:rr,depthTest:!1,depthWrite:!1})}function IC(){return new nn({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:iM(),fragmentShader:`
3706
3707			precision mediump float;
3708			precision mediump int;
3709
3710			uniform float flipEnvMap;
3711
3712			varying vec3 vOutputDirection;
3713
3714			uniform samplerCube envMap;
3715
3716			void main() {
3717
3718				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
3719
3720			}
3721		`,blending:rr,depthTest:!1,depthWrite:!1})}function iM(){return`
3722
3723		precision mediump float;
3724		precision mediump int;
3725
3726		attribute float faceIndex;
3727
3728		varying vec3 vOutputDirection;
3729
3730		// RH coordinate system; PMREM face-indexing convention
3731		vec3 getDirection( vec2 uv, float face ) {
3732
3733			uv = 2.0 * uv - 1.0;
3734
3735			vec3 direction = vec3( uv, 1.0 );
3736
3737			if ( face == 0.0 ) {
3738
3739				direction = direction.zyx; // ( 1, v, u ) pos x
3740
3741			} else if ( face == 1.0 ) {
3742
3743				direction = direction.xzy;
3744				direction.xz *= -1.0; // ( -u, 1, -v ) pos y
3745
3746			} else if ( face == 2.0 ) {
3747
3748				direction.x *= -1.0; // ( -u, v, 1 ) pos z
3749
3750			} else if ( face == 3.0 ) {
3751
3752				direction = direction.zyx;
3753				direction.xz *= -1.0; // ( -1, v, -u ) neg x
3754
3755			} else if ( face == 4.0 ) {
3756
3757				direction = direction.xzy;
3758				direction.xy *= -1.0; // ( -u, -1, v ) neg y
3759
3760			} else if ( face == 5.0 ) {
3761
3762				direction.z *= -1.0; // ( u, v, -1 ) neg z
3763
3764			}
3765
3766			return direction;
3767
3768		}
3769
3770		void main() {
3771
3772			vOutputDirection = getDirection( uv, faceIndex );
3773			gl_Position = vec4( position, 1.0 );
3774
3775		}
3776	`}function x4(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===sf||l===Ad,f=l===mo||l===Za;if(c||f){let d=e.get(a);const p=d!==void 0?d.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==p)return t===null&&(t=new lS(n)),d=c?t.fromEquirectangular(a,d):t.fromCubemap(a,d),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),d.texture;if(d!==void 0)return d.texture;{const m=a.image;return c&&m&&m.height>0||f&&m&&r(m)?(t===null&&(t=new lS(n)),d=c?t.fromEquirectangular(a):t.fromCubemap(a),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),a.addEventListener("dispose",s),d.texture):null}}}return a}function r(a){let l=0;const c=6;for(let f=0;f<c;f++)a[f]!==void 0&&l++;return l===c}function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:i,dispose:o}}function _4(n){const e={};function t(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return e[i]=r,r}return{has:function(i){return t(i)!==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(i){const r=t(i);return r===null&&Ng("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function S4(n,e,t,i){const r={},s=new WeakMap;function o(d){const p=d.target;p.index!==null&&e.remove(p.index);for(const v in p.attributes)e.remove(p.attributes[v]);for(const v in p.morphAttributes){const _=p.morphAttributes[v];for(let x=0,g=_.length;x<g;x++)e.remove(_[x])}p.removeEventListener("dispose",o),delete r[p.id];const m=s.get(p);m&&(e.remove(m),s.delete(p)),i.releaseStatesOfGeometry(p),p.isInstancedBufferGeometry===!0&&delete p._maxInstanceCount,t.memory.geometries--}function a(d,p){return r[p.id]===!0||(p.addEventListener("dispose",o),r[p.id]=!0,t.memory.geometries++),p}function l(d){const p=d.attributes;for(const v in p)e.update(p[v],n.ARRAY_BUFFER);const m=d.morphAttributes;for(const v in m){const _=m[v];for(let x=0,g=_.length;x<g;x++)e.update(_[x],n.ARRAY_BUFFER)}}function c(d){const p=[],m=d.index,v=d.attributes.position;let _=0;if(m!==null){const S=m.array;_=m.version;for(let A=0,E=S.length;A<E;A+=3){const I=S[A+0],b=S[A+1],P=S[A+2];p.push(I,b,b,P,P,I)}}else if(v!==void 0){const S=v.array;_=v.version;for(let A=0,E=S.length/3-1;A<E;A+=3){const I=A+0,b=A+1,P=A+2;p.push(I,b,b,P,P,I)}}else return;const x=new(HP(p)?tM:eM)(p,1);x.version=_;const g=s.get(d);g&&e.remove(g),s.set(d,x)}function f(d){const p=s.get(d);if(p){const m=d.index;m!==null&&p.version<m.version&&c(d)}else c(d);return s.get(d)}return{get:a,update:l,getWireframeAttribute:f}}function A4(n,e,t){let i;function r(p){i=p}let s,o;function a(p){s=p.type,o=p.bytesPerElement}function l(p,m){n.drawElements(i,m,s,p*o),t.update(m,i,1)}function c(p,m,v){v!==0&&(n.drawElementsInstanced(i,m,s,p*o,v),t.update(m,i,v))}function f(p,m,v){if(v===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,m,0,s,p,0,v);let x=0;for(let g=0;g<v;g++)x+=m[g];t.update(x,i,1)}function d(p,m,v,_){if(v===0)return;const x=e.get("WEBGL_multi_draw");if(x===null)for(let g=0;g<p.length;g++)c(p[g]/o,m[g],_[g]);
vendor: 4,594 bytes, line 3776
3776else{x.multiDrawElementsInstancedWEBGL(i,m,0,s,p,0,_,0,v);let g=0;for(let S=0;S<v;S++)g+=m[S];for(let S=0;S<_.length;S++)t.update(g,i,_[S])}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=f,this.renderMultiDrawInstances=d}function M4(n){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function i(s,o,a){switch(t.calls++,o){case n.TRIANGLES:t.triangles+=a*(s/3);break;case n.LINES:t.lines+=a*(s/2);break;case n.LINE_STRIP:t.lines+=a*(s-1);break;case n.LINE_LOOP:t.lines+=a*s;break;case n.POINTS:t.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function r(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:r,update:i}}function E4(n,e,t){const i=new WeakMap,r=new rn;function s(o,a,l){const c=o.morphTargetInfluences,f=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,d=f!==void 0?f.length:0;let p=i.get(a);if(p===void 0||p.count!==d){let C=function(){D.dispose(),i.delete(a),a.removeEventListener("dispose",C)};var m=C;p!==void 0&&p.texture.dispose();const v=a.morphAttributes.position!==void 0,_=a.morphAttributes.normal!==void 0,x=a.morphAttributes.color!==void 0,g=a.morphAttributes.position||[],S=a.morphAttributes.normal||[],A=a.morphAttributes.color||[];let E=0;v===!0&&(E=1),_===!0&&(E=2),x===!0&&(E=3);let I=a.attributes.position.count*E,b=1;I>e.maxTextureSize&&(b=Math.ceil(I/e.maxTextureSize),I=e.maxTextureSize);const P=new Float32Array(I*b*4*d),D=new Lv(P,I,b,d);D.type=vn,D.needsUpdate=!0;const O=E*4;for(let B=0;B<d;B++){const Y=g[B],$=S[B],se=A[B],ce=I*b*4*B;for(let ie=0;ie<Y.count;ie++){const ye=ie*O;v===!0&&(r.fromBufferAttribute(Y,ie),P[ce+ye+0]=r.x,P[ce+ye+1]=r.y,P[ce+ye+2]=r.z,P[ce+ye+3]=0),_===!0&&(r.fromBufferAttribute($,ie),P[ce+ye+4]=r.x,P[ce+ye+5]=r.y,P[ce+ye+6]=r.z,P[ce+ye+7]=0),x===!0&&(r.fromBufferAttribute(se,ie),P[ce+ye+8]=r.x,P[ce+ye+9]=r.y,P[ce+ye+10]=r.z,P[ce+ye+11]=se.itemSize===4?r.w:1)}}p={count:d,texture:D,size:new _e(I,b)},i.set(a,p),a.addEventListener("dispose",C)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(n,"morphTexture",o.morphTexture,t);else{let v=0;for(let x=0;x<c.length;x++)v+=c[x];const _=a.morphTargetsRelative?1:1-v;l.getUniforms().setValue(n,"morphTargetBaseInfluence",_),l.getUniforms().setValue(n,"morphTargetInfluences",c)}l.getUniforms().setValue(n,"morphTargetsTexture",p.texture,t),l.getUniforms().setValue(n,"morphTargetsTextureSize",p.size)}return{update:s}}function w4(n,e,t,i){let r=new WeakMap;function s(l){const c=i.render.frame,f=l.geometry,d=e.get(l,f);if(r.get(d)!==c&&(e.update(d),r.set(d,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==c&&(t.update(l.instanceMatrix,n.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,n.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const p=l.skeleton;r.get(p)!==c&&(p.update(),r.set(p,c))}return d}function o(){r=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:s,dispose:o}}class Fv extends Qt{constructor(e,t,i,r,s,o,a,l,c,f=rc){if(f!==rc&&f!==$a)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&f===rc&&(i=Vs),i===void 0&&f===$a&&(i=qa),super(null,r,s,o,a,l,f,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:Ht,this.minFilter=l!==void 0?l:Ht,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}const QP=new Qt,PC=new Fv(1,1),ZP=new Lv,qP=new $A,$P=new $d,BC=[],DC=[],LC=new Float32Array(16),FC=new Float32Array(9),NC=new Float32Array(4);function Tf(n,e,t){const i=n[0];if(i<=0||i>0)return n;const r=e*t;let s=BC[r];if(s===void 0&&(s=new Float32Array(r),BC[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function pi(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t<i;t++)if(n[t]!==e[t])return!1;return!0}function mi(n,e){for(let t=0,i=e.length;t<i;t++)n[t]=e[t]}function Nv(n,e){let t=DC[e];t===void 0&&(t=new Int32Array(e),DC[e]=t);for(let i=0;i!==e;++i)t[i]=n.allocateTextureUnit();return t}function T4(n,e){const t=this.cache;t[0]!==e&&(n.uniform1f(this.addr,e),t[0]=e)}function C4(n,e){const t=this.cache;
vendor: 13,291 bytes, lines 3776-3806
3776if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(pi(t,e))return;n.uniform2fv(this.addr,e),mi(t,e)}}function R4(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.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)&&(n.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(pi(t,e))return;n.uniform3fv(this.addr,e),mi(t,e)}}function b4(n,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)&&(n.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(pi(t,e))return;n.uniform4fv(this.addr,e),mi(t,e)}}function I4(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(pi(t,e))return;n.uniformMatrix2fv(this.addr,!1,e),mi(t,e)}else{if(pi(t,i))return;NC.set(i),n.uniformMatrix2fv(this.addr,!1,NC),mi(t,i)}}function P4(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(pi(t,e))return;n.uniformMatrix3fv(this.addr,!1,e),mi(t,e)}else{if(pi(t,i))return;FC.set(i),n.uniformMatrix3fv(this.addr,!1,FC),mi(t,i)}}function B4(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(pi(t,e))return;n.uniformMatrix4fv(this.addr,!1,e),mi(t,e)}else{if(pi(t,i))return;LC.set(i),n.uniformMatrix4fv(this.addr,!1,LC),mi(t,i)}}function D4(n,e){const t=this.cache;t[0]!==e&&(n.uniform1i(this.addr,e),t[0]=e)}function L4(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(pi(t,e))return;n.uniform2iv(this.addr,e),mi(t,e)}}function F4(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(pi(t,e))return;n.uniform3iv(this.addr,e),mi(t,e)}}function N4(n,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)&&(n.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(pi(t,e))return;n.uniform4iv(this.addr,e),mi(t,e)}}function U4(n,e){const t=this.cache;t[0]!==e&&(n.uniform1ui(this.addr,e),t[0]=e)}function O4(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(pi(t,e))return;n.uniform2uiv(this.addr,e),mi(t,e)}}function k4(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(pi(t,e))return;n.uniform3uiv(this.addr,e),mi(t,e)}}function z4(n,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)&&(n.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(pi(t,e))return;n.uniform4uiv(this.addr,e),mi(t,e)}}function H4(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r);let s;this.type===n.SAMPLER_2D_SHADOW?(PC.compareFunction=QA,s=PC):s=QP,t.setTexture2D(e||s,r)}function G4(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture3D(e||qP,r)}function V4(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTextureCube(e||$P,r)}function W4(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture2DArray(e||ZP,r)}function X4(n){switch(n){case 5126:return T4;case 35664:return C4;case 35665:return R4;case 35666:return b4;case 35674:return I4;case 35675:return P4;case 35676:return B4;case 5124:case 35670:return D4;case 35667:case 35671:return L4;case 35668:case 35672:return F4;case 35669:case 35673:return N4;case 5125:return U4;case 36294:return O4;case 36295:return k4;case 36296:return z4;case 35678:case 36198:case 36298:case 36306:case 35682:return H4;case 35679:case 36299:case 36307:return G4;case 35680:case 36300:case 36308:case 36293:return V4;case 36289:case 36303:case 36311:case 36292:return W4}}function j4(n,e){n.uniform1fv(this.addr,e)}function J4(n,e){const t=Tf(e,this.size,2);n.uniform2fv(this.addr,t)}function Y4(n,e){const t=Tf(e,this.size,3);n.uniform3fv(this.addr,t)}function K4(n,e){const t=Tf(e,this.size,4);n.uniform4fv(this.addr,t)}function Q4(n,e){const t=Tf(e,this.size,4);n.uniformMatrix2fv(this.addr,!1,t)}function Z4(n,e){const t=Tf(e,this.size,9);n.uniformMatrix3fv(this.addr,!1,t)}function q4(n,e){const t=Tf(e,this.size,16);n.uniformMatrix4fv(this.addr,!1,t)}function $4(n,e){n.uniform1iv(this.addr,e)}function eH(n,e){n.uniform2iv(this.addr,e)}function tH(n,e){n.uniform3iv(this.addr,e)}function nH(n,e){n.uniform4iv(this.addr,e)}function iH(n,e){n.uniform1uiv(this.addr,e)}function rH(n,e){n.uniform2uiv(this.addr,e)}function sH(n,e){n.uniform3uiv(this.addr,e)}function oH(n,e){n.uniform4uiv(this.addr,e)}function aH(n,e,t){const i=this.cache,r=e.length,s=Nv(t,r);pi(i,s)||(n.uniform1iv(this.addr,s),mi(i,s));for(let o=0;o!==r;++o)t.setTexture2D(e[o]||QP,s[o])}function lH(n,e,t){const i=this.cache,r=e.length,s=Nv(t,r);pi(i,s)||(n.uniform1iv(this.addr,s),mi(i,s));for(let o=0;o!==r;++o)t.setTexture3D(e[o]||qP,s[o])}function cH(n,e,t){const i=this.cache,r=e.length,s=Nv(t,r);pi(i,s)||(n.uniform1iv(this.addr,s),mi(i,s));for(let o=0;o!==r;++o)t.setTextureCube(e[o]||$P,s[o])}function uH(n,e,t){const i=this.cache,r=e.length,s=Nv(t,r);pi(i,s)||(n.uniform1iv(this.addr,s),mi(i,s));for(let o=0;o!==r;++o)t.setTexture2DArray(e[o]||ZP,s[o])}function fH(n){switch(n){case 5126:return j4;case 35664:return J4;case 35665:return Y4;case 35666:return K4;case 35674:return Q4;case 35675:return Z4;case 35676:return q4;case 5124:case 35670:return $4;case 35667:case 35671:return eH;case 35668:case 35672:return tH;case 35669:case 35673:return nH;case 5125:return iH;case 36294:return rH;case 36295:return sH;case 36296:return oH;case 35678:case 36198:case 36298:case 36306:case 35682:return aH;case 35679:case 36299:case 36307:return lH;case 35680:case 36300:case 36308:case 36293:return cH;case 36289:case 36303:case 36311:case 36292:return uH}}class hH{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.setValue=X4(t.type)}}class dH{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=fH(t.type)}}class pH{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,i){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,t[a.id],i)}}}const f_=/(\w+)(\])?(\[|\.)?/g;function UC(n,e){n.seq.push(e),n.map[e.id]=e}function mH(n,e,t){const i=n.name,r=i.length;for(f_.lastIndex=0;;){const s=f_.exec(i),o=f_.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){UC(t,c===void 0?new hH(a,n,e):new dH(a,n,e));break}else{let d=t.map[a];d===void 0&&(d=new pH(a),UC(t,d)),t=d}}}class Ug{constructor(e,t){this.seq=[],this.map={};const i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(t,r),o=e.getUniformLocation(t,s.name);mH(s,o,this)}}setValue(e,t,i,r){const s=this.map[t];s!==void 0&&s.setValue(e,i,r)}setOptional(e,t,i){const r=t[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,t,i,r){for(let s=0,o=t.length;s!==o;++s){const a=t[s],l=i[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,t){const i=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in t&&i.push(o)}return i}}function OC(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}const gH=37297;let vH=0;function yH(n,e){const t=n.split(`
3777`),i=[],r=Math.max(e-6,0),s=Math.min(e+6,t.length);for(let o=r;o<s;o++){const a=o+1;i.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return i.join(`
3778`)}function xH(n){const e=cn.getPrimaries(cn.workingColorSpace),t=cn.getPrimaries(n);let i;switch(e===t?i="":e===Td&&t===wd?i="LinearDisplayP3ToLinearSRGB":e===wd&&t===Td&&(i="LinearSRGBToLinearDisplayP3"),n){case Er:case qd:return[i,"LinearTransferOETF"];case jn:case Dv:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function kC(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+`
3779
3780`+r+`
3781
3782`+yH(n.getShaderSource(e),o)}else return r}function _H(n,e){const t=xH(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function SH(n,e){let t;switch(e){case SP:t="Linear";break;case AP:t="Reinhard";break;case MP:t="Cineon";break;case zA:t="ACESFilmic";break;case wP:t="AgX";break;case TP:t="Neutral";break;case EP:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const Hm=new G;function AH(){cn.getLuminanceCoefficients(Hm);const n=Hm.x.toFixed(4),e=Hm.y.toFixed(4),t=Hm.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${n}, ${e}, ${t} );`,"	return dot( weights, rgb );","}"].join(`
3783`)}function MH(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Bh).join(`
3784`)}function EH(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(`
3785`)}function wH(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=n.getActiveAttrib(e,r),o=s.name;let a=1;s.type===n.FLOAT_MAT2&&(a=2),s.type===n.FLOAT_MAT3&&(a=3),s.type===n.FLOAT_MAT4&&(a=4),t[o]={type:s.type,location:n.getAttribLocation(e,o),locationSize:a}}return t}function Bh(n){return n!==""}function zC(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.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 HC(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const TH=/^[ \t]*#include +<([\w\d./]+)>/gm;function cS(n){return n.replace(TH,RH)}const CH=new Map;function RH(n,e){let t=Bt[e];if(t===void 0){const i=CH.get(e);if(i!==void 0)t=Bt[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return cS(t)}const bH=/#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 GC(n){return n.replace(bH,IH)}function IH(n,e,t,i){let r="";for(let s=parseInt(e);s<parseInt(t);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function VC(n){let e=`precision ${n.precision} float;
3786	precision ${n.precision} int;
3787	precision ${n.precision} sampler2D;
3788	precision ${n.precision} samplerCube;
3789	precision ${n.precision} sampler3D;
3790	precision ${n.precision} sampler2DArray;
3791	precision ${n.precision} sampler2DShadow;
3792	precision ${n.precision} samplerCubeShadow;
3793	precision ${n.precision} sampler2DArrayShadow;
3794	precision ${n.precision} isampler2D;
3795	precision ${n.precision} isampler3D;
3796	precision ${n.precision} isamplerCube;
3797	precision ${n.precision} isampler2DArray;
3798	precision ${n.precision} usampler2D;
3799	precision ${n.precision} usampler3D;
3800	precision ${n.precision} usamplerCube;
3801	precision ${n.precision} usampler2DArray;
3802	`;return n.precision==="highp"?e+=`
3803#define HIGH_PRECISION`:n.precision==="mediump"?e+=`
3804#define MEDIUM_PRECISION`:n.precision==="lowp"&&(e+=`
3805#define LOW_PRECISION`),e}function PH(n){let e="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===Ev?e="SHADOWMAP_TYPE_PCF":n.shadowMapType===Xh?e="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===Fs&&(e="SHADOWMAP_TYPE_VSM"),e}function BH(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case mo:case Za:e="ENVMAP_TYPE_CUBE";break;case Mf:e="ENVMAP_TYPE_CUBE_UV";break}return e}function DH(n){let e="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case Za:e="ENVMAP_MODE_REFRACTION";break}return e}function LH(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case Kd:e="ENVMAP_BLENDING_MULTIPLY";break;case xP:e="ENVMAP_BLENDING_MIX";break;case _P:e="ENVMAP_BLENDING_ADD";break}return e}function FH(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:i,maxMip:t}}function NH(n,e,t,i){const r=n.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=PH(t),c=BH(t),f=DH(t),d=LH(t),p=FH(t),m=MH(t),v=EH(s),_=r.createProgram();let x,g,S=t.glslVersion?"#version "+t.glslVersion+`
3806`:"";t.isRawShaderMaterial?(x=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,v].filter(
vendor: 5,486 bytes, lines 3806-3810
3806Bh).join(`
3807`),x.length>0&&(x+=`
3808`),g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,v].filter(Bh).join(`
3809`),g.length>0&&(g+=`
3810`)):(x=[VC(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,v,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 "+f:"",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_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.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 "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","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",`
3811`].filter(Bh).join(`
3812`),g=[VC(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,v,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 "+c:"",t.envMap?"#define "+f:"",t.envMap?"#define "+d:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.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_IRIDESCENCE":"",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 "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Hs?"#define TONE_MAPPING":"",t.toneMapping!==Hs?Bt.tonemapping_pars_fragment:"",t.toneMapping!==Hs?SH("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Bt.colorspace_pars_fragment,_H("linearToOutputTexel",t.outputColorSpace),AH(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
3813`].filter(Bh).join(`
3814`)),o=cS(o),o=zC(o,t),o=HC(o,t),a=cS(a),a=zC(a,t),a=HC(a,t),o=GC(o),a=GC(a),t.isRawShaderMaterial!==!0&&(S=`#version 300 es
3815`,x=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(`
3816`)+`
3817`+x,g=["#define varying in",t.glslVersion===aS?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===aS?"":"#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(`
3818`)+`
3819`+g);
vendor: 21,222 bytes, lines 3819-3826
3819const A=S+x+o,E=S+g+a,I=OC(r,r.VERTEX_SHADER,A),b=OC(r,r.FRAGMENT_SHADER,E);r.attachShader(_,I),r.attachShader(_,b),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function P(B){if(n.debug.checkShaderErrors){const Y=r.getProgramInfoLog(_).trim(),$=r.getShaderInfoLog(I).trim(),se=r.getShaderInfoLog(b).trim();let ce=!0,ie=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(ce=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,_,I,b);else{const ye=kC(r,I,"vertex"),W=kC(r,b,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+`
3820
3821Material Name: `+B.name+`
3822Material Type: `+B.type+`
3823
3824Program Info Log: `+Y+`
3825`+ye+`
3826`+W)}else Y!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Y):($===""||se==="")&&(ie=!1);ie&&(B.diagnostics={runnable:ce,programLog:Y,vertexShader:{log:$,prefix:x},fragmentShader:{log:se,prefix:g}})}r.deleteShader(I),r.deleteShader(b),D=new Ug(r,_),O=wH(r,_)}let D;this.getUniforms=function(){return D===void 0&&P(this),D};let O;this.getAttributes=function(){return O===void 0&&P(this),O};let C=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return C===!1&&(C=r.getProgramParameter(_,gH)),C},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=vH++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=I,this.fragmentShader=b,this}let UH=0;class OH{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new kH(e),t.set(e,i)),i}}class kH{constructor(e){this.id=UH++,this.code=e,this.usedTimes=0}}function zH(n,e,t,i,r,s,o){const a=new oc,l=new OH,c=new Set,f=[],d=r.logarithmicDepthBuffer,p=r.reverseDepthBuffer,m=r.vertexTextures;let v=r.precision;const _={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 x(C){return c.add(C),C===0?"uv":`uv${C}`}function g(C,B,Y,$,se){const ce=$.fog,ie=se.geometry,ye=C.isMeshStandardMaterial?$.environment:null,W=(C.isMeshStandardMaterial?t:e).get(C.envMap||ye),ue=W&&W.mapping===Mf?W.image.height:null,oe=_[C.type];C.precision!==null&&(v=r.getMaxPrecision(C.precision),v!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",v,"instead."));const de=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,we=de!==void 0?de.length:0;let Ue=0;ie.morphAttributes.position!==void 0&&(Ue=1),ie.morphAttributes.normal!==void 0&&(Ue=2),ie.morphAttributes.color!==void 0&&(Ue=3);let pe,be,Ne,ke;if(oe){const En=Os[oe];pe=En.vertexShader,be=En.fragmentShader}else pe=C.vertexShader,be=C.fragmentShader,l.update(C),Ne=l.getVertexShaderID(C),ke=l.getFragmentShaderID(C);const nt=n.getRenderTarget(),vt=se.isInstancedMesh===!0,ut=se.isBatchedMesh===!0,Ze=!!C.map,Be=!!C.matcap,X=!!W,We=!!C.aoMap,je=!!C.lightMap,Ve=!!C.bumpMap,Xe=!!C.normalMap,ht=!!C.displacementMap,et=!!C.emissiveMap,j=!!C.metalnessMap,k=!!C.roughnessMap,ge=C.anisotropy>0,Ie=C.clearcoat>0,De=C.dispersion>0,Re=C.iridescence>0,ft=C.sheen>0,N=C.transmission>0,w=ge&&!!C.anisotropyMap,R=Ie&&!!C.clearcoatMap,z=Ie&&!!C.clearcoatNormalMap,Q=Ie&&!!C.clearcoatRoughnessMap,fe=Re&&!!C.iridescenceMap,ve=Re&&!!C.iridescenceThicknessMap,Fe=ft&&!!C.sheenColorMap,pt=ft&&!!C.sheenRoughnessMap,q=!!C.specularMap,Te=!!C.specularColorMap,J=!!C.specularIntensityMap,He=N&&!!C.transmissionMap,ae=N&&!!C.thicknessMap,Le=!!C.gradientMap,$e=!!C.alphaMap,st=C.alphaTest>0,zt=!!C.alphaHash,Zt=!!C.extensions;let hn=Hs;C.toneMapped&&(nt===null||nt.isXRRenderTarget===!0)&&(hn=n.toneMapping);const Nt={shaderID:oe,shaderType:C.type,shaderName:C.name,vertexShader:pe,fragmentShader:be,defines:C.defines,customVertexShaderID:Ne,customFragmentShaderID:ke,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:v,batching:ut,batchingColor:ut&&se._colorsTexture!==null,instancing:vt,instancingColor:vt&&se.instanceColor!==null,instancingMorph:vt&&se.morphTexture!==null,supportsVertexTextures:m,outputColorSpace:nt===null?n.outputColorSpace:nt.isXRRenderTarget===!0?nt.texture.colorSpace:Er,alphaToCoverage:!!C.alphaToCoverage,map:Ze,matcap:Be,envMap:X,envMapMode:X&&W.mapping,envMapCubeUVHeight:ue,aoMap:We,lightMap:je,bumpMap:Ve,normalMap:Xe,displacementMap:m&&ht,emissiveMap:et,normalMapObjectSpace:Xe&&C.normalMapType===DP,normalMapTangentSpace:Xe&&C.normalMapType===al,metalnessMap:j,roughnessMap:k,anisotropy:ge,anisotropyMap:w,clearcoat:Ie,clearcoatMap:R,clearcoatNormalMap:z,clearcoatRoughnessMap:Q,dispersion:De,iridescence:Re,iridescenceMap:fe,iridescenceThicknessMap:ve,sheen:ft,sheenColorMap:Fe,sheenRoughnessMap:pt,specularMap:q,specularColorMap:Te,specularIntensityMap:J,transmission:N,transmissionMap:He,thicknessMap:ae,gradientMap:Le,opaque:C.transparent===!1&&C.blending===ic&&C.alphaToCoverage===!1,alphaMap:$e,alphaTest:st,alphaHash:zt,combine:C.combine,mapUv:Ze&&x(C.map.channel),aoMapUv:We&&x(C.aoMap.channel),lightMapUv:je&&x(C.lightMap.channel),bumpMapUv:Ve&&x(C.bumpMap.channel),normalMapUv:Xe&&x(C.normalMap.channel),displacementMapUv:ht&&x(C.displacementMap.channel),emissiveMapUv:et&&x(C.emissiveMap.channel),metalnessMapUv:j&&x(C.metalnessMap.channel),roughnessMapUv:k&&x(C.roughnessMap.channel),anisotropyMapUv:w&&x(C.anisotropyMap.channel),clearcoatMapUv:R&&x(C.clearcoatMap.channel),clearcoatNormalMapUv:z&&x(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Q&&x(C.clearcoatRoughnessMap.channel),iridescenceMapUv:fe&&x(C.iridescenceMap.channel),iridescenceThicknessMapUv:ve&&x(C.iridescenceThicknessMap.channel),sheenColorMapUv:Fe&&x(C.sheenColorMap.channel),sheenRoughnessMapUv:pt&&x(C.sheenRoughnessMap.channel),specularMapUv:q&&x(C.specularMap.channel),specularColorMapUv:Te&&x(C.specularColorMap.channel),specularIntensityMapUv:J&&x(C.specularIntensityMap.channel),transmissionMapUv:He&&x(C.transmissionMap.channel),thicknessMapUv:ae&&x(C.thicknessMap.channel),alphaMapUv:$e&&x(C.alphaMap.channel),vertexTangents:!!ie.attributes.tangent&&(Xe||ge),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!ie.attributes.color&&ie.attributes.color.itemSize===4,pointsUvs:se.isPoints===!0&&!!ie.attributes.uv&&(Ze||$e),fog:!!ce,useFog:C.fog===!0,fogExp2:!!ce&&ce.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,reverseDepthBuffer:p,skinning:se.isSkinnedMesh===!0,morphTargets:ie.morphAttributes.position!==void 0,morphNormals:ie.morphAttributes.normal!==void 0,morphColors:ie.morphAttributes.color!==void 0,morphTargetsCount:we,morphTextureStride:Ue,numDirLights:B.directional.length,numPointLights:B.point.length,numSpotLights:B.spot.length,numSpotLightMaps:B.spotLightMap.length,numRectAreaLights:B.rectArea.length,numHemiLights:B.hemi.length,numDirLightShadows:B.directionalShadowMap.length,numPointLightShadows:B.pointShadowMap.length,numSpotLightShadows:B.spotShadowMap.length,numSpotLightShadowsWithMaps:B.numSpotLightShadowsWithMaps,numLightProbes:B.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&Y.length>0,shadowMapType:n.shadowMap.type,toneMapping:hn,decodeVideoTexture:Ze&&C.map.isVideoTexture===!0&&cn.getTransfer(C.map.colorSpace)===_n,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===fi,flipSided:C.side===ai,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionClipCullDistance:Zt&&C.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Zt&&C.extensions.multiDraw===!0||ut)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()};return Nt.vertexUv1s=c.has(1),Nt.vertexUv2s=c.has(2),Nt.vertexUv3s=c.has(3),c.clear(),Nt}function S(C){const B=[];if(C.shaderID?B.push(C.shaderID):(B.push(C.customVertexShaderID),B.push(C.customFragmentShaderID)),C.defines!==void 0)for(const Y in C.defines)B.push(Y),B.push(C.defines[Y]);return C.isRawShaderMaterial===!1&&(A(B,C),E(B,C),B.push(n.outputColorSpace)),B.push(C.customProgramCacheKey),B.join()}function A(C,B){C.push(B.precision),C.push(B.outputColorSpace),C.push(B.envMapMode),C.push(B.envMapCubeUVHeight),C.push(B.mapUv),C.push(B.alphaMapUv),C.push(B.lightMapUv),C.push(B.aoMapUv),C.push(B.bumpMapUv),C.push(B.normalMapUv),C.push(B.displacementMapUv),C.push(B.emissiveMapUv),C.push(B.metalnessMapUv),C.push(B.roughnessMapUv),C.push(B.anisotropyMapUv),C.push(B.clearcoatMapUv),C.push(B.clearcoatNormalMapUv),C.push(B.clearcoatRoughnessMapUv),C.push(B.iridescenceMapUv),C.push(B.iridescenceThicknessMapUv),C.push(B.sheenColorMapUv),C.push(B.sheenRoughnessMapUv),C.push(B.specularMapUv),C.push(B.specularColorMapUv),C.push(B.specularIntensityMapUv),C.push(B.transmissionMapUv),C.push(B.thicknessMapUv),C.push(B.combine),C.push(B.fogExp2),C.push(B.sizeAttenuation),C.push(B.morphTargetsCount),C.push(B.morphAttributeCount),C.push(B.numDirLights),C.push(B.numPointLights),C.push(B.numSpotLights),C.push(B.numSpotLightMaps),C.push(B.numHemiLights),C.push(B.numRectAreaLights),C.push(B.numDirLightShadows),C.push(B.numPointLightShadows),C.push(B.numSpotLightShadows),C.push(B.numSpotLightShadowsWithMaps),C.push(B.numLightProbes),C.push(B.shadowMapType),C.push(B.toneMapping),C.push(B.numClippingPlanes),C.push(B.numClipIntersection),C.push(B.depthPacking)}function E(C,B){a.disableAll(),B.supportsVertexTextures&&a.enable(0),B.instancing&&a.enable(1),B.instancingColor&&a.enable(2),B.instancingMorph&&a.enable(3),B.matcap&&a.enable(4),B.envMap&&a.enable(5),B.normalMapObjectSpace&&a.enable(6),B.normalMapTangentSpace&&a.enable(7),B.clearcoat&&a.enable(8),B.iridescence&&a.enable(9),B.alphaTest&&a.enable(10),B.vertexColors&&a.enable(11),B.vertexAlphas&&a.enable(12),B.vertexUv1s&&a.enable(13),B.vertexUv2s&&a.enable(14),B.vertexUv3s&&a.enable(15),B.vertexTangents&&a.enable(16),B.anisotropy&&a.enable(17),B.alphaHash&&a.enable(18),B.batching&&a.enable(19),B.dispersion&&a.enable(20),B.batchingColor&&a.enable(21),C.push(a.mask),a.disableAll(),B.fog&&a.enable(0),B.useFog&&a.enable(1),B.flatShading&&a.enable(2),B.logarithmicDepthBuffer&&a.enable(3),B.reverseDepthBuffer&&a.enable(4),B.skinning&&a.enable(5),B.morphTargets&&a.enable(6),B.morphNormals&&a.enable(7),B.morphColors&&a.enable(8),B.premultipliedAlpha&&a.enable(9),B.shadowMapEnabled&&a.enable(10),B.doubleSided&&a.enable(11),B.flipSided&&a.enable(12),B.useDepthPacking&&a.enable(13),B.dithering&&a.enable(14),B.transmission&&a.enable(15),B.sheen&&a.enable(16),B.opaque&&a.enable(17),B.pointsUvs&&a.enable(18),B.decodeVideoTexture&&a.enable(19),B.alphaToCoverage&&a.enable(20),C.push(a.mask)}function I(C){const B=_[C.type];let Y;if(B){const $=Os[B];Y=JP.clone($.uniforms)}else Y=C.uniforms;return Y}function b(C,B){let Y;for(let $=0,se=f.length;$<se;$++){const ce=f[$];if(ce.cacheKey===B){Y=ce,++Y.usedTimes;break}}return Y===void 0&&(Y=new NH(n,B,C,s),f.push(Y)),Y}function P(C){if(--C.usedTimes===0){const B=f.indexOf(C);f[B]=f[f.length-1],f.pop(),C.destroy()}}function D(C){l.remove(C)}function O(){l.dispose()}return{getParameters:g,getProgramCacheKey:S,getUniforms:I,acquireProgram:b,releaseProgram:P,releaseShaderCache:D,programs:f,dispose:O}}function HH(){let n=new WeakMap;function e(o){return n.has(o)}function t(o){let a=n.get(o);return a===void 0&&(a={},n.set(o,a)),a}function i(o){n.delete(o)}function r(o,a,l){n.get(o)[a]=l}function s(){n=new WeakMap}return{has:e,get:t,remove:i,update:r,dispose:s}}function GH(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.material.id!==e.material.id?n.material.id-e.material.id:n.z!==e.z?n.z-e.z:n.id-e.id}function WC(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.z!==e.z?e.z-n.z:n.id-e.id}function XC(){const n=[];let e=0;const t=[],i=[],r=[];function s(){e=0,t.length=0,i.length=0,r.length=0}function o(d,p,m,v,_,x){let g=n[e];return g===void 0?(g={id:d.id,object:d,geometry:p,material:m,groupOrder:v,renderOrder:d.renderOrder,z:_,group:x},n[e]=g):(g.id=d.id,g.object=d,g.geometry=p,g.material=m,g.groupOrder=v,g.renderOrder=d.renderOrder,g.z=_,g.group=x),e++,g}function a(d,p,m,v,_,x){const g=o(d,p,m,v,_,x);m.transmission>0?i.push(g):m.transparent===!0?r.push(g):t.push(g)}function l(d,p,m,v,_,x){const g=o(d,p,m,v,_,x);m.transmission>0?i.unshift(g):m.transparent===!0?r.unshift(g):t.unshift(g)}function c(d,p){t.length>1&&t.sort(d||GH),i.length>1&&i.sort(p||WC),r.length>1&&r.sort(p||WC)}function f(){for(let d=e,p=n.length;d<p;d++){const m=n[d];if(m.id===null)break;m.id=null,m.object=null,m.geometry=null,m.material=null,m.group=null}}return{opaque:t,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:f,sort:c}}function VH(){let n=new WeakMap;function e(i,r){const s=n.get(i);let o;return s===void 0?(o=new XC,n.set(i,[o])):r>=s.length?(o=new XC,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function WH(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new G,color:new qe};break;case"SpotLight":t={position:new G,direction:new G,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new G,color:new qe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new G,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":t={color:new qe,position:new G,halfWidth:new G,halfHeight:new G};break}return n[e.id]=t,t}}}function XH(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new _e};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new _e};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new _e,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let jH=0;function JH(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function YH(n){const e=new WH,t=XH(),i={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 c=0;c<9;c++)i.probe.push(new G);const r=new G,s=new ct,o=new ct;function a(c){let f=0,d=0,p=0;for(let O=0;O<9;O++)i.probe[O].set(0,0,0);let m=0,v=0,_=0,x=0,g=0,S=0,A=0,E=0,I=0,b=0,P=0;c.sort(JH);for(let O=0,C=c.length;O<C;O++){const B=c[O],Y=B.color,$=B.intensity,se=B.distance,ce=B.shadow&&B.shadow.map?B.shadow.map.texture:null;if(B.isAmbientLight)f+=Y.r*$,d+=Y.g*$,p+=Y.b*$;else if(B.isLightProbe){for(let ie=0;ie<9;ie++)i.probe[ie].addScaledVector(B.sh.coefficients[ie],$);P++}else if(B.isDirectionalLight){const ie=e.get(B);if(ie.color.copy(B.color).multiplyScalar(B.intensity),B.castShadow){const ye=B.shadow,W=t.get(B);W.shadowIntensity=ye.intensity,W.shadowBias=ye.bias,W.shadowNormalBias=ye.normalBias,W.shadowRadius=ye.radius,W.shadowMapSize=ye.mapSize,i.directionalShadow[m]=W,i.directionalShadowMap[m]=ce,i.directionalShadowMatrix[m]=B.shadow.matrix,S++}i.directional[m]=ie,m++}else if(B.isSpotLight){const ie=e.get(B);ie.position.setFromMatrixPosition(B.matrixWorld),ie.color.copy(Y).multiplyScalar($),ie.distance=se,ie.coneCos=Math.cos(B.angle),ie.penumbraCos=Math.cos(B.angle*(1-B.penumbra)),ie.decay=B.decay,i.spot[_]=ie;const ye=B.shadow;if(B.map&&(i.spotLightMap[I]=B.map,I++,ye.updateMatrices(B),B.castShadow&&b++),i.spotLightMatrix[_]=ye.matrix,B.castShadow){const W=t.get(B);W.shadowIntensity=ye.intensity,W.shadowBias=ye.bias,W.shadowNormalBias=ye.normalBias,W.shadowRadius=ye.radius,W.shadowMapSize=ye.mapSize,i.spotShadow[_]=W,i.spotShadowMap[_]=ce,E++}_++}else if(B.isRectAreaLight){const ie=e.get(B);ie.color.copy(Y).multiplyScalar($),ie.halfWidth.set(B.width*.5,0,0),ie.halfHeight.set(0,B.height*.5,0),i.rectArea[x]=ie,x++}else if(B.isPointLight){const ie=e.get(B);if(ie.color.copy(B.color).multiplyScalar(B.intensity),ie.distance=B.distance,ie.decay=B.decay,B.castShadow){const ye=B.shadow,W=t.get(B);W.shadowIntensity=ye.intensity,W.shadowBias=ye.bias,W.shadowNormalBias=ye.normalBias,W.shadowRadius=ye.radius,W.shadowMapSize=ye.mapSize,W.shadowCameraNear=ye.camera.near,W.shadowCameraFar=ye.camera.far,i.pointShadow[v]=W,i.pointShadowMap[v]=ce,i.pointShadowMatrix[v]=B.shadow.matrix,A++}i.point[v]=ie,v++}else if(B.isHemisphereLight){const ie=e.get(B);ie.skyColor.copy(B.color).multiplyScalar($),ie.groundColor.copy(B.groundColor).multiplyScalar($),i.hemi[g]=ie,g++}}x>0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=tt.LTC_FLOAT_1,i.rectAreaLTC2=tt.LTC_FLOAT_2):(i.rectAreaLTC1=tt.LTC_HALF_1,i.rectAreaLTC2=tt.LTC_HALF_2)),i.ambient[0]=f,i.ambient[1]=d,i.ambient[2]=p;const D=i.hash;(D.directionalLength!==m||D.pointLength!==v||D.spotLength!==_||D.rectAreaLength!==x||D.hemiLength!==g||D.numDirectionalShadows!==S||D.numPointShadows!==A||D.numSpotShadows!==E||D.numSpotMaps!==I||D.numLightProbes!==P)&&(i.directional.length=m,i.spot.length=_,i.rectArea.length=x,i.point.length=v,i.hemi.length=g,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=A,i.pointShadowMap.length=A,i.spotShadow.length=E,i.spotShadowMap.length=E,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=A,i.spotLightMatrix.length=E+I-b,i.spotLightMap.length=I,i.numSpotLightShadowsWithMaps=b,i.numLightProbes=P,D.directionalLength=m,D.pointLength=v,D.spotLength=_,D.rectAreaLength=x,D.hemiLength=g,D.numDirectionalShadows=S,D.numPointShadows=A,D.numSpotShadows=E,D.numSpotMaps=I,D.numLightProbes=P,i.version=jH++)}function l(c,f){let d=0,p=0,m=0,v=0,_=0;const x=f.matrixWorldInverse;for(let g=0,S=c.length;g<S;g++){const A=c[g];if(A.isDirectionalLight){const E=i.directional[d];E.direction.setFromMatrixPosition(A.matrixWorld),r.setFromMatrixPosition(A.target.matrixWorld),E.direction.sub(r),E.direction.transformDirection(x),d++}else if(A.isSpotLight){const E=i.spot[m];E.position.setFromMatrixPosition(A.matrixWorld),E.position.applyMatrix4(x),E.direction.setFromMatrixPosition(A.matrixWorld),r.setFromMatrixPosition(A.target.matrixWorld),E.direction.sub(r),E.direction.transformDirection(x),m++}else if(A.isRectAreaLight){const E=i.rectArea[v];E.position.setFromMatrixPosition(A.matrixWorld),E.position.applyMatrix4(x),o.identity(),s.copy(A.matrixWorld),s.premultiply(x),o.extractRotation(s),E.halfWidth.set(A.width*.5,0,0),E.halfHeight.set(0,A.height*.5,0),E.halfWidth.applyMatrix4(o),E.halfHeight.applyMatrix4(o),v++}else if(A.isPointLight){const E=i.point[p];E.position.setFromMatrixPosition(A.matrixWorld),E.position.applyMatrix4(x),p++}else if(A.isHemisphereLight){const E=i.hemi[_];E.direction.setFromMatrixPosition(A.matrixWorld),E.direction.transformDirection(x),_++}}}return{setup:a,setupView:l,state:i}}function jC(n){const e=new YH(n),t=[],i=[];function r(f){c.camera=f,t.length=0,i.length=0}function s(f){t.push(f)}function o(f){i.push(f)}function a(){e.setup(t)}function l(f){e.setupView(t,f)}const c={lightsArray:t,shadowsArray:i,camera:null,lights:e,transmissionRenderTarget:{}};return{init:r,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function KH(n){let e=new WeakMap;function t(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new jC(n),e.set(r,[a])):s>=o.length?(a=new jC(n),o.push(a)):a=o[s],a}
vendor: 4,913 bytes, lines 3826-3854
3826function i(){e=new WeakMap}return{get:t,dispose:i}}class rM extends Hn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=ol,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 sM extends Hn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const QH=`void main() {
3827	gl_Position = vec4( position, 1.0 );
3828}`,ZH=`uniform sampler2D shadow_pass;
3829uniform vec2 resolution;
3830uniform float radius;
3831#include <packing>
3832void main() {
3833	const float samples = float( VSM_SAMPLES );
3834	float mean = 0.0;
3835	float squared_mean = 0.0;
3836	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
3837	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
3838	for ( float i = 0.0; i < samples; i ++ ) {
3839		float uvOffset = uvStart + i * uvStride;
3840		#ifdef HORIZONTAL_PASS
3841			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
3842			mean += distribution.x;
3843			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
3844		#else
3845			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
3846			mean += depth;
3847			squared_mean += depth * depth;
3848		#endif
3849	}
3850	mean = mean / samples;
3851	squared_mean = squared_mean / samples;
3852	float std_dev = sqrt( squared_mean - mean * mean );
3853	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
3854}`;function qH(n,e,t){let i=new ep;const r=new _e,s=new _e,o=new rn,a=new rM({depthPacking:BP}),l=new sM,c={},f=t.maxTextureSize,d={[Xr]:ai,[ai]:Xr,[fi]:fi},p=new nn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new _e},radius:{value:4}},vertexShader:QH,fragmentShader:ZH}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const v=new bt;v.setAttribute("position",new Yt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new yn(v,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ev;let g=this.type;this.render=function(b,P,D){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||b.length===0)return;const O=n.getRenderTarget(),C=n.getActiveCubeFace(),B=n.getActiveMipmapLevel(),Y=n.state;Y.setBlending(rr),Y.buffers.color.setClear(1,1,1,1),Y.buffers.depth.setTest(!0),Y.setScissorTest(!1);const $=g!==Fs&&this.type===Fs,se=g===Fs&&this.type!==Fs;for(let ce=0,ie=b.length;ce<ie;ce++){const ye=b[ce],W=ye.shadow;if(W===void 0){console.warn("THREE.WebGLShadowMap:",ye,"has no shadow.");continue}if(W.autoUpdate===!1&&W.needsUpdate===!1)continue;r.copy(W.mapSize);const ue=W.getFrameExtents();if(r.multiply(ue),s.copy(W.mapSize),(r.x>f||r.y>f)&&(r.x>f&&(s.x=Math.floor(f/ue.x),r.x=s.x*ue.x,W.mapSize.x=s.x),r.y>f&&(s.y=Math.floor(f/ue.y),r.y=s.y*ue.y,W.mapSize.y=s.y)),W.map===null||$===!0||se===!0){const de=this.type!==Fs?{minFilter:Ht,magFilter:Ht}:{};W.map!==null&&W.map.dispose(),W.map=new xn(r.x,r.y,de),W.map.texture.name=ye.name+".shadowMap",W.camera.updateProjectionMatrix()}n.setRenderTarget(W.map),n.clear();const oe=W.getViewportCount();for(let de=0;de<oe;de++){const we=W.getViewport(de);o.set(s.x*we.x,s.y*we.y,s.x*we.z,s.y*we.w),Y.viewport(o),W.updateMatrices(ye,de),i=W.getFrustum(),E(P,D,W.camera,ye,this.type)}W.isPointLightShadow!==!0&&this.type===Fs&&S(W,D),W.needsUpdate=!1}g=this.type,x.needsUpdate=!1,n.setRenderTarget(O,C,B)};function S(b,P){const D=e.update(_);p.defines.VSM_SAMPLES!==b.blurSamples&&(p.defines.VSM_SAMPLES=b.blurSamples,m.defines.VSM_SAMPLES=b.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),b.mapPass===null&&(b.mapPass=new xn(r.x,r.y)),p.uniforms.shadow_pass.value=b.map.texture,p.uniforms.resolution.value=b.mapSize,p.uniforms.radius.value=b.radius,n.setRenderTarget(b.mapPass),n.clear(),n.renderBufferDirect(P,null,D,p,_,null),m.uniforms.shadow_pass.value=b.mapPass.texture,m.uniforms.resolution.value=b.mapSize,m.uniforms.radius.value=b.radius,n.setRenderTarget(b.map),n.clear(),n.renderBufferDirect(P,null,D,m,_,null)}function A(b,P,D,O){let C=null;const B=D.isPointLight===!0?b.customDistanceMaterial:b.customDepthMaterial;if(B!==void 0)C=B;else if(C=D.isPointLight===!0?l:a,n.localClippingEnabled&&P.clipSh
vendor: 5,456 bytes, line 3854
3854adows===!0&&Array.isArray(P.clippingPlanes)&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0){const Y=C.uuid,$=P.uuid;let se=c[Y];se===void 0&&(se={},c[Y]=se);let ce=se[$];ce===void 0&&(ce=C.clone(),se[$]=ce,P.addEventListener("dispose",I)),C=ce}if(C.visible=P.visible,C.wireframe=P.wireframe,O===Fs?C.side=P.shadowSide!==null?P.shadowSide:P.side:C.side=P.shadowSide!==null?P.shadowSide:d[P.side],C.alphaMap=P.alphaMap,C.alphaTest=P.alphaTest,C.map=P.map,C.clipShadows=P.clipShadows,C.clippingPlanes=P.clippingPlanes,C.clipIntersection=P.clipIntersection,C.displacementMap=P.displacementMap,C.displacementScale=P.displacementScale,C.displacementBias=P.displacementBias,C.wireframeLinewidth=P.wireframeLinewidth,C.linewidth=P.linewidth,D.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const Y=n.properties.get(C);Y.light=D}return C}function E(b,P,D,O,C){if(b.visible===!1)return;if(b.layers.test(P.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&C===Fs)&&(!b.frustumCulled||i.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,b.matrixWorld);const $=e.update(b),se=b.material;if(Array.isArray(se)){const ce=$.groups;for(let ie=0,ye=ce.length;ie<ye;ie++){const W=ce[ie],ue=se[W.materialIndex];if(ue&&ue.visible){const oe=A(b,ue,O,C);b.onBeforeShadow(n,b,P,D,$,oe,W),n.renderBufferDirect(D,null,$,oe,b,W),b.onAfterShadow(n,b,P,D,$,oe,W)}}}else if(se.visible){const ce=A(b,se,O,C);b.onBeforeShadow(n,b,P,D,$,ce,null),n.renderBufferDirect(D,null,$,ce,b,null),b.onAfterShadow(n,b,P,D,$,ce,null)}}const Y=b.children;for(let $=0,se=Y.length;$<se;$++)E(Y[$],P,D,O,C)}function I(b){b.target.removeEventListener("dispose",I);for(const D in c){const O=c[D],C=b.target.uuid;C in O&&(O[C].dispose(),delete O[C])}}}const $H={[p0]:m0,[g0]:x0,[v0]:_0,[yc]:y0,[m0]:p0,[x0]:g0,[_0]:v0,[y0]:yc};function eG(n){function e(){let J=!1;const He=new rn;let ae=null;const Le=new rn(0,0,0,0);return{setMask:function($e){ae!==$e&&!J&&(n.colorMask($e,$e,$e,$e),ae=$e)},setLocked:function($e){J=$e},setClear:function($e,st,zt,Zt,hn){hn===!0&&($e*=Zt,st*=Zt,zt*=Zt),He.set($e,st,zt,Zt),Le.equals(He)===!1&&(n.clearColor($e,st,zt,Zt),Le.copy(He))},reset:function(){J=!1,ae=null,Le.set(-1,0,0,0)}}}function t(){let J=!1,He=!1,ae=null,Le=null,$e=null;return{setReversed:function(st){He=st},setTest:function(st){st?Ne(n.DEPTH_TEST):ke(n.DEPTH_TEST)},setMask:function(st){ae!==st&&!J&&(n.depthMask(st),ae=st)},setFunc:function(st){if(He&&(st=$H[st]),Le!==st){switch(st){case p0:n.depthFunc(n.NEVER);break;case m0:n.depthFunc(n.ALWAYS);break;case g0:n.depthFunc(n.LESS);break;case yc:n.depthFunc(n.LEQUAL);break;case v0:n.depthFunc(n.EQUAL);break;case y0:n.depthFunc(n.GEQUAL);break;case x0:n.depthFunc(n.GREATER);break;case _0:n.depthFunc(n.NOTEQUAL);break;default:n.depthFunc(n.LEQUAL)}Le=st}},setLocked:function(st){J=st},setClear:function(st){$e!==st&&(n.clearDepth(st),$e=st)},reset:function(){J=!1,ae=null,Le=null,$e=null}}}function i(){let J=!1,He=null,ae=null,Le=null,$e=null,st=null,zt=null,Zt=null,hn=null;return{setTest:function(Nt){J||(Nt?Ne(n.STENCIL_TEST):ke(n.STENCIL_TEST))},setMask:function(Nt){He!==Nt&&!J&&(n.stencilMask(Nt),He=Nt)},setFunc:function(Nt,En,ti){(ae!==Nt||Le!==En||$e!==ti)&&(n.stencilFunc(Nt,En,ti),ae=Nt,Le=En,$e=ti)},setOp:function(Nt,En,ti){(st!==Nt||zt!==En||Zt!==ti)&&(n.stencilOp(Nt,En,ti),st=Nt,zt=En,Zt=ti)},setLocked:function(Nt){J=Nt},setClear:function(Nt){hn!==Nt&&(n.clearStencil(Nt),hn=Nt)},reset:function(){J=!1,He=null,ae=null,Le=null,$e=null,st=null,zt=null,Zt=null,hn=null}}}const r=new e,s=new t,o=new i,a=new WeakMap,l=new WeakMap;let c={},f={},d=new WeakMap,p=[],m=null,v=!1,_=null,x=null,g=null,S=null,A=null,E=null,I=null,b=new qe(0,0,0),P=0,D=!1,O=null,C=null,B=null,Y=null,$=null;const se=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let ce=!1,ie=0;const ye=n.getParameter(n.VERSION);ye.indexOf("WebGL")!==-1?(ie=parseFloat(/^WebGL (\d)/.exec(ye)[1]),ce=ie>=1):ye.indexOf("OpenGL ES")!==-1&&(ie=parseFloat(/^OpenGL ES (\d)/.exec(ye)[1]),ce=ie>=2);let W=null,ue={};const oe=n.getParameter(n.SCISSOR_BOX),de=n.getParameter(n.VIEWPORT),we=new rn().fromArray(oe),Ue=new rn().fromArray(de);function pe(J,He,ae,Le){const $e=new Uint8Array(4),st=n.createTexture();n.bindTexture(J,st),n.texParameteri(J,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(J,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let zt=0;zt<ae;zt++)J===n.TEXTURE_3D||J===n.TEXTURE_2D_ARRAY?n.texImage3D(He,0,n.RGBA,1,1,Le,0,n.RGBA,n.UNSIGNED_BYTE,$e):n.texImage2D(He+zt,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,$e);return st}const be={};be[n.TEXTURE_2D]=pe(n.TEXTURE_2D,n.TEXTURE_2D,1),be[n.TEXTURE_CUBE_MAP]=pe(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),be[n.TEXTURE_2D_ARRAY]=pe(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),be[n.TEXTURE_3D]=pe(n.TEXTURE_3D,n.TEXTURE_3D,1,1),r.setClear(0,0,0,1),s.setClear(1),o.setClear(0),Ne(n.DEPTH_TEST),s.setFunc(yc),je(!1),Ve(eS),Ne(n.CULL_FACE),X(rr);function Ne(J){c[J]!==!0&&(n.enable(J),c[J]=!0)}function ke(J){c[J]!==!1&&(n.disable(J),c[J]=!1)}function nt(J,He){return f[J]!==He?(n.bindFramebuffer(J,He),f[J]=He,J===n.DRAW_FRAMEBUFFER&&(f[n.FRAMEBUFFER]=He),J===n.FRAMEBUFFER&&(f[n.DRAW_FRAMEBUFFER]=He),!0):!1}function vt(J,He){let ae=p,Le=!1;if(J){ae=d.get(He),ae===void 0&&(ae=[],d.set(He,ae));const $e=J.textures;if(ae.length!==$e.length||ae[0]!==n.COLOR_ATTACHMENT0){for(let st=0,zt=$e.length;
vendor: 5,299 bytes, line 3854
3854st<zt;st++)ae[st]=n.COLOR_ATTACHMENT0+st;ae.length=$e.length,Le=!0}}else ae[0]!==n.BACK&&(ae[0]=n.BACK,Le=!0);Le&&n.drawBuffers(ae)}function ut(J){return m!==J?(n.useProgram(J),m=J,!0):!1}const Ze={[Ia]:n.FUNC_ADD,[nP]:n.FUNC_SUBTRACT,[iP]:n.FUNC_REVERSE_SUBTRACT};Ze[rP]=n.MIN,Ze[sP]=n.MAX;const Be={[oP]:n.ZERO,[aP]:n.ONE,[lP]:n.SRC_COLOR,[h0]:n.SRC_ALPHA,[pP]:n.SRC_ALPHA_SATURATE,[hP]:n.DST_COLOR,[uP]:n.DST_ALPHA,[cP]:n.ONE_MINUS_SRC_COLOR,[d0]:n.ONE_MINUS_SRC_ALPHA,[dP]:n.ONE_MINUS_DST_COLOR,[fP]:n.ONE_MINUS_DST_ALPHA,[mP]:n.CONSTANT_COLOR,[gP]:n.ONE_MINUS_CONSTANT_COLOR,[vP]:n.CONSTANT_ALPHA,[yP]:n.ONE_MINUS_CONSTANT_ALPHA};function X(J,He,ae,Le,$e,st,zt,Zt,hn,Nt){if(J===rr){v===!0&&(ke(n.BLEND),v=!1);return}if(v===!1&&(Ne(n.BLEND),v=!0),J!==tP){if(J!==_||Nt!==D){if((x!==Ia||A!==Ia)&&(n.blendEquation(n.FUNC_ADD),x=Ia,A=Ia),Nt)switch(J){case ic:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case tS:n.blendFunc(n.ONE,n.ONE);break;case nS:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case iS:n.blendFuncSeparate(n.ZERO,n.SRC_COLOR,n.ZERO,n.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",J);break}else switch(J){case ic:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case tS:n.blendFunc(n.SRC_ALPHA,n.ONE);break;case nS:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case iS:n.blendFunc(n.ZERO,n.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",J);break}g=null,S=null,E=null,I=null,b.set(0,0,0),P=0,_=J,D=Nt}return}$e=$e||He,st=st||ae,zt=zt||Le,(He!==x||$e!==A)&&(n.blendEquationSeparate(Ze[He],Ze[$e]),x=He,A=$e),(ae!==g||Le!==S||st!==E||zt!==I)&&(n.blendFuncSeparate(Be[ae],Be[Le],Be[st],Be[zt]),g=ae,S=Le,E=st,I=zt),(Zt.equals(b)===!1||hn!==P)&&(n.blendColor(Zt.r,Zt.g,Zt.b,hn),b.copy(Zt),P=hn),_=J,D=!1}function We(J,He){J.side===fi?ke(n.CULL_FACE):Ne(n.CULL_FACE);let ae=J.side===ai;He&&(ae=!ae),je(ae),J.blending===ic&&J.transparent===!1?X(rr):X(J.blending,J.blendEquation,J.blendSrc,J.blendDst,J.blendEquationAlpha,J.blendSrcAlpha,J.blendDstAlpha,J.blendColor,J.blendAlpha,J.premultipliedAlpha),s.setFunc(J.depthFunc),s.setTest(J.depthTest),s.setMask(J.depthWrite),r.setMask(J.colorWrite);const Le=J.stencilWrite;o.setTest(Le),Le&&(o.setMask(J.stencilWriteMask),o.setFunc(J.stencilFunc,J.stencilRef,J.stencilFuncMask),o.setOp(J.stencilFail,J.stencilZFail,J.stencilZPass)),ht(J.polygonOffset,J.polygonOffsetFactor,J.polygonOffsetUnits),J.alphaToCoverage===!0?Ne(n.SAMPLE_ALPHA_TO_COVERAGE):ke(n.SAMPLE_ALPHA_TO_COVERAGE)}function je(J){O!==J&&(J?n.frontFace(n.CW):n.frontFace(n.CCW),O=J)}function Ve(J){J!==q2?(Ne(n.CULL_FACE),J!==C&&(J===eS?n.cullFace(n.BACK):J===$2?n.cullFace(n.FRONT):n.cullFace(n.FRONT_AND_BACK))):ke(n.CULL_FACE),C=J}function Xe(J){J!==B&&(ce&&n.lineWidth(J),B=J)}function ht(J,He,ae){J?(Ne(n.POLYGON_OFFSET_FILL),(Y!==He||$!==ae)&&(n.polygonOffset(He,ae),Y=He,$=ae)):ke(n.POLYGON_OFFSET_FILL)}function et(J){J?Ne(n.SCISSOR_TEST):ke(n.SCISSOR_TEST)}function j(J){J===void 0&&(J=n.TEXTURE0+se-1),W!==J&&(n.activeTexture(J),W=J)}function k(J,He,ae){ae===void 0&&(W===null?ae=n.TEXTURE0+se-1:ae=W);let Le=ue[ae];Le===void 0&&(Le={type:void 0,texture:void 0},ue[ae]=Le),(Le.type!==J||Le.texture!==He)&&(W!==ae&&(n.activeTexture(ae),W=ae),n.bindTexture(J,He||be[J]),Le.type=J,Le.texture=He)}function ge(){const J=ue[W];J!==void 0&&J.type!==void 0&&(n.bindTexture(J.type,null),J.type=void 0,J.texture=void 0)}function Ie(){try{n.compressedTexImage2D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function De(){try{n.compressedTexImage3D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Re(){try{n.texSubImage2D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function ft(){try{n.texSubImage3D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function N(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function w(){try{n.compressedTexSubImage3D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function R(){try{n.texStorage2D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function z(){try{n.texStorage3D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Q(){try{n.texImage2D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function fe(){try{n.texImage3D.apply(n,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function ve(J){we.equals(J)===!1&&(n.scissor(J.x,J.y,J.z,J.w),we.copy(J))}function Fe(J){Ue.equals(J)===!1&&(n.viewport(J.x,J.y,J.z,J.w),Ue.copy(J))}function pt(J,He){let ae=l.get(He);ae===void 0&&(ae=new WeakMap,l.set(He,ae));let Le=ae.get(J);Le===void 0&&(Le=n.getUniformBlockIndex(He,J.name),ae.set(J,Le))}function q(J,He){const Le=l.get(He).get(J);a.get(He)!==Le&&(n.uniformBlockBinding(He,Le,J.__bindingPointIndex),a.set(He,Le))}function Te(){n.disable(n.BLEND),n.disable(n.CULL_FACE),n.disable(n.DEPTH_TEST),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SCISSOR_TEST),n.disable(n.STENCIL_TEST),n.disable(n.SAMPLE_ALPHA_TO_COVERAGE),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ZERO),n.blendFuncSeparate(n.ONE,n.ZERO,n.ONE,n.ZERO),n.blendColor
vendor: 5,033 bytes, line 3854
3854(0,0,0,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(n.LESS),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(n.ALWAYS,0,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),n.clearStencil(0),n.cullFace(n.BACK),n.frontFace(n.CCW),n.polygonOffset(0,0),n.activeTexture(n.TEXTURE0),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),c={},W=null,ue={},f={},d=new WeakMap,p=[],m=null,v=!1,_=null,x=null,g=null,S=null,A=null,E=null,I=null,b=new qe(0,0,0),P=0,D=!1,O=null,C=null,B=null,Y=null,$=null,we.set(0,0,n.canvas.width,n.canvas.height),Ue.set(0,0,n.canvas.width,n.canvas.height),r.reset(),s.reset(),o.reset()}return{buffers:{color:r,depth:s,stencil:o},enable:Ne,disable:ke,bindFramebuffer:nt,drawBuffers:vt,useProgram:ut,setBlending:X,setMaterial:We,setFlipSided:je,setCullFace:Ve,setLineWidth:Xe,setPolygonOffset:ht,setScissorTest:et,activeTexture:j,bindTexture:k,unbindTexture:ge,compressedTexImage2D:Ie,compressedTexImage3D:De,texImage2D:Q,texImage3D:fe,updateUBOMapping:pt,uniformBlockBinding:q,texStorage2D:R,texStorage3D:z,texSubImage2D:Re,texSubImage3D:ft,compressedTexSubImage2D:N,compressedTexSubImage3D:w,scissor:ve,viewport:Fe,reset:Te}}function tG(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2):(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0),n}function nG(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0):(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2),n}function iG(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function uS(n,e,t,i){const r=rG(i);switch(t){case GA:return n*e;case WA:return n*e;case XA:return n*e*2;case Ef:return n*e/r.components*r.byteLength;case Zd:return n*e/r.components*r.byteLength;case jA:return n*e*2/r.components*r.byteLength;case Iv:return n*e*2/r.components*r.byteLength;case VA:return n*e*3/r.components*r.byteLength;case Dn:return n*e*4/r.components*r.byteLength;case Pv:return n*e*4/r.components*r.byteLength;case jh:case Jh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Yh:case Kh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case A0:case E0:return Math.max(n,16)*Math.max(e,8)/4;case S0:case M0:return Math.max(n,8)*Math.max(e,8)/2;case w0:case T0:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case C0:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case R0:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case b0:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case I0:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case P0:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case B0:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case D0:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case L0:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case F0:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case N0:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case U0:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case O0:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case k0:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case z0:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case H0:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case Qh:case G0:case V0:return Math.ceil(n/4)*Math.ceil(e/4)*16;case JA:case W0:return Math.ceil(n/4)*Math.ceil(e/4)*8;case X0:case j0:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function rG(n){switch(n){case di:case Tv:return{byteLength:1,components:1};case af:case Cv:case li:return{byteLength:2,components:1};case Rv:case bv:return{byteLength:2,components:4};case Vs:case Qd:case vn:return{byteLength:4,components:1};case HA:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}const sG={contain:tG,cover:nG,fill:iG,getByteLength:uS};function oG(n,e,t,i,r,s,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new _e,f=new WeakMap;let d;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(j,k){return m?new OffscreenCanvas(j,k):bd("canvas")}function _(j,k,ge){let Ie=1;const De=et(j);if((De.width>ge||De.height>ge)&&(Ie=ge/Math.max(De.width,De.height)),Ie<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 Re=Math.floor(Ie*De.width),ft=Math.floor(Ie*De.height);d===void 0&&(d=v(Re,ft));const N=k?v(Re,ft):d;
vendor: 1,726 bytes, line 3854
3854return N.width=Re,N.height=ft,N.getContext("2d").drawImage(j,0,0,Re,ft),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+Re+"x"+ft+")."),N}else return"data"in j&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),j;return j}function x(j){return j.generateMipmaps&&j.minFilter!==Ht&&j.minFilter!==Ft}function g(j){n.generateMipmap(j)}function S(j,k,ge,Ie,De=!1){if(j!==null){if(n[j]!==void 0)return n[j];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+j+"'")}let Re=k;if(k===n.RED&&(ge===n.FLOAT&&(Re=n.R32F),ge===n.HALF_FLOAT&&(Re=n.R16F),ge===n.UNSIGNED_BYTE&&(Re=n.R8)),k===n.RED_INTEGER&&(ge===n.UNSIGNED_BYTE&&(Re=n.R8UI),ge===n.UNSIGNED_SHORT&&(Re=n.R16UI),ge===n.UNSIGNED_INT&&(Re=n.R32UI),ge===n.BYTE&&(Re=n.R8I),ge===n.SHORT&&(Re=n.R16I),ge===n.INT&&(Re=n.R32I)),k===n.RG&&(ge===n.FLOAT&&(Re=n.RG32F),ge===n.HALF_FLOAT&&(Re=n.RG16F),ge===n.UNSIGNED_BYTE&&(Re=n.RG8)),k===n.RG_INTEGER&&(ge===n.UNSIGNED_BYTE&&(Re=n.RG8UI),ge===n.UNSIGNED_SHORT&&(Re=n.RG16UI),ge===n.UNSIGNED_INT&&(Re=n.RG32UI),ge===n.BYTE&&(Re=n.RG8I),ge===n.SHORT&&(Re=n.RG16I),ge===n.INT&&(Re=n.RG32I)),k===n.RGB_INTEGER&&(ge===n.UNSIGNED_BYTE&&(Re=n.RGB8UI),ge===n.UNSIGNED_SHORT&&(Re=n.RGB16UI),ge===n.UNSIGNED_INT&&(Re=n.RGB32UI),ge===n.BYTE&&(Re=n.RGB8I),ge===n.SHORT&&(Re=n.RGB16I),ge===n.INT&&(Re=n.RGB32I)),k===n.RGBA_INTEGER&&(ge===n.UNSIGNED_BYTE&&(Re=n.RGBA8UI),ge===n.UNSIGNED_SHORT&&(Re=n.RGBA16UI),ge===n.UNSIGNED_INT&&(Re=n.RGBA32UI),ge===n.BYTE&&(Re=n.RGBA8I),ge===n.SHORT&&(Re=n.RGBA16I),ge===n.INT&&(Re=n.RGBA32I)),k===n.RGB&&ge===n.UNSIGNED_INT_5_9_9_9_REV&&(Re=n.RGB9_E5),k===n.RGBA){const ft
vendor: 5,989 bytes, line 3854
3854=De?Ed:cn.getTransfer(Ie);ge===n.FLOAT&&(Re=n.RGBA32F),ge===n.HALF_FLOAT&&(Re=n.RGBA16F),ge===n.UNSIGNED_BYTE&&(Re=ft===_n?n.SRGB8_ALPHA8:n.RGBA8),ge===n.UNSIGNED_SHORT_4_4_4_4&&(Re=n.RGBA4),ge===n.UNSIGNED_SHORT_5_5_5_1&&(Re=n.RGB5_A1)}return(Re===n.R16F||Re===n.R32F||Re===n.RG16F||Re===n.RG32F||Re===n.RGBA16F||Re===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Re}function A(j,k){let ge;return j?k===null||k===Vs||k===qa?ge=n.DEPTH24_STENCIL8:k===vn?ge=n.DEPTH32F_STENCIL8:k===af&&(ge=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):k===null||k===Vs||k===qa?ge=n.DEPTH_COMPONENT24:k===vn?ge=n.DEPTH_COMPONENT32F:k===af&&(ge=n.DEPTH_COMPONENT16),ge}function E(j,k){return x(j)===!0||j.isFramebufferTexture&&j.minFilter!==Ht&&j.minFilter!==Ft?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 I(j){const k=j.target;k.removeEventListener("dispose",I),P(k),k.isVideoTexture&&f.delete(k)}function b(j){const k=j.target;k.removeEventListener("dispose",b),O(k)}function P(j){const k=i.get(j);if(k.__webglInit===void 0)return;const ge=j.source,Ie=p.get(ge);if(Ie){const De=Ie[k.__cacheKey];De.usedTimes--,De.usedTimes===0&&D(j),Object.keys(Ie).length===0&&p.delete(ge)}i.remove(j)}function D(j){const k=i.get(j);n.deleteTexture(k.__webglTexture);const ge=j.source,Ie=p.get(ge);delete Ie[k.__cacheKey],o.memory.textures--}function O(j){const k=i.get(j);if(j.depthTexture&&j.depthTexture.dispose(),j.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(k.__webglFramebuffer[Ie]))for(let De=0;De<k.__webglFramebuffer[Ie].length;De++)n.deleteFramebuffer(k.__webglFramebuffer[Ie][De]);else n.deleteFramebuffer(k.__webglFramebuffer[Ie]);k.__webglDepthbuffer&&n.deleteRenderbuffer(k.__webglDepthbuffer[Ie])}else{if(Array.isArray(k.__webglFramebuffer))for(let Ie=0;Ie<k.__webglFramebuffer.length;Ie++)n.deleteFramebuffer(k.__webglFramebuffer[Ie]);else n.deleteFramebuffer(k.__webglFramebuffer);if(k.__webglDepthbuffer&&n.deleteRenderbuffer(k.__webglDepthbuffer),k.__webglMultisampledFramebuffer&&n.deleteFramebuffer(k.__webglMultisampledFramebuffer),k.__webglColorRenderbuffer)for(let Ie=0;Ie<k.__webglColorRenderbuffer.length;Ie++)k.__webglColorRenderbuffer[Ie]&&n.deleteRenderbuffer(k.__webglColorRenderbuffer[Ie]);k.__webglDepthRenderbuffer&&n.deleteRenderbuffer(k.__webglDepthRenderbuffer)}const ge=j.textures;for(let Ie=0,De=ge.length;Ie<De;Ie++){const Re=i.get(ge[Ie]);Re.__webglTexture&&(n.deleteTexture(Re.__webglTexture),o.memory.textures--),i.remove(ge[Ie])}i.remove(j)}let C=0;function B(){C=0}function Y(){const j=C;return j>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+j+" texture units while this GPU supports only "+r.maxTextures),C+=1,j}function $(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 se(j,k){const ge=i.get(j);if(j.isVideoTexture&&Xe(j),j.isRenderTargetTexture===!1&&j.version>0&&ge.__version!==j.version){const Ie=j.image;if(Ie===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ie.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ue(ge,j,k);return}}t.bindTexture(n.TEXTURE_2D,ge.__webglTexture,n.TEXTURE0+k)}function ce(j,k){const ge=i.get(j);if(j.version>0&&ge.__version!==j.version){Ue(ge,j,k);return}t.bindTexture(n.TEXTURE_2D_ARRAY,ge.__webglTexture,n.TEXTURE0+k)}function ie(j,k){const ge=i.get(j);if(j.version>0&&ge.__version!==j.version){Ue(ge,j,k);return}t.bindTexture(n.TEXTURE_3D,ge.__webglTexture,n.TEXTURE0+k)}function ye(j,k){const ge=i.get(j);if(j.version>0&&ge.__version!==j.version){pe(ge,j,k);return}t.bindTexture(n.TEXTURE_CUBE_MAP,ge.__webglTexture,n.TEXTURE0+k)}const W={[go]:n.REPEAT,[ei]:n.CLAMP_TO_EDGE,[of]:n.MIRRORED_REPEAT},ue={[Ht]:n.NEAREST,[wv]:n.NEAREST_MIPMAP_NEAREST,[jl]:n.NEAREST_MIPMAP_LINEAR,[Ft]:n.LINEAR,[Wu]:n.LINEAR_MIPMAP_NEAREST,[kr]:n.LINEAR_MIPMAP_LINEAR},oe={[LP]:n.NEVER,[zP]:n.ALWAYS,[FP]:n.LESS,[QA]:n.LEQUAL,[NP]:n.EQUAL,[kP]:n.GEQUAL,[UP]:n.GREATER,[OP]:n.NOTEQUAL};function de(j,k){if(k.type===vn&&e.has("OES_texture_float_linear")===!1&&(k.magFilter===Ft||k.magFilter===Wu||k.magFilter===jl||k.magFilter===kr||k.minFilter===Ft||k.minFilter===Wu||k.minFilter===jl||k.minFilter===kr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(j,n.TEXTURE_WRAP_S,W[k.wrapS]),n.texParameteri(j,n.TEXTURE_WRAP_T,W[k.wrapT]),(j===n.TEXTURE_3D||j===n.TEXTURE_2D_ARRAY)&&n.texParameteri(j,n.TEXTURE_WRAP_R,W[k.wrapR]),n.texParameteri(j,n.TEXTURE_MAG_FILTER,ue[k.magFilter]),n.texParameteri(j,n.TEXTURE_MIN_FILTER,ue[k.minFilter]),k.compareFunction&&(n.texParameteri(j,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(j,n.TEXTURE_COMPARE_FUNC,oe[k.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(k.magFilter===Ht||k.minFilter!==jl&&k.minFilter!==kr||k.type===vn&&e.has("OES_texture_float_linear")===!1)return;if(k.anisotropy>1||i.get(k).__currentAnisotropy){const ge=e.get("EXT_texture_filter_anisotropic");n.texParameterf(j,ge.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,r.getMaxAnisotropy())),i.get(k).__currentAnisotropy=k.anisotropy}}}function we(j,k){let ge=!1;j.__webglInit===void 0&&(j.__webglInit=!0,k.addEventListener("dispose",I));const Ie=k.source;let De=p.get(Ie);De===void 0&&(De={},p.set(Ie,De));const Re=$(k);if(Re!==j.__cacheKey){De[Re]===void 0&&(De[Re]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,ge=!0),De[Re].usedTimes++;
vendor: 5,103 bytes, line 3854
3854const ft=De[j.__cacheKey];ft!==void 0&&(De[j.__cacheKey].usedTimes--,ft.usedTimes===0&&D(k)),j.__cacheKey=Re,j.__webglTexture=De[Re].texture}return ge}function Ue(j,k,ge){let Ie=n.TEXTURE_2D;(k.isDataArrayTexture||k.isCompressedArrayTexture)&&(Ie=n.TEXTURE_2D_ARRAY),k.isData3DTexture&&(Ie=n.TEXTURE_3D);const De=we(j,k),Re=k.source;t.bindTexture(Ie,j.__webglTexture,n.TEXTURE0+ge);const ft=i.get(Re);if(Re.version!==ft.__version||De===!0){t.activeTexture(n.TEXTURE0+ge);const N=cn.getPrimaries(cn.workingColorSpace),w=k.colorSpace===us?null:cn.getPrimaries(k.colorSpace),R=k.colorSpace===us||N===w?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,k.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,k.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,R);let z=_(k.image,!1,r.maxTextureSize);z=ht(k,z);const Q=s.convert(k.format,k.colorSpace),fe=s.convert(k.type);let ve=S(k.internalFormat,Q,fe,k.colorSpace,k.isVideoTexture);de(Ie,k);let Fe;const pt=k.mipmaps,q=k.isVideoTexture!==!0,Te=ft.__version===void 0||De===!0,J=Re.dataReady,He=E(k,z);if(k.isDepthTexture)ve=A(k.format===$a,k.type),Te&&(q?t.texStorage2D(n.TEXTURE_2D,1,ve,z.width,z.height):t.texImage2D(n.TEXTURE_2D,0,ve,z.width,z.height,0,Q,fe,null));else if(k.isDataTexture)if(pt.length>0){q&&Te&&t.texStorage2D(n.TEXTURE_2D,He,ve,pt[0].width,pt[0].height);for(let ae=0,Le=pt.length;ae<Le;ae++)Fe=pt[ae],q?J&&t.texSubImage2D(n.TEXTURE_2D,ae,0,0,Fe.width,Fe.height,Q,fe,Fe.data):t.texImage2D(n.TEXTURE_2D,ae,ve,Fe.width,Fe.height,0,Q,fe,Fe.data);k.generateMipmaps=!1}else q?(Te&&t.texStorage2D(n.TEXTURE_2D,He,ve,z.width,z.height),J&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,z.width,z.height,Q,fe,z.data)):t.texImage2D(n.TEXTURE_2D,0,ve,z.width,z.height,0,Q,fe,z.data);else if(k.isCompressedTexture)if(k.isCompressedArrayTexture){q&&Te&&t.texStorage3D(n.TEXTURE_2D_ARRAY,He,ve,pt[0].width,pt[0].height,z.depth);for(let ae=0,Le=pt.length;ae<Le;ae++)if(Fe=pt[ae],k.format!==Dn)if(Q!==null)if(q){if(J)if(k.layerUpdates.size>0){const $e=uS(Fe.width,Fe.height,k.format,k.type);for(const st of k.layerUpdates){const zt=Fe.data.subarray(st*$e/Fe.data.BYTES_PER_ELEMENT,(st+1)*$e/Fe.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ae,0,0,st,Fe.width,Fe.height,1,Q,zt,0,0)}k.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ae,0,0,0,Fe.width,Fe.height,z.depth,Q,Fe.data,0,0)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,ae,ve,Fe.width,Fe.height,z.depth,0,Fe.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else q?J&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,ae,0,0,0,Fe.width,Fe.height,z.depth,Q,fe,Fe.data):t.texImage3D(n.TEXTURE_2D_ARRAY,ae,ve,Fe.width,Fe.height,z.depth,0,Q,fe,Fe.data)}else{q&&Te&&t.texStorage2D(n.TEXTURE_2D,He,ve,pt[0].width,pt[0].height);for(let ae=0,Le=pt.length;ae<Le;ae++)Fe=pt[ae],k.format!==Dn?Q!==null?q?J&&t.compressedTexSubImage2D(n.TEXTURE_2D,ae,0,0,Fe.width,Fe.height,Q,Fe.data):t.compressedTexImage2D(n.TEXTURE_2D,ae,ve,Fe.width,Fe.height,0,Fe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):q?J&&t.texSubImage2D(n.TEXTURE_2D,ae,0,0,Fe.width,Fe.height,Q,fe,Fe.data):t.texImage2D(n.TEXTURE_2D,ae,ve,Fe.width,Fe.height,0,Q,fe,Fe.data)}else if(k.isDataArrayTexture)if(q){if(Te&&t.texStorage3D(n.TEXTURE_2D_ARRAY,He,ve,z.width,z.height,z.depth),J)if(k.layerUpdates.size>0){const ae=uS(z.width,z.height,k.format,k.type);for(const Le of k.layerUpdates){const $e=z.data.subarray(Le*ae/z.data.BYTES_PER_ELEMENT,(Le+1)*ae/z.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,Le,z.width,z.height,1,Q,fe,$e)}k.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,z.width,z.height,z.depth,Q,fe,z.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,ve,z.width,z.height,z.depth,0,Q,fe,z.data);else if(k.isData3DTexture)q?(Te&&t.texStorage3D(n.TEXTURE_3D,He,ve,z.width,z.height,z.depth),J&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,z.width,z.height,z.depth,Q,fe,z.data)):t.texImage3D(n.TEXTURE_3D,0,ve,z.width,z.height,z.depth,0,Q,fe,z.data);else if(k.isFramebufferTexture){if(Te)if(q)t.texStorage2D(n.TEXTURE_2D,He,ve,z.width,z.height);else{let ae=z.width,Le=z.height;for(let $e=0;$e<He;$e++)t.texImage2D(n.TEXTURE_2D,$e,ve,ae,Le,0,Q,fe,null),ae>>=1,Le>>=1}}else if(pt.length>0){if(q&&Te){const ae=et(pt[0]);t.texStorage2D(n.TEXTURE_2D,He,ve,ae.width,ae.height)}for(let ae=0,Le=pt.length;ae<Le;ae++)Fe=pt[ae],q?J&&t.texSubImage2D(n.TEXTURE_2D,ae,0,0,Q,fe,Fe):t.texImage2D(n.TEXTURE_2D,ae,ve,Q,fe,Fe);k.generateMipmaps=!1}else if(q){if(Te){const ae=et(z);t.texStorage2D(n.TEXTURE_2D,He,ve,ae.width,ae.height)}J&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,Q,fe,z)}else t.texImage2D(n.TEXTURE_2D,0,ve,Q,fe,z);x(k)&&g(Ie),ft.__version=Re.version,k.onUpdate&&k.onUpdate(k)}j.__version=k.version}function pe(j,k,ge){if(k.image.length!==6)return;const Ie=we(j,k),De=k.source;t.bindTexture(n.TEXTURE_CUBE_MAP,j.__webglTexture,n.TEXTURE0+ge);const Re=i.get(De);
vendor: 1,970 bytes, line 3854
3854if(De.version!==Re.__version||Ie===!0){t.activeTexture(n.TEXTURE0+ge);const ft=cn.getPrimaries(cn.workingColorSpace),N=k.colorSpace===us?null:cn.getPrimaries(k.colorSpace),w=k.colorSpace===us||ft===N?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,k.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,k.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,w);const R=k.isCompressedTexture||k.image[0].isCompressedTexture,z=k.image[0]&&k.image[0].isDataTexture,Q=[];for(let Le=0;Le<6;Le++)!R&&!z?Q[Le]=_(k.image[Le],!0,r.maxCubemapSize):Q[Le]=z?k.image[Le].image:k.image[Le],Q[Le]=ht(k,Q[Le]);const fe=Q[0],ve=s.convert(k.format,k.colorSpace),Fe=s.convert(k.type),pt=S(k.internalFormat,ve,Fe,k.colorSpace),q=k.isVideoTexture!==!0,Te=Re.__version===void 0||Ie===!0,J=De.dataReady;let He=E(k,fe);de(n.TEXTURE_CUBE_MAP,k);let ae;if(R){q&&Te&&t.texStorage2D(n.TEXTURE_CUBE_MAP,He,pt,fe.width,fe.height);for(let Le=0;Le<6;Le++){ae=Q[Le].mipmaps;for(let $e=0;$e<ae.length;$e++){const st=ae[$e];k.format!==Dn?ve!==null?q?J&&t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e,0,0,st.width,st.height,ve,st.data):t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e,pt,st.width,st.height,0,st.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):q?J&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e,0,0,st.width,st.height,ve,Fe,st.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e,pt,st.width,st.height,0,ve,Fe,st.data)}}}else{if(ae=k.mipmaps,q&&Te){ae.length>0&&He++;const Le=et(Q[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,He,pt,Le.width,Le.height)}for(let Le=0;Le<6;Le++)if(z){q?J&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0,0,0,Q[Le].width,Q[Le].height,ve,Fe,Q[Le].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0,pt,Q[Le].width,Q[Le].height,0,ve,Fe,Q[Le].data);for(let $e=0;$e<ae.length;
vendor: 15,150 bytes, line 3854
3854$e++){const zt=ae[$e].image[Le].image;q?J&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e+1,0,0,zt.width,zt.height,ve,Fe,zt.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e+1,pt,zt.width,zt.height,0,ve,Fe,zt.data)}}else{q?J&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0,0,0,ve,Fe,Q[Le]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0,pt,ve,Fe,Q[Le]);for(let $e=0;$e<ae.length;$e++){const st=ae[$e];q?J&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e+1,0,0,ve,Fe,st.image[Le]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Le,$e+1,pt,ve,Fe,st.image[Le])}}}x(k)&&g(n.TEXTURE_CUBE_MAP),Re.__version=De.version,k.onUpdate&&k.onUpdate(k)}j.__version=k.version}function be(j,k,ge,Ie,De,Re){const ft=s.convert(ge.format,ge.colorSpace),N=s.convert(ge.type),w=S(ge.internalFormat,ft,N,ge.colorSpace);if(!i.get(k).__hasExternalTextures){const z=Math.max(1,k.width>>Re),Q=Math.max(1,k.height>>Re);De===n.TEXTURE_3D||De===n.TEXTURE_2D_ARRAY?t.texImage3D(De,Re,w,z,Q,k.depth,0,ft,N,null):t.texImage2D(De,Re,w,z,Q,0,ft,N,null)}t.bindFramebuffer(n.FRAMEBUFFER,j),Ve(k)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Ie,De,i.get(ge).__webglTexture,0,je(k)):(De===n.TEXTURE_2D||De>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Ie,De,i.get(ge).__webglTexture,Re),t.bindFramebuffer(n.FRAMEBUFFER,null)}function Ne(j,k,ge){if(n.bindRenderbuffer(n.RENDERBUFFER,j),k.depthBuffer){const Ie=k.depthTexture,De=Ie&&Ie.isDepthTexture?Ie.type:null,Re=A(k.stencilBuffer,De),ft=k.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,N=je(k);Ve(k)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,N,Re,k.width,k.height):ge?n.renderbufferStorageMultisample(n.RENDERBUFFER,N,Re,k.width,k.height):n.renderbufferStorage(n.RENDERBUFFER,Re,k.width,k.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,ft,n.RENDERBUFFER,j)}else{const Ie=k.textures;for(let De=0;De<Ie.length;De++){const Re=Ie[De],ft=s.convert(Re.format,Re.colorSpace),N=s.convert(Re.type),w=S(Re.internalFormat,ft,N,Re.colorSpace),R=je(k);ge&&Ve(k)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,R,w,k.width,k.height):Ve(k)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,R,w,k.width,k.height):n.renderbufferStorage(n.RENDERBUFFER,w,k.width,k.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}function ke(j,k){if(k&&k.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(n.FRAMEBUFFER,j),!(k.depthTexture&&k.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(k.depthTexture).__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),se(k.depthTexture,0);const Ie=i.get(k.depthTexture).__webglTexture,De=je(k);if(k.depthTexture.format===rc)Ve(k)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,Ie,0,De):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,Ie,0);else if(k.depthTexture.format===$a)Ve(k)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,Ie,0,De):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,Ie,0);else throw new Error("Unknown depthTexture format")}function nt(j){const k=i.get(j),ge=j.isWebGLCubeRenderTarget===!0;if(k.__boundDepthTexture!==j.depthTexture){const Ie=j.depthTexture;if(k.__depthDisposeCallback&&k.__depthDisposeCallback(),Ie){const De=()=>{delete k.__boundDepthTexture,delete k.__depthDisposeCallback,Ie.removeEventListener("dispose",De)};Ie.addEventListener("dispose",De),k.__depthDisposeCallback=De}k.__boundDepthTexture=Ie}if(j.depthTexture&&!k.__autoAllocateDepthBuffer){if(ge)throw new Error("target.depthTexture not supported in Cube render targets");ke(k.__webglFramebuffer,j)}else if(ge){k.__webglDepthbuffer=[];for(let Ie=0;Ie<6;Ie++)if(t.bindFramebuffer(n.FRAMEBUFFER,k.__webglFramebuffer[Ie]),k.__webglDepthbuffer[Ie]===void 0)k.__webglDepthbuffer[Ie]=n.createRenderbuffer(),Ne(k.__webglDepthbuffer[Ie],j,!1);else{const De=j.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Re=k.__webglDepthbuffer[Ie];n.bindRenderbuffer(n.RENDERBUFFER,Re),n.framebufferRenderbuffer(n.FRAMEBUFFER,De,n.RENDERBUFFER,Re)}}else if(t.bindFramebuffer(n.FRAMEBUFFER,k.__webglFramebuffer),k.__webglDepthbuffer===void 0)k.__webglDepthbuffer=n.createRenderbuffer(),Ne(k.__webglDepthbuffer,j,!1);else{const Ie=j.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,De=k.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,De),n.framebufferRenderbuffer(n.FRAMEBUFFER,Ie,n.RENDERBUFFER,De)}t.bindFramebuffer(n.FRAMEBUFFER,null)}function vt(j,k,ge){const Ie=i.get(j);k!==void 0&&be(Ie.__webglFramebuffer,j,j.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),ge!==void 0&&nt(j)}function ut(j){const k=j.texture,ge=i.get(j),Ie=i.get(k);j.addEventListener("dispose",b);const De=j.textures,Re=j.isWebGLCubeRenderTarget===!0,ft=De.length>1;if(ft||(Ie.__webglTexture===void 0&&(Ie.__webglTexture=n.createTexture()),Ie.__version=k.version,o.memory.textures++),Re){ge.__webglFramebuffer=[];for(let N=0;N<6;N++)if(k.mipmaps&&k.mipmaps.length>0){ge.__webglFramebuffer[N]=[];for(let w=0;w<k.mipmaps.length;w++)ge.__webglFramebuffer[N][w]=n.createFramebuffer()}else ge.__webglFramebuffer[N]=n.createFramebuffer()}else{if(k.mipmaps&&k.mipmaps.length>0){ge.__webglFramebuffer=[];for(let N=0;N<k.mipmaps.length;N++)ge.__webglFramebuffer[N]=n.createFramebuffer()}else ge.__webglFramebuffer=n.createFramebuffer();if(ft)for(let N=0,w=De.length;N<w;N++){const R=i.get(De[N]);R.__webglTexture===void 0&&(R.__webglTexture=n.createTexture(),o.memory.textures++)}if(j.samples>0&&Ve(j)===!1){ge.__webglMultisampledFramebuffer=n.createFramebuffer(),ge.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,ge.__webglMultisampledFramebuffer);for(let N=0;N<De.length;N++){const w=De[N];ge.__webglColorRenderbuffer[N]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,ge.__webglColorRenderbuffer[N]);const R=s.convert(w.format,w.colorSpace),z=s.convert(w.type),Q=S(w.internalFormat,R,z,w.colorSpace,j.isXRRenderTarget===!0),fe=je(j);n.renderbufferStorageMultisample(n.RENDERBUFFER,fe,Q,j.width,j.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+N,n.RENDERBUFFER,ge.__webglColorRenderbuffer[N])}n.bindRenderbuffer(n.RENDERBUFFER,null),j.depthBuffer&&(ge.__webglDepthRenderbuffer=n.createRenderbuffer(),Ne(ge.__webglDepthRenderbuffer,j,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if(Re){t.bindTexture(n.TEXTURE_CUBE_MAP,Ie.__webglTexture),de(n.TEXTURE_CUBE_MAP,k);for(let N=0;N<6;N++)if(k.mipmaps&&k.mipmaps.length>0)for(let w=0;w<k.mipmaps.length;w++)be(ge.__webglFramebuffer[N][w],j,k,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+N,w);else be(ge.__webglFramebuffer[N],j,k,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+N,0);x(k)&&g(n.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(ft){for(let N=0,w=De.length;N<w;N++){const R=De[N],z=i.get(R);t.bindTexture(n.TEXTURE_2D,z.__webglTexture),de(n.TEXTURE_2D,R),be(ge.__webglFramebuffer,j,R,n.COLOR_ATTACHMENT0+N,n.TEXTURE_2D,0),x(R)&&g(n.TEXTURE_2D)}t.unbindTexture()}else{let N=n.TEXTURE_2D;if((j.isWebGL3DRenderTarget||j.isWebGLArrayRenderTarget)&&(N=j.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),t.bindTexture(N,Ie.__webglTexture),de(N,k),k.mipmaps&&k.mipmaps.length>0)for(let w=0;w<k.mipmaps.length;w++)be(ge.__webglFramebuffer[w],j,k,n.COLOR_ATTACHMENT0,N,w);else be(ge.__webglFramebuffer,j,k,n.COLOR_ATTACHMENT0,N,0);x(k)&&g(N),t.unbindTexture()}j.depthBuffer&&nt(j)}function Ze(j){const k=j.textures;for(let ge=0,Ie=k.length;ge<Ie;ge++){const De=k[ge];if(x(De)){const Re=j.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D,ft=i.get(De).__webglTexture;t.bindTexture(Re,ft),g(Re),t.unbindTexture()}}}const Be=[],X=[];function We(j){if(j.samples>0){if(Ve(j)===!1){const k=j.textures,ge=j.width,Ie=j.height;let De=n.COLOR_BUFFER_BIT;const Re=j.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ft=i.get(j),N=k.length>1;if(N)for(let w=0;w<k.length;w++)t.bindFramebuffer(n.FRAMEBUFFER,ft.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+w,n.RENDERBUFFER,null),t.bindFramebuffer(n.FRAMEBUFFER,ft.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+w,n.TEXTURE_2D,null,0);t.bindFramebuffer(n.READ_FRAMEBUFFER,ft.__webglMultisampledFramebuffer),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,ft.__webglFramebuffer);for(let w=0;w<k.length;w++){if(j.resolveDepthBuffer&&(j.depthBuffer&&(De|=n.DEPTH_BUFFER_BIT),j.stencilBuffer&&j.resolveStencilBuffer&&(De|=n.STENCIL_BUFFER_BIT)),N){n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,ft.__webglColorRenderbuffer[w]);const R=i.get(k[w]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,R,0)}n.blitFramebuffer(0,0,ge,Ie,0,0,ge,Ie,De,n.NEAREST),l===!0&&(Be.length=0,X.length=0,Be.push(n.COLOR_ATTACHMENT0+w),j.depthBuffer&&j.resolveDepthBuffer===!1&&(Be.push(Re),X.push(Re),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,X)),n.invalidateFramebuffer(n.READ_FRAMEBUFFER,Be))}if(t.bindFramebuffer(n.READ_FRAMEBUFFER,null),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),N)for(let w=0;w<k.length;w++){t.bindFramebuffer(n.FRAMEBUFFER,ft.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+w,n.RENDERBUFFER,ft.__webglColorRenderbuffer[w]);const R=i.get(k[w]).__webglTexture;t.bindFramebuffer(n.FRAMEBUFFER,ft.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+w,n.TEXTURE_2D,R,0)}t.bindFramebuffer(n.DRAW_FRAMEBUFFER,ft.__webglMultisampledFramebuffer)}else if(j.depthBuffer&&j.resolveDepthBuffer===!1&&l){const k=j.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[k])}}}function je(j){return Math.min(r.maxSamples,j.samples)}function Ve(j){const k=i.get(j);return j.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function Xe(j){const k=o.render.frame;f.get(j)!==k&&(f.set(j,k),j.update())}function ht(j,k){const ge=j.colorSpace,Ie=j.format,De=j.type;return j.isCompressedTexture===!0||j.isVideoTexture===!0||ge!==Er&&ge!==us&&(cn.getTransfer(ge)===_n?(Ie!==Dn||De!==di)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ge)),k}function et(j){return typeof HTMLImageElement<"u"&&j instanceof HTMLImageElement?(c.width=j.naturalWidth||j.width,c.height=j.naturalHeight||j.height):typeof VideoFrame<"u"&&j instanceof VideoFrame?(c.width=j.displayWidth,c.height=j.displayHeight):(c.width=j.width,c.height=j.height),c}this.allocateTextureUnit=Y,this.resetTextureUnits=B,this.setTexture2D=se,this.setTexture2DArray=ce,this.setTexture3D=ie,this.setTextureCube=ye,this.rebindTextures=vt,this.setupRenderTarget=ut,this.updateRenderTargetMipmap=Ze,this.updateMultisampleRenderTarget=We,this.setupDepthRenderbuffer=nt,this.setupFrameBufferTexture=be,this.useMultisampledRTT=Ve}function eB(n,e){function t(i,r=us){let s;const o=cn.getTransfer(r);if(i===di)return n.UNSIGNED_BYTE;if(i===Rv)return n.UNSIGNED_SHORT_4_4_4_4;if(i===bv)return n.UNSIGNED_SHORT_5_5_5_1;if(i===HA)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===Tv)return n.BYTE;if(i===Cv)return n.SHORT;if(i===af)return n.UNSIGNED_SHORT;if(i===Qd)return n.INT;if(i===Vs)return n.UNSIGNED_INT;if(i===vn)return n.FLOAT;if(i===li)return n.HALF_FLOAT;if(i===GA)return n.ALPHA;if(i===VA)return n.RGB;if(i===Dn)return n.RGBA;if(i===WA)return n.LUMINANCE;if(i===XA)return n.LUMINANCE_ALPHA;if(i===rc)return n.DEPTH_COMPONENT;if(i===$a)return n.DEPTH_STENCIL;if(i===Ef)return n.RED;if(i===Zd)return n.RED_INTEGER;if(i===jA)return n.RG;if(i===Iv)return n.RG_INTEGER;if(i===Pv)return n.RGBA_INTEGER;if(i===jh||i===Jh||i===Yh||i===Kh)if(o===_n)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===jh)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Jh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Yh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Kh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===jh)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Jh)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Yh)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Kh)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===S0||i===A0||i===M0||i===E0)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===S0)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===A0)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===M0)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===E0)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===w0||i===T0||i===C0)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===w0||i===T0)return o===_n?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===C0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===R0||i===b0||i===I0||i===P0||i===B0||i===D0||i===L0||i===F0||i===N0||i===U0||i===O0||i===k0||i===z0||i===H0)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===R0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===b0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===I0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===P0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===B0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===D0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===L0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===F0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===N0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===U0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===O0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===k0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===z0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===H0)return o===_n?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Qh||i===G0||i===V0)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===Qh)return o===_n?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===G0)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===V0)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===JA||i===W0||i===X0||i===j0)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===Qh)return s.COMPRESSED_RED_RGT
vendor: 6,950 bytes, lines 3854-3878
3854C1_EXT;if(i===W0)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===X0)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===j0)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===qa?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}class tB extends Tn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Vo extends jt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const aG={type:"move"};class h_{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Vo,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 Vo,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new G,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new G),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Vo,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new G,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new G),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const x=t.getJointPose(_,i),g=this._getHandJoint(c,_);x!==null&&(g.matrix.fromArray(x.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=x.radius),g.visible=x!==null}const f=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],p=f.position.distanceTo(d.position),m=.02,v=.005;c.inputState.pinching&&p>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&p<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(aG)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Vo;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const lG=`
3855void main() {
3856
3857	gl_Position = vec4( position, 1.0 );
3858
3859}`,cG=`
3860uniform sampler2DArray depthColor;
3861uniform float depthWidth;
3862uniform float depthHeight;
3863
3864void main() {
3865
3866	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
3867
3868	if ( coord.x >= 1.0 ) {
3869
3870		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
3871
3872	} else {
3873
3874		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
3875
3876	}
3877
3878}`;class uG{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new Qt,s=e.properties.get(r);s.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new nn({vertexShader:lG,fragmentShader:cG,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new yn(new xo(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class fG extends Tr{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,f=null,d=null,p=null,m=null,v=null;const _=new uG,x=t.getContextAttributes();let g=null,S=null;const A=[],E=[],I=new _e;let b=null;const P=new Tn;P.layers.enable(1),P.viewport=new rn;const D=new Tn;D.layers.enable(2),D.viewport=new rn;const O=[P,D],C=new tB;C.layers.enable(1),C.layers.enable(2);let B=null,Y=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(pe){let be=A[pe];return be===void 0&&(be=new h_,A[pe]=be),be.getTargetRaySpace()},this.getControllerGrip=function(pe){let be=A[pe];return be===void 0&&(be=new h_,A[pe]=be),be.getGripSpace()},this.getHand=function(pe){let be=A[pe];return be===void 0&&(be=new h_,A[pe]=be),be.getHandSpace()};function $(pe){const be=E.indexOf(pe.inputSource);if(be===-1)return;const Ne=A[be];Ne!==void 0&&(Ne.update(pe.inputSource,pe.frame,c||o),Ne.dispatchEvent({type:pe.type,data:pe.inputSource}))}function se(){r.removeEventListener("select",$),r.removeEventListener("selectstart",$),r.removeEventListener("selectend",$),r.removeEventListener("squeeze",$),r.removeEventListener("squeezestart",$),r.removeEventListener("squeezeend",$),r.removeEventListener("end",se),r.removeEventListener("inputsourceschange",ce);for(let pe=0;pe<A.length;pe++){const be=E[pe];be!==null&&(E[pe]=null,A[pe].disconnect(be))}B=null,Y=null,_.reset(),e.setRenderTarget(g),m=null,p=null,d=null,r=null,S=null,Ue.stop(),i.isPresenting=!1,e.setPixelRatio(b),e.setSize(I.width,I.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(pe){s=pe,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(pe){a=pe,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(pe){c=pe},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return d},this.getFrame=function(){return v}
vendor: 6,446 bytes, line 3878
3878,this.getSession=function(){return r},this.setSession=async function(pe){if(r=pe,r!==null){if(g=e.getRenderTarget(),r.addEventListener("select",$),r.addEventListener("selectstart",$),r.addEventListener("selectend",$),r.addEventListener("squeeze",$),r.addEventListener("squeezestart",$),r.addEventListener("squeezeend",$),r.addEventListener("end",se),r.addEventListener("inputsourceschange",ce),x.xrCompatible!==!0&&await t.makeXRCompatible(),b=e.getPixelRatio(),e.getSize(I),r.renderState.layers===void 0){const be={antialias:x.antialias,alpha:!0,depth:x.depth,stencil:x.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,be),r.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),S=new xn(m.framebufferWidth,m.framebufferHeight,{format:Dn,type:di,colorSpace:e.outputColorSpace,stencilBuffer:x.stencil})}else{let be=null,Ne=null,ke=null;x.depth&&(ke=x.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,be=x.stencil?$a:rc,Ne=x.stencil?qa:Vs);const nt={colorFormat:t.RGBA8,depthFormat:ke,scaleFactor:s};d=new XRWebGLBinding(r,t),p=d.createProjectionLayer(nt),r.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),S=new xn(p.textureWidth,p.textureHeight,{format:Dn,type:di,depthTexture:new Fv(p.textureWidth,p.textureHeight,Ne,void 0,void 0,void 0,void 0,void 0,void 0,be),stencilBuffer:x.stencil,colorSpace:e.outputColorSpace,samples:x.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1})}S.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),Ue.setContext(r),Ue.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function ce(pe){for(let be=0;be<pe.removed.length;be++){const Ne=pe.removed[be],ke=E.indexOf(Ne);ke>=0&&(E[ke]=null,A[ke].disconnect(Ne))}for(let be=0;be<pe.added.length;be++){const Ne=pe.added[be];let ke=E.indexOf(Ne);if(ke===-1){for(let vt=0;vt<A.length;vt++)if(vt>=E.length){E.push(Ne),ke=vt;break}else if(E[vt]===null){E[vt]=Ne,ke=vt;break}if(ke===-1)break}const nt=A[ke];nt&&nt.connect(Ne)}}const ie=new G,ye=new G;function W(pe,be,Ne){ie.setFromMatrixPosition(be.matrixWorld),ye.setFromMatrixPosition(Ne.matrixWorld);const ke=ie.distanceTo(ye),nt=be.projectionMatrix.elements,vt=Ne.projectionMatrix.elements,ut=nt[14]/(nt[10]-1),Ze=nt[14]/(nt[10]+1),Be=(nt[9]+1)/nt[5],X=(nt[9]-1)/nt[5],We=(nt[8]-1)/nt[0],je=(vt[8]+1)/vt[0],Ve=ut*We,Xe=ut*je,ht=ke/(-We+je),et=ht*-We;if(be.matrixWorld.decompose(pe.position,pe.quaternion,pe.scale),pe.translateX(et),pe.translateZ(ht),pe.matrixWorld.compose(pe.position,pe.quaternion,pe.scale),pe.matrixWorldInverse.copy(pe.matrixWorld).invert(),nt[10]===-1)pe.projectionMatrix.copy(be.projectionMatrix),pe.projectionMatrixInverse.copy(be.projectionMatrixInverse);else{const j=ut+ht,k=Ze+ht,ge=Ve-et,Ie=Xe+(ke-et),De=Be*Ze/k*j,Re=X*Ze/k*j;pe.projectionMatrix.makePerspective(ge,Ie,De,Re,j,k),pe.projectionMatrixInverse.copy(pe.projectionMatrix).invert()}}function ue(pe,be){be===null?pe.matrixWorld.copy(pe.matrix):pe.matrixWorld.multiplyMatrices(be.matrixWorld,pe.matrix),pe.matrixWorldInverse.copy(pe.matrixWorld).invert()}this.updateCamera=function(pe){if(r===null)return;let be=pe.near,Ne=pe.far;_.texture!==null&&(_.depthNear>0&&(be=_.depthNear),_.depthFar>0&&(Ne=_.depthFar)),C.near=D.near=P.near=be,C.far=D.far=P.far=Ne,(B!==C.near||Y!==C.far)&&(r.updateRenderState({depthNear:C.near,depthFar:C.far}),B=C.near,Y=C.far);const ke=pe.parent,nt=C.cameras;ue(C,ke);for(let vt=0;vt<nt.length;vt++)ue(nt[vt],ke);nt.length===2?W(C,P,D):C.projectionMatrix.copy(P.projectionMatrix),oe(pe,C,ke)};function oe(pe,be,Ne){Ne===null?pe.matrix.copy(be.matrixWorld):(pe.matrix.copy(Ne.matrixWorld),pe.matrix.invert(),pe.matrix.multiply(be.matrixWorld)),pe.matrix.decompose(pe.position,pe.quaternion,pe.scale),pe.updateMatrixWorld(!0),pe.projectionMatrix.copy(be.projectionMatrix),pe.projectionMatrixInverse.copy(be.projectionMatrixInverse),pe.isPerspectiveCamera&&(pe.fov=uf*2*Math.atan(1/pe.projectionMatrix.elements[5]),pe.zoom=1)}this.getCamera=function(){return C},this.getFoveation=function(){if(!(p===null&&m===null))return l},this.setFoveation=function(pe){l=pe,p!==null&&(p.fixedFoveation=pe),m!==null&&m.fixedFoveation!==void 0&&(m.fixedFoveation=pe)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(C)};let de=null;function we(pe,be){if(f=be.getViewerPose(c||o),v=be,f!==null){const Ne=f.views;m!==null&&(e.setRenderTargetFramebuffer(S,m.framebuffer),e.setRenderTarget(S));let ke=!1;Ne.length!==C.cameras.length&&(C.cameras.length=0,ke=!0);for(let vt=0;vt<Ne.length;vt++){const ut=Ne[vt];let Ze=null;if(m!==null)Ze=m.getViewport(ut);else{const X=d.getViewSubImage(p,ut);Ze=X.viewport,vt===0&&(e.setRenderTargetTextures(S,X.colorTexture,p.ignoreDepthValues?void 0:X.depthStencilTexture),e.setRenderTarget(S))}let Be=O[vt];Be===void 0&&(Be=new Tn,Be.layers.enable(vt),Be.viewport=new rn,O[vt]=Be),Be.matrix.fromArray(ut.transform.matrix),Be.matrix.decompose(Be.position,Be.quaternion,Be.scale),Be.projectionMatrix.fromArray(ut.projectionMatrix),Be.projectionMatrixInverse.copy(Be.projectionMatrix).invert(),Be.viewport.set(Ze.x,Ze.y,Ze.width,Ze.height),vt===0&&(C.matrix.copy(Be.matrix),C.matrix.decompose(C.position,C.quaternion,C.scale)),ke===!0&&C.cameras.push(Be)}const nt=r.enabledFeatures;if(nt&&nt.includes("depth-sensing")){const vt=d.getDepthInformation(Ne[0]);vt&&vt.isValid&&vt.texture&&_.init(e,vt,r.renderState)}}for(let Ne=0;Ne<A.length;Ne++){const ke=E[Ne],nt=A[Ne];ke!==null&&nt!==void 0&&nt.update(ke,be,c||o)}de&&de(pe,be),be.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:be}),v=null}const Ue=new KP;Ue.setAnimationLoop(we),this.setAnimationLoop=function(pe){de=pe},this.dispose=function(){}}}const wl=new jr,hG=new ct;function dG(n,e){function t(x,g){x.matrixAutoUpdate===!0&&x.updateMatrix(),g.value.copy(x.matrix)}function i(x,g){g.color.getRGB(x.fogColor.value,jP(n)),g.isFog?(x.fogNear.value=g.near,x.fogFar.value=g.far):g.isFogExp2&&(x.fogDensity.value=g.density)}function r(x,g,S,A,E){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(x,g):g.isMeshToonMaterial?(s(x,g),d(x,g)):g.isMeshPhongMaterial?(s(x,g),f(x,g)):g.isMeshStandardMaterial?(s(x,g),p(x,g),g.isMeshPhysicalMaterial&&m(x,g,E)):g.isMeshMat
vendor: 24,310 bytes, line 3878
3878capMaterial?(s(x,g),v(x,g)):g.isMeshDepthMaterial?s(x,g):g.isMeshDistanceMaterial?(s(x,g),_(x,g)):g.isMeshNormalMaterial?s(x,g):g.isLineBasicMaterial?(o(x,g),g.isLineDashedMaterial&&a(x,g)):g.isPointsMaterial?l(x,g,S,A):g.isSpriteMaterial?c(x,g):g.isShadowMaterial?(x.color.value.copy(g.color),x.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(x,g){x.opacity.value=g.opacity,g.color&&x.diffuse.value.copy(g.color),g.emissive&&x.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(x.map.value=g.map,t(g.map,x.mapTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,t(g.alphaMap,x.alphaMapTransform)),g.bumpMap&&(x.bumpMap.value=g.bumpMap,t(g.bumpMap,x.bumpMapTransform),x.bumpScale.value=g.bumpScale,g.side===ai&&(x.bumpScale.value*=-1)),g.normalMap&&(x.normalMap.value=g.normalMap,t(g.normalMap,x.normalMapTransform),x.normalScale.value.copy(g.normalScale),g.side===ai&&x.normalScale.value.negate()),g.displacementMap&&(x.displacementMap.value=g.displacementMap,t(g.displacementMap,x.displacementMapTransform),x.displacementScale.value=g.displacementScale,x.displacementBias.value=g.displacementBias),g.emissiveMap&&(x.emissiveMap.value=g.emissiveMap,t(g.emissiveMap,x.emissiveMapTransform)),g.specularMap&&(x.specularMap.value=g.specularMap,t(g.specularMap,x.specularMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest);const S=e.get(g),A=S.envMap,E=S.envMapRotation;A&&(x.envMap.value=A,wl.copy(E),wl.x*=-1,wl.y*=-1,wl.z*=-1,A.isCubeTexture&&A.isRenderTargetTexture===!1&&(wl.y*=-1,wl.z*=-1),x.envMapRotation.value.setFromMatrix4(hG.makeRotationFromEuler(wl)),x.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,x.reflectivity.value=g.reflectivity,x.ior.value=g.ior,x.refractionRatio.value=g.refractionRatio),g.lightMap&&(x.lightMap.value=g.lightMap,x.lightMapIntensity.value=g.lightMapIntensity,t(g.lightMap,x.lightMapTransform)),g.aoMap&&(x.aoMap.value=g.aoMap,x.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,x.aoMapTransform))}function o(x,g){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,g.map&&(x.map.value=g.map,t(g.map,x.mapTransform))}function a(x,g){x.dashSize.value=g.dashSize,x.totalSize.value=g.dashSize+g.gapSize,x.scale.value=g.scale}function l(x,g,S,A){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.size.value=g.size*S,x.scale.value=A*.5,g.map&&(x.map.value=g.map,t(g.map,x.uvTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,t(g.alphaMap,x.alphaMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest)}function c(x,g){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.rotation.value=g.rotation,g.map&&(x.map.value=g.map,t(g.map,x.mapTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,t(g.alphaMap,x.alphaMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest)}function f(x,g){x.specular.value.copy(g.specular),x.shininess.value=Math.max(g.shininess,1e-4)}function d(x,g){g.gradientMap&&(x.gradientMap.value=g.gradientMap)}function p(x,g){x.metalness.value=g.metalness,g.metalnessMap&&(x.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,x.metalnessMapTransform)),x.roughness.value=g.roughness,g.roughnessMap&&(x.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,x.roughnessMapTransform)),g.envMap&&(x.envMapIntensity.value=g.envMapIntensity)}function m(x,g,S){x.ior.value=g.ior,g.sheen>0&&(x.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),x.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(x.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,x.sheenColorMapTransform)),g.sheenRoughnessMap&&(x.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,x.sheenRoughnessMapTransform))),g.clearcoat>0&&(x.clearcoat.value=g.clearcoat,x.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(x.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,x.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(x.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,x.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(x.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,x.clearcoatNormalMapTransform),x.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===ai&&x.clearcoatNormalScale.value.negate())),g.dispersion>0&&(x.dispersion.value=g.dispersion),g.iridescence>0&&(x.iridescence.value=g.iridescence,x.iridescenceIOR.value=g.iridescenceIOR,x.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],x.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(x.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,x.iridescenceMapTransform)),g.iridescenceThicknessMap&&(x.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,x.iridescenceThicknessMapTransform))),g.transmission>0&&(x.transmission.value=g.transmission,x.transmissionSamplerMap.value=S.texture,x.transmissionSamplerSize.value.set(S.width,S.height),g.transmissionMap&&(x.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,x.transmissionMapTransform)),x.thickness.value=g.thickness,g.thicknessMap&&(x.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,x.thicknessMapTransform)),x.attenuationDistance.value=g.attenuationDistance,x.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(x.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(x.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,x.anisotropyMapTransform))),x.specularIntensity.value=g.specularIntensity,x.specularColor.value.copy(g.specularColor),g.specularColorMap&&(x.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,x.specularColorMapTransform)),g.specularIntensityMap&&(x.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,x.specularIntensityMapTransform))}function v(x,g){g.matcap&&(x.matcap.value=g.matcap)}function _(x,g){const S=e.get(g).light;x.referencePosition.value.setFromMatrixPosition(S.matrixWorld),x.nearDistance.value=S.shadow.camera.near,x.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function pG(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(S,A){const E=A.program;i.uniformBlockBinding(S,E)}function c(S,A){let E=r[S.id];E===void 0&&(v(S),E=f(S),r[S.id]=E,S.addEventListener("dispose",x));const I=A.program;i.updateUBOMapping(S,I);const b=e.render.frame;s[S.id]!==b&&(p(S),s[S.id]=b)}function f(S){const A=d();S.__bindingPointIndex=A;const E=n.createBuffer(),I=S.__size,b=S.usage;return n.bindBuffer(n.UNIFORM_BUFFER,E),n.bufferData(n.UNIFORM_BUFFER,I,b),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,A,E),E}function d(){for(let S=0;S<a;S++)if(o.indexOf(S)===-1)return o.push(S),S;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(S){const A=r[S.id],E=S.uniforms,I=S.__cache;n.bindBuffer(n.UNIFORM_BUFFER,A);for(let b=0,P=E.length;b<P;b++){const D=Array.isArray(E[b])?E[b]:[E[b]];for(let O=0,C=D.length;O<C;O++){const B=D[O];if(m(B,b,O,I)===!0){const Y=B.__offset,$=Array.isArray(B.value)?B.value:[B.value];let se=0;for(let ce=0;ce<$.length;ce++){const ie=$[ce],ye=_(ie);typeof ie=="number"||typeof ie=="boolean"?(B.__data[0]=ie,n.bufferSubData(n.UNIFORM_BUFFER,Y+se,B.__data)):ie.isMatrix3?(B.__data[0]=ie.elements[0],B.__data[1]=ie.elements[1],B.__data[2]=ie.elements[2],B.__data[3]=0,B.__data[4]=ie.elements[3],B.__data[5]=ie.elements[4],B.__data[6]=ie.elements[5],B.__data[7]=0,B.__data[8]=ie.elements[6],B.__data[9]=ie.elements[7],B.__data[10]=ie.elements[8],B.__data[11]=0):(ie.toArray(B.__data,se),se+=ye.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,Y,B.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}function m(S,A,E,I){const b=S.value,P=A+"_"+E;if(I[P]===void 0)return typeof b=="number"||typeof b=="boolean"?I[P]=b:I[P]=b.clone(),!0;{const D=I[P];if(typeof b=="number"||typeof b=="boolean"){if(D!==b)return I[P]=b,!0}else if(D.equals(b)===!1)return D.copy(b),!0}return!1}function v(S){const A=S.uniforms;let E=0;const I=16;for(let P=0,D=A.length;P<D;P++){const O=Array.isArray(A[P])?A[P]:[A[P]];for(let C=0,B=O.length;C<B;C++){const Y=O[C],$=Array.isArray(Y.value)?Y.value:[Y.value];for(let se=0,ce=$.length;se<ce;se++){const ie=$[se],ye=_(ie),W=E%I,ue=W%ye.boundary,oe=W+ue;E+=ue,oe!==0&&I-oe<ye.storage&&(E+=I-oe),Y.__data=new Float32Array(ye.storage/Float32Array.BYTES_PER_ELEMENT),Y.__offset=E,E+=ye.storage}}}const b=E%I;return b>0&&(E+=I-b),S.__size=E,S.__cache={},this}function _(S){const A={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(A.boundary=4,A.storage=4):S.isVector2?(A.boundary=8,A.storage=8):S.isVector3||S.isColor?(A.boundary=16,A.storage=12):S.isVector4?(A.boundary=16,A.storage=16):S.isMatrix3?(A.boundary=48,A.storage=48):S.isMatrix4?(A.boundary=64,A.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),A}function x(S){const A=S.target;A.removeEventListener("dispose",x);const E=o.indexOf(A.__bindingPointIndex);o.splice(E,1),n.deleteBuffer(r[A.id]),delete r[A.id],delete s[A.id]}function g(){for(const S in r)n.deleteBuffer(r[S]);o=[],r={},s={}}return{bind:l,update:c,dispose:g}}class oM{constructor(e={}){const{canvas:t=GP(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:f="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let p;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=i.getContextAttributes().alpha}else p=o;const m=new Uint32Array(4),v=new Int32Array(4);let _=null,x=null;const g=[],S=[];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._outputColorSpace=jn,this.toneMapping=Hs,this.toneMappingExposure=1;const A=this;let E=!1,I=0,b=0,P=null,D=-1,O=null;const C=new rn,B=new rn;let Y=null;const $=new qe(0);let se=0,ce=t.width,ie=t.height,ye=1,W=null,ue=null;const oe=new rn(0,0,ce,ie),de=new rn(0,0,ce,ie);let we=!1;const Ue=new ep;let pe=!1,be=!1;const Ne=new ct,ke=new ct,nt=new G,vt=new rn,ut={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ze=!1;function Be(){return P===null?ye:1}let X=i;function We(F,V){return t.getContext(F,V)}try{const F={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:f,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${yo}`),t.addEventListener("webglcontextlost",Le,!1),t.addEventListener("webglcontextrestored",$e,!1),t.addEventListener("webglcontextcreationerror",st,!1),X===null){const V="webgl2";if(X=We(V,F),X===null)throw We(V)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(F){throw console.error("THREE.WebGLRenderer: "+F.message),F}let je,Ve,Xe,ht,et,j,k,ge,Ie,De,Re,ft,N,w,R,z,Q,fe,ve,Fe,pt,q,Te,J;function He(){je=new _4(X),je.init(),q=new eB(X,je),Ve=new p4(X,je,e,q),Xe=new eG(X),Ve.reverseDepthBuffer&&Xe.buffers.depth.setReversed(!0),ht=new M4(X),et=new HH,j=new oG(X,je,Xe,et,Ve,q,ht),k=new g4(A),ge=new x4(A),Ie=new IO(X),Te=new h4(X,Ie),De=new S4(X,Ie,ht,Te),Re=new w4(X,De,Ie,ht),ve=new E4(X,Ve,j),z=new m4(et),ft=new zH(A,k,ge,je,Ve,Te,z),N=new dG(A,et),w=new VH,R=new KH(je),fe=new f4(A,k,ge,Xe,Re,p,l),Q=new qH(A,Re,Ve),J=new pG(X,ht,Ve,Xe),Fe=new d4(X,je,ht),pt=new A4(X,je,ht),ht.programs=ft.programs,A.capabilities=Ve,A.extensions=je,A.properties=et,A.renderLists=w,A.shadowMap=Q,A.state=Xe,A.info=ht}He();const ae=new fG(A,X);this.xr=ae,this.getContext=function(){return X},this.getContextAttributes=function(){return X.getContextAttributes()},this.forceContextLoss=function(){const F=je.get("WEBGL_lose_context");F&&F.loseContext()},this.forceContextRestore=function(){const F=je.get("WEBGL_lose_context");F&&F.restoreContext()},this.getPixelRatio=function(){return ye},this.setPixelRatio=function(F){F!==void 0&&(ye=F,this.setSize(ce,ie,!1))},this.getSize=function(F){return F.set(ce,ie)},this.setSize=function(F,V,te=!0){if(ae.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}ce=F,ie=V,t.width=Math.floor(F*ye),t.height=Math.floor(V*ye),te===!0&&(t.style.width=F+"px",t.style.height=V+"px"),this.setViewport(0,0,F,V)},this.getDrawingBufferSize=function(F){return F.set(ce*ye,ie*ye).floor()},this.setDrawingBufferSize=function(F,V,te){ce=F,ie=V,ye=te,t.width=Math.floor(F*te),t.height=Math.floor(V*te),this.setViewport(0,0,F,V)},this.getCurrentViewport=function(F){return F.copy(C)},this.getViewport=function(F){return F.copy(oe)},this.setViewport=function(F,V,te,ee){F.isVector4?oe.set(F.x,F.y,F.z,F.w):oe.set(F,V,te,ee),Xe.viewport(C.copy(oe).multiplyScalar(ye).round())},this.getScissor=function(F){return F.copy(de)},this.setScissor=function(F,V,te,ee){F.isVector4?de.set(F.x,F.y,F.z,F.w):de.set(F,V,te,ee),Xe.scissor(B.copy(de).multiplyScalar(ye).round())},this.getScissorTest=function(){return we},this.setScissorTest=function(F){Xe.setScissorTest(we=F)},this.setOpaqueSort=function(F){W=F},this.setTransparentSort=function(F){ue=F},this.getClearColor=function(F){return F.copy(fe.getClearColor())},this.setClearColor=function(){fe.setClearColor.apply(fe,arguments)},this.getClearAlpha=function(){return fe.getClearAlpha()},this.setClearAlpha=function(){fe.setClearAlpha.apply(fe,arguments)},this.clear=function(F=!0,V=!0,te=!0){let ee=0;if(F){let Z=!1;if(P!==null){const xe=P.texture.format;Z=xe===Pv||xe===Iv||xe===Zd}if(Z){const xe=P.texture.type,Se=xe===di||xe===Vs||xe===af||xe===qa||xe===Rv||xe===bv,Ee=fe.getClearColor(),Ke=fe.getClearAlpha(),Oe=Ee.r,ze=Ee.g,Ge=Ee.b;Se?(m[0]=Oe,m[1]=ze,m[2]=Ge,m[3]=Ke,X.clearBufferuiv(X.COLOR,0,m)):(v[0]=Oe,v[1]=ze,v[2]=Ge,v[3]=Ke,X.clearBufferiv(X.COLOR,0,v))}else ee|=X.COLOR_BUFFER_BIT}V&&(ee|=X.DEPTH_BUFFER_BIT,X.clearDepth(this.capabilities.reverseDepthBuffer?0:1)),te&&(ee|=X.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),X.clear(ee)},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",Le,!1),t.removeEventListener("webglcontextrestored",$e,!1),t.removeEventListener("webglcontextcreationerror",st,!1),w.dispose(),R.dispose(),et.dispose(),k.dispose(),ge.dispose(),Re.dispose(),Te.dispose(),J.dispose(),ft.dispose(),ae.dispose(),ae.removeEventListener("sessionstart",Ms),ae.removeEventListener("sessionend",Fc),Es.stop()};function Le(F){F.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),E=!0}function $e(){console.log("THREE.WebGLRenderer: Context Restored."),E=!1;const F=ht.autoReset,V=Q.enabled,te=Q.autoUpdate,ee=Q.needsUpdate,Z=Q.type;He(),ht.autoReset=F,Q.enabled=V,Q.autoUpdate=te,Q.needsUpdate=ee,Q.type=Z}function st(F){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",F.statusMessage)}function zt(F){const V=F.target;V.removeEventListener("dispose",zt),Zt(V)}function Zt(F){hn(F),et.remove(F)}function hn(F){const V=et.get(F).programs;V!==void 0&&(V.forEach(function(te){ft.releaseProgram(te)}),F.isShaderMaterial&&ft.releaseShaderCache(F))}this.renderBufferDirect=function(F,V,te,ee,Z,xe){V===null&&(V=ut);const Se=Z.isMesh&&Z.matrixWorld.determinant()<0,Ee=H(F,V,te,ee,Z);Xe.setMaterial(ee,Se);let Ke=te.index,Oe=1;if(ee.wireframe===!0){if(Ke=De.getWireframeAttribute(te),Ke===void 0)return;Oe=2}const ze=te.drawRange,Ge=te.attributes.position;let ot=ze.start*Oe,xt=(ze.start+ze.count)*Oe;xe!==null&&(ot=Math.max(ot,xe.start*Oe),xt=Math.min(xt,(xe.start+xe.count)*Oe)),Ke!==null?(ot=Math.max(ot,0),xt=Math.min(xt,Ke.count)):Ge!=null&&(ot=Math.max(ot,0),xt=Math.min(xt,Ge.count));const St=xt-ot;if(St<0||St===1/0)return;Te.setup(Z,ee,Ee,te,Ke);let _t,rt=Fe;if(Ke!==null&&(_t=Ie.get(Ke),rt=pt,rt.setIndex(_t)),Z.isMesh)ee.wireframe===!0?(Xe.setLineWidth(ee.wireframeLinewidth*Be()),rt.setMode(X.LINES)):rt.setMode(X.TRIANGLES);else if(Z.isLine){let Ye=ee.linewidth;Ye===void 0&&(Ye=1),Xe.setLineWidth(Ye*Be()),Z.isLineSegments?rt.setMode(X.LINES):Z.isLineLoop?rt.setMode(X.LINE_LOOP):rt.setMode(X.LINE_STRIP)}else Z.isPoints?rt.setMode(X.POINTS):Z.isSprite&&rt.setMode(X.TRIANGLES);if(Z.isBatchedMesh)if(Z._multiDrawInstances!==null)rt.renderMultiDrawInstances(Z._multiDrawStarts,Z._multiDrawCounts,Z._multiDrawCount,Z._multiDrawInstances);else if(je.get("WEBGL_multi_draw"))rt.renderMultiDraw(Z._multiDrawStarts,Z._multiDrawCounts,Z._multiDrawCount);else{const Ye=Z._multiDrawStarts,Ct=Z._multiDrawCounts,lt=Z._multiDrawCount,Xt=Ke?Ie.get(Ke).bytesPerElement:1,Ln=et.get(ee).currentProgram.getUniforms();for(let $t=0;$t<lt;$t++)Ln.setValue(X,"_gl_DrawID",$t),rt.render(Ye[$t]/Xt,Ct[$t])}else if(Z.isInstancedMesh)rt.renderInstances(ot,St,Z.count);else if(te.isInstancedBufferGeometry){const Ye=te._maxInstanceCount!==void 0?te._maxInstanceCount:1/0,Ct=Math.min(te.instanceCount,Ye);rt.renderInstances(ot,St,Ct)}else rt.render(ot,St)};function Nt(F,V,te){F.transparent===!0&&F.side===fi&&F.forceSinglePass===!1?(F.side=ai,F.needsUpdate=!0,_o(F,V,te),F.side=Xr,F.needsUpdate=!0,_o(F,V,te),F.side=fi):_o(F,V,te)}this.compile=function(F,V,te=null){te===null&&(te=F),x=R.get(te),x.init(V),S.push(x),te.traverseVisible(function(Z){Z.isLight&&Z.layers.test(V.layers)&&(x.pushLight(Z),Z.castShadow&&x.pushShadow(Z))}),F!==te&&F.traverseVisible(function(Z){Z.isLight&&Z.layers.test(V.layers)&&(x.pushLight(Z),Z.castShadow&&x.pushShadow(Z))}),x.setupLights();const ee=new Set;return F.traverse(function(Z){if(!(Z.isMesh||Z.isPoints||Z.isLine||Z.isSprite))return;const xe=Z.material;if(xe)if(Array.isArray(xe))for(let Se=0;Se<xe.length;Se++){const Ee=xe[Se];Nt(Ee,te,Z),ee.add(Ee)}else Nt(xe,te,Z),ee.add(xe)}),S.pop(),x=null,ee},this.compileAsync=function(F,V,te=null){const ee=this.compile(F,V,te);return new Promise(Z=>{function xe(){if(ee.forEach(function(Se){et.get(Se).currentProgram.isReady()&&ee.delete(Se)}),ee.size===0){Z(F);return}setTimeout(xe,10)}je.get("KHR_parallel_shader_compile")!==null?xe():setTimeout(xe,10)})};let En=null;function ti(F){En&&En(F)}function Ms(){Es.stop()}function Fc(){Es.start()}const Es=new KP;Es.setAnimationLoop(ti),typeof self<"u"&&Es.setContext(self),this.setAnimationLoop=function(F){En=F,ae.setAnimationLoop(F),F===null?Es.stop():Es.start()},ae.addEventListener("sessionstart",Ms),ae.addEventListener("sessionend",Fc),this.render=function(F,V){if(V!==void 0&&V.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;if(F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),V.parent===null&&V.matrixWorldAutoUpdate===!0&&V.updateMatrixWorld(),ae.enabled===!0&&ae.isPresenting===!0&&(ae.cameraAutoUpdate===!0&&ae.updateCamera(V),V=ae.getCamera()),F.isScene===!0&&F.onBeforeRender(A,F,V,P),x=R.get(F,S.length),x.init(V),S.push(x),ke.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),Ue.setFromProjectionMatrix(ke),be=this.localClippingEnabled,pe=z.init(this.clippingPlanes,be),_=w.get(F,g.length),_.init(),g.push(_),ae.enabled===!0&&ae.isPresenting===!0){const xe=A.xr.getDepthSensingMesh();xe!==null&&ws(xe,V,-1/0,A.sortObjects)}ws(F,V,0,A.sortObjects),_.finish(),A.sortObjects===!0&&_.sort(W,ue),Ze=ae.enabled===!1||ae.isPresenting===!1||ae.hasDepthSensing()===!1,Ze&&fe.addToRenderList(_,F),this.info.render.frame++,pe===!0&&z.beginShadows();const te=x.state.shadowsArray;Q.render(te,F,V),pe===!0&&z.endShadows(),this.info.autoReset===!0&&this.info.reset();const ee=_.opaque,Z=_.transmissive;if(x.setupLights(),V.isArrayCamera){const xe=V.cameras;if(Z.length>0)for(let Se=0,Ee=xe.length;Se<Ee;Se++){const Ke=xe[Se];Js(ee,Z,F,Ke)}Ze&&fe.render(F);for(let Se=0,Ee=xe.length;Se<Ee;Se++){const Ke=xe[Se];sa(_,F,Ke,Ke.viewport)}}else Z.length>0&&Js(ee,Z,F,V),Ze&&fe.render(F),sa(_,F,V);P!==null&&(j.updateMultisampleRenderTarget(P),j.updateRenderTargetMipmap(P)),F.isScene===!0&&F.onAfterRender(A,F,V),Te.resetDefaultState(),D=-1,O=null,S.pop(),S.length>0?(x=S[S.length-1],pe===!0&&z.setGlobalState(A.clippingPlanes,x.state.camera)):x=null,g.pop(),g.length>0?_=g[g.length-1]:_=null};function ws(F,V,te,ee){if(F.visible===!1)return;if(F.layers.test(V.layers)){if(F.isGroup)te=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(V);else if(F.isLight)x.pushLight(F),F.castShadow&&x.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||Ue.intersectsSprite(F)){ee&&vt.setFromMatrixPosition(F.matrixWorld).applyMatrix4(ke);const Se=Re.update(F),Ee=F.material;Ee.visible&&_.push(F,Se,Ee,te,vt.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||Ue.intersectsObject(F))){const Se=Re.update(F),Ee=F.material;if(ee&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),vt.copy(F.boundingSphere.center)):(Se.boundingSphere===null&&Se.computeBoundingSphere(),vt.copy(Se.boundingSphere.center)),vt.applyMatrix4(F.matrixWorld).applyMatrix4(ke)),Array.isArray(Ee)){const Ke=Se.groups;for(let Oe=0,ze=Ke.length;Oe<ze;Oe++){const Ge=Ke[Oe],ot=Ee[Ge.materialIndex];ot&&ot.visible&&_.push(F,Se,ot,te,vt.z,Ge)}}else Ee.visible&&_.push(F,Se,Ee,te,vt.z,null)}}const xe=F.children;for(let Se=0,Ee=xe.length;Se<Ee;Se++)ws(xe[Se],V,te,ee)}function sa(F,V,te,ee){const Z=F.opaque,xe=F.transmissive,Se=F.transparent;x.setupLightsView(te),pe===!0&&z.setGlobalState(A.clippingPlanes,te),ee&&Xe.viewport(C.copy(ee)),Z.length>0&&Di(Z,V,te),xe.length>0&&Di(xe,V,te),Se.length>0&&Di(Se,V,te),Xe.buffers.depth.setTest(!0),Xe.buffers.depth.setMask(!0),Xe.buffers.color.setMask(!0),Xe.setPolygonOffset(!1)}function Js(F,V,te,ee){if((te.isScene===!0?te.overrideMaterial:null)!==null)return;x.state.transmissionRenderTarget[ee.id]===void 0&&(x.state.transmissionRenderTarget[ee.id]=new xn(1,1,{generateMipmaps:!0,type:je.has("EXT_color_buffer_half_float")||je.has("EXT_color_buffer_float")?li:di,minFilter:kr,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:cn.workingColorSpace}));const xe=x.state.transmissionRenderTarget[ee.id],Se=ee.viewport||C;xe.setSize(Se.z,Se.w);const Ee=A.getRenderTarget();A.setRenderTarget(xe),A.getClearColor($),se=A.getClearAlpha(),se<1&&A.setClearColor(16777215,.5),A.clear(),Ze&&fe.render(te);const Ke=A.toneMapping;A.toneMapping=Hs;const Oe=ee.viewport;if(ee.viewport!==void 0&&(ee.viewport=void 0),x.setupLightsView(ee),pe===!0&&z.setGlobalState(A.clippingPlanes,ee),Di(F,te,ee),j.updateMultisampleRenderTarget(xe),j.updateRenderTargetMipmap(xe),je.has("WEBGL_multisampled_render_to_texture")===!1){let ze=!1;for(let Ge=0,ot=V.length;Ge<ot;Ge++){const xt=V[Ge],St=xt.object,_t=xt.geometry,rt=xt.material,Ye=xt.group;if(rt.side===fi&&St.layers.test(ee.layers)){const Ct=rt.side;rt.side=ai,rt.needsUpdate=!0,Gt(St,te,ee,_t,rt,Ye),rt.side=Ct,rt.needsUpdate=!0,ze=!0}}ze===!0&&(j.updateMultisampleRenderTarget(xe),j.updateRenderTargetMipmap(xe))}A.setRenderTarget(Ee),A.setClearColor($,se),Oe!==void 0&&(ee.viewport=Oe),A.toneMapping=Ke}function Di(F,V,te){const ee=V.isScene===!0?V.overrideMaterial:null;for(let Z=0,xe=F.length;Z<xe;Z++){const Se=F[Z],Ee=Se.object,Ke=Se.geometry,Oe=ee===null?Se.material:ee,ze=Se.group;Ee.layers.test(te.layers)&&Gt(Ee,V,te,Ke,Oe,ze)}}function Gt(F,V,te,ee,Z,xe){F.onBeforeRender(A,V,te,ee,Z,xe),F.modelViewMatrix.multiplyMatrices(te.matrixWorldInverse,F.matrixWorld),F.normalMatrix.getNormalMatrix(F.modelViewMatrix),Z.onBeforeRender(A,V,te,ee,F,xe),Z.transparent===!0&&Z.side===fi&&Z.forceSinglePass===!1?(Z.side=ai,Z.needsUpdate=!0,A.renderBufferDirect(te,V,ee,Z,F,xe),Z.side=Xr,Z.needsUpdate=!0,A.renderBufferDirect(te,V,ee,Z,F,xe),Z.side=fi):A.renderBufferDirect(te,V,ee,Z,F,xe),F.onAfterRender(A,V,te,ee,Z,xe)}function _o(F,V,te){V.isScene!==!0&&(V=ut);const ee=et.get(F),Z=x.state.lights,xe=x.state.shadowsArray,Se=Z.state.ver
vendor: 4,393 bytes, line 3878
3878sion,Ee=ft.getParameters(F,Z.state,xe,V,te),Ke=ft.getProgramCacheKey(Ee);let Oe=ee.programs;ee.environment=F.isMeshStandardMaterial?V.environment:null,ee.fog=V.fog,ee.envMap=(F.isMeshStandardMaterial?ge:k).get(F.envMap||ee.environment),ee.envMapRotation=ee.environment!==null&&F.envMap===null?V.environmentRotation:F.envMapRotation,Oe===void 0&&(F.addEventListener("dispose",zt),Oe=new Map,ee.programs=Oe);let ze=Oe.get(Ke);if(ze!==void 0){if(ee.currentProgram===ze&&ee.lightsStateVersion===Se)return U(F,Ee),ze}else Ee.uniforms=ft.getUniforms(F),F.onBeforeCompile(Ee,A),ze=ft.acquireProgram(Ee,Ke),Oe.set(Ke,ze),ee.uniforms=Ee.uniforms;const Ge=ee.uniforms;return(!F.isShaderMaterial&&!F.isRawShaderMaterial||F.clipping===!0)&&(Ge.clippingPlanes=z.uniform),U(F,Ee),ee.needsLights=Me(F),ee.lightsStateVersion=Se,ee.needsLights&&(Ge.ambientLightColor.value=Z.state.ambient,Ge.lightProbe.value=Z.state.probe,Ge.directionalLights.value=Z.state.directional,Ge.directionalLightShadows.value=Z.state.directionalShadow,Ge.spotLights.value=Z.state.spot,Ge.spotLightShadows.value=Z.state.spotShadow,Ge.rectAreaLights.value=Z.state.rectArea,Ge.ltc_1.value=Z.state.rectAreaLTC1,Ge.ltc_2.value=Z.state.rectAreaLTC2,Ge.pointLights.value=Z.state.point,Ge.pointLightShadows.value=Z.state.pointShadow,Ge.hemisphereLights.value=Z.state.hemi,Ge.directionalShadowMap.value=Z.state.directionalShadowMap,Ge.directionalShadowMatrix.value=Z.state.directionalShadowMatrix,Ge.spotShadowMap.value=Z.state.spotShadowMap,Ge.spotLightMatrix.value=Z.state.spotLightMatrix,Ge.spotLightMap.value=Z.state.spotLightMap,Ge.pointShadowMap.value=Z.state.pointShadowMap,Ge.pointShadowMatrix.value=Z.state.pointShadowMatrix),ee.currentProgram=ze,ee.uniformsList=null,ze}function Nc(F){if(F.uniformsList===null){const V=F.currentProgram.getUniforms();F.uniformsList=Ug.seqWithValue(V.seq,F.uniforms)}return F.uniformsList}function U(F,V){const te=et.get(F);te.outputColorSpace=V.outputColorSpace,te.batching=V.batching,te.batchingColor=V.batchingColor,te.instancing=V.instancing,te.instancingColor=V.instancingColor,te.instancingMorph=V.instancingMorph,te.skinning=V.skinning,te.morphTargets=V.morphTargets,te.morphNormals=V.morphNormals,te.morphColors=V.morphColors,te.morphTargetsCount=V.morphTargetsCount,te.numClippingPlanes=V.numClippingPlanes,te.numIntersection=V.numClipIntersection,te.vertexAlphas=V.vertexAlphas,te.vertexTangents=V.vertexTangents,te.toneMapping=V.toneMapping}function H(F,V,te,ee,Z){V.isScene!==!0&&(V=ut),j.resetTextureUnits();const xe=V.fog,Se=ee.isMeshStandardMaterial?V.environment:null,Ee=P===null?A.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:Er,Ke=(ee.isMeshStandardMaterial?ge:k).get(ee.envMap||Se),Oe=ee.vertexColors===!0&&!!te.attributes.color&&te.attributes.color.itemSize===4,ze=!!te.attributes.tangent&&(!!ee.normalMap||ee.anisotropy>0),Ge=!!te.morphAttributes.position,ot=!!te.morphAttributes.normal,xt=!!te.morphAttributes.color;let St=Hs;ee.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(St=A.toneMapping);const _t=te.morphAttributes.position||te.morphAttributes.normal||te.morphAttributes.color,rt=_t!==void 0?_t.length:0,Ye=et.get(ee),Ct=x.state.lights;if(pe===!0&&(be===!0||F!==O)){const Rt=F===O&&ee.id===D;z.setState(ee,F,Rt)}let lt=!1;ee.version===Ye.__version?(Ye.needsLights&&Ye.lightsStateVersion!==Ct.state.version||Ye.outputColorSpace!==Ee||Z.isBatchedMesh&&Ye.batching===!1||!Z.isBatchedMesh&&Ye.batching===!0||Z.isBatchedMesh&&Ye.batchingColor===!0&&Z.colorTexture===null||Z.isBatchedMesh&&Ye.batchingColor===!1&&Z.colorTexture!==null||Z.isInstancedMesh&&Ye.instancing===!1||!Z.isInstancedMesh&&Ye.instancing===!0||Z.isSkinnedMesh&&Ye.skinning===!1||!Z.isSkinnedMesh&&Ye.skinning===!0||Z.isInstancedMesh&&Ye.instancingColor===!0&&Z.instanceColor===null||Z.isInstancedMesh&&Ye.instancingColor===!1&&Z.instanceColor!==null||Z.isInstancedMesh&&Ye.instancingMorph===!0&&Z.morphTexture===null||Z.isInstancedMesh&&Ye.instancingMorph===!1&&Z.morphTexture!==null||Ye.envMap!==Ke||ee.fog===!0&&Ye.fog!==xe||Ye.numClippingPlanes!==void 0&&(Ye.numClippingPlanes!==z.numPlanes||Ye.numIntersection!==z.numIntersection)||Ye.vertexAlphas!==Oe||Ye.vertexTangents!==ze||Ye.morphTargets!==Ge||Ye.morphNormals!==ot||Ye.morphColors!==xt||Ye.toneMapping!==St||Ye.morphTargetsCount!==rt)&&(lt=!0):(lt=!0,Ye.__version=ee.version);let Xt=Ye.currentProgram;lt===!0&&(Xt=_o(ee,V,Z));
vendor: 8,826 bytes, line 3878
3878let Ln=!1,$t=!1,Kn=!1;const Et=Xt.getUniforms(),dn=Ye.uniforms;if(Xe.useProgram(Xt.program)&&(Ln=!0,$t=!0,Kn=!0),ee.id!==D&&(D=ee.id,$t=!0),Ln||O!==F){Ve.reverseDepthBuffer?(Ne.copy(F.projectionMatrix),tO(Ne),nO(Ne),Et.setValue(X,"projectionMatrix",Ne)):Et.setValue(X,"projectionMatrix",F.projectionMatrix),Et.setValue(X,"viewMatrix",F.matrixWorldInverse);const Rt=Et.map.cameraPosition;Rt!==void 0&&Rt.setValue(X,nt.setFromMatrixPosition(F.matrixWorld)),Ve.logarithmicDepthBuffer&&Et.setValue(X,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(ee.isMeshPhongMaterial||ee.isMeshToonMaterial||ee.isMeshLambertMaterial||ee.isMeshBasicMaterial||ee.isMeshStandardMaterial||ee.isShaderMaterial)&&Et.setValue(X,"isOrthographic",F.isOrthographicCamera===!0),O!==F&&(O=F,$t=!0,Kn=!0)}if(Z.isSkinnedMesh){Et.setOptional(X,Z,"bindMatrix"),Et.setOptional(X,Z,"bindMatrixInverse");const Rt=Z.skeleton;Rt&&(Rt.boneTexture===null&&Rt.computeBoneTexture(),Et.setValue(X,"boneTexture",Rt.boneTexture,j))}Z.isBatchedMesh&&(Et.setOptional(X,Z,"batchingTexture"),Et.setValue(X,"batchingTexture",Z._matricesTexture,j),Et.setOptional(X,Z,"batchingIdTexture"),Et.setValue(X,"batchingIdTexture",Z._indirectTexture,j),Et.setOptional(X,Z,"batchingColorTexture"),Z._colorsTexture!==null&&Et.setValue(X,"batchingColorTexture",Z._colorsTexture,j));const tn=te.morphAttributes;if((tn.position!==void 0||tn.normal!==void 0||tn.color!==void 0)&&ve.update(Z,te,Xt),($t||Ye.receiveShadow!==Z.receiveShadow)&&(Ye.receiveShadow=Z.receiveShadow,Et.setValue(X,"receiveShadow",Z.receiveShadow)),ee.isMeshGouraudMaterial&&ee.envMap!==null&&(dn.envMap.value=Ke,dn.flipEnvMap.value=Ke.isCubeTexture&&Ke.isRenderTargetTexture===!1?-1:1),ee.isMeshStandardMaterial&&ee.envMap===null&&V.environment!==null&&(dn.envMapIntensity.value=V.environmentIntensity),$t&&(Et.setValue(X,"toneMappingExposure",A.toneMappingExposure),Ye.needsLights&&le(dn,Kn),xe&&ee.fog===!0&&N.refreshFogUniforms(dn,xe),N.refreshMaterialUniforms(dn,ee,ye,ie,x.state.transmissionRenderTarget[F.id]),Ug.upload(X,Nc(Ye),dn,j)),ee.isShaderMaterial&&ee.uniformsNeedUpdate===!0&&(Ug.upload(X,Nc(Ye),dn,j),ee.uniformsNeedUpdate=!1),ee.isSpriteMaterial&&Et.setValue(X,"center",Z.center),Et.setValue(X,"modelViewMatrix",Z.modelViewMatrix),Et.setValue(X,"normalMatrix",Z.normalMatrix),Et.setValue(X,"modelMatrix",Z.matrixWorld),ee.isShaderMaterial||ee.isRawShaderMaterial){const Rt=ee.uniformsGroups;for(let pn=0,Ts=Rt.length;pn<Ts;pn++){const gi=Rt[pn];J.update(gi,Xt),J.bind(gi,Xt)}}return Xt}function le(F,V){F.ambientLightColor.needsUpdate=V,F.lightProbe.needsUpdate=V,F.directionalLights.needsUpdate=V,F.directionalLightShadows.needsUpdate=V,F.pointLights.needsUpdate=V,F.pointLightShadows.needsUpdate=V,F.spotLights.needsUpdate=V,F.spotLightShadows.needsUpdate=V,F.rectAreaLights.needsUpdate=V,F.hemisphereLights.needsUpdate=V}function Me(F){return F.isMeshLambertMaterial||F.isMeshToonMaterial||F.isMeshPhongMaterial||F.isMeshStandardMaterial||F.isShadowMaterial||F.isShaderMaterial&&F.lights===!0}this.getActiveCubeFace=function(){return I},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(F,V,te){et.get(F.texture).__webglTexture=V,et.get(F.depthTexture).__webglTexture=te;const ee=et.get(F);ee.__hasExternalTextures=!0,ee.__autoAllocateDepthBuffer=te===void 0,ee.__autoAllocateDepthBuffer||je.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ee.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(F,V){const te=et.get(F);te.__webglFramebuffer=V,te.__useDefaultFramebuffer=V===void 0},this.setRenderTarget=function(F,V=0,te=0){P=F,I=V,b=te;let ee=!0,Z=null,xe=!1,Se=!1;if(F){const Ke=et.get(F);if(Ke.__useDefaultFramebuffer!==void 0)Xe.bindFramebuffer(X.FRAMEBUFFER,null),ee=!1;else if(Ke.__webglFramebuffer===void 0)j.setupRenderTarget(F);else if(Ke.__hasExternalTextures)j.rebindTextures(F,et.get(F.texture).__webglTexture,et.get(F.depthTexture).__webglTexture);else if(F.depthBuffer){const Ge=F.depthTexture;if(Ke.__boundDepthTexture!==Ge){if(Ge!==null&&et.has(Ge)&&(F.width!==Ge.image.width||F.height!==Ge.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");j.setupDepthRenderbuffer(F)}}const Oe=F.texture;(Oe.isData3DTexture||Oe.isDataArrayTexture||Oe.isCompressedArrayTexture)&&(Se=!0);const ze=et.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(Array.isArray(ze[V])?Z=ze[V][te]:Z=ze[V],xe=!0):F.samples>0&&j.useMultisampledRTT(F)===!1?Z=et.get(F).__webglMultisampledFramebuffer:Array.isArray(ze)?Z=ze[te]:Z=ze,C.copy(F.viewport),B.copy(F.scissor),Y=F.scissorTest}else C.copy(oe).multiplyScalar(ye).floor(),B.copy(de).multiplyScalar(ye).floor(),Y=we;if(Xe.bindFramebuffer(X.FRAMEBUFFER,Z)&&ee&&Xe.drawBuffers(F,Z),Xe.viewport(C),Xe.scissor(B),Xe.setScissorTest(Y),xe){const Ke=et.get(F.texture);X.framebufferTexture2D(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,X.TEXTURE_CUBE_MAP_POSITIVE_X+V,Ke.__webglTexture,te)}else if(Se){const Ke=et.get(F.texture),Oe=V||0;X.framebufferTextureLayer(X.FRAMEBUFFER,X.COLOR_ATTACHMENT0,Ke.__webglTexture,te||0,Oe)}D=-1},this.readRenderTargetPixels=function(F,V,te,ee,Z,xe,Se){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ee=et.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&Se!==void 0&&(Ee=Ee[Se]),Ee){Xe.bindFramebuffer(X.FRAMEBUFFER,Ee);try{const Ke=F.texture,Oe=Ke.format,ze=Ke.type;if(!Ve.textureFormatReadable(Oe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ve.textureTypeReadable(ze)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}V>=0&&V<=F.width-ee&&te>=0&&te<=F.height-Z&&X.readPixels(V,te,ee,Z,q.convert(Oe),q.convert(ze),xe)}finally{const Ke=P!==null?et.get(P).__webglFramebuffer:null;Xe.bindFramebuffer(X.FRAMEBUFFER,Ke)}}},this.readRenderTargetPixelsAsync=async function(F,V,te,ee,Z,xe,Se){if(!(F&&F.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ee=et.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&Se!==void 0&&(Ee=Ee[Se]),Ee){const Ke=F.texture,Oe=Ke.format,ze=Ke.type;if(!Ve.textureFormatReadable(Oe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Ve.textureTypeReadable(ze))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(V>=0&&V<=F.width-ee&&te>=0&&te<=F.height-Z){Xe.bindFramebuffer(X.FRAMEBUFFER,Ee);const Ge=X.createBuffer();X.bindBuffer(X.PIXEL_PACK_BUFFER,Ge),X.bufferData(X.PIXEL_PACK_BUFFER,xe.byteLength,X.STREAM_READ),X.readPixels(V,te,ee,Z,q.convert(Oe),q.convert(ze),0);const ot=P!==null?et.get(P).__webglFramebuffer:null;Xe.bindFramebuffer(X.FRAMEBUFFER,ot);const xt=X.fenceSync(X.SYNC_GPU_COMMANDS_COMPLETE,0);return X.flush(),await eO(X,xt,4),X.bindBuffer(X.PIXEL_PACK_BUFFER,Ge),X.getBufferSubData(X.PIXEL_PACK_BUFFER,0,xe),X.deleteBuffer(Ge),X.deleteSync(xt),xe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(F,V=null,te=0){F.isTexture!==!0&&(Ng("WebGLRenderer: copyFramebufferToTexture function signature has changed."),V=arguments[0]||null,F=arguments[1]);const ee=Math.pow(2,-te),Z=Math.floor(F.image.width*ee),xe=Math.floor(F.image.height*ee),Se=V!==null?V.x:0,Ee=V!==null?V.y:0;j.setTexture2D(F,0),X.copyTexSubImage2D(X.TEXTURE_2D,te,0,0,Se,Ee,Z,xe),Xe.unbindTexture()},this.copyTextureToTexture=function(F,V,te=null,ee=null,Z=0){F.isTexture!==!0&&(Ng("WebGLRenderer: copyTextureToTexture function signature has changed."),ee=arguments[0]||null,F=arguments[1],V=arguments[2],Z=arguments[3]||0,te=null);let xe,Se,Ee,Ke,Oe,ze;te!==null?(xe=te.max.x-te.min.x,Se=te.max.y-te.min.y,Ee=te.min.x,Ke=te.min.y):(xe=F.image.width,Se=F.image.height,Ee=0,Ke=0),ee!==null?(Oe=ee.x,ze=ee.y):(Oe=0,ze=0);const Ge=q.convert(V.format),ot=q.convert(V.type);j.setTexture2D(V,0),X.pixelStorei(X.UNPACK_FLIP_Y_WEBGL,V.flipY),X.pixelStorei(X.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),X.pixelStorei(X.UNPACK_ALIGNMENT,V.unpackAlignment);const xt=X.getParameter(X.UNPACK_ROW_LENGTH),St=X.getParameter(X.UNPACK_IMAGE_HEIGHT),_t=X.getParameter(X.UNPACK_SKIP_PIXELS),rt=X.getParameter(X.UNPACK_SKIP_ROWS),Ye=X.getParameter(X.UNPACK_SKIP_IMAGES),Ct=F.isCompressedTexture?F.mipmaps[Z]:
vendor: 23,701 bytes, line 3878
3878F.image;X.pixelStorei(X.UNPACK_ROW_LENGTH,Ct.width),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,Ct.height),X.pixelStorei(X.UNPACK_SKIP_PIXELS,Ee),X.pixelStorei(X.UNPACK_SKIP_ROWS,Ke),F.isDataTexture?X.texSubImage2D(X.TEXTURE_2D,Z,Oe,ze,xe,Se,Ge,ot,Ct.data):F.isCompressedTexture?X.compressedTexSubImage2D(X.TEXTURE_2D,Z,Oe,ze,Ct.width,Ct.height,Ge,Ct.data):X.texSubImage2D(X.TEXTURE_2D,Z,Oe,ze,xe,Se,Ge,ot,Ct),X.pixelStorei(X.UNPACK_ROW_LENGTH,xt),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,St),X.pixelStorei(X.UNPACK_SKIP_PIXELS,_t),X.pixelStorei(X.UNPACK_SKIP_ROWS,rt),X.pixelStorei(X.UNPACK_SKIP_IMAGES,Ye),Z===0&&V.generateMipmaps&&X.generateMipmap(X.TEXTURE_2D),Xe.unbindTexture()},this.copyTextureToTexture3D=function(F,V,te=null,ee=null,Z=0){F.isTexture!==!0&&(Ng("WebGLRenderer: copyTextureToTexture3D function signature has changed."),te=arguments[0]||null,ee=arguments[1]||null,F=arguments[2],V=arguments[3],Z=arguments[4]||0);let xe,Se,Ee,Ke,Oe,ze,Ge,ot,xt;const St=F.isCompressedTexture?F.mipmaps[Z]:F.image;te!==null?(xe=te.max.x-te.min.x,Se=te.max.y-te.min.y,Ee=te.max.z-te.min.z,Ke=te.min.x,Oe=te.min.y,ze=te.min.z):(xe=St.width,Se=St.height,Ee=St.depth,Ke=0,Oe=0,ze=0),ee!==null?(Ge=ee.x,ot=ee.y,xt=ee.z):(Ge=0,ot=0,xt=0);const _t=q.convert(V.format),rt=q.convert(V.type);let Ye;if(V.isData3DTexture)j.setTexture3D(V,0),Ye=X.TEXTURE_3D;else if(V.isDataArrayTexture||V.isCompressedArrayTexture)j.setTexture2DArray(V,0),Ye=X.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}X.pixelStorei(X.UNPACK_FLIP_Y_WEBGL,V.flipY),X.pixelStorei(X.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),X.pixelStorei(X.UNPACK_ALIGNMENT,V.unpackAlignment);const Ct=X.getParameter(X.UNPACK_ROW_LENGTH),lt=X.getParameter(X.UNPACK_IMAGE_HEIGHT),Xt=X.getParameter(X.UNPACK_SKIP_PIXELS),Ln=X.getParameter(X.UNPACK_SKIP_ROWS),$t=X.getParameter(X.UNPACK_SKIP_IMAGES);X.pixelStorei(X.UNPACK_ROW_LENGTH,St.width),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,St.height),X.pixelStorei(X.UNPACK_SKIP_PIXELS,Ke),X.pixelStorei(X.UNPACK_SKIP_ROWS,Oe),X.pixelStorei(X.UNPACK_SKIP_IMAGES,ze),F.isDataTexture||F.isData3DTexture?X.texSubImage3D(Ye,Z,Ge,ot,xt,xe,Se,Ee,_t,rt,St.data):V.isCompressedArrayTexture?X.compressedTexSubImage3D(Ye,Z,Ge,ot,xt,xe,Se,Ee,_t,St.data):X.texSubImage3D(Ye,Z,Ge,ot,xt,xe,Se,Ee,_t,rt,St),X.pixelStorei(X.UNPACK_ROW_LENGTH,Ct),X.pixelStorei(X.UNPACK_IMAGE_HEIGHT,lt),X.pixelStorei(X.UNPACK_SKIP_PIXELS,Xt),X.pixelStorei(X.UNPACK_SKIP_ROWS,Ln),X.pixelStorei(X.UNPACK_SKIP_IMAGES,$t),Z===0&&V.generateMipmaps&&X.generateMipmap(Ye),Xe.unbindTexture()},this.initRenderTarget=function(F){et.get(F).__webglFramebuffer===void 0&&j.setupRenderTarget(F)},this.initTexture=function(F){F.isCubeTexture?j.setTextureCube(F,0):F.isData3DTexture?j.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?j.setTexture2DArray(F,0):j.setTexture2D(F,0),Xe.unbindTexture()},this.resetState=function(){I=0,b=0,P=null,Xe.reset(),Te.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return lo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===Dv?"display-p3":"srgb",t.unpackColorSpace=cn.workingColorSpace===qd?"display-p3":"srgb"}}class Uv{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new qe(e),this.density=t}clone(){return new Uv(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Ov{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new qe(e),this.near=t,this.far=i}clone(){return new Ov(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}let qo=class extends jt{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 jr,this.environmentIntensity=1,this.environmentRotation=new jr,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 tp{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Cd,this.updateRanges=[],this.version=0,this.uuid=Gr()}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,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;r<s;r++)this.array[e+r]=t.array[i+r];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=Gr()),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]),i=new this.constructor(t,this.stride);return i.setUsage(this.usage),i}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=Gr()),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 qi=new G;class el{constructor(e,t,i,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=i,this.normalized=r}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,i=this.data.count;t<i;t++)qi.fromBufferAttribute(this,t),qi.applyMatrix4(e),this.setXYZ(t,qi.x,qi.y,qi.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)qi.fromBufferAttribute(this,t),qi.applyNormalMatrix(e),this.setXYZ(t,qi.x,qi.y,qi.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)qi.fromBufferAttribute(this,t),qi.transformDirection(e),this.setXYZ(t,qi.x,qi.y,qi.z);return this}getComponent(e,t){let i=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(i=tr(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Ot(i,this.array)),this.data.array[e*this.data.stride+this.offset+t]=i,this}setX(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Ot(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=tr(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=tr(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=tr(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=tr(t,this.array)),t}setXY(e,t,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this}setXYZ(e,t,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array),r=Ot(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,this}setXYZW(e,t,i,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),i=Ot(i,this.array),r=Ot(r,this.array),s=Ot(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=r,this.data.array[e+3]=s,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 i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[r+s])}return new Yt(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 el(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 i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[r+s])}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 aM extends Hn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new qe(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 cu;const lh=new G,uu=new G,fu=new G,hu=new _e,ch=new _e,nB=new ct,Gm=new G,uh=new G,Vm=new G,JC=new _e,d_=new _e,YC=new _e;class iB extends jt{constructor(e=new aM){if(super(),this.isSprite=!0,this.type="Sprite",cu===void 0){cu=new bt;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new tp(t,5);cu.setIndex([0,1,2,0,2,3]),cu.setAttribute("position",new el(i,3,0,!1)),cu.setAttribute("uv",new el(i,2,3,!1))}this.geometry=cu,this.material=e,this.center=new _e(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),uu.setFromMatrixScale(this.matrixWorld),nB.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),fu.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&uu.multiplyScalar(-fu.z);const i=this.material.rotation;let r,s;i!==0&&(s=Math.cos(i),r=Math.sin(i));const o=this.center;Wm(Gm.set(-.5,-.5,0),fu,o,uu,r,s),Wm(uh.set(.5,-.5,0),fu,o,uu,r,s),Wm(Vm.set(.5,.5,0),fu,o,uu,r,s),JC.set(0,0),d_.set(1,0),YC.set(1,1);let a=e.ray.intersectTriangle(Gm,uh,Vm,!1,lh);if(a===null&&(Wm(uh.set(-.5,.5,0),fu,o,uu,r,s),d_.set(0,1),a=e.ray.intersectTriangle(Gm,Vm,uh,!1,lh),a===null))return;const l=e.ray.origin.distanceTo(lh);l<e.near||l>e.far||t.push({distance:l,point:lh.clone(),uv:dr.getInterpolation(lh,Gm,uh,Vm,JC,d_,YC,new _e),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 Wm(n,e,t,i,r,s){hu.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(ch.x=s*hu.x-r*hu.y,ch.y=r*hu.x+s*hu.y):ch.copy(hu),n.copy(e),n.x+=ch.x,n.y+=ch.y,n.applyMatrix4(nB)}const Xm=new G,KC=new G;class rB extends jt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i<r;i++){const s=t[i];this.addLevel(s.object.clone(),s.distance,s.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,i=0){t=Math.abs(t);const r=this.levels;let s;for(s=0;s<r.length&&!(t<r[s].distance);s++);return r.splice(s,0,{distance:t,hysteresis:i,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let i=0;i<t.length;i++)if(t[i].distance===e){const r=t.splice(i,1);return this.remove(r[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let i,r;for(i=1,r=t.length;i<r;i++){let s=t[i].distance;if(t[i].object.visible&&(s-=s*t[i].hysteresis),e<s)break}return t[i-1].object}return null}raycast(e,t){if(this.levels.length>0){Xm.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(Xm);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Xm.setFromMatrixPosition(e.matrixWorld),KC.setFromMatrixPosition(this.matrixWorld);const i=Xm.distanceTo(KC)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r<s;r++){let o=t[r].distance;if(t[r].object.visible&&(o-=o*t[r].hysteresis),i>=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r<s;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const i=this.levels;for(let r=0,s=i.length;r<s;r++){const o=i[r];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const QC=new G,ZC=new rn,qC=new rn,mG=new G,$C=new ct,jm=new G,p_=new wi,eR=new ct,m_=new bc;class lM extends yn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=rS,this.bindMatrix=new ct,this.bindMatrixInverse=new ct,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Xi),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,jm),this.boundingBox.expandByPoint(jm)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new wi),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,jm),this.boundingSphere.expandByPoint(jm)}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 i=this.material,r=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),p_.copy(this.boundingSphere),p_.applyMatrix4(r),e.ray.intersectsSphere(p_)!==!1&&(eR.copy(r).invert(),m_.copy(e.ray).applyMatrix4(eR),!(this.boundingBox!==null&&m_.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,m_)))}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 rn,t=this.geometry.attributes.skinWeight;for(let i=0,r=t.count;i<r;i++){e.fromBufferAttribute(t,i);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===rS?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===CP?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const i=this.skeleton,r=this.geometry;ZC.fromBufferAttribute(r.attributes.skinIndex,e),qC.fromBufferAttribute(r.attributes.skinWeight,e),QC.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=qC.getComponent(s);if(o!==0){const a=ZC.getComponent(s);$C.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),t.addScaledVector(mG.copy(QC).applyMatrix4($C),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class kv extends jt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class gs extends Qt{constructor(e=null,t=1,i=1,r,s,o,a,l,c=Ht,f=Ht,d,p){super(null,o,a,l,c,f,r,s,d,p),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const tR=new ct,gG=new ct;class np{constructor(e=[],t=[]){this.uuid=Gr(),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 i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new ct)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const i=new ct;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,t=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const a=e[s]?e[s].matrixWorld:gG;tR.multiplyMatrices(a,t[s]),tR.toArray(i,s*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new np(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 i=new gs(t,e,e,Dn,vn);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){const r=this.bones[t];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let i=0,r=e.bones.length;i<r;i++){const s=e.bones[i];let o=t[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new kv),this.bones.push(o),this.boneInverses.push(new ct().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,i=this.boneInverses;for(let r=0,s=t.length;r<s;r++){const o=t[r];e.bones.push(o.uuid);const a=i[r];e.boneInverses.push(a.toArray())}return e}}class xc extends Yt{constructor(e,t,i,r=1){super(e,t,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}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 du=new ct,nR=new ct,Jm=[],iR=new Xi,vG=new ct,fh=new yn,hh=new wi;class cM extends yn{constructor(e,t,i){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new xc(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<i;r++)this.setMatrixAt(r,vG)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Xi),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,du),iR.copy(e.boundingBox).applyMatrix4(du),this.boundingBox.union(iR)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new wi),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,du),hh.copy(e.boundingSphere).applyMatrix4(du),this.boundingSphere.union(hh)}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 i=t.morphTargetInfluences,r=this.morphTexture.source.data.data,s=i.length+1,o=e*s+1;for(let a=0;a<i.length;a++)i[a]=r[o+a]}raycast(e,t){const i=this.matrixWorld,r=this.count;if(fh.geometry=this.geometry,fh.material=this.material,fh.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),hh.copy(this.boundingSphere),hh.applyMatrix4(i),e.ray.intersectsSphere(hh)!==!1))for(let s=0;s<r;s++){this.getMatrixAt(s,du),nR.multiplyMatrices(i,du),fh.matrixWorld=nR,fh.raycast(e,Jm);for(let o=0,a=Jm.length;o<a;o++){const l=Jm[o];l.instanceId=s,l.object=this,t.push(l)}Jm.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new xc(new 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 i=t.morphTargetInfluences,r=i.length+1;this.morphTexture===null&&(this.morphTexture=new gs(new Float32Array(r*this.count),r,this.count,Ef,vn));const s=this.morphTexture.source.data.data;let o=0;for(let c=0;c<i.length;c++)o+=i[c];const a=this.geometry.morphTargetsRelative?1:1-o,l=r*e;s[l]=a,s.set(i,l+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}function yG(n,e){return n.z-e.z}function xG(n,e){return e.z-n.z}class _G{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,i){const r=this.pool,s=this.list;this.index>=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const o=r[this.index];s.push(o),this.index++,o.start=e.start,o.count=e.count,o.z=t,o.index=i}reset(){this.list.length=0,this.index=0}}const Sa=new ct,g_=new ct,SG=new ct,AG=new qe(1,1,1),rR=new ct,v_=new ep,Ym=new Xi,Tl=new wi,dh=new G,sR=new G,MG=new G,y_=new _G,Gi=new yn,Km=[];function EG(n,e,t=0){const i=e.itemSize;
3878if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const r=n.count;for(let s=0;s<r;s++)for(let o=0;o<i;o++)e.setComponent(s+t,o,n.getComponent(s,o))}else e.array.set(n.array,t*i);e.needsUpdate=!0}class sB extends yn{get maxInstanceCount(){return this._maxInstanceCount}constructor(e,t,i=t*2,r){super(new bt,r),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._drawInfo=[],this._availableInstanceIds=[],this._drawRanges=[],this._reservedRanges=[],this._bounds=[],this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=i,this._geometryInitialized=!1,this._geometryCount=0,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._visibilityChanged=!0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}_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),i=new gs(t,e,e,Dn,vn);this._matricesTexture=i}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),i=new gs(t,e,e,Zd,Vs);this._indirectTexture=i}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),i=new gs(t,e,e,Dn,vn);
3878i.colorSpace=cn.workingColorSpace,this._colorsTexture=i}_initializeGeometry(e){const t=this.geometry,i=this._maxVertexCount,r=this._maxIndexCount;if(this._geometryInitialized===!1){for(const s in e.attributes){const o=e.getAttribute(s),{array:a,itemSize:l,normalized:c}=o,f=new a.constructor(i*l),d=new Yt(f,l,c);t.setAttribute(s,d)}if(e.getIndex()!==null){const s=i>65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new Yt(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const r=e.getAttribute(i),s=t.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Xi);const e=this.boundingBox,t=this._drawInfo;e.makeEmpty();for(let i=0,r=t.length;i<r;i++){if(t[i].active===!1)continue;const s=t[i].geometryIndex;this.getMatrixAt(i,Sa),this.getBoundingBoxAt(s,Ym).applyMatrix4(Sa),e.union(Ym)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new wi);const e=this.boundingSphere,t=this._drawInfo;e.makeEmpty();for(let i=0,r=t.length;i<r;i++){if(t[i].active===!1)continue;const s=t[i].geometryIndex;this.getMatrixAt(i,Sa),this.getBoundingSphereAt(s,Tl).applyMatrix4(Sa),e.union(Tl)}}addInstance(e){if(this._drawInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let r=null;this._availableInstanceIds.length>0?(r=this._availableInstanceIds.pop(),this._drawInfo[r]=i):(r=this._drawInfo.length,this._drawInfo.push(i));const s=this._matricesTexture,o=s.image.data;SG.toArray(o,r*16),s.needsUpdate=!0;const a=this._colorsTexture;return a&&(AG.toArray(a.image.data,r*4),a.needsUpdate=!0),r}addGeometry(e,t=-1,i=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._drawInfo.length>=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,l=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),t===-1?r.vertexCount=e.getAttribute("position").count:r.vertexCount=t,s===null?r.vertexStart=0:r.vertexStart=s.vertexStart+s.vertexCount;const c=e.getIndex(),f=c!==null;if(f&&(i===-1?r.indexCount=c.count:r.indexCount=i,s===null?r.indexStart=0:r.indexStart=s.indexStart+s.indexCount),r.indexStart!==-1&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const d=this._geometryCount;return this._geometryCount++,o.push(r),a.push({start:f?r.indexStart:r.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new Xi,sphereInitialized:!1,sphere:new wi}),this.setGeometryAt(d,e),d}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,r=i.getIndex()!==null,s=i.getIndex(),o=t.getIndex(),a=this._reservedRanges[e];if(r&&o.count>a.indexCount||t.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.vertexCount;for(const m in i.attributes){const v=t.getAttribute(m),_=i.getAttribute(m);EG(v,_,l);const x=v.itemSize;for(let g=v.count,S=c;g<S;g++){const A=l+g;for(let E=0;E<x;E++)_.setComponent(A,E,0)}_.needsUpdate=!0,_.addUpdateRange(l*x,c*x)}if(r){const m=a.indexStart;for(let v=0;v<o.count;v++)s.setX(m+v,l+o.getX(v));for(let v=o.count,_=a.indexCount;v<_;v++)s.setX(m+v,l);s.needsUpdate=!0,s.addUpdateRange(m,a.indexCount)}const f=this._bounds[e];t.boundingBox!==null?(f.box.copy(t.boundingBox),f.boxInitialized=!0):f.boxInitialized=!1,t.boundingSphere!==null?(f.sphere.copy(t.boundingSphere),f.sphereInitialized=!0):f.sphereInitialized=!1;const d=this._drawRanges[e],p=t.getAttribute("position");return d.count=r?o.count:p.count,this._visibilityChanged=!0,e}deleteInstance(e){const t=this._drawInfo;return e>=t.length||t[e].active===!1?this:(t[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this)}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const i=this._bounds[e],r=i.box,s=this.geometry;if(i.boxInitialized===!1){r.makeEmpty();const o=s.index,a=s.attributes.position,l=this._drawRanges[e];for(let c=l.start,f=l.start+l.count;c<f;c++){let d=c;o&&(d=o.getX(d)),r.expandByPoint(dh.fromBufferAttribute(a,d))}i.boxInitialized=!0}return t.copy(r),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const i=this._bounds[e],r=i.sphere,s=this.geometry;if(i.sphereInitialized===!1){r.makeEmpty(),this.getBoundingBoxAt(e,Ym),Ym.getCenter(r.center);const o=s.index,a=s.attributes.position,l=this._drawRanges[e];let c=0;for(let f=l.start,d=l.start+l.count;f<d;f++){let p=f;o&&(p=o.getX(p)),dh.fromBufferAttribute(a,p),c=Math.max(c,r.center.distanceToSquared(dh))}r.radius=Math.sqrt(c),i.sphereInitialized=!0}return t.copy(r),t}setMatrixAt(e,t){const i=this._drawInfo,r=this._matricesTexture,s=this._matricesTexture.image.data;return e>=i.length||i[e].active===!1?this:(t.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,t){const i=this._drawInfo,r=this._matricesTexture.image.data;return e>=i.length||i[e].active===!1?null:t.fromArray(r,e*16)}setColorAt(e,t){this._colorsTexture===null&&this._initColorsTexture();const i=this._colorsTexture,r=this._colorsTexture.image.data,s=this._drawInfo;return e>=s.length||s[e].active===!1?this:(t.toArray(r,e*4),i.needsUpdate=!0,this)}getColorAt(e,t){const i=this._colorsTexture.image.data,r=this._drawInfo;return e>=r.length||r[e].active===!1?null:t.fromArray(i,e*4)}setVisibleAt(e,t){const i=this._drawInfo;return e>=i.length||i[e].active===!1||i[e].visible===t?this:(i[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._drawInfo;return e>=t.length||t[e].active===!1?!1:t[e].visible}setGeometryIdAt(e,t){const i=this._drawInfo;return e>=i.length||i[e].active===!1||t<0||t>=this._geometryCount?null:(i[e].geometryIndex=t,this)}getGeometryIdAt(e){const t=this._drawInfo;return e>=t.length||t[e].active===!1?-1:t[e].geometryIndex}getGeometryRangeAt(e,t={}){if(e<0||e>=this._geometryCount)return null;const i=this._drawRanges[e];return t.start=i.start,t.count=i.count,t}raycast(e,t){const i=this._drawInfo,r=this._drawRanges,s=this.matrixWorld,o=this.geometry;Gi.material=this.material,Gi.geometry.index=o.index,Gi.geometry.attributes=o.attributes,Gi.geometry.boundingBox===null&&(Gi.geometry.boundingBox=new Xi),Gi.geometry.boundingSphere===null&&(Gi.geometry.boundingSphere=new wi);for(let a=0,l=i.length;a<l;a++){if(!i[a].visible||!i[a].active)continue;const c=i[a].geometryIndex,f=r[c];Gi.geometry.setDrawRange(f.start,f.count),this.getMatrixAt(a,Gi.matrixWorld).premultiply(s),this.getBoundingBoxAt(c,Gi.geometry.boundingBox),this.getBoundingSphereAt(c,Gi.geometry.boundingSphere),Gi.raycast(e,Km);for(let d=0,p=Km.length;d<p;d++){const m=Km[d];m.object=this,m.batchId=a,t.push(m)}Km.length=0}Gi.material=null,Gi.geometry.index=null,Gi.geometry.attributes={},Gi.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._drawRanges=e._drawRanges.map(t=>({...t})),this._reservedRanges=e._reservedRanges.map(t=>({...t})),this._drawInfo=e._drawInfo.map(t=>({...t})),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.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(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,t,i,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._drawInfo,c=this._multiDrawStarts,f=this._multiDrawCounts,d=this._drawRanges,p=this.perObjectFrustumCulled,m=this._indirectTexture,v=m.image.data;p&&(rR.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),v_.setFromProjectionMatrix(rR,e.coordinateSystem));let _=0;if(this.sortObjects){g_.copy(this.matrixWorld).invert(),dh.setFromMatrixPosition(i.matrixWorld).applyMatrix4(g_),sR.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(g_);for(let S=0,A=l.length;S<A;S++)if(l[S].visible&&l[S].active){const E=l[S].geometryIndex;this.getMatrixAt(S,Sa),this.getBoundingSphereAt(E,Tl).applyMatrix4(Sa);let I=!1;if(p&&(I=!v_.intersectsSphere(Tl)),!I){const b=MG.subVectors(Tl.center,dh).dot(sR);y_.push(d[E],b,S)}}const x=y_.list,g=this.customSort;g===null?x.sort(s.transparent?xG:yG):g.call(this,x,i);for(let S=0,A=x.length;S<A;S++){const E=x[S];c[_]=E.start*a,f[_]=E.count,v[_]=E.index,_++}y_.reset()}else for(let x=0,g=l.length;x<g;x++)if(l[x].visible&&l[x].active){const S=l[x].geometryIndex;let A=!1;
vendor: 5,469 bytes, line 3878
3878if(p&&(this.getMatrixAt(x,Sa),this.getBoundingSphereAt(S,Tl).applyMatrix4(Sa),A=!v_.intersectsSphere(Tl)),!A){const E=d[S];c[_]=E.start*a,f[_]=E.count,v[_]=x,_++}}m.needsUpdate=!0,this._multiDrawCount=_,this._visibilityChanged=!1}onBeforeShadow(e,t,i,r,s,o){this.onBeforeRender(e,null,r,s,o)}}class Ki extends Hn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new qe(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 Y0=new G,K0=new G,oR=new ct,ph=new bc,Qm=new wi,x_=new G,aR=new G;class $o extends jt{constructor(e=new bt,t=new Ki){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,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,i=[0];for(let r=1,s=t.count;r<s;r++)Y0.fromBufferAttribute(t,r-1),K0.fromBufferAttribute(t,r),i[r]=i[r-1],i[r]+=Y0.distanceTo(K0);e.setAttribute("lineDistance",new yt(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const i=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Qm.copy(i.boundingSphere),Qm.applyMatrix4(r),Qm.radius+=s,e.ray.intersectsSphere(Qm)===!1)return;oR.copy(r).invert(),ph.copy(e.ray).applyMatrix4(oR);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,f=i.index,p=i.attributes.position;if(f!==null){const m=Math.max(0,o.start),v=Math.min(f.count,o.start+o.count);for(let _=m,x=v-1;_<x;_+=c){const g=f.getX(_),S=f.getX(_+1),A=Zm(this,e,ph,l,g,S);A&&t.push(A)}if(this.isLineLoop){const _=f.getX(v-1),x=f.getX(m),g=Zm(this,e,ph,l,_,x);g&&t.push(g)}}else{const m=Math.max(0,o.start),v=Math.min(p.count,o.start+o.count);for(let _=m,x=v-1;_<x;_+=c){const g=Zm(this,e,ph,l,_,_+1);g&&t.push(g)}if(this.isLineLoop){const _=Zm(this,e,ph,l,v-1,m);_&&t.push(_)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}}function Zm(n,e,t,i,r,s){const o=n.geometry.attributes.position;if(Y0.fromBufferAttribute(o,r),K0.fromBufferAttribute(o,s),t.distanceSqToSegment(Y0,K0,x_,aR)>i)return;x_.applyMatrix4(n.matrixWorld);const l=e.ray.origin.distanceTo(x_);if(!(l<e.near||l>e.far))return{distance:l,point:aR.clone().applyMatrix4(n.matrixWorld),index:r,face:null,faceIndex:null,barycoord:null,object:n}}const lR=new G,cR=new G;class Ws extends $o{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,i=[];for(let r=0,s=t.count;r<s;r+=2)lR.fromBufferAttribute(t,r),cR.fromBufferAttribute(t,r+1),i[r]=r===0?0:i[r-1],i[r+1]=i[r]+lR.distanceTo(cR);e.setAttribute("lineDistance",new yt(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class uM extends $o{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class zv extends Hn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new qe(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 uR=new ct,fS=new bc,qm=new wi,$m=new G;class fM extends jt{constructor(e=new bt,t=new zv){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,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 i=this.geometry,r=this.matrixWorld,s=e.params.Points.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),qm.copy(i.boundingSphere),qm.applyMatrix4(r),qm.radius+=s,e.ray.intersectsSphere(qm)===!1)return;uR.copy(r).invert(),fS.copy(e.ray).applyMatrix4(uR);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=i.index,d=i.attributes.position;if(c!==null){const p=Math.max(0,o.start),m=Math.min(c.count,o.start+o.count);for(let v=p,_=m;v<_;v++){const x=c.getX(v);$m.fromBufferAttribute(d,x),fR($m,x,l,r,e,t,this)}}else{const p=Math.max(0,o.start),m=Math.min(d.count,o.start+o.count);for(let v=p,_=m;v<_;v++)$m.fromBufferAttribute(d,v),fR($m,v,l,r,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}}function fR(n,e,t,i,r,s,o){const a=fS.distanceSqToPoint(n);if(a<t){const l=new G;
vendor: 10,165 bytes, line 3878
3878fS.closestPointToPoint(n,l),l.applyMatrix4(i);const c=r.ray.origin.distanceTo(l);if(c<r.near||c>r.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class wG extends Qt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Ft,this.magFilter=s!==void 0?s:Ft,this.generateMipmaps=!1;const f=this;function d(){f.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class TG extends Qt{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Ht,this.minFilter=Ht,this.generateMipmaps=!1,this.needsUpdate=!0}}class Hv extends Qt{constructor(e,t,i,r,s,o,a,l,c,f,d,p){super(null,o,a,l,c,f,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class CG extends Hv{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ei,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class RG extends Hv{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,mo),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class bG extends Qt{constructor(e,t,i,r,s,o,a,l,c){super(e,t,i,r,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Xs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,c;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else if(c>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const f=i[r],p=i[r+1]-f,m=(o-f)/p;return(r+m)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new _e:new G);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new G,r=[],s=[],o=[],a=new G,l=new ct;for(let m=0;m<=e;m++){const v=m/e;r[m]=this.getTangentAt(v,new G)}s[0]=new G,o[0]=new G;let c=Number.MAX_VALUE;const f=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);f<=c&&(c=f,i.set(1,0,0)),d<=c&&(c=d,i.set(0,1,0)),p<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(Jn(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,v))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(Jn(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let v=1;v<=e;v++)s[v].applyMatrix4(l.makeRotationAxis(r[v],m*v)),o[v].crossVectors(r[v],s[v])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Gv extends Xs{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new _e){const i=t,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)<Number.EPSILON;for(;s<0;)s+=r;for(;s>r;)s-=r;s<Number.EPSILON&&(o?s=0:s=r),this.aClockwise===!0&&!o&&(s===r?s=-r:s=s-r);const a=this.aStartAngle+e*s;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const f=Math.cos(this.aRotation),d=Math.sin(this.aRotation),p=l-this.aX,m=c-this.aY;l=p*f-m*d+this.aX,c=p*d+m*f+this.aY}return i.set(l,c)}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 oB extends Gv{constructor(e,t,i,r,s,o){super(e,t,i,i,r,s,o),this.isArcCurve=!0,this.type="ArcCurve"}}function hM(){let n=0,e=0,t=0,i=0;function r(s,o,a,l){n=s,e=a,t=-3*s+3*o-2*a-l,i=2*s-2*o+a+l}return{initCatmullRom:function(s,o,a,l,c){r(o,a,c*(a-s),c*(l-o))},initNonuniformCatmullRom:function(s,o,a,l,c,f,d){let p=(o-s)/c-(a-s)/(c+f)+(a-o)/f,m=(a-o)/f-(l-o)/(f+d)+(l-a)/d;p*=f,m*=f,r(o,a,p,m)},calc:function(s){const o=s*s,a=o*s;return n+e*s+t*o+i*a}}}const eg=new G,__=new hM,S_=new hM,A_=new hM;class aB extends Xs{constructor(e=[],t=!1,i="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=i,this.tension=r}getPoint(e,t=new G){const i=t,r=this.points,s=r.length,o=(s-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,f;this.closed||a>0?c=r[(a-1)%s]:(eg.subVectors(r[0],r[1]).add(r[0]),c=eg);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2<s?f=r[(a+2)%s]:(eg.subVectors(r[s-1],r[s-2]).add(r[s-1]),f=eg),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let v=Math.pow(c.distanceToSquared(d),m),_=Math.pow(d.distanceToSquared(p),m),x=Math.pow(p.distanceToSquared(f),m);_<1e-4&&(_=1),v<1e-4&&(v=_),x<1e-4&&(x=_),__.initNonuniformCatmullRom(c.x,d.x,p.x,f.x,v,_,x),S_.initNonuniformCatmullRom(c.y,d.y,p.y,f.y,v,_,x),A_.initNonuniformCatmullRom(c.z,d.z,p.z,f.z,v,_,x)}else this.curveType==="catmullrom"&&(__.initCatmullRom(c.x,d.x,p.x,f.x,this.tension),S_.initCatmullRom(c.y,d.y,p.y,f.y,this.tension),A_.initCatmullRom(c.z,d.z,p.z,f.z,this.tension));return i.set(__.calc(l),S_.calc(l),A_.calc(l)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(r.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,i=this.points.length;t<i;t++){const r=this.points[t];e.points.push(r.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,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(new G().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function hR(n,e,t,i,r){const s=(i-e)*.5,o=(r-t)*.5,a=n*n,l=n*a;return(2*t-2*i+s+o)*l+(-3*t+3*i-2*s-o)*a+s*n+t}function IG(n,e){const t=1-n;return t*t*e}function PG(n,e){return 2*(1-n)*n*e}function BG(n,e){return n*n*e}function qh(n,e,t,i){return IG(n,e)+PG(n,t)+BG(n,i)}function DG(n,e){const t=1-n;return t*t*t*e}function LG(n,e){const t=1-n;return 3*t*t*n*e}function FG(n,e){return 3*(1-n)*n*n*e}function NG(n,e){return n*n*n*e}function $h(n,e,t,i,r){return DG(n,e)+LG(n,t)+FG(n,i)+NG(n,r)}class dM extends Xs{constructor(e=new _e,t=new _e,i=new _e,r=new _e){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=i,this.v3=r}getPoint(e,t=new _e){const i=t,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set($h(e,r.x,s.x,o.x,a.x),$h(e,r.y,s.y,o.y,a.y)),i}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 lB extends Xs{constructor(e=new G,t=new G,i=new G,r=new G){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=i,this.v3=r}getPoint(e,t=new G){const i=t,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set($h(e,r.x,s.x,o.x,a.x),$h(e,r.y,s.y,o.y,a.y),$h(e,r.z,s.z,o.z,a.z)),i}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 pM extends Xs{constructor(e=new _e,t=new _e){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new _e){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}
vendor: 4,414 bytes, line 3878
3878getTangent(e,t=new _e){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 cB extends Xs{constructor(e=new G,t=new G){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new G){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new G){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 mM extends Xs{constructor(e=new _e,t=new _e,i=new _e){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new _e){const i=t,r=this.v0,s=this.v1,o=this.v2;return i.set(qh(e,r.x,s.x,o.x),qh(e,r.y,s.y,o.y)),i}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 gM extends Xs{constructor(e=new G,t=new G,i=new G){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new G){const i=t,r=this.v0,s=this.v1,o=this.v2;return i.set(qh(e,r.x,s.x,o.x),qh(e,r.y,s.y,o.y),qh(e,r.z,s.z,o.z)),i}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 vM extends Xs{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new _e){const i=t,r=this.points,s=(r.length-1)*e,o=Math.floor(s),a=s-o,l=r[o===0?o:o-1],c=r[o],f=r[o>r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(hR(a,l.x,c.x,f.x,d.x),hR(a,l.y,c.y,f.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const r=this.points[t];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const r=e.points[t];this.points.push(new _e().fromArray(r))}return this}}var Q0=Object.freeze({__proto__:null,ArcCurve:oB,CatmullRomCurve3:aB,CubicBezierCurve:dM,CubicBezierCurve3:lB,EllipseCurve:Gv,LineCurve:pM,LineCurve3:cB,QuadraticBezierCurve:mM,QuadraticBezierCurve3:gM,SplineCurve:vM});class uB extends Xs{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 i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Q0[i](t,e))}return this}getPoint(e,t){const i=e*this.getLength(),r=this.getCurveLengths();let s=0;for(;s<r.length;){if(r[s]>=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i<r;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let i;for(let r=0,s=this.curves;r<s.length;r++){const o=s[r],a=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isS
vendor: 6,597 bytes, line 3878
3878plineCurve?e*o.points.length:e,l=o.getPoints(a);for(let c=0;c<l.length;c++){const f=l[c];i&&i.equals(f)||(t.push(f),i=f)}}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,i=e.curves.length;t<i;t++){const r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,i=this.curves.length;t<i;t++){const r=this.curves[t];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){const r=e.curves[t];this.curves.push(new Q0[r.type]().fromJSON(r))}return this}}class Id extends uB{constructor(e){super(),this.type="Path",this.currentPoint=new _e,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,i=e.length;t<i;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 i=new pM(this.currentPoint.clone(),new _e(e,t));return this.curves.push(i),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,i,r){const s=new mM(this.currentPoint.clone(),new _e(e,t),new _e(i,r));return this.curves.push(s),this.currentPoint.set(i,r),this}bezierCurveTo(e,t,i,r,s,o){const a=new dM(this.currentPoint.clone(),new _e(e,t),new _e(i,r),new _e(s,o));return this.curves.push(a),this.currentPoint.set(s,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),i=new vM(t);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,i,r,s,o){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,t+l,i,r,s,o),this}absarc(e,t,i,r,s,o){return this.absellipse(e,t,i,i,r,s,o),this}ellipse(e,t,i,r,s,o,a,l){const c=this.currentPoint.x,f=this.currentPoint.y;return this.absellipse(e+c,t+f,i,r,s,o,a,l),this}absellipse(e,t,i,r,s,o,a,l){const c=new Gv(e,t,i,r,s,o,a,l);if(this.curves.length>0){const d=c.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(c);const f=c.getPoint(1);return this.currentPoint.copy(f),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 ip extends bt{constructor(e=[new _e(0,-.5),new _e(.5,0),new _e(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=Jn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],f=1/t,d=new G,p=new _e,m=new G,v=new G,_=new G;let x=0,g=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:x=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-x,m.z=g*0,_.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:x=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-x,m.z=g*0,v.copy(m),m.x+=_.x,m.y+=_.y,m.z+=_.z,m.normalize(),l.push(m.x,m.y,m.z),_.copy(v)}for(let S=0;S<=t;S++){const A=i+S*f*r,E=Math.sin(A),I=Math.cos(A);for(let b=0;b<=e.length-1;b++){d.x=e[b].x*E,d.y=e[b].y,d.z=e[b].x*I,o.push(d.x,d.y,d.z),p.x=S/t,p.y=b/(e.length-1),a.push(p.x,p.y);const P=l[3*b+0]*E,D=l[3*b+1],O=l[3*b+0]*I;c.push(P,D,O)}}for(let S=0;S<t;S++)for(let A=0;A<e.length-1;A++){const E=A+S*e.length,I=E,b=E+e.length,P=E+e.length+1,D=E+1;s.push(I,b,D),s.push(P,D,b)}this.setIndex(s),this.setAttribute("position",new yt(o,3)),this.setAttribute("uv",new yt(a,2)),this.setAttribute("normal",new yt(c,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ip(e.points,e.segments,e.phiStart,e.phiLength)}}class Vv extends ip{constructor(e=1,t=1,i=4,r=8){const s=new Id;s.absarc(0,-t/2,e,Math.PI*1.5,0),s.absarc(0,t/2,e,0,Math.PI*.5),super(s.getPoints(i),r),this.type="CapsuleGeometry",this.parameters={radius:e,length:t,capSegments:i,radialSegments:r}}static fromJSON(e){return new Vv(e.radius,e.length,e.capSegments,e.radialSegments)}}class Wv extends bt{constructor(e=1,t=32,i=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:r},t=Math.max(3,t);const s=[],o=[],a=[],l=[],c=new G,f=new _e;o.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let d=0,p=3;d<=t;d++,p+=3){const m=i+d/t*r;c.x=e*Math.cos(m),c.y=e*Math.sin(m),o.push(c.x,c.y,c.z),a.push(0,0,1),f.x=(o[p]/e+1)/2,f.y=(o[p+1]/e+1)/2,l.push(f.x,f.y)}for(let d=1;d<=t;d++)s.push(d,d+1,0);this.setIndex(s),this.setAttribute("position",new yt(o,3)),this.setAttribute("normal",new yt(a,3)),this.setAttribute("uv",new yt(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Wv(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Cf extends bt{constructor(e=1,t=1,i=1,r=32,s=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:r,heightSegments:s,openEnded:o,thetaStart:a,thetaLength:l};const c=this;r=Math.floor(r),s=Math.floor(s);const f=[],d=[],p=[],m=[];let v=0;const _=[],x=i/2;let g=0;S(),o===!1&&(e>0&&A(!0),t>0&&A(!1)),this.setIndex(f),this.setAttribute("position",new yt(d,3)),this.setAttribute("normal",new yt(p,3)),this.setAttribute("uv",new yt(m,2));function S(){const E=new G,I=new G;let b=0;const P=(t-e)/i;for(let D=0;D<=s;D++){const O=[],C=D/s,B=C*(t-e)+e;for(let Y=0;Y<=r;Y++){const $=Y/r,se=$*l+a,ce=Math.sin(se),ie=Math.cos(se);I.x=B*ce,I.y=-C*i+x,I.z=B*ie,d.push(I.x,I.y,I.z),E.set(ce,P,ie).normalize(),p.push(E.x,E.y,E.z),m.push($,1-C),O.push(v++)}_.push(O)}for(let D=0;D<r;D++)for(let O=0;O<s;O++){const C=_[O][D],B=_[O+1][D],Y=_[O+1][D+1],$=_[O][D+1];e>0&&(f.push(C,B,$),b+=3),t>0&&(f.push(B,Y,$),b+=3)}c.addGroup(g,b,0),g+=b}function A(E){const I=v,b=new _e,P=new G;let D=0;const O=E===!0?e:t,C=E===!0?1:-1;for(let Y=1;Y<=r;Y++)d.push(0,x*C,0),p.push(0,C,0),m.push(.5,.5),v++;const B=v;for(let Y=0;Y<=r;Y++){const se=Y/r*l+a,ce=Math.cos(se),ie=Math.sin(se);P.x=O*ie,P.y=x*C,P.z=O*ce,d.push(P.x,P.y,P.z),p.push(0,C,0),b.x=ce*.5+.5,b.y=ie*.5*C+.5,m.push(b.x,b.y),v++}for(let Y=0;Y<r;Y++){const $=I+Y,se=B+Y;E===!0?f.push(se,se+1,$):f.push(se+1,se,$),D+=3}c.addGroup(g,D,E===!0?1:2),g+=D}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Cf(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Xv extends Cf{constructor(e=1,t=1,i=32,r=1,s=!1,o=0,a=Math.PI*2){super(0,e,t,i,r,s,o,a),this.type="C
3878oneGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new Xv(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ll extends bt{constructor(e=[],t=[],i=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:r};const s=[],o=[];a(r),c(i),f(),this.setAttribute("position",new yt(s,3)),this.setAttribute("normal",new yt(s.slice(),3)),this.setAttribute("uv",new yt(o,2)),r===0?this.computeVertexNormals():this.normalizeNormals();function a(S){const A=new G,E=new G,I=new G;for(let b=0;b<t.length;b+=3)m(t[b+0],A),m(t[b+1],E),m(t[b+2],I),l(A,E,I,S)}function l(S,A,E,I){const b=I+1,P=[];for(let D=0;D<=b;D++){P[D]=[];const O=S.clone().lerp(E,D/b),C=A.clone().lerp(E,D/b),B=b-D;for(let Y=0;Y<=B;Y++)Y===0&&D===b?P[D][Y]=O:P[D][Y]=O.clone().lerp(C,Y/B)}for(let D=0;D<b;D++)for(let O=0;O<2*(b-D)-1;O++){const C=Math.floor(O/2);O%2===0?(p(P[D][C+1]),p(P[D+1][C]),p(P[D][C])):(p(P[D][C+1]),p(P[D+1][C+1]),p(P[D+1][C]))}}function c(S){const A=new G;for(let E=0;E<s.length;E+=3)A.x=s[E+0],A.y=s[E+1],A.z=s[E+2],A.normalize().multiplyScalar(S),s[E+0]=A.x,s[E+1]=A.y,s[E+2]=A.z}function f(){const S=new G;for(let A=0;A<s.length;A+=3){S.x=s[A+0],S.y=s[A+1],S.z=s[A+2];const E=x(S)/2/Math.PI+.5,I=g(S)/Math.PI+.5;o.push(E,1-I)}v(),d()}function d(){for(let S=0;S<o.length;S+=6){const A=o[S+0],E=o[S+2],I=o[S+4],b=Math.max(A,E,I),P=Math.min(A,E,I);b>.9&&P<.1&&(A<.2&&(o[S+0]+=1),E<.2&&(o[S+2]+=1),I<.2&&(o[S+4]+=1))}}function p(S){s.push(S.x,S.y,S.z)}function m(S,A){const E=S*3;A.x=e[E+0],A.y=e[E+1],A.z=e[E+2]}function v(){const S=new G,A=new G,E=new G,I=new G,b=new _e,P=new _e,D=new _e;for(let O=0,C=0;O<s.length;O+=9,C+=6){S.set(s[O+0],s[O+1],s[O+2]),A.set(s[O+3],s[O+4],s[O+5]),E.set(s[O+6],s[O+7],s[O+8]),b.set(o[C+0],o[C+1]),P.set(o[C+2],o[C+3]),D.set(o[C+4],o[C+5]),I.copy(S).add(A).add(E).divideScalar(3);const B=x(I);_(b,C+0,S,B),_(P,C+2,A,B),_(D,C+4,E,B)}}function _(S,A,E,I){I<0&&S.x===1&&(o[A]=S.x-1),E.x===0&&E.z===0&&(o[A]=I/2/Math.PI+.5)}function x(S){return Math.atan2(S.z,-S.x)}function g(S){return Math.atan2(-S.y,Math.sqrt(S.x*S.x+S.z*S.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ll(e.vertices,e.indices,e.radius,e.details)}}class jv extends ll{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,r=1/i,s=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-i,0,-r,i,0,r,-i,0,r,i,-r,-i,0,-r,i,0,r,-i,0,r,i,0,-i,0,-r,i,0,-r,-i,0,r,i,0,r],o=[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,
vendor: 128,315 bytes, line 3878
387819,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(s,o,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new jv(e.radius,e.detail)}}const tg=new G,ng=new G,M_=new G,ig=new dr;class fB extends bt{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const r=Math.pow(10,4),s=Math.cos(sc*t),o=e.getIndex(),a=e.getAttribute("position"),l=o?o.count:a.count,c=[0,0,0],f=["a","b","c"],d=new Array(3),p={},m=[];for(let v=0;v<l;v+=3){o?(c[0]=o.getX(v),c[1]=o.getX(v+1),c[2]=o.getX(v+2)):(c[0]=v,c[1]=v+1,c[2]=v+2);const{a:_,b:x,c:g}=ig;if(_.fromBufferAttribute(a,c[0]),x.fromBufferAttribute(a,c[1]),g.fromBufferAttribute(a,c[2]),ig.getNormal(M_),d[0]=`${Math.round(_.x*r)},${Math.round(_.y*r)},${Math.round(_.z*r)}`,d[1]=`${Math.round(x.x*r)},${Math.round(x.y*r)},${Math.round(x.z*r)}`,d[2]=`${Math.round(g.x*r)},${Math.round(g.y*r)},${Math.round(g.z*r)}`,!(d[0]===d[1]||d[1]===d[2]||d[2]===d[0]))for(let S=0;S<3;S++){const A=(S+1)%3,E=d[S],I=d[A],b=ig[f[S]],P=ig[f[A]],D=`${E}_${I}`,O=`${I}_${E}`;O in p&&p[O]?(M_.dot(p[O].normal)<=s&&(m.push(b.x,b.y,b.z),m.push(P.x,P.y,P.z)),p[O]=null):D in p||(p[D]={index0:c[S],index1:c[A],normal:M_.clone()})}}for(const v in p)if(p[v]){const{index0:_,index1:x}=p[v];tg.fromBufferAttribute(a,_),ng.fromBufferAttribute(a,x),m.push(tg.x,tg.y,tg.z),m.push(ng.x,ng.y,ng.z)}this.setAttribute("position",new yt(m,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class ac extends Id{constructor(e){super(e),this.uuid=Gr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,r=this.holes.length;i<r;i++)t[i]=this.holes[i].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,i=e.holes.length;t<i;t++){const r=e.holes[t];this.holes.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,i=this.holes.length;t<i;t++){const r=this.holes[t];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const r=e.holes[t];this.holes.push(new Id().fromJSON(r))}return this}}const UG={triangulate:function(n,e,t=2){const i=e&&e.length,r=i?e[0]*t:n.length;let s=hB(n,0,r,t,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c,f,d,p,m;if(i&&(s=GG(n,e,s,t)),n.length>80*t){a=c=n[0],l=f=n[1];for(let v=t;v<r;v+=t)d=n[v],p=n[v+1],d<a&&(a=d),p<l&&(l=p),d>c&&(c=d),p>f&&(f=p);m=Math.max(c-a,f-l),m=m!==0?32767/m:0}return Pd(s,o,t,a,l,m,0),o}};function hB(n,e,t,i,r){let s,o;if(r===$G(n,e,t,i)>0)for(s=e;s<t;s+=i)o=dR(s,n[s],n[s+1],o);else for(s=t-i;s>=e;s-=i)o=dR(s,n[s],n[s+1],o);return o&&Jv(o,o.next)&&(Dd(o),o=o.next),o}function _c(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Jv(t,t.next)||On(t.prev,t,t.next)===0)){if(Dd(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Pd(n,e,t,i,r,s,o){if(!n)return;!o&&s&&JG(n,i,r,s);let a=n,l,c;for(;n.prev!==n.next;){if(l=n.prev,c=n.next,s?kG(n,i,r,s):OG(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(c.i/t|0),Dd(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=zG(_c(n),e,t),Pd(n,e,t,i,r,s,2)):o===2&&HG(n,e,t,i,r,s):Pd(_c(n),e,t,i,r,s,1);break}}}function OG(n){const e=n.prev,t=n,i=n.next;if(On(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,c=i.y,f=r<s?r<o?r:o:s<o?s:o,d=a<l?a<c?a:c:l<c?l:c,p=r>s?r>o?r:o:s>o?s:o,m=a>l?a>c?a:c:l>c?l:c;let v=i.next;for(;v!==e;){if(v.x>=f&&v.x<=p&&v.y>=d&&v.y<=m&&Du(r,a,s,l,o,c,v.x,v.y)&&On(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function kG(n,e,t,i){const r=n.prev,s=n,o=n.next;if(On(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,f=r.y,d=s.y,p=o.y,m=a<l?a<c?a:c:l<c?l:c,v=f<d?f<p?f:p:d<p?d:p,_=a>l?a>c?a:c:l>c?l:c,x=f>d?f>p?f:p:d>p?d:p,g=hS(m,v,e,t,i),S=hS(_,x,e,t,i);let A=n.prevZ,E=n.nextZ;for(;A&&A.z>=g&&E&&E.z<=S;){if(A.x>=m&&A.x<=_&&A.y>=v&&A.y<=x&&A!==r&&A!==o&&Du(a,f,l,d,c,p,A.x,A.y)&&On(A.prev,A,A.next)>=0||(A=A.prevZ,E.x>=m&&E.x<=_&&E.y>=v&&E.y<=x&&E!==r&&E!==o&&Du(a,f,l,d,c,p,E.x,E.y)&&On(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;A&&A.z>=g;){if(A.x>=m&&A.x<=_&&A.y>=v&&A.y<=x&&A!==r&&A!==o&&Du(a,f,l,d,c,p,A.x,A.y)&&On(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;E&&E.z<=S;){if(E.x>=m&&E.x<=_&&E.y>=v&&E.y<=x&&E!==r&&E!==o&&Du(a,f,l,d,c,p,E.x,E.y)&&On(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function zG(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Jv(r,s)&&dB(r,i,i.next,s)&&Bd(r,s)&&Bd(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Dd(i),Dd(i.next),i=n=s),i=i.next}while(i!==n);return _c(i)}function HG(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&QG(o,a)){let l=pB(o,a);o=_c(o,o.next),l=_c(l,l.next),Pd(o,e,t,i,r,s,0),Pd(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function GG(n,e,t,i){const r=[];let s,o,a,l,c;for(s=0,o=e.length;s<o;s++)a=e[s]*i,l=s<o-1?e[s+1]*i:n.length,c=hB(n,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(KG(c));for(r.sort(VG),s=0;s<r.length;s++)t=WG(r[s],t);return t}function VG(n,e){return n.x-e.x}function WG(n,e){const t=XG(n,e);if(!t)return e;const i=pB(t,n);return _c(i,i.next),_c(t,t.next)}function XG(n,e){let t=e,i=-1/0,r;const s=n.x,o=n.y;do{if(o<=t.y&&o>=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x<t.next.x?t:t.next,p===s))return r}t=t.next}while(t!==e);if(!r)return null;const a=r,l=r.x,c=r.y;let f=1/0,d;t=r;do s>=t.x&&t.x>=l&&s!==t.x&&Du(o<c?s:i,o,l,c,o<c?i:s,o,t.x,t.y)&&(d=Math.abs(o-t.y)/(s-t.x),Bd(t,n)&&(d<f||d===f&&(t.x>r.x||t.x===r.x&&jG(r,t)))&&(r=t,f=d)),t=t.next;while(t!==a);return r}function jG(n,e){return On(n.prev,n,e.prev)<0&&On(e.next,n,n.next)<0}function JG(n,e,t,i){let r=n;do r.z===0&&(r.z=hS(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,YG(r)}function YG(n){let e,t,i,r,s,o,a,l,c=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e<c&&(a++,i=i.nextZ,!!i);e++);for(l=c;a>0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,c*=2}while(o>1);return n}function hS(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function KG(n){let e=n,t=n;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==n);return t}function Du(n,e,t,i,r,s,o,a){return(r-o)*(e-a)>=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function QG(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!ZG(n,e)&&(Bd(n,e)&&Bd(e,n)&&qG(n,e)&&(On(n.prev,n,e.prev)||On(n,e.prev,e))||Jv(n,e)&&On(n.prev,n,n.next)>0&&On(e.prev,e,e.next)>0)}function On(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Jv(n,e){return n.x===e.x&&n.y===e.y}function dB(n,e,t,i){const r=sg(On(n,e,t)),s=sg(On(n,e,i)),o=sg(On(t,i,n)),a=sg(On(t,i,e));return!!(r!==s&&o!==a||r===0&&rg(n,t,e)||s===0&&rg(n,i,e)||o===0&&rg(t,n,i)||a===0&&rg(t,e,i))}function rg(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function sg(n){return n>0?1:n<0?-1:0}function ZG(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&dB(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Bd(n,e){return On(n.prev,n,n.next)<0?On(n,e,n.next)>=0&&On(n,n.prev,e)>=0:On(n,e,n.prev)<0||On(n,n.next,e)<0}function qG(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function pB(n,e){const t=new dS(n.i,n.x,n.y),i=new dS(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function dR(n,e,t,i){const r=new dS(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Dd(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function dS(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function $G(n,e,t,i){let r=0;for(let s=e,o=t-i;s<t;s+=i)r+=(n[o]-n[s])*(n[s+1]+n[o+1]),o=s;return r}class ho{static area(e){const t=e.length;let i=0;for(let r=t-1,s=0;s<t;r=s++)i+=e[r].x*e[s].y-e[s].x*e[r].y;return i*.5}static isClockWise(e){return ho.area(e)<0}static triangulateShape(e,t){const i=[],r=[],s=[];pR(e),mR(i,e);let o=e.length;t.forEach(pR);for(let l=0;l<t.length;l++)r.push(o),o+=t[l].length,mR(i,t[l]);const a=UG.triangulate(i,r);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function pR(n){const e=n.length;e>2&&n[e-1].equals(n[0])&&n.pop()}function mR(n,e){for(let t=0;t<e.length;t++)n.push(e[t].x),n.push(e[t].y)}class Yv extends bt{constructor(e=new ac([new _e(.5,.5),new _e(-.5,.5),new _e(-.5,-.5),new _e(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const i=this,r=[],s=[];for(let a=0,l=e.length;a<l;a++){const c=e[a];o(c)}this.setAttribute("position",new yt(r,3)),this.setAttribute("uv",new yt(s,2)),this.computeVertexNormals();function o(a){const l=[],c=t.curveSegments!==void 0?t.curveSegments:12,f=t.steps!==void 0?t.steps:1,d=t.depth!==void 0?t.depth:1;let p=t.bevelEnabled!==void 0?t.bevelEnabled:!0,m=t.bevelThickness!==void 0?t.bevelThickness:.2,v=t.bevelSize!==void 0?t.bevelSize:m-.1,_=t.bevelOffset!==void 0?t.bevelOffset:0,x=t.bevelSegments!==void 0?t.bevelSegments:3;const g=t.extrudePath,S=t.UVGenerator!==void 0?t.UVGenerator:e5;let A,E=!1,I,b,P,D;g&&(A=g.getSpacedPoints(f),E=!0,p=!1,I=g.computeFrenetFrames(f,!1),b=new G,P=new G,D=new G),p||(x=0,m=0,v=0,_=0);const O=a.extractPoints(c);let C=O.shape;const B=O.holes;if(!ho.isClockWise(C)){C=C.reverse();for(let Be=0,X=B.length;Be<X;Be++){const We=B[Be];ho.isClockWise(We)&&(B[Be]=We.reverse())}}const $=ho.triangulateShape(C,B),se=C;for(let Be=0,X=B.length;Be<X;Be++){const We=B[Be];C=C.concat(We)}function ce(Be,X,We){return X||console.error("THREE.ExtrudeGeometry: vec does not exist"),Be.clone().addScaledVector(X,We)}const ie=C.length,ye=$.length;function W(Be,X,We){let je,Ve,Xe;const ht=Be.x-X.x,et=Be.y-X.y,j=We.x-Be.x,k=We.y-Be.y,ge=ht*ht+et*et,Ie=ht*k-et*j;if(Math.abs(Ie)>Number.EPSILON){const De=Math.sqrt(ge),Re=Math.sqrt(j*j+k*k),ft=X.x-et/De,N=X.y+ht/De,w=We.x-k/Re,R=We.y+j/Re,z=((w-ft)*k-(R-N)*j)/(ht*k-et*j);je=ft+ht*z-Be.x,Ve=N+et*z-Be.y;const Q=je*je+Ve*Ve;if(Q<=2)return new _e(je,Ve);Xe=Math.sqrt(Q/2)}else{let De=!1;ht>Number.EPSILON?j>Number.EPSILON&&(De=!0):ht<-Number.EPSILON?j<-Number.EPSILON&&(De=!0):Math.sign(et)===Math.sign(k)&&(De=!0),De?(je=-et,Ve=ht,Xe=Math.sqrt(ge)):(je=ht,Ve=et,Xe=Math.sqrt(ge/2))}return new _e(je/Xe,Ve/Xe)}const ue=[];for(let Be=0,X=se.length,We=X-1,je=Be+1;Be<X;Be++,We++,je++)We===X&&(We=0),je===X&&(je=0),ue[Be]=W(se[Be],se[We],se[je]);const oe=[];let de,we=ue.concat();for(let Be=0,X=B.length;Be<X;Be++){const We=B[Be];de=[];for(let je=0,Ve=We.length,Xe=Ve-1,ht=je+1;je<Ve;je++,Xe++,ht++)Xe===Ve&&(Xe=0),ht===Ve&&(ht=0),de[je]=W(We[je],We[Xe],We[ht]);oe.push(de),we=we.concat(de)}for(let Be=0;Be<x;Be++){const X=Be/x,We=m*Math.cos(X*Math.PI/2),je=v*Math.sin(X*Math.PI/2)+_;for(let Ve=0,Xe=se.length;Ve<Xe;Ve++){const ht=ce(se[Ve],ue[Ve],je);ke(ht.x,ht.y,-We)}for(let Ve=0,Xe=B.length;Ve<Xe;Ve++){const ht=B[Ve];de=oe[Ve];for(let et=0,j=ht.length;et<j;et++){const k=ce(ht[et],de[et],je);ke(k.x,k.y,-We)}}}const Ue=v+_;for(let Be=0;Be<ie;Be++){const X=p?ce(C[Be],we[Be],Ue):C[Be];E?(P.copy(I.normals[0]).multiplyScalar(X.x),b.copy(I.binormals[0]).multiplyScalar(X.y),D.copy(A[0]).add(P).add(b),ke(D.x,D.y,D.z)):ke(X.x,X.y,0)}for(let Be=1;Be<=f;Be++)for(let X=0;X<ie;X++){const We=p?ce(C[X],we[X],Ue):C[X];E?(P.copy(I.normals[Be]).multiplyScalar(We.x),b.copy(I.binormals[Be]).multiplyScalar(We.y),D.copy(A[Be]).add(P).add(b),ke(D.x,D.y,D.z)):ke(We.x,We.y,d/f*Be)}for(let Be=x-1;Be>=0;Be--){const X=Be/x,We=m*Math.cos(X*Math.PI/2),je=v*Math.sin(X*Math.PI/2)+_;for(let Ve=0,Xe=se.length;Ve<Xe;Ve++){const ht=ce(se[Ve],ue[Ve],je);ke(ht.x,ht.y,d+We)}for(let Ve=0,Xe=B.length;Ve<Xe;Ve++){const ht=B[Ve];de=oe[Ve];for(let et=0,j=ht.length;et<j;et++){const k=ce(ht[et],de[et],je);E?ke(k.x,k.y+A[f-1].y,A[f-1].x+We):ke(k.x,k.y,d+We)}}}pe(),be();function pe(){const Be=r.length/3;if(p){let X=0,We=ie*X;for(let je=0;je<ye;je++){const Ve=$[je];nt(Ve[2]+We,Ve[1]+We,Ve[0]+We)}X=f+x*2,We=ie*X;for(let je=0;je<ye;je++){const Ve=$[je];nt(Ve[0]+We,Ve[1]+We,Ve[2]+We)}}else{for(let X=0;X<ye;X++){const We=$[X];nt(We[2],We[1],We[0])}for(let X=0;X<ye;X++){const We=$[X];nt(We[0]+ie*f,We[1]+ie*f,We[2]+ie*f)}}i.addGroup(Be,r.length/3-Be,0)}function be(){const Be=r.length/3;let X=0;Ne(se,X),X+=se.length;for(let We=0,je=B.length;We<je;We++){const Ve=B[We];Ne(Ve,X),X+=Ve.length}i.addGroup(Be,r.length/3-Be,1)}function Ne(Be,X){let We=Be.length;for(;--We>=0;){const je=We;let Ve=We-1;Ve<0&&(Ve=Be.length-1);for(let Xe=0,ht=f+x*2;Xe<ht;Xe++){const et=ie*Xe,j=ie*(Xe+1),k=X+je+et,ge=X+Ve+et,Ie=X+Ve+j,De=X+je+j;vt(k,ge,Ie,De)}}}function ke(Be,X,We){l.push(Be),l.push(X),l.push(We)}function nt(Be,X,We){ut(Be),ut(X),ut(We);const je=r.length/3,Ve=S.generateTopUV(i,r,je-3,je-2,je-1);Ze(Ve[0]),Ze(Ve[1]),Ze(Ve[2])}function vt(Be,X,We,je){ut(Be),ut(X),ut(je),ut(X),ut(We),ut(je);const Ve=r.length/3,Xe=S.generateSideWallUV(i,r,Ve-6,Ve-3,Ve-2,Ve-1);Ze(Xe[0]),Ze(Xe[1]),Ze(Xe[3]),Ze(Xe[1]),Ze(Xe[2]),Ze(Xe[3])}function ut(Be){r.push(l[Be*3+0]),r.push(l[Be*3+1]),r.push(l[Be*3+2])}function Ze(Be){s.push(Be.x),s.push(Be.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,i=this.parameters.options;return t5(t,i,e)}static fromJSON(e,t){const i=[];for(let s=0,o=e.shapes.length;s<o;s++){const a=t[e.shapes[s]];i.push(a)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new Q0[r.type]().fromJSON(r)),new Yv(i,e.options)}}const e5={generateTopUV:function(n,e,t,i,r){const s=e[t*3],o=e[t*3+1],a=e[i*3],l=e[i*3+1],c=e[r*3],f=e[r*3+1];return[new _e(s,o),new _e(a,l),new _e(c,f)]},generateSideWallUV:function(n,e,t,i,r,s){const o=e[t*3],a=e[t*3+1],l=e[t*3+2],c=e[i*3],f=e[i*3+1],d=e[i*3+2],p=e[r*3],m=e[r*3+1],v=e[r*3+2],_=e[s*3],x=e[s*3+1],g=e[s*3+2];return Math.abs(a-f)<Math.abs(o-c)?[new _e(o,1-l),new _e(c,1-d),new _e(p,1-v),new _e(_,1-g)]:[new _e(a,1-l),new _e(f,1-d),new _e(m,1-v),new _e(x,1-g)]}};function t5(n,e,t){if(t.shapes=[],Array.isArray(n))for(let i=0,r=n.length;i<r;i++){const s=n[i];t.shapes.push(s.uuid)}else t.shapes.push(n.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class rp extends ll{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,r=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],s=[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(r,s,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new rp(e.radius,e.detail)}}class sp extends ll{constructor(e=1,t=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,r,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new sp(e.radius,e.detail)}}class Kv extends bt{constructor(e=.5,t=1,i=32,r=1,s=0,o=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:r,thetaStart:s,thetaLength:o},i=Math.max(3,i),r=Math.max(1,r);const a=[],l=[],c=[],f=[];let d=e;const p=(t-e)/r,m=new G,v=new _e;for(let _=0;_<=r;_++){for(let x=0;x<=i;x++){const g=s+x/i*o;m.x=d*Math.cos(g),m.y=d*Math.sin(g),l.push(m.x,m.y,m.z),c.push(0,0,1),v.x=(m.x/t+1)/2,v.y=(m.y/t+1)/2,f.push(v.x,v.y)}d+=p}for(let _=0;_<r;_++){const x=_*(i+1);for(let g=0;g<i;g++){const S=g+x,A=S,E=S+i+1,I=S+i+2,b=S+1;a.push(A,E,b),a.push(E,I,b)}}this.setIndex(a),this.setAttribute("position",new yt(l,3)),this.setAttribute("normal",new yt(c,3)),this.setAttribute("uv",new yt(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Kv(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Qv extends bt{constructor(e=new ac([new _e(0,.5),new _e(-.5,-.5),new _e(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const i=[],r=[],s=[],o=[];let a=0,l=0;if(Array.isArray(e)===!1)c(e);else for(let f=0;f<e.length;f++)c(e[f]),this.addGroup(a,l,f),a+=l,l=0;this.setIndex(i),this.setAttribute("position",new yt(r,3)),this.setAttribute("normal",new yt(s,3)),this.setAttribute("uv",new yt(o,2));function c(f){const d=r.length/3,p=f.extractPoints(t);let m=p.shape;const v=p.holes;ho.isClockWise(m)===!1&&(m=m.reverse());for(let x=0,g=v.length;x<g;x++){const S=v[x];ho.isClockWise(S)===!0&&(v[x]=S.reverse())}const _=ho.triangulateShape(m,v);for(let x=0,g=v.length;x<g;x++){const S=v[x];m=m.concat(S)}for(let x=0,g=m.length;x<g;x++){const S=m[x];r.push(S.x,S.y,0),s.push(0,0,1),o.push(S.x,S.y)}for(let x=0,g=_.length;x<g;x++){const S=_[x],A=S[0]+d,E=S[1]+d,I=S[2]+d;i.push(A,E,I),l+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return n5(t,e)}static fromJSON(e,t){const i=[];for(let r=0,s=e.shapes.length;r<s;r++){const o=t[e.shapes[r]];i.push(o)}return new Qv(i,e.curveSegments)}}function n5(n,e){if(e.shapes=[],Array.isArray(n))for(let t=0,i=n.length;t<i;t++){const r=n[t];e.shapes.push(r.uuid)}else e.shapes.push(n.uuid);return e}class op extends bt{constructor(e=1,t=32,i=16,r=0,s=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const l=Math.min(o+a,Math.PI);let c=0;const f=[],d=new G,p=new G,m=[],v=[],_=[],x=[];for(let g=0;g<=i;g++){const S=[],A=g/i;let E=0;g===0&&o===0?E=.5/t:g===i&&l===Math.PI&&(E=-.5/t);for(let I=0;I<=t;I++){const b=I/t;d.x=-e*Math.cos(r+b*s)*Math.sin(o+A*a),d.y=e*Math.cos(o+A*a),d.z=e*Math.sin(r+b*s)*Math.sin(o+A*a),v.push(d.x,d.y,d.z),p.copy(d).normalize(),_.push(p.x,p.y,p.z),x.push(b+E,1-A),S.push(c++)}f.push(S)}for(let g=0;g<i;g++)for(let S=0;S<t;S++){const A=f[g][S+1],E=f[g][S],I=f[g+1][S],b=f[g+1][S+1];(g!==0||o>0)&&m.push(A,E,b),(g!==i-1||l<Math.PI)&&m.push(E,I,b)}this.setIndex(m),this.setAttribute("position",new yt(v,3)),this.setAttribute("normal",new yt(_,3)),this.setAttribute("uv",new yt(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new op(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Zv extends ll{constructor(e=1,t=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,r,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Zv(e.radius,e.detail)}}class qv extends bt{constructor(e=1,t=.4,i=12,r=48,s=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:r,arc:s},i=Math.floor(i),r=Math.floor(r);const o=[],a=[],l=[],c=[],f=new G,d=new G,p=new G;for(let m=0;m<=i;m++)for(let v=0;v<=r;v++){const _=v/r*s,x=m/i*Math.PI*2;d.x=(e+t*Math.cos(x))*Math.cos(_),d.y=(e+t*Math.cos(x))*Math.sin(_),d.z=t*Math.sin(x),a.push(d.x,d.y,d.z),f.x=e*Math.cos(_),f.y=e*Math.sin(_),p.subVectors(d,f).normalize(),l.push(p.x,p.y,p.z),c.push(v/r),c.push(m/i)}for(let m=1;m<=i;m++)for(let v=1;v<=r;v++){const _=(r+1)*m+v-1,x=(r+1)*(m-1)+v-1,g=(r+1)*(m-1)+v,S=(r+1)*m+v;o.push(_,x,S),o.push(x,g,S)}this.setIndex(o),this.setAttribute("position",new yt(a,3)),this.setAttribute("normal",new yt(l,3)),this.setAttribute("uv",new yt(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new qv(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class $v extends bt{constructor(e=1,t=.4,i=64,r=8,s=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:r,p:s,q:o},i=Math.floor(i),r=Math.floor(r);const a=[],l=[],c=[],f=[],d=new G,p=new G,m=new G,v=new G,_=new G,x=new G,g=new G;for(let A=0;A<=i;++A){const E=A/i*s*Math.PI*2;S(E,s,o,e,m),S(E+.01,s,o,e,v),x.subVectors(v,m),g.addVectors(v,m),_.crossVectors(x,g),g.crossVectors(_,x),_.normalize(),g.normalize();for(let I=0;I<=r;++I){const b=I/r*Math.PI*2,P=-t*Math.cos(b),D=t*Math.sin(b);d.x=m.x+(P*g.x+D*_.x),d.y=m.y+(P*g.y+D*_.y),d.z=m.z+(P*g.z+D*_.z),l.push(d.x,d.y,d.z),p.subVectors(d,m).normalize(),c.push(p.x,p.y,p.z),f.push(A/i),f.push(I/r)}}for(let A=1;A<=i;A++)for(let E=1;E<=r;E++){const I=(r+1)*(A-1)+(E-1),b=(r+1)*A+(E-1),P=(r+1)*A+E,D=(r+1)*(A-1)+E;a.push(I,b,D),a.push(b,P,D)}this.setIndex(a),this.setAttribute("position",new yt(l,3)),this.setAttribute("normal",new yt(c,3)),this.setAttribute("uv",new yt(f,2));function S(A,E,I,b,P){const D=Math.cos(A),O=Math.sin(A),C=I/E*A,B=Math.cos(C);P.x=b*(2+B)*.5*D,P.y=b*(2+B)*O*.5,P.z=b*Math.sin(C)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new $v(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class ey extends bt{constructor(e=new gM(new G(-1,-1,0),new G(-1,1,0),new G(1,1,0)),t=64,i=1,r=8,s=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:r,closed:s};const o=e.computeFrenetFrames(t,s);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new G,l=new G,c=new _e;let f=new G;const d=[],p=[],m=[],v=[];_(),this.setIndex(v),this.setAttribute("position",new yt(d,3)),this.setAttribute("normal",new yt(p,3)),this.setAttribute("uv",new yt(m,2));function _(){for(let A=0;A<t;A++)x(A);x(s===!1?t:0),S(),g()}function x(A){f=e.getPointAt(A/t,f);const E=o.normals[A],I=o.binormals[A];for(let b=0;b<=r;b++){const P=b/r*Math.PI*2,D=Math.sin(P),O=-Math.cos(P);l.x=O*E.x+D*I.x,l.y=O*E.y+D*I.y,l.z=O*E.z+D*I.z,l.normalize(),p.push(l.x,l.y,l.z),a.x=f.x+i*l.x,a.y=f.y+i*l.y,a.z=f.z+i*l.z,d.push(a.x,a.y,a.z)}}function g(){for(let A=1;A<=t;A++)for(let E=1;E<=r;E++){const I=(r+1)*(A-1)+(E-1),b=(r+1)*A+(E-1),P=(r+1)*A+E,D=(r+1)*(A-1)+E;v.push(I,b,D),v.push(b,P,D)}}function S(){for(let A=0;A<=t;A++)for(let E=0;E<=r;E++)c.x=A/t,c.y=E/r,m.push(c.x,c.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 ey(new Q0[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class mB extends bt{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],i=new Set,r=new G,s=new G;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,f=l.length;c<f;++c){const d=l[c],p=d.start,m=d.count;for(let v=p,_=p+m;v<_;v+=3)for(let x=0;x<3;x++){const g=a.getX(v+x),S=a.getX(v+(x+1)%3);r.fromBufferAttribute(o,g),s.fromBufferAttribute(o,S),gR(r,s,i)===!0&&(t.push(r.x,r.y,r.z),t.push(s.x,s.y,s.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const f=3*a+c,d=3*a+(c+1)%3;r.fromBufferAttribute(o,f),s.fromBufferAttribute(o,d),gR(r,s,i)===!0&&(t.push(r.x,r.y,r.z),t.push(s.x,s.y,s.z))}}this.setAttribute("position",new yt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function gR(n,e,t){const i=`${n.x},${n.y},${n.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${n.x},${n.y},${n.z}`;return t.has(i)===!0||t.has(r)===!0?!1:(t.add(i),t.add(r),!0)}var vR=Object.freeze({__proto__:null,BoxGeometry:Ic,CapsuleGeometry:Vv,CircleGeometry:Wv,ConeGeometry:Xv,CylinderGeometry:Cf,DodecahedronGeometry:jv,EdgesGeometry:fB,ExtrudeGeometry:Yv,IcosahedronGeometry:rp,LatheGeometry:ip,OctahedronGeometry:sp,PlaneGeometry:xo,PolyhedronGeometry:ll,RingGeometry:Kv,ShapeGeometry:Qv,SphereGeometry:op,TetrahedronGeometry:Zv,TorusGeometry:qv,TorusKnotGeometry:$v,TubeGeometry:ey,WireframeGeometry:mB});class gB extends Hn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new qe(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 vB extends nn{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class ap extends Hn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new qe(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 qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=al,this.normalScale=new _e(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 jr,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 sr extends ap{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 _e(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Jn(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 qe(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 qe(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new qe(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 yB extends Hn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=al,this.normalScale=new _e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new jr,this.combine=Kd,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 xB extends Hn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new qe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=al,this.normalScale=new _e(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 yM extends Hn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=al,this.normalScale=new _e(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 _B extends Hn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new qe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=al,this.normalScale=new _e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new jr,this.combine=Kd,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 SB extends Hn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new qe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=al,this.normalScale=new _e(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 AB extends Ki{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 Zl(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function MB(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function EB(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function pS(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function xM(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function i5(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l<s.tracks.length;++l){const c=s.tracks[l],f=c.getValueSize(),d=[],p=[];for(let m=0;m<c.times.length;++m){const v=c.times[m]*r;if(!(v<t||v>=i)){d.push(c.times[m]);for(let _=0;_<f;++_)p.push(c.values[m*f+_])}}d.length!==0&&(c.times=Zl(d,c.times.constructor),c.values=Zl(p,c.values.constructor),o.push(c))}s.tracks=o;let a=1/0;for(let l=0;l<s.tracks.length;++l)a>s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l<s.tracks.length;++l)s.tracks[l].shift(-1*a);return s.resetDuration(),s}function r5(n,e=0,t=n,i=30){i<=0&&(i=30);const r=t.tracks.length,s=e/i;for(let o=0;o<r;++o){const a=t.tracks[o],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const c=n.tracks.find(function(g){return g.name===a.name&&g.ValueTypeName===l});if(c===void 0)continue;let f=0;const d=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(f=d/3);let p=0;const m=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=m/3);const v=a.times.length-1;let _;if(s<=a.times[0]){const g=f,S=d-f;_=a.values.slice(g,S)}else if(s>=a.times[v]){const g=v*d+f,S=g+d-f;_=a.values.slice(g,S)}else{const g=a.createInterpolant(),S=f,A=d-f;g.evaluate(s),_=g.resultBuffer.slice(S,A)}l==="quaternion"&&new Ei().fromArray(_).normalize().conjugate().toArray(_);const x=c.times.length;for(let g=0;g<x;++g){const S=g*m+p;if(l==="quaternion")Ei.multiplyQuaternionsFlat(c.values,S,_,0,c.values,S);else{const A=m-p*2;for(let E=0;E<A;++E)c.values[S+E]-=_[E]}}}return n.blendMode=YA,n}const s5={convertArray:Zl,isTypedArray:MB,getKeyframeOrder:EB,sortedArray:pS,flattenJSON:xM,subclip:i5,makeClipAdditive:r5};class Rf{constructor(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,r=t[i],s=t[i-1];e:{t:{let o;n:{i:if(!(e<r)){for(let a=i+2;;){if(r===void 0){if(e<s)break i;return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(s=r,r=t[++i],e<r)break t}o=t.length;break n}if(!(e>=s)){const a=t[1];e<a&&(i=2,s=a);for(let l=i-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(r=s,s=t[--i-1],e>=s)break t}o=i,i=0;break n}break e}for(;i<o;){const a=i+o>>>1;e<t[a]?o=a:i=a+1}if(r=t[i],s=t[i-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,s,r)}return this.interpolate_(i,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r;for(let o=0;o!==r;++o)t[o]=i[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class wB extends Rf{constructor(e,t,i,r){super(e,t,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Jl,endingEnd:Jl}}intervalChanged_(e,t,i){const r=this.parameterPositions;let s=e-2,o=e+1,a=r[s],l=r[o];if(a===void 0)switch(this.getSettings_().endingStart){case Yl:s=e,a=2*t-i;break;case Md:s=r.length-2,a=t+r[s]-r[s+1];break;default:s=e,a=i}if(l===void 0)switch(this.getSettings_().endingEnd){case Yl:o=e,l=2*i-t;break;case Md:o=1,l=i+r[1]-r[0];break;default:o=e-1,l=t}const c=(i-t)*.5,f=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-i),this._offsetPrev=s*f,this._offsetNext=o*f}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,f=this._offsetPrev,d=this._offsetNext,p=this._weightPrev,m=this._weightNext,v=(i-t)/(r-t),_=v*v,x=_*v,g=-p*x+2*p*_-p*v,S=(1+p)*x+(-1.5-2*p)*_+(-.5+p)*v+1,A=(-1-m)*x+(1.5+m)*_+.5*v,E=m*x-m*_;for(let I=0;I!==a;++I)s[I]=g*o[f+I]+S*o[c+I]+A*o[l+I]+E*o[d+I];return s}}class _M extends Rf{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,f=(i-t)/(r-t),d=1-f;for(let p=0;p!==a;++p)s[p]=o[c+p]*d+o[l+p]*f;return s}}class TB extends Rf{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class js{constructor(e,t,i,r){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=Zl(t,this.TimeBufferType),this.values=Zl(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let i;if(t.toJSON!==this.toJSON)i=t.toJSON(e);else{i={name:e.name,times:Zl(e.times,Array),values:Zl(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new TB(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new _M(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new wB(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case lf:t=this.InterpolantFactoryMethodDiscrete;break;case cf:t=this.InterpolantFactoryMethodLinear;break;case Fg:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const i="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(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return lf;case this.InterpolantFactoryMethodLinear:return cf;case this.InterpolantFactoryMethodSmooth:return Fg}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]*=e}return this}trim(e,t){const i=this.times,r=i.length;let s=0,o=r-1;for(;s!==r&&i[s]<e;)++s;for(;o!==-1&&i[o]>t;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&MB(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===Fg,s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const c=e[a],f=e[a+1];if(c!==f&&(a!==1||c!==e[0]))if(r)l=!0;else{const d=a*i,p=d-i,m=d+i;for(let v=0;v!==i;++v){const _=t[d+v];if(_!==t[p+v]||_!==t[m+v]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const d=a*i,p=o*i;for(let m=0;m!==i;++m)t[p+m]=t[d+m]}++o}}if(s>0){e[o]=e[s];for(let a=s*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}js.prototype.TimeBufferType=Float32Array;js.prototype.ValueBufferType=Float32Array;js.prototype.DefaultInterpolation=cf;class Pc extends js{constructor(e,t,i){super(e,t,i)}}Pc.prototype.ValueTypeName="bool";Pc.prototype.ValueBufferType=Array;Pc.prototype.DefaultInterpolation=lf;Pc.prototype.InterpolantFactoryMethodLinear=void 0;Pc.prototype.InterpolantFactoryMethodSmooth=void 0;class SM extends js{}SM.prototype.ValueTypeName="color";class Sc extends js{}Sc.prototype.ValueTypeName="number";class CB extends Rf{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let c=e*a;for(let f=c+a;c!==f;c+=4)Ei.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ac extends js{InterpolantFactoryMethodLinear(e){return new CB(this.times,this.values,this.getValueSize(),e)}}Ac.prototype.ValueTypeName="quaternion";Ac.prototype.InterpolantFactoryMethodSmooth=void 0;class Bc extends js{constructor(e,t,i){super(e,t,i)}}Bc.prototype.ValueTypeName="string";Bc.prototype.ValueBufferType=Array;Bc.prototype.DefaultInterpolation=lf;Bc.prototype.InterpolantFactoryMethodLinear=void 0;Bc.prototype.InterpolantFactoryMethodSmooth=void 0;class Mc extends js{}Mc.prototype.ValueTypeName="vector";class hf{constructor(e="",t=-1,i=[],r=Bv){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Gr(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(a5(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(js.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a<s;a++){let l=[],c=[];l.push((a+s-1)%s,a,(a+1)%s),c.push(0,1,0);const f=EB(l);l=pS(l,1,f),c=pS(c,1,f),!r&&l[0]===0&&(l.push(s),c.push(c[0])),o.push(new Sc(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/i))}return new this(e,-1,o)}static findByName(e,t){let i=e;if(!Array.isArray(e)){const r=e;i=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<i.length;r++)if(i[r].name===t)return i[r];return null}static CreateClipsFromMorphTargetSequences(e,t,i){const r={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],f=c.name.match(s);if(f&&f.length>1){const d=f[1];let p=r[d];p||(r[d]=p=[]),p.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,m,v,_){if(m.length!==0){const x=[],g=[];xM(m,x,g,v),x.length!==0&&_.push(new d(p,x,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d<c.length;d++){const p=c[d].keys;if(!(!p||p.length===0))if(p[0].morphTargets){const m={};let v;for(v=0;v<p.length;v++)if(p[v].morphTargets)for(let _=0;_<p[v].morphTargets.length;_++)m[p[v].morphTargets[_]]=-1;for(const _ in m){const x=[],g=[];for(let S=0;S!==p[v].morphTargets.length;++S){const A=p[v];x.push(A.time),g.push(A.morphTarget===_?1:0)}r.push(new Sc(".morphTargetInfluence["+_+"]",x,g))}l=m.length*o}else{const m=".bones["+t[d].name+"]";i(Mc,m+".position",p,"pos",r),i(Ac,m+".quaternion",p,"rot",r),i(Mc,m+".scale",p,"scl",r)}}return r.length===0?null:new this(s,l,r,a)}resetDuration(){const e=this.tracks;let t=0;for(let i=0,r=e.length;i!==r;++i){const s=this.tracks[i];t=Math.max(t,s.times[s.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 t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function o5(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Sc;case"vector":case"vector2":case"vector3":case"vector4":return Mc;case"color":return SM;case"quaternion":return Ac;case"bool":case"boolean":return Pc;case"string":return Bc}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}function a5(n){if(n.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=o5(n.type);if(n.times===void 0){const t=[],i=[];xM(n.keys,t,i,"value"),n.times=t,n.values=i}return e.parse!==void 0?e.parse(n):new e(n.name,n.times,n.values,n.interpolation)}const Wo={enabled:!1,files:{},add:function(n,e){this.enabled!==!1&&(this.files[n]=e)},get:function(n){if(this.enabled!==!1)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}};class ty{constructor(e,t,i){const r=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this.itemStart=function(f){a++,s===!1&&r.onStart!==void 0&&r.onStart(f,o,a),s=!0},this.itemEnd=function(f){o++,r.onProgress!==void 0&&r.onProgress(f,o,a),o===a&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(f){r.onError!==void 0&&r.onError(f)},this.resolveURL=function(f){return l?l(f):f},this.setURLModifier=function(f){return l=f,this},this.addHandler=function(f,d){return c.push(f,d),this},this.removeHandler=function(f){const d=c.indexOf(f);return d!==-1&&c.splice(d,2),this},this.getHandler=function(f){for(let d=0,p=c.length;d<p;d+=2){const m=c[d],v=c[d+1];if(m.global&&(m.lastIndex=0),m.test(f))return v}return null}}}const Lu=new ty;class Bi{constructor(e){this.manager=e!==void 0?e:Lu,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const i=this;return new Promise(function(r,s){i.load(e,r,t,s)})}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}}Bi.DEFAULT_MATERIAL_NAME="__DEFAULT";const Bo={};class l5 extends Error{constructor(e,t){super(e),this.response=t}}class Ii extends Bi{constructor(e){super(e)}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=Wo.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(Bo[e]!==void 0){Bo[e].push({onLoad:t,onProgress:i,onError:r});return}Bo[e]=[],Bo[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const f=Bo[e],d=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=p?parseInt(p):0,v=m!==0;let _=0;const x=new ReadableStream({start(g){S();function S(){d.read().then(({done:A,value:E})=>{if(A)g.close();else{_+=E.byteLength;const I=new ProgressEvent("progress",{lengthComputable:v,loaded:_,total:m});for(let b=0,P=f.length;b<P;b++){const D=f[b];D.onProgress&&D.onProgress(I)}g.enqueue(E),S()}},A=>{g.error(A)})}}});return new Response(x)}else throw new l5(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(f=>new DOMParser().parseFromString(f,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,m=new TextDecoder(p);return c.arrayBuffer().then(v=>m.decode(v))}}}).then(c=>{Wo.add(e,c);const f=Bo[e];delete Bo[e];for(let d=0,p=f.length;d<p;d++){const m=f[d];m.onLoad&&m.onLoad(c)}}).catch(c=>{const f=Bo[e];if(f===void 0)throw this.manager.itemError(e),c;delete Bo[e];for(let d=0,p=f.length;d<p;d++){const m=f[d];m.onError&&m.onError(c)}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}}class c5 extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Ii(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i<e.length;i++){const r=hf.parse(e[i]);t.push(r)}return t}}class u5 extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=[],a=new Hv,l=new Ii(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(s.withCredentials);let c=0;function f(d){l.load(e[d],function(p){const m=s.parse(p,!0);o[d]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps},c+=1,c===6&&(m.mipmapCount===1&&(a.minFilter=Ft),a.image=o,a.format=m.format,a.needsUpdate=!0,t&&t(a))},i,r)}if(Array.isArray(e))for(let d=0,p=e.length;d<p;++d)f(d);else l.load(e,function(d){const p=s.parse(d,!0);if(p.isCubemap){const m=p.mipmaps.length/p.mipmapCount;for(let v=0;v<m;v++){o[v]={mipmaps:[]};for(let _=0;_<p.mipmapCount;_++)o[v].mipmaps.push(p.mipmaps[v*p.mipmapCount+_]),o[v].format=p.format,o[v].width=p.width,o[v].height=p.height}a.image=o}else a.image.width=p.width,a.image.height=p.height,a.mipmaps=p.mipmaps;p.mipmapCount===1&&(a.minFilter=Ft),a.format=p.format,a.needsUpdate=!0,t&&t(a)},i,r);return a}}class Ld extends Bi{constructor(e){super(e)}load(e,t,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Wo.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a=bd("img");function l(){f(),Wo.add(e,this),t&&t(this),s.manager.itemEnd(e)}function c(d){f(),r&&r(d),s.manager.itemError(e),s.manager.itemEnd(e)}function f(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class RB extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=new $d;s.colorSpace=jn;const o=new Ld(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function l(c){o.load(e[c],function(f){s.images[c]=f,a++,a===6&&(s.needsUpdate=!0,t&&t(s))},void 0,r)}for(let c=0;c<e.length;++c)l(c);return s}}class AM extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new gs,a=new Ii(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(s.withCredentials),a.load(e,function(l){let c;try{c=s.parse(l)}catch(f){if(r!==void 0)r(f);else{console.error(f);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:ei,o.wrapT=c.wrapT!==void 0?c.wrapT:ei,o.magFilter=c.magFilter!==void 0?c.magFilter:Ft,o.minFilter=c.minFilter!==void 0?c.minFilter:Ft,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(o.colorSpace=c.colorSpace),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=kr),c.mipmapCount===1&&(o.minFilter=Ft),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},i,r),o}}class lp extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=new Qt,o=new Ld(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,t!==void 0&&t(s)},i,r),s}}class cl extends jt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new qe(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 bB extends cl{constructor(e,t,i){super(e,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(jt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new qe(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const E_=new ct,yR=new G,xR=new G;class MM{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new _e(512,512),this.map=null,this.mapPass=null,this.matrix=new ct,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ep,this._frameExtents=new _e(1,1),this._viewportCount=1,this._viewports=[new rn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;yR.setFromMatrixPosition(e.matrixWorld),t.position.copy(yR),xR.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(xR),t.updateMatrixWorld(),E_.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(E_),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(E_)}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.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 f5 extends MM{constructor(){super(new Tn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=uf*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(i!==t.fov||r!==t.aspect||s!==t.far)&&(t.fov=i,t.aspect=r,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class EM extends cl{constructor(e,t,i=0,r=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(jt.DEFAULT_UP),this.updateMatrix(),this.target=new jt,this.distance=i,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new f5}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 _R=new ct,mh=new G,w_=new G;class h5 extends MM{constructor(){super(new Tn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new _e(4,2),this._viewportCount=6,this._viewports=[new rn(2,1,1,1),new rn(0,1,1,1),new rn(3,1,1,1),new rn(1,1,1,1),new rn(3,0,1,1),new rn(1,0,1,1)],this._cubeDirections=[new G(1,0,0),new G(-1,0,0),new G(0,0,1),new G(0,0,-1),new G(0,1,0),new G(0,-1,0)],this._cubeUps=[new G(0,1,0),new G(0,1,0),new G(0,1,0),new G(0,1,0),new G(0,0,1),new G(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),mh.setFromMatrixPosition(e.matrixWorld),i.position.copy(mh),w_.copy(i.position),w_.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(w_),i.updateMatrixWorld(),r.makeTranslation(-mh.x,-mh.y,-mh.z),_R.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(_R)}}class wM extends cl{constructor(e,t,i=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new h5}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 d5 extends MM{constructor(){super(new xr(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class TM extends cl{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(jt.DEFAULT_UP),this.updateMatrix(),this.target=new jt,this.shadow=new d5}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class IB extends cl{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class PB extends cl{constructor(e,t,i=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=r}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 BB{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new G)}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 i=e.x,r=e.y,s=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*s),t.addScaledVector(o[3],.488603*i),t.addScaledVector(o[4],1.092548*(i*r)),t.addScaledVector(o[5],1.092548*(r*s)),t.addScaledVector(o[6],.315392*(3*s*s-1)),t.addScaledVector(o[7],1.092548*(i*s)),t.addScaledVector(o[8],.546274*(i*i-r*r)),t}getIrradianceAt(e,t){const i=e.x,r=e.y,s=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],2*.511664*r),t.addScaledVector(o[2],2*.511664*s),t.addScaledVector(o[3],2*.511664*i),t.addScaledVector(o[4],2*.429043*i*r),t.addScaledVector(o[5],2*.429043*r*s),t.addScaledVector(o[6],.743125*s*s-.247708),t.addScaledVector(o[7],2*.429043*i*s),t.addScaledVector(o[8],.429043*(i*i-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],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 i=this.coefficients;for(let r=0;r<9;r++)i[r].fromArray(e,t+r*3);return this}toArray(e=[],t=0){const i=this.coefficients;for(let r=0;r<9;r++)i[r].toArray(e,t+r*3);return e}static getBasisAt(e,t){const i=e.x,r=e.y,s=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*s,t[3]=.488603*i,t[4]=1.092548*i*r,t[5]=1.092548*r*s,t[6]=.315392*(3*s*s-1),t[7]=1.092548*i*s,t[8]=.546274*(i*i-r*r)}}class DB extends cl{constructor(e=new BB,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 ny extends Bi{constructor(e){super(e),this.textures={}}load(e,t,i,r){const s=this,o=new Ii(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=this.textures;function i(s){return t[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),t[s]}const r=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(r.uuid=e.uuid),e.name!==void 0&&(r.name=e.name),e.color!==void 0&&r.color!==void 0&&r.color.setHex(e.color),e.roughness!==void 0&&(r.roughness=e.roughness),e.metalness!==void 0&&(r.metalness=e.metalness),e.sheen!==void 0&&(r.sheen=e.sheen),e.sheenColor!==void 0&&(r.sheenColor=new qe().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(r.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&r.emissive!==void 0&&r.emissive.setHex(e.emissive),e.specular!==void 0&&r.specular!==void 0&&r.specular.setHex(e.specular),e.specularIntensity!==void 0&&(r.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&r.specularColor!==void 0&&r.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(r.shininess=e.shininess),e.clearcoat!==void 0&&(r.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(r.dispersion=e.dispersion),e.iridescence!==void 0&&(r.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(r.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(r.transmission=e.transmission),e.thickness!==void 0&&(r.thickness=e.thickness),e.attenuationDistance!==void 0&&(r.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&r.attenuationColor!==void 0&&r.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(r.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(r.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(r.fog=e.fog),e.flatShading!==void 0&&(r.flatShading=e.flatShading),e.blending!==void 0&&(r.blending=e.blending),e.combine!==void 0&&(r.combine=e.combine),e.side!==void 0&&(r.side=e.side),e.shadowSide!==void 0&&(r.shadowSide=e.shadowSide),e.opacity!==void 0&&(r.opacity=e.opacity),e.transparent!==void 0&&(r.transparent=e.transparent),e.alphaTest!==void 0&&(r.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(r.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(r.depthFunc=e.depthFunc),e.depthTest!==void 0&&(r.depthTest=e.depthTest),e.depthWrite!==void 0&&(r.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(r.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(r.blendSrc=e.blendSrc),e.blendDst!==void 0&&(r.blendDst=e.blendDst),e.blendEquation!==void 0&&(r.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(r.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(r.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(r.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&r.blendColor!==void 0&&r.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(r.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(r.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(r.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(r.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(r.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(r.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(r.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(r.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(r.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(r.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(r.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(r.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(r.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(r.rotation=e.rotation),e.linewidth!==void 0&&(r.linewidth=e.linewidth),e.dashSize!==void 0&&(r.dashSize=e.dashSize),e.gapSize!==void 0&&(r.gapSize=e.gapSize),e.scale!==void 0&&(r.scale=e.scale),e.polygonOffset!==void 0&&(r.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(r.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(r.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(r.dithering=e.dithering),e.alphaToCoverage!==void 0&&(r.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(r.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(r.forceSinglePass=e.forceSinglePass),e.visible!==void 0&&(r.visible=e.visible),e.toneMapped!==void 0&&(r.toneMapped=e.toneMapped),e.userData!==void 0&&(r.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new qe().setHex(o.value);break;case"v2":r.uniforms[s].value=new _e().fromArray(o.value);break;case"v3":r.uniforms[s].value=new G().fromArray(o.value);break;case"v4":r.uniforms[s].value=new rn().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Ut().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ct().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new _e().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new _e().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return ny.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:gB,SpriteMaterial:aM,RawShaderMaterial:vB,ShaderMaterial:nn,PointsMaterial:zv,MeshPhysicalMaterial:sr,MeshStandardMaterial:ap,MeshPhongMaterial:yB,MeshToonMaterial:xB,MeshNormalMaterial:yM,MeshLambertMaterial:_B,MeshDepthMaterial:rM,MeshDistanceMaterial:sM,MeshBasicMaterial:mr,MeshMatcapMaterial:SB,LineDashedMaterial:AB,LineBasicMaterial:Ki,Material:Hn};return new t[e]}}class Xa{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i<r;i++)t+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(t))}catch{return t}}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 LB extends bt{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 FB extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Ii(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t={},i={};function r(m,v){if(t[v]!==void 0)return t[v];const x=m.interleavedBuffers[v],g=s(m,x.buffer),S=Pu(x.type,g),A=new tp(S,x.stride);return A.uuid=x.uuid,t[v]=A,A}function s(m,v){if(i[v]!==void 0)return i[v];const x=m.arrayBuffers[v],g=new Uint32Array(x).buffer;return i[v]=g,g}const o=e.isInstancedBufferGeometry?new LB:new bt,a=e.data.index;if(a!==void 0){const m=Pu(a.type,a.array);o.setIndex(new Yt(m,1))}const l=e.data.attributes;for(const m in l){const v=l[m];let _;if(v.isInterleavedBufferAttribute){const x=r(e.data,v.data);_=new el(x,v.itemSize,v.offset,v.normalized)}else{const x=Pu(v.type,v.array),g=v.isInstancedBufferAttribute?xc:Yt;_=new g(x,v.itemSize,v.normalized)}v.name!==void 0&&(_.name=v.name),v.usage!==void 0&&_.setUsage(v.usage),o.setAttribute(m,_)}const c=e.data.morphAttributes;if(c)for(const m in c){const v=c[m],_=[];for(let x=0,g=v.length;x<g;x++){const S=v[x];let A;if(S.isInterleavedBufferAttribute){const E=r(e.data,S.data);A=new el(E,S.itemSize,S.offset,S.normalized)}else{const E=Pu(S.type,S.array);A=new Yt(E,S.itemSize,S.normalized)}S.name!==void 0&&(A.name=S.name),_.push(A)}o.morphAttributes[m]=_}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const d=e.data.groups||e.data.drawcalls||e.data.offsets;if(d!==void 0)for(let m=0,v=d.length;m!==v;++m){const _=d[m];o.addGroup(_.start,_.count,_.materialIndex)}const p=e.data.boundingSphere;if(p!==void 0){const m=new G;p.center!==void 0&&m.fromArray(p.center),o.boundingSphere=new wi(m,p.radius)}return e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class p5 extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=this.path===""?Xa.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new Ii(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){let c=null;try{c=JSON.parse(l)}catch(d){r!==void 0&&r(d),console.error("THREE:ObjectLoader: Can't parse "+e+".",d.message);return}const f=c.metadata;if(f===void 0||f.type===void 0||f.type.toLowerCase()==="geometry"){r!==void 0&&r(new Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}s.parse(c,t)},i,r)}async loadAsync(e,t){const i=this,r=this.path===""?Xa.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||r;const s=new Ii(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials);const o=await s.loadAsync(e,t),a=JSON.parse(o),l=a.metadata;if(l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await i.parseAsync(a)}parse(e,t){const i=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,function(){t!==void 0&&t(c)}),a=this.parseTextures(e.textures,o),l=this.parseMaterials(e.materials,a),c=this.parseObject(e.object,s,l,a,i),f=this.parseSkeletons(e.skeletons,c);if(this.bindSkeletons(c,f),this.bindLightTargets(c),t!==void 0){let d=!1;for(const p in o)if(o[p].data instanceof HTMLImageElement){d=!0;break}d===!1&&t(c)}return c}async parseAsync(e){const t=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),s=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,s),a=this.parseMaterials(e.materials,o),l=this.parseObject(e.object,r,a,o,t),c=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,c),this.bindLightTargets(l),l}parseShapes(e){const t={};if(e!==void 0)for(let i=0,r=e.length;i<r;i++){const s=new ac().fromJSON(e[i]);t[s.uuid]=s}return t}parseSkeletons(e,t){const i={},r={};if(t.traverse(function(s){s.isBone&&(r[s.uuid]=s)}),e!==void 0)for(let s=0,o=e.length;s<o;s++){const a=new np().fromJSON(e[s],r);i[a.uuid]=a}return i}parseGeometries(e,t){const i={};if(e!==void 0){const r=new FB;for(let s=0,o=e.length;s<o;s++){let a;const l=e[s];switch(l.type){case"BufferGeometry":case"InstancedBufferGeometry":a=r.parse(l);break;default:l.type in vR?a=vR[l.type].fromJSON(l,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${l.type}"`)}a.uuid=l.uuid,l.name!==void 0&&(a.name=l.name),l.userData!==void 0&&(a.userData=l.userData),i[l.uuid]=a}}return i}parseMaterials(e,t){const i={},r={};if(e!==void 0){const s=new ny;s.setTextures(t);for(let o=0,a=e.length;o<a;o++){const l=e[o];i[l.uuid]===void 0&&(i[l.uuid]=s.parse(l)),r[l.uuid]=i[l.uuid]}}return r}parseAnimations(e){const t={};if(e!==void 0)for(let i=0;i<e.length;i++){const r=e[i],s=hf.parse(r);t[s.uuid]=s}return t}parseImages(e,t){const i=this,r={};let s;function o(l){return i.manager.itemStart(l),s.load(l,function(){i.manager.itemEnd(l)},void 0,function(){i.manager.itemError(l),i.manager.itemEnd(l)})}function a(l){if(typeof l=="string"){const c=l,f=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c)?c:i.resourcePath+c;return o(f)}else return l.data?{data:Pu(l.type,l.data),width:l.width,height:l.height}:null}if(e!==void 0&&e.length>0){const l=new ty(t);s=new Ld(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,f=e.length;c<f;c++){const d=e[c],p=d.url;if(Array.isArray(p)){const m=[];for(let v=0,_=p.length;v<_;v++){const x=p[v],g=a(x);g!==null&&(g instanceof HTMLImageElement?m.push(g):m.push(new gs(g.data,g.width,g.height)))}r[d.uuid]=new Kl(m)}else{const m=a(d.url);r[d.uuid]=new Kl(m)}}}return r}async parseImagesAsync(e){const t=this,i={};let r;async function s(o){if(typeof o=="string"){const a=o,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:t.resourcePath+a;return await r.loadAsync(l)}else return o.data?{data:Pu(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){r=new Ld(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.url;if(Array.isArray(c)){const f=[];for(let d=0,p=c.length;d<p;d++){const m=c[d],v=await s(m);v!==null&&(v instanceof HTMLImageElement?f.push(v):f.push(new gs(v.data,v.width,v.height)))}i[l.uuid]=new Kl(f)}else{const f=await s(l.url);i[l.uuid]=new Kl(f)}}}return i}parseTextures(e,t){function i(s,o){return typeof s=="number"?s:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",s),o[s])}const r={};if(e!==void 0)for(let s=0,o=e.length;s<o;s++){const a=e[s];a.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),t[a.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const l=t[a.image],c=l.data;let f;Array.isArray(c)?(f=new $d,c.length===6&&(f.needsUpdate=!0)):(c&&c.data?f=new gs:f=new Qt,c&&(f.needsUpdate=!0)),f.source=l,f.uuid=a.uuid,a.name!==void 0&&(f.name=a.name),a.mapping!==void 0&&(f.mapping=i(a.mapping,m5)),a.channel!==void 0&&(f.channel=a.channel),a.offset!==void 0&&f.offset.fromArray(a.offset),a.repeat!==void 0&&f.repeat.fromArray(a.repeat),a.center!==void 0&&f.center.fromArray(a.center),a.rotation!==void 0&&(f.rotation=a.rotation),a.wrap!==void 0&&(f.wrapS=i(a.wrap[0],SR),f.wrapT=i(a.wrap[1],SR)),a.format!==void 0&&(f.format=a.format),a.internalFormat!==void 0&&(f.internalFormat=a.internalFormat),a.type!==void 0&&(f.type=a.type),a.colorSpace!==void 0&&(f.colorSpace=a.colorSpace),a.minFilter!==void 0&&(f.minFilter=i(a.minFilter,AR)),a.magFilter!==void 0&&(f.magFilter=i(a.magFilter,AR)),a.anisotropy!==void 0&&(f.anisotropy=a.anisotropy),a.flipY!==void 0&&(f.flipY=a.flipY),a.generateMipmaps!==void 0&&(f.generateMipmaps=a.generateMipmaps),a.premultiplyAlpha!==void 0&&(f.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(f.unpackAlignment=a.unpackAlignment),a.compareFunction!==void 0&&(f.compareFunction=a.compareFunction),a.userData!==void 0&&(f.userData=a.userData),r[a.uuid]=f}return r}parseObject(e,t,i,r,s){let o;function a(p){return t[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",p),t[p]}function l(p){if(p!==void 0){if(Array.isArray(p)){const m=[];for(let v=0,_=p.length;v<_;v++){const x=p[v];i[x]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",x),m.push(i[x])}return m}return i[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",p),i[p]}}function c(p){return r[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",p),r[p]}let f,d;switch(e.type){case"Scene":o=new qo,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new qe(e.background):o.background=c(e.background)),e.environment!==void 0&&(o.environment=c(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?o.fog=new Ov(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new Uv(e.fog.color,e.fog.density)),e.fog.name!==""&&(o.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(o.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&o.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(o.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&o.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":o=new Tn(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(o.focus=e.focus),e.zoom!==void 0&&(o.zoom=e.zoom),e.filmGauge!==void 0&&(o.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(o.filmOffset=e.filmOffset),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new xr(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(o.zoom=e.zoom),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new IB(e.color,e.intensity);break;case"DirectionalLight":o=new TM(e.color,e.intensity),o.target=e.target||"";break;case"PointLight":o=new wM(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new PB(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new EM(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),o.target=e.target||"";break;case"HemisphereLight":o=new bB(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=new DB().fromJSON(e);break;case"SkinnedMesh":f=a(e.geometry),d=l(e.material),o=new lM(f,d),e.bindMode!==void 0&&(o.bindMode=e.bindMode),e.bindMatrix!==void 0&&o.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(o.skeleton=e.skeleton);break;case"Mesh":f=a(e.geometry),d=l(e.material),o=new yn(f,d);break;case"InstancedMesh":f=a(e.geometry),d=l(e.material);const p=e.count,m=e.instanceMatrix,v=e.instanceColor;o=new cM(f,d,p),o.instanceMatrix=new xc(new Float32Array(m.array),16),v!==void 0&&(o.instanceColor=new xc(new Float32Array(v.array),v.itemSize));break;case"BatchedMesh":f=a(e.geometry),d=l(e.material),o=new sB(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,d),o.geometry=f,o.perObjectFrustumCulled=e.perObjectFrustumCulled,o.sortObjects=e.sortObjects,o._drawRanges=e.drawRanges,o._reservedRanges=e.reservedRanges,o._visibility=e.visibility,o._active=e.active,o._bounds=e.bounds.map(_=>{const x=new Xi;x.min.fromArray(_.boxMin),x.max.fromArray(_.boxMax);const g=new wi;return g.radius=_.sphereRadius,g.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:x,sphereInitialized:_.sphereInitialized,sphere:g}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":o=new rB;break;case"Line":o=new $o(a(e.geometry),l(e.material));break;case"LineLoop":o=new uM(a(e.geometry),l(e.material));break;case"LineSegments":o=new Ws(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new fM(a(e.geometry),l(e.material));break;case"Sprite":o=new iB(l(e.material));break;case"Group":o=new Vo;break;case"Bone":o=new kv;break;default:o=new jt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const p=e.children;for(let m=0;m<p.length;m++)o.add(this.parseObject(p[m],t,i,r,s))}if(e.animations!==void 0){const p=e.animations;for(let m=0;m<p.length;m++){const v=p[m];o.animations.push(s[v])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(o.autoUpdate=e.autoUpdate);const p=e.levels;for(let m=0;m<p.length;m++){const v=p[m],_=o.getObjectByProperty("uuid",v.object);_!==void 0&&o.addLevel(_,v.distance,v.hysteresis)}}return o}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(i){if(i.isSkinnedMesh===!0&&i.skeleton!==void 0){const r=t[i.skeleton];r===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",i.skeleton):i.bind(r,i.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){const i=t.target,r=e.getObjectByProperty("uuid",i);r!==void 0?t.target=r:t.target=new jt}})}}const m5={UVMapping:Qa,CubeReflectionMapping:mo,CubeRefractionMapping:Za,EquirectangularReflectionMapping:sf,EquirectangularRefractionMapping:Ad,CubeUVReflectionMapping:Mf},SR={RepeatWrapping:go,ClampToEdgeWrapping:ei,MirroredRepeatWrapping:of},AR={NearestFilter:Ht,NearestMipmapNearestFilter:wv,NearestMipmapLinearFilter:jl,LinearFilter:Ft,LinearMipmapNearestFilter:Wu,LinearMipmapLinearFilter:kr};class NB extends Bi{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"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Wo.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{r&&r(c)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return Wo.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),Wo.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Wo.add(e,l),s.manager.itemStart(e)}}let og;class CM{static getContext(){return og===void 0&&(og=new(window.AudioContext||window.webkitAudioContext)),og}static setContext(e){og=e}}class g5 extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Ii(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);CM.getContext().decodeAudioData(c,function(d){t(d)}).catch(a)}catch(c){a(c)}},i,r);function a(l){r?r(l):console.error(l),s.manager.itemError(e)}}}const MR=new ct,ER=new ct,Cl=new ct;class v5{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Tn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Tn,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,Cl.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(sc*t.fov*.5)/t.zoom;let a,l;ER.elements[12]=-r,MR.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,Cl.elements[0]=2*t.near/(l-a),Cl.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Cl),a=-o*t.aspect-s,l=o*t.aspect-s,Cl.elements[0]=2*t.near/(l-a),Cl.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Cl)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ER),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(MR)}}class RM{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=wR(),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=wR();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function wR(){return performance.now()}const Rl=new G,TR=new Ei,y5=new G,bl=new G;class x5 extends jt{constructor(){super(),this.type="AudioListener",this.context=CM.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new RM}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Rl,TR,y5),bl.set(0,0,-1).applyQuaternion(TR),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Rl.x,r),t.positionY.linearRampToValueAtTime(Rl.y,r),t.positionZ.linearRampToValueAtTime(Rl.z,r),t.forwardX.linearRampToValueAtTime(bl.x,r),t.forwardY.linearRampToValueAtTime(bl.y,r),t.forwardZ.linearRampToValueAtTime(bl.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Rl.x,Rl.y,Rl.z),t.setOrientation(bl.x,bl.y,bl.z,i.x,i.y,i.z)}}class UB extends jt{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}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}}const Il=new G,CR=new Ei,_5=new G,Pl=new G;class S5 extends UB{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(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,i){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=i,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Il,CR,_5),Pl.set(0,0,1).applyQuaternion(CR);const t=this.panner;if(t.positionX){const i=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Il.x,i),t.positionY.linearRampToValueAtTime(Il.y,i),t.positionZ.linearRampToValueAtTime(Il.z,i),t.orientationX.linearRampToValueAtTime(Pl.x,i),t.orientationY.linearRampToValueAtTime(Pl.y,i),t.orientationZ.linearRampToValueAtTime(Pl.z,i)}else t.setPosition(Il.x,Il.y,Il.z),t.setOrientation(Pl.x,Pl.y,Pl.z)}}class A5{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 i=0;i<t.length;i++)e+=t[i];return e/t.length}}class OB{constructor(e,t,i){this.binding=e,this.valueSize=i;let r,s,o;switch(t){case"quaternion":r=this._slerp,s=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(i*6),this._workIndex=5;break;case"string":case"bool":r=this._select,s=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(i*5);break;default:r=this._lerp,s=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(i*5)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=s,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const i=this.buffer,r=this.valueSize,s=e*r+r;let o=this.cumulativeWeight;if(o===0){for(let a=0;a!==r;++a)i[s+a]=i[a];o=t}else{o+=t;const a=t/o;this._mixBufferRegion(i,s,0,a,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,i=this.valueSize,r=i*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,i),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,i=this.buffer,r=e*t+t,s=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,s<1){const l=t*this._origIndex;this._mixBufferRegion(i,r,l,1-s,t)}o>0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i<t;i++)this.buffer[i]=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 i=0;i<this.valueSize;i++)this.buffer[t+i]=this.buffer[e+i]}_select(e,t,i,r,s){if(r>=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){Ei.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;Ei.multiplyQuaternionsFlat(e,o,e,t,e,i),Ei.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const bM="\\[\\]\\.:\\/",M5=new RegExp("["+bM+"]","g"),IM="[^"+bM+"]",E5="[^"+bM.replace("\\.","")+"]",w5=/((?:WC+[\/:])*)/.source.replace("WC",IM),T5=/(WCOD+)?/.source.replace("WCOD",E5),C5=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",IM),R5=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",IM),b5=new RegExp("^"+w5+T5+C5+R5+"$"),I5=["material","materials","bones","map"];class P5{constructor(e,t,i){const r=i||en.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class en{constructor(e,t,i){this.path=t,this.parsedPath=i||en.parseTrackName(t),this.node=en.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new en.Composite(e,t,i):new en(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(M5,"")}static parseTrackName(e){const t=b5.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);I5.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o<s.length;o++){const a=s[o];if(a.name===t||a.uuid===t)return a;const l=i(a.children);if(l)return l}return null},r=i(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)e[t++]=i[r]}_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 i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=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,i=t.objectName,r=t.propertyName;let s=t.propertyIndex;if(e||(e=en.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(i){let c=t.objectIndex;switch(i){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 f=0;f<e.length;f++)if(e[f].name===c){c=f;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[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[i]}if(c!==void 0){if(e[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[c]}}const o=e[r];if(o===void 0){const c=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+r+" but it wasn't found.",e);return}let a=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(r==="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[s]!==void 0&&(s=e.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}en.Composite=P5;en.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};en.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};en.prototype.GetterByBindingType=[en.prototype._getValue_direct,en.prototype._getValue_array,en.prototype._getValue_arrayElement,en.prototype._getValue_toArray];en.prototype.SetterByBindingTypeAndVersioning=[[en.prototype._setValue_direct,en.prototype._setValue_direct_setNeedsUpdate,en.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[en.prototype._setValue_array,en.prototype._setValue_array_setNeedsUpdate,en.prototype._setValue_array_setMatrixWorldNeedsUpdate],[en.prototype._setValue_arrayElement,en.prototype._setValue_arrayElement_setNeedsUpdate,en.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[en.prototype._setValue_fromArray,en.prototype._setValue_fromArray_setNeedsUpdate,en.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class B5{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Gr(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let i=0,r=arguments.length;i!==r;++i)e[arguments[i].uuid]=i;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,i=this._paths,r=this._parsedPaths,s=this._bindings,o=s.length;let a,l=e.length,c=this.nCachedObjects_;for(let f=0,d=arguments.length;f!==d;++f){const p=arguments[f],m=p.uuid;let v=t[m];if(v===void 0){v=l++,t[m]=v,e.push(p);for(let _=0,x=o;_!==x;++_)s[_].push(new en(p,i[_],r[_]))}else if(v<c){a=e[v];const _=--c,x=e[_];t[x.uuid]=v,e[v]=x,t[m]=_,e[_]=p;for(let g=0,S=o;g!==S;++g){const A=s[g],E=A[_];let I=A[v];A[v]=E,I===void 0&&(I=new en(p,i[g],r[g])),A[_]=I}}else e[v]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const l=arguments[o],c=l.uuid,f=t[c];if(f!==void 0&&f>=s){const d=s++,p=e[d];t[p.uuid]=f,e[f]=p,t[c]=d,e[d]=l;for(let m=0,v=r;m!==v;++m){const _=i[m],x=_[d],g=_[f];_[f]=x,_[d]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],f=c.uuid,d=t[f];if(d!==void 0)if(delete t[f],d<s){const p=--s,m=e[p],v=--o,_=e[v];t[m.uuid]=d,e[d]=m,t[_.uuid]=p,e[p]=_,e.pop();for(let x=0,g=r;x!==g;++x){const S=i[x],A=S[p],E=S[v];S[d]=A,S[p]=E,S.pop()}}else{const p=--o,m=e[p];p>0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let v=0,_=r;v!==_;++v){const x=i[v];x[d]=x[p],x.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,f=this.nCachedObjects_,d=new Array(c);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=f,m=l.length;p!==m;++p){const v=l[p];d[p]=new en(v,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class kB{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:Jl,endingEnd:Jl};for(let c=0;c!==o;++c){const f=s[c].createInterpolant(null);a[c]=f,f.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bP,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+i,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case YA:for(let f=0,d=l.length;f!==d;++f)l[f].evaluate(o),c[f].accumulateAdditive(a);break;case Bv:default:for(let f=0,d=l.length;f!==d;++f)l[f].evaluate(o),c[f].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===IP;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===RP){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=Yl,r.endingEnd=Yl):(e?r.endingStart=this.zeroSlopeAtStart?Yl:Jl:r.endingStart=Md,t?r.endingEnd=this.zeroSlopeAtEnd?Yl:Jl:r.endingEnd=Md)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const D5=new Float32Array(1);class zB extends Tr{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let f=c[l];f===void 0&&(f={},c[l]=f);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let v=f[m];if(v!==void 0)++v.referenceCount,o[d]=v;else{if(v=o[d],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;v=new OB(en.create(i,m,_),p.ValueTypeName,p.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),o[d]=v}a[d].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,i){const r=this._actions,s=this._actionsByClip;let o=s[t];if(o===void 0)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,s[t]=o;else{const a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[i]=e}_removeInactiveAction(e){const t=this._actions,i=t[t.length-1],r=e._cacheIndex;i._cacheIndex=r,t[r]=i,t.pop(),e._cacheIndex=null;const s=e._clip.uuid,o=this._actionsByClip,a=o[s],l=a.knownActions,c=l[l.length-1],f=e._byClipCacheIndex;c._byClipCacheIndex=f,l[f]=c,l.pop(),e._byClipCacheIndex=null;const d=a.actionByRoot,p=(e._localRoot||this._root).uuid;delete d[p],l.length===0&&delete o[s],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.referenceCount===0&&this._removeInactiveBinding(s)}}_lendAction(e){const t=this._actions,i=e._cacheIndex,r=this._nActiveActions++,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=i,t[i]=s}_takeBackAction(e){const t=this._actions,i=e._cacheIndex,r=--this._nActiveActions,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=i,t[i]=s}_addInactiveBinding(e,t,i){const r=this._bindingsByRootAndName,s=this._bindings;let o=r[t];o===void 0&&(o={},r[t]=o),o[i]=e,e._cacheIndex=s.length,s.push(e)}_removeInactiveBinding(e){const t=this._bindings,i=e.binding,r=i.rootNode.uuid,s=i.path,o=this._bindingsByRootAndName,a=o[r],l=t[t.length-1],c=e._cacheIndex;l._cacheIndex=c,t[c]=l,t.pop(),delete a[s],Object.keys(a).length===0&&delete o[r]}_lendBinding(e){const t=this._bindings,i=e._cacheIndex,r=this._nActiveBindings++,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=i,t[i]=s}_takeBackBinding(e){const t=this._bindings,i=e._cacheIndex,r=--this._nActiveBindings,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=i,t[i]=s}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let i=e[t];return i===void 0&&(i=new _M(new Float32Array(2),new Float32Array(2),1,D5),i.__cacheIndex=t,e[t]=i),i}_takeBackControlInterpolant(e){const t=this._controlInterpolants,i=e.__cacheIndex,r=--this._nActiveControlInterpolants,s=t[r];e.__cacheIndex=r,t[r]=e,s.__cacheIndex=i,t[i]=s}clipAction(e,t,i){const r=t||this._root,s=r.uuid;let o=typeof e=="string"?hf.findByName(r,e):e;const a=o!==null?o.uuid:e,l=this._actionsByClip[a];let c=null;if(i===void 0&&(o!==null?i=o.blendMode:i=Bv),l!==void 0){const d=l.actionByRoot[s];if(d!==void 0&&d.blendMode===i)return d;c=l.knownActions[0],o===null&&(o=c._clip)}if(o===null)return null;const f=new kB(this,o,t,i);return this._bindAction(f,c),this._addInactiveAction(f,a,s),f}existingAction(e,t){const i=t||this._root,r=i.uuid,s=typeof e=="string"?hf.findByName(i,e):e,o=s?s.uuid:e,a=this._actionsByClip[o];return a!==void 0&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions,t=this._nActiveActions;for(let i=t-1;i>=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);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,i=e.uuid,r=this._actionsByClip,s=r[i];if(s!==void 0){const o=s.knownActions;for(let a=0,l=o.length;a!==l;++a){const c=o[a];this._deactivateAction(c);const f=c._cacheIndex,d=t[t.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,d._cacheIndex=f,t[f]=d,t.pop(),this._removeInactiveBindingsForAction(c)}delete r[i]}}uncacheRoot(e){const t=e.uuid,i=this._actionsByClip;for(const o in i){const a=i[o].actionByRoot,l=a[t];l!==void 0&&(this._deactivateAction(l),this._removeInactiveAction(l))}const r=this._bindingsByRootAndName,s=r[t];if(s!==void 0)for(const o in s){const a=s[o];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(e,t){const i=this.existingAction(e,t);i!==null&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class Lt{constructor(e){this.value=e}clone(){return new Lt(this.value.clone===void 0?this.value:this.value.clone())}}let L5=0;class F5 extends Tr{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:L5++}),this.name="",this.usage=Cd,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(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let i=0,r=t.length;i<r;i++){const s=Array.isArray(t[i])?t[i]:[t[i]];for(let o=0;o<s.length;o++)this.uniforms.push(s[o].clone())}return this}clone(){return new this.constructor().copy(this)}}class N5 extends tp{constructor(e,t,i=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}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 U5{constructor(e,t,i,r,s){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=i,this.elementSize=r,this.count=s,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 RR=new ct;class PM{constructor(e,t,i=0,r=1/0){this.ray=new bc(e,t),this.near=i,this.far=r,this.camera=null,this.layers=new oc,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: 
3878Unsupported camera type: "+t.type)}setFromXRController(e){return RR.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(RR),this}intersectObject(e,t=!0,i=[]){return mS(e,this,i,t),i.sort(bR),i}intersectObjects(e,t=!0,i=[]){for(let r=0,s=e.length;r<s;r++)mS(e[r],this,i,t);return i.sort(bR),i}}function bR(n,e){return n.distance-e.distance}function mS(n,e,t,i){let r=!0;if(n.layers.test(e.layers)&&n.raycast(e,t)===!1&&(r=!1),r===!0&&i===!0){const s=n.children;for(let o=0,a=s.length;o<a;o++)mS(s[o],e,t,!0)}}class gS{constructor(e=1,t=0,i=0){return this.radius=e,this.phi=t,this.theta=i,this}set(e,t,i){return this.radius=e,this.phi=t,this.theta=i,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,i){return this.radius=Math.sqrt(e*e+t*t+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(Jn(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class O5{constructor(e=1,t=0,i=0){return this.radius=e,this.theta=t,this.y=i,this}set(e,t,i){return this.radius=e,this.theta=t,this.y=i,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,i){return this.radius=Math.sqrt(e*e+i*i),this.theta=Math.atan2(e,i),this.y=t,this}clone(){return new this.constructor().copy(this)}}class BM{constructor(e,t,i,r){BM.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,i,r)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let i=0;i<4;i++)this.elements[i]=e[i+t];return this}set(e,t,i,r){const s=this.elements;return s[0]=e,s[2]=t,s[1]=i,s[3]=r,this}}const IR=new _e;class k5{constructor(e=new _e(1/0,1/0),t=new _e(-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,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=IR.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),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,IR).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 PR=new G,ag=new G;class z5{constructor(e=new G,t=new G){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){PR.subVectors(e,this.start),ag.subVectors(this.end,this.start);const i=ag.dot(ag);let s=ag.dot(PR)/i;return t&&(s=Jn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}
vendor: 17,584 bytes, line 3878
3878applyMatrix4(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 BR=new G;class H5 extends jt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new bt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o<l;o++,a++){const c=o/l*Math.PI*2,f=a/l*Math.PI*2;r.push(Math.cos(c),Math.sin(c),1,Math.cos(f),Math.sin(f),1)}i.setAttribute("position",new yt(r,3));const s=new Ki({fog:!1,toneMapped:!1});this.cone=new Ws(i,s),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),BR.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(BR),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Aa=new G,lg=new ct,T_=new ct;class G5 extends Ws{constructor(e){const t=HB(e),i=new bt,r=[],s=[],o=new qe(0,0,1),a=new qe(0,1,0);for(let c=0;c<t.length;c++){const f=t[c];f.parent&&f.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),s.push(o.r,o.g,o.b),s.push(a.r,a.g,a.b))}i.setAttribute("position",new yt(r,3)),i.setAttribute("color",new yt(s,3));const l=new Ki({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(i,l),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,i=this.geometry,r=i.getAttribute("position");T_.copy(this.root.matrixWorld).invert();for(let s=0,o=0;s<t.length;s++){const a=t[s];a.parent&&a.parent.isBone&&(lg.multiplyMatrices(T_,a.matrixWorld),Aa.setFromMatrixPosition(lg),r.setXYZ(o,Aa.x,Aa.y,Aa.z),lg.multiplyMatrices(T_,a.parent.matrixWorld),Aa.setFromMatrixPosition(lg),r.setXYZ(o+1,Aa.x,Aa.y,Aa.z),o+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function HB(n){const e=[];n.isBone===!0&&e.push(n);for(let t=0;t<n.children.length;t++)e.push.apply(e,HB(n.children[t]));return e}class V5 extends yn{constructor(e,t,i){const r=new op(t,4,2),s=new mr({wireframe:!0,fog:!1,toneMapped:!1});super(r,s),this.light=e,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const W5=new G,DR=new qe,LR=new qe;class X5 extends jt{constructor(e,t,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const r=new sp(t);r.rotateY(Math.PI*.5),this.material=new mr({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const s=r.getAttribute("position"),o=new Float32Array(s.count*3);r.setAttribute("color",new Yt(o,3)),this.add(new yn(r,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");DR.copy(this.light.color),LR.copy(this.light.groundColor);for(let i=0,r=t.count;i<r;i++){const s=i<r/2?DR:LR;t.setXYZ(i,s.r,s.g,s.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(W5.setFromMatrixPosition(this.light.matrixWorld).negate())}}class j5 extends Ws{constructor(e=10,t=10,i=4473924,r=8947848){i=new qe(i),r=new qe(r);const s=t/2,o=e/t,a=e/2,l=[],c=[];for(let p=0,m=0,v=-a;p<=t;p++,v+=o){l.push(-a,0,v,a,0,v),l.push(v,0,-a,v,0,a);const _=p===s?i:r;_.toArray(c,m),m+=3,_.toArray(c,m),m+=3,_.toArray(c,m),m+=3,_.toArray(c,m),m+=3}const f=new bt;f.setAttribute("position",new yt(l,3)),f.setAttribute("color",new yt(c,3));const d=new Ki({vertexColors:!0,toneMapped:!1});super(f,d),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class J5 extends Ws{constructor(e=10,t=16,i=8,r=64,s=4473924,o=8947848){s=new qe(s),o=new qe(o);const a=[],l=[];if(t>1)for(let d=0;d<t;d++){const p=d/t*(Math.PI*2),m=Math.sin(p)*e,v=Math.cos(p)*e;a.push(0,0,0),a.push(m,0,v);const _=d&1?s:o;l.push(_.r,_.g,_.b),l.push(_.r,_.g,_.b)}for(let d=0;d<i;d++){const p=d&1?s:o,m=e-e/i*d;for(let v=0;v<r;v++){let _=v/r*(Math.PI*2),x=Math.sin(_)*m,g=Math.cos(_)*m;a.push(x,0,g),l.push(p.r,p.g,p.b),_=(v+1)/r*(Math.PI*2),x=Math.sin(_)*m,g=Math.cos(_)*m,a.push(x,0,g),l.push(p.r,p.g,p.b)}}const c=new bt;c.setAttribute("position",new yt(a,3)),c.setAttribute("color",new yt(l,3));const f=new Ki({vertexColors:!0,toneMapped:!1});super(c,f),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const FR=new G,cg=new G,NR=new G;class Y5 extends jt{constructor(e,t,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",t===void 0&&(t=1);let r=new bt;r.setAttribute("position",new yt([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const s=new Ki({fog:!1,toneMapped:!1});this.lightPlane=new $o(r,s),this.add(this.lightPlane),r=new bt,r.setAttribute("position",new yt([0,0,0,0,0,1],3)),this.targetLine=new $o(r,s),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),FR.setFromMatrixPosition(this.light.matrixWorld),cg.setFromMatrixPosition(this.light.target.matrixWorld),NR.subVectors(cg,FR),this.lightPlane.lookAt(cg),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(cg),this.targetLine.scale.z=NR.length()}}const ug=new G,Wn=new wf;class K5 extends Ws{constructor(e){const t=new bt,i=new Ki({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],s=[],o={};a("n1","n2"),a("n2","n4"),a("n4","n3"),a("n3","n1"),a("f1","f2"),a("f2","f4"),a("f4","f3"),a("f3","f1"),a("n1","f1"),a("n2","f2"),a("n3","f3"),a("n4","f4"),a("p","n1"),a("p","n2"),a("p","n3"),a("p","n4"),a("u1","u2"),a("u2","u3"),a("u3","u1"),a("c","t"),a("p","c"),a("cn1","cn2"),a("cn3","cn4"),a("cf1","cf2"),a("cf3","cf4");function a(v,_){l(v),l(_)}function l(v){r.push(0,0,0),s.push(0,0,0),o[v]===void 0&&(o[v]=[]),o[v].push(r.length/3-1)}t.setAttribute("position",new yt(r,3)),t.setAttribute("color",new yt(s,3)),super(t,i),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const c=new qe(16755200),f=new qe(16711680),d=new qe(43775),p=new qe(16777215),m=new qe(3355443);this.setColors(c,f,d,p,m)}setColors(e,t,i,r,s){const a=this.geometry.getAttribute("color");a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,i.r,i.g,i.b),a.setXYZ(33,i.r,i.g,i.b),a.setXYZ(34,i.r,i.g,i.b),a.setXYZ(35,i.r,i.g,i.b),a.setXYZ(36,i.r,i.g,i.b),a.setXYZ(37,i.r,i.g,i.b),a.setXYZ(38,r.r,r.g,r.b),a.setXYZ(39,r.r,r.g,r.b),a.setXYZ(40,s.r,s.g,s.b),a.setXYZ(41,s.r,s.g,s.b),a.setXYZ(42,s.r,s.g,s.b),a.setXYZ(43,s.r,s.g,s.b),a.setXYZ(44,s.r,s.g,s.b),a.setXYZ(45,s.r,s.g,s.b),a.setXYZ(46,s.r,s.g,s.b),a.setXYZ(47,s.r,s.g,s.b),a.setXYZ(48,s.r,s.g,s.b),a.setXYZ(49,s.r,s.g,s.b),a.needsUpdate=!0}update(){const e=this.geometry,t=this.pointMap,i=1,r=1;Wn.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Zn("c",t,e,Wn,0,0,-1),Zn("t",t,e,Wn,0,0,1),Zn("n1",t,e,Wn,-i,-r,-1),Zn("n2",t,e,Wn,i,-r,-1),Zn("n3",t,e,Wn,-i,r,-1),Zn("n4",t,e,Wn,i,r,-1),Zn("f1",t,e,Wn,-i,-r,1),Zn("f2",t,e,Wn,i,-r,1),Zn("f3",t,e,Wn,-i,r,1),Zn("f4",t,e,Wn,i,r,1),Zn("u1",t,e,Wn,i*.7,r*1.1,-1),Zn("u2",t,e,Wn,-i*.7,r*1.1,-1),Zn("u3",t,e,Wn,0,r*2,-1),Zn("cf1",t,e,Wn,-i,0,1),Zn("cf2",t,e,Wn,i,0,1),Zn("cf3",t,e,Wn,0,-r,1),Zn("cf4",t,e,Wn,0,r,1),Zn("cn1",t,e,Wn,-i,0,-1),Zn("cn2",t,e,Wn,i,0,-1),Zn("cn3",t,e,Wn,0,-r,-1),Zn("cn4",t,e,Wn,0,r,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Zn(n,e,t,i,r,s,o){ug.set(r,s,o).unproject(i);const a=e[n];if(a!==void 0){const l=t.getAttribute("position");for(let c=0,f=a.length;c<f;c++)l.setXYZ(a[c],ug.x,ug.y,ug.z)}}const fg=new Xi;class Q5 extends Ws{constructor(e,t=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(8*3),s=new bt;s.setIndex(new Yt(i,1)),s.setAttribute("position",new Yt(r,3)),super(s,new Ki({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&fg.setFromObject(this.object),fg.isEmpty())return;const t=fg.min,i=fg.max,r=this.geometry.attributes.position,s=r.array;s[0]=i.x,s[1]=i.y,s[2]=i.z,s[3]=t.x,s[4]=i.y,s[5]=i.z,s[6]=t.x,s[7]=t.y,s[8]=i.z,s[9]=i.x,s[10]=t.y,s[11]=i.z,s[12]=i.x,s[13]=i.y,s[14]=t.z,s[15]=t.x,s[16]=i.y,s[17]=t.z,s[18]=t.x,s[19]=t.y,s[20]=t.z,s[21]=i.x,s[22]=t.y,s[23]=t.z,r.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 Z5 extends Ws{constructor(e,t=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],s=new bt;s.setIndex(new Yt(i,1)),s.setAttribute("position",new yt(r,3)),super(s,new Ki({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 q5 extends $o{constructor(e,t=1,i=16776960){const r=i,s=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o=new bt;o.setAttribute("position",new yt(s,3)),o.computeBoundingSphere(),super(o,new Ki({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],l=new bt;l.setAttribute("position",new yt(a,3)),l.computeBoundingSphere(),this.add(new yn(l,new mr({color:r,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 UR=new G;let hg,C_;class $5 extends jt{constructor(e=new G(0,0,1),t=new G(0,0,0),i=1,r=16776960,s=i*.2,o=s*.2){super(),this.type="ArrowHelper",hg===void 0&&(hg=new bt,hg.setAttribute("position",new yt([0,0,0,0,1,0],3)),C_=new Cf(0,.5,1,5,1),C_.translate(0,-.5,0)),this.position.copy(t),this.line=new $o(hg,new Ki({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new yn(C_,new mr({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,s,o)}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{UR.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(UR,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class eV extends Ws{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new bt;r.setAttribute("position",new yt(t,3)),r.setAttribute("color",new yt(i,3));const s=new Ki({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new qe,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class tV{constructor(){this.type="ShapePath",this.color=new qe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Id,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(g){const S=[];for(let A=0,E=g.length;A<E;A++){const I=g[A],b=new ac;b.curves=I.curves,S.push(b)}return S}function i(g,S){const A=S.length;let E=!1;for(let I=A-1,b=0;b<A;I=b++){let P=S[I],D=S[b],O=D.x-P.x,C=D.y-P.y;if(Math.abs(C)>Number.EPSILON){if(C<0&&(P=S[b],O=-O,D=S[I],C=-C),g.y<P.y||g.y>D.y)continue;if(g.y===P.y){if(g.x===P.x)return!0}else{const B=C*(g.x-P.x)-O*(g.y-P.y);if(B===0)return!0;if(B<0)continue;E=!E}}else{if(g.y!==P.y)continue;if(D.x<=g.x&&g.x<=P.x||P.x<=g.x&&g.x<=D.x)return!0}}return E}const r=ho.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new ac,l.curves=a.curves,c.push(l),c;let f=!r(s[0].getPoints());f=e?!f:f;const d=[],p=[];let m=[],v=0,_;p[v]=void 0,m[v]=[];for(let g=0,S=s.length;g<S;g++)a=s[g],_=a.getPoints(),o=r(_),o=e?!o:o,o?(!f&&p[v]&&v++,p[v]={s:new ac,p:_},p[v].s.curves=a.curves,f&&v++,m[v]=[]):m[v].push({h:a,p:_[0]});if(!p[0])return t(s);if(p.length>1){let g=!1,S=0;for(let A=0,E=p.length;A<E;A++)d[A]=[];for(let A=0,E=p.length;A<E;A++){const I=m[A];for(let b=0;b<I.length;b++){const P=I[b];let D=!0;for(let O=0;O<p.length;O++)i(P.p,p[O].p)&&(A!==O&&S++,D?(D=!1,d[O].push(P)):g=!0);D&&d[A].push(P)}}S>0&&g===!1&&(m=d)}let x;for(let g=0,S=p.length;g<S;g++){l=p[g].s,c.push(l),x=m[g];for(let A=0,E=x.length;A<E;A++)l.holes.push(x[A].h)}return c}}class nV extends Tr{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(){}disconnect(){}dispose(){}update(){}}class GB extends xn{constructor(e=1,t=1,i=1,r={}){console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'),super(e,t,{...r,count:i}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:yo}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=yo);const iV=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:zA,AddEquation:Ia,AddOperation:_P,AdditiveAnimationBlendMode:YA,AdditiveBlending:tS,AgXToneMapping:wP,AlphaFormat:GA,AlwaysCompare:zP,AlwaysDepth:m0,AlwaysStencilFunc:oS,AmbientLight:IB,AnimationAction:kB,AnimationClip:hf,AnimationLoader:c5,AnimationMixer:zB,AnimationObjectGroup:B5,AnimationUtils:s5,ArcCurve:oB,ArrayCamera:tB,ArrowHelper:$5,AttachedBindMode:rS,Audio:UB,AudioAnalyser:A5,AudioContext:CM,AudioListener:x5,AudioLoader:g5,AxesHelper:eV,BackSide:ai,BasicDepthPacking:ol,BasicShadowMap:eP,BatchedMesh:sB,Bone:kv,BooleanKeyframeTrack:Pc,Box2:k5,Box3:Xi,Box3Helper:Z5,BoxGeometry:Ic,BoxHelper:Q5,BufferAttribute:Yt,BufferGeometry:bt,BufferGeometryLoader:FB,ByteType:Tv,Cache:Wo,Camera:wf,CameraHelper:K5,CanvasTexture:bG,CapsuleGeometry:Vv,CatmullRomCurve3:aB,CineonToneMapping:MP,CircleGeometry:Wv,ClampToEdgeWrapping:ei,Clock:R
3878M,Color:qe,ColorKeyframeTrack:SM,ColorManagement:cn,CompressedArrayTexture:CG,CompressedCubeTexture:RG,CompressedTexture:Hv,CompressedTextureLoader:u5,ConeGeometry:Xv,ConstantAlphaFactor:vP,ConstantColorFactor:mP,Controls:nV,CubeCamera:YP,CubeReflectionMapping:mo,CubeRefractionMapping:Za,CubeTexture:$d,CubeTextureLoader:RB,CubeUVReflectionMapping:Mf,CubicBezierCurve:dM,CubicBezierCurve3:lB,CubicInterpolant:wB,CullFaceBack:eS,CullFaceFront:$2,CullFaceFrontBack:aU,CullFaceNone:q2,Curve:Xs,CurvePath:uB,CustomBlending:tP,CustomToneMapping:EP,CylinderGeometry:Cf,Cylindrical:O5,Data3DTexture:$A,DataArrayTexture:Lv,DataTexture:gs,DataTextureLoader:AM,DataUtils:Ql,DecrementStencilOp:vU,DecrementWrapStencilOp:xU,DefaultLoadingManager:Lu,DepthFormat:rc,DepthStencilFormat:$a,DepthTexture:Fv,DetachedBindMode:CP,DirectionalLight:TM,DirectionalLightHelper:Y5,DiscreteInterpolant:TB,DisplayP3ColorSpace:Dv,DodecahedronGeometry:jv,DoubleSide:fi,DstAlphaFactor:uP,DstColorFactor:hP,DynamicCopyUsage:LU,DynamicDrawUsage:RU,DynamicReadUsage:PU,EdgesGeometry:fB,EllipseCurve:Gv,EqualCompare:NP,EqualDepth:v0,EqualStencilFunc:MU,EquirectangularReflectionMapping:sf,EquirectangularRefractionMapping:Ad,Euler:jr,EventDispatcher:Tr,ExtrudeGeometry:Yv,FileLoader:Ii,Float16BufferAttribute:AO,Float32BufferAttribute:yt,FloatType:vn,Fog:Ov,FogExp2:Uv,FramebufferTexture:TG,FrontSide:Xr,Frustum:ep,GLBufferAttribute:U5,GLSL1:NU,GLSL3:aS,GreaterCompare:UP,GreaterDepth:x0,GreaterEqualCompare:kP,GreaterEqualDepth:y0,GreaterEqualStencilFunc:CU,GreaterStencilFunc:wU,GridHelper:j5,Group:Vo,HalfFloatType:li,HemisphereLight:bB,HemisphereLightHelper:X5,IcosahedronGeometry:rp,ImageBitmapLoader:NB,ImageLoader:Ld,ImageUtils:VP,IncrementStencilOp:gU,IncrementWrapStencilOp:yU,InstancedBufferAttribute:xc,InstancedBufferGeometry:LB,InstancedInterleavedBuffer:N5,InstancedMesh:cM,Int16BufferAttribute:_O,Int32BufferAttribute:SO,Int8BufferAttribute:vO,IntType:Qd,InterleavedBuffer:tp,InterleavedBufferAttribute:el,Interpolant:Rf,InterpolateDiscrete:lf,InterpolateLinear:cf,InterpolateSmooth:Fg,InvertStencilOp:_U,KeepStencilOp:kl,KeyframeTrack:js,LOD:rB,LatheGeometry:ip,Layers:oc,LessCompare:FP,LessDepth:g0,LessEqualCompare:QA,LessEqualDepth:yc,LessEqualStencilFunc:EU,LessStencilFunc:AU,Light:cl,LightProbe:DB,Line:$o,Line3:z5,LineBasicMaterial:Ki,LineCurve:pM,LineCurve3:cB,LineDashedMaterial:AB,LineLoop:uM,LineSegments:Ws,LinearDisplayP3ColorSpace:qd,LinearFilter:Ft,LinearInterpolant:_M,LinearMipMapLinearFilter:sS,LinearMipMapNearestFilter:uU,LinearMipmapLinearFilter:kr,LinearMipmapNearestFilter:Wu,LinearSRGBColorSpace:Er,LinearToneMapping:SP,LinearTransfer:Ed,Loader:Bi,LoaderUtils:Xa,LoadingManager:ty,LoopOnce:RP,LoopPingPong:IP,LoopRepeat:bP,LuminanceAlphaFormat:XA,LuminanceFormat:WA,MOUSE:Ul,Material:Hn,MaterialLoader:ny,MathUtils:qA,Matrix2:BM,Matrix3:Ut,Matrix4:ct,MaxEquation:sP,Mesh:yn,MeshBasicMaterial:mr,MeshDepthMaterial:rM,MeshDistanceMaterial:sM,MeshLambertMaterial:_B,MeshMatcapMaterial:SB,MeshNormalMaterial:yM,MeshPhongMaterial:yB,MeshPhysicalMaterial:sr,MeshStandardMaterial:ap,MeshToonMaterial:xB,MinEquation:rP,MirroredRepeatWrapping:of,MixOperation:xP,MultiplyBlending:iS,MultiplyOperation:Kd,NearestFilter:Ht,NearestMipMapLinearFilter:cU,NearestMipMapNearestFilter:lU,NearestMipmapLinearFilter:jl,NearestMipmapNearestFilter:wv,NeutralToneMapping:TP,NeverCompare:LP,NeverDepth:p0,NeverStencilFunc:SU,NoBlending:rr,NoColorSpace:us,NoToneMapping:Hs,NormalAnimationBlendMode:Bv,NormalBlending:ic,NotEqualCompare:OP,NotEqualDepth:_0,NotEqualStencilFunc:TU,NumberKeyframeTrack:Sc,Object3D:jt,ObjectLoader:p5,ObjectSpaceNormalMap:DP,OctahedronGeometry:sp,OneFactor:aP,OneMinusConstantAlphaFactor:yP,OneMinusConstantColorFactor:gP,OneMinusDstAlphaFactor:fP,OneMinusDstColorFactor:dP,OneMinusSrcAlphaFactor:d0,OneMinusSrcColorFactor:cP,OrthographicCamera:xr,P3Primaries:Td,PCFShadowMap:Ev,PCFSoftShadowMap:Xh,PMREMGenerator:lS,Path:Id,PerspectiveCamera:Tn,Plane:Uo,PlaneGeometry:xo,PlaneHelper:q5,PointLight:wM,PointLightHelper:V5,Points:fM,PointsMaterial:zv,PolarGridHelper:J5,PolyhedronGeometry:ll,PositionalAudio:S5,PropertyBinding:en,PropertyMixer:OB,QuadraticBezierCurve:mM,QuadraticBezierCurve3:gM,Quaternion:Ei,QuaternionKeyframeTrack:Ac,QuaternionLinearInterpolant:CB,RED_GREEN_RGTC2_Format:X0,RED_RGTC1_Format:JA,REVISION:yo,RGBADepthPacking:BP,RGBAFormat:Dn,RGBAIntegerFormat:Pv,RGBA_ASTC_10x10_Format:k0,RGBA_ASTC_10x5_Format:N0,RGBA_ASTC_10x6_Format:U0,RGBA_ASTC_10x8_Format:O0,RGBA_ASTC_12x10_Format:z0,RGBA_ASTC_12x12_Format:H0,RGBA_ASTC_4x4_Format:R0,RGBA_ASTC_5x4_Format:b0,RGBA_ASTC_5x5_Format:I0,RGBA_ASTC_6x5_Format:P0,RGBA_ASTC_6x6_Format:B0,RGBA_ASTC_8x5_Format:D0,RGBA_ASTC_8x6_Format:L0,RGBA_ASTC_8x8_Format:F0,RGBA_BPTC_Format:Qh,RGBA_ETC2_EAC_Format:C0,RGBA_PVRTC_2BPPV1_Format:E0,RGBA_PVRTC_4BPPV1_Format:M0,RGBA_S3TC_DXT1_Format:Jh,RGBA_S3TC_DXT3_Format:Yh,RGBA_S3TC_DXT5_Format:Kh,RGBDepthPacking:hU,RGBFormat:VA,RGBIntegerFormat:fU,RGB_BPTC_SIGNED_Format:G0,RGB_BPTC_UNSIGNED_Format:V0,RGB_ETC1_Format:w0,RGB_ETC2_Format:T0,RGB_PVRTC_2BPPV1_Format:A0,RGB_PVRTC_4BPPV1_Format:S0,RGB_S3TC_DXT1_Format:jh,RGDepthPacking:dU,RGFormat:jA,RGIntegerFormat:Iv,RawShaderMaterial:vB,Ray:bc,Raycaster:PM,Rec709Primaries:wd,RectAreaLight:PB,RedFormat:Ef,RedIntegerFormat:Zd,ReinhardToneMapping:AP,RenderTarget:WP,RepeatWrapping:go,ReplaceStencilOp:mU,Rever
vendor: 58,392 bytes, lines 3878-3908
3878seSubtractEquation:iP,RingGeometry:Kv,SIGNED_RED_GREEN_RGTC2_Format:j0,SIGNED_RED_RGTC1_Format:W0,SRGBColorSpace:jn,SRGBTransfer:_n,Scene:qo,ShaderChunk:Bt,ShaderLib:Os,ShaderMaterial:nn,ShadowMaterial:gB,Shape:ac,ShapeGeometry:Qv,ShapePath:tV,ShapeUtils:ho,ShortType:Cv,Skeleton:np,SkeletonHelper:G5,SkinnedMesh:lM,Source:Kl,Sphere:wi,SphereGeometry:op,Spherical:gS,SphericalHarmonics3:BB,SplineCurve:vM,SpotLight:EM,SpotLightHelper:H5,Sprite:iB,SpriteMaterial:aM,SrcAlphaFactor:h0,SrcAlphaSaturateFactor:pP,SrcColorFactor:lP,StaticCopyUsage:DU,StaticDrawUsage:Cd,StaticReadUsage:IU,StereoCamera:v5,StreamCopyUsage:FU,StreamDrawUsage:bU,StreamReadUsage:BU,StringKeyframeTrack:Bc,SubtractEquation:nP,SubtractiveBlending:nS,TOUCH:Ol,TangentSpaceNormalMap:al,TetrahedronGeometry:Zv,Texture:Qt,TextureLoader:lp,TextureUtils:sG,TorusGeometry:qv,TorusKnotGeometry:$v,Triangle:dr,TriangleFanDrawMode:J0,TriangleStripDrawMode:KA,TrianglesDrawMode:PP,TubeGeometry:ey,UVMapping:Qa,Uint16BufferAttribute:eM,Uint32BufferAttribute:tM,Uint8BufferAttribute:yO,Uint8ClampedBufferAttribute:xO,Uniform:Lt,UniformsGroup:F5,UniformsLib:tt,UniformsUtils:JP,UnsignedByteType:di,UnsignedInt248Type:qa,UnsignedInt5999Type:HA,UnsignedIntType:Vs,UnsignedShort4444Type:Rv,UnsignedShort5551Type:bv,UnsignedShortType:af,VSMShadowMap:Fs,Vector2:_e,Vector3:G,Vector4:rn,VectorKeyframeTrack:Mc,VideoTexture:wG,WebGL3DRenderTarget:aO,WebGLArrayRenderTarget:oO,WebGLCoordinateSystem:lo,WebGLCubeRenderTarget:nM,WebGLMultipleRenderTargets:GB,WebGLRenderTarget:xn,WebGLRenderer:oM,WebGLUtils:eB,WebGPUCoordinateSystem:Rd,WireframeGeometry:mB,WrapAroundEnding:Md,ZeroCurvatureEnding:Jl,ZeroFactor:oP,ZeroSlopeEnding:Yl,ZeroStencilOp:pU,createCanvasElement:GP},Symbol.toStringTag,{value:"Module"}));var VB={exports:{}},Dc={};/**
3879 * @license React
3880 * react-reconciler-constants.production.min.js
3881 *
3882 * Copyright (c) Facebook, Inc. and its affiliates.
3883 *
3884 * This source code is licensed under the MIT license found in the
3885 * LICENSE file in the root directory of this source tree.
3886 */Dc.ConcurrentRoot=1;Dc.ContinuousEventPriority=4;Dc.DefaultEventPriority=16;Dc.DiscreteEventPriority=1;Dc.IdleEventPriority=536870912;Dc.LegacyRoot=0;VB.exports=Dc;var Fu=VB.exports;function rV(n){let e;const t=new Set,i=(c,f)=>{const d=typeof c=="function"?c(e):c;if(d!==e){const p=e;e=f?d:Object.assign({},e,d),t.forEach(m=>m(e,p))}},r=()=>e,s=(c,f=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=f(e);function m(){const v=f(e);if(!d(p,v)){const _=p;c(p=v,_)}}return t.add(m),()=>t.delete(m)},l={setState:i,getState:r,subscribe:(c,f,d)=>f||d?s(c,f,d):(t.add(c),()=>t.delete(c)),destroy:()=>t.clear()};return e=n(i,r,l),l}const sV=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),OR=sV?ne.useEffect:ne.useLayoutEffect;function DM(n){const e=typeof n=="function"?rV(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=ne.useReducer(x=>x+1,0),o=e.getState(),a=ne.useRef(o),l=ne.useRef(i),c=ne.useRef(r),f=ne.useRef(!1),d=ne.useRef();d.current===void 0&&(d.current=i(o));let p,m=!1;(a.current!==o||l.current!==i||c.current!==r||f.current)&&(p=i(o),m=!r(d.current,p)),OR(()=>{m&&(d.current=p),a.current=o,l.current=i,c.current=r,f.current=!1});const v=ne.useRef(o);OR(()=>{const x=()=>{try{const S=e.getState(),A=l.current(S);c.current(d.current,A)||(a.current=S,d.current=A,s())}catch{f.current=!0,s()}},g=e.subscribe(x);return e.getState()!==v.current&&x(),g},[]);const _=m?p:d.current;return ne.useDebugValue(_),_};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}const oV=n=>typeof n=="object"&&typeof n.then=="function",ql=[];function WB(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;r<i;r++)if(!t(n[r],e[r]))return!1;return!0}function XB(n,e=null,t=!1,i={}){e===null&&(e=[n]);for(const s of ql)if(WB(e,s.keys,s.equal)){if(t)return;if(Object.prototype.hasOwnProperty.call(s,"error"))throw s.error;if(Object.prototype.hasOwnProperty.call(s,"response"))return i.lifespan&&i.lifespan>0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=ql.indexOf(r);s!==-1&&ql.splice(s,1)},promise:(oV(n)?n:n(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(ql.push(r),!t)throw r.promise}const aV=(n,e,t)=>XB(n,e,!1,t),lV=(n,e,t)=>void XB(n,e,!0,t),cV=n=>{if(n===void 0||n.length===0)ql.splice(0,ql.length);else{const e=ql.find(t=>WB(n,t.keys,t.equal));e&&e.remove()}};var jB={exports:{}},JB={exports:{}},YB={};/**
3887 * @license React
3888 * scheduler.production.min.js
3889 *
3890 * Copyright (c) Facebook, Inc. and its affiliates.
3891 *
3892 * This source code is licensed under the MIT license found in the
3893 * LICENSE file in the root directory of this source tree.
3894 */(function(n){function e(W,ue){var oe=W.length;W.push(ue);e:for(;0<oe;){var de=oe-1>>>1,we=W[de];if(0<r(we,ue))W[de]=ue,W[oe]=we,oe=de;else break e}}function t(W){return W.length===0?null:W[0]}function i(W){if(W.length===0)return null;var ue=W[0],oe=W.pop();if(oe!==ue){W[0]=oe;e:for(var de=0,we=W.length,Ue=we>>>1;de<Ue;){var pe=2*(de+1)-1,be=W[pe],Ne=pe+1,ke=W[Ne];if(0>r(be,oe))Ne<we&&0>r(ke,be)?(W[de]=ke,W[Ne]=oe,de=Ne):(W[de]=be,W[pe]=oe,de=pe);else if(Ne<we&&0>r(ke,oe))W[de]=ke,W[Ne]=oe,de=Ne;else break e}}return ue}function r(W,ue){var oe=W.sortIndex-ue.sortIndex;return oe!==0?oe:W.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,d=null,p=3,m=!1,v=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(W){for(var ue=t(c);ue!==null;){if(ue.callback===null)i(c);else if(ue.startTime<=W)i(c),ue.sortIndex=ue.expirationTime,e(l,ue);else break;ue=t(c)}}function E(W){if(_=!1,A(W),!v)if(t(l)!==null)v=!0,ie(I);else{var ue=t(c);ue!==null&&ye(E,ue.startTime-W)}}function I(W,ue){v=!1,_&&(_=!1,g(D),D=-1),m=!0;var oe=p;try{for(A(ue),d=t(l);d!==null&&(!(d.expirationTime>ue)||W&&!B());){var de=d.callback;if(typeof de=="function"){d.callback=null,p=d.priorityLevel;var we=de(d.expirationTime<=ue);ue=n.unstable_now(),typeof we=="function"?d.callback=we:d===t(l)&&i(l),A(ue)}else i(l);d=t(l)}if(d!==null)var Ue=!0;else{var pe=t(c);pe!==null&&ye(E,pe.startTime-ue),Ue=!1}return Ue}finally{d=null,p=oe,m=!1}}var b=!1,P=null,D=-1,O=5,C=-1;function B(){return!(n.unstable_now()-C<O)}function Y(){if(P!==null){var W=n.unstable_now();C=W;var ue=!0;try{ue=P(!0,W)}finally{ue?$():(b=!1,P=null)}}else b=!1}var $;if(typeof S=="function")$=function(){S(Y)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=Y,$=function(){ce.postMessage(null)}}else $=function(){x(Y,0)};function ie(W){P=W,b||(b=!0,$())}function ye(W,ue){D=x(function(){W(n.unstable_now())},ue)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(W){W.callback=null},n.unstable_continueExecution=function(){v||m||(v=!0,ie(I))},n.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<W?Math.floor(1e3/W):5},n.unstable_getCurrentPriorityLevel=function(){return p},n.unstable_getFirstCallbackNode=function(){return t(l)},n.unstable_next=function(W){switch(p){case 1:case 2:case 3:var ue=3;break;default:ue=p}var oe=p;p=ue;try{return W()}finally{p=oe}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(W,ue){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var oe=p;p=W;try{return ue()}finally{p=oe}},n.unstable_scheduleCallback=function(W,ue,oe){var de=n.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?de+oe:de):oe=de,W){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=oe+we,W={id:f++,callback:ue,priorityLevel:W,startTime:oe,expirationTime:we,sortIndex:-1},oe>de?(W.sortIndex=oe,e(c,W),t(l)===null&&W===t(c)&&(_?(g(D),D=-1):_=!0,ye(E,oe-de))):(W.sortIndex=we,e(l,W),v||m||(v=!0,ie(I))),W},n.unstable_shouldYield=B,n.unstable_wrapCallback=function(W){var ue=p;return function(){var oe=p;p=ue;try{return W.apply(this,arguments)}finally{p=oe}}}})(YB);JB.exports=YB;var vS=JB.exports;/**
3895 * @license React
3896 * react-reconciler.production.min.js
3897 *
3898 * Copyright (c) Facebook, Inc. and its affiliates.
3899 *
3900 * This source code is licensed under the MIT license found in the
3901 * LICENSE file in the root directory of this source tree.
3902 */var uV=function(e){var t={},i=ne,r=vS,s=Object.assign;function o(u){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+u,y=1;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y]);return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),v=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),I=Symbol.iterator;function b(u){return u===null||typeof u!="object"?null:(u=I&&u[I]||u["@@iterator"],typeof u=="function"?u:null)}function P(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case f:return"Fragment";case c:return"Portal";case p:return"Profiler";case d:return"StrictMode";case x:return"Suspense";case g:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case v:return(u.displayName||"Context")+".Consumer";case m:return(u._context.displayName||"Context")+".Provider";case _:var h=u.render;return u=u.displayName,u||(u=h.displayName||h.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case S:return h=u.displayName||null,h!==null?h:P(u.type)||"Memo";case A:h=u._payload,u=u._init;try{return P(u(h))}catch{}}return null}function D(u){var h=u.type;switch(u.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=h.render,u=u.displayName||u.name||"",h.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(h);case 8:return h===d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function O(u){var h=u,y=u;if(u.alternate)for(;h.return;)h=h.return;else{u=h;do h=u,h.flags&4098&&(y=h.return),u=h.return;while(u)}return h.tag===3?y:null}function C(u){if(O(u)!==u)throw Error(o(188))}function B(u){var h=u.alternate;if(!h){if(h=O(u),h===null)throw Error(o(188));return h!==u?null:u}for(var y=u,M=h;;){var T=y.return;if(T===null)break;var L=T.alternate;if(L===null){if(M=T.return,M!==null){y=M;continue}break}if(T.child===L.child){for(L=T.child;L;){if(L===y)return C(T),u;if(L===M)return C(T),h;L=L.sibling}throw Error(o(188))}if(y.return!==M.return)y=T,M=L;else{for(var K=!1,he=T.child;he;){if(he===y){K=!0,y=T,M=L;break}if(he===M){K=!0,M=T,y=L;break}he=he.sibling}if(!K){for(he=L.child;he;){if(he===y){K=!0,y=L,M=T;break}if(he===M){K=!0,M=L,y=T;break}he=he.sibling}if(!K)throw Error(o(189))}}if(y.alternate!==M)throw Error(o(190))}if(y.tag!==3)throw Error(o(188));return y.stateNode.current===y?u:h}function Y(u){return u=B(u),u!==null?$(u):null}function $(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var h=$(u);if(h!==null)return h;u=u.sibling}return null}function se(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){if(u.tag!==4){var h=se(u);if(h!==null)return h}u=u.sibling}return null}var ce=Array.isArray,ie=e.getPublicInstance,ye=e.getRootHostContext,W=e.getChildHostContext,ue=e.prepareForCommit,oe=e.resetAfterCommit,de=e.createInstance,we=e.appendInitialChild,Ue=e.finalizeInitialChildren,pe=e.prepareUpdate,be=e.shouldSetTextContent,Ne=e.createTextInstance,ke=e.scheduleTimeout,nt=e.cancelTimeout,vt=e.noTimeout,ut=e.isPrimaryRenderer,Ze=e.supportsMutation,Be=e.supportsPersistence,X=e.supportsHydration,We=e.getInstanceFromNode,je=e.preparePortalMount,Ve=e.getCurrentEventPriority,Xe=e.detachDeletedInstance,ht=e.supportsMicrotasks,et=e.scheduleMicrotask,j=e.supportsTestSelectors,k=e.findFiberRoot,ge=e.getBoundingRect,Ie=e.getTextContent,De=e.isHiddenSubtree,Re=e.matchAccessibilityRole,ft=e.setFocusIfFocusable,N=e.setupIntersectionObserver,w=e.appendChild,R=e.appendChildToContainer,z=e.commitTextUpdate,Q=e.commitMount,fe=e.commitUpdate,ve=e.insertBefore,Fe=e.insertInContainerBefore,pt=e.removeChild,q=e.removeChildFromContainer,Te=e.resetTextContent,J=e.hideInstance,He=e.hideTextInstance,ae=e.unhideInstance,Le=e.unhideTextInstance,$e=e.clearContainer,st=e.cloneInstance,zt=e.createContainerChildSet,Zt=e.appendChildToContainerChildSet,hn=e.finalizeContainerChildren,Nt=e.replaceContainerChildren,En=e.cloneHiddenInstance,ti=e.cloneHiddenTextInstance,Ms=e.canHydrateInstance,Fc=e.canHydrateTextInstance,Es=e.canHydrateSuspenseInstance,ws=e.isSuspenseInstancePending,sa=e.isSuspenseInstanceFallback,Js=e.registerSuspenseInstanceRetry,Di=e.getNextHydratableSibling,Gt=e.getFirstHydratableChild,_o=e.getFirstHydratableChildWithinContainer,Nc=e.getFirstHydratableChildWithinSuspenseInstance,U=e.hydrateInstance,H=e.hydrateTextInstance,le=e.hydrateSuspenseInstance,Me=e.getNextHydratableInstanceAfterSuspenseInstance,F=e.commitHydratedContainer,V=e.commitHydratedSuspenseInstance,te=e.clearSuspenseBoundary,ee=e.clearSuspenseBoundaryFromContainer,Z=e.shouldDeleteUnhydratedTailInstances,xe=e.didNotMatchHydratedContainerTextInstance,Se=e.didNotMatchHydratedTextInstance,Ee;function Ke(u){if(Ee===void 0)try{throw Error()}catch(y){var h=y.stack.trim().match(/\n( *(at )?)/);Ee=h&&h[1]||""}return`
3903`+Ee+u}var Oe=!1;function ze(u,h){if(!u||Oe)return"";Oe=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(Qe){var M=Qe}Reflect.construct(u,[],h)}else{try{h.call()}catch(Qe){M=Qe}u.call(h.prototype)}else{try{throw Error()}catch(Qe){M=Qe}u()}}catch(Qe){if(Qe&&M&&typeof Qe.stack=="string"){for(var T=Qe.stack.split(`
3904`),L=M.stack.split(`
3905`),K=T.length-1,he=L.length-1;1<=K&&0<=he&&T[K]!==L[he];)he--;for(;1<=K&&0<=he;K--,he--)if(T[K]!==L[he]){if(K!==1||he!==1)do if(K--,he--,0>he||T[K]!==L[he]){var Pe=`
3906`+T[K].replace(" at new "," at ");return u.displayName&&Pe.includes("<anonymous>")&&(Pe=Pe.replace("<anonymous>",u.displayName)),Pe}while(1<=K&&0<=he);break}}}finally{Oe=!1,Error.prepareStackTrace=y}return(u=u?u.displayName||u.name:"")?Ke(u):""}var Ge=Object.prototype.hasOwnProperty,ot=[],xt=-1;function St(u){return{current:u}}function _t(u){0>xt||(u.current=ot[xt],ot[xt]=null,xt--)}function rt(u,h){xt++,ot[xt]=u.current,u.current=h}var Ye={},Ct=St(Ye),lt=St(!1),Xt=Ye;function Ln(u,h){var y=u.type.contextTypes;if(!y)return Ye;var M=u.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===h)return M.__reactInternalMemoizedMaskedChildContext;var T={},L;for(L in y)T[L]=h[L];return M&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=h,u.__reactInternalMemoizedMaskedChildContext=T),T}function $t(u){return u=u.childContextTypes,u!=null}function Kn(){_t(lt),_t(Ct)}function Et(u,h,y){if(Ct.current!==Ye)throw Error(o(168));rt(Ct,h),rt(lt,y)}function dn(u,h,y){var M=u.stateNode;if(h=h.childContextTypes,typeof M.getChildContext!="function")return y;M=M.getChildContext();for(var T in M)if(!(T in h))throw Error(o(108,D(u)||"Unknown",T));return s({},y,M)}function tn(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Ye,Xt=Ct.current,rt(Ct,u),rt(lt,lt.current),!0}function Rt(u,h,y){var M=u.stateNode;if(!M)throw Error(o(169));y?(u=dn(u,h,Xt),M.__reactInternalMemoizedMergedChildContext=u,_t(lt),_t(Ct),rt(Ct,u)):_t(lt),rt(lt,y)}var pn=Math.clz32?Math.clz32:Ys,Ts=Math.log,gi=Math.LN2;function Ys(u){return u>>>=0,u===0?32:31-(Ts(u)/gi|0)|0}var dp=64,pp=4194304;function If(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function mp(u,h){var y=u.pendingLanes;if(y===0)return 0;var M=0,T=u.suspendedLanes,L=u.pingedLanes,K=y&268435455;if(K!==0){var he=K&~T;he!==0?M=If(he):(L&=K,L!==0&&(M=If(L)))}else K=y&~T,K!==0?M=If(K):L!==0&&(M=If(L));if(M===0)return 0;if(h!==0&&h!==M&&!(h&T)&&(T=M&-M,L=h&-h,T>=L||T===16&&(L&4194240)!==0))return h;if(M&4&&(M|=y&16),h=u.entangledLanes,h!==0)for(u=u.entanglements,h&=M;0<h;)y=31-pn(h),T=1<<y,M|=u[y],h&=~T;return M}function JL(u,h){switch(u){case 1:case 2:case 4:return h+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function YL(u,h){for(var y=u.suspendedLanes,M=u.pingedLanes,T=u.expirationTimes,L=u.pendingLanes;0<L;){var K=31-pn(L),he=1<<K,Pe=T[K];Pe===-1?(!(he&y)||he&M)&&(T[K]=JL(he,h)):Pe<=h&&(u.expiredLanes|=he),L&=~he}}function cy(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function uy(u){for(var h=[],y=0;31>y;y++)h.push(u);return h}function Pf(u,h,y){u.pendingLanes|=h,h!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,h=31-pn(h),u[h]=y}function KL(u,h){var y=u.pendingLanes&~h;u.pendingLanes=h,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=h,u.mutableReadLanes&=h,u.entangledLanes&=h,h=u.entanglements;var M=u.eventTimes;for(u=u.expirationTimes;0<y;){var T=31-pn(y),L=1<<T;h[T]=0,M[T]=-1,u[T]=-1,y&=~L}}function fy(u,h){var y=u.entangledLanes|=h;for(u=u.entanglements;y;){var M=31-pn(y),T=1<<M;T&h|u[M]&h&&(u[M]|=h),y&=~T}}var on=0;function SE(u){return u&=-u,1<u?4<u?u&268435455?16:536870912:4:1}var hy=r.unstable_scheduleCallback,AE=r.unstable_cancelCallback,QL=r.unstable_shouldYield,ZL=r.unstable_requestPaint,vi=r.unstable_now,dy=r.unstable_ImmediatePriority,qL=r.unstable_UserBlockingPriority,py=r.unstable_NormalPriority,$L=r.unstable_IdlePriority,gp=null,Ks=null;function eF(u){if(Ks&&typeof Ks.onCommitFiberRoot=="function")try{Ks.onCommitFiberRoot(gp,u,void 0,(u.current.flags&128)===128)}catch{}}function tF(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var Qs=typeof Object.is=="function"?Object.is:tF,So=null,vp=!1,my=!1;function ME(u){So===null?So=[u]:So.push(u)}function nF(u){vp=!0,ME(u)}function Zs(){if(!my&&So!==null){my=!0;var u=0,h=on;try{var y=So;for(on=1;u<y.length;u++){var M=y[u];do M=M(!0);while(M!==null)}So=null,vp=!1}catch(T){throw So!==null&&(So=So.slice(u+1)),hy(dy,Zs),T}finally{on=h,my=!1}}return null}var iF=a.ReactCurrentBatchConfig;function yp(u,h){if(Qs(u,h))return!0;if(typeof u!="object"||u===null||typeof h!="object"||h===null)return!1;var y=Object.keys(u),M=Object.keys(h);if(y.length!==M.length)return!1;for(M=0;M<y.length;M++){var T=y[M];if(!Ge.call(h,T)||!Qs(u[T],h[T]))return!1}return!0}function rF(u){switch(u.tag){case 5:return Ke(u.type);case 16:return Ke("Lazy");case 13:return Ke("Suspense");case 19:return Ke("SuspenseList");case 0:case 2:case 15:return u=ze(u.type,!1),u;case 11:return u=ze(u.type.render,!1),u;case 1:return u=ze(u.type,!0),u;default:return""}}function Cs(u,h){if(u&&u.defaultProps){h=s({},h),u=u.defaultProps;for(var y in u)h[y]===void 0&&(h[y]=u[y]);return h}return h}var xp=St(null),_p=null,Uc=null,gy=null;function vy(){gy=Uc=_p=null}function EE(u,h,y){ut?(rt(xp,h._currentValue),h._currentValue=y):(rt(xp,h._currentValue2),h._currentValue2=y)}function yy(u){var h=xp.current;_t(xp),ut?u._currentValue=h:u._currentValue2=h}function xy(u,h,y){for(;u!==null;){var M=u.alternate;if((u.childLanes&h)!==h?(u.childLanes|=h,M!==null&&(M.childLanes|=h)):M!==null&&(M.childLanes&h)!==h&&(M.childLanes|=h),u===y)break;u=u.return}}function Oc(u,h){_p=u,gy=Uc=null,u=u.dependencies,u!==null&&u.firstContext!==null&&(u.lanes&h&&(Ir=!0),u.firstContext=null)}function Qr(u){var h=ut?u._currentValue:u._currentValue2;if(gy!==u)if(u={context:u,memoizedValue:h,next:null},Uc===null){if(_p===null)throw Error(o(308));Uc=u,_p.dependencies={lanes:0,firstContext:u}}else Uc=Uc.next=u;return h}var qs=null,oa=!1;function _y(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wE(u,h){u=u.updateQueue,h.updateQueue===u&&(h.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function Ao(u,h){return{eventTime:u,lane:h,tag:0,payload:null,callback:null,next:null}}function aa(u,h){var y=u.updateQueue;y!==null&&(y=y.shared,ni!==null&&u.mode&1&&!(Wt&2)?(u=y.interleaved,u===null?(h.next=h,qs===null?qs=[y]:qs.push(y)):(h.next=u.next,u.next=h),y.interleaved=h):(u=y.pending,u===null?h.next=h:(h.next=u.next,u.next=h),y.pending=h))}function Sp(u,h,y){if(h=h.updateQueue,h!==null&&(h=h.shared,(y&4194240)!==0)){var M=h.lanes;M&=u.pendingLanes,y|=M,h.lanes=y,fy(u,y)}}function TE(u,h){var y=u.updateQueue,M=u.alternate;if(M!==null&&(M=M.updateQueue,y===M)){var T=null,L=null;if(y=y.firstBaseUpdate,y!==null){do{var K={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};L===null?T=L=K:L=L.next=K,y=y.next}while(y!==null);L===null?T=L=h:L=L.next=h}else T=L=h;y={baseState:M.baseState,firstBaseUpdate:T,lastBaseUpdate:L,shared:M.shared,effects:M.effects},u.updateQueue=y;return}u=y.lastBaseUpdate,u===null?y.firstBaseUpdate=h:u.next=h,y.lastBaseUpdate=h}function Ap(u,h,y,M){var T=u.updateQueue;oa=!1;var L=T.firstBaseUpdate,K=T.lastBaseUpdate,he=T.shared.pending;if(he!==null){T.shared.pending=null;var Pe=he,Qe=Pe.next;Pe.next=null,K===null?L=Qe:K.next=Qe,K=Pe;var gt=u.alternate;gt!==null&&(gt=gt.updateQueue,he=gt.lastBaseUpdate,he!==K&&(he===null?gt.firstBaseUpdate=Qe:he.next=Qe,gt.lastBaseUpdate=Pe))}if(L!==null){var It=T.baseState;K=0,gt=Qe=Pe=null,he=L;do{var wt=he.lane,mn=he.eventTime;if((M&wt)===wt){gt!==null&&(gt=gt.next={eventTime:mn,lane:0,tag:he.tag,payload:he.payload,callback:he.callback,next:null});e:{var Mt=u,Ui=he;switch(wt=h,mn=y,Ui.tag){case 1:if(Mt=Ui.payload,typeof Mt=="function"){It=Mt.call(mn,It,wt);break e}It=Mt;break e;case 3:Mt.flags=Mt.flags&-65537|128;case 0:if(Mt=Ui.payload,wt=typeof Mt=="function"?Mt.call(mn,It,wt):Mt,wt==null)break e;It=s({},It,wt);break e;case 2:oa=!0}}he.callback!==null&&he.lane!==0&&(u.flags|=64,wt=T.effects,wt===null?T.effects=[he]:wt.push(he))}else mn={eventTime:mn,lane:wt,tag:he.tag,payload:he.payload,callback:he.callback,next:null},gt===null?(Qe=gt=mn,Pe=It):gt=gt.next=mn,K|=wt;if(he=he.next,he===null){if(he=T.shared.pending,he===null)break;wt=he,he=wt.next,wt.next=null,T.lastBaseUpdate=wt,T.shared.pending=null}}while(!0);if(gt===null&&(Pe=It),T.baseState=Pe,T.firstBaseUpdate=Qe,T.lastBaseUpdate=gt,h=T.shared.interleaved,h!==null){T=h;do K|=T.lane,T=T.next;while(T!==h)}else L===null&&(T.shared.lanes=0);Jc|=K,u.lanes=K,u.memoizedState=It}}function CE(u,h,y){if(u=h.effects,h.effects=null,u!==null)for(h=0;h<u.length;h++){var M=u[h],T=M.callback;if(T!==null){if(M.callback=null,M=y,typeof T!="function")throw Error(o(191,T));T.call(M)}}}var RE=new i.Component().refs;function Sy(u,h,y,M){h=u.memoizedState,y=y(M,h),y=y==null?h:s({},h,y),u.memoizedState=y,u.lanes===0&&(u.updateQueue.baseState=y)}var Mp={isMounted:function(u){return(u=u._reactInternals)?O(u)===u:!1},enqueueSetState:function(u,h,y){u=u._reactInternals;var M=Zi(),T=ua(u),L=Ao(M,T);L.payload=h,y!=null&&(L.callback=y),aa(u,L),h=ts(u,T,M),h!==null&&Sp(h,u,T)},enqueueReplaceState:function(u,h,y){u=u._reactInternals;var M=Zi(),T=ua(u),L=Ao(M,T);L.tag=1,L.payload=h,y!=null&&(L.callback=y),aa(u,L),h=ts(u,T,M),h!==null&&Sp(h,u,T)},enqueueForceUpdate:function(u,h){u=u._reactInternals;var y=Zi(),M=ua(u),T=Ao(y,M);T.tag=2,h!=null&&(T.callback=h),aa(u,T),h=ts(u,M,y),h!==null&&Sp(h,u,M)}};function bE(u,h,y,M,T,L,K){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(M,L,K):h.prototype&&h.prototype.isPureReactComponent?!yp(y,M)||!yp(T,L):!0}function IE(u,h,y){var M=!1,T=Ye,L=h.contextType;return typeof L=="object"&&L!==null?L=Qr(L):(T=$t(h)?Xt:Ct.current,M=h.contextTypes,L=(M=M!=null)?Ln(u,T):Ye),h=new h(y,L),u.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Mp,u.stateNode=h,h._reactInternals=u,M&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=T,u.__reactInternalMemoizedMaskedChildContext=L),h}function PE(u,h,y,M){u=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(y,M),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(y,M),h.state!==u&&Mp.enqueueReplaceState(h,h.state,null)}function Ay(u,h,y,M){var T=u.stateNode;T.props=y,T.state=u.memoizedState,T.refs=RE,_y(u);var L=h.contextType;typeof L=="object"&&L!==null?T.context=Qr(L):(L=$t(h)?Xt:Ct.current,T.context=Ln(u,L)),T.state=u.memoizedState,L=h.getDerivedStateFromProps,typeof L=="function"&&(Sy(u,h,L,y),T.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(h=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),h!==T.state&&Mp.enqueueReplaceState(T,T.state,null),Ap(u,y,T,M),T.state=u.memoizedState),typeof T.componentDidMount=="function"&&(u.flags|=4194308)}var kc=[],zc=0,Ep=null,wp=0,Zr=[],qr=0,fl=null,Mo=1,Eo="";function hl(u,h){kc[zc++]=wp,kc[zc++]=Ep,Ep=u,wp=h}function BE(u,h,y){Zr[qr++]=Mo,Zr[qr++]=Eo,Zr[qr++]=fl,fl=u;var M=Mo;u=Eo;var T=32-pn(M)-1;M&=~(1<<T),y+=1;var L=32-pn(h)+T;if(30<L){var K=T-T%5;L=(M&(1<<K)-1).toString(32),M>>=K,T-=K,Mo=1<<32-pn(h)+T|y<<T|M,Eo=L+u}else Mo=1<<L|y<<T|M,Eo=u}function My(u){u.return!==null&&(hl(u,1),BE(u,1,0))}function Ey(u){for(;u===Ep;)Ep=kc[--zc],kc[zc]=null,wp=kc[--zc],kc[zc]=null;for(;u===fl;)fl=Zr[--qr],Zr[qr]=null,Eo=Zr[--qr],Zr[qr]=null,Mo=Zr[--qr],Zr[qr]=null}var Rr=null,br=null,bn=!1,Bf=!1,Rs=null;function DE(u,h){var y=ns(5,null,null,0);y.elementType="DELETED",y.stateNode=h,y.return=u,h=u.deletions,h===null?(u.deletions=[y],u.flags|=16):h.push(y)}function LE(u,h){switch(u.tag){case 5:return h=Ms(h,u.type,u.pendingProps),h!==null?(u.stateNode=h,Rr=u,br=Gt(h),!0):!1;case 6:return h=Fc(h,u.pendingProps),h!==null?(u.stateNode=h,Rr=u,br=null,!0):!1;case 13:if(h=Es(h),h!==null){var y=fl!==null?{id:Mo,overflow:Eo}:null;return u.memoizedState={dehydrated:h,treeContext:y,retryLane:1073741824},y=ns(18,null,null,0),y.stateNode=h,y.return=u,u.child=y,Rr=u,br=null,!0}return!1;default:return!1}}function wy(u){return(u.mode&1)!==0&&(u.flags&128)===0}function Ty(u){if(bn){var h=br;if(h){var y=h;if(!LE(u,h)){if(wy(u))throw Error(o(418));h=Di(y);var M=Rr;h&&LE(u,h)?DE(M,y):(u.flags=u.flags&-4097|2,bn=!1,Rr=u)}}else{if(wy(u))throw Error(o(418));u.flags=u.flags&-4097|2,bn=!1,Rr=u}}}function FE(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;Rr=u}function Df(u){if(!X||u!==Rr)return!1;if(!bn)return FE(u),bn=!0,!1;if(u.tag!==3&&(u.tag!==5||Z(u.type)&&!be(u.type,u.memoizedProps))){var h=br;if(h){if(wy(u)){for(u=br;u;)u=Di(u);throw Error(o(418))}for(;h;)DE(u,h),h=Di(h)}}if(FE(u),u.tag===13){if(!X)throw Error(o(316));if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));br=Me(u)}else br=Rr?Di(u.stateNode):null;return!0}function Hc(){X&&(br=Rr=null,Bf=bn=!1)}function Cy(u){Rs===null?Rs=[u]:Rs.push(u)}function Lf(u,h,y){if(u=y.ref,u!==null&&typeof u!="function"&&typeof u!="object"){if(y._owner){if(y=y._owner,y){if(y.tag!==1)throw Error(o(309));var M=y.stateNode}if(!M)throw Error(o(147,u));var T=M,L=""+u;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===L?h.ref:(h=function(K){var he=T.refs;he===RE&&(he=T.refs={}),K===null?delete he[L]:he[L]=K},h._stringRef=L,h)}if(typeof u!="string")throw Error(o(284));if(!y._owner)throw Error(o(290,u))}return u}function Tp(u,h){throw u=Object.prototype.toString.call(h),Error(o(31,u==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":u))}function NE(u){var h=u._init;return h(u._payload)}function UE(u){function h(Ae,me){if(u){var Ce=Ae.deletions;Ce===null?(Ae.deletions=[me],Ae.flags|=16):Ce.push(me)}}function y(Ae,me){if(!u)return null;for(;me!==null;)h(Ae,me),me=me.sibling;return null}function M(Ae,me){for(Ae=new Map;me!==null;)me.key!==null?Ae.set(me.key,me):Ae.set(me.index,me),me=me.sibling;return Ae}function T(Ae,me){return Ae=ha(Ae,me),Ae.index=0,Ae.sibling=null,Ae}function L(Ae,me,Ce){return Ae.index=Ce,u?(Ce=Ae.alternate,Ce!==null?(Ce=Ce.index,Ce<me?(Ae.flags|=2,me):Ce):(Ae.flags|=2,me)):(Ae.flags|=1048576,me)}function K(Ae){return u&&Ae.alternate===null&&(Ae.flags|=2),Ae}function he(Ae,me,Ce,at){return me===null||me.tag!==6?(me=ux(Ce,Ae.mode,at),me.return=Ae,me):(me=T(me,Ce),me.return=Ae,me)}function Pe(Ae,me,Ce,at){var At=Ce.type;return At===f?gt(Ae,me,Ce.props.children,at,Ce.key):me!==null&&(me.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===A&&NE(At)===me.type)?(at=T(me,Ce.props),at.ref=Lf(Ae,me,Ce),at.return=Ae,at):(at=im(Ce.type,Ce.key,Ce.props,null,Ae.mode,at),at.ref=Lf(Ae,me,Ce),at.return=Ae,at)}function Qe(Ae,me,Ce,at){return me===null||me.tag!==4||me.stateNode.containerInfo!==Ce.containerInfo||me.stateNode.implementation!==Ce.implementation?(me=fx(Ce,Ae.mode,at),me.return=Ae,me):(me=T(me,Ce.children||[]),me.return=Ae,me)}function gt(Ae,me,Ce,at,At){return me===null||me.tag!==7?(me=xl(Ce,Ae.mode,at,At),me.return=Ae,me):(me=T(me,Ce),me.return=Ae,me)}function It(Ae,me,Ce){if(typeof me=="string"&&me!==""||typeof me=="number")return me=ux(""+me,Ae.mode,Ce),me.return=Ae,me;if(typeof me=="object"&&me!==null){switch(me.$$typeof){case l:return Ce=im(me.type,me.key,me.props,null,Ae.mode,Ce),Ce.ref=Lf(Ae,null,me),Ce.return=Ae,Ce;case c:return me=fx(me,Ae.mode,Ce),me.return=Ae,me;case A:var at=me._init;return It(Ae,at(me._payload),Ce)}if(ce(me)||b(me))return me=xl(me,Ae.mode,Ce,null),me.return=Ae,me;Tp(Ae,me)}return null}function wt(Ae,me,Ce,at){var At=me!==null?me.key:null;if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number")return At!==null?null:he(Ae,me,""+Ce,at);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case l:return Ce.key===At?Pe(Ae,me,Ce,at):null;case c:return Ce.key===At?Qe(Ae,me,Ce,at):null;case A:return At=Ce._init,wt(Ae,me,At(Ce._payload),at)}if(ce(Ce)||b(Ce))return At!==null?null:gt(Ae,me,Ce,at,null);Tp(Ae,Ce)}return null}function mn(Ae,me,Ce,at,At){if(typeof at=="string"&&at!==""||typeof at=="number")return Ae=Ae.get(Ce)||null,he(me,Ae,""+at,At);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case l:return Ae=Ae.get(at.key===null?Ce:at.key)||null,Pe(me,Ae,at,At);case c:return Ae=Ae.get(at.key===null?Ce:at.key)||null,Qe(me,Ae,at,At);case A:var Vt=at._init;return mn(Ae,me,Ce,Vt(at._payload),At)}if(ce(at)||b(at))return Ae=Ae.get(Ce)||null,gt(me,Ae,at,At,null);Tp(me,at)}return null}function Mt(Ae,me,Ce,at){for(var At=null,Vt=null,Pt=me,an=me=0,xi=null;Pt!==null&&an<Ce.length;an++){Pt.index>an?(xi=Pt,Pt=null):xi=Pt.sibling;var ln=wt(Ae,Pt,Ce[an],at);if(ln===null){Pt===null&&(Pt=xi);break}u&&Pt&&ln.alternate===null&&h(Ae,Pt),me=L(ln,me,an),Vt===null?At=ln:Vt.sibling=ln,Vt=ln,Pt=xi}if(an===Ce.length)return y(Ae,Pt),bn&&hl(Ae,an),At;if(Pt===null){for(;an<Ce.length;an++)Pt=It(Ae,Ce[an],at),Pt!==null&&(me=L(Pt,me,an),Vt===null?At=Pt:Vt.sibling=Pt,Vt=Pt);return bn&&hl(Ae,an),At}for(Pt=M(Ae,Pt);an<Ce.length;an++)xi=mn(Pt,Ae,an,Ce[an],at),xi!==null&&(u&&xi.alternate!==null&&Pt.delete(xi.key===null?an:xi.key),me=L(xi,me,an),Vt===null?At=xi:Vt.sibling=xi,Vt=xi);return u&&Pt.forEach(function(da){return h(Ae,da)}),bn&&hl(Ae,an),At}function Ui(Ae,me,Ce,at){var At=b(Ce);if(typeof At!="function")throw Error(o(150));if(Ce=At.call(Ce),Ce==null)throw Error(o(151));for(var Vt=At=null,Pt=me,an=me=0,xi=null,ln=Ce.next();Pt!==null&&!ln.done;an++,ln=Ce.next()){Pt.index>an?(xi=Pt,Pt=null):xi=Pt.sibling;var da=wt(Ae,Pt,ln.value,at);if(da===null){Pt===null&&(Pt=xi);break}u&&Pt&&da.alternate===null&&h(Ae,Pt),me=L(da,me,an),Vt===null?At=da:Vt.sibling=da,Vt=da,Pt=xi}if(ln.done)return y(Ae,Pt),bn&&hl(Ae,an),At;if(Pt===null){for(;!ln.done;an++,ln=Ce.next())ln=It(Ae,ln.value,at),ln!==null&&(me=L(ln,me,an),Vt===null?At=ln:Vt.sibling=ln,Vt=ln);return bn&&hl(Ae,an),At}for(Pt=M(Ae,Pt);!ln.done;an++,ln=Ce.next())ln=mn(Pt,Ae,an,ln.value,at),ln!==null&&(u&&ln.alternate!==null&&Pt.delete(ln.key===null?an:ln.key),me=L(ln,me,an),Vt===null?At=ln:Vt.sibling=ln,Vt=ln);return u&&Pt.forEach(function(LF){return h(Ae,LF)}),bn&&hl(Ae,an),At}function is(Ae,me,Ce,at){if(typeof Ce=="object"&&Ce!==null&&Ce.type===f&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case l:e:{for(var At=Ce.key,Vt=me;Vt!==null;){if(Vt.key===At){if(At=Ce.type,At===f){if(Vt.tag===7){y(Ae,Vt.sibling),me=T(Vt,Ce.props.children),me.return=Ae,Ae=me;break e}}else if(Vt.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===A&&NE(At)===Vt.type){y(Ae,Vt.sibling),me=T(Vt,Ce.props),me.ref=Lf(Ae,Vt,Ce),me.return=Ae,Ae=me;break e}y(Ae,Vt);break}else h(Ae,Vt);Vt=Vt.sibling}Ce.type===f?(me=xl(Ce.props.children,Ae.mode,at,Ce.key),me.return=Ae,Ae=me):(at=im(Ce.type,Ce.key,Ce.props,null,Ae.mode,at),at.ref=Lf(Ae,me,Ce),at.return=Ae,Ae=at)}return K(Ae);case c:e:{for(Vt=Ce.key;me!==null;){if(me.key===Vt)if(me.tag===4&&me.stateNode.containerInfo===Ce.containerInfo&&me.stateNode.implementation===Ce.implementation){y(Ae,me.sibling),me=T(me,Ce.children||[]),me.return=Ae,Ae=me;break e}else{y(Ae,me);break}else h(Ae,me);me=me.sibling}me=fx(Ce,Ae.mode,at),me.return=Ae,Ae=me}return K(Ae);case A:return Vt=Ce._init,is(Ae,me,Vt(Ce._payload),at)}if(ce(Ce))return Mt(Ae,me,Ce,at);if(b(Ce))return Ui(Ae,me,Ce,at);Tp(Ae,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"?(Ce=""+Ce,me!==null&&me.tag===6?(y(Ae,me.sibling),me=T(me,Ce),me.return=Ae,Ae=me):(y(Ae,me),me=ux(Ce,Ae.mode,at),me.return=Ae,Ae=me),K(Ae)):y(Ae,me)}return is}var Gc=UE(!0),OE=UE(!1),Ff={},$r=St(Ff),Nf=St(Ff),Vc=St(Ff);function $s(u){if(u===Ff)throw Error(o(174));return u}function Ry(u,h){rt(Vc,h),rt(Nf,u),rt($r,Ff),u=ye(h),_t($r),rt($r,u)}function Wc(){_t($r),_t(Nf),_t(Vc)}function kE(u){var h=$s(Vc.current),y=$s($r.current);h=W(y,u.type,h),y!==h&&(rt(Nf,u),rt($r,h))}function by(u){Nf.current===u&&(_t($r),_t(Nf))}var Fn=St(0);function Cp(u){for(var h=u;h!==null;){if(h.tag===13){var y=h.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||ws(y)||sa(y)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if(h.flags&128)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Iy=[];function Py(){for(var u=0;u<Iy.length;u++){var h=Iy[u];ut?h._workInProgressVersionPrimary=null:h._workInProgressVersionSecondary=null}Iy.length=0}var Rp=a.ReactCurrentDispatcher,es=a.ReactCurrentBatchConfig,Xc=0,Vn=null,Li=null,yi=null,bp=!1,Uf=!1,Of=0,sF=0;function Fi(){throw Error(o(321))}function By(u,h){if(h===null)return!1;for(var y=0;y<h.length&&y<u.length;y++)if(!Qs(u[y],h[y]))return!1;return!0}function Dy(u,h,y,M,T,L){if(Xc=L,Vn=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,Rp.current=u===null||u.memoizedState===null?cF:uF,u=y(M,T),Uf){L=0;do{if(Uf=!1,Of=0,25<=L)throw Error(o(301));L+=1,yi=Li=null,h.updateQueue=null,Rp.current=fF,u=y(M,T)}while(Uf)}if(Rp.current=Lp,h=Li!==null&&Li.next!==null,Xc=0,yi=Li=Vn=null,bp=!1,h)throw Error(o(300));return u}function Ly(){var u=Of!==0;return Of=0,u}function wo(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yi===null?Vn.memoizedState=yi=u:yi=yi.next=u,yi}function eo(){if(Li===null){var u=Vn.alternate;u=u!==null?u.memoizedState:null}else u=Li.next;var h=yi===null?Vn.memoizedState:yi.next;if(h!==null)yi=h,Li=u;else{if(u===null)throw Error(o(310));Li=u,u={memoizedState:Li.memoizedState,baseState:Li.baseState,baseQueue:Li.baseQueue,queue:Li.queue,next:null},yi===null?Vn.memoizedState=yi=u:yi=yi.next=u}return yi}function dl(u,h){return typeof h=="function"?h(u):h}function Ip(u){var h=eo(),y=h.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=u;var M=Li,T=M.baseQueue,L=y.pending;if(L!==null){if(T!==null){var K=T.next;T.next=L.next,L.next=K}M.baseQueue=T=L,y.pending=null}if(T!==null){L=T.next,M=M.baseState;var he=K=null,Pe=null,Qe=L;do{var gt=Qe.lane;if((Xc&gt)===gt)Pe!==null&&(Pe=Pe.next={lane:0,action:Qe.action,hasEagerState:Qe.hasEagerState,eagerState:Qe.eagerState,next:null}),M=Qe.hasEagerState?Qe.eagerState:u(M,Qe.action);else{var It={lane:gt,action:Qe.action,hasEagerState:Qe.hasEagerState,eagerState:Qe.eagerState,next:null};Pe===null?(he=Pe=It,K=M):Pe=Pe.next=It,Vn.lanes|=gt,Jc|=gt}Qe=Qe.next}while(Qe!==null&&Qe!==L);Pe===null?K=M:Pe.next=he,Qs(M,h.memoizedState)||(Ir=!0),h.memoizedState=M,h.baseState=K,h.baseQueue=Pe,y.lastRenderedState=M}if(u=y.interleaved,u!==null){T=u;do L=T.lane,Vn.lanes|=L,Jc|=L,T=T.next;while(T!==u)}else T===null&&(y.lanes=0);return[h.memoizedState,y.dispatch]}function Pp(u){var h=eo(),y=h.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=u;var M=y.dispatch,T=y.pending,L=h.memoizedState;if(T!==null){y.pending=null;var K=T=T.next;do L=u(L,K.action),K=K.next;while(K!==T);Qs(L,h.memoizedState)||(Ir=!0),h.memoizedState=L,h.baseQueue===null&&(h.baseState=L),y.lastRenderedState=L}return[L,M]}function zE(){}function HE(u,h){var y=Vn,M=eo(),T=h(),L=!Qs(M.memoizedState,T);if(L&&(M.memoizedState=T,Ir=!0),M=M.queue,zf(WE.bind(null,y,M,u),[u]),M.getSnapshot!==h||L||yi!==null&&yi.memoizedState.tag&1){if(y.flags|=2048,kf(9,VE.bind(null,y,M,T,h),void 0,null),ni===null)throw Error(o(349));Xc&30||GE(y,h,T)}return T}function GE(u,h,y){u.flags|=16384,u={getSnapshot:h,value:y},h=Vn.updateQueue,h===null?(h={lastEffect:null,stores:null},Vn.updateQueue=h,h.stores=[u]):(y=h.stores,y===null?h.stores=[u]:y.push(u))}function VE(u,h,y,M){h.value=y,h.getSnapshot=M,XE(h)&&ts(u,1,-1)}function WE(u,h,y){return y(function(){XE(h)&&ts(u,1,-1)})}function XE(u){var h=u.getSnapshot;u=u.value;try{var y=h();return!Qs(u,y)}catch{return!0}}function Fy(u){var h=wo();return typeof u=="function"&&(u=u()),h.memoizedState=h.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:u},h.queue=u,u=u.dispatch=lF.bind(null,Vn,u),[h.memoizedState,u]}function kf(u,h,y,M){return u={tag:u,create:h,destroy:y,deps:M,next:null},h=Vn.updateQueue,h===null?(h={lastEffect:null,stores:null},Vn.updateQueue=h,h.lastEffect=u.next=u):(y=h.lastEffect,y===null?h.lastEffect=u.next=u:(M=y.next,y.next=u,u.next=M,h.lastEffect=u)),u}function jE(){return eo().memoizedState}function Bp(u,h,y,M){var T=wo();Vn.flags|=u,T.memoizedState=kf(1|h,y,void 0,M===void 0?null:M)}function Dp(u,h,y,M){var T=eo();M=M===void 0?null:M;var L=void 0;if(Li!==null){var K=Li.memoizedState;if(L=K.destroy,M!==null&&By(M,K.deps)){T.memoizedState=kf(h,y,L,M);return}}Vn.flags|=u,T.memoizedState=kf(1|h,y,L,M)}function Ny(u,h){return Bp(8390656,8,u,h)}function zf(u,h){return Dp(2048,8,u,h)}function JE(u,h){return Dp(4,2,u,h)}function YE(u,h){return Dp(4,4,u,h)}function KE(u,h){if(typeof h=="function")return u=u(),h(u),function(){h(null)};if(h!=null)return u=u(),h.current=u,function(){h.current=null}}function QE(u,h,y){return y=y!=null?y.concat([u]):null,Dp(4,4,KE.bind(null,h,u),y)}function Uy(){}function ZE(u,h){var y=eo();h=h===void 0?null:h;var M=y.memoizedState;return M!==null&&h!==null&&By(h,M[1])?M[0]:(y.memoizedState=[u,h],u)}function qE(u,h){var y=eo();h=h===void 0?null:h;var M=y.memoizedState;return M!==null&&h!==null&&By(h,M[1])?M[0]:(u=u(),y.memoizedState=[u,h],u)}function oF(u,h){var y=on;on=y!==0&&4>y?y:4,u(!0);var M=es.transition;es.transition={};try{u(!1),h()}finally{on=y,es.transition=M}}function $E(){return eo().memoizedState}function aF(u,h,y){var M=ua(u);y={lane:M,action:y,hasEagerState:!1,eagerState:null,next:null},ew(u)?tw(h,y):(nw(u,h,y),y=Zi(),u=ts(u,M,y),u!==null&&iw(u,h,M))}function lF(u,h,y){var M=ua(u),T={lane:M,action:y,hasEagerState:!1,eagerState:null,next:null};if(ew(u))tw(h,T);else{nw(u,h,T);var L=u.alternate;if(u.lanes===0&&(L===null||L.lanes===0)&&(L=h.lastRenderedReducer,L!==null))try{var K=h.lastRenderedState,he=L(K,y);if(T.hasEagerState=!0,T.eagerState=he,Qs(he,K))return}catch{}finally{}y=Zi(),u=ts(u,M,y),u!==null&&iw(u,h,M)}}function ew(u){var h=u.alternate;return u===Vn||h!==null&&h===Vn}function tw(u,h){Uf=bp=!0;var y=u.pending;y===null?h.next=h:(h.next=y.next,y.next=h),u.pending=h}function nw(u,h,y){ni!==null&&u.mode&1&&!(Wt&2)?(u=h.interleaved,u===null?(y.next=y,qs===null?qs=[h]:qs.push(h)):(y.next=u.next,u.next=y),h.interleaved=y):(u=h.pending,u===null?y.next=y:(y.next=u.next,u.next=y),h.pending=y)}function iw(u,h,y){if(y&4194240){var M=h.lanes;M&=u.pendingLanes,y|=M,h.lanes=y,fy(u,y)}}var Lp={readContext:Qr,useCallback:Fi,useContext:Fi,useEffect:Fi,useImperativeHandle:Fi,useInsertionEffect:Fi,useLayoutEffect:Fi,useMemo:Fi,useReducer:Fi,useRef:Fi,useState:Fi,useDebugValue:Fi,useDeferredValue:Fi,useTransition:Fi,useMutableSource:Fi,useSyncExternalStore:Fi,useId:Fi,unstable_isNewReconciler:!1},cF={readContext:Qr,useCallback:function(u,h){return wo().memoizedState=[u,h===void 0?null:h],u},useContext:Qr,useEffect:Ny,useImperativeHandle:function(u,h,y){return y=y!=null?y.concat([u]):null,Bp(4194308,4,KE.bind(null,h,u),y)},useLayoutEffect:function(u,h){return Bp(4194308,4,u,h)},useInsertionEffect:function(u,h){return Bp(4,2,u,h)},useMemo:function(u,h){var y=wo();return h=h===void 0?null:h,u=u(),y.memoizedState=[u,h],u},useReducer:function(u,h,y){var M=wo();return h=y!==void 0?y(h):h,M.memoizedState=M.baseState=h,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:h},M.queue=u,u=u.dispatch=aF.bind(null,Vn,u),[M.memoizedState,u]},useRef:function(u){var h=wo();return u={current:u},h.memoizedState=u},useState:Fy,useDebugValue:Uy,useDeferredValue:function(u){var h=Fy(u),y=h[0],M=h[1];return Ny(function(){var T=es.transition;es.transition={};try{M(u)}finally{es.transition=T}},[u]),y},useTransition:function(){var u=Fy(!1),h=u[0];return u=oF.bind(null,u[1]),wo().memoizedState=u,[h,u]},useMutableSource:function(){},useSyncExternalStore:function(u,h,y){var M=Vn,T=wo();if(bn){if(y===void 0)throw Error(o(407));y=y()}else{if(y=h(),ni===null)throw Error(o(349));Xc&30||GE(M,h,y)}T.memoizedState=y;var L={value:y,getSnapshot:h};return T.queue=L,Ny(WE.bind(null,M,L,u),[u]),M.flags|=2048,kf(9,VE.bind(null,M,L,y,h),void 0,null),y},useId:function(){var u=wo(),h=ni.identifierPrefix;if(bn){var y=Eo,M=Mo;y=(M&~(1<<32-pn(M)-1)).toString(32)+y,h=":"+h+"R"+y,y=Of++,0<y&&(h+="H"+y.toString(32)),h+=":"}else y=sF++,h=":"+h+"r"+y.toString(32)+":";return u.memoizedState=h},unstable_isNewReconciler:!1},uF={readContext:Qr,useCallback:ZE,useContext:Qr,useEffect:zf,useImperativeHandle:QE,useInsertionEffect:JE,useLayoutEffect:YE,useMemo:qE,useReducer:Ip,useRef:jE,useState:function(){return Ip(dl)},useDebugValue:Uy,useDeferredValue:function(u){var h=Ip(dl),y=h[0],M=h[1];return zf(function(){var T=es.transition;es.transition={};try{M(u)}finally{es.transition=T}},[u]),y},useTransition:function(){var u=Ip(dl)[0],h=eo().memoizedState;return[u,h]},useMutableSource:zE,useSyncExternalStore:HE,useId:$E,unstable_isNewReconciler:!1},fF={readContext:Qr,useCallback:ZE,useContext:Qr,useEffect:zf,useImperativeHandle:QE,useInsertionEffect:JE,useLayoutEffect:YE,useMemo:qE,useReducer:Pp,useRef:jE,useState:function(){return Pp(dl)},useDebugValue:Uy,useDeferredValue:function(u){var h=Pp(dl),y=h[0],M=h[1];return zf(function(){var T=es.transition;es.transition={};try{M(u)}finally{es.transition=T}},[u]),y},useTransition:function(){var u=Pp(dl)[0],h=eo().memoizedState;return[u,h]},useMutableSource:zE,useSyncExternalStore:HE,useId:$E,unstable_isNewReconciler:!1};function Oy(u,h){try{var y="",M=h;do y+=rF(M),M=M.return;while(M);var T=y}catch(L){T=`
3907Error generating stack: `+L.message+`
3908`+L.stack}return{value:u,source:h,stack:T}}function ky(u,h){try{console.error(h.value)}catch(y){setTimeout(function(){throw y})}}var hF=typeof WeakMap=="function"?WeakMap:Map;function rw(u,h,y){y=Ao(-1,y),y.tag=3,y.payload={element:null};var M=h.value;return y.callback=function(){Qp||(Qp=!0,ix=M),ky(u,h)},y}function sw(u,h,y){y=Ao(-1,y),y.tag=3;var M=u.type.getDerivedStateFromError;if(typeof M=="function"){var T=h.value;y.payload=function(){return M(T)},y.callback=function(){ky(u,h)}}var L=u.stateNode;return L!==null&&typeof L.componentDidCatch=="function"&&(y.callback=function(){ky(u,h),typeof M!="function"&&(la===null?la=new Set([this]):la.add(this));var K=h.stack;this.componentDidCatch(h.value,{componentStack:K!==null?K:""})}),y}function ow(u,h,y){var M=u.pingCache;if(M===null){M=u.pingCache=new hF;var T=new Set;M.set(h,T)}else T=M.get(h),T===void 0&&(T=new Set,M.set(h,T));T.has(y)||(T.add(y),u=TF.bind(null,u,h,y),h.then(u,u))}function aw(u){do{var h;if((h=u.tag===13)&&(h=u.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return u;u=u.return}while(u!==null);return null}function lw(u,h,y,M,T){return u.mode&1?(u.flags|=65536,u.lanes=T,u):(u===h?u.flags|=65536:(u.flags|=128,y.flags|=131072,y.flags&=-52805,y.tag===1&&(y.alternate===null?y.tag=17:(h=Ao(-1,1),h.tag=2,aa(y,h))),y.lanes|=1),u)}function to(u){u.flags|=4}function cw(u,h){if(u!==null&&u.child===h.child)return!0;if(h.flags&16)return!1;for(u=h.child;u!==null;){if(u.flags&12854||u.subtreeFlags&12854)return!1;u=u.sibling}return!0}var Hf,Gf,Fp,Np;if(Ze)Hf=function(u,h){for(var y=h.child;y!==null;){if(y.tag===5||y.tag===6)we(u,y.stateNode);else if(y.tag!==4&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===h)break;for(;y.sibling===null;){if(y.return===null||y.return===h)return;y=y.return}y.sibling.return=y.return,y=y.sibling}},Gf=function(){},Fp=function(u,h,y,M,T){if(u=u.memoizedProps,u!==M){var L=h.stateNode,K=$s($r.current);y=pe(L,y,u,M,T,K),(h.updateQueue=y)&&to(h)}},Np=function(u,h,y,M){y!==M&&to(h)};else if(Be){Hf=function(u,h,y,M){for(var T=h.child;T!==null;){if(T.tag===5){var L=T.stateNode;y&&M&&(L=En(L,T.type,T.memoizedProps,T)),we(u,L)}else if(T.tag===6)L=T.stateNode,y&&M&&(L=ti(L,T.memoizedProps,T)),we(u,L);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)L=T.child,L!==null&&(L.return=T),Hf(u,T,!0,!0);else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===h)break;for(;T.sibling===null;){if(T.return===null||T.return===h)return;T=T.return}T.sibling.return=T.return,T=T.sibling}};var uw=function(u,h,y,M){for(var T=h.child;T!==null;){if(T.tag===5){var L=T.stateNode;y&&M&&(L=En(L,T.type,T.memoizedProps,T)),Zt(u,L)}else if(T.tag===6)L=T.stateNode,y&&M&&(L=ti(L,T.memoizedProps,T)),Zt(u,L);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)L=T.child,L!==null&&(L.return=T),uw(u,T,!0,!0);else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===h)break;for(;T.sibling===null;){if(T.return===null||T.return===h)return;T=T.return}T.sibling.return=T.return,T=T.sibling}};Gf=function(u,h){var y=h.stateNode;if(!cw(u,h)){u=y.containerInfo;var M=zt(u);uw(M,h,!1,!1),y.pendingChildren=M,to(h),hn(u,M)}},Fp=function(u,h,y,M,T){var L=u.stateNode,K=u.memoizedProps;if((u=cw(u,h))&&K===M)h.stateNode=L;else{var he=h.stateNode,Pe=$s($r.current),Qe=null;K!==M&&(Qe=pe(he,y,K,M,T,Pe)),u&&Qe===null?h.stateNode=L:(L=st(L,Qe,y,K,M,h,u,he),Ue(L,y,M,T,Pe)&&to(h),h.stateNode=L,u?to(h):Hf(L,h,!1,!1))}},Np=function(u,h,y,M){y!==M?(u=$s(Vc.current),y=$s($r.current),h.stateNode=Ne(M,u,y,h),to(h)):h.stateNode=u.stateNode}}else Gf=function(){},Fp=function(){},Np=function(){};function Vf(u,h){if(!bn)switch(u.tailMode){case"hidden":h=u.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?u.tail=null:y.sibling=null;break;case"collapsed":y=u.tail;for(var M=null;y!==null;)y.alternate!==null&&(M=y),y=y.sibling;M===null?h||u.tail===null?u.tail=null:u.tail.sibling=null:M.sibling=null}}function Ni(u){var h=u.alternate!==null&&u.alternate.child===u.child,y=0,M=0;if(h)for(var T=u.child;T!==null;)y|=T.lanes|T.childLanes,M|=T.subtreeFlags&14680064,M|=T.flags&14680064,T.return=u,T=T.sibling;else for(T=u.child;T!==null;)y|=T.lanes|T.childLanes,M|=T.subtreeFlags,M|=T.flags,T.return=u,T=T.sibling;return u.subtreeFlags|=M,u.childLanes=y,h}function dF(u,h,y){var M=h.pendingProps;switch(Ey(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ni(h),null;case 1:return $t(h.type)&&Kn(),Ni(h),null;case 3:return M=h.stateNode,Wc(),_t(lt),_t(Ct),Py(),M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(u===null||u.child===null)&&(Df(h)?to(h):u===null||u.memoizedState.isDehydrated&&!(h.flags&256)||(h.flags|=1024,Rs!==null&&(ox(Rs),Rs=null))),Gf(u,h),Ni(h),null;case 5:by(h),y=$s(Vc.current);var T=h.type;if(u!==null&&h.stateNode!=null)Fp(u,h,T,M,y),u.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!M){if(h.stateNode===null)throw Error(o(166));return Ni(h),null}if(u=$s($r.current),Df(h)){if(!X)throw Error(o(175));u=U(h.stateNode,h.type,h.memoizedProps,y,u,h,!Bf),h.updateQueue=u,u!==null&&to(h)}else{var L=de(T,M,y,u,h);Hf(L,h,!1,!1),h.stateNode=L,Ue(L,T,M,y,u)&&to(h)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return Ni(h),null;case 6:if(u&&h.stateNode!=null)Np(u,h,u.memoizedProps,M);else{if(typeof M!="string"&&h.stateNode===null)throw Error(o(166));if(u=$s(Vc.current),y=$s($r.current),Df(h)){if(!X)throw Error(o(176));if(u=h.stateNode,M=h.memoizedProps,(y=H(u,M,h,!Bf))&&(T=Rr,T!==null))switch(L=(T.mode&1)!==0,T.tag){case 3:xe(T.stateNode.containerInfo,u,M,L);break;case 5:Se(T.type,T.memoizedProps,T.stateNode,u,M,L)}y&&to(h)}else h.stateNode=Ne(M,u,y,h)}return Ni(h),null;case 13:if(_t(Fn),M=h.memoizedState,bn&&br!==null&&h.mode&1&&!(h.flags&128)){for(u=br;u;)u=Di(u);return Hc(),h.flags|=98560,h}if(M!==null&&M.dehydrated!==null){if(M=Df(h),u===null){if(!M)throw Error(o(318));if(!X)throw Error(o(344));if(u=h.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));le(u,h)}else Hc(),!(h.flags&128)&&(h.memoizedState=null),h.flags|=4;return Ni(h),null}return Rs!==null&&(ox(Rs),Rs=null),h.flags&128?(h.lanes=y,h):(M=M!==null,y=!1,u===null?Df(h):y=u.memoizedState!==null,M&&!y&&(h.child.flags|=8192,h.mode&1&&(u===null||Fn.current&1?ci===0&&(ci=3):lx())),h.updateQueue!==null&&(h.flags|=4),Ni(h),null);case 4:return Wc(),Gf(u,h),u===null&&je(h.stateNode.containerInfo),Ni(h),null;case 10:return yy(h.type._context),Ni(h),null;case 17:return $t(h.type)&&Kn(),Ni(h),null;case 19:if(_t(Fn),T=h.memoizedState,T===null)return Ni(h),null;if(M=(h.flags&128)!==0,L=T.rendering,L===null)if(M)Vf(T,!1);else{if(ci!==0||u!==null&&u.flags&128)for(u=h.child;u!==null;){if(L=Cp(u),L!==null){for(h.flags|=128,Vf(T,!1),u=L.updateQueue,u!==null&&(h.updateQueue=u,h.flags|=4),h.subtreeFlags=0,u=y,M=h.child;M!==null;)y=M,T=u,y.flags&=14680066,L=y.alternate,L===null?(y.childLanes=0,y.lanes=T,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=L.childLanes,y.lanes=L.lanes,y.child=L.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=L.memoizedProps,y.memoizedState=L.memoizedState,y.updateQueue=L.updateQueue,y.type=L.type,T=L.dependencies,y.dependencies=T===null?null:{lanes:T.lanes,firstContext:T.firstContext}),M=M.sibling;return rt(Fn,Fn.current&1|2),h.child}u=u.sibling}T.tail!==null&&vi()>nx&&(h.flags|=128,M=!0,Vf(T,!1),h.lanes=4194304)}else{if(!M)if(u=Cp(L),u!==null){if(h.flags|=128,M=!0,u=u.updateQueue,u!==null&&(h.updateQueue=u,h.flags|=4),Vf(T,!0),T.tail===null&&T.tailMode==="hidden"&&!L.alternate&&!bn)return Ni(h),null}else 2*vi()-T.renderingStartTime>nx&&y!==1073741824&&(h.flags|=128,M=!0,Vf(T,!1),h.lanes=4194304);T.isBackwards?(L.sibling=h.child,h.child=L):(u=T.last,u!==null?u.sibling=L:h.child=L,T.last=L)}return T.tail!==null?(h=T.tail,T.rendering=h,T.tail=h.sibling,T.renderingStartTime=vi(),h.sibling=null,u=Fn.current,rt(Fn,M?u&1|2:u&1),h):(Ni(h),null);case 22:case 23:return ax(),M=h.memoizedState!==null,u!==null&&u.memoizedState!==null!==M&&(h.flags|=8192),M&&h.mode&1?Pr&1073741824&&(Ni(h),Ze&&h.subtreeFlags&6&&(h.flags|=8192)):Ni(h),null;case 24:return null;case 25:return null}throw Error(o(156,h.tag))}var pF=a.ReactCurrentOwner,Ir=!1;function Qi(u,h,y,M){h.child=u===null?OE(h,null,y,M):Gc(h,u.child,y,M)}function fw(u,h,y,M,T){y=y.render;var L=h.ref;return Oc(h,T),M=Dy(u,h,y,M,L,T),y=Ly(),u!==null&&!Ir?(h.updateQueue=u.updateQueue,h.flags&=-2053,u.lanes&=~T,To(u,h,T)):(bn&&y&&My(h),h.flags|=1,Qi(u,h,M,T),h.child)}function hw(u,h,y,M,T){if(u===null){var L=y.type;return typeof L=="function"&&!cx(L)&&L.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(h.tag=15,h.type=L,dw(u,h,L,M,T)):(u=im(y.type,null,M,h,h.mode,T),u.ref=h.ref,u.return=h,h.child=u)}if(L=u.child,!(u.lanes&T)){var K=L.memoizedProps;if(y=y.compare,y=y!==null?y:yp,y(K,M)&&u.ref===h.ref)return To(u,h,T)}return h.flags|=1,u=ha(L,M),u.ref=h.ref,u.return=h,h.child=u}function dw(u,h,y,M,T){if(u!==null&&yp(u.memoizedProps,M)&&u.ref===h.ref)if(Ir=!1,(u.lanes&T)!==0)u.flags&131072&&(Ir=!0);else return h.lanes=u.lanes,To(u,h,T);return zy(u,h,y,M,T)}function pw(u,h,y){var M=h.pendingProps,T=M.children,L=u!==null?u.memoizedState:null;if(M.mode==="hidden")if(!(h.mode&1))h.memoizedState={baseLanes:0,cachePool:null},rt(jc,Pr),Pr|=y;else if(y&1073741824)h.memoizedState={baseLanes:0,cachePool:null},M=L!==null?L.baseLanes:y,rt(jc,Pr),Pr|=M;else return u=L!==null?L.baseLanes|y:y,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:u,cachePool:null},h.updateQueue=null,rt(jc,Pr),Pr|=u,null;else L!==null?(M=L.baseLanes|y,h.memoizedState=null):M=y,rt(jc,Pr),Pr|=M;return Qi(u,h,T,y),h.child}function mw(u,h){var y=h.ref;(u===null&&y!==null||u!==null&&u.ref!==y)&&(h.flags|=512,h.flags|=2097152)}function zy(u,h,y,M,T){var L=$t(y)?Xt:Ct.current;return L=Ln(h,L),Oc(h,T),y=Dy(u,h,y,M,L,T),M=Ly(),u!==null&&!Ir?(h.updateQueue=u.updateQueue,h.flags&=-2053,u.lanes&=~T,To(u,h,T)):(bn&&M&&My(h),h.flags|=1,Qi(u,h,y,T),h.child)}function gw(u,h,y,M,T){if($t(y)){var L=!0;tn(h)}else L=!1;if(Oc(h,T),h.stateNode===null)u!==null&&(u.alternate=null,h.alternate=null,h.flags|=2),IE(h,y,M),Ay(h,y,M,T),M=!0;else if(u===null){var K=h.stateNode,he=h.memoizedProps;K.props=he;var Pe=K.context,Qe=y.contextType;typeof Qe=="object"&&Qe!==null?Qe=Qr(Qe):(Qe=$t(y)?Xt:Ct.current,Qe=Ln(h,Qe));var gt=y.getDerivedStateFromProps,It=typeof gt=="function"||typeof K.getSnapshotBeforeUpdate=="function";It||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(he!==M||Pe!==Qe)&&PE(h,K,M,Qe),oa=!1;var wt=h.memoizedState;K.state=wt,Ap(h,M,K,T),Pe=h.memoizedState,he!==M||wt!==Pe||lt.current||oa?(typeof gt=="function"&&(Sy(h,y,gt,M),Pe=h.memoizedState),(he=oa||bE(h,y,he,M,wt,Pe,Qe))?(It||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount()),typeof K.componentDidMount=="function"&&(h.flags|=4194308)):(typeof K.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=M,h.memoizedState=Pe),K.props=M,K.state=Pe,K.context=Qe,M=he):(typeof K.componentDidMount=="function"&&(h.flags|=4194308),M=!1)}else{K=h.stateNode,wE(u,h),he=h.memoizedProps,Qe=h.type===h.elementType?he:Cs(h.type,he),K.props=Qe,It=h.pendingProps,wt=K.context,Pe=y.contextType,typeof Pe=="object"&&Pe!==null?Pe=Qr(Pe):(Pe=$t(y)?Xt:Ct.current,Pe=Ln(h,Pe));var mn=y.getDerivedStateFromProps;(gt=typeof mn=="function"||typeof K.getSnapshotBeforeUpdate=="function")||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(he!==It||wt!==Pe)&&PE(h,K,M,Pe),oa=!1,wt=h.memoizedState,K.state=wt,Ap(h,M,K,T);var Mt=h.memoizedState;he!==It||wt!==Mt||lt.current||oa?(typeof mn=="function"&&(Sy(h,y,mn,M),Mt=h.memoizedState),(Qe=oa||bE(h,y,Qe,M,wt,Mt,Pe)||!1)?(gt||typeof K.UNSAFE_componentWillUpdate!="function"&&typeof K.componentWillUpdate!="function"||(typeof K.componentWillUpdate=="function"&&K.componentWillUpdate(M,Mt,Pe),t
vendor: 1,540 bytes, line 3908
3908ypeof K.UNSAFE_componentWillUpdate=="function"&&K.UNSAFE_componentWillUpdate(M,Mt,Pe)),typeof K.componentDidUpdate=="function"&&(h.flags|=4),typeof K.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof K.componentDidUpdate!="function"||he===u.memoizedProps&&wt===u.memoizedState||(h.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||he===u.memoizedProps&&wt===u.memoizedState||(h.flags|=1024),h.memoizedProps=M,h.memoizedState=Mt),K.props=M,K.state=Mt,K.context=Pe,M=Qe):(typeof K.componentDidUpdate!="function"||he===u.memoizedProps&&wt===u.memoizedState||(h.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||he===u.memoizedProps&&wt===u.memoizedState||(h.flags|=1024),M=!1)}return Hy(u,h,y,M,L,T)}function Hy(u,h,y,M,T,L){mw(u,h);var K=(h.flags&128)!==0;if(!M&&!K)return T&&Rt(h,y,!1),To(u,h,L);M=h.stateNode,pF.current=h;var he=K&&typeof y.getDerivedStateFromError!="function"?null:M.render();return h.flags|=1,u!==null&&K?(h.child=Gc(h,u.child,null,L),h.child=Gc(h,null,he,L)):Qi(u,h,he,L),h.memoizedState=M.state,T&&Rt(h,y,!0),h.child}function vw(u){var h=u.stateNode;h.pendingContext?Et(u,h.pendingContext,h.pendingContext!==h.context):h.context&&Et(u,h.context,!1),Ry(u,h.containerInfo)}function yw(u,h,y,M,T){return Hc(),Cy(T),h.flags|=256,Qi(u,h,y,M),h.child}var Up={dehydrated:null,treeContext:null,retryLane:0};function Op(u){return{baseLanes:u,cachePool:null}}function xw(u,h,y){var M=h.pendingProps,T=Fn.current,L=!1,K=(h.flags&128)!==0,he;if((he=K)||(he=u!==null&&u.memoizedState===null?!1:(T&2)!==0),he?
vendor: 93,562 bytes, lines 3908-4030
3908(L=!0,h.flags&=-129):(u===null||u.memoizedState!==null)&&(T|=1),rt(Fn,T&1),u===null)return Ty(h),u=h.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?(h.mode&1?sa(u)?h.lanes=8:h.lanes=1073741824:h.lanes=1,null):(T=M.children,u=M.fallback,L?(M=h.mode,L=h.child,T={mode:"hidden",children:T},!(M&1)&&L!==null?(L.childLanes=0,L.pendingProps=T):L=rm(T,M,0,null),u=xl(u,M,y,null),L.return=h,u.return=h,L.sibling=u,h.child=L,h.child.memoizedState=Op(y),h.memoizedState=Up,u):Gy(h,T));if(T=u.memoizedState,T!==null){if(he=T.dehydrated,he!==null){if(K)return h.flags&256?(h.flags&=-257,kp(u,h,y,Error(o(422)))):h.memoizedState!==null?(h.child=u.child,h.flags|=128,null):(L=M.fallback,T=h.mode,M=rm({mode:"visible",children:M.children},T,0,null),L=xl(L,T,y,null),L.flags|=2,M.return=h,L.return=h,M.sibling=L,h.child=M,h.mode&1&&Gc(h,u.child,null,y),h.child.memoizedState=Op(y),h.memoizedState=Up,L);if(!(h.mode&1))h=kp(u,h,y,null);else if(sa(he))h=kp(u,h,y,Error(o(419)));else if(M=(y&u.childLanes)!==0,Ir||M){if(M=ni,M!==null){switch(y&-y){case 4:L=2;break;case 16:L=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:L=32;break;case 536870912:L=268435456;break;default:L=0}M=L&(M.suspendedLanes|y)?0:L,M!==0&&M!==T.retryLane&&(T.retryLane=M,ts(u,M,-1))}lx(),h=kp(u,h,y,Error(o(421)))}else ws(he)?(h.flags|=128,h.child=u.child,h=CF.bind(null,u),Js(he,h),h=null):(y=T.treeContext,X&&(br=Nc(he),Rr=h,bn=!0,Rs=null,Bf=!1,y!==null&&(Zr[qr++]=Mo,Zr[qr++]=Eo,Zr[qr++]=fl,Mo=y.id,Eo=y.overflow,fl=h)),h=Gy(h,h.pendingProps.children),h.flags|=4096);return h}return L?(M=Sw(u,h,M.children,M.fallback,y),L=h.child,T=u.child.memoizedState,L.memoizedState=T===null?Op(y):{baseLanes:T.baseLanes|y,cachePool:null},L.childLanes=u.childLanes&~y,h.memoizedState=Up,M):(y=_w(u,h,M.children,y),h.memoizedState=null,y)}return L?(M=Sw(u,h,M.children,M.fallback,y),L=h.child,T=u.child.memoizedState,L.memoizedState=T===null?Op(y):{baseLanes:T.baseLanes|y,cachePool:null},L.childLanes=u.childLanes&~y,h.memoizedState=Up,M):(y=_w(u,h,M.children,y),h.memoizedState=null,y)}function Gy(u,h){return h=rm({mode:"visible",children:h},u.mode,0,null),h.return=u,u.child=h}function _w(u,h,y,M){var T=u.child;return u=T.sibling,y=ha(T,{mode:"visible",children:y}),!(h.mode&1)&&(y.lanes=M),y.return=h,y.sibling=null,u!==null&&(M=h.deletions,M===null?(h.deletions=[u],h.flags|=16):M.push(u)),h.child=y}function Sw(u,h,y,M,T){var L=h.mode;u=u.child;var K=u.sibling,he={mode:"hidden",children:y};return!(L&1)&&h.child!==u?(y=h.child,y.childLanes=0,y.pendingProps=he,h.deletions=null):(y=ha(u,he),y.subtreeFlags=u.subtreeFlags&14680064),K!==null?M=ha(K,M):(M=xl(M,L,T,null),M.flags|=2),M.return=h,y.return=h,y.sibling=M,h.child=y,M}function kp(u,h,y,M){return M!==null&&Cy(M),Gc(h,u.child,null,y),u=Gy(h,h.pendingProps.children),u.flags|=2,h.memoizedState=null,u}function Aw(u,h,y){u.lanes|=h;var M=u.alternate;M!==null&&(M.lanes|=h),xy(u.return,h,y)}function Vy(u,h,y,M,T){var L=u.memoizedState;L===null?u.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:M,tail:y,tailMode:T}:(L.isBackwards=h,L.rendering=null,L.renderingStartTime=0,L.last=M,L.tail=y,L.tailMode=T)}function Mw(u,h,y){var M=h.pendingProps,T=M.revealOrder,L=M.tail;if(Qi(u,h,M.children,y),M=Fn.current,M&2)M=M&1|2,h.flags|=128;else{if(u!==null&&u.flags&128)e:for(u=h.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Aw(u,y,h);else if(u.tag===19)Aw(u,y,h);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===h)break e;for(;u.sibling===null;){if(u.return===null||u.return===h)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}M&=1}if(rt(Fn,M),!(h.mode&1))h.memoizedState=null;else switch(T){case"forwards":for(y=h.child,T=null;y!==null;)u=y.alternate,u!==null&&Cp(u)===null&&(T=y),y=y.sibling;y=T,y===null?(T=h.child,h.child=null):(T=y.sibling,y.sibling=null),Vy(h,!1,T,y,L);break;case"backwards":for(y=null,T=h.child,h.child=null;T!==null;){if(u=T.alternate,u!==null&&Cp(u)===null){h.child=T;break}u=T.sibling,T.sibling=y,y=T,T=u}Vy(h,!0,y,null,L);break;case"together":Vy(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function To(u,h,y){if(u!==null&&(h.dependencies=u.dependencies),Jc|=h.lanes,!(y&h.childLanes))return null;if(u!==null&&h.child!==u.child)throw Error(o(153));if(h.child!==null){for(u=h.child,y=ha(u,u.pendingProps),h.child=y,y.return=h;u.sibling!==null;)u=u.sibling,y=y.sibling=ha(u,u.pendingProps),y.return=h;y.sibling=null}return h.child}function mF(u,h,y){switch(h.tag){case 3:vw(h),Hc();break;case 5:kE(h);break;case 1:$t(h.type)&&tn(h);break;case 4:Ry(h,h.stateNode.containerInfo);break;case 10:EE(h,h.type._context,h.memoizedProps.value);break;case 13:var M=h.memoizedState;if(M!==null)return M.dehydrated!==null?(rt(Fn,Fn.current&1),h.flags|=128,null):y&h.child.childLanes?xw(u,h,y):(rt(Fn,Fn.current&1),u=To(u,h,y),u!==null?u.sibling:null);rt(Fn,Fn.current&1);break;case 19:if(M=(y&h.childLanes)!==0,u.flags&128){if(M)return Mw(u,h,y);h.flags|=128}var T=h.memoizedState;if(T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),rt(Fn,Fn.current),M)break;return null;case 22:case 23:return h.lanes=0,pw(u,h,y)}return To(u,h,y)}function gF(u,h){switch(Ey(h),h.tag){case 1:return $t(h.type)&&Kn(),u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 3:return Wc(),_t(lt),_t(Ct),Py(),u=h.flags,u&65536&&!(u&128)?(h.flags=u&-65537|128,h):null;case 5:return by(h),null;case 13:if(_t(Fn),u=h.memoizedState,u!==null&&u.dehydrated!==null){if(h.alternate===null)throw Error(o(340));Hc()}return u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 19:return _t(Fn),null;case 4:return Wc(),null;case 10:return yy(h.type._context),null;case 22:case 23:return ax(),null;case 24:return null;default:return null}}var zp=!1,pl=!1,vF=typeof WeakSet=="function"?WeakSet:Set,it=null;function Hp(u,h){var y=u.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(M){ur(u,h,M)}else y.current=null}function Wy(u,h,y){try{y()}catch(M){ur(u,h,M)}}var Ew=!1;function yF(u,h){for(ue(u.containerInfo),it=h;it!==null;)if(u=it,h=u.child,(u.subtreeFlags&1028)!==0&&h!==null)h.return=u,it=h;else for(;it!==null;){u=it;try{var y=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var M=y.memoizedProps,T=y.memoizedState,L=u.stateNode,K=L.getSnapshotBeforeUpdate(u.elementType===u.type?M:Cs(u.type,M),T);L.__reactInternalSnapshotBeforeUpdate=K}break;case 3:Ze&&$e(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(he){ur(u,u.return,he)}if(h=u.sibling,h!==null){h.return=u.return,it=h;break}it=u.return}return y=Ew,Ew=!1,y}function ml(u,h,y){var M=h.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var T=M=M.next;do{if((T.tag&u)===u){var L=T.destroy;T.destroy=void 0,L!==void 0&&Wy(h,y,L)}T=T.next}while(T!==M)}}function Wf(u,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var y=h=h.next;do{if((y.tag&u)===u){var M=y.create;y.destroy=M()}y=y.next}while(y!==h)}}function Xy(u){var h=u.ref;if(h!==null){var y=u.stateNode;switch(u.tag){case 5:u=ie(y);break;default:u=y}typeof h=="function"?h(u):h.current=u}}function ww(u,h,y){if(Ks&&typeof Ks.onCommitFiberUnmount=="function")try{Ks.onCommitFiberUnmount(gp,h)}catch{}switch(h.tag){case 0:case 11:case 14:case 15:if(u=h.updateQueue,u!==null&&(u=u.lastEffect,u!==null)){var M=u=u.next;do{var T=M,L=T.destroy;T=T.tag,L!==void 0&&(T&2||T&4)&&Wy(h,y,L),M=M.next}while(M!==u)}break;case 1:if(Hp(h,y),u=h.stateNode,typeof u.componentWillUnmount=="function")try{u.props=h.memoizedProps,u.state=h.memoizedState,u.componentWillUnmount()}catch(K){ur(h,y,K)}break;case 5:Hp(h,y);break;case 4:Ze?Pw(u,h,y):Be&&Be&&(h=h.stateNode.containerInfo,y=zt(h),Nt(h,y))}}function Tw(u,h,y){for(var M=h;;)if(ww(u,M,y),M.child===null||Ze&&M.tag===4){if(M===h)break;for(;M.sibling===null;){if(M.return===null||M.return===h)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function Cw(u){var h=u.alternate;h!==null&&(u.alternate=null,Cw(h)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(h=u.stateNode,h!==null&&Xe(h)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function Rw(u){return u.tag===5||u.tag===3||u.tag===4}function bw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||Rw(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Iw(u){if(Ze){e:{for(var h=u.return;h!==null;){if(Rw(h))break e;h=h.return}throw Error(o(160))}var y=h;switch(y.tag){case 5:h=y.stateNode,y.flags&32&&(Te(h),y.flags&=-33),y=bw(u),Jy(u,y,h);break;case 3:case 4:h=y.stateNode.containerInfo,y=bw(u),jy(u,y,h);break;default:throw Error(o(161))}}}function jy(u,h,y){var M=u.tag;if(M===5||M===6)u=u.stateNode,h?Fe(y,u,h):R(y,u);else if(M!==4&&(u=u.child,u!==null))for(jy(u,h,y),u=u.sibling;u!==null;)jy(u,h,y),u=u.sibling}function Jy(u,h,y){var M=u.tag;if(M===5||M===6)u=u.stateNode,h?ve(y,u,h):w(y,u);else if(M!==4&&(u=u.child,u!==null))for(Jy(u,h,y),u=u.sibling;u!==null;)Jy(u,h,y),u=u.sibling}function Pw(u,h,y){for(var M=h,T=!1,L,K;;){if(!T){T=M.return;e:for(;;){if(T===null)throw Error(o(160));switch(L=T.stateNode,T.tag){case 5:K=!1;break e;case 3:L=L.containerInfo,K=!0;break e;case 4:L=L.containerInfo,K=!0;break e}T=T.return}T=!0}if(M.tag===5||M.tag===6)Tw(u,M,y),K?q(L,M.stateNode):pt(L,M.stateNode);else if(M.tag===18)K?ee(L,M.stateNode):te(L,M.stateNode);else if(M.tag===4){if(M.child!==null){L=M.stateNode.containerInfo,K=!0,M.child.return=M,M=M.child;continue}}else if(ww(u,M,y),M.child!==null){M.child.return=M,M=M.child;continue}if(M===h)break;for(;M.sibling===null;){if(M.return===null||M.return===h)return;M=M.return,M.tag===4&&(T=!1)}M.sibling.return=M.return,M=M.sibling}}function Yy(u,h){if(Ze){switch(h.tag){case 0:case 11:case 14:case 15:ml(3,h,h.return),Wf(3,h),ml(5,h,h.return);return;case 1:return;case 5:var y=h.stateNode;if(y!=null){var M=h.memoizedProps;u=u!==null?u.memoizedProps:M;var T=h.type,L=h.updateQueue;h.updateQueue=null,L!==null&&fe(y,L,T,u,M,h)}return;case 6:if(h.stateNode===null)throw Error(o(162));y=h.memoizedProps,z(h.stateNode,u!==null?u.memoizedProps:y,y);return;case 3:X&&u!==null&&u.memoizedState.isDehydrated&&F(h.stateNode.containerInfo);return;case 12:return;case 13:Gp(h);return;case 19:Gp(h);return;case 17:return}throw Error(o(163))}switch(h.tag){case 0:case 11:case 14:case 15:ml(3,h,h.return),Wf(3,h),ml(5,h,h.return);return;case 12:return;case 13:Gp(h);return;case 19:Gp(h);return;case 3:X&&u!==null&&u.memoizedState.isDehydrated&&F(h.stateNode.containerInfo);break;case 22:case 23:return}e:if(Be){switch(h.tag){case 1:case 5:case 6:break e;case 3:case 4:h=h.stateNode,Nt(h.containerInfo,h.pendingChildren);break e}throw Error(o(163))}}function Gp(u){var h=u.updateQueue;if(h!==null){u.updateQueue=null;var y=u.stateNode;y===null&&(y=u.stateNode=new vF),h.forEach(function(M){var T=RF.bind(null,u,M);y.has(M)||(y.add(M),M.then(T,T))})}}function xF(u,h){for(it=h;it!==null;){h=it;var y=h.deletions;if(y!==null)for(var M=0;M<y.length;M++){var T=y[M];try{var L=u;Ze?Pw(L,T,h):Tw(L,T,h);var K=T.alternate;K!==null&&(K.return=null),T.return=null}catch(At){ur(T,h,At)}}if(y=h.child,h.subtreeFlags&12854&&y!==null)y.return=h,it=y;else for(;it!==null;){h=it;try{var he=h.flags;if(he&32&&Ze&&Te(h.stateNode),he&512){var Pe=h.alternate;if(Pe!==null){var Qe=Pe.ref;Qe!==null&&(typeof Qe=="function"?Qe(null):Qe.current=null)}}if(he&8192)switch(h.tag){case 13:if(h.memoizedState!==null){var gt=h.alternate;(gt===null||gt.memoizedState===null)&&(tx=vi())}break;case 22:var It=h.memoizedState!==null,wt=h.alternate,mn=wt!==null&&wt.memoizedState!==null;if(y=h,Ze){e:if(M=y,T=It,L=null,Ze)for(var Mt=M;;){if(Mt.tag===5){if(L===null){L=Mt;var Ui=Mt.stateNode;T?J(Ui):ae(Mt.stateNode,Mt.memoizedProps)}}else if(Mt.tag===6){if(L===null){var is=Mt.stateNode;T?He(is):Le(is,Mt.memoizedProps)}}else if((Mt.tag!==22&&Mt.tag!==23||Mt.memoizedState===null||Mt===M)&&Mt.child!==null){Mt.child.return=Mt,Mt=Mt.child;continue}if(Mt===M)break;for(;Mt.sibling===null;){if(Mt.return===null||Mt.return===M)break e;L===Mt&&(L=null),Mt=Mt.return}L===Mt&&(L=null),Mt.sibling.return=Mt.return,Mt=Mt.sibling}}if(It&&!mn&&y.mode&1){it=y;for(var Ae=y.child;Ae!==null;){for(y=it=Ae;it!==null;){M=it;var me=M.child;switch(M.tag){case 0:case 11:case 14:case 15:ml(4,M,M.return);break;case 1:Hp(M,M.return);var Ce=M.stateNode;if(typeof Ce.componentWillUnmount=="function"){var at=M.return;try{Ce.props=M.memoizedProps,Ce.state=M.memoizedState,Ce.componentWillUnmount()}catch(At){ur(M,at,At)}}break;case 5:Hp(M,M.return);break;case 22:if(M.memoizedState!==null){Lw(y);continue}}me!==null?(me.return=M,it=me):Lw(y)}Ae=Ae.sibling}}}switch(he&4102){case 2:Iw(h),h.flags&=-3;break;case 6:Iw(h),h.flags&=-3,Yy(h.alternate,h);break;case 4096:h.flags&=-4097;break;case 4100:h.flags&=-4097,Yy(h.alternate,h);break;case 4:Yy(h.alternate,h)}}catch(At){ur(h,h.return,At)}if(y=h.sibling,y!==null){y.return=h.return,it=y;break}it=h.return}}}function _F(u,h,y){it=u,Bw(u)}function Bw(u,h,y){for(var M=(u.mode&1)!==0;it!==null;){var T=it,L=T.child;if(T.tag===22&&M){var K=T.memoizedState!==null||zp;if(!K){var he=T.alternate,Pe=he!==null&&he.memoizedState!==null||pl;he=zp;var Qe=pl;if(zp=K,(pl=Pe)&&!Qe)for(it=T;it!==null;)K=it,Pe=K.child,K.tag===22&&K.memoizedState!==null?Fw(T):Pe!==null?(Pe.return=K,it=Pe):Fw(T);for(;L!==null;)it=L,Bw(L),L=L.sibling;it=T,zp=he,pl=Qe}Dw(u)}else T.subtreeFlags&8772&&L!==null?(L.return=T,it=L):Dw(u)}}function Dw(u){for(;it!==null;){var h=it;if(h.flags&8772){var y=h.alternate;try{if(h.flags&8772)switch(h.tag){case 0:case 11:case 15:pl||Wf(5,h);break;case 1:var M=h.stateNode;if(h.flags&4&&!pl)if(y===null)M.componentDidMount();else{var T=h.elementType===h.type?y.memoizedProps:Cs(h.type,y.memoizedProps);M.componentDidUpdate(T,y.memoizedState,M.__reactInternalSnapshotBeforeUpdate)}var L=h.updateQueue;L!==null&&CE(h,L,M);break;case 3:var K=h.updateQueue;if(K!==null){if(y=null,h.child!==null)switch(h.child.tag){case 5:y=ie(h.child.stateNode);break;case 1:y=h.child.stateNode}CE(h,K,y)}break;case 5:var he=h.stateNode;y===null&&h.flags&4&&Q(he,h.type,h.memoizedProps,h);break;case 6:break;case 4:break;case 12:break;case 13:if(X&&h.memoizedState===null){var Pe=h.alternate;if(Pe!==null){var Qe=Pe.memoizedState;if(Qe!==null){var gt=Qe.dehydrated;gt!==null&&V(gt)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(o(163))}pl||h.flags&512&&Xy(h)}catch(It){ur(h,h.return,It)}}if(h===u){it=null;break}if(y=h.sibling,y!==null){y.return=h.return,it=y;break}it=h.return}}function Lw(u){for(;it!==null;){var h=it;if(h===u){it=null;break}var y=h.sibling;if(y!==null){y.return=h.return,it=y;break}it=h.return}}function Fw(u){for(;it!==null;){var h=it;try{switch(h.tag){case 0:case 11:case 15:var y=h.return;try{Wf(4,h)}catch(Pe){ur(h,y,Pe)}break;case 1:var M=h.stateNode;if(typeof M.componentDidMount=="function"){var T=h.return;try{M.componentDidMount()}catch(Pe){ur(h,T,Pe)}}var L=h.return;try{Xy(h)}catch(Pe){ur(h,L,Pe)}break;case 5:var K=h.return;try{Xy(h)}catch(Pe){ur(h,K,Pe)}}}catch(Pe){ur(h,h.return,Pe)}if(h===u){it=null;break}var he=h.sibling;if(he!==null){he.return=h.return,it=he;break}it=h.return}}var Vp=0,Wp=1,Xp=2,jp=3,Jp=4;if(typeof Symbol=="function"&&Symbol.for){var Xf=Symbol.for;Vp=Xf("selector.component"),Wp=Xf("selector.has_pseudo_class"),Xp=Xf("selector.role"),jp=Xf("selector.test_id"),Jp=Xf("selector.text")}function Ky(u){var h=We(u);if(h!=null){if(typeof h.memoizedProps["data-testname"]!="string")throw Error(o(364));return h}if(u=k(u),u===null)throw Error(o(362));return u.stateNode.current}function Qy(u,h){switch(h.$$typeof){case Vp:if(u.type===h.value)return!0;break;case Wp:e:{h=h.value,u=[u,0];for(var y=0;y<u.length;){var M=u[y++],T=u[y++],L=h[T];if(M.tag!==5||!De(M)){for(;L!=null&&Qy(M,L);)T++,L=h[T];if(T===h.length){h=!0;break e}else for(M=M.child;M!==null;)u.push(M,T),M=M.sibling}}h=!1}return h;case Xp:if(u.tag===5&&Re(u.stateNode,h.value))return!0;break;case Jp:if((u.tag===5||u.tag===6)&&(u=Ie(u),u!==null&&0<=u.indexOf(h.value)))return!0;break;case jp:if(u.tag===5&&(u=u.memoizedProps["data-testname"],typeof u=="string"&&u.toLowerCase()===h.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Zy(u){switch(u.$$typeof){case Vp:return"<"+(P(u.value)||"Unknown")+">";case Wp:return":has("+(Zy(u)||"")+")";case Xp:return'[role="'+u.value+'"]';case Jp:return'"'+u.value+'"';case jp:return'[data-testname="'+u.value+'"]';default:throw Error(o(365))}}function Nw(u,h){var y=[];u=[u,0];for(var M=0;M<u.length;){var T=u[M++],L=u[M++],K=h[L];if(T.tag!==5||!De(T)){for(;K!=null&&Qy(T,K);)L++,K=h[L];if(L===h.length)y.push(T);else for(T=T.child;T!==null;)u.push(T,L),T=T.sibling}}return y}function qy(u,h){if(!j)throw Error(o(363));u=Ky(u),u=Nw(u,h),h=[],u=Array.from(u);for(var y=0;y<u.length;){var M=u[y++];if(M.tag===5)De(M)||h.push(M.stateNode);else for(M=M.child;M!==null;)u.push(M),M=M.sibling}return h}var SF=Math.ceil,Yp=a.ReactCurrentDispatcher,$y=a.ReactCurrentOwner,Qn=a.ReactCurrentBatchConfig,Wt=0,ni=null,ii=null,Ci=0,Pr=0,jc=St(0),ci=0,jf=null,Jc=0,Kp=0,ex=0,Jf=null,lr=null,tx=0,nx=1/0;function Yc(){nx=vi()+500}var Qp=!1,ix=null,la=null,Zp=!1,ca=null,qp=0,Yf=0,rx=null,$p=-1,em=0;function Zi(){return Wt&6?vi():$p!==-1?$p:$p=vi()}function ua(u){return u.mode&1?Wt&2&&Ci!==0?Ci&-Ci:iF.transition!==null?(em===0&&(u=dp,dp<<=1,!(dp&4194240)&&(dp=64),em=u),em):(u=on,u!==0?u:Ve()):1}function ts(u,h,y){if(50<Yf)throw Yf=0,rx=null,Error(o(185));var M=tm(u,h);return M===null?null:(Pf(M,h,y),(!(Wt&2)||M!==ni)&&(M===ni&&(!(Wt&2)&&(Kp|=h),ci===4&&fa(M,Ci)),cr(M,y),h===1&&Wt===0&&!(u.mode&1)&&(Yc(),vp&&Zs())),M)}function tm(u,h){u.lanes|=h;var y=u.alternate;for(y!==null&&(y.lanes|=h),y=u,u=u.return;u!==null;)u.childLanes|=h,y=u.alternate,y!==null&&(y.childLanes|=h),y=u,u=u.return;return y.tag===3?y.stateNode:null}function cr(u,h){var y=u.callbackNode;YL(u,h);var M=mp(u,u===ni?Ci:0);if(M===0)y!==null&&AE(y),u.callbackNode=null,u.callbackPriority=0;else if(h=M&-M,u.callbackPriority!==h){if(y!=null&&AE(y),h===1)u.tag===0?nF(Ow.bind(null,u)):ME(Ow.bind(null,u)),ht?et(function(){Wt===0&&Zs()}):hy(dy,Zs),y=null;else{switch(SE(M)){case 1:y=dy;break;case 4:y=qL;break;case 16:y=py;break;case 536870912:y=$L;break;default:y=py}y=Jw(y,Uw.bind(null,u))}u.callbackPriority=h,u.callbackNode=y}}function Uw(u,h){if($p=-1,em=0,Wt&6)throw Error(o(327));var y=u.callbackNode;if(yl()&&u.callbackNode!==y)return null;var M=mp(u,u===ni?Ci:0);if(M===0)return null;if(M&30||M&u.expiredLanes||h)h=nm(u,M);else{h=M;var T=Wt;Wt|=2;var L=Hw();(ni!==u||Ci!==h)&&(Yc(),gl(u,h));do try{EF();break}catch(he){zw(u,he)}while(!0);vy(),Yp.current=L,Wt=T,ii!==null?h=0:(ni=null,Ci=0,h=ci)}if(h!==0){if(h===2&&(T=cy(u),T!==0&&(M=T,h=sx(u,T))),h===1)throw y=jf,gl(u,0),fa(u,M),cr(u,vi()),y;if(h===6)fa(u,M);else{if(T=u.current.alternate,!(M&30)&&!AF(T)&&(h=nm(u,M),h===2&&(L=cy(u),L!==0&&(M=L,h=sx(u,L))),h===1))throw y=jf,gl(u,0),fa(u,M),cr(u,vi()),y;switch(u.finishedWork=T,u.finishedLanes=M,h){case 0:case 1:throw Error(o(345));case 2:vl(u,lr);break;case 3:if(fa(u,M),(M&130023424)===M&&(h=tx+500-vi(),10<h)){if(mp(u,0)!==0)break;if(T=u.suspendedLanes,(T&M)!==M){Zi(),u.pingedLanes|=u.suspendedLanes&T;break}u.timeoutHandle=ke(vl.bind(null,u,lr),h);break}vl(u,lr);break;case 4:if(fa(u,M),(M&4194240)===M)break;for(h=u.eventTimes,T=-1;0<M;){var K=31-pn(M);L=1<<K,K=h[K],K>T&&(T=K),M&=~L}if(M=T,M=vi()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*SF(M/1960))-M,10<M){u.timeoutHandle=ke(vl.bind(null,u,lr),M);break}vl(u,lr);break;case 5:vl(u,lr);break;default:throw Error(o(329))}}}return cr(u,vi()),u.callbackNode===y?Uw.bind(null,u):null}function sx(u,h){var y=Jf;return u.current.memoizedState.isDehydrated&&(gl(u,h).flags|=256),u=nm(u,h),u!==2&&(h=lr,lr=y,h!==null&&ox(h)),u}function ox(u){lr===null?lr=u:lr.push.apply(lr,u)}function AF(u){for(var h=u;;){if(h.flags&16384){var y=h.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var M=0;M<y.length;M++){var T=y[M],L=T.getSnapshot;T=T.value;try{if(!Qs(L(),T))return!1}catch{return!1}}}if(y=h.child,h.subtreeFlags&16384&&y!==null)y.return=h,h=y;else{if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function fa(u,h){for(h&=~ex,h&=~Kp,u.suspendedLanes|=h,u.pingedLanes&=~h,u=u.expirationTimes;0<h;){var y=31-pn(h),M=1<<y;u[y]=-1,h&=~M}}function Ow(u){if(Wt&6)throw Error(o(327));yl();var h=mp(u,0);if(!(h&1))return cr(u,vi()),null;var y=nm(u,h);if(u.tag!==0&&y===2){var M=cy(u);M!==0&&(h=M,y=sx(u,M))}if(y===1)throw y=jf,gl(u,0),fa(u,h),cr(u,vi()),y;if(y===6)throw Error(o(345));return u.finishedWork=u.current.alternate,u.finishedLanes=h,vl(u,lr),cr(u,vi()),null}function kw(u){ca!==null&&ca.tag===0&&!(Wt&6)&&yl();var h=Wt;Wt|=1;var y=Qn.transition,M=on;try{if(Qn.transition=null,on=1,u)return u()}finally{on=M,Qn.transition=y,Wt=h,!(Wt&6)&&Zs()}}function ax(){Pr=jc.current,_t(jc)}function gl(u,h){u.finishedWork=null,u.finishedLanes=0;var y=u.timeoutHandle;if(y!==vt&&(u.timeoutHandle=vt,nt(y)),ii!==null)for(y=ii.return;y!==null;){var M=y;switch(Ey(M),M.tag){case 1:M=M.type.childContextTypes,M!=null&&Kn();break;case 3:Wc(),_t(lt),_t(Ct),Py();break;case 5:by(M);break;case 4:Wc();break;case 13:_t(Fn);break;case 19:_t(Fn);break;case 10:yy(M.type._context);break;case 22:case 23:ax()}y=y.return}if(ni=u,ii=u=ha(u.current,null),Ci=Pr=h,ci=0,jf=null,ex=Kp=Jc=0,lr=Jf=null,qs!==null){for(h=0;h<qs.length;h++)if(y=qs[h],M=y.interleaved,M!==null){y.interleaved=null;var T=M.next,L=y.pending;if(L!==null){var K=L.next;L.next=T,M.next=K}y.pending=M}qs=null}return u}function zw(u,h){do{var y=ii;try{if(vy(),Rp.current=Lp,bp){for(var M=Vn.memoizedState;M!==null;){var T=M.queue;T!==null&&(T.pending=null),M=M.next}bp=!1}if(Xc=0,yi=Li=Vn=null,Uf=!1,Of=0,$y.current=null,y===null||y.return===null){ci=1,jf=h,ii=null;break}e:{var L=u,K=y.return,he=y,Pe=h;if(h=Ci,he.flags|=32768,Pe!==null&&typeof Pe=="object"&&typeof Pe.then=="function"){var Qe=Pe,gt=he,It=gt.tag;if(!(gt.mode&1)&&(It===0||It===11||It===15)){var wt=gt.alternate;wt?(gt.updateQueue=wt.updateQueue,gt.memoizedState=wt.memoizedState,gt.lanes=wt.lanes):(gt.updateQueue=null,gt.memoizedState=null)}var mn=aw(K);if(mn!==null){mn.flags&=-257,lw(mn,K,he,L,h),mn.mode&1&&ow(L,Qe,h),h=mn,Pe=Qe;var Mt=h.updateQueue;if(Mt===null){var Ui=new Set;Ui.add(Pe),h.updateQueue=Ui}else Mt.add(Pe);break e}else{if(!(h&1)){ow(L,Qe,h),lx();break e}Pe=Error(o(426))}}else if(bn&&he.mode&1){var is=aw(K);if(is!==null){!(is.flags&65536)&&(is.flags|=256),lw(is,K,he,L,h),Cy(Pe);break e}}L=Pe,ci!==4&&(ci=2),Jf===null?Jf=[L]:Jf.push(L),Pe=Oy(Pe,he),he=K;do{switch(he.tag){case 3:he.flags|=65536,h&=-h,he.lanes|=h;var Ae=rw(he,Pe,h);TE(he,Ae);break e;case 1:L=Pe;var me=he.type,Ce=he.stateNode;if(!(he.flags&128)&&(typeof me.getDerivedStateFromError=="function"||Ce!==null&&typeof Ce.componentDidCatch=="function"&&(la===null||!la.has(Ce)))){he.flags|=65536,h&=-h,he.lanes|=h;var at=sw(he,L,h);TE(he,at);break e}}he=he.return}while(he!==null)}Vw(y)}catch(At){h=At,ii===y&&y!==null&&(ii=y=y.return);continue}break}while(!0)}function Hw(){var u=Yp.current;return Yp.current=Lp,u===null?Lp:u}function lx(){(ci===0||ci===3||ci===2)&&(ci=4),ni===null||!(Jc&268435455)&&!(Kp&268435455)||fa(ni,Ci)}function nm(u,h){var y=Wt;Wt|=2;var M=Hw();ni===u&&Ci===h||gl(u,h);do try{MF();break}catch(T){zw(u,T)}while(!0);if(vy(),Wt=y,Yp.current=M,ii!==null)throw Error(o(261));return ni=null,Ci=0,ci}function MF(){for(;ii!==null;)Gw(ii)}function EF(){for(;ii!==null&&!QL();)Gw(ii)}function Gw(u){var h=jw(u.alternate,u,Pr);u.memoizedProps=u.pendingProps,h===null?Vw(u):ii=h,$y.current=null}function Vw(u){var h=u;do{var y=h.alternate;if(u=h.return,h.flags&32768){if(y=gF(y,h),y!==null){y.flags&=32767,ii=y;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{ci=6,ii=null;return}}else if(y=dF(y,h,Pr),y!==null){ii=y;return}if(h=h.sibling,h!==null){ii=h;return}ii=h=u}while(h!==null);ci===0&&(ci=5)}function vl(u,h){var y=on,M=Qn.transition;try{Qn.transition=null,on=1,wF(u,h,y)}finally{Qn.transition=M,on=y}return null}function wF(u,h,y){do yl();while(ca!==null);if(Wt&6)throw Error(o(327));var M=u.finishedWork,T=u.finishedLanes;if(M===null)return null;if(u.finishedWork=null,u.finishedLanes=0,M===u.current)throw Error(o(177));u.callbackNode=null,u.callbackPriority=0;var L=M.lanes|M.childLanes;if(KL(u,L),u===ni&&(ii=ni=null,Ci=0),!(M.subtreeFlags&2064)&&!(M.flags&2064)||Zp||(Zp=!0,Jw(py,function(){return yl(),null})),L=(M.flags&15990)!==0,M.subtreeFlags&15990||L){L=Qn.transition,Qn.transition=null;var K=on;on=1;var he=Wt;Wt|=4,$y.current=null,yF(u,M),xF(u,M),oe(u.containerInfo),u.current=M,_F(M),ZL(),Wt=he,on=K,Qn.transition=L}else u.current=M;if(Zp&&(Zp=!1,ca=u,qp=T),L=u.pendingLanes,L===0&&(la=null),eF(M.stateNode),cr(u,vi()),h!==null)for(y=u.onRecoverableError,M=0;M<h.length;M++)y(h[M]);if(Qp)throw Qp=!1,u=ix,ix=null,u;return qp&1&&u.tag!==0&&yl(),L=u.pendingLanes,L&1?u===rx?Yf++:(Yf=0,rx=u):Yf=0,Zs(),null}function yl(){if(ca!==null){var u=SE(qp),h=Qn.transition,y=on;try{if(Qn.transition=null,on=16>u?16:u,ca===null)var M=!1;else{if(u=ca,ca=null,qp=0,Wt&6)throw Error(o(331));var T=Wt;for(Wt|=4,it=u.current;it!==null;){var L=it,K=L.child;if(it.flags&16){var he=L.deletions;if(he!==null){for(var Pe=0;Pe<he.length;Pe++){var Qe=he[Pe];for(it=Qe;it!==null;){var gt=it;switch(gt.tag){case 0:case 11:case 15:ml(8,gt,L)}var It=gt.child;if(It!==null)It.return=gt,it=It;else for(;it!==null;){gt=it;var wt=gt.sibling,mn=gt.return;if(Cw(gt),gt===Qe){it=null;break}if(wt!==null){wt.return=mn,it=wt;break}it=mn}}}var Mt=L.alternate;if(Mt!==null){var Ui=Mt.child;if(Ui!==null){Mt.child=null;do{var is=Ui.sibling;Ui.sibling=null,Ui=is}while(Ui!==null)}}it=L}}if(L.subtreeFlags&2064&&K!==null)K.return=L,it=K;else e:for(;it!==null;){if(L=it,L.flags&2048)switch(L.tag){case 0:case 11:case 15:ml(9,L,L.return)}var Ae=L.sibling;if(Ae!==null){Ae.return=L.return,it=Ae;break e}it=L.return}}var me=u.current;for(it=me;it!==null;){K=it;var Ce=K.child;if(K.subtreeFlags&2064&&Ce!==null)Ce.return=K,it=Ce;else e:for(K=me;it!==null;){if(he=it,he.flags&2048)try{switch(he.tag){case 0:case 11:case 15:Wf(9,he)}}catch(At){ur(he,he.return,At)}if(he===K){it=null;break e}var at=he.sibling;if(at!==null){at.return=he.return,it=at;break e}it=he.return}}if(Wt=T,Zs(),Ks&&typeof Ks.onPostCommitFiberRoot=="function")try{Ks.onPostCommitFiberRoot(gp,u)}catch{}M=!0}return M}finally{on=y,Qn.transition=h}}return!1}function Ww(u,h,y){h=Oy(y,h),h=rw(u,h,1),aa(u,h),h=Zi(),u=tm(u,1),u!==null&&(Pf(u,1,h),cr(u,h))}function ur(u,h,y){if(u.tag===3)Ww(u,u,y);else for(;h!==null;){if(h.tag===3){Ww(h,u,y);break}else if(h.tag===1){var M=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(la===null||!la.has(M))){u=Oy(y,u),u=sw(h,u,1),aa(h,u),u=Zi(),h=tm(h,1),h!==null&&(Pf(h,1,u),cr(h,u));break}}h=h.return}}function TF(u,h,y){var M=u.pingCache;M!==null&&M.delete(h),h=Zi(),u.pingedLanes|=u.suspendedLanes&y,ni===u&&(Ci&y)===y&&(ci===4||ci===3&&(Ci&130023424)===Ci&&500>vi()-tx?gl(u,0):ex|=y),cr(u,h)}function Xw(u,h){h===0&&(u.mode&1?(h=pp,pp<<=1,!(pp&130023424)&&(pp=4194304)):h=1);var y=Zi();u=tm(u,h),u!==null&&(Pf(u,h,y),cr(u,y))}function CF(u){var h=u.memoizedState,y=0;h!==null&&(y=h.retryLane),Xw(u,y)}function RF(u,h){var y=0;switch(u.tag){case 13:var M=u.stateNode,T=u.memoizedState;T!==null&&(y=T.retryLane);break;case 19:M=u.stateNode;break;default:throw Error(o(314))}M!==null&&M.delete(h),Xw(u,y)}var jw;jw=function(u,h,y){if(u!==null)if(u.memoizedProps!==h.pendingProps||lt.current)Ir=!0;else{if(!(u.lanes&y)&&!(h.flags&128))return Ir=!1,mF(u,h,y);Ir=!!(u.flags&131072)}else Ir=!1,bn&&h.flags&1048576&&BE(h,wp,h.index);switch(h.lanes=0,h.tag){case 2:var M=h.type;u!==null&&(u.alternate=null,h.alternate=null,h.flags|=2),u=h.pendingProps;var T=Ln(h,Ct.current);Oc(h,y),T=Dy(null,h,M,u,T,y);var L=Ly();return h.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,$t(M)?(L=!0,tn(h)):L=!1,h.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,_y(h),T.updater=Mp,h.stateNode=T,T._reactInternals=h,Ay(h,M,u,y),h=Hy(null,h,M,!0,L,y)):(h.tag=0,bn&&L&&My(h),Qi(null,h,T,y),h=h.child),h;case 16:M=h.elementType;e:{switch(u!==null&&(u.alternate=null,h.alternate=null,h.flags|=2),u=h.pendingProps,T=M._init,M=T(M._payload),h.type=M,T=h.tag=IF(M),u=Cs(M,u),T){case 0:h=zy(null,h,M,u,y);break e;case 1:h=gw(null,h,M,u,y);break e;case 11:h=fw(null,h,M,u,y);break e;case 14:h=hw(null,h,M,Cs(M.type,u),y);break e}throw Error(o(306,M,""))}return h;case 0:return M=h.type,T=h.pendingProps,T=h.elementType===M?T:Cs(M,T),zy(u,h,M,T,y);case 1:return M=h.type,T=h.pendingProps,T=h.elementType===M?T:Cs(M,T),gw(u,h,M,T,y);case 3:e:{if(vw(h),u===null)throw Error(o(387));M=h.pendingProps,L=h.memoizedState,T=L.element,wE(u,h),Ap(h,M,null,y);var K=h.memoizedState;if(M=K.element,X&&L.isDehydrated)if(L={element:M,isDehydrated:!1,cache:K.cache,transitions:K.transitions},h.updateQueue.baseState=L,h.memoizedState=L,h.flags&256){T=Error(o(423)),h=yw(u,h,M,y,T);break e}else if(M!==T){T=Error(o(424)),h=yw(u,h,M,y,T);break e}else for(X&&(br=_o(h.stateNode.containerInfo),Rr=h,bn=!0,Rs=null,Bf=!1),y=OE(h,null,M,y),h.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Hc(),M===T){h=To(u,h,y);break e}Qi(u,h,M,y)}h=h.child}return h;case 5:return kE(h),u===null&&Ty(h),M=h.type,T=h.pendingProps,L=u!==null?u.memoizedProps:null,K=T.children,be(M,T)?K=null:L!==null&&be(M,L)&&(h.flags|=32),mw(u,h),Qi(u,h,K,y),h.child;case 6:return u===null&&Ty(h),null;case 13:return xw(u,h,y);case 4:return Ry(h,h.stateNode.containerInfo),M=h.pendingProps,u===null?h.child=Gc(h,null,M,y):Qi(u,h,M,y),h.child;case 11:return M=h.type,T=h.pendingProps,T=h.elementType===M?T:Cs(M,T),fw(u,h,M,T,y);case 7:return Qi(u,h,h.pendingProps,y),h.child;case 8:return Qi(u,h,h.pendingProps.children,y),h.child;case 12:return Qi(u,h,h.pendingProps.children,y),h.child;case 10:e:{if(M=h.type._context,T=h.pendingProps,L=h.memoizedProps,K=T.value,EE(h,M,K),L!==null)if(Qs(L.value,K)){if(L.children===T.children&&!lt.current){h=To(u,h,y);break e}}else for(L=h.child,L!==null&&(L.return=h);L!==null;){var he=L.dependencies;if(he!==null){K=L.child;for(var Pe=he.firstContext;Pe!==null;){if(Pe.context===M){if(L.tag===1){Pe=Ao(-1,y&-y),Pe.tag=2;var Qe=L.updateQueue;if(Qe!==null){Qe=Qe.shared;var gt=Qe.pending;gt===null?Pe.next=Pe:(Pe.next=gt.next,gt.next=Pe),Qe.pending=Pe}}L.lanes|=y,Pe=L.alternate,Pe!==null&&(Pe.lanes|=y),xy(L.return,y,h),he.lanes|=y;break}Pe=Pe.next}}else if(L.tag===10)K=L.type===h.type?null:L.child;else if(L.tag===18){if(K=L.return,K===null)throw Error(o(341));K.lanes|=y,he=K.alternate,he!==null&&(he.lanes|=y),xy(K,y,h),K=L.sibling}else K=L.child;if(K!==null)K.return=L;else for(K=L;K!==null;){if(K===h){K=null;break}if(L=K.sibling,L!==null){L.return=K.return,K=L;break}K=K.return}L=K}Qi(u,h,T.children,y),h=h.child}return h;case 9:return T=h.type,M=h.pendingProps.children,Oc(h,y),T=Qr(T),M=M(T),h.flags|=1,Qi(u,h,M,y),h.child;case 14:return M=h.type,T=Cs(M,h.pendingProps),T=Cs(M.type,T),hw(u,h,M,T,y);case 15:return dw(u,h,h.type,h.pendingProps,y);case 17:return M=h.type,T=h.pendingProps,T=h.elementType===M?T:Cs(M,T),u!==null&&(u.alternate=null,h.alternate=null,h.flags|=2),h.tag=1,$t(M)?(u=!0,tn(h)):u=!1,Oc(h,y),IE(h,M,T),Ay(h,M,T,y),Hy(null,h,M,!0,u,y);case 19:return Mw(u,h,y);case 22:return pw(u,h,y)}throw Error(o(156,h.tag))};function Jw(u,h){return hy(u,h)}function bF(u,h,y,M){this.tag=u,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,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 ns(u,h,y,M){return new bF(u,h,y,M)}function cx(u){return u=u.prototype,!(!u||!u.isReactComponent)}function IF(u){if(typeof u=="function")return cx(u)?1:0;if(u!=null){if(u=u.$$typeof,u===_)return 11;if(u===S)return 14}return 2}function ha(u,h){var y=u.alternate;return y===null?(y=ns(u.tag,h,u.key,u.mode),y.elementType=u.elementType,y.type=u.type,y.stateNode=u.stateNode,y.alternate=u,u.alternate=y):(y.pendingProps=h,y.type=u.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=u.flags&14680064,y.childLanes=u.childLanes,y.lanes=u.lanes,y.child=u.child,y.memoizedProps=u.memoizedProps,y.memoizedState=u.memoizedState,y.updateQueue=u.updateQueue,h=u.dependencies,y.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},y.sibling=u.sibling,y.index=u.index,y.ref=u.ref,y}function im(u,h,y,M,T,L){var K=2;if(M=u,typeof u=="function")cx(u)&&(K=1);else if(typeof u=="string")K=5;else e:switch(u){case f:return xl(y.children,T,L,h);case d:K=8,T|=8;break;case p:return u=ns(12,y,h,T|2),u.elementType=p,u.lanes=L,u;case x:return u=ns(13,y,h,T),u.elementType=x,u.lanes=L,u;case g:return u=ns(19,y,h,T),u.elementType=g,u.lanes=L,u;case E:return rm(y,T,L,h);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case m:K=10;break e;case v:K=9;break e;case _:K=11;break e;case S:K=14;break e;case A:K=16,M=null;break e}throw Error(o(130,u==null?u:typeof u,""))}return h=ns(K,y,h,T),h.elementType=u,h.type=M,h.lanes=L,h}function xl(u,h,y,M){return u=ns(7,u,M,h),u.lanes=y,u}function rm(u,h,y,M){return u=ns(22,u,M,h),u.elementType=E,u.lanes=y,u.stateNode={},u}function ux(u,h,y){return u=ns(6,u,null,h),u.lanes=y,u}function fx(u,h,y){return h=ns(4,u.children!==null?u.children:[],u.key,h),h.lanes=y,h.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},h}function PF(u,h,y,M,T){this.tag=h,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=vt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uy(0),this.expirationTimes=uy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uy(0),this.identifierPrefix=M,this.onRecoverableError=T,X&&(this.mutableSourceEagerHydrationData=null)}function Yw(u,h,y,M,T,L,K,he,Pe){return u=new PF(u,h,y,he,Pe),h===1?(h=1,L===!0&&(h|=8)):h=0,L=ns(3,null,null,h),u.current=L,L.stateNode=u,L.memoizedState={element:M,isDehydrated:y,cache:null,transitions:null},_y(L),u}function Kw(u){if(!u)return Ye;u=u._reactInternals;e:{if(O(u)!==u||u.tag!==1)throw Error(o(170));var h=u;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if($t(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(o(171))}if(u.tag===1){var y=u.type;if($t(y))return dn(u,y,h)}return h}function Qw(u){var h=u._reactInternals;if(h===void 0)throw typeof u.render=="function"?Error(o(188)):(u=Object.keys(u).join(","),Error(o(268,u)));return u=Y(h),u===null?null:u.stateNode}function Zw(u,h){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var y=u.retryLane;u.retryLane=y!==0&&y<h?y:h}}function hx(u,h){Zw(u,h),(u=u.alternate)&&Zw(u,h)}function BF(u){return u=Y(u),u===null?null:u.stateNode}function DF(){return null}return t.attemptContinuousHydration=function(u){if(u.tag===13){var h=Zi();ts(u,134217728,h),hx(u,134217728)}},t.attemptHydrationAtCurrentPriority=function(u){if(u.tag===13){var h=Zi(),y=ua(u);ts(u,y,h),hx(u,y)}},t.attemptSynchronousHydration=function(u){switch(u.tag){case 3:var h=u.stateNode;if(h.current.memoizedState.isDehydrated){var y=If(h.pendingLanes);y!==0&&(fy(h,y|1),cr(h,vi()),!(Wt&6)&&(Yc(),Zs()))}break;case 13:var M=Zi();kw(function(){return ts(u,1,M)}),hx(u,1)}},t.batchedUpdates=function(u,h){var y=Wt;Wt|=1;try{return u(h)}finally{Wt=y,Wt===0&&(Yc(),vp&&Zs())}},t.createComponentSelector=function(u){return{$$typeof:Vp,value:u}},t.createContainer=function(u,h,y,M,T,L,K){return Yw(u,h,!1,null,y,M,T,L,K)},t.createHasPseudoClassSelector=function(u){return{$$typeof:Wp,value:u}},t.createHydrationContainer=function(u,h,y,M,T,L,K,he,Pe){return u=Yw(y,M,!0,u,T,L,K,he,Pe),u.context=Kw(null),y=u.current,M=Zi(),T=ua(y),L=Ao(M,T),L.callback=h??null,aa(y,L),u.current.lanes=T,Pf(u,T,M),cr(u,M),u},t.createPortal=function(u,h,y){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:M==null?null:""+M,children:u,containerInfo:h,implementation:y}},t.createRoleSelector=function(u){return{$$typeof:Xp,value:u}},t.createTestNameSelector=function(u){return{$$typeof:jp,value:u}},t.createTextSelector=function(u){return{$$typeof:Jp,value:u}},t.deferredUpdates=function(u){var h=on,y=Qn.transition;try{return Qn.transition=null,on=16,u()}finally{on=h,Qn.transition=y}},t.discreteUpdates=function(u,h,y,M,T){var L=on,K=Qn.transition;try{return Qn.transition=null,on=1,u(h,y,M,T)}finally{on=L,Qn.transition=K,Wt===0&&Yc()}},t.findAllNodes=qy,t.findBoundingRects=function(u,h){if(!j)throw Error(o(363));h=qy(u,h),u=[];for(var y=0;y<h.length;y++)u.push(ge(h[y]));for(h=u.length-1;0<h;h--){y=u[h];for(var M=y.x,T=M+y.width,L=y.y,K=L+y.height,he=h-1;0<=he;he--)if(h!==he){var Pe=u[he],Qe=Pe.x,gt=Qe+Pe.width,It=Pe.y,wt=It+Pe.height;if(M>=Qe&&L>=It&&T<=gt&&K<=wt){u.splice(h,1);break}else if(M!==Qe||y.width!==Pe.width||wt<L||It>K){if(!(L!==It||y.height!==Pe.height||gt<M||Qe>T)){Qe>M&&(Pe.width+=Qe-M,Pe.x=M),gt<T&&(Pe.width=T-Qe),u.splice(h,1);break}}else{It>L&&(Pe.height+=It-L,Pe.y=L),wt<K&&(Pe.height=K-It),u.splice(h,1);break}}}return u},t.findHostInstance=Qw,t.findHostInstanceWithNoPortals=function(u){return u=B(u),u=u!==null?se(u):null,u===null?null:u.stateNode},t.findHostInstanceWithWarning=function(u){return Qw(u)},t.flushControlled=function(u){var h=Wt;Wt|=1;var y=Qn.transition,M=on;try{Qn.transition=null,on=1,u()}finally{on=M,Qn.transition=y,Wt=h,Wt===0&&(Yc(),Zs())}},t.flushPassiveEffects=yl,t.flushSync=kw,t.focusWithin=function(u,h){if(!j)throw Error(o(363));for(u=Ky(u),h=Nw(u,h),h=Array.from(h),u=0;u<h.length;){var y=h[u++];if(!De(y)){if(y.tag===5&&ft(y.stateNode))return!0;for(y=y.child;y!==null;)h.push(y),y=y.sibling}}return!1},t.getCurrentUpdatePriority=function(){return on},t.getFindAllNodesFailureDescription=function(u,h){if(!j)throw Error(o(363));var y=0,M=[];u=[Ky(u),0];for(var T=0;T<u.length;){var L=u[T++],K=u[T++],he=h[K];if((L.tag!==5||!De(L))&&(Qy(L,he)&&(M.push(Zy(he)),K++,K>y&&(y=K)),K<h.length))for(L=L.child;L!==null;)u.push(L,K),L=L.sibling}if(y<h.length){for(u=[];y<h.length;y++)u.push(Zy(h[y]));return`findAllNodes was able to match part of the selector:
3909  `+(M.join(" > ")+`
3910
3911No matching component was found for:
3912  `)+u.join(" > ")}return null},t.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return ie(u.child.stateNode);default:return u.child.stateNode}},t.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:BF,findFiberByHostInstance:u.findFiberByHostInstance||DF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(h.isDisabled||!h.supportsFiber)u=!0;else{try{gp=h.inject(u),Ks=h}catch{}u=!!h.checkDCE}}return u},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(u,h,y,M){if(!j)throw Error(o(363));u=qy(u,h);var T=N(u,y,M).disconnect;return{disconnect:function(){T()}}},t.registerMutableSourceForHydration=function(u,h){var y=h._getVersion;y=y(h._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[h,y]:u.mutableSourceEagerHydrationData.push(h,y)},t.runWithPriority=function(u,h){var y=on;try{return on=u,h()}finally{on=y}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(u,h,y,M){var T=h.current,L=Zi(),K=ua(T);return y=Kw(y),h.context===null?h.context=y:h.pendingContext=y,h=Ao(L,K),h.payload={element:u},M=M===void 0?null:M,M!==null&&(h.callback=M),aa(T,h),u=ts(T,K,L),u!==null&&Sp(u,T,K),K},t};jB.exports=uV;var fV=jB.exports;const hV=XS(fV),LM={},FM=n=>void Object.assign(LM,n);function dV(n,e){function t(f,{args:d=[],attach:p,...m},v){let _=`${f[0].toUpperCase()}${f.slice(1)}`,x;if(f==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;x=vu(g,{type:f,root:v,attach:p,primitive:!0})}else{const g=LM[_];if(!g)throw new Error(`R3F: ${_} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");x=vu(new g(...d),{type:f,root:v,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof bt?x.__r3f.attach="geometry":x instanceof Hn&&(x.__r3f.attach="material")),_!=="inject"&&I_(x,m),x}function i(f,d){let p=!1;if(d){var m,v;(m=d.__r3f)!=null&&m.attach?b_(f,d,d.__r3f.attach):d.isObject3D&&f.isObject3D&&(f.add(d),p=!0),p||(v=f.__r3f)==null||v.objects.push(d),d.__r3f||vu(d,{}),d.__r3f.parent=f,xS(d),yu(d)}}function r(f,d,p){let m=!1;if(d){var v,_;if((v=d.__r3f)!=null&&v.attach)b_(f,d,d.__r3f.attach);else if(d.isObject3D&&f.isObject3D){d.parent=f,d.dispatchEvent({type:"added"}),f.dispatchEvent({type:"childadded",child:d});const x=f.children.filter(S=>S!==d),g=x.indexOf(p);f.children=[...x.slice(0,g),d,...x.slice(g)],m=!0}m||(_=f.__r3f)==null||_.objects.push(d),d.__r3f||vu(d,{}),d.__r3f.parent=f,xS(d),yu(d)}}function s(f,d,p=!1){f&&[...f].forEach(m=>o(d,m,p))}function o(f,d,p){if(d){var m,v,_;if(d.__r3f&&(d.__r3f.parent=null),(m=f.__r3f)!=null&&m.objects&&(f.__r3f.objects=f.__r3f.objects.filter(E=>E!==d)),(v=d.__r3f)!=null&&v.attach)VR(f,d,d.__r3f.attach);else if(d.isObject3D&&f.isObject3D){var x;f.remove(d),(x=d.__r3f)!=null&&x.root&&SV(Og(d),d)}const S=(_=d.__r3f)==null?void 0:_.primitive,A=!S&&(p===void 0?d.dispose!==null:p);if(!S){var g;s((g=d.__r3f)==null?void 0:g.objects,d,A),s(d.children,d,A)}if(delete d.__r3f,A&&d.dispose&&d.type!=="Scene"){const E=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?vS.unstable_scheduleCallback(vS.unstable_IdlePriority,E):E()}yu(f)}}function a(f,d,p,m){var v;const _=(v=f.__r3f)==null?void 0:v.parent;if(!_)return;const x=t(d,p,f.__r3f.root);if(f.children){for(const g of f.children)g.__r3f&&i(x,g);f.children=f.children.filter(g=>!g.__r3f)}f.__r3f.objects.forEach(g=>i(x,g)),f.__r3f.objects=[],f.__r3f.autoRemovedBeforeAppend||o(_,f),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(_,x),x.raycast&&x.__r3f.eventCount&&Og(x).getState().internal.interaction.push(x),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=x,g.ref&&(typeof g.ref=="function"?g.ref(x):g.ref.current=x))})}const l=()=>{};return{reconciler:hV({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(f,d)=>{if(!d)return;const p=f.getState().scene;p.__r3f&&(p.__r3f.root=f,i(p,d))},removeChildFromContainer:(f,d)=>{d&&o(f.getState().scene,d)},insertInContainerBefore:(f,d,p)=>{if(!d||!p)return;const m=f.getState().scene;m.__r3f&&r(m,d,p)},getRootHostContext:()=>null,getChildHostContext:f=>f,finalizeInitialChildren(f){var d;return!!((d=f==null?void 0:f.__r3f)!=null?d:{}).handlers},prepareUpdate(f,d,p,m){var v;if(((v=f==null?void 0:f.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==f)return[!0];{const{args:x=[],children:g,...S}=m,{args:A=[],children:E,...I}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((P,D)=>P!==A[D]))return[!0];const b=tD(f,S,I,!0);return b.changes.length?[!1,b]:null}},commitUpdate(f,[d,p],m,v,_,x){d?a(f,m,_,x):I_(f,p)},commitMount(f,d,p,m){var v;const _=(v=f.__r3f)!=null?v:{};f.raycast&&_.handlers&&_.eventCount&&Og(f).getState().internal.interaction.push(f)},getPublicInstance:f=>f,prepareForCommit:()=>null,preparePortalMount:f=>vu(f.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(f){var d;const{attach:p,parent:m}=(d=f.__r3f)!=null?d:{};p&&m&&VR(m,f,p),f.isObject3D&&(f.visible=!1),yu(f)},unhideInstance(f,d){var p;const{attach:m,parent:v}=(p=f.__r3f)!=null?p:{};m&&v&&b_(v,f,m),(f.isObject3D&&d.visible==null||d.visible)&&(f.visible=!0),yu(f)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Fu.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&Sn.fun(performance.now)?performance.now:Sn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Sn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Sn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:I_}}var kR,zR;const R_=n=>"colorSpace"in n||"outputColorSpace"in n,KB=()=>{var n;return(n=LM.ColorManagement)!=null?n:null},QB=n=>n&&n.isOrthographicCamera,pV=n=>n&&n.hasOwnProperty("current"),bf=typeof window<"u"&&((kR=window.document)!=null&&kR.createElement||((zR=window.navigator)==null?void 0:zR.product)==="ReactNative")?ne.useLayoutEffect:ne.useEffect;function ZB(n){const e=ne.useRef(n);return bf(()=>void(e.current=n),[n]),e}function mV({set:n}){return bf(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class qB extends ne.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}qB.getDerivedStateFromError=()=>({error:!0});const $B="__default",HR=new Map,gV=n=>n&&!!n.memoized&&!!n.changes;function eD(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const gh=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()};function Og(n){let e=n.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const Sn={obj:n=>n===Object(n)&&!Sn.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(Sn.str(n)||Sn.num(n)||Sn.boo(n))return n===e;const s=Sn.obj(n);if(s&&i==="reference")return n===e;const o=Sn.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!Sn.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if(Sn.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function vV(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function yV(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function vu(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function yS(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const GR=/-\d+$/;function b_(n,e,t){if(Sn.str(t)){if(GR.test(t)){const s=t.replace(GR,""),{target:o,key:a}=yS(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=yS(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function VR(n,e,t){var i,r;if(Sn.str(t)){const{target:s,key:o}=yS(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function tD(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},c=!1){const f=n.__r3f,d=Object.entries(r),p=[];if(c){const v=Object.keys(l);for(let _=0;_<v.length;_++)r.hasOwnProperty(v[_])||d.unshift([v[_],$B+"remove"])}d.forEach(([v,_])=>{var x;if((x=n.__r3f)!=null&&x.primitive&&v==="object"||Sn.equ(_,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return p.push([v,_,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),p.push([v,_,!1,g]);for(const S in r){const A=r[S];S.startsWith(`${v}-`)&&p.push([S,A,!1,S.split("-")])}});const m={...r};return f!=null&&f.memoizedProps&&f!=null&&f.memoizedProps.args&&(m.args=f.memoizedProps.args),f!=null&&f.memoizedProps&&f!=null&&f.memoizedProps.attach&&(m.attach=f.memoizedProps.attach),{memoized:m,changes:p}}const xV=typeof process<"u"&&!1;function I_(n,e){var t;const i=n.__r3f,r=i==null?void 0:i.root,s=r==null||r.getState==null?void 0:r.getState(),{memoized:o,changes:a}=gV(e)?e:tD(n,e),l=i==null?void 0:i.eventCount;n.__r3f&&(n.__r3f.memoizedProps=o);for(let f=0;f<a.length;f++){let[d,p,m,v]=a[f];if(R_(n)){const S="srgb",A="srgb-linear";d==="encoding"?(d="colorSpace",p=p===3001?S:A):d==="outputEncoding"&&(d="outputColorSpace",p=p===3001?S:A)}let _=n,x=_[d];if(v.length&&(x=v.reduce((g,S)=>g[S],n),!(x&&x.set))){const[g,...S]=v.reverse();_=S.reverse().reduce((A,E)=>A[E],n),d=g}if(p===$B+"remove")if(_.constructor){let g=HR.get(_.constructor);g||(g=new _.constructor,HR.set(_.constructor,g)),p=g[d]}else p=0;if(m&&i)p?i.handlers[d]=p:delete i.handlers[d],i.eventCount=Object.keys(i.handlers).length;else if(x&&x.set&&(x.copy||x instanceof oc)){if(Array.isArray(p))x.fromArray?x.fromArray(p):x.set(...p);else if(x.copy&&p&&p.constructor&&(xV?x.constructor.name===p.constructor.name:x.constructor===p.constructor))x.copy(p);else if(p!==void 0){const g=x instanceof qe;!g&&x.setScalar?x.setScalar(p):x instanceof oc&&p instanceof oc?x.mask=p.mask:x.set(p),!KB()&&s&&!s.linear&&g&&x.convertSRGBToLinear()}}else if(_[d]=p,_[d]instanceof Qt&&_[d].format===Dn&&_[d].type===di&&s){const g=_[d];R_(g)&&R_(s.gl)?g.colorSpace=s.gl.outputColorSpace:g.encoding=s.gl.outputEncoding}yu(n)}if(i&&i.parent&&n.raycast&&l!==i.eventCount){const f=Og(n).getState().internal,d=f.interaction.indexOf(n);d>-1&&f.interaction.splice(d,1),i.eventCount&&f.interaction.push(n)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(t=n.__r3f)!=null&&t.parent&&xS(n),n}function yu(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function xS(n){n.onUpdate==null||n.onUpdate(n)}function nD(n,e){n.manual||(QB(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function dg(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function _V(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Fu.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Fu.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Fu.ContinuousEventPriority;default:return Fu.DefaultEventPriority}}function iD(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function SV(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{iD(t.capturedMap,e,i,r)})}function AV(n){function e(l){const{internal:c}=n.getState(),f=l.offsetX-c.initialClick[0],d=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(f*f+d*d))}function t(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(f=>{var d;return(d=c.__r3f)==null?void 0:d.handlers["onPointer"+f]}))}function i(l,c){const f=n.getState(),d=new Set,p=[],m=c?c(f.internal.interaction):f.internal.interaction;for(let g=0;g<m.length;g++){const S=gh(m[g]);S&&(S.raycaster.camera=void 0)}f.previousRoot||f.events.compute==null||f.events.compute(l,f);function v(g){const S=gh(g);if(!S||!S.events.enabled||S.raycaster.camera===null)return[];if(S.raycaster.camera===void 0){var A;S.events.compute==null||S.events.compute(l,S,(A=S.previousRoot)==null?void 0:A.getState()),S.raycaster.camera===void 0&&(S.raycaster.camera=null)}return S.raycaster.camera?S.raycaster.intersectObject(g,!0):[]}let _=m.flatMap(v).sort((g,S)=>{const A=gh(g.object),E=gh(S.object);return!A||!E?g.distance-S.distance:E.events.priority-A.events.priority||g.distance-S.distance}).filter(g=>{const S=dg(g);return d.has(S)?!1:(d.add(S),!0)});f.events.filter&&(_=f.events.filter(_,f));for(const g of _){let S=g.object;for(;S;){var x;(x=S.__r3f)!=null&&x.eventCount&&p.push({...g,eventObject:S}),S=S.parent}}if("pointerId"in l&&f.internal.capturedMap.has(l.pointerId))for(let g of f.internal.capturedMap.get(l.pointerId).values())d.has(dg(g.intersection))||p.push(g.intersection);return p}function r(l,c,f,d){const p=n.getState();if(l.length){const m={stopped:!1};for(const v of l){const _=gh(v.object)||p,{raycaster:x,pointer:g,camera:S,internal:A}=_,E=new G(g.x,g.y,0).unproject(S),I=C=>{var B,Y;return(B=(Y=A.capturedMap.get(C))==null?void 0:Y.has(v.eventObject))!=null?B:!1},b=C=>{const B={intersection:v,target:c.target};A.capturedMap.has(C)?A.capturedMap.get(C).set(v.eventObject,B):A.capturedMap.set(C,new Map([[v.eventObject,B]])),c.target.setPointerCapture(C)},P=C=>{const B=A.capturedMap.get(C);B&&iD(A.capturedMap,v.eventObject,B,C)};let D={};for(let C in c){let B=c[C];typeof B!="function"&&(D[C]=B)}let O={...v,...D,pointer:g,intersections:l,stopped:m.stopped,delta:f,unprojectedPoint:E,ray:x.ray,camera:S,stopPropagation(){const C="pointerId"in c&&A.capturedMap.get(c.pointerId);if((!C||C.has(v.eventObject))&&(O.stopped=m.stopped=!0,A.hovered.size&&Array.from(A.hovered.values()).find(B=>B.eventObject===v.eventObject))){const B=l.slice(0,l.indexOf(v));s([...B,v])}},target:{hasPointerCapture:I,setPointerCapture:b,releasePointerCapture:P},currentTarget:{hasPointerCapture:I,setPointerCapture:b,releasePointerCapture:P},nativeEvent:c};if(d(O),m.stopped===!0)break}}return l}function s(l){const{internal:c}=n.getState();for(const f of c.hovered.values())if(!l.length||!l.find(d=>d.object===f.object&&d.index===f.index&&d.instanceId===f.instanceId)){const p=f.eventObject.__r3f,m=p==null?void 0:p.handlers;if(c.hovered.delete(dg(f)),p!=null&&p.eventCount){const v={...f,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function o(l,c){for(let f=0;f<c.length;f++){const d=c[f].__r3f;d==null||d.handlers.onPointerMissed==null||d.handlers.onPointerMissed(l)}}function a(l){switch(l){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return c=>{const{internal:f}=n.getState();"pointerId"in c&&f.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{f.capturedMap.has(c.pointerId)&&(f.capturedMap.delete(c.pointerId),s([]))})}}return function(f){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=f;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=i(f,m?t:void 0),g=v?e(f):0;l==="onPointerDown"&&(p.initialClick=[f.offsetX,f.offsetY],p.initialHits=x.map(A=>A.eventObject)),v&&!x.length&&g<=2&&(o(f,p.interaction),d&&d(f)),m&&s(x);function S(A){const E=A.eventObject,I=E.__r3f,b=I==null?void 0:I.handlers;if(I!=null&&I.eventCount)if(m){if(b.onPointerOver||b.onPointerEnter||b.onPointerOut||b.onPointerLeave){const P=dg(A),D=p.hovered.get(P);D?D.stopped&&A.stopPropagation():(p.hovered.set(P,A),b.onPointerOver==null||b.onPointerOver(A),b.onPointerEnter==null||b.onPointerEnter(A))}b.onPointerMove==null||b.onPointerMove(A)}else{const P=b[l];P?(!v||p.initialHits.includes(E))&&(o(f,p.interaction.filter(D=>!p.initialHits.includes(D))),P(A)):v&&p.initialHits.includes(E)&&o(f,p.interaction.filter(D=>!p.initialHits.includes(D)))}}r(x,f,g,S)}}return{handlePointer:a}}const MV=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],rD=n=>!!(n!=null&&n.render),NM=ne.createContext(null),EV=(n,e)=>{const t=DM((a,l)=>{const c=new G,f=new G,d=new G;function p(g=l().camera,S=f,A=l().size){const{width:E,height:I,top:b,left:P}=A,D=E/I;S instanceof G?d.copy(S):d.set(...S);const O=g.getWorldPosition(c).distanceTo(d);if(QB(g))return{width:E/g.zoom,height:I/g.zoom,top:b,left:P,factor:1,distance:O,aspect:D};{const C=g.fov*Math.PI/180,B=2*Math.tan(C/2)*O,Y=B*(E/I);return{width:Y,height:B,top:b,left:P,factor:E/Y,distance:O,aspect:D}}}let m;const v=g=>a(S=>({performance:{...S.performance,current:g}})),_=new _e;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>n(l(),g),advance:(g,S)=>e(g,S,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new RM,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&v(g.performance.min),m=setTimeout(()=>v(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:g=>a(S=>({...S,events:{...S.events,...g}})),setSize:(g,S,A,E,I)=>{const b=l().camera,P={width:g,height:S,top:E||0,left:I||0,updateStyle:A};a(D=>({size:P,viewport:{...D.viewport,...p(b,f,P)}}))},setDpr:g=>a(S=>{const A=eD(g);return{viewport:{...S.viewport,dpr:A,initialDpr:S.viewport.initialDpr||A}}}),setFrameloop:(g="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,g!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:ne.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,S,A)=>{const E=l().internal;return E.priority=E.priority+(S>0?1:0),E.subscribers.push({ref:g,priority:S,store:A}),E.subscribers=E.subscribers.sort((I,b)=>I.priority-b.priority),()=>{const I=l().internal;I!=null&&I.subscribers&&(I.priority=I.priority-(S>0?1:0),I.subscribers=I.subscribers.filter(b=>b.ref!==g))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:f,set:d}=t.getState();if(l.width!==r.width||l.height!==r.height||c.dpr!==s){var p;r=l,s=c.dpr,nD(a,l),f.setPixelRatio(c.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&f.domElement instanceof HTMLCanvasElement;f.setSize(l.width,l.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let pg,wV=new Set,TV=new Set,CV=new Set;function P_(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function vh(n,e){switch(n){case"before":return P_(wV,e);case"after":return P_(TV,e);case"tail":return P_(CV,e)}}let B_,D_;function L_(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),B_=e.internal.subscribers,pg=0;pg<B_.length;pg++)D_=B_[pg],D_.ref.current(D_.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}function RV(n){let e=!1,t=!1,i,r,s;function o(c){r=requestAnimationFrame(o),e=!0,i=0,vh("before",c),t=!0;for(const d of n.values()){var f;s=d.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((f=s.gl.xr)!=null&&f.isPresenting)&&(i+=L_(c,s))}if(t=!1,vh("after",c),i===0)return vh("tail",c),e=!1,cancelAnimationFrame(r)}function a(c,f=1){var d;if(!c)return n.forEach(p=>a(p.store.getState(),f));(d=c.gl.xr)!=null&&d.isPresenting||!c.internal.active||c.frameloop==="never"||(f>1?c.internal.frames=Math.min(60,c.internal.frames+f):t?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,f=!0,d,p){if(f&&vh("before",c),d)L_(c,d,p);else for(const m of n.values())L_(c,m.store.getState());f&&vh("after",c)}return{loop:o,invalidate:a,advance:l}}function bV(n){const e=ne.useRef(null);return bf(()=>void(e.current=n.current.__r3f),[n]),e}function UM(){const n=ne.useContext(NM);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function In(n=t=>t,e){return UM()(n,e)}function ra(n,e=0){const t=UM(),i=t.getState().internal.subscribe,r=ZB(n);return bf(()=>i(r,e,t),[e,i,t]),null}const WR=new WeakMap;function sD(n,e){return function(t,...i){let r=WR.get(t);return r||(r=new t,WR.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,vV(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function _s(n,e,t,i){const r=Array.isArray(e)?e:[e],s=aV(sD(t,i),[n,...r],{equal:Sn.equ});return Array.isArray(e)?s:s[0]}_s.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return lV(sD(t),[n,...i])};_s.clear=function(n,e){const t=Array.isArray(e)?e:[e];return cV([n,...t])};const df=new Map,{invalidate:XR,advance:jR}=RV(df),{reconciler:Fd,applyProps:Oo}=dV(df,_V),pu={objects:"shallow",strict:!1},IV=(n,e)=>{const t=typeof n=="function"?n(e):n;return rD(t)?t:new oM({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function PV(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function BV(n){const e=df.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||EV(XR,jR),o=t||Fd.createContainer(s,Fu.ConcurrentRoot,null,!1,null,"",r,null);e||df.set(n,{fiber:o,store:s});let a,l=!1,c;return{configure(f={}){let{gl:d,size:p,scene:m,events:v,onCreated:_,shadows:x=!1,linear:g=!1,flat:S=!1,legacy:A=!1,orthographic:E=!1,frameloop:I="always",dpr:b=[1,2],performance:P,raycaster:D,camera:O,onPointerMissed:C}=f,B=s.getState(),Y=B.gl;B.gl||B.set({gl:Y=IV(d,n)});let $=B.raycaster;$||B.set({raycaster:$=new PM});const{params:se,...ce}=D||{};if(Sn.equ(ce,$,pu)||Oo($,{...ce}),Sn.equ(se,$.params,pu)||Oo($,{params:{...$.params,...se}}),!B.camera||B.camera===c&&!Sn.equ(c,O,pu)){c=O;const oe=O instanceof wf,de=oe?O:E?new xr(0,0,0,0,.1,1e3):new Tn(75,0,.1,1e3);oe||(de.position.z=5,O&&(Oo(de,O),("aspect"in O||"left"in O||"right"in O||"bottom"in O||"top"in O)&&(de.manual=!0,de.updateProjectionMatrix())),!B.camera&&!(O!=null&&O.rotation)&&de.lookAt(0,0,0)),B.set({camera:de}),$.camera=de}if(!B.scene){let oe;m instanceof qo?oe=m:(oe=new qo,m&&Oo(oe,m)),B.set({scene:vu(oe)})}if(!B.xr){var ie;const oe=(Ue,pe)=>{const be=s.getState();be.frameloop!=="never"&&jR(Ue,!0,be,pe)},de=()=>{const Ue=s.getState();Ue.gl.xr.enabled=Ue.gl.xr.isPresenting,Ue.gl.xr.setAnimationLoop(Ue.gl.xr.isPresenting?oe:null),Ue.gl.xr.isPresenting||XR(Ue)},we={connect(){const Ue=s.getState().gl;Ue.xr.addEventListener("sessionstart",de),Ue.xr.addEventListener("sessionend",de)},disconnect(){const Ue=s.getState().gl;Ue.xr.removeEventListener("sessionstart",de),Ue.xr.removeEventListener("sessionend",de)}};typeof((ie=Y.xr)==null?void 0:ie.addEventListener)=="function"&&we.connect(),B.set({xr:we})}if(Y.shadowMap){const oe=Y.shadowMap.enabled,de=Y.shadowMap.type;if(Y.shadowMap.enabled=!!x,Sn.boo(x))Y.shadowMap.type=Xh;else if(Sn.str(x)){var ye;const we={basic:eP,percentage:Ev,soft:Xh,variance:Fs};Y.shadowMap.type=(ye=we[x])!=null?ye:Xh}else Sn.obj(x)&&Object.assign(Y.shadowMap,x);(oe!==Y.shadowMap.enabled||de!==Y.shadowMap.type)&&(Y.shadowMap.needsUpdate=!0)}const W=KB();W&&("enabled"in W?W.enabled=!A:"legacyMode"in W&&(W.legacyMode=A)),l||Oo(Y,{outputEncoding:g?3e3:3001,toneMapping:S?Hs:zA}),B.legacy!==A&&B.set(()=>({legacy:A})),B.linear!==g&&B.set(()=>({linear:g})),B.flat!==S&&B.set(()=>({flat:S})),d&&!Sn.fun(d)&&!rD(d)&&!Sn.equ(d,Y,pu)&&Oo(Y,d),v&&!B.events.handlers&&B.set({events:v(s)});const ue=PV(n,p);return Sn.equ(ue,B.size,pu)||B.setSize(ue.width,ue.height,ue.updateStyle,ue.top,ue.left),b&&B.viewport.dpr!==eD(b)&&B.setDpr(b),B.frameloop!==I&&B.setFrameloop(I),B.onPointerMissed||B.set({onPointerMissed:C}),P&&!Sn.equ(P,B.performance,pu)&&B.set(oe=>({performance:{...oe.performance,...P}})),a=_,l=!0,this},render(f){return l||this.configure(),Fd.updateContainer(re.jsx(DV,{store:s,children:f,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){oD(n)}}}function DV({store:n,children:e,onCreated:t,rootElement:i}){return bf(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),re.jsx(NM.Provider,{value:n,children:e})}function oD(n,e){const t=df.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Fd.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),yV(r),df.delete(n)}catch{}},500)})}}function LV(n,e,t){return re.jsx(FV,{children:n,container:e,state:t},e.uuid)}function FV({state:n={},children:e,container:t}){const{events:i,size:r,...s}=n,o=UM(),[a]=ne.useState(()=>new PM),[l]=ne.useState(()=>new _e),c=ne.useCallback((d,p)=>{const m={...d};Object.keys(d).forEach(_=>{(MV.includes(_)||d[_]!==p[_]&&p[_])&&delete m[_]});let v;if(p&&r){const _=p.camera;v=d.viewport.getCurrentViewport(_,new G,r),_!==d.camera&&nD(_,r)}return{...m,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...d.events,...p==null?void 0:p.events,...i},size:{...d.size,...r},viewport:{...d.viewport,...v},...s}},[n]),[f]=ne.useState(()=>{const d=o.getState();return DM((m,v)=>({...d,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...d.events,...i},size:{...d.size,...r},...s,set:m,get:v,setEvents:_=>m(x=>({...x,events:{...x.events,..._}}))}))});return ne.useEffect(()=>{const d=o.subscribe(p=>f.setState(m=>c(p,m)));return()=>{d()}},[c]),ne.useEffect(()=>{f.setState(d=>c(o.getState(),d))},[c]),ne.useEffect(()=>()=>{f.destroy()},[]),re.jsx(re.Fragment,{children:Fd.createPortal(re.jsx(NM.Provider,{value:f,children:e}),f,null)})}Fd.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:ne.version});const F_={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 NV(n){const{handlePointer:e}=AV(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(F_).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,c]=F_[o];t.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=F_[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}function _S(n,e,t){var i,r,s,o,a;e==null&&(e=100);function l(){var f=Date.now()-o;f<e&&f>=0?i=setTimeout(l,e-f):(i=null,t||(a=n.apply(s,r),s=r=null))}var c=function(){s=this,r=arguments,o=Date.now();var f=t&&!i;return i||(i=setTimeout(l,e)),f&&(a=n.apply(s,r),s=r=null),a};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},c}_S.debounce=_S;var UV=_S;const JR=XS(UV);var OV=Object.defineProperty,kV=Object.defineProperties,zV=Object.getOwnPropertyDescriptors,YR=Object.getOwnPropertySymbols,HV=Object.prototype.hasOwnProperty,GV=Object.prototype.propertyIsEnumerable,KR=(n,e,t)=>e in n?OV(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,QR=(n,e)=>{for(var t in e||(e={}))HV.call(e,t)&&KR(n,t,e[t]);if(YR)for(var t of YR(e))GV.call(e,t)&&KR(n,t,e[t]);return n},VV=(n,e)=>kV(n,zV(e));function aD(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=n.child;for(;i;){const r=aD(i,e,t);if(r)return r;i=i.sibling}}function lD(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const OM=lD(ne.createContext(null));class cD extends ne.Component{render(){return ne.createElement(OM.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:ZR,ReactCurrentDispatcher:qR}=ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function WV(){const n=ne.useContext(OM);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=ne.useId();return ne.useMemo(()=>{for(const i of[ZR==null?void 0:ZR.current,n,n==null?void 0:n.alternate]){if(!i)continue;const r=aD(i,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[n,e])}function XV(){var n,e;const t=WV(),[i]=ne.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==OM&&!i.has(s)&&i.set(s,(e=qR==null?void 0:qR.current)==null?void 0:e.readContext(lD(s))),r=r.return}return i}function jV(){const n=XV();return ne.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>ne.createElement(e,null,ne.createElement(t.Provider,VV(QR({},i),{value:n.get(t)}))),e=>ne.createElement(cD,QR({},e))),[n])}function JV({debounce:n,scroll:e,polyfill:t,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const r=t||typeof window<"u"&&window.ResizeObserver,[s,o]=ne.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!r)return s.width=1280,s.height=800,[()=>{},s,()=>{}];const a=ne.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),l=n?typeof n=="number"?n:n.scroll:null,c=n?typeof n=="number"?n:n.resize:null,f=ne.useRef(!1);ne.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,p,m]=ne.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:S,top:A,width:E,height:I,bottom:b,right:P,x:D,y:O}=a.current.element.getBoundingClientRect(),C={left:S,top:A,width:E,height:I,bottom:b,right:P,x:D,y:O};a.current.element instanceof HTMLElement&&i&&(C.height=a.current.element.offsetHeight,C.width=a.current.element.offsetWidth),Object.freeze(C),f.current&&!ZV(a.current.lastBounds,C)&&o(a.current.lastBounds=C)};return[g,c?JR(g,c):g,l?JR(g,l):g]},[o,i,l,c]);function v(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function _(){var g;a.current.element&&(a.current.resizeObserver=new r(p),(g=a.current.resizeObserver)==null||g.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(S=>S.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const x=g=>{!g||g===a.current.element||(v(),a.current.element=g,a.current.scrollContainers=uD(g),_())};return KV(m,!!e),YV(p),ne.useEffect(()=>{v(),_()},[e,m,p]),ne.useEffect(()=>v,[]),[x,s,d]}function YV(n){ne.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function KV(n,e){ne.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function uD(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...uD(n.parentElement)]}const QV=["x","y","top","bottom","left","right","width","height"],ZV=(n,e)=>QV.every(t=>n[t]===e[t]),qV=ne.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=NV,eventSource:a,eventPrefix:l,shadows:c,linear:f,flat:d,legacy:p,orthographic:m,frameloop:v,dpr:_,performance:x,raycaster:g,camera:S,scene:A,onPointerMissed:E,onCreated:I,...b},P){ne.useMemo(()=>FM(iV),[]);const D=jV(),[O,C]=JV({scroll:!0,debounce:{scroll:50,resize:0},...i}),B=ne.useRef(null),Y=ne.useRef(null);ne.useImperativeHandle(P,()=>B.current);const $=ZB(E),[se,ce]=ne.useState(!1),[ie,ye]=ne.useState(!1);if(se)throw se;if(ie)throw ie;const W=ne.useRef(null);bf(()=>{const oe=B.current;C.width>0&&C.height>0&&oe&&(W.current||(W.current=BV(oe)),W.current.configure({gl:s,events:o,shadows:c,linear:f,flat:d,legacy:p,orthographic:m,frameloop:v,dpr:_,performance:x,raycaster:g,camera:S,scene:A,size:C,onPointerMissed:(...de)=>$.current==null?void 0:$.current(...de),onCreated:de=>{de.events.connect==null||de.events.connect(a?pV(a)?a.current:a:Y.current),l&&de.setEvents({compute:(we,Ue)=>{const pe=we[l+"X"],be=we[l+"Y"];Ue.pointer.set(pe/Ue.size.width*2-1,-(be/Ue.size.height)*2+1),Ue.raycaster.setFromCamera(Ue.pointer,Ue.camera)}}),I==null||I(de)}}),W.current.render(re.jsx(D,{children:re.jsx(qB,{set:ye,children:re.jsx(ne.Suspense,{fallback:re.jsx(mV,{set:ce}),children:e})})})))}),ne.useEffect(()=>{const oe=B.current;if(oe)return()=>oD(oe)},[]);const ue=a?"none":"auto";return re.jsx("div",{ref:Y,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:ue,...r},...b,children:re.jsx("div",{ref:O,style:{width:"100%",height:"100%"},children:re.jsx("canvas",{ref:B,style:{display:"block"},children:t})})})}),$V=ne.forwardRef(function(e,t){return re.jsx(cD,{children:re.jsx(qV,{...e,ref:t})})});function pf(){return pf=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},pf.apply(this,arguments)}const cp=new G,kM=new G,e8=new G,$R=new _e;function t8(n,e,t){const i=cp.setFromMatrixPosition(n.matrixWorld);i.project(e);const r=t.width/2,s=t.height/2;return[i.x*r+r,-(i.y*s)+s]}function n8(n,e){const t=cp.setFromMatrixPosition(n.matrixWorld),i=kM.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(e8);return r.angleTo(s)>Math.PI/2}function i8(n,e,t,i){const r=cp.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),$R.set(s.x,s.y),t.setFromCamera($R,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)<a}return!0}function r8(n,e){if(e instanceof xr)return e.zoom;if(e instanceof Tn){const t=cp.setFromMatrixPosition(n.matrixWorld),i=kM.setFromMatrixPosition(e.matrixWorld),r=e.fov*Math.PI/180,s=t.distanceTo(i);return 1/(2*Math.tan(r/2)*s)}else return 1}function s8(n,e,t){if(e instanceof Tn||e instanceof xr){const i=cp.setFromMatrixPosition(n.matrixWorld),r=kM.setFromMatrixPosition(e.matrixWorld),s=i.distanceTo(r),o=(t[1]-t[0])/(e.far-e.near),a=t[1]-o*e.far;return Math.round(o*s+a)}}const SS=n=>Math.abs(n)<1e-10?0:n;function fD(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=SS(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const o8=(n=>e=>fD(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),a8=(n=>(e,t)=>fD(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function l8(n){return n&&typeof n=="object"&&"current"in n}const c8=ne.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:f=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:v,material:_,geometry:x,zIndexRange:g=[16777271,0],calculatePosition:S=t8,as:A="div",wrapperClass:E,pointerEvents:I="auto",...b},P)=>{const{gl:D,camera:O,scene:C,size:B,raycaster:Y,events:$,viewport:se}=In(),[ce]=ne.useState(()=>document.createElement(A)),ie=ne.useRef(),ye=ne.useRef(null),W=ne.useRef(0),ue=ne.useRef([0,0]),oe=ne.useRef(null),de=ne.useRef(null),we=(a==null?void 0:a.current)||$.connected||D.domElement.parentNode,Ue=ne.useRef(null),pe=ne.useRef(!1),be=ne.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&l8(d[0]),[d]);ne.useLayoutEffect(()=>{const ut=D.domElement;d&&d==="blending"?(ut.style.zIndex=`${Math.floor(g[0]/2)}`,ut.style.position="absolute",ut.style.pointerEvents="none"):(ut.style.zIndex=null,ut.style.position=null,ut.style.pointerEvents=null)},[d]),ne.useLayoutEffect(()=>{if(ye.current){const ut=ie.current=Z2(ce);if(C.updateMatrixWorld(),f)ce.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Ze=S(ye.current,O,B);ce.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Ze[0]}px,${Ze[1]}px,0);transform-origin:0 0;`}return we&&(r?we.prepend(ce):we.appendChild(ce)),()=>{we&&we.removeChild(ce),ut.unmount()}}},[we,f]),ne.useLayoutEffect(()=>{E&&(ce.className=E)},[E]);const Ne=ne.useMemo(()=>f?{position:"absolute",top:0,left:0,width:B.width,height:B.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-B.height/2,left:-B.width/2,width:B.width,height:B.height},...t},[t,s,o,B,f]),ke=ne.useMemo(()=>({position:"absolute",pointerEvents:I}),[I]);ne.useLayoutEffect(()=>{if(pe.current=!1,f){var ut;(ut=ie.current)==null||ut.render(ne.createElement("div",{ref:oe,style:Ne},ne.createElement("div",{ref:de,style:ke},ne.createElement("div",{ref:P,className:i,style:t,children:n}))))}else{var Ze;(Ze=ie.current)==null||Ze.render(ne.createElement("div",{ref:P,style:Ne,className:i,children:n}))}});const nt=ne.useRef(!0);ra(ut=>{if(ye.current){O.updateMatrixWorld(),ye.current.updateWorldMatrix(!0,!1);const Ze=f?ue.current:S(ye.current,O,B);if(f||Math.abs(W.current-O.zoom)>e||Math.abs(ue.current[0]-Ze[0])>e||Math.abs(ue.current[1]-Ze[1])>e){const Be=n8(ye.current,O);let X=!1;be&&(Array.isArray(d)?X=d.map(Xe=>Xe.current):d!=="blending"&&(X=[C]));const We=nt.current;if(X){const Xe=i8(ye.current,O,Y,X);nt.current=Xe&&!Be}else nt.current=!Be;We!==nt.current&&(p?p(!nt.current):ce.style.display=nt.current?"block":"none");const je=Math.floor(g[0]/2),Ve=d?be?[g[0],je]:[je-1,0]:g;if(ce.style.zIndex=`${s8(ye.current,O,Ve)}`,f){const[Xe,ht]=[B.width/2,B.height/2],et=O.projectionMatrix.elements[5]*ht,{isOrthographicCamera:j,top:k,left:ge,bottom:Ie,right:De}=O,Re=o8(O.matrixWorldInverse),ft=j?`scale(${et})translate(${SS(-(De+ge)/2)}px,${SS((k+Ie)/2)}px)`:`translateZ(${et}px)`;let N=ye.current.matrixWorld;c&&(N=O.matrixWorldInverse.clone().transpose().copyPosition(N).scale(ye.current.scale),N.elements[3]=N.elements[7]=N.elements[11]=0,N.elements[15]=1),ce.style.width=B.width+"px",ce.style.height=B.height+"px",ce.style.perspective=j?"":`${et}px`,oe.current&&de.current&&(oe.current.style.transform=`${ft}${Re}translate(${Xe}px,${ht}px)`,de.current.style.transform=a8(N,1/((l||10)/400)))}else{const Xe=l===void 0?1:r8(ye.current,O)*l;ce.style.transform=`translate3d(${Ze[0]}px,${Ze[1]}px,0) scale(${Xe})`}ue.current=Ze,W.current=O.zoom}}if(!be&&Ue.current&&!pe.current)if(f){if(oe.current){const Ze=oe.current.children[0];if(Ze!=null&&Ze.clientWidth&&Ze!=null&&Ze.clientHeight){const{isOrthographicCamera:Be}=O;if(Be||x)b.scale&&(Array.isArray(b.scale)?b.scale instanceof G?Ue.current.scale.copy(b.scale.clone().divideScalar(1)):Ue.current.scale.set(1/b.scale[0],1/b.scale[1],1/b.scale[2]):Ue.current.scale.setScalar(1/b.scale));else{const X=(l||10)/400,We=Ze.clientWidth*X,je=Ze.clientHeight*X;Ue.current.scale.set(We,je,1)}pe.current=!0}}}else{const Ze=ce.children[0];if(Ze!=null&&Ze.clientWidth&&Ze!=null&&Ze.clientHeight){const Be=1/se.factor,X=Ze.clientWidth*Be,We=Ze.clientHeight*Be;Ue.current.scale.set(X,We,1),pe.current=!0}Ue.current.lookAt(ut.camera.position)}});const vt=ne.useMemo(()=>({vertexShader:f?void 0:`
3913          /*
3914            This shader is from the THREE's SpriteMaterial.
3915            We need to turn the backing plane into a Sprite
3916            (make it always face the camera) if "transfrom"
3917            is false.
3918          */
3919          #include <common>
3920
3921          void main() {
3922            vec2 center = vec2(0., 1.);
3923            float rotation = 0.0;
3924
3925            // This is somewhat arbitrary, but it seems to work well
3926            // Need to figure out how to derive this dynamically if it even matters
3927            float size = 0.03;
3928
3929            vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
3930            vec2 scale;
3931            scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
3932            scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
3933
3934            bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3935            if ( isPerspective ) scale *= - mvPosition.z;
3936
3937            vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
3938            vec2 rotatedPosition;
3939            rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3940            rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3941            mvPosition.xy += rotatedPosition;
3942
3943            gl_Position = projectionMatrix * mvPosition;
3944          }
3945      `,fragmentShader:`
3946        void main() {
3947          gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
3948        }
3949      `}),[f]);return ne.createElement("group",pf({},b,{ref:ye}),d&&!be&&ne.createElement("mesh",{castShadow:m,receiveShadow:v,ref:Ue},x||ne.createElement("planeGeometry",null),_||ne.createElement("shaderMaterial",{side:fi,vertexShader:vt.vertexShader,fragmentShader:vt.fragmentShader})))});let yh=0;const hD=DM(n=>(Lu.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-yh)/(i-yh)*100})},Lu.onLoad=()=>{n({active:!1})},Lu.onError=e=>n(t=>({errors:[...t.errors,e]})),Lu.onProgress=(e,t,i)=>{t===i&&(yh=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-yh)/(i-yh)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));let xh;function u8(){var n;if(xh!==void 0)return xh;try{let e;const t=document.createElement("canvas");return xh=!!(window.WebGL2RenderingContext&&(e=t.getContext("webgl2"))),e&&((n=e.getExtension("WEBGL_lose_context"))==null||n.loseContext()),xh}catch{return xh=!1}}const f8=parseInt(yo.replace(/\D+/g,""));function eb(n,e){if(e===PP)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===J0||e===KA){let t=n.getIndex();if(t===null){const o=[],a=n.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)o.push(l);n.setIndex(o),t=n.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),n}const i=t.count-2,r=[];if(t)if(e===J0)for(let o=1;o<=i;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(r.push(t.getX(o)),r.push(t.getX(o+1)),r.push(t.getX(o+2))):(r.push(t.getX(o+2)),r.push(t.getX(o+1)),r.push(t.getX(o)));r.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=n.clone();return s.setIndex(r),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),n}var fs=Uint8Array,Da=Uint16Array,AS=Uint32Array,dD=new fs([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]),pD=new fs([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]),h8=new fs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mD=function(n,e){for(var t=new Da(31),i=0;i<31;++i)t[i]=e+=1<<n[i-1];for(var r=new AS(t[30]),i=1;i<30;++i)for(var s=t[i];s<t[i+1];++s)r[s]=s-t[i]<<5|i;return[t,r]},gD=mD(dD,2),vD=gD[0],d8=gD[1];vD[28]=258,d8[258]=28;var p8=mD(pD,0),m8=p8[0],MS=new Da(32768);for(var Cn=0;Cn<32768;++Cn){var Ma=(Cn&43690)>>>1|(Cn&21845)<<1;Ma=(Ma&52428)>>>2|(Ma&13107)<<2,Ma=(Ma&61680)>>>4|(Ma&3855)<<4,MS[Cn]=((Ma&65280)>>>8|(Ma&255)<<8)>>>1}var ed=function(n,e,t){for(var i=n.length,r=0,s=new Da(e);r<i;++r)++s[n[r]-1];var o=new Da(e);for(r=0;r<e;++r)o[r]=o[r-1]+s[r-1]<<1;var a;if(t){a=new Da(1<<e);var l=15-e;for(r=0;r<i;++r)if(n[r])for(var c=r<<4|n[r],f=e-n[r],d=o[n[r]-1]++<<f,p=d|(1<<f)-1;d<=p;++d)a[MS[d]>>>l]=c}else for(a=new Da(i),r=0;r<i;++r)n[r]&&(a[r]=MS[o[n[r]-1]++]>>>15-n[r]);return a},up=new fs(288);for(var Cn=0;Cn<144;++Cn)up[Cn]=8;for(var Cn=144;Cn<256;++Cn)up[Cn]=9;for(var Cn=256;Cn<280;++Cn)up[Cn]=7;for(var Cn=280;Cn<288;++Cn)up[Cn]=8;var yD=new fs(32);for(var Cn=0;Cn<32;++Cn)yD[Cn]=5;var g8=ed(up,9,1),v8=ed(yD,5,1),N_=function(n){for(var e=n[0],t=1;t<n.length;++t)n[t]>e&&(e=n[t]);return e},Ds=function(n,e,t){var i=e/8|0;return(n[i]|n[i+1]<<8)>>(e&7)&t},U_=function(n,e){var t=e/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(e&7)},y8=function(n){return(n/8|0)+(n&7&&1)},x8=function(n,e,t){(t==null||t>n.length)&&(t=n.length);var i=new(n instanceof Da?Da:n instanceof AS?AS:fs)(t-e);return i.set(n.subarray(e,t)),i},_8=function(n,e,t){var i=n.length;if(!i||t&&!t.l&&i<5)return e||new fs(0);var r=!e||t,s=!t||t.i;t||(t={}),e||(e=new fs(i*3));var o=function(Ne){var ke=e.length;if(Ne>ke){var nt=new fs(Math.max(ke*2,Ne));nt.set(e),e=nt}},a=t.f||0,l=t.p||0,c=t.b||0,f=t.l,d=t.d,p=t.m,m=t.n,v=i*8;do{if(!f){t.f=a=Ds(n,l,1);var _=Ds(n,l+1,3);if(l+=3,_)if(_==1)f=g8,d=v8,p=9,m=5;else if(_==2){var A=Ds(n,l,31)+257,E=Ds(n,l+10,15)+4,I=A+Ds(n,l+5,31)+1;l+=14;for(var b=new fs(I),P=new fs(19),D=0;D<E;++D)P[h8[D]]=Ds(n,l+D*3,7);l+=E*3;for(var O=N_(P),C=(1<<O)-1,B=ed(P,O,1),D=0;D<I;){var Y=B[Ds(n,l,C)];l+=Y&15;var x=Y>>>4;if(x<16)b[D++]=x;else{var $=0,se=0;for(x==16?(se=3+Ds(n,l,3),l+=2,$=b[D-1]):x==17?(se=3+Ds(n,l,7),l+=3):x==18&&(se=11+Ds(n,l,127),l+=7);se--;)b[D++]=$}}var ce=b.subarray(0,A),ie=b.subarray(A);p=N_(ce),m=N_(ie),f=ed(ce,p,1),d=ed(ie,m,1)}else throw"invalid block type";else{var x=y8(l)+4,g=n[x-4]|n[x-3]<<8,S=x+g;if(S>i){if(s)throw"unexpected EOF";break}r&&o(c+g),e.set(n.subarray(x,S),c),t.b=c+=g,t.p=l=S*8;continue}if(l>v){if(s)throw"unexpected EOF";break}}r&&o(c+131072);for(var ye=(1<<p)-1,W=(1<<m)-1,ue=l;;ue=l){var $=f[U_(n,l)&ye],oe=$>>>4;if(l+=$&15,l>v){if(s)throw"unexpected EOF";break}if(!$)throw"invalid length/literal";if(oe<256)e[c++]=oe;else if(oe==256){ue=l,f=null;break}else{var de=oe-254;if(oe>264){var D=oe-257,we=dD[D];de=Ds(n,l,(1<<we)-1)+vD[D],l+=we}var Ue=d[U_(n,l)&W],pe=Ue>>>4;if(!Ue)throw"invalid distance";l+=Ue&15;var ie=m8[pe];if(pe>3){var we=pD[pe];ie+=U_(n,l)&(1<<we)-1,l+=we}if(l>v){if(s)throw"unexpected EOF";break}r&&o(c+131072);for(var be=c+de;c<be;c+=4)e[c]=e[c-ie],e[c+1]=e[c+1-ie],e[c+2]=e[c+2-ie],e[c+3]=e[c+3-ie];c=be}}t.l=f,t.p=ue,t.b=c,f&&(a=1,t.m=p,t.d=d,t.n=m)}while(!a);return c==e.length?e:x8(e,0,c)},S8=new fs(0),A8=function(n){if((n[0]&15)!=8||n[0]>>>4>7||(n[0]<<8|n[1])%31)throw"invalid zlib data";if(n[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function mg(n,e){return _8((A8(n),n.subarray(2,-4)),e)}var M8=typeof TextDecoder<"u"&&new TextDecoder,E8=0;try{M8.decode(S8,{stream:!0}),E8=1}catch{}const w8=n=>n&&n.isCubeTexture;class T8 extends yn{constructor(e,t){var i,r;const s=w8(e),a=((r=s?(i=e.image[0])==null?void 0:i.width:e.image.width)!=null?r:1024)/4,l=Math.floor(Math.log2(a)),c=Math.pow(2,l),f=3*Math.max(c,16*7),d=4*c,p=[s?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/f}`,`#define CUBEUV_TEXEL_HEIGHT ${1/d}`,`#define CUBEUV_MAX_MIP ${l}.0`],m=`
3950        varying vec3 vWorldPosition;
3951        void main() 
3952        {
3953            vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );
3954            vWorldPosition = worldPosition.xyz;
3955            
3956            gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
3957        }
3958        `,v=p.join(`
3959`)+`
3960        #define ENVMAP_TYPE_CUBE_UV
3961        varying vec3 vWorldPosition;
3962        uniform float radius;
3963        uniform float height;
3964        uniform float angle;
3965        #ifdef ENVMAP_TYPE_CUBE
3966            uniform samplerCube map;
3967        #else
3968            uniform sampler2D map;
3969        #endif
3970        // From: https://www.shadertoy.com/view/4tsBD7
3971        float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) 
3972        {
3973            float d = dot ( rd, n );
3974            
3975            if( d > 0.0 ) { return 1e6; }
3976            
3977            vec3  o = ro - c;
3978            float t = - dot( n, o ) / d;
3979            vec3  q = o + rd * t;
3980            
3981            return ( dot( q, q ) < r * r ) ? t : 1e6;
3982        }
3983        // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm
3984        float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) 
3985        {
3986            vec3 oc = ro - ce;
3987            float b = dot( oc, rd );
3988            float c = dot( oc, oc ) - ra * ra;
3989            float h = b * b - c;
3990            
3991            if( h < 0.0 ) { return -1.0; }
3992            
3993            h = sqrt( h );
3994            
3995            return - b + h;
3996        }
3997        vec3 project() 
3998        {
3999            vec3 p = normalize( vWorldPosition );
4000            vec3 camPos = cameraPosition;
4001            camPos.y -= height;
4002            float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );
4003            if( intersection > 0.0 ) {
4004                
4005                vec3 h = vec3( 0.0, - height, 0.0 );
4006                float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );
4007                p = ( camPos + min( intersection, intersection2 ) * p ) / radius;
4008            } else {
4009                p = vec3( 0.0, 1.0, 0.0 );
4010            }
4011            return p;
4012        }
4013        #include <common>
4014        #include <cube_uv_reflection_fragment>
4015        void main() 
4016        {
4017            vec3 projectedWorldPosition = project();
4018            
4019            #ifdef ENVMAP_TYPE_CUBE
4020                vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;
4021            #else
4022                vec3 direction = normalize( projectedWorldPosition );
4023                vec2 uv = equirectUv( direction );
4024                vec3 outcolor = texture2D( map, uv ).rgb;
4025            #endif
4026            gl_FragColor = vec4( outcolor, 1.0 );
4027            #include <tonemapping_fragment>
4028            #include <${parseInt(yo.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>
4029        }
4030        `,_={map:{value:e},height:{value:(t==null?void 0:t.height)||15},radius:{value:(t==null?void 0:t.radius)||100}},x=new rp(1,16),g=new nn({uniforms:_,fragmentShader:v,vertexShader:m,side:fi});super(x,g)}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}}var C8=Object.defineProperty,R8=(n,e,t)=>e in n?C8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tt=(n,e,t)=>(R8(n,typeof e!="symbol"?e+"":e,t),t);
4030const gg=new bc,tb=new Uo,b8=Math.cos(70*(Math.PI/180)),nb=(n,e)=>(n%e+e)%e;let I8=class extends Tr{constructor(e,t){super(),Tt(this,"object"),Tt(this,"domElement"),Tt(this,"enabled",!0),Tt(this,"target",new G),Tt(this,"minDistance",0),Tt(this,"maxDistance",1/0),Tt(this,"minZoom",0),Tt(this,"maxZoom",1/0),Tt(this,"minPolarAngle",0),Tt(this,"maxPolarAngle",Math.PI),Tt(this,"minAzimuthAngle",-1/0),Tt(this,"maxAzimuthAngle",1/0),Tt(this,"enableDamping",!1),Tt(this,"dampingFactor",.05),Tt(this,"enableZoom",!0),Tt(this,"zoomSpeed",1),Tt(this,"enableRotate",!0),Tt(this,"rotateSpeed",1),Tt(this,"enablePan",!0),Tt(this,"panSpeed",1),Tt(this,"screenSpacePanning",!0),Tt(this,"keyPanSpeed",7),Tt(this,"zoomToCursor",!1),Tt(this,"autoRotate",!1),Tt(this,"autoRotateSpeed",2),Tt(this,"reverseOrbit",!1),Tt(this,"reverseHorizontalOrbit",!1),Tt(this,"reverseVerticalOrbit",!1),Tt(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),Tt(this,"mouseButtons",{LEFT:Ul.ROTATE,MIDDLE:Ul.DOLLY,RIGHT:Ul.PAN}),Tt(this,"touches",{ONE:Ol.ROTATE,TWO:Ol.DOLLY_PAN}),Tt(this,"target0"),Tt(this,"position0"),Tt(this,"zoom0"),Tt(this,"_domElementKeyEvents",null),Tt(this,"getPolarAngle"),Tt(this,"getAzimuthalAngle"),Tt(this,"setPolarAngle"),Tt(this,"setAzimuthalAngle"),Tt(this,"getDistance"),Tt(this,"getZoomScale"),Tt(this,"listenToKeyEvents"),Tt(this,"stopListenToKeyEvents"),Tt(this,"saveState"),Tt(this,"reset"),Tt(this,"update"),Tt(this,"connect"),Tt(this,"dispose"),Tt(this,"dollyIn"),Tt(this,"dollyOut"),Tt(this,"getScale"),Tt(this,"setScale"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>f.phi,this.getAzimuthalAngle=()=>f.theta,this.setPolarAngle=q=>{let Te=nb(q,2*Math.PI),J=f.phi;J<0&&(J+=2*Math.PI),Te<0&&(Te+=2*Math.PI);let He=Math.abs(Te-J);2*Math.PI-He<He&&(Te<J?Te+=2*Math.PI:J+=2*Math.PI),d.phi=Te-J,i.update()},this.setAzimuthalAngle=q=>{let Te=nb(q,2*Math.PI),J=f.theta;J<0&&(J+=2*Math.PI),Te<0&&(Te+=2*Math.PI);let He=Math.abs(Te-J);2*Math.PI-He<He&&(Te<J?Te+=2*Math.PI:J+=2*Math.PI),d.theta=Te-J,i.update()},this.getDistance=()=>i.object.position.distanceTo(i.target),this.listenToKeyEvents=q=>{q.addEventListener("keydown",w),this._domElementKeyEvents=q},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",w),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const q=new G,Te=new G(0,1,0),J=new Ei().setFromUnitVectors(e.up,Te),He=J.clone().invert(),ae=new G,Le=new Ei,$e=2*Math.PI;return function(){const zt=i.object.position;J.setFromUnitVectors(e.up,Te),He.copy(J).invert(),q.copy(zt).sub(i.target),q.applyQuaternion(J),f.setFromVector3(q),i.autoRotate&&l===a.NONE&&se(Y()),i.enableDamping?(f.theta+=d.theta*i.dampingFactor,f.phi+=d.phi*i.dampingFactor):(f.theta+=d.theta,f.phi+=d.phi);let Zt=i.minAzimuthAngle,hn=i.maxAzimuthAngle;isFinite(Zt)&&isFinite(hn)&&(Zt<-Math.PI?Zt+=$e:Zt>Math.PI&&(Zt-=$e),hn<-Math.PI?hn+=$e:hn>Math.PI&&(hn-=$e),Zt<=hn?f.theta=Math.max(Zt,Math.min(hn,f.theta)):f.theta=f.theta>(Zt+hn)/2?Math.max(Zt,f.theta):Math.min(hn,f.theta)),f.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,f.phi)),f.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&O||i.object.isOrthographicCamera?f.radius=Ue(f.radius):f.radius=Ue(f.radius*p),q.setFromSpherical(f),q.applyQuaternion(He),zt.copy(i.target).add(q),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let Nt=!1;if(i.zoomToCursor&&O){let En=null;if(i.object instanceof Tn&&i.object.isPerspectiveCamera){const ti=q.length();En=Ue(ti*p);const Ms=ti-En;i.object.position.addScaledVector(P,Ms),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const ti=new G(D.x,D.y,0);ti.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Nt=!0;const Ms=new G(D.x,D.y,0);Ms.unproject(i.object),i.object.position.sub(Ms).add(ti),i.object.updateMatrixWorld(),En=q.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;En!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(En).add(i.object.position):(gg.origin.copy(i.object.position),gg.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(gg.direction))<b8?e.lookAt(i.target):(tb.setFromNormalAndCoplanarPoint(i.object.up,i.target),gg.intersectPlane(tb,i.target))))}else i.object instanceof xr&&i.object.isOrthographicCamera&&(Nt=p!==1,Nt&&(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix()));return p=1,O=!1,Nt||ae.distanceToSquared(i.object.position)>c||8*(1-Le.dot(i.object.quaternion))>c?(i.dispatchEvent(r),ae.copy(i.object.position),Le.copy(i.object.quaternion),Nt=!1,!0):!1}})(),this.connect=q=>{i.domElement=q,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Q),i.domElement.addEventListener("pointerdown",ge),i.domElement.addEventListener("pointercancel",De),i.domElement.addEventListener("wheel",N)},this.dispose=()=>{var q,Te,J,He,ae,Le;i.domElement&&(i.domElement.style.touchAction="auto"),(q=i.domElement)==null||q.removeEventListener("contextmenu",Q),(Te=i.domElement)==null||Te.removeEventListener("pointerdown",ge),(J=i.domElement)==null||J.removeEventListener("pointercancel",De),(He=i.domElement)==null||He.removeEventListener("wheel",N),(ae=i.domElement)==null||ae.ownerDocument.removeEventListener("pointermove",Ie),(Le=i.domElement)==null||Le.ownerDocument.removeEventListener("pointerup",De),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",w)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const c=1e-6,f=new gS,d=new gS;let p=1;const m=new G,v=new _e,_=new _e,x=new _e,g=new _e,S=new _e,A=new _e,E=new _e,I=new _e,b=new _e,P=new G,D=new _e;let O=!1;const C=[],B={};function Y(){return 2*Math.PI/60/60*i.autoRotateSpeed}function $(){return Math.pow(.95,i.zoomSpeed)}function se(q){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=q:d.theta-=q}function ce(q){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=q:d.phi-=q}const ie=(()=>{const q=new G;return function(J,He){q.setFromMatrixColumn(He,0),q.multiplyScalar(-J),m.add(q)}})(),ye=(()=>{const q=new G;return function(J,He){i.screenSpacePanning===!0?q.setFromMatrixColumn(He,1):(q.setFromMatrixColumn(He,0),q.crossVectors(i.object.up,q)),q.multiplyScalar(J),m.add(q)}})(),W=(()=>{const q=new G;return function(J,He){const ae=i.domElement;if(ae&&i.object instanceof Tn&&i.object.isPerspectiveCamera){const Le=i.object.position;q.copy(Le).sub(i.target);let $e=q.length();$e*=Math.tan(i.object.fov/2*Math.PI/180),ie(2*J*$e/ae.clientHeight,i.object.matrix),ye(2*He*$e/ae.clientHeight,i.object.matrix)}else ae&&i.object instanceof xr&&i.object.isOrthographicCamera?(ie(J*(i.object.right-i.object.left)/i.object.zoom/ae.clientWidth,i.object.matrix),ye(He*(i.object.top-i.object.bottom)/i.object.zoom/ae.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function ue(q){i.object instanceof Tn&&i.object.isPerspectiveCamera||i.object instanceof xr&&i.object.isOrthographicCamera?p=q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function oe(q){ue(p/q)}function de(q){ue(p*q)}function we(q){if(!i.zoomToCursor||!i.domElement)return;O=!0;const Te=i.domElement.getBoundingClientRect(),J=q.clientX-Te.left,He=q.clientY-Te.top,ae=Te.width,Le=Te.height;D.x=J/ae*2-1,D.y=-(He/Le)*2+1,P.set(D.x,D.y,1).unproject(i.object).sub(i.object.position).normalize()}function Ue(q){return Math.max(i.minDistance,Math.min(i.maxDistance,q))}function pe(q){v.set(q.clientX,q.clientY)}function be(q){we(q),E.set(q.clientX,q.clientY)}function Ne(q){g.set(q.clientX,q.clientY)}function ke(q){_.set(q.clientX,q.clientY),x.subVectors(_,v).multiplyScalar(i.rotateSpeed);const Te=i.domElement;Te&&(se(2*Math.PI*x.x/Te.clientHeight),ce(2*Math.PI*x.y/Te.clientHeight)),v.copy(_),i.update()}function nt(q){I.set(q.clientX,q.clientY),b.subVectors(I,E),b.y>0?oe($()):b.y<0&&de($()),E.copy(I),i.update()}function vt(q){S.set(q.clientX,q.clientY),A.subVectors(S,g).multiplyScalar(i.panSpeed),W(A.x,A.y),g.copy(S),i.update()}function ut(q){we(q),q.deltaY<0?de($()):q.deltaY>0&&oe($()),i.update()}function Ze(q){let Te=!1;switch(q.code){case i.keys.UP:W(0,i.keyPanSpeed),Te=!0;break;case i.keys.BOTTOM:W(0,-i.keyPanSpeed),Te=!0;break;case i.keys.LEFT:W(i.keyPanSpeed,0),Te=!0;break;case i.keys.RIGHT:W(-i.keyPanSpeed,0),Te=!0;break}Te&&(q.preventDefault(),i.update())}function Be(){if(C.length==1)v.set(C[0].pageX,C[0].pageY);else{const q=.5*(C[0].pageX+C[1].pageX),Te=.5*(C[0].pageY+C[1].pageY);
4030v.set(q,Te)}}function X(){if(C.length==1)g.set(C[0].pageX,C[0].pageY);else{const q=.5*(C[0].pageX+C[1].pageX),Te=.5*(C[0].pageY+C[1].pageY);g.set(q,Te)}}function We(){const q=C[0].pageX-C[1].pageX,Te=C[0].pageY-C[1].pageY,J=Math.sqrt(q*q+Te*Te);E.set(0,J)}function je(){i.enableZoom&&We(),i.enablePan&&X()}function Ve(){i.enableZoom&&We(),i.enableRotate&&Be()}function Xe(q){if(C.length==1)_.set(q.pageX,q.pageY);else{const J=pt(q),He=.5*(q.pageX+J.x),ae=.5*(q.pageY+J.y);_.set(He,ae)}x.subVectors(_,v).multiplyScalar(i.rotateSpeed);const Te=i.domElement;Te&&(se(2*Math.PI*x.x/Te.clientHeight),ce(2*Math.PI*x.y/Te.clientHeight)),v.copy(_)}function ht(q){if(C.length==1)S.set(q.pageX,q.pageY);else{const Te=pt(q),J=.5*(q.pageX+Te.x),He=.5*(q.pageY+Te.y);S.set(J,He)}A.subVectors(S,g).multiplyScalar(i.panSpeed),W(A.x,A.y),g.copy(S)}function et(q){const Te=pt(q),J=q.pageX-Te.x,He=q.pageY-Te.y,ae=Math.sqrt(J*J+He*He);I.set(0,ae),b.set(0,Math.pow(I.y/E.y,i.zoomSpeed)),oe(b.y),E.copy(I)}function j(q){i.enableZoom&&et(q),i.enablePan&&ht(q)}function k(q){i.enableZoom&&et(q),i.enableRotate&&Xe(q)}function ge(q){var Te,J;i.enabled!==!1&&(C.length===0&&((Te=i.domElement)==null||Te.ownerDocument.addEventListener("pointermove",Ie),(J=i.domElement)==null||J.ownerDocument.addEventListener("pointerup",De)),fe(q),q.pointerType==="touch"?R(q):Re(q))}function Ie(q){i.enabled!==!1&&(q.pointerType==="touch"?z(q):ft(q))}function De(q){var Te,J,He;ve(q),C.length===0&&((Te=i.domElement)==null||Te.releasePointerCapture(q.pointerId),(J=i.domElement)==null||J.ownerDocument.removeEventListener("pointermove",Ie),(He=i.domElement)==null||He.ownerDocument.removeEventListener("pointerup",De)),i.dispatchEvent(o),l=a.NONE}function Re(q){let Te;switch(q.button){case 0:Te=i.mouseButtons.LEFT;break;case 1:Te=i.mouseButtons.MIDDLE;break;case 2:Te=i.mouseButtons.RIGHT;break;default:Te=-1}switch(Te){case Ul.DOLLY:if(i.enableZoom===!1)return;be(q),l=a.DOLLY;break;case Ul.ROTATE:if(q.ctrlKey||q.metaKey||q.shiftKey){if(i.enablePan===!1)return;Ne(q),l=a.PAN}else{if(i.enableRotate===!1)return;pe(q),l=a.ROTATE}break;case Ul.PAN:if(q.ctrlKey||q.metaKey||q.shiftKey){if(i.enableRotate===!1)return;pe(q),l=a.ROTATE}else{if(i.enablePan===!1)return;Ne(q),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function ft(q){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;ke(q);break;case a.DOLLY:if(i.enableZoom===!1)return;nt(q);break;case a.PAN:if(i.enablePan===!1)return;vt(q);break}}function N(q){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(q.preventDefault(),i.dispatchEvent(s),ut(q),i.dispatchEvent(o))}function w(q){i.enabled===!1||i.enablePan===!1||Ze(q)}function R(q){switch(Fe(q),C.length){case 1:switch(i.touches.ONE){case Ol.ROTATE:if(i.enableRotate===!1)return;Be(),l=a.TOUCH_ROTATE;break;case Ol.PAN:if(i.enablePan===!1)return;X(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case Ol.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;je(),l=a.TOUCH_DOLLY_PAN;break;case Ol.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ve(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function z(q){switch(Fe(q),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Xe(q),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;ht(q),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;j(q),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;k(q),i.update();break;default:l=a.NONE}}function Q(q){i.enabled!==!1&&q.preventDefault()}function fe(q){C.push(q)}function ve(q){delete B[q.pointerId];for(let Te=0;Te<C.length;Te++)if(C[Te].pointerId==q.pointerId){C.splice(Te,1);return}}function Fe(q){let Te=B[q.pointerId];Te===void 0&&(Te=new _e,B[q.pointerId]=Te),Te.set(q.pageX,q.pageY)}function pt(q){const Te=q.pointerId===C[0].pointerId?C[1]:C[0];return B[Te.pointerId]}this.dollyIn=(q=$())=>{de(q),i.update()},this.dollyOut=(q=$())=>{oe(q),i.update()},this.getScale=()=>p,this.setScale=q=>{ue(q),i.update()},this.getZoomScale=()=>$(),t!==void 0&&this.connect(t),this.update()}};function Z0(n){if(typeof TextDecoder<"u")return new TextDecoder().decode(n);let e="";for(let t=0,i=n.length;t<i;t++)e+=String.fromCharCode(n[t]);try{return decodeURIComponent(escape(e))}catch{return e}}const $l="srgb",jo="srgb-linear",ib=3001,P8=3e3;class zM extends Bi{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new N8(t)}),this.register(function(t){return new U8(t)}),this.register(function(t){return new j8(t)}),this.register(function(t){return new J8(t)}),this.register(function(t){return new Y8(t)}),this.register(function(t){return new k8(t)}),this.register(function(t){return new z8(t)}),this.register(function(t){return new H8(t)}),this.register(function(t){return new G8(t)}),this.register(function(t){return new F8(t)}),this.register(function(t){return new V8(t)}),this.register(function(t){return new O8(t)}),this.register(function(t){return new X8(t)}),this.register(function(t){return new W8(t)}),this.register(function(t){return new D8(t)}),this.register(function(t){return new K8(t)}),this.register(function(t){return new Q8(t)})}load(e,t,i,r){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const c=Xa.extractUrlBase(e);o=Xa.resolveURL(c,this.path)}else o=Xa.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){r?r(c):console.error(c),s.manager.itemError(e),s.manager.itemEnd(e)},l=new Ii(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{
vendor: 4,570 bytes, line 4030
4030s.parse(c,o,function(f){t(f),s.manager.itemEnd(e)},a)}catch(f){a(f)}},i,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}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,i,r){let s;const o={},a={};if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(Z0(new Uint8Array(e.slice(0,4)))===xD){try{o[Jt.KHR_BINARY_GLTF]=new Z8(e)}catch(f){r&&r(f);return}s=JSON.parse(o[Jt.KHR_BINARY_GLTF].content)}else s=JSON.parse(Z0(new Uint8Array(e)));else s=e;if(s.asset===void 0||s.asset.version[0]<2){r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const l=new u6(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c<this.pluginCallbacks.length;c++){const f=this.pluginCallbacks[c](l);f.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[f.name]=f,o[f.name]=!0}if(s.extensionsUsed)for(let c=0;c<s.extensionsUsed.length;++c){const f=s.extensionsUsed[c],d=s.extensionsRequired||[];switch(f){case Jt.KHR_MATERIALS_UNLIT:o[f]=new L8;break;case Jt.KHR_DRACO_MESH_COMPRESSION:o[f]=new q8(s,this.dracoLoader);break;case Jt.KHR_TEXTURE_TRANSFORM:o[f]=new $8;break;case Jt.KHR_MESH_QUANTIZATION:o[f]=new e6;break;default:d.indexOf(f)>=0&&a[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function B8(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const Jt={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 D8{constructor(e){this.parser=e,this.name=Jt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i<r;i++){const s=t[i];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,i="light:"+e;let r=t.cache.get(i);if(r)return r;const s=t.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const f=new qe(16777215);l.color!==void 0&&f.setRGB(l.color[0],l.color[1],l.color[2],jo);const d=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new TM(f),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new wM(f),c.distance=d;break;case"spot":c=new EM(f),c.distance=d,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,c.angle=l.spot.outerConeAngle,c.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return c.position.set(0,0,0),c.decay=2,Lo(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=t.createUniqueName(l.name||"light_"+e),r=Promise.resolve(c),t.cac
vendor: 10,071 bytes, line 4030
4030he.add(i,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,i=this.parser,s=i.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return i._getNodeRef(t.cache,a,l)})}}class L8{constructor(){this.name=Jt.KHR_MATERIALS_UNLIT}getMaterialType(){return mr}extendParams(e,t,i){const r=[];e.color=new qe(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],jo),e.opacity=o[3]}s.baseColorTexture!==void 0&&r.push(i.assignTexture(e,"map",s.baseColorTexture,$l))}return Promise.all(r)}}class F8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name].emissiveStrength;return s!==void 0&&(t.emissiveIntensity=s),Promise.resolve()}}class N8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(i.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(i.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(i.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new _e(a,a)}return Promise.all(s)}}class U8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_DISPERSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return t.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class O8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(i.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(i.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class k8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_SHEEN}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new qe(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],jo)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(i.assignTexture(t,"sheenColorMap",o.sheenColorTexture,$l)),o.sheenRoughnessTexture!==void 0&&s.push(i.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class z8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(i.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class H8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_VOLUME}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(i.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return t.attenuationColor=new qe().setRGB(a[0],a[1],a[2],jo),Promise.all(s)}}class G8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_IOR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return t.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class V8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(i.assignTexture(t,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return t.specularColor=new qe().setRGB(a[0],a[1],a[2],jo),o.specularColorTexture!==void 0&&s.push(i.assignTexture(t,"specularColorMap",o.specularColorTexture,$l)),Promise.all(s)}}class W8{constructor(e){this.parser=e,this.name=Jt.EXT_MATERIALS_BUMP}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(i.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class X8{constructor(e){this.parser=e,this.name=Jt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:sr}extendMaterialParams(e,t){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(i.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class j8{constructor(e){this.parser=e,this.name=Jt.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,i=t.json,r=i.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const s=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class J8{constructor(e){this.parser=e,this.name=Jt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Y8{constructor(e){this.parser=e,this.name=Jt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
4030FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class K8{constructor(e){this.name=Jt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,c=r.byteLength||0,f=r.count,d=r.byteStride,p=new Uint8Array(a,l,c);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(f,d,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(f*d);return o.decodeGltfBuffer(new Uint8Array(m),f,d,p,r.mode,r.filter),m})})}else return null}}class Q8{constructor(e){this.name=Jt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const c of r.primitives)if(c.mode!==os.TRIANGLES&&c.mode!==os.TRIANGLE_STRIP&&c.mode!==os.TRIANGLE_FAN&&c.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(f=>(l[c]=f,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const f=c.pop(),d=f.isGroup?f.children:[f],p=c[0].count,m=[];for(const v of d){const _=new ct,x=new G,g=new Ei,S=new G(1,1,1),A=new cM(v.geometry,v.material,p);for(let E=0;E<p;E++)l.TRANSLATION&&x.fromBufferAttribute(l.TRANSLATION,E),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,E),l.SCALE&&S.fromBufferAttribute(l.SCALE,E),A.setMatrixAt(E,_.compose(x,g,S));for(const E in l)if(E==="_COLOR_0"){const I=l[E];A.instanceColor=new xc(I.array,I.itemSize,I.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&v.geometry.setAttribute(E,l[E]);jt.prototype.copy.call(A,v),this.parser.assignFinalMaterial(A),m.push(A)}return f.isGroup?(f.clear(),f.add(...m),f):m[0]}))}}const xD="glTF",_h=12,rb={JSON:1313821514,BIN:5130562};class Z8{constructor(e){this.name=Jt.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,_h);if(this.header={magic:Z0(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==xD)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-_h,r=new DataView(e,_h);let s=0;for(;s<i;){const o=r.getUint32(s,!0);s+=4;const a=r.getUint32(s,!0);if(s+=4,a===rb.JSON){const l=new Uint8Array(e,_h+s,o);this.content=Z0(l)}else if(a===rb.BIN){const l=_h+s;this.body=e.slice(l,l+o)}s+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class q8{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Jt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const i=this.json,r=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},c={};for(const f in o){const d=ES[f]||f.toLowerCase();a[d]=o[f]}for(const f in e.attributes){const d=ES[f]||f.toLowerCase();if(o[f]!==void 0){const p=i.accessors[e.attributes[f]],m=ju[p.componentType];c[d]=m.name,l[d]=p.normalized===!0}}return t.getDependency("bufferView",s).then(function(f){return new Promise(function(d,p){r.decodeDracoFile(f,function(m){for(const v in m.attributes){const _=m.attributes[v],x=l[v];x!==void 0&&(_.normalized=x)}d(m)},a,c,jo,p)})})}}class $8{constructor(){this.name=Jt.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 e6{constructor(){this.name=Jt.KHR_MESH_QUANTIZATION}}class _D extends Rf{constructor(e,t,i,r){super(e,t,i,r)}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)t[o]=i[s+o];return t}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,f=r-t,d=(i-t)/f,p=d*d,m=p*d,v=e*c,_=v-c,x=-2*m+3*p,g=m-p,S=1-x,A=g-p+d;for(let E=0;E!==a;E++){const I=o[_+E+a],b=o[_+E+l]*f,P=o[v+E+a],D=o[v+E]*f;s[E]=S*I+A*b+x*P+g*D}return s}}const t6=new Ei;class n6 extends _D{interpolate_(e,t,i,r){const s=super.interpolate_(e,t,i,r);return t6.fromArray(s).normalize().toArray(s),s}}const os={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},ju={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},sb={9728:Ht,9729:Ft,9984:wv,9985:Wu,9986:jl,9987:kr},ob={33071:ei,33648:of,10497:go},O_={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ES={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...f8>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Ea={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},i6={CUBICSPLINE:void 0,LINEAR:cf,STEP:lf},k_={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function r6(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new ap({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Xr})),n.DefaultMaterial}function Bl(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function Lo(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function s6(n,e,t){let i=!1,r=!1,s=!1;for(let c=0,f=e.length;c<f;c++){const d=e[c];if(d.POSITION!==void 0&&(i=!0),d.NORMAL!==void 0&&(r=!0),d.COLOR_0!==void 0&&(s=!0),i&&r&&s)break}if(!i&&!r&&!s)return Promise.resolve(n);const o=[],a=[],l=[];for(let c=0,f=e.length;c<f;c++){const d=e[c];if(i){const p=d.POSITION!==void 0?t.getDependency("accessor",d.POSITION):n.attributes.position;o.push(p)}if(r){const p=d.NORMAL!==void 0?t.getDependency("accessor",d.NORMAL):n.attributes.normal;a.push(p)}if(s){const p=d.COLOR_0!==void 0?t.getDependency("accessor",d.COLOR_0):n.attributes.color;l.push(p)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(c){const f=c[0],d=c[1],p=c[2];return i&&(n.morphAttributes.position=f),r&&(n.morphAttributes.normal=d),s&&(n.morphAttributes.color=p),n.morphTargetsRelative=!0,n})}function o6(n,e){if(n.updateMorphTargets(),e.weights!==void 0)for(let t=0,i=e.weights.length;t<i;t++)n.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(n.morphTargetInfluences.length===t.length){n.morphTargetDictionary={};for(let i=0,r=t.length;i<r;i++)n.morphTargetDictionary[t[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function a6(n){let e;const t=n.extensions&&n.extensions[Jt.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+z_(t.attributes):e=n.indices+":"+z_(n.attributes)+":"+n.mode,n.targets!==void 0)for(let i=0,r=n.targets.length;i<r;i++)e+=":"+z_(n.targets[i]);return e}function z_(n){let e="";const t=Object.keys(n).sort();for(let i=0,r=t.length;i<r;i++)e+=t[i]+":"+n[t[i]]+";";return e}function wS(n){switch(n){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 l6(n){return n.search(/\.jpe?g($|\?)/i)>0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const c6=new ct;class u6{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new B8,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new lp(this.options.manager):this.textureLoader=new NB(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ii(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()}
vendor: 16,724 bytes, line 4030
4030)).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return Bl(s,a,r),Lo(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r<s;r++){const o=t[r].joints;for(let a=0,l=o.length;a<l;a++)e[o[a]].isBone=!0}for(let r=0,s=e.length;r<s;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(i[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.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,i){if(e.refs[t]<=1)return i;const r=i.clone(),s=(o,a)=>{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[c,f]of o.children.entries())s(f,a.children[c])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){const r=e(t[i]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const i=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s&&i.push(s)}return i}getDependency(e,t){const i=e+":"+t;let r=this.cache.get(i);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(i,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const i=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(s,o){return i.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],i=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[Jt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){i.load(Xa.resolveURL(t.uri,r.path),s,void 0,function(){o(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(i){const r=t.byteLength||0,s=t.byteOffset||0;return i.slice(s,s+r)})}loadAccessor(e){const t=this,i=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=O_[r.type],a=ju[r.componentType],l=r.normalized===!0,c=new a(r.count*o);return Promise.resolve(new Yt(c,o,l))}const s=[];return r.bufferView!==void 0?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),r.sparse!==void 0&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then(function(o){const a=o[0],l=O_[r.type],c=ju[r.componentType],f=c.BYTES_PER_ELEMENT,d=f*l,p=r.byteOffset||0,m=r.bufferView!==void 0?i.bufferViews[r.bufferView].byteStride:void 0,v=r.normalized===!0;let _,x;if(m&&m!==d){const g=Math.floor(p/m),S="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let A=t.cache.get(S);A||(_=new c(a,g*m,r.count*m/f),A=new tp(_,m/f),t.cache.add(S,A)),x=new el(A,l,p%m/f,v)}else a===null?_=new c(r.count*l):_=new c(a,p,r.count*l),x=new Yt(_,l,v);if(r.sparse!==void 0){const g=O_.SCALAR,S=ju[r.sparse.indices.componentType],A=r.sparse.indices.byteOffset||0,E=r.sparse.values.byteOffset||0,I=new S(o[1],A,r.sparse.count*g),b=new c(o[2],E,r.sparse.count*l);a!==null&&(x=new Yt(x.array.slice(),x.itemSize,x.normalized));for(let P=0,D=I.length;P<D;P++){const O=I[P];if(x.setX(O,b[P*l]),l>=2&&x.setY(O,b[P*l+1]),l>=3&&x.setZ(O,b[P*l+2]),l>=4&&x.setW(O,b[P*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return x})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,i).then(function(f){f.flipY=!1,f.name=o.name||a.name||"",f.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(f.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return f.magFilter=sb[p.magFilter]||Ft,f.minFilter=sb[p.minFilter]||kr,f.wrapS=ob[p.wrapS]||go,f.wrapT=ob[p.wrapT]||go,r.associations.set(f,{textures:e}),f}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(d){c=!0;const p=new Blob([d],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const f=Promise.resolve(l).then(function(d){return new Promise(function(p,m){let v=p;t.isImageBitmapLoader===!0&&(v=function(_){const x=new Qt(_);x.needsUpdate=!0,p(x)}),t.load(Xa.resolveURL(d,s.path),v,void 0,m)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),Lo(d,o),d.userData.mimeType=o.mimeType||l6(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=f,f}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Jt.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Jt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Jt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&(typeof r=="number"&&(r=r===ib?$l:jo),"colorSpace"in o?o.colorSpace=r:o.encoding=r===$l?ib:P8),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new zv,Hn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new Ki,Hn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return ap}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},c=[];if(l[Jt.KHR_MATERIALS_UNLIT]){const d=r[Jt.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),c.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new qe(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],jo),a.opacity=p[3]}d.baseColorTexture!==void 0&&c.push(t.assignTexture(a,"map",d.baseColorTexture,$l)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=fi);const f=s.alphaMode||k_.OPAQUE;if(f===k_.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,f===k_.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==mr&&(c.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new _e(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}if(s.occlusionTexture!==void 0&&o!==mr&&(c.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==mr){const d=s.emissiveFactor;a.emissive=new qe().setRGB(d[0],d[1],d[2],jo)}return s.emissiveTexture!==void 0&&o!==mr&&c.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,$l)),Promise.all(c).then(function(){const d=new o(a);return s.name&&(d.name=s.name),Lo(d,s),t.associations.set(d,{materials:e}),s.extensions&&Bl(r,d,s),d})}createUniqueName(e){const t=en.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Jt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return ab(l,a,t)})}const o=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],f=a6(c),d=r[f];if(d)o.push(d.promise);else{let p;c.extensions&&c.extensions[Jt.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=ab(new bt,c,t),r[f]={primitive:c,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,i=this.json,r=this.extensions,s=i.meshes[e],o=s.primitives,a=[];for(let l=0,c=o.length;l<c;l++){const f=o[l].material===void 0?r6(this.cache):this.getDependency("material",o[l].material);a.push(f)}return a.push(t.loadGeometries(o)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),f=l[l.length-1],d=[];for(let m=0,v=f.length;m<v;m++){const _=f[m],x=o[m];let g;const S=c[m];if(x.mode===os.TRIANGLES||x.mode===os.TRIANGLE_STRIP||x.mode===os.TRIANGLE_FAN||x.mode===void 0)g=s.isSkinnedMesh===!0?new lM(_,S):new yn(_,S),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),x.mode===os.TRIANGLE_STRIP?g.geometry=eb(g.geometry,KA):x.mode===os.TRIANGLE_FAN&&(g.geometry=eb(g.geometry,J0));else if(x.mode===os.LINES)g=new Ws(_,S);else if(x.mode===os.LINE_STRIP)g=new $o(_,S);else if(x.mode===os.LINE_LOOP)g=new uM(_,S);else if(x.mode===os.POINTS)g=new fM(_,S);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+x.mode);Object.keys(g.geometry.morphAttributes).length>0&&o6(g,s),g.name=t.createUniqueName(s.name||"mesh_"+e),Lo(g,s),x.extensions&&Bl(r,g,x),t.assignFinalMaterial(g),d.push(g)}for(let m=0,v=d.length;m<v;m++)t.associations.set(d[m],{meshes:e,primitives:m});if(d.length===1)return s.extensions&&Bl(r,d[0],s),d[0];const p=new Vo;s.extensions&&Bl(r,p,s),t.associations.set(p,{meshes:e});for(let m=0,v=d.length;m<v;m++)p.add(d[m]);return p})}loadCamera(e){let t;const i=this.json.cameras[e],r=i[i.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?t=new Tn(qA.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):i.type==="orthographic"&&(t=new xr(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),Lo(t,i),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],i=[];for(let r=0,s=t.joints.length;r<s;r++)i.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",t.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(r){const s=r.pop(),o=r,a=[],l=[];for(let c=0,f=o.length;c<f;c++){const d=o[c];if(d){a.push(d);const p=new ct;s!==null&&p.fromArray(s.array,c*16),l.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[c])}return new np(a,l)})}loadAnimation(e){const t=this.json,i=this,r=t.animations[e],s=r.name?r.name:"animation_"+e,o=[],a=[],l=[],c=[],f=[];for(let d=0,p=r.channels.length;d<p;d++){const m=r.channels[d],v=r.samplers[m.sampler],_=m.target,x=_.node,g=r.parameters!==void 0?r.parameters[v.input]:v.input,S=r.parameters!==void 0?r.parameters[v.output]:v.output;_.node!==void 0&&(o.push(this.getDependency("node",x)),a.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",S)),c.push(v),f.push(_))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(f)]).then(function(d){const p=d[0],m=d[1],v=d[2],_=d[3],x=d[4],g=[];for(let S=0,A=p.length;S<A;S++){const E=p[S],I=m[S],b=v[S],P=_[S],D=x[S];if(E===void 0)continue;E.updateMatrix&&E.updateMatrix();const O=i._createAnimationTracks(E,I,b,P,D);if(O)for(let C=0;C<O.length;C++)g.push(O[C])}return new hf(s,void 0,g)})}createNodeMesh(e){const t=this.json,i=this,r=t.nodes[e];return r.mesh===void 0?null:i.getDependency("mesh",r.mesh).then(function(s){const o=i._getNodeRef(i.meshCache,r.mesh,s);return r.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let l=0,c=r.weights.length;l<c;l++)a.morphTargetInfluences[l]=r.weights[l]}),o})}loadNode(e){const t=this.json,i=this,r=t.nodes[e],s=i._loadNodeShallow(e),o=[],a=r.children||[];for(let c=0,f=a.length;c<f;c++)o.push(i.getDependency("node",a[c]));const l=r.skin===void 0?Promise.resolve(null):i.getDependency("skin",r.skin);return Promise.all([s,Promise.all(o),l]).then(function(c){const f=c[0],d=c[1],p=c[2];p!==null&&f.traverse(function(m){m.isSkinnedMesh&&m.bind(p,c6)});for(let m=0,v=d.length;m<v;m++)f.add(d[m]);return f})}_loadNodeShallow(e){const t=this.json,i=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?r.createUniqueName(s.name):"",a=[],l=r._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(r.getDependency("camera",s.camera).then(function(c){return r._getNodeRef(r.cameraCache,s.camera,c)})),r._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let f;if(s.isBone===!0?f=new kv:c.length>1?f=new Vo:c.length===1?f=c[0]:f=new jt,f!==c[0])for(let d=0,p=c.length;d<p;d++)f.add(c[d]);if(s.name&&(f.userData.name=s.name,f.name=o),Lo(f,s),s.extensions&&Bl(i,f,s),s.matrix!==void 0){const d=new ct;d.fromArray(s.matrix),f.applyMatrix4(d)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);return r.associations.has(f)||r.associations.set(f,{}),r.associations.get(f).nodes=e,f}),this.nodeCache[e]}loadScene(e){const t=this.extensions,i=this.json.scenes[e],r=this,s=new Vo;i.name&&(s.name=r.createUniqueName(i.name)),Lo(s,i),i.extensions&&Bl(t,s,i);const o=i.nodes||[],a=[];for(let l=0,c=o.length;l<c;l++)a.push(r.getDependency("node",o[l]));return Promise.all(a).then(function(l){for(let f=0,d=l.length;f<d;f++)s.add(l[f]);const c=f=>{const d=new Map;for(const[p,m]of r.associations)(p instanceof Hn||p instanceof Qt)&&d.set(p,m);return f.traverse(p=>{const m=r.associations.get(p);m!=null&&d.set(p,m)}),d};return r.associations=c(s),s})}_createAnimationTracks(e,t,i,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];Ea[s.path]===Ea.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let c;switch(Ea[s.path]){case Ea.weights:c=Sc;break;case Ea.rotation:c=Ac;break;case Ea.position:case Ea.scale:c=Mc;break;default:switch(i.itemSize){case 1:c=Sc;break;case 2:case 3:default:c=Mc;break}break}const f=r.interpolation!==void 0?i6[r.interpolation]:cf,d=this._getArrayFromAccessor(i);for(let p=0,m=l.length;p<m;p++){const v=new c(l[p]+"."+Ea[s.path],t.array,d,f);
vendor: 5,060 bytes, lines 4030-4034
4030r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(v),o.push(v)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const i=wS(t.constructor),r=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)r[s]=t[s]*i;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(i){const r=this instanceof Ac?n6:_D;return new r(this.times,this.values,this.getValueSize()/3,i)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function f6(n,e,t){const i=e.attributes,r=new Xi;if(i.POSITION!==void 0){const a=t.json.accessors[i.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(r.set(new G(l[0],l[1],l[2]),new G(c[0],c[1],c[2])),a.normalized){const f=wS(ju[a.componentType]);r.min.multiplyScalar(f),r.max.multiplyScalar(f)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new G,l=new G;for(let c=0,f=s.length;c<f;c++){const d=s[c];if(d.POSITION!==void 0){const p=t.json.accessors[d.POSITION],m=p.min,v=p.max;if(m!==void 0&&v!==void 0){if(l.setX(Math.max(Math.abs(m[0]),Math.abs(v[0]))),l.setY(Math.max(Math.abs(m[1]),Math.abs(v[1]))),l.setZ(Math.max(Math.abs(m[2]),Math.abs(v[2]))),p.normalized){const _=wS(ju[p.componentType]);l.multiplyScalar(_)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(a)}n.boundingBox=r;const o=new wi;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,n.boundingSphere=o}function ab(n,e,t){const i=e.attributes,r=[];function s(o,a){return t.getDependency("accessor",o).then(function(l){n.setAttribute(a,l)})}for(const o in i){const a=ES[o]||o.toLowerCase();a in n.attributes||r.push(s(i[o],a))}if(e.indices!==void 0&&!n.index){const o=t.getDependency("accessor",e.indices).then(function(a){n.setIndex(a)});r.push(o)}return Lo(n,e),f6(n,e,t),Promise.all(r).then(function(){return e.targets!==void 0?s6(n,e.targets,t):n})}class h6 extends AM{constructor(e){super(e),this.type=li}parse(e){const o=function(D,O){switch(D){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||""))}},f=`
4031`,d=function(D,O,C){O=O||1024;let Y=D.pos,$=-1,se=0,ce="",ie=String.fromCharCode.apply(null,new Uint16Array(D.subarray(Y,Y+128)));for(;0>($=ie.indexOf(f))&&se<O&&Y<D.byteLength;)ce+=ie,se+=ie.length,Y+=128,ie+=String.fromCharCode.apply(null,new Uint16Array(D.subarray(Y,Y+128)));return-1<$?(D.pos+=se+$+1,ce+ie.slice(0,$)):!1},p=function(D){const O=/^#\?(\S+)/,C=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,B=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,Y=/^\s*FORMAT=(\S+)\s*$/,$=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,se={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let ce,ie;for((D.pos>=D.byteLength||!(ce=d(D)))&&o(1,"no header found"),(ie=ce.match(O))||o(3,"bad initial token"),se.valid|=1,se.programtype=ie[1],se.string+=ce+`
4032`;ce=d(D),ce!==!1;){if(se.string+=ce+`
4033`,ce.charAt(0)==="#"){se.comments+=ce+`
4034`;continue}if((ie=ce.match(C))&&(se.gamma=parseFloat(ie[1])),(ie=ce.match(B))&&(se.exposure=parseFloat(ie[1])),(ie=ce.match(Y))&&(se.valid|=2,se.format=ie[1]),(ie=ce.match($))&&(se.valid|=4,se.height=parseInt(ie[1],10),se.width=parseInt(ie[2],10)),se.valid&2&&se.valid&4)break}return se.valid&2||o(3,"missing format specifier"),se.valid&4||o(3,"missing image size specifier"),se},m=function(D,O,C){const B=O;if(B<8||B>32767||D[0]!==2||D[1]!==2||D[2]&128)return new Uint8Array(D);B!==(D[2]<<8|D[3])&&o(3,"wrong scanline width");const Y=new Uint8Array(4*O*C);Y.length||o(4,"unable to allocate buffer space");let $=0,se=0;const ce=4*B,ie=new Uint8Array(4),ye=new Uint8Array(ce);let W=C;for(;W>0&&se<D.byteLength;){se+4>D.byteLength&&o(1),ie[0]=D[se++],ie[1]=D[se++],ie[2]=D[se++],ie[3]=D[se++],(ie[0]!=2||ie[1]!=2||(ie[2]<<8|ie[3])!=B)&&o(3,"bad rgbe scanline format");let ue=0,oe;for(;ue<ce&&se<D.byteLength;){oe=D[se++];const we=oe>128;if(we&&(oe-=128),(oe===0||ue+oe>ce)&&o(3,"bad scanline data"),we){const Ue=D[se++];for(let pe=0;pe<oe;pe++)ye[ue++]=Ue}else ye.set(D.subarray(se,se+oe),ue),ue+=oe,se+=oe}const de=B;for(let we=0;we<de;we++){let Ue=0;Y[$]=ye[we+Ue],Ue+=B,Y[$+1]=ye[we+Ue],Ue+=B,Y[$+2]=ye[we+Ue],Ue+=B,Y[$+3]=ye[we+Ue],$+=4}W--}return Y},v=function(D,O,C,B){const Y=D[O+3],$=Math.pow(2,Y-128)/255;C[B+0]=D[O+0]*$,C[B+1]=D[O+1]*$,C[B+2]=D[O+2]*$,C[B+3]=1},_=function(D,O,C,B){const Y=D[O+3],$=Math.pow(2,Y-128)/255;C[B+0]=Ql.toHalfFloat(Math.min(D[O+0]*$,65504)),C[B+1]=Ql.toHalfFloat(Math.min(D[O+1]*$,65504)),C[B+2]=Ql.toHalfFloat(Math.min(D[O+2]*$,65504)),C[B+3]=Ql.toHalfFloat(1)},x=new Uint8Array(e);x.pos=0;const g=p(x),S=g.width,A=g.height,E=m(x.subarray(x.pos),S,A);let I,b,P;switch(this.type){case vn:P=E.length/4;const D=new Float32Array(P*4);for(let C=0;C<P;C++)v(E,C*4,D,C*4);I=D,b=vn;break;case li:P=E.length/4;
vendor: 29,713 bytes, lines 4034-4035
4034const O=new Uint16Array(P*4);for(let C=0;C<P;C++)_(E,C*4,O,C*4);I=O,b=li;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:S,height:A,data:I,header:g.string,gamma:g.gamma,exposure:g.exposure,type:b}}setDataType(e){return this.type=e,this}load(e,t,i,r){function s(o,a){switch(o.type){case vn:case li:"colorSpace"in o?o.colorSpace="srgb-linear":o.encoding=3e3,o.minFilter=Ft,o.magFilter=Ft,o.generateMipmaps=!1,o.flipY=!0;break}t&&t(o,a)}return super.load(e,s,i,r)}}const Sh="colorSpace"in new Qt;class d6 extends AM{constructor(e){super(e),this.type=li}parse(e){const O=Math.pow(2.7182818,2.2);function C(U,H){for(var le=0,Me=0;Me<65536;++Me)(Me==0||U[Me>>3]&1<<(Me&7))&&(H[le++]=Me);for(var F=le-1;le<65536;)H[le++]=0;return F}function B(U){for(var H=0;H<16384;H++)U[H]={},U[H].len=0,U[H].lit=0,U[H].p=null}const Y={l:0,c:0,lc:0};function $(U,H,le,Me,F){for(;le<U;)H=H<<8|pt(Me,F),le+=8;le-=U,Y.l=H>>le&(1<<U)-1,Y.c=H,Y.lc=le}const se=new Array(59);function ce(U){for(var H=0;H<=58;++H)se[H]=0;for(var H=0;H<65537;++H)se[U[H]]+=1;for(var le=0,H=58;H>0;--H){var Me=le+se[H]>>1;se[H]=le,le=Me}for(var H=0;H<65537;++H){var F=U[H];F>0&&(U[H]=F|se[F]++<<6)}}function ie(U,H,le,Me,F,V,te){for(var ee=le,Z=0,xe=0;F<=V;F++){if(ee.value-le.value>Me)return!1;$(6,Z,xe,U,ee);var Se=Y.l;if(Z=Y.c,xe=Y.lc,te[F]=Se,Se==63){if(ee.value-le.value>Me)throw"Something wrong with hufUnpackEncTable";$(8,Z,xe,U,ee);var Ee=Y.l+6;if(Z=Y.c,xe=Y.lc,F+Ee>V+1)throw"Something wrong with hufUnpackEncTable";for(;Ee--;)te[F++]=0;F--}else if(Se>=59){var Ee=Se-59+2;if(F+Ee>V+1)throw"Something wrong with hufUnpackEncTable";for(;Ee--;)te[F++]=0;F--}}ce(te)}function ye(U){return U&63}function W(U){return U>>6}function ue(U,H,le,Me){for(;H<=le;H++){var F=W(U[H]),V=ye(U[H]);if(F>>V)throw"Invalid table entry";if(V>14){var te=Me[F>>V-14];if(te.len)throw"Invalid table entry";if(te.lit++,te.p){var ee=te.p;te.p=new Array(te.lit);for(var Z=0;Z<te.lit-1;++Z)te.p[Z]=ee[Z]}else te.p=new Array(1);te.p[te.lit-1]=H}else if(V)for(var xe=0,Z=1<<14-V;Z>0;Z--){var te=Me[(F<<14-V)+xe];if(te.len||te.p)throw"Invalid table entry";te.len=V,te.lit=H,xe++}}return!0}const oe={c:0,lc:0};function de(U,H,le,Me){U=U<<8|pt(le,Me),H+=8,oe.c=U,oe.lc=H}const we={c:0,lc:0};function Ue(U,H,le,Me,F,V,te,ee,Z,xe){if(U==H){Me<8&&(de(le,Me,F,te),le=oe.c,Me=oe.lc),Me-=8;var Se=le>>Me,Se=new Uint8Array([Se])[0];if(Z.value+Se>xe)return!1;for(var Ee=ee[Z.value-1];Se-- >0;)ee[Z.value++]=Ee}else if(Z.value<xe)ee[Z.value++]=U;else return!1;we.c=le,we.lc=Me}function pe(U){return U&65535}function be(U){var H=pe(U);return H>32767?H-65536:H}const Ne={a:0,b:0};function ke(U,H){var le=be(U),Me=be(H),F=Me,V=le+(F&1)+(F>>1),te=V,ee=V-F;Ne.a=te,Ne.b=ee}function nt(U,H){var le=pe(U),Me=pe(H),F=le-(Me>>1)&65535,V=Me+F-32768&65535;Ne.a=V,Ne.b=F}function vt(U,H,le,Me,F,V,te){for(var ee=te<16384,Z=le>F?F:le,xe=1,Se;xe<=Z;)xe<<=1;for(xe>>=1,Se=xe,xe>>=1;xe>=1;){for(var Ee=0,Ke=Ee+V*(F-Se),Oe=V*xe,ze=V*Se,Ge=Me*xe,ot=Me*Se,xt,St,_t,rt;Ee<=Ke;Ee+=ze){for(var Ye=Ee,Ct=Ee+Me*(le-Se);Ye<=Ct;Ye+=ot){var lt=Ye+Ge,Xt=Ye+Oe,Ln=Xt+Ge;ee?(ke(U[Ye+H],U[Xt+H]),xt=Ne.a,_t=Ne.b,ke(U[lt+H],U[Ln+H]),St=Ne.a,rt=Ne.b,ke(xt,St),U[Ye+H]=Ne.a,U[lt+H]=Ne.b,ke(_t,rt),U[Xt+H]=Ne.a,U[Ln+H]=Ne.b):(nt(U[Ye+H],U[Xt+H]),xt=Ne.a,_t=Ne.b,nt(U[lt+H],U[Ln+H]),St=Ne.a,rt=Ne.b,nt(xt,St),U[Ye+H]=Ne.a,U[lt+H]=Ne.b,nt(_t,rt),U[Xt+H]=Ne.a,U[Ln+H]=Ne.b)}if(le&xe){var Xt=Ye+Oe;ee?ke(U[Ye+H],U[Xt+H]):nt(U[Ye+H],U[Xt+H]),xt=Ne.a,U[Xt+H]=Ne.b,U[Ye+H]=xt}}if(F&xe)for(var Ye=Ee,Ct=Ee+Me*(le-Se);Ye<=Ct;Ye+=ot){var lt=Ye+Ge;ee?ke(U[Ye+H],U[lt+H]):nt(U[Ye+H],U[lt+H]),xt=Ne.a,U[lt+H]=Ne.b,U[Ye+H]=xt}Se=xe,xe>>=1}return Ee}function ut(U,H,le,Me,F,V,te,ee,Z,xe){for(var Se=0,Ee=0,Ke=ee,Oe=Math.trunc(F.value+(V+7)/8);F.value<Oe;)for(de(Se,Ee,le,F),Se=oe.c,Ee=oe.lc;Ee>=14;){var ze=Se>>Ee-14&16383,Ge=H[ze];if(Ge.len)Ee-=Ge.len,Ue(Ge.lit,te,Se,Ee,le,Me,F,Z,xe,Ke),Se=we.c,Ee=we.lc;else{if(!Ge.p)throw"hufDecode issues";var ot;for(ot=0;ot<Ge.lit;ot++){for(var xt=ye(U[Ge.p[ot]]);Ee<xt&&F.value<Oe;)de(Se,Ee,le,F),Se=oe.c,Ee=oe.lc;if(Ee>=xt&&W(U[Ge.p[ot]])==(Se>>Ee-xt&(1<<xt)-1)){Ee-=xt,Ue(Ge.p[ot],te,Se,Ee,le,Me,F,Z,xe,Ke),Se=we.c,Ee=we.lc;break}}if(ot==Ge.lit)throw"hufDecode issues"}}var St=8-V&7;for(Se>>=St,Ee-=St;Ee>0;){var Ge=H[Se<<14-Ee&16383];if(Ge.len)Ee-=Ge.len,Ue(Ge.lit,te,Se,Ee,le,Me,F,Z,xe,Ke),Se=we.c,Ee=we.lc;else throw"hufDecode issues"}return!0}function Ze(U,H,le,Me,F,V){var te={value:0},ee=le.value,Z=Fe(H,le),xe=Fe(H,le);le.value+=4;var Se=Fe(H,le);if(le.value+=4,Z<0||Z>=65537||xe<0||xe>=65537)throw"Something wrong with HUF_ENCSIZE";var Ee=new Array(65537),Ke=new Array(16384);B(Ke);var Oe=Me-(le.value-ee);if(ie(U,H,le,Oe,Z,xe,Ee),Se>8*(Me-(le.value-ee)))throw"Something wrong with hufUncompress";ue(Ee,Z,xe,Ke),ut(Ee,Ke,U,H,le,Se,xe,V,F,te)}function Be(U,H,le){for(var Me=0;Me<le;++Me)H[Me]=U[H[Me]]}function X(U){for(var H=1;H<U.length;H++){var le=U[H-1]+U[H]-128;U[H]=le}}function We(U,H){for(var le=0,Me=Math.floor((U.length+1)/2),F=0,V=U.length-1;!(F>V||(H[F++]=U[le++],F>V));)H[F++]=U[Me++]}function je(U){for(var H=U.byteLength,le=new Array,Me=0,F=new DataView(U);H>0;){var V=F.getInt8(Me++);if(V<0){var te=-V;H-=te+1;for(var ee=0;ee<te;ee++)le.push(F.getUint8(Me++))}else{var te=V;H-=2;for(var Z=F.getUint8(Me++),ee=0;ee<te+1;ee++)le.push(Z)}}return le}function Ve(U,H,le,Me,F,V){var lt=new DataView(V.buffer),te=le[U.idx[0]].width,ee=le[U.idx[0]].height,Z=3,xe=Math.floor(te/8),Se=Math.ceil(te/8),Ee=Math.ceil(ee/8),Ke=te-(Se-1)*8,Oe=ee-(Ee-1)*8,ze={value:0},Ge=new Array(Z),ot=new Array(Z),xt=new Array(Z),St=new Array(Z),_t=new Array(Z);for(let Et=0;Et<Z;++Et)_t[Et]=H[U.idx[Et]],Ge[Et]=Et<1?0:Ge[Et-1]+Se*Ee,ot[Et]=new Float32Array(64),xt[Et]=new Uint16Array(64),St[Et]=new Uint16Array(Se*64);for(let Et=0;Et<Ee;++Et){var rt=8;Et==Ee-1&&(rt=Oe);var Ye=8;for(let tn=0;tn<Se;++tn){tn==Se-1&&(Ye=Ke);for(let Rt=0;Rt<Z;++Rt)xt[Rt].fill(0),xt[Rt][0]=F[Ge[Rt]++],Xe(ze,Me,xt[Rt]),ht(xt[Rt],ot[Rt]),et(ot[Rt]);j(ot);for(let Rt=0;Rt<Z;++Rt)k(ot[Rt],St[Rt],tn*64)}let dn=0;for(let tn=0;tn<Z;++tn){const Rt=le[U.idx[tn]].type;for(let pn=8*Et;pn<8*Et+rt;++pn){dn=_t[tn][pn];for(let Ts=0;Ts<xe;++Ts){const gi=Ts*64+(pn&7)*8;lt.setUint16(dn+0*2*Rt,St[tn][gi+0],!0),lt.setUint16(dn+1*2*Rt,St[tn][gi+1],!0),lt.setUint16(dn+2*2*Rt,St[tn][gi+2],!0),lt.setUint16(dn+3*2*Rt,St[tn][gi+3],!0),lt.setUint16(dn+4*2*Rt,St[tn][gi+4],!0),lt.setUint16(dn+5*2*Rt,St[tn][gi+5],!0),lt.setUint16(dn+6*2*Rt,St[tn][gi+6],!0),lt.setUint16(dn+7*2*Rt,St[tn][gi+7],!0),dn+=8*2*Rt}}if(xe!=Se)for(let pn=8*Et;pn<8*Et+rt;++pn){const Ts=_t[tn][pn]+8*xe*2*Rt,gi=xe*64+(pn&7)*8;for(let Ys=0;Ys<Ye;++Ys)lt.setUint16(Ts+Ys*2*Rt,St[tn][gi+Ys],!0)}}}for(var Ct=new Uint16Array(te),lt=new DataView(V.buffer),Xt=0;Xt<Z;++Xt){le[U.idx[Xt]].decoded=!0;var Ln=le[U.idx[Xt]].type;if(le[Xt].type==2)for(var $t=0;$t<ee;++$t){const Et=_t[Xt][$t];for(var Kn=0;Kn<te;++Kn)Ct[Kn]=lt.getUint16(Et+Kn*2*Ln,!0);for(var Kn=0;Kn<te;++Kn)lt.setFloat32(Et+Kn*2*Ln,ae(Ct[Kn]),!0)}}}function Xe(U,H,le){for(var Me,F=1;F<64;)Me=H[U.value],Me==65280?F=64:Me>>8==255?F+=Me&255:(le[F]=Me,F++),U.value++}function ht(U,H){H[0]=ae(U[0]),H[1]=ae(U[1]),H[2]=ae(U[5]),H[3]=ae(U[6]),H[4]=ae(U[14]),H[5]=ae(U[15]),H[6]=ae(U[27]),H[7]=ae(U[28]),H[8]=ae(U[2]),H[9]=ae(U[4]),H[10]=ae(U[7]),H[11]=ae(U[13]),H[12]=ae(U[16]),H[13]=ae(U[26]),H[14]=ae(U[29]),H[15]=ae(U[42]),H[16]=ae(U[3]),H[17]=ae(U[8]),H[18]=ae(U[12]),H[19]=ae(U[17]),H[20]=ae(U[25]),H[21]=ae(U[30]),H[22]=ae(U[41]),H[23]=ae(U[43]),H[24]=ae(U[9]),H[25]=ae(U[11]),H[26]=ae(U[18]),H[27]=ae(U[24]),H[28]=ae(U[31]),H[29]=ae(U[40]),H[30]=ae(U[44]),H[31]=ae(U[53]),H[32]=ae(U[10]),H[33]=ae(U[19]),H[34]=ae(U[23]),H[35]=ae(U[32]),H[36]=ae(U[39]),H[37]=ae(U[45]),H[38]=ae(U[52]),H[39]=ae(U[54]),H[40]=ae(U[20]),H[41]=ae(U[22]),H[42]=ae(U[33]),H[43]=ae(U[38]),H[44]=ae(U[46]),H[45]=ae(U[51]),H[46]=ae(U[55]),H[47]=ae(U[60]),H[48]=ae(U[21]),H[49]=ae(U[34]),H[50]=ae(U[37]),H[51]=ae(U[47]),H[52]=ae(U[50]),H[53]=ae(U[56]),H[54]=ae(U[59]),H[55]=ae(U[61]),H[56]=ae(U[35]),H[57]=ae(U[36]),H[58]=ae(U[48]),H[59]=ae(U[49]),H[60]=ae(U[57]),H[61]=ae(U[58]),H[62]=ae(U[62]),H[63]=ae(U[63])}function et(U){const H=.5*Math.cos(.7853975),le=.5*Math.cos(3.14159/16),Me=.5*Math.cos(3.14159/8),F=.5*Math.cos(3*3.14159/16),V=.5*Math.cos(5*3.14159/16),te=.5*Math.cos(3*3.14159/8),ee=.5*Math.cos(7*3.14159/16);for(var Z=new Array(4),xe=new Array(4),Se=new Array(4),Ee=new Array(4),Ke=0;Ke<8;++Ke){var Oe=Ke*8;Z[0]=Me*U[Oe+2],Z[1]=te*U[Oe+2],Z[2]=Me*U[Oe+6],Z[3]=te*U[Oe+6],xe[0]=le*U[Oe+1]+F*U[Oe+3]+V*U[Oe+5]+ee*U[Oe+7],xe[1]=F*U[Oe+1]-ee*U[Oe+3]-le*U[Oe+5]-V*U[Oe+7],xe[2]=V*U[Oe+1]-le*U[Oe+3]+ee*U[Oe+5]+F*U[Oe+7],xe[3]=ee*U[Oe+1]-V*U[Oe+3]+F*U[Oe+5]-le*U[Oe+7],Se[0]=H*(U[Oe+0]+U[Oe+4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loat(ge(U[Me]))}function ge(U){return U<=1?Math.sign(U)*Math.pow(Math.abs(U),2.2):Math.sign(U)*Math.pow(O,Math.abs(U)-1)}function Ie(U){return new DataView(U.array.buffer,U.offset.value,U.size)}function De(U){var H=U.viewer.buffer.slice(U.offset.value,U.offset.value+U.size),le=new Uint8Array(je(H)),Me=new Uint8Array(le.length);return X(le),We(le,Me),new DataView(Me.buffer)}function Re(U){var H=U.array.slice(U.offset.value,U.offset.value+U.size),le=mg(H),Me=new Uint8Array(le.length);return X(le),We(le,Me),new DataView(Me.buffer)}function ft(U){for(var H=U.viewer,le={value:U.offset.value},Me=new Uint16Array(U.width*U.scanlineBlockSize*(U.channels*U.type)),F=new Uint8Array(8192),V=0,te=new Array(U.channels),ee=0;ee<U.channels;ee++)te[ee]={},te[ee].start=V,te[ee].end=te[ee].start,te[ee].nx=U.width,te[ee].ny=U.lines,te[ee].size=U.type,V+=te[ee].nx*te[ee].ny*te[ee].size;var Z=Le(H,le),xe=Le(H,le);if(xe>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(Z<=xe)for(var ee=0;ee<xe-Z+1;ee++)F[ee+Z]=q(H,le);var Se=new Uint16Array(65536),Ee=C(F,Se),Ke=Fe(H,le);Ze(U.array,H,le,Ke,Me,V);for(var ee=0;ee<U.channels;++ee)for(var Oe=te[ee],ze=0;ze<te[ee].size;++ze)vt(Me,Oe.start+ze,Oe.nx,Oe.size,Oe.ny,Oe.nx*Oe.size,Ee);Be(Se,Me,V);for(var Ge=0,ot=new Uint8Array(Me.buffer.byteLength),xt=0;xt<U.lines;xt++)for(var St=0;St<U.channels;St++){var Oe=te[St],_t=Oe.nx*Oe.size,rt=new Uint8Array(Me.buffer,Oe.end*2,_t*2);ot.set(rt,Ge),Ge+=_t*2,Oe.end+=_t}return new DataView(ot.buffer)}function N(U){var H=U.array.slice(U.offset.value,U.offset.value+U.size),le=mg(H);const Me=U.lines*U.channels*U.width,F=U.type==1?new Uint16Array(Me):new Uint32Array(Me);let V=0,te=0;const ee=new Array(4);for(let Z=0;Z<U.lines;Z++)for(let xe=0;xe<U.channels;xe++){let Se=0;switch(U.type){case 1:ee[0]=V,ee[1]=ee[0]+U.width,V=ee[1]+U.width;for(let Ee=0;Ee<U.width;++Ee){const Ke=le[ee[0]++]<<8|le[ee[1]++];Se+=Ke,F[te]=Se,te++}break;case 2:ee[0]=V,ee[1]=ee[0]+U.width,ee[2]=ee[1]+U.width,V=ee[2]+U.width;for(let Ee=0;Ee<U.width;++Ee){const Ke=le[ee[0]++]<<24|le[ee[1]++]<<16|le[ee[2]++]<<8;Se+=Ke,F[te]=Se,te++}break}}return new DataView(F.buffer)}function w(U){var H=U.viewer,le={value:U.offset.value},Me=new Uint8Array(U.width*U.lines*(U.channels*U.type*2)),F={version:Te(H,le),unknownUncompressedSize:Te(H,le),unknownCompressedSize:Te(H,le),acCompressedSize:Te(H,le),dcCompressedSize:Te(H,le),rleCompressedSize:Te(H,le),rleUncompressedSize:Te(H,le),rleRawSize:Te(H,le),totalAcUncompressedCount:Te(H,le),totalDcUncompressedCount:Te(H,le),acCompression:Te(H,le)};if(F.version<2)throw"EXRLoader.parse: "+Di.compression+" version "+F.version+" is unsupported";for(var V=new Array,te=Le(H,le)-2;te>0;){var ee=R(H.buffer,le),Z=q(H,le),xe=Z>>2&3,Se=(Z>>4)-1,Ee=new Int8Array([Se])[0],Ke=q(H,le);V.push({name:ee,index:Ee,type:Ke,compression:xe}),te-=ee.length+3}for(var Oe=Di.channels,ze=new Array(U.channels),Ge=0;Ge<U.channels;++Ge){var ot=ze[Ge]={},xt=Oe[Ge];ot.name=xt.name,ot.compression=0,ot.decoded=!1,ot.type=xt.pixelType,ot.pLinear=xt.pLinear,ot.width=U.width,ot.height=U.lines}for(var St={idx:new Array(3)},_t=0;_t<U.channels;++_t)for(var ot=ze[_t],Ge=0;Ge<V.length;++Ge){var rt=V[Ge];ot.name==rt.name&&(ot.compression=rt.compression,rt.index>=0&&(St.idx[rt.index]=_t),ot.offset=_t)}if(F.acCompressedSize>0)switch(F.acCompression){case 0:var lt=new Uint16Array(F.totalAcUncompressedCount);Ze(U.array,H,le,F.acCompressedSize,lt,F.totalAcUncompressedCount);break;case 1:var Ye=U.array.slice(le.value,le.value+F.totalAcUncompressedCount),Ct=mg(Ye),lt=new Uint16Array(Ct.buffer);le.value+=F.totalAcUncompressedCount;break}if(F.dcCompressedSize>0){var Xt={array:U.array,offset:le,size:F.dcCompressedSize},Ln=new Uint16Array(Re(Xt).buffer);le.value+=F.dcCompressedSize}if(F.rleRawSize>0){var Ye=U.array.slice(le.value,le.value+F.rleCompressedSize),Ct=mg(Ye),$t=je(Ct.buffer);le.value+=F.rleCompressedSize}for(var Kn=0,Et=new Array(ze.length),Ge=0;Ge<Et.length;++Ge)Et[Ge]=new Array;for(var dn=0;dn<U.lines;++dn)for(var tn=0;tn<ze.length;++tn)Et[tn].push(Kn),Kn+=ze[tn].width*U.type*2;Ve(St,Et,ze,lt,Ln,Me);for(var Ge=0;Ge<ze.length;++Ge){var ot=ze[Ge];if(!ot.decoded)switch(ot.compression){case 2:for(var Rt=0,pn=0,dn=0;dn<U.lines;++dn){for(var Ts=Et[Ge][Rt],gi=0;gi<ot.width;++gi){for(var Ys=0;Ys<2*ot.type;++Ys)Me[Ts++]=$t[pn+Ys*ot.width*ot.height];pn++}Rt++}break;case 1:default:throw"EXRLoader.parse: unsupported channel compression"}}return new DataView(Me.buffer)}function R(U,H){for(var le=new Uint8Array(U),Me=0;le[H.value+Me]!=0;)Me+=1;var F=new TextDecoder().decode(le.slice(H.value,H.value+Me));return H.value=H.value+Me+1,F}function z(U,H,le){var Me=new TextDecoder().decode(new Uint8Array(U).slice(H.value,H.value+le));return H.value=H.value+le,Me}function Q(U,H){var le=ve(U,H),Me=Fe(U,H);return[le,Me]}function fe(U,H){var le=Fe(U,H),Me=Fe(U,H);return[le,Me]}function ve(U,H){var le=U.getInt32(H.value,!0);return H.value=H.value+4,le}function Fe(U,H){var le=U.getUint32(H.value,!0);return H.value=H.value+4,le}function pt(U,H){var le=U[H.value];return H.value=H.value+1,le}function q(U,H){var le=U.getUint8(H.value);return H.value=H.value+1,le}const Te=function(U,H){let le;return"getBigInt64"in DataView.prototype?le=Number(U.getBigInt64(H.value,!0)):le=U.getUint32(H.value+4,!0)+Number(U.getUint32(H.value,!0)<<32),H.value+=8,le};function J(U,H){var le=U.getFloat32(H.value,!0);return H.value+=4,le}function He(U,H){return Ql.toHalfFloat(J(U,H))}function ae(U){var H=(U&31744)>>10,le=U&1023;return(U>>15?-1:1)*(H?H===31?le?NaN:1/0:Math.pow(2,H-15)*(1+le/1024):6103515625e-14*(le/1024))}function Le(U,H){var le=U.getUint16(H.value,!0);return H.value+=2,le}function $e(U,H){return ae(Le(U,H))}function st(U,H,le,Me){for(var F=le.value,V=[];le.value<F+Me-1;){var te=R(H,le),ee=ve(U,le),Z=q(U,le);le.value+=3;var xe=ve(U,le),Se=ve(U,le);V.push({name:te,pixelType:ee,pLinear:Z,xSampling:xe,ySampling:Se})}return le.value+=1,V}function zt(U,H){var le=J(U,H),Me=J(U,H),F=J(U,H),V=J(U,H),te=J(U,H),ee=J(U,H),Z=J(U,H),xe=J(U,H);return{redX:le,redY:Me,greenX:F,greenY:V,blueX:te,blueY:ee,whiteX:Z,whiteY:xe}}function Zt(U,H){var le=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],Me=q(U,H);return le[Me]}function hn(U,H){var le=Fe(U,H),Me=Fe(U,H),F=Fe(U,H),V=Fe(U,H);return{xMin:le,yMin:Me,xMax:F,yMax:V}}function Nt(U,H){var le=["INCREASING_Y"],Me=q(U,H);return le[Me]}function En(U,H){var le=J(U,H),Me=J(U,H);return[le,Me]}function ti(U,H){var le=J(U,H),Me=J(U,H),F=J(U,H);return[le,Me,F]}function Ms(U,H,le,Me,F){if(Me==="string"||Me==="stringvector"||Me==="iccProfile")return z(H,le,F);if(Me==="chlist")return st(U,H,le,F);if(Me==="chromaticities")return zt(U,le);if(Me==="compression")return Zt(U,le);if(Me==="box2i")return hn(U,le);if(Me==="lineOrder")return Nt(U,le);if(Me==="float")return J(U,le);if(Me==="v2f")return En(U,le);if(Me==="v3f")return ti(U,le);if(Me==="int")return ve(U,le);if(Me==="rational")return Q(U,le);if(Me==="timecode")return fe(U,le);if(Me==="preview")return le.value+=F,"skipped";le.value+=F}function Fc(U,H,le){const Me={};if(U.getUint32(0,!0)!=20000630)throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";Me.version=U.getUint8(4);const F=U.getUint8(5);Me.spec={singleTile:!!(F&2),longName:!!(F&4),deepFormat:!!(F&8),multiPart:!!(F&16)},le.value=8;for(var V=!0;V;){var te=R(H,le);if(te==0)V=!1;else{var ee=R(H,le),Z=Fe(U,le),xe=Ms(U,H,le,ee,Z);xe===void 0?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${ee}'.`):Me[te]=xe}}if(F&-5)throw console.error("EXRHeader:",Me),"THREE.EXRLoader: provided file is currently unsupported.";return Me}function Es(U,H,le,Me,F){const V={size:0,viewer:H,array:le,offset:Me,width:U.dataWindow.xMax-U.dataWindow.xMin+1,height:U.dataWindow.yMax-U.dataWindow.yMin+1,channels:U.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:U.channels[0].pixelType,uncompress:null,getter:null,format:null,[Sh?"colorSpace":"encoding"]:null};switch(U.compression){case"NO_COMPRESSION":V.lines=1,V.uncompress=Ie;break;case"RLE_COMPRESSION":V.lines=1,V.uncompress=De;break;case"ZIPS_COMPRESSION":V.lines=1,V.uncompress=Re;break;case"ZIP_COMPRESSION":V.lines=16,V.uncompress=Re;break;case"PIZ_COMPRESSION":V.lines=32,V.uncompress=ft;break;case"PXR24_COMPRESSION":V.lines=16,V.uncompress=N;break;case"DWAA_COMPRESSION":V.lines=32,V.uncompress=w;break;case"DWAB_COMPRESSION":V.lines=256,V.uncompress=w;break;default:throw"EXRLoader.parse: "+U.compression+" is unsupported"}if(V.scanlineBlockSize=V.lines,V.type==1)switch(F){case vn:V.getter=$e,V.inputSize=2;break;case li:V.getter=Le,V.inputSize=2;break}else if(V.type==2)switch(F){case vn:V.getter=J,V.inputSize=4;break;case li:V.getter=He,V.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+V.type+" for "+U.compression+".";V.blockCount=(U.dataWindow.yMax+1)/V.scanlineBlockSize;for(var te=0;te<V.blockCount;te++)Te(H,Me);V.outputChannels=V.channels==3?4:V.channels;const ee=V.width*V.height*V.outputChannels;switch(F){case vn:V.byteArray=new Float32Array(ee),V.channels<V.outputChannels&&V.byteArray.fill(1,0,ee);break;case li:V.byteArray=new Uint16Array(ee),V.channels<V.outputChannels&&V.byteArray.fill(15360,0,ee);break;default:console.error("THREE.EXRLoader: unsupported type: ",F);break}return V.bytesPerLine=V.width*V.inputSize*V.channels,V.outputChannels==4?V.format=Dn:V.format=Ef,Sh?V.colorSpace="srgb-linear":V.encoding=3e3,V}const ws=new DataView(e),sa=new Uint8Array(e),Js={value:0},Di=Fc(ws,e,Js),Gt=Es(Di,ws,sa,Js,this.type),_o={value:0},Nc={R:0,G:1,B:2,A:3,Y:0};for(let U=0;U<Gt.height/Gt.scanlineBlockSize;U++){const H=Fe(ws,Js);Gt.size=Fe(ws,Js),Gt.lines=H+Gt.scanlineBlockSize>Gt.height?Gt.height-H:Gt.scanlineBlockSize;const Me=Gt.size<Gt.lines*Gt.bytesPerLine?Gt.uncompress(Gt):Ie(Gt);Js.value+=Gt.size;for(let F=0;F<Gt.scanlineBlockSize;F++){const V=F+U*Gt.scanlineBlockSize;if(V>=Gt.height)break;for(let te=0;te<Gt.channels;te++){const ee=Nc[Di.channels[te].name];for(let Z=0;Z<Gt.width;Z++){_o.value=(F*(Gt.channels*Gt.width)+te*Gt.width+Z)*Gt.inputSize;const xe=(Gt.height-1-V)*(Gt.width*Gt.outputChannels)+Z*Gt.outputChannels+ee;Gt.byteArray[xe]=Gt.getter(Me,_o)}}}}return{header:Di,width:Gt.width,height:Gt.height,data:Gt.byteArray,format:Gt.format,[Sh?"colorSpace":"encoding"]:Gt[Sh?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,t,i,r){function s(o,a){Sh?o.colorSpace=a.colorSpace:o.encoding=a.encoding,o.minFilter=Ft,o.magFilter=Ft,o.generateMipmaps=!1,o.flipY=!1,t&&t(o,a)}return super.load(e,s,i,r)}}const H_=new WeakMap;class p6 extends Bi{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,r){const s=new Ii(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(t).catch(r)},i,r)}decodeDracoFile(e,t,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const l in t.attributeTypes){const c=t.attributeTypes[l];c.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[l]=c.name)}const i=JSON.stringify(t);if(H_.has(e)){const l=H_.get(e);if(l.key===i)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((c,f)=>{r._callbacks[s]={resolve:c,reject:f},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),H_.set(e,{key:i,promise:a}),a}_createGeometry(e){const t=new bt;e.index&&t.setIndex(new Yt(e.index.array,1));for(let i=0;i<e.attributes.length;i++){const r=e.attributes[i],s=r.name,o=r.array,a=r.itemSize;t.setAttribute(s,new Yt(o,a))}return t}_loadLibrary(e,t){const i=new Ii(this.manager);return i.setPath(this.decoderPath),i.setResponseType(t),i.setWithCredentials(this.withCredentials),new Promise((r,s)=>{i.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=m6.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(`
4035`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const r=new Worker(this.workerSourceURL);r._callbacks={},r._taskCosts={},r._taskLoad=0,r.postMessage({type:"init",decoderConfig:this.decoderConfig}),r.onmessage=function(s){const o=s.data;switch(o.type){case"decode":r._callbacks[o.id].resolve(o);break;case"error":r._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(r)}else this.workerPool.sort(function(r,s){return r._taskLoad>s._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function m6(){let n,e;onmessage=function(o){const a=o.data;switch(a.type){case"init":n=a.decoderConfig,e=new Promise(function(f){n.onModuleLoaded=function(d){f({draco:d})},DracoDecoderModule(n)});break;case"decode":const l=a.buffer,c=a.taskConfig;e.then(f=>{const d=f.draco,p=new d.Decoder,m=new d.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const v=t(d,p,m,c),_=v.attributes.map(x=>x.array.buffer);v.index&&_.push(v.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:v},_)}catch(v){console.error(v),self.postMessage({type:"error",id:a.id,error:v.message})}finally{d.destroy(m),d.destroy(p)}});break}};function t(o,a,l,c){const f=c.attributeIDs,d=c.attributeTypes;let p,m;const v=a.GetEncodedGeometryType(l);if(v===o.TRIANGULAR_MESH)p=new o.Mesh,m=a.DecodeBufferToMesh(l,p);else if(v===o.POINT_CLOUD)p=new o.PointCloud,m=a.DecodeBufferToPointCloud(l,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const _={index:null,attributes:[]};for(const x in f){const g=self[d[x]];let S,A;if(c.useUniqueIDs)A=f[x],S=a.GetAttributeByUniqueId(p,A);else{if(A=a.GetAttributeId(p,o[f[x]]),A===-1)continue;S=a.GetAttribute(p,A)}_.attributes.push(r(o,a,p,x,g,S))}return v===o.TRIANGULAR_MESH&&(_.index=i(o,a,p)),o.destroy(p),_}function i(o,a,l){const f=l.num_faces()*3,d=f*4,p=o._malloc(d);a.GetTrianglesUInt32Array(l,d,p);const m=new Uint32Array(o.HEAPF32.buffer,p,f).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,c,f,d){const p=d.num_components(),v=l.num_points()*p,_=v*f.BYTES_PER_ELEMENT,x=s(o,f),g=o._malloc(_);a.GetAttributeDataArrayForAllPoints(l,d,x,_,g);const S=new f(o.HEAPF32.buffer,g,v).slice();return o._free(g),{name:c,array:S,itemSize:p}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let vg;const G_=()=>{if(vg)return vg;const n="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIl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,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let r=n;WebAssembly.validate(t)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(d=>{s=d.instance,s.exports.__wasm_call_ctors()});function a(d){const p=new Uint8Array(d.length);for(let v=0;v<d.length;
4035++v){const _=d.charCodeAt(v);p[v]=_>96?_-71:_>64?_-65:_>47?_+4:_>46?63:62}let m=0;for(let v=0;v<d.length;++v)p[m++]=p[v]<60?i[p[v]]:(p[v]-60)*64+p[++v];return p.buffer.slice(0,m)}function l(d,p,m,v,_,x){const g=s.exports.sbrk,S=m+3&-4,A=g(S*v),E=g(_.length),I=new Uint8Array(s.exports.memory.buffer);I.set(_,E);const b=d(A,m,v,E,_.length);if(b===0&&x&&x(A,S,v),p.set(I.subarray(A,A+m*v)),g(A-g(0)),b!==0)throw new Error(`Malformed buffer data: ${b}`)}const c={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},f={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return vg={ready:o,supported:!0,decodeVertexBuffer(d,p,m,v,_){l(s.exports.meshopt_decodeVertexBuffer,d,p,m,v,s.exports[c[_]])},decodeIndexBuffer(d,p,m,v){l(s.exports.meshopt_decodeIndexBuffer,d,p,m,v)},decodeIndexSequence(d,p,m,v){l(s.exports.meshopt_decodeIndexSequence,d,p,m,v)},decodeGltfBuffer(d,p,m,v,_,x){l(s.exports[f[_]],d,p,m,v,s.exports[c[x]])}},vg},V_=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function HM(n,e){const t=In(s=>s.gl),i=_s(lp,V_(n)?Object.values(n):n);return ne.useLayoutEffect(()=>{e==null||e(i)},[e]),ne.useEffect(()=>{if("initTexture"in t){let s=[];Array.isArray(i)?s=i:i instanceof Qt?s=[i]:V_(i)&&(s=Object.values(i)),s.forEach(o=>{o instanceof Qt&&t.initTexture(o)})}},[t,i]),ne.useMemo(()=>{if(V_(n)){const s={};let o=0;for(const a in n)s[a]=i[o++];return s}else return i},[n,i])}HM.preload=n=>_s.preload(lp,n);HM.clear=n=>_s.clear(lp,n);let yg=null,SD="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function AD(n=!0,e=!0,t){return i=>{t&&t(i),n&&(yg||(yg=new p6),yg.setDecoderPath(typeof n=="string"?n:SD),i.setDRACOLoader(yg)),e&&i.setMeshoptDecoder(typeof G_=="function"?G_():G_)}}const fp=(n,e,t,i)=>_s(zM,n,AD(e,t,i));fp.preload=(n,e,t,i)=>_s.preload(zM,n,AD(e,t,i));fp.clear=n=>_s.clear(zM,n);fp.setDecoderPath=n=>{SD=n};const g6=ne.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...c},f)=>{const d=In(b=>b.invalidate),p=In(b=>b.camera),m=In(b=>b.gl),v=In(b=>b.events),_=In(b=>b.setEvents),x=In(b=>b.set),g=In(b=>b.get),S=In(b=>b.performance),A=e||p,E=i||v.connected||m.domElement,I=ne.useMemo(()=>new I8(A),[A]);return ra(()=>{I.enabled&&I.update()},-1),ne.useEffect(()=>(s&&I.connect(s===!0?E:s),I.connect(E),()=>void I.dispose()),[s,E,t,I,d]),ne.useEffect(()=>{const b=O=>{d(),t&&S.regress(),o&&o(O)},P=O=>{a&&a(O)},D=O=>{l&&l(O)};return I.addEventListener("change",b),I.addEventListener("start",P),I.addEventListener("end",D),()=>{I.removeEventListener("start",P),I.removeEventListener("end",D),I.removeEventListener("change",b)}},[o,a,l,I,d,_]),ne.useEffect(()=>{if(n){const b=g().controls;return x({controls:I}),()=>x({controls:b})}},[n,I]),ne.createElement("primitive",pf({ref:f,object:I,enableDamping:r},c))});function MD(n,e){const t=ne.useRef(),[i]=ne.useState(()=>e?e instanceof jt?{current:e}:e:t),[r]=ne.useState(()=>new zB(void 0));ne.useLayoutEffect(()=>{e&&(i.current=e instanceof jt?e:e.current),r._root=i.current});const s=ne.useRef({}),o=ne.useMemo(()=>{const a={};return n.forEach(l=>Object.defineProperty(a,l.name,{enumerable:!0,get(){if(i.current)return s.current[l.name]||(s.current[l.name]=r.clipAction(l,i.current))},configurable:!0})),{ref:i,clips:n,actions:a,names:n.map(l=>l.name),mixer:r}},[n]);return ra((a,l)=>r.update(l)),ne.useEffect(()=>{const a=i.current;return()=>{s.current={},r.stopAllAction(),Object.values(o.actions).forEach(l=>{a&&r.uncacheAction(l,a)})}},[n]),o}const v6=3e3,y6=3001;function x6(n,e){const t=n+"Geometry";return ne.forwardRef(({args:i,children:r,...s},o)=>{const a=ne.useRef(null);return ne.useImperativeHandle(o,()=>a.current),ne.useLayoutEffect(()=>void(e==null?void 0:e(a.current))),ne.createElement("mesh",pf({ref:a},s),ne.createElement(t,{attach:"geometry",args:i}),r)})}const _6=x6("sphere"),S6=ne.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],autoInvalidate:o=!1,...a},l)=>{const c=ne.useRef(null);ne.useImperativeHandle(l,()=>c.current,[]);const f=ne.useRef(Math.random()*1e4);return ra(d=>{var p,m;if(!e||t===0)return;o&&d.invalidate();const v=f.current+d.clock.getElapsedTime();c.current.rotation.x=Math.cos(v/4*t)/8*i,c.current.rotation.y=Math.sin(v/4*t)/8*i,c.current.rotation.z=Math.sin(v/4*t)/20*i;let _=Math.sin(v/4*t)/10;_=qA.mapLinear(_,-.1,.1,(p=s==null?void 0:s[0])!==null&&p!==void 0?p:-.1,(m=s==null?void 0:s[1])!==null&&m!==void 0?m:.1),c.current.position.y=_*r,c.current.updateMatrix()}),ne.createElement("group",a,ne.createElement("group",{ref:c,matrixAutoUpdate:!1},n))}),ED=(n,e,t)=>{let i;switch(n){case di:i=new Uint8ClampedArray(e*t*4);break;case li:i=new Uint16Array(e*t*4);break;case Vs:i=new Uint32Array(e*t*4);break;case Tv:i=new Int8Array(e*t*4);break;case Cv:i=new Int16Array(e*t*4);break;case Qd:i=new Int32Array(e*t*4);break;case vn:i=new Float32Array(e*t*4);break;default:throw new Error("Unsupported data type")}return i};let xg;const A6=(n,e,t,i)=>{if(xg!==void 0)return xg;const r=new xn(1,1,i);e.setRenderTarget(r);const s=new yn(new xo,new mr({color:16777215}));e.render(s,t),e.setRenderTarget(null);const o=ED(n,r.width,r.height);return e.readRenderTargetPixels(r,0,0,r.width,r.height,o),r.dispose(),s.geometry.dispose(),s.material.dispose(),xg=o[0]!==0,xg};class GM{constructor(e){var t,i,r,s,o,a,l,c,f,d,p,m,v,_,x,g;this._rendererIsDisposable=!1,this._supportsReadPixels=!0,this.render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(A){throw this._renderer.setRenderTarget(null),A}this._renderer.setRenderTarget(null)},this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace
vendor: 6,977 bytes, lines 4035-4068
4035=e.colorSpace;const S={format:Dn,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:((t=e.renderTargetOptions)===null||t===void 0?void 0:t.anisotropy)!==void 0?(i=e.renderTargetOptions)===null||i===void 0?void 0:i.anisotropy:1,generateMipmaps:((r=e.renderTargetOptions)===null||r===void 0?void 0:r.generateMipmaps)!==void 0?(s=e.renderTargetOptions)===null||s===void 0?void 0:s.generateMipmaps:!1,magFilter:((o=e.renderTargetOptions)===null||o===void 0?void 0:o.magFilter)!==void 0?(a=e.renderTargetOptions)===null||a===void 0?void 0:a.magFilter:Ft,minFilter:((l=e.renderTargetOptions)===null||l===void 0?void 0:l.minFilter)!==void 0?(c=e.renderTargetOptions)===null||c===void 0?void 0:c.minFilter:Ft,samples:((f=e.renderTargetOptions)===null||f===void 0?void 0:f.samples)!==void 0?(d=e.renderTargetOptions)===null||d===void 0?void 0:d.samples:void 0,wrapS:((p=e.renderTargetOptions)===null||p===void 0?void 0:p.wrapS)!==void 0?(m=e.renderTargetOptions)===null||m===void 0?void 0:m.wrapS:ei,wrapT:((v=e.renderTargetOptions)===null||v===void 0?void 0:v.wrapT)!==void 0?(_=e.renderTargetOptions)===null||_===void 0?void 0:_.wrapT:ei};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=GM.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new qo,this._camera=new xr,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(),!A6(this._type,this._renderer,this._camera,S)){let A;switch(this._type){case li:A=this._renderer.extensions.has("EXT_color_buffer_float")?vn:void 0;break}A!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${vn}`),this._type=A):(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 yn(new xo,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new xn(this.width,this.height,S),this._renderTarget.texture.mapping=((x=e.renderTargetOptions)===null||x===void 0?void 0:x.mapping)!==void 0?(g=e.renderTargetOptions)===null||g===void 0?void 0:g.mapping:Qa}static instantiateRenderer(){const e=new oM;return e.setSize(128,128),e}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=ED(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 gs(this.toArray(),this.width,this.height,Dn,this._type,(e==null?void 0:e.mapping)||Qa,(e==null?void 0:e.wrapS)||ei,(e==null?void 0:e.wrapT)||ei,(e==null?void 0:e.magFilter)||Ft,(e==null?void 0:e.minFilter)||Ft,(e==null?void 0:e.anisotropy)||1,Er);return t.generateMipmaps=(e==null?void 0:e.generateMipmaps)!==void 0?e==null?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 nn&&Object.values(this.material.uniforms).forEach(t=>{t.value instanceof Qt&&t.value.dispose()}),Object.values(this.material).forEach(t=>{t instanceof Qt&&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 M6=`
4036varying vec2 vUv;
4037
4038void main() {
4039  vUv = uv;
4040  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
4041}
4042`,E6=`
4043// min half float value
4044#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )
4045// max half float value
4046#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )
4047
4048uniform sampler2D sdr;
4049uniform sampler2D gainMap;
4050uniform vec3 gamma;
4051uniform vec3 offsetHdr;
4052uniform vec3 offsetSdr;
4053uniform vec3 gainMapMin;
4054uniform vec3 gainMapMax;
4055uniform float weightFactor;
4056
4057varying vec2 vUv;
4058
4059void main() {
4060  vec3 rgb = texture2D( sdr, vUv ).rgb;
4061  vec3 recovery = texture2D( gainMap, vUv ).rgb;
4062  vec3 logRecovery = pow( recovery, gamma );
4063  vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;
4064  vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;
4065  vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));
4066  gl_FragColor = vec4( clampedHdrColor , 1.0 );
4067}
4068`;class w6 extends nn{constructor({gamma:e,offsetHdr:t,offsetSdr:i,gainMapMin:r,gainMapMax:s,maxDisplayBoost:o,hdrCapacityMin:a,hdrCapacityMax:l,sdr:c,gainMap:f}){super({name:"GainMapDecoderMaterial",vertexShader:M6,fragmentShader:E6,uniforms:{sdr:{value:c},gainMap:{value:f},gamma:{value:new G(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new G().fromArray(t)},offsetSdr:{value:new G().fromArray(i)},gainMapMin:{value:new G().fromArray(r)},gainMapMax:{value:new G().fromArray(s)},weightFactor:{value:(Math.log2(o)-a)/(l-a)}},blending:rr,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=o,this._hdrCapacityMin=a,this._hdrCapacityMax=l,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,379 bytes, line 4068
4068class wD extends Error{}class TD extends Error{}const Ah=(n,e,t)=>{var i;let r;const s=(i=n.attributes.getNamedItem(e))===null||i===void 0?void 0:i.nodeValue;if(s)r=s;else{const o=n.getElementsByTagName(e)[0];if(o){const a=o.getElementsByTagName("rdf:li");if(a.length===3)r=Array.from(a).map(l=>l.innerHTML);else throw new Error(`Gainmap metadata contains an array of items for ${e} but its length is not 3`)}else{if(t)return t;throw new Error(`Can't find ${e} in gainmap metadata`)}}return r},T6=n=>{var e,t;let i;typeof TextDecoder<"u"?i=new TextDecoder().decode(n):i=n.toString();let r=i.indexOf("<x:xmpmeta");const s=new DOMParser;for(;r!==-1;){const o=i.indexOf("x:xmpmeta>",r);i.slice(r,o+10);const a=i.slice(r,o+10);try{const c=s.parseFromString(a,"text/xml").getElementsByTagName("rdf:Description")[0],f=Ah(c,"hdrgm:GainMapMin","0"),d=Ah(c,"hdrgm:GainMapMax"),p=Ah(c,"hdrgm:Gamma","1"),m=Ah(c,"hdrgm:OffsetSDR","0.015625"),v=Ah(c,"hdrgm:OffsetHDR","0.015625");let _=(e=c.attributes.getNamedItem("hdrgm:HDRCapacityMin"))===null||e===void 0?void 0:e.nodeValue;_||(_="0");const x=(t=c.attributes.getNamedItem("hdrgm:HDRCapacityMax"))===null||t===void 0?void 0:t.nodeValue;if(!x)throw new Error("Incomplete gainmap metadata");return{gainMapMin:Array.isArray(f)?f.map(g=>parseFloat(g)):[parseFloat(f),parseFloat(f),parseFloat(f)],gainMapMax:Array.isArray(d)?d.map(g=>parseFloat(g)):[parseFloat(d),parseFloat(d),parseFloat(d)],gamma:Array.isArray(p)?p.map(g=>parseFloat(g)):[parseFloat(p),parseFloat(p),parseFloat(p)],offsetSdr:Array.isArray(m)?m.map(g=>parseFloat(g)):[parseFloat(m),parseFloat(m),parseFloat(m)],offsetHdr:Array.isArray(v)?v.map(g=>parseFloat(g)):[parseFloat(v),parseFloat(v),parseFloat(v)],hdrCapacityMin:parseFloat(_),hdrCapacityMax:parseFloat(x)}}catch{}r=i.indexOf("<x:xmpmeta",o)}};class C6{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,i)=>{const r=this.options.debug,s=new DataView(e.buffer);if(s.getUint16(0)!==65496){i(new Error("Not a valid jpeg"));return}const o=s.byteLength;let a=2,l=0,c;for(;a<o;){if(++l>250){i(new Error(`Found no marker after ${l} loops 😵`));return}if(s.getUint8(a)!==255){i(new Error(`Not a valid marker at offset 0x${a.toString(16)}, found: 0x${s.getUint8(a).toString(16)}`));return}if(c=s.getUint8(a+1),r&&console.log(`Marker: ${c.toString(16)}`),c===226){r&&console.log("Found APP2 marker (0xffe2)");const f=a+4;if(s.getUint32(f)===1297106432){const d=f+4;let p;if(s.getUint16(d)===18761)p=!1;else if(s.getUint16(d)===19789)p=!0;else{i(new Error("No valid endianness marker found in TIFF header"));return}if(s.getUint16(d+2,!p)!==42){i(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const m=s.getUint32(d+4,!p);if(m<8){i(new Error("Not valid TIFF data! (First offset less than 8)"));return}const v=d+m,_=s.getUint16(v,!p),x=v+2;let g=0;for(let I=x;I<x+12*_;I+=12)s.getUint16(I,!p)===45057&&(g=s.getUint32(I+8,!p));const A=v+2+_*12+4,E=[];for(let I=A;I<A+g*16;I+=16){const b={MPType:s.getUint32(I,!p),size:s.getUint32(I+4,!p),dataOffset:s.getUint32(I+8,!p),dependantImages:s.getUint32(I+12,!p),start:-1,end:-1,isFII:!1};b.dataOffset?(b.start=d+b.dataOffset,b.isFII=!1):(b.start=0,b.isFII=!0),b.end=b.start+b.size,E.push(b)}if(this.options.extractNonFII&&E.length){const I=new Blob([s]),b=[];for(const P of E){if(P.isFII&&!this.options.extractFII)continue;const D=I.slice(P.start,P.end+1,"image/jpeg");b.push(D)}t(b)}}}a+=2+s.getUint16(a+2)}})}}const R6=async n=>{const e=T6(n);if(!e)throw new TD("Gain map XMP metadata not found");const i=await new C6({extractFII:!0,extractNonFII:!0}).extract(n);if(i.length!==2)throw new wD("Gain map recovery image not found");return{sdr:new Uint8Array(await i[0].arrayBuffer()),gainMap:new Uint8Array(await i[1].arrayBuffer()),metadata:e}},lb=n=>new Promise((e,t)=>{const i=document.createElement("img");i.onload=()=>{e(i)},i.onerror=r=>{t(r)},i.src=URL.createObjectURL(n)});class CD extends Bi{constructor(e,t){super(t),e&&(this._renderer=e),this._internalLoadingManager=new ty}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 Loa
4068der constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const e=new w6({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 Qt,sdr:new Qt});return new GM({width:16,height:16,type:li,colorSpace:Er,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async render(e,t,i,r){const s=r?new Blob([r],{type:"image/jpeg"}):void 0,o=new Blob([i],{type:"image/jpeg"});let a,l,c=!1;if(typeof createImageBitmap>"u"){const p=await Promise.all([s?lb(s):Promise.resolve(void 0),lb(o)]);l=p[0],a=p[1],c=!0}else{const p=await Promise.all([s?createImageBitmap(s,{imageOrientation:"flipY"}):Promise.resolve(void 0),createImageBitmap(o,{imageOrientation:"flipY"})]);l=p[0],a=p[1]}const f=new Qt(l||new ImageData(2,2),Qa,ei,ei,Ft,sS,Dn,di,1,Er);f.flipY=c,f.needsUpdate=!0;const d=new Qt(a,Qa,ei,ei,Ft,sS,Dn,di,1,jn);d.flipY=c,d.needsUpdate=!0,e.width=a.width,e.height=a.height,e.material.gainMap=f,e.material.sdr=d,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 b6 extends CD{load([e,t,i],r,s,o){const a=this.prepareQuadRenderer();let l,c,f;const d=async()=>{if(l&&c&&f){try{await this.render(a,f,l,c)}catch(O){this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(i),typeof o=="function"&&o(O),a.disposeOnDemandRenderer();return}typeof r=="function"&&r(a),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(i),a.disposeOnDemandRenderer()}};let p=!0,m=0,v=0,_=!0,x=0,g=0,S=!0,A=0,E=0;const I=()=>{if(typeof s=="function"){const O=m+x+A,C=v+g+E,B=p&&_&&S;s(new ProgressEvent("progress",{lengthComputable:B,loaded:C,total:O}))}};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(i);const b=new Ii(this._internalLoadingManager);b.setResponseType("arraybuffer"),b.setRequestHeader(this.requestHeader),b.setPath(this.path),b.setWithCredentials(this.withCredentials),b.load(e,async O=>{if(typeof O=="string")throw new Error("Invalid sdr buffer");l=O,await d()},O=>{p=O.lengthComputable,v=O.loaded,m=O.total,I()},O=>{this.manager.itemError(e),typeof o=="function"&&o(O)});const P=new Ii(this._internalLoadingManager);P.setResponseType("arraybuffer"),P.setRequestHeader(this.requestHeader),P.setPath(this.path),P.setWithCredentials(this.withCredentials),P.load(t,async O=>{if(typeof O=="string")throw new Error("Invalid gainmap buffer");c=O,await d()},O=>{_=O.lengthComputable,g=O.loaded,x=O.total,I()},O=>{this.manager.itemError(t),typeof o=="function"&&o(O)});const D=new Ii(this._internalLoadingManager);return D.setRequestHeader(this.requestHeader),D.setPath(this.path),D.setWithCredentials(this.withCredentials),D.load(i,async O=>{if(typeof O!="string")throw new Error("Invalid metadata string");f=JSON.parse(O),await d()},O=>{S=O.lengthComputable,E=O.loaded,A=O.total,I()},O=>{this.manager.itemError(i),typeof o=="function"&&o(O)}),a}}class I6 extends CD{load(e,t,i,r){const s=this.prepareQuadRenderer(),o=new Ii(this._internalLoadingManager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(this.withCredentials),this.manager.itemStart(e),o.load(e,async a=>{if(typeof a=="string")throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const l=new Uint8Array(a);let c,f,d;try{const p=await R6(l);c=p.sdr,f=p.gainMap,d=p.metadata}catch(p){if(p instanceof TD||p instanceof wD)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),d={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},c=l;else throw p}try{await this.render(s,d,c,f)}catch(p){this.manager.itemError(e),typeof r=="function"&&r(p),s.disposeOnDemandRenderer();return}typeof t=="function"&&t(s),this.manager.itemEnd(e),s.disposeOnDemandRenderer()},i,a=>{this.manager.itemError(e),typeof r=="function"&&r(a)}),s}}const Nd={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"},RD="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",Ju=n=>Array.isArray(n),VM=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"];function iy({files:n=VM,path:e="",preset:t=void 0,encoding:i=void 0,extensions:r}={}){let s=null,o=!1;t&&(WM(t),n=Nd[t],e=RD),o=Ju(n);const{extension:a,isCubemap:l}=XM(n);if(s=jM(a),!s)throw new Error("useEnvironment: Unrecognized file extension: "+n);
4068const c=In(m=>m.gl);ne.useLayoutEffect(()=>{if(a!=="webp"&&a!=="jpg"&&a!=="jpeg")return;function m(){_s.clear(s,o?[n]:n)}c.domElement.addEventListener("webglcontextlost",m,{once:!0})},[n,c.domElement]);const f=_s(s,o?[n]:n,m=>{(a==="webp"||a==="jpg"||a==="jpeg")&&m.setRenderer(c),m.setPath==null||m.setPath(e),r&&r(m)});let d=o?f[0]:f;if(a==="jpg"||a==="jpeg"||a==="webp"){var p;d=(p=d.renderTarget)==null?void 0:p.texture}return d.mapping=l?mo:sf,"colorSpace"in d?d.colorSpace=i??l?"srgb":"srgb-linear":d.encoding=i??l?y6:v6,d}const P6={files:VM,path:"",preset:void 0,extensions:void 0};iy.preload=n=>{const e={...P6,...n};let{files:t,path:i=""}=e;const{preset:r,extensions:s}=e;r&&(WM(r),t=Nd[r],i=RD);const{extension:o}=XM(t);if(o==="webp"||o==="jpg"||o==="jpeg")throw new Error("useEnvironment: Preloading gainmaps is not supported");const a=jM(o);if(!a)throw new Error("useEnvironment: Unrecognized file extension: "+t);_s.preload(a,Ju(t)?[t]:t,l=>{l.setPath==null||l.setPath(i),s&&s(l)})};const B6={files:VM,preset:void 0};iy.clear=n=>{const e={...B6,...n};let{files:t}=e;
4068const{preset:i}=e;i&&(WM(i),t=Nd[i]);const{extension:r}=XM(t),s=jM(r);if(!s)throw new Error("useEnvironment: Unrecognized file extension: "+t);_s.clear(s,Ju(t)?[t]:t)};function WM(n){if(!(n in Nd))throw new Error("Preset must be one of: "+Object.keys(Nd).join(", "))}function XM(n){var e;const t=Ju(n)&&n.length===6,i=Ju(n)&&n.length===3&&n.some(o=>o.endsWith("json")),r=Ju(n)?n[0]:n;return{extension:t?"cube":i?"webp":r.startsWith("data:application/exr")?"exr":r.startsWith("data:application/hdr")?"hdr":r.startsWith("data:image/jpeg")?"jpg":(e=r.split(".").pop())==null||(e=e.split("?"))==null||(e=e.shift())==null?void 0:e.toLowerCase(),isCubemap:t,isGainmap:i}}function jM(n){return n==="cube"?RB:n==="hdr"?h6:n==="exr"?d6:n==="jpg"||n==="jpeg"?I6:n==="webp"?b6:null}const D6=n=>n.current&&n.current.isScene,L6=n=>D6(n)?n.current:n;function JM(n,e,t,i,r={}){var s,o,a,l,c;r={backgroundBlurriness:(s=r.blur)!==null&&s!==void 0?s:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...r};const f=L6(e||t),d=f.background,p=f.environment,m={backgroundBlurriness:f.backgroundBlurriness,backgroundIntensity:f.backgroundIntensity,backgroundRotation:(o=(a=f.backgroundRotation)==null||a.clone==null?void 0:a.clone())!==null&&o!==void 0?o:[0,0,0],environmentIntensity:f.environmentIntensity,environmentRotation:(l=(c=f.environmentRotation)==null||c.clone==null?void 0:c.clone())!==null&&l!==void 0?l:[0,0,0]};return n!=="only"&&(f.environment=i),n&&(f.background=i),Oo(f,r),()=>{n!=="only"&&(f.environment=p),n&&(f.background=d),Oo(f,m)}}function YM({scene:n,background:e=!1,map:t,...i}){const r=In(s=>s.scene);return ne.useLayoutEffect(()=>{if(t)return JM(e,n,r,t,i)}),null}function bD({background:n=!1,scene:e,blur:t,backgroundBlurriness:i,backgroundIntensity:r,backgroundRotation:s,environmentIntensity:o,environmentRotation:a,...l}){const c=iy(l),f=In(d=>d.scene);return ne.useLayoutEffect(()=>JM(n,e,f,c,{blur:t,backgroundBlurriness:i,backgroundIntensity:r,backgroundRotation:s,environmentIntensity:o,environmentRotation:a})),null}function F6({children:n,near:e=1,far:t=1e3,resolution:i=256,frames:r=1,map:s,background:o=!1,blur:a,backgroundBlurriness:l,backgroundIntensity:c,backgroundRotation:f,environmentIntensity:d,environmentRotation:p,scene:m,files:v,path:_,preset:x=void 0,extensions:g}){const S=In(D=>D.gl),A=In(D=>D.scene),E=ne.useRef(null),[I]=ne.useState(()=>new qo),b=ne.useMemo(()=>{const D=new nM(i);return D.texture.type=li,D},[i]);ne.useLayoutEffect(()=>(r===1&&E.current.update(S,I),JM(o,m,A,b.texture,{blur:a,backgroundBlurriness:l,backgroundIntensity:c,backgroundRotation:f,environmentIntensity:d,environmentRotation:p})),[n,I,b.texture,m,A,o,r,S]);let P=1;return ra(()=>{(r===1/0||P<r)&&(E.current.update(S,I),P++)}),ne.createElement(ne.Fragment,null,LV(ne.createElement(ne.Fragment,null,n,ne.createElement("cubeCamera",{ref:E,args:[e,t,b]}),v||x?ne.createElement(bD,{background:!0,files:v,preset:x,path:_,extensions:g}):s?ne.createElement(YM,{background:!0,map:s,extensions:g}):null),I))}function N6(n){var e,t,i,r;const s=iy(n),o=n.map||s;ne.useMemo(()=>FM({GroundProjectedEnvImpl:T8}),[]);const a=ne.useMemo(()=>[o],[o]),l=(e=n.ground)==null?void 0:e.height,c=(t=n.ground)==null?void 0:t.radius,f=(i=(r=n.ground)==null?void 0:r.scale)!==null&&i!==void 0?i:1e3;return ne.createElement(ne.Fragment,null,ne.createElement(YM,pf({},n,{map:o})),ne.createElement("groundProjectedEnvImpl",{args:a,scale:f,height:l,radius:c}))}function ID(n){return n.ground?ne.createElement(N6,n):n.map?ne.createElement(YM,n):n.children?ne.createElement(F6,n):ne.createElement(bD,n)}const W_=`
4069  varying vec2 vUv;
4070  
4071  void main() {
4072    vUv = uv;
4073    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
4074  }
4075`,U6=`
4076  uniform sampler2D waterTexture;
4077  uniform vec2 center;
4078  uniform float radius;
4079  uniform float strength;
4080  varying vec2 vUv;
4081
4082  void main() {
4083    vec4 info = texture2D(waterTexture, vUv);
4084    float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - vUv) / radius);
4085    drop = 0.5 - cos(drop * 3.14159) * 0.5;
4086
4087    float dampingFactor = 1.5;
4088    info.r += drop * strength * dampingFactor;
4089    
4090    gl_FragColor = info;
4091  }
4092`,O6=`
4093  uniform sampler2D waterTexture;
4094  uniform vec2 delta;
4095  varying vec2 vUv;
4096
4097  void main() {
4098    vec4 info = texture2D(waterTexture, vUv);
4099    
4100    vec2 dx = vec2(delta.x, 0.0);
4101    vec2 dy = vec2(0.0, delta.y);
4102    
4103    float average = (
4104      texture2D(waterTexture, vUv - dx).r +
4105      texture2D(waterTexture, vUv - dy).r +
4106      texture2D(waterTexture, vUv + dx).r +
4107      texture2D(waterTexture, vUv + dy).r
4108    ) * 0.25;
4109    
4110    float restingHeight = 0.4;
4111    float springForce = (restingHeight - info.r) * 0.006;
4112    
4113    info.g += (average - info.r) * 0.995 + springForce;
4114    
4115    float heightDiff = abs(info.r - restingHeight);
4116    float dampingFactor = 0.995;
4117    if (info.r > restingHeight) {
4118        dampingFactor = 0.995;
4119    }
4120    info.g *= dampingFactor;
4121    
4122    info.r += info.g * 0.992;
4123    
4124    float mixFactor = 0.0008;
4125    if (info.r > restingHeight) {
4126        mixFactor = 0.005;
4127    }
4128    info.r = mix(info.r, restingHeight, mixFactor);
4129    
4130    info.r = clamp(info.r, 0.2, 0.6);
4131    info.g = clamp(info.g, -0.2, 0.2);
4132    
4133    gl_FragColor = info;
4134  }
4135`,k6=`
4136  uniform sampler2D waterTexture;
4137  uniform vec2 delta;
4138  varying vec2 vUv;
4139
4140  void main() {
4141    vec4 info = texture2D(waterTexture, vUv);
4142    
4143    vec2 dx = vec2(delta.x, 0.0);
4144    vec2 dy = vec2(0.0, delta.y);
4145    
4146    float h0 = texture2D(waterTexture, vUv - dx - dy).r;
4147    float h1 = texture2D(waterTexture, vUv - dy).r;
4148    float h2 = texture2D(waterTexture, vUv + dx - dy).r;
4149    float h3 = texture2D(waterTexture, vUv - dx).r;
4150    float h4 = texture2D(waterTexture, vUv).r;
4151    float h5 = texture2D(waterTexture, vUv + dx).r;
4152    float h6 = texture2D(waterTexture, vUv - dx + dy).r;
4153    float h7 = texture2D(waterTexture, vUv + dy).r;
4154    float h8 = texture2D(waterTexture, vUv + dx + dy).r;
4155    
4156   
4157    float amplitudeScale = 1.5;
4158    float gx = (h2 + 2.0 * h5 + h8 - (h0 + 2.0 * h3 + h6)) * amplitudeScale;
4159    float gy = (h6 + 2.0 * h7 + h8 - (h0 + 2.0 * h1 + h2)) * amplitudeScale;
4160    
4161    if(abs(gx) < 0.01 && abs(gy) < 0.01) {
4162      info.ba = vec2(0.5, 0.5);
4163    } else {
4164      vec2 normal = normalize(vec2(gx, gy));
4165      float intensity = 0.5;
4166      info.ba = normal * intensity + 0.5;
4167    }
4168    
4169    gl_FragColor = info;
4170  }
4171`;function z6(n=256){const e=ne.useMemo(()=>{const o=()=>new xn(n,n,{type:vn,format:Dn,generateMipmaps:!1,minFilter:Ht,magFilter:Ht}),a=()=>new xn(n*2,n*2,{type:vn,format:Dn,generateMipmaps:!0,minFilter:Ht,magFilter:Ht}),l=o(),c=o(),f=a(),d=new qo,p=new xr(-1,1,1,-1,0,1),m=new xo(2,2),v=new yn(m);d.add(v);const _=new nn({uniforms:{waterTexture:{value:null},center:{value:new _e},radius:{value:.05},strength:{value:.03}}
4171,vertexShader:W_,fragmentShader:U6}),x=new nn({uniforms:{waterTexture:{value:null},delta:{value:new _e(1/n,1/n)}},vertexShader:W_,fragmentShader:O6}),g=new nn({uniforms:{waterTexture:{value:null},delta:{value:new _e(1/n,1/n)}},vertexShader:W_,fragmentShader:k6}),S=new nn({uniforms:{waterTexture:{value:null},rotationAngle:{value:Math.PI/2},chromaticAberration:{value:.0085},time:{value:0},resolution:{value:new _e(n,n)}},vertexShader:`
4172        uniform float rotationAngle;
4173        varying vec2 vUv;
4174    
4175        void main() {
4176          float cosAngle = cos(rotationAngle);
4177          float sinAngle = sin(rotationAngle);
4178          mat2 rotationMatrix = mat2(cosAngle, -sinAngle, sinAngle, cosAngle);
4179          
4180          vUv = (rotationMatrix * (uv - 0.5)) + 0.5;
4181          gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
4182        }
4183      `,fragmentShader:`
4184      uniform sampler2D waterTexture;
4185      uniform float chromaticAberration;
4186      uniform float time;
4187      varying vec2 vUv;
4188
4189      float w0(float a) {
4190        return (1.0/6.0) * (a * (a * (-a + 3.0) - 3.0) + 1.0);
4191      }
4192
4193      float w1(float a) {
4194        return (1.0/6.0) * (a * a * (3.0 * a - 6.0) + 4.0);
4195      }
4196
4197      float w2(float a) {
4198        return (1.0/6.0) * (a * (a * (-3.0 * a + 3.0) + 3.0) + 1.0);
4199      }
4200
4201      float w3(float a) {
4202        return (1.0/6.0) * (a * a * a);
4203      }
4204
4205      float g0(float a) {
4206        return w0(a) + w1(a);
4207      }
4208
4209      float g1(float a) {
4210        return w2(a) + w3(a);
4211      }
4212
4213      float h0(float a) {
4214        return -1.0 + w1(a) / (w0(a) + w1(a));
4215      }
4216
4217      float h1(float a) {
4218        return 1.0 + w3(a) / (w2(a) + w3(a));
4219      }
4220
4221      vec4 bicubic(sampler2D tex, vec2 uv, vec4 texelSize, float lod) {
4222        uv = uv * texelSize.zw + 0.5;
4223        vec2 iuv = floor(uv);
4224        vec2 fuv = fract(uv);
4225
4226        float g0x = g0(fuv.x);
4227        float g1x = g1(fuv.x);
4228        float h0x = h0(fuv.x);
4229        float h1x = h1(fuv.x);
4230        float h0y = h0(fuv.y);
4231        float h1y = h1(fuv.y);
4232
4233        vec2 p0 = (vec2(iuv.x + h0x, iuv.y + h0y) - 0.5) * texelSize.xy;
4234        vec2 p1 = (vec2(iuv.x + h1x, iuv.y + h0y) - 0.5) * texelSize.xy;
4235        vec2 p2 = (vec2(iuv.x + h0x, iuv.y + h1y) - 0.5) * texelSize.xy;
4236        vec2 p3 = (vec2(iuv.x + h1x, iuv.y + h1y) - 0.5) * texelSize.xy;
4237
4238        return g0(fuv.y) * (g0x * texture2D(tex, p0) + g1x * texture2D(tex, p1)) +
4239              g1(fuv.y) * (g0x * texture2D(tex, p2) + g1x * texture2D(tex, p3));
4240      }
4241
4242      vec4 textureBicubic(sampler2D tex, vec2 uv) {
4243        vec2 texSize = vec2(256.0);
4244        vec2 texSizeInv = 1.0 / texSize;
4245        return bicubic(tex, uv, vec4(texSizeInv, texSize), 0.0);
4246      }
4247      
4248      vec3 getCausticColor(vec2 uv, float offset) {
4249        vec2 distortedUv = uv + vec2(
4250          sin(uv.y * 20.0 + time) * 0.001,
4251          cos(uv.x * 20.0 + time) * 0.001
4252        );
4253
4254        vec4 heightSample = textureBicubic(waterTexture, distortedUv + vec2(offset));
4255        float height = heightSample.b;
4256        float height2 = heightSample.g;
4257        
4258        float caustic = height - height2;
4259        caustic = abs(caustic);
4260        
4261        float baseValue = .5;
4262        
4263        float sharpLine = smoothstep(0.1, 0.3, caustic) * (1.0 - smoothstep(0.1, 0.32, caustic));
4264        float finalColor = sharpLine * 2.0;
4265        float glow = smoothstep(0.1, 0.9, caustic) * 1.5;
4266        finalColor += glow;
4267        
4268        finalColor = max(baseValue, baseValue + finalColor);
4269        
4270        float brightAreas = max(0.0, finalColor - baseValue);
4271        finalColor = baseValue + brightAreas * 5.;
4272
4273        return vec3(
4274          finalColor * (1.0 + offset * 2.0),
4275          finalColor * (1.0 - offset),
4276          finalColor * (1.0 - offset * 2.0)
4277        );
4278    }
4279
4280    void main() {
4281        vec3 colorR = getCausticColor(vUv, chromaticAberration);
4282        vec3 colorG = getCausticColor(vUv, 0.0);
4283        vec3 colorB = getCausticColor(vUv, -chromaticAberration);
4284        
4285        vec3 finalColor = vec3(
4286          colorR.r * 1.09,
4287          colorG.g * 0.978,
4288          colorB.b * 1.08
4289        );
4290        
4291        float intensity = 1.0 + 0.1;
4292        finalColor *= intensity;
4293        
4294        finalColor = max(vec3(1.0), finalColor);
4295        
4296        gl_FragColor = vec4(finalColor, 1.0);
4297    }
4298    `});
4298return{textureA:l,textureB:c,textureC:f,scene:d,camera:p,mesh:v,dropMaterial:_,updateMaterial:x,normalMaterial:g,heightMaterial:S}},[n]),{gl:t}=In();return ne.useEffect(()=>{e.textureA.texture.minFilter=Ht,e.textureA.texture.magFilter=Ht,e.textureB.texture.minFilter=Ht,e.textureB.texture.magFilter=Ht,e.textureC.texture.minFilter=Ht,e.textureC.texture.magFilter=Ht;const o=new Float32Array(n*n*4);for(let a=0;a<o.length;a+=4)o[a]=0,o[a+1]=0,o[a+2]=0,o[a+3]=0;e.textureA.texture.image={data:o,width:n,height:n},e.textureA.texture.needsUpdate=!0,e.textureB.texture.image={data:[...o],width:n,height:n},e.textureB.texture.needsUpdate=!0,e.textureC.texture.image={data:[...o],width:n,height:n},e.textureC.texture.needsUpdate=!0},[e,n]),/iPad|iPhone|iPod/.test(navigator.userAgent)||/Mac/.test(navigator.userAgent)&&navigator.maxTouchPoints>1||ne.useEffect(()=>{if(t.capabilities.isWebGL2||t.extensions.OES_texture_float_linear){const a=Ft;e.textureA.texture.minFilter=a,e.textureA.texture.magFilter=a,e.textureB.texture.minFilter=a,e.textureB.texture.magFilter=a,e.textureC.texture.minFilter=a,e.textureC.texture.magFilter=a,e.textureA.texture.needsUpdate=!0,e.textureB.texture.needsUpdate=!0,e.textureC.texture.needsUpdate=!0}},[e,t]),{simulation:e,addDrop:(o,a,l,c=.05,f=.03)=>{const d=o.getRenderTarget(),p=c*(.8+Math.random()*.4),m=f*(.9+Math.random()*.2);e.dropMaterial.uniforms.center.value.set(a,l),e.dropMaterial.uniforms.radius.value=p,e.dropMaterial.uniforms.strength.value=m,e.dropMaterial.uniforms.waterTexture.value=e.textureA.texture,e.mesh.material=e.dropMaterial,o.setRenderTarget(e.textureB),o.render(e.scene,e.camera),[e.textureA,e.textureB]=[e.textureB,e.textureA],o.setRenderTarget(d)},stepSimulation:o=>{const a=o.getRenderTarget();e.heightMaterial.uniforms.time.value=performance.now()*.001,e.updateMaterial.uniforms.waterTexture.value=e.textureA.texture,e.mesh.material=e.updateMaterial,o.setRenderTarget(e.textureB),o.render(e.scene,e.camera),[e.textureA,e.textureB]=[e.textureB,e.textureA],e.normalMaterial.uniforms.waterTexture.value=e.textureA.texture,e.mesh.material=e.normalMaterial,o.setRenderTarget(e.textureB),o.render(e.scene,e.camera),[e.textureA,e.textureB]=[e.textureB,e.textureA],e.heightMaterial.uniforms.waterTexture.value=e.textureA.texture,e.mesh.material=e.heightMaterial,o.setRenderTarget(e.textureC),o.render(e.scene,e.camera),o.setRenderTarget(a)},texture:e.textureA.texture,heightTexture:e.textureC.texture}}const H6=`
4299    
4300#ifdef IS_VERTEX
4301    vec3 csm_Position;
4302    vec4 csm_PositionRaw;
4303    vec3 csm_Normal;
4304
4305    // csm_PointSize
4306    #ifdef IS_POINTSMATERIAL
4307        float csm_PointSize;
4308    #endif
4309#else
4310    vec4 csm_DiffuseColor;
4311    vec4 csm_FragColor;
4312    float csm_UnlitFac;
4313
4314    // csm_Emissive, csm_Roughness, csm_Metalness
4315    #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL
4316        vec3 csm_Emissive;
4317        float csm_Roughness;
4318        float csm_Metalness;
4319        float csm_Iridescence;
4320        
4321        #if defined IS_MESHPHYSICALMATERIAL
4322            float csm_Clearcoat;
4323            float csm_ClearcoatRoughness;
4324            vec3 csm_ClearcoatNormal;
4325            float csm_Transmission;
4326            float csm_Thickness;
4327        #endif
4328    #endif
4329
4330    // csm_AO
4331    #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHBASICMATERIAL || defined IS_MESHLAMBERTMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHTOONMATERIAL
4332        float csm_AO;
4333    #endif
4334
4335    // csm_Bump
4336    #if defined IS_MESHLAMBERTMATERIAL || defined IS_MESHMATCAPMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHSTANDARDMATERIAL || defined IS_MESHTOONMATERIAL || defined IS_SHADOWMATERIAL 
4337        vec3 csm_Bump;
4338        vec3 csm_FragNormal;
4339    #endif
4340
4341    float csm_DepthAlpha;
4342#endif
4343`,G6=`
4344
4345#ifdef IS_VERTEX
4346    // csm_Position & csm_PositionRaw
4347    #ifdef IS_UNKNOWN
4348        csm_Position = vec3(0.0);
4349        csm_PositionRaw = vec4(0.0);
4350        csm_Normal = vec3(0.0);
4351    #else
4352        csm_Position = position;
4353        csm_PositionRaw = projectionMatrix * modelViewMatrix * vec4(position, 1.);
4354        csm_Normal = normal;
4355    #endif
4356
4357    // csm_PointSize
4358    #ifdef IS_POINTSMATERIAL
4359        csm_PointSize = size;
4360    #endif
4361#else
4362    csm_UnlitFac = 0.0;
4363
4364    // csm_DiffuseColor & csm_FragColor
4365    #if defined IS_UNKNOWN || defined IS_SHADERMATERIAL || defined IS_MESHDEPTHMATERIAL || defined IS_MESHDISTANCEMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_SHADOWMATERIAL
4366        csm_DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);
4367        csm_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
4368    #else
4369        #ifdef USE_MAP
4370            vec4 _csm_sampledDiffuseColor = texture2D(map, vMapUv);
4371
4372            #ifdef DECODE_VIDEO_TEXTURE
4373            // inline sRGB decode (TODO: Remove this code when https://crbug.com/1256340 is solved)
4374            _csm_sampledDiffuseColor = vec4(mix(pow(_csm_sampledDiffuseColor.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), _csm_sampledDiffuseColor.rgb * 0.0773993808, vec3(lessThanEqual(_csm_sampledDiffuseColor.rgb, vec3(0.04045)))), _csm_sampledDiffuseColor.w);
4375            #endif
4376
4377            csm_DiffuseColor = vec4(diffuse, opacity) * _csm_sampledDiffuseColor;
4378            csm_FragColor = vec4(diffuse, opacity) * _csm_sampledDiffuseColor;
4379        #else
4380            csm_DiffuseColor = vec4(diffuse, opacity);
4381            csm_FragColor = vec4(diffuse, opacity);
4382        #endif
4383    #endif
4384
4385    // csm_Emissive, csm_Roughness, csm_Metalness
4386    #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL
4387        csm_Emissive = emissive;
4388        csm_Roughness = roughness;
4389        csm_Metalness = metalness;
4390
4391        #ifdef USE_IRIDESCENCE
4392            csm_Iridescence = iridescence;
4393        #else
4394            csm_Iridescence = 0.0;
4395        #endif
4396
4397        #if defined IS_MESHPHYSICALMATERIAL
4398            #ifdef USE_CLEARCOAT
4399                csm_Clearcoat = clearcoat;
4400                csm_ClearcoatRoughness = clearcoatRoughness;
4401            #else
4402                csm_Clearcoat = 0.0;
4403                csm_ClearcoatRoughness = 0.0;
4404            #endif
4405
4406            #ifdef USE_TRANSMISSION
4407                csm_Transmission = transmission;
4408                csm_Thickness = thickness;
4409            #else
4410                csm_Transmission = 0.0;
4411                csm_Thickness = 0.0;
4412            #endif
4413        #endif
4414    #endif
4415
4416    // csm_AO
4417    #if defined IS_MESHSTANDARDMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHBASICMATERIAL || defined IS_MESHLAMBERTMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHTOONMATERIAL
4418        csm_AO = 0.0;
4419    #endif
4420
4421    // csm_Bump
4422    #if defined IS_MESHLAMBERTMATERIAL || defined IS_MESHMATCAPMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_MESHPHONGMATERIAL || defined IS_MESHPHYSICALMATERIAL || defined IS_MESHSTANDARDMATERIAL || defined IS_MESHTOONMATERIAL || defined IS_SHADOWMATERIAL 
4423        csm_Bump = vec3(0.0);
4424        #ifdef FLAT_SHADED
4425            vec3 fdx = dFdx( vViewPosition );
4426            vec3 fdy = dFdy( vViewPosition );
4427            csm_FragNormal = normalize( cross( fdx, fdy ) );
4428        #else
4429            csm_FragNormal = normalize(vNormal);
4430            #ifdef DOUBLE_SIDED
4431                csm_FragNormal *= gl_FrontFacing ? 1.0 : - 1.0;
4432            #endif
4433        #endif
4434    #endif
4435
4436    csm_DepthAlpha = 1.0;
4437#endif
4438`,V6=`
4439    varying mat4 csm_internal_vModelViewMatrix;
4440`,W6=`
4441    csm_internal_vModelViewMatrix = modelViewMatrix;
4442`,X6=`
4443    varying mat4 csm_internal_vModelViewMatrix;
4444`,j6=`
4445    
4446`,dt={diffuse:"csm_DiffuseColor",roughness:"csm_Roughness",metalness:"csm_Metalness",emissive:"csm_Emissive",ao:"csm_AO",bump:"csm_Bump",fragNormal:"csm_FragNormal",clearcoat:"csm_Clearcoat",clearcoatRoughness:"csm_ClearcoatRoughness",clearcoatNormal:"csm_ClearcoatNormal",transmission:"csm_Transmission",thickness:"csm_Thickness",iridescence:"csm_Iridescence",pointSize:"csm_PointSize",fragColor:"csm_FragColor",depthAlpha:"csm_DepthAlpha",unlitFac:"csm_UnlitFac",position:"csm_Position",positionRaw:"csm_PositionRaw",normal:"csm_Normal"},J6={[`${dt.position}`]:"*",[`${dt.positionRaw}`]:"*",[`${dt.normal}`]:"*",[`${dt.depthAlpha}`]:"*",[`${dt.pointSize}`]:["PointsMaterial"],[`${dt.diffuse}`]:"*",[`${dt.fragColor}`]:"*",[`${dt.fragNormal}`]:"*",[`${dt.unlitFac}`]:"*",[`${dt.emissive}`]:["MeshStandardMaterial","MeshPhysicalMaterial"],[`${dt.roughness}`]:["MeshStandardMaterial","MeshPhysicalMaterial"],[`${dt.metalness}`]:["MeshStandardMaterial","MeshPhysicalMaterial"],[`${dt.iridescence}`]:["MeshStandardMaterial","MeshPhysicalMaterial"],[`${dt.ao}`]:["MeshStandardMaterial","MeshPhysicalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial"],[`${dt.bump}`]:["MeshLambertMaterial","MeshMatcapMaterial","MeshNormalMaterial","MeshPhongMaterial","MeshPhysicalMaterial","MeshStandardMaterial","MeshToonMaterial","ShadowMaterial"],[`${dt.clearcoat}`]:["MeshPhysicalMaterial"],[`${dt.clearcoatRoughness}`]:["MeshPhysicalMaterial"],[`${dt.clearcoatNormal}`]:["MeshPhysicalMaterial"],[`${dt.transmission}`]:["MeshPhysicalMaterial"],[`${dt.thickness}`]:["MeshPhysicalMaterial"]},Y6={"*":{"#include <lights_physical_fragment>":Bt.lights_physical_fragment,"#include <transmission_fragment>":Bt.transmission_fragment},[`${dt.normal}`]:{"#include <beginnormal_vertex>":`
4447    vec3 objectNormal = ${dt.normal};
4448    #ifdef USE_TANGENT
4449	    vec3 objectTangent = vec3( tangent.xyz );
4450    #endif
4451    `},[`${dt.position}`]:{"#include <begin_vertex>":`
4452    vec3 transformed = ${dt.position};
4453  `},[`${dt.positionRaw}`]:{"#include <begin_vertex>":`
4454    vec4 csm_internal_positionUnprojected = ${dt.positionRaw};
4455    mat4x4 csm_internal_unprojectMatrix = projectionMatrix * modelViewMatrix;
4456    #ifdef USE_INSTANCING
4457      csm_internal_unprojectMatrix = csm_internal_unprojectMatrix * instanceMatrix;
4458    #endif
4459    csm_internal_positionUnprojected = inverse(csm_internal_unprojectMatrix) * csm_internal_positionUnprojected;
4460    vec3 transformed = csm_internal_positionUnprojected.xyz;
4461  `},[`${dt.pointSize}`]:{"gl_PointSize = size;":`
4462    gl_PointSize = ${dt.pointSize};
4463    `},[`${dt.diffuse}`]:{"#include <color_fragment>":`
4464    #include <color_fragment>
4465    diffuseColor = ${dt.diffuse};
4466  `},[`${dt.fragColor}`]:{"#include <opaque_fragment>":`
4467    #include <opaque_fragment>
4468    gl_FragColor = mix(gl_FragColor, ${dt.fragColor}, ${dt.unlitFac});
4469  `},[`${dt.emissive}`]:{"vec3 totalEmissiveRadiance = emissive;":`
4470    vec3 totalEmissiveRadiance = ${dt.emissive};
4471    `},[`${dt.roughness}`]:{"#include <roughnessmap_fragment>":`
4472    #include <roughnessmap_fragment>
4473    roughnessFactor = ${dt.roughness};
4474    `},[`${dt.metalness}`]:{"#include <metalnessmap_fragment>":`
4475    #include <metalnessmap_fragment>
4476    metalnessFactor = ${dt.metalness};
4477    `},[`${dt.ao}`]:{"#include <aomap_fragment>":`
4478    #include <aomap_fragment>
4479    reflectedLight.indirectDiffuse *= 1. - ${dt.ao};
4480    `},[`${dt.bump}`]:{"#include <normal_fragment_maps>":`
4481    #include <normal_fragment_maps>
4482
4483    vec3 csm_internal_orthogonal = ${dt.bump} - (dot(${dt.bump}, normal) * normal);
4484    vec3 csm_internal_projectedbump = mat3(csm_internal_vModelViewMatrix) * csm_internal_orthogonal;
4485    normal = normalize(normal - csm_internal_projectedbump);
4486    `},[`${dt.fragNormal}`]:{"#include <normal_fragment_maps>":`
4487      #include <normal_fragment_maps>
4488      normal = ${dt.fragNormal};
4489    `},[`${dt.depthAlpha}`]:{"gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );":`
4490      gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * 1.0 - ${dt.depthAlpha} );
4491    `,"gl_FragColor = packDepthToRGBA( fragCoordZ );":`
4492      if(${dt.depthAlpha} < 1.0) discard;
4493      gl_FragColor = packDepthToRGBA( dist );
4494    `,"gl_FragColor = packDepthToRGBA( dist );":`
4495      if(${dt.depthAlpha} < 1.0) discard;
4496      gl_FragColor = packDepthToRGBA( dist );
4497    `},[`${dt.clearcoat}`]:{"material.clearcoat = clearcoat;":`material.clearcoat = ${dt.clearcoat};`},[`${dt.clearcoatRoughness}`]:{"material.clearcoatRoughness = clearcoatRoughness;":`material.clearcoatRoughness = ${dt.clearcoatRoughness};`},[`${dt.clearcoatNormal}`]:{"#include <clearcoat_normal_fragment_begin>":`
4498      vec3 csm_coat_internal_orthogonal = csm_ClearcoatNormal - (dot(csm_ClearcoatNormal, nonPerturbedNormal) * nonPerturbedNormal);
4499      vec3 csm_coat_internal_projectedbump = mat3(csm_internal_vModelViewMatrix) * csm_coat_internal_orthogonal;
4500      vec3 clearcoatNormal = normalize(nonPerturbedNormal - csm_coat_internal_projectedbump);
4501    `},[`${dt.transmission}`]:{"material.transmission = transmission;":`
4502      material.transmission = ${dt.transmission};
4503    `},[`${dt.thickness}`]:{"material.thickness = thickness;":`
4504      material.thickness = ${dt.thickness};
4505    `},[`${dt.iridescence}`]:{"material.iridescence = iridescence;":`
4506      material.iridescence = ${dt.iridescence};
4507    `}},K6={clearcoat:[dt.clearcoat,dt.clearcoatNormal,dt.clearcoatRoughness],transmission:[dt.transmission],iridescence:[dt.iridescence]};function Q6(n){let e=0;for(let i=0;i<n.length;i++)e=n.charCodeAt(i)+(e<<6)+(e<<16)-e;const t=e>>>0;return String(t)}function Z6(n){try{new n}catch(e){if(e.message.indexOf("is not a constructor")>=0)return!1}return!0}function cb(n){return n.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,"")}class q6 extends Hn{constructor({baseMaterial:e,vertexShader:t,fragmentShader:i,uniforms:r,patchMap:s,cacheKey:o,...a}){if(!e)throw new Error("CustomShaderMaterial: baseMaterial is required.");let l;if(Z6(e)){const p=Object.keys(a).length===0;l=new e(p?void 0:a)}else l=e,Object.assign(l,a);if(["ShaderMaterial","RawShaderMaterial"].includes(l.type))throw new Error(`CustomShaderMaterial does not support ${l.type} as a base material.`);super(),this.uniforms={},this.vertexShader="",this.fragmentShader="";const c=l;c.name=`CustomShaderMaterial<${l.name||l.type}>
4507`,c.update=this.update.bind(c),c.__csm={prevOnBeforeCompile:l.onBeforeCompile};const f={...c.uniforms||{},...r||{}};c.uniforms=this.uniforms=f,c.vertexShader=this.vertexShader=t||"",c.fragmentShader=this.fragmentShader=i||"",c.update({fragmentShader:c.fragmentShader,vertexShader:c.vertexShader,uniforms:c.uniforms,patchMap:s,cacheKey:o}),Object.assign(this,c);const d=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(c));for(const p in d){const m=d[p];(m.get||m.set)&&Object.defineProperty(this,p,m)}return this}update({fragmentShader:e,vertexShader:t,uniforms:i,cacheKey:r,patchMap:s}){const o=cb(t||""),a=cb(e||""),l=this;i&&(l.uniforms=i),t&&(l.vertexShader=t),e&&(l.fragmentShader=e),Object.entries(K6).forEach(([p,m])=>{for(const v in m){const _=m[v];(a&&a.includes(_)||o&&o.includes(_))&&(l[p]||(l[p]=1))}});const c=l.__csm.prevOnBeforeCompile,f=(p,m,v)=>{var _;let x,g="";if(m){const S=/void\s+main\s*\(\s*\)[^{]*{((?:[^{}]+|{(?:[^{}]+|{(?:[^{}]+|{(?:[^{}]+|{[^{}]*})*})*})*})*})/gm;x=(_=m.matchAll(S).next().value)==null?void 0:_[1],x&&(x=x.slice(0,-1));const A=/void\s+main\s*\(\s*\)\s*{/gm,E=m.search(A);g=m.slice(0,E)}if(v&&m&&m.includes(dt.fragColor)&&x&&(x=`csm_UnlitFac = 1.0;
4508`+x),p.includes("//~CSM_DEFAULTS")){p=p.replace("void main() {",`
4509          // THREE-CustomShaderMaterial by Faraz Shaikh: https://github.com/FarazzShaikh/THREE-CustomShaderMaterial
4510  
4511          ${g}
4512          
4513          void main() {
4514          `);const S=p.lastIndexOf("//~CSM_MAIN_END");if(S!==-1){const A=`
4515            ${x?`${x}`:""}
4516            //~CSM_MAIN_END
4517          `;p=p.slice(0,S)+A+p.slice(S)}}else{const S=/void\s*main\s*\(\s*\)\s*{/gm;p=p.replace(S,`
4518          // THREE-CustomShaderMaterial by Faraz Shaikh: https://github.com/FarazzShaikh/THREE-CustomShaderMaterial
4519  
4520          //~CSM_DEFAULTS
4521          ${v?X6:V6}
4522          ${H6}
4523  
4524          ${g}
4525          
4526          void main() {
4527            {
4528              ${G6}
4529            }
4530            ${v?j6:W6}
4531
4532            ${x?`${x}`:""}
4533            //~CSM_MAIN_END
4534          `)}return p};l.onBeforeCompile=(p,m)=>{c==null||c(p,m);const v=s||{},_=l.type,x=_?`#define IS_${_.toUpperCase()};
4535`:`#define IS_UNKNOWN;
4536`;p.vertexShader=x+`#define IS_VERTEX
4537`+p.vertexShader,p.fragmentShader=x+`#define IS_FRAGMENT
4538`+p.fragmentShader;const g=S=>{for(const A in S){const E=A==="*"||o&&o.includes(A);if(A==="*"||a&&a.includes(A)||E){const I=J6[A];if(I&&I!=="*"&&(Array.isArray(I)?!I.includes(_):I!==_)){console.error(`CustomShaderMaterial: ${A} is not available in ${_}. Shader cannot compile.`);return}const b=S[A];for(const P in b){const D=b[P];if(typeof D=="object"){const O=D.type,C=D.value;O==="fs"?p.fragmentShader=p.fragmentShader.replace(P,C):O==="vs"&&(p.vertexShader=p.vertexShader.replace(P,C))}else D&&(p.vertexShader=p.vertexShader.replace(P,D),p.fragmentShader=p.fragmentShader.replace(P,D))}}}};g(Y6),g(v),p.vertexShader=f(p.vertexShader,o,!1),p.fragmentShader=f(p.fragmentShader,a,!0),i&&(p.uniforms={...p.uniforms,...l.uniforms}),l.uniforms=p.uniforms};const d=l.customProgramCacheKey;l.customProgramCacheKey=()=>((r==null?void 0:r())||Q6((o||"")+(a||"")))+(d==null?void 0:d.call(l)),l.needsUpdate=!0}}var PD={exports:{}},Mh={};/**
4539 * @license React
4540 * react-jsx-runtime.production.min.js
4541 *
4542 * Copyright (c) Facebook, Inc. and its affiliates.
4543 *
4544 * This source code is licensed under the MIT license found in the
4545 * LICENSE file in the root directory of this source tree.
4546 */var ub;function $6(){if(ub)return Mh;ub=1;var n=hc,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,r=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,d={},p=null,m=null;c!==void 0&&(p=""+c),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(m=l.ref);for(f in l)i.call(l,f)&&!s.hasOwnProperty(f)&&(d[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)d[f]===void 0&&(d[f]=l[f]);return{$$typeof:e,type:a,key:p,ref:m,props:d,_owner:r.current}}return Mh.Fragment=t,Mh.jsx=o,Mh.jsxs=o,Mh}PD.exports=$6();var e9=PD.exports;function t9(n,e){const t=ne.useRef(!1);ne.useEffect(()=>{if(t.current)return n();t.current=!0},e)}function n9({baseMaterial:n,vertexShader:e,fragmentShader:t,uniforms:i,cacheKey:r,patchMap:s,attach:o,...a},l){const c=ne.useMemo(()=>new q6({baseMaterial:n,vertexShader:e,fragmentShader:t,uniforms:i,cacheKey:r,patchMap:s,...a}),[n]);return t9(()=>{c.update({vertexShader:e,fragmentShader:t,uniforms:i,patchMap:s,cacheKey:r})},[e,t,i,s,r]),ne.useEffect(()=>()=>c.dispose(),[c]),e9.jsx("primitive",{ref:l,attach:o??"material",object:c,...a})}const i9=ne.forwardRef(n9),r9=`
4547uniform sampler2D tNormals;
4548varying vec2 vUv;
4549varying vec3 vPosition;
4550varying vec3 vCustomNormals;
4551
4552void main() {
4553  vUv = uv;
4554  vec4 info = texture2D(tNormals, vUv);
4555  vec3 displaced = position;
4556  displaced.z = clamp(info.r, -1.0, 1.0) * 0.5 - 0.01;
4557  vPosition = displaced;
4558  float texelSize = 1.0 / 256.0;
4559  float heightN = texture2D(tNormals, vUv + vec2(0.0, texelSize)).r;
4560  float heightS = texture2D(tNormals, vUv + vec2(0.0, -texelSize)).r;
4561  float heightE = texture2D(tNormals, vUv + vec2(texelSize, 0.0)).r;
4562  float heightW = texture2D(tNormals, vUv + vec2(-texelSize, 0.0)).r;
4563
4564  vec3 normalCustom = normalize(vec3(
4565    (heightW - heightE) * 80.0,
4566    1.0,
4567    (heightS - heightN) * 80.0
4568  ));
4569
4570  vCustomNormals = normalize(mat3(modelMatrix) * normalCustom);
4571  csm_Position =  vec3(displaced);
4572  csm_Normal =  vec3(vCustomNormals);
4573}
4574`,s9=Symbol(),KM=Symbol(),Dh="a",BD="f",fb="p",DD="c",LD="t",X_="n",j_="g",QM="h",td="w",ZM="o",qM="k";let o9=(n,e)=>new Proxy(n,e);const TS=Object.getPrototypeOf,CS=new WeakMap,FD=n=>n&&(CS.has(n)?CS.get(n):TS(n)===Object.prototype||TS(n)===Array.prototype),q0=n=>typeof n=="object"&&n!==null,a9=n=>Object.values(Object.getOwnPropertyDescriptors(n)).some(e=>!e.configurable&&!e.writable),l9=n=>{if(Array.isArray(n))return Array.from(n);const e=Object.getOwnPropertyDescriptors(n);return Object.values(e).forEach(t=>{t.configurable=!0}),Object.create(TS(n),e)},c9=(n,e)=>{const t={[BD]:e};let i=!1;const r=(a,l)=>{if(!i){let c=t[Dh].get(n);if(c||(c={},t[Dh].set(n,c)),a===td)c[td]=!0;else{let f=c[a];f||(f=new Set,c[a]=f),f.add(l)}}},s=()=>{i=!0,t[Dh].delete(n)},o={get(a,l){return l===KM?n:(r(qM,l),ND(Reflect.get(a,l),t[Dh],t[DD],t[LD]))},has(a,l){return l===s9?(s(),!0):(r(QM,l),Reflect.has(a,l))},getOwnPropertyDescriptor(a,l){return r(ZM,l),Reflect.getOwnPropertyDescriptor(a,l)},ownKeys(a){return r(td),Reflect.ownKeys(a)}};return e&&(o.set=o.deleteProperty=()=>!1),[o,t]},$M=n=>n[KM]||n,ND=(n,e,t,i)=>{if(!FD(n))return n;let r=i&&i.get(n);if(!r){const l=$M(n);a9(l)?r=[l,l9(l)]:r=[l],i==null||i.set(n,r)}const[s,o]=r;let a=t&&t.get(s);return(!a||a[1][BD]!==!!o)&&(a=c9(s,!!o),a[1][fb]=o9(o||s,a[0]),t&&t.set(s,a)),a[1][Dh]=e,a[1][DD]=t,a[1][LD]=i,a[1][fb]},u9=(n,e)=>{const t=Reflect.ownKeys(n),i=Reflect.ownKeys(e);return t.length!==i.length||t.some((r,s)=>r!==i[s])},UD=(n,e,t,i,r=Object.is)=>{if(r(n,e))return!1;if(!q0(n)||!q0(e))return!0;const s=t.get($M(n));if(!s)return!0;if(i){const a=i.get(n);if(a&&a[X_]===e)return a[j_];i.set(n,{[X_]:e,[j_]:!1})}let o=null;try{for(const a of s[QM]||[])if(o=Reflect.has(n,a)!==Reflect.has(e,a),o)return o;if(s[td]===!0){if(o=u9(n,e),o)return o}else for(const a of s[ZM]||[]){const l=!!Reflect.getOwnPropertyDescriptor(n,a),c=!!Reflect.getOwnPropertyDescriptor(e,a);if(o=l!==c,o)return o}for(const a of s[qM]||[])if(o=UD(n[a],e[a],t,i,r),o)return o;return o===null&&(o=!0),o}finally{i&&i.set(n,{[X_]:e,[j_]:o})}},f9=n=>FD(n)&&n[KM]||null,hb=(n,e=!0)=>{CS.set(n,e)},h9=(n,e,t)=>{const i=[],r=new WeakSet,s=(o,a)=>{var l,c,f;if(r.has(o))return;q0(o)&&r.add(o);const d=q0(o)&&e.get($M(o));if(d){if((l=d[QM])===null||l===void 0||l.forEach(p=>{const m=`:has(${String(p)})`;i.push(a?[...a,m]:[m])}),d[td]===!0){const p=":ownKeys";i.push(a?[...a,p]:[p])}else(c=d[ZM])===null||c===void 0||c.forEach(p=>{const m=`:hasOwn(${String(p)})`;i.push(a?[...a,m]:[m])});(f=d[qM])===null||f===void 0||f.forEach(p=>{"value"in(Object.getOwnPropertyDescriptor(o,p)||{})&&s(o[p],a?[...a,p]:[p])})}else a&&i.push(a)};return s(n),i},$0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_VERCEL_ENV:"production",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Anderson Mancini",VITE_VERCEL_GIT_COMMIT_MESSAGE:"Update vite.config.js",VITE_VERCEL_GIT_COMMIT_REF:"almost-final-version",VITE_VERCEL_GIT_COMMIT_SHA:"d120f693d0070195e351f8773199e36a55583a01",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_PULL_REQUEST_ID:"",VITE_VERCEL_GIT_REPO_ID:"",VITE_VERCEL_GIT_REPO_OWNER:"ektogamat",VITE_VERCEL_GIT_REPO_SLUG:"water-simulation",VITE_VERCEL_PROJECT_PRODUCTION_URL:"water-simulation.vercel.app",VITE_VERCEL_URL:"water-simulation-pbvfnak7v-andersonmancini.vercel.app"},eE=n=>typeof n=="object"&&n!==null,d9=n=>eE(n)&&!tE.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer)&&!(n instanceof Promise),OD=(n,e)=>{const t=db.get(n);if((t==null?void 0:t[0])===e)return t[1];const i=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));
4574return hb(i,!0),db.set(n,[e,i]),Reflect.ownKeys(n).forEach(r=>{if(Object.getOwnPropertyDescriptor(i,r))return;const s=Reflect.get(n,r),{enumerable:o}=Reflect.getOwnPropertyDescriptor(n,r),a={value:s,enumerable:o,configurable:!0};if(tE.has(s))hb(s,!1);else if(Ec.has(s)){const[l]=Ec.get(s);a.value=OD(l,e)}Object.defineProperty(i,r,a)}),Object.preventExtensions(i)},p9=(n,e,t,i)=>({deleteProperty(r,s){const o=Reflect.get(r,s);t(s);const a=Reflect.deleteProperty(r,s);return a&&i(["delete",[s],o]),a},set(r,s,o,a){const l=!n()&&Reflect.has(r,s),c=Reflect.get(r,s,a);if(l&&(pb(c,o)||ev.has(o)&&pb(c,ev.get(o))))return!0;t(s),eE(o)&&(o=f9(o)||o);const f=!Ec.has(o)&&g9(o)?kD(o):o;return e(s,f),Reflect.set(r,s,f,a),i(["set",[s],o,c]),!0}}),Ec=new WeakMap,tE=new WeakSet,db=new WeakMap,_g=[1,1],ev=new WeakMap;let pb=Object.is,m9=(n,e)=>new Proxy(n,e),g9=d9,v9=OD,y9=p9;function kD(n={}){if(!eE(n))throw new Error("object required");const e=ev.get(n);if(e)return e;let t=_g[0];const i=new Set,r=(x,g=++_g[0])=>{t!==g&&(t=g,i.forEach(S=>S(x,g)))};let s=_g[1];const o=(x=++_g[1])=>(s!==x&&!i.size&&(s=x,l.forEach(([g])=>{const S=g[1](x);S>t&&(t=S)})),t),a=x=>(g,S)=>{const A=[...g];A[1]=[x,...A[1]],r(A,S)},l=new Map,c=(x,g)=>{const S=!tE.has(g)&&Ec.get(g);if(S){if(($0?"production":void 0)!=="production"&&l.has(x))throw new Error("prop listener already exists");if(i.size){const A=S[2](a(x));l.set(x,[S,A])}else l.set(x,[S])}},f=x=>{var g;const S=l.get(x);S&&(l.delete(x),(g=S[1])==null||g.call(S))},d=x=>(i.add(x),i.size===1&&l.forEach(([S,A],E)=>{if(($0?"production":void 0)!=="production"&&A)throw new Error("remove already exists");const I=S[2](a(E));l.set(E,[S,I])}),()=>{i.delete(x),i.size===0&&l.forEach(([S,A],E)=>{A&&(A(),l.set(E,[S]))})});let p=!0;const m=y9(()=>p,c,f,r),v=m9(n,m);ev.set(n,v);const _=[n,o,d];return Ec.set(v,_),Reflect.ownKeys(n).forEach(x=>{const g=Object.getOwnPropertyDescriptor(n,x);"value"in g&&g.writable&&(v[x]=n[x])}),p=!1,v}function zD(n,e,t){const i=Ec.get(n);($0?"production":void 0)!=="production"&&!i&&console.warn("Please use proxy object");let r;const s=[],o=i[2];let a=!1;const c=o(f=>{s.push(f),r||(r=Promise.resolve().then(()=>{r=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,c()}}function mb(n){const e=Ec.get(n);($0?"production":void 0)!=="production"&&!e&&console.warn("Please use proxy object");const[t,i]=e;return v9(t,i())}const x9={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_VERCEL_ENV:"production",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Anderson Mancini",VITE_VERCEL_GIT_COMMIT_MESSAGE:"Update vite.config.js",VITE_VERCEL_GIT_COMMIT_REF:"almost-final-version",VITE_VERCEL_GIT_COMMIT_SHA:"d120f693d0070195e351f8773199e36a55583a01",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_PULL_REQUEST_ID:"",VITE_VERCEL_GIT_REPO_ID:"",VITE_VERCEL_GIT_REPO_OWNER:"ektogamat",VITE_VERCEL_GIT_REPO_SLUG:"water-simulation",VITE_VERCEL_PROJECT_PRODUCTION_URL:"water-simulation.vercel.app",VITE_VERCEL_URL:"water-simulation-pbvfnak7v-andersonmancini.vercel.app"},_9=(n,e)=>{const t=ne.useRef();ne.useEffect(()=>{t.current=h9(n,e)}),ne.useDebugValue(t.current)},S9=_9,A9=new WeakMap;function As(n,e){const i=ne.useMemo(()=>n&&new WeakMap,[n]),r=ne.useRef();let s=!0;const o=ne.useSyncExternalStore(ne.useCallback(l=>{const c=zD(n,l);return l(),c},[n,void 0]),()=>{const l=mb(n);try{if(!s&&r.current&&!UD(r.current,l,i,new WeakMap))return r.current}catch{}return l},()=>mb(n));s=!1,ne.useLayoutEffect(()=>{r.current=o}),(x9?"production":void 0)!=="production"&&S9(o,i);const a=ne.useMemo(()=>new WeakMap,[]);return ND(o,i,a,A9)}const kt=kD({openedPanel:null,qualitySettings:localStorage.getItem("qualitySettings")?localStorage.getItem("qualitySettings"):"balanced",lightPosition:[-2,3.5,0],waterColor:{hue:180,saturation:100,luminosity:80,alpha:1},waterRoughness:0,luminosity:90,currentEnvironment:localStorage.getItem("selectedEnvironment")||"sky",isMobile:window.innerWidth<768,controlsEnabled:!0,currentObject:localStorage.getItem("selectedObject")||"shark",finishedLoadingAsset:!1,dive:!1});zD(kt,()=>{localStorage.setItem("selectedObject",kt.currentObject),localStorage.setItem("selectedEnvironment",kt.currentEnvironment),localStorage.setItem("qualitySettings",kt.qualitySettings)});function M9(){const{gl:n}=In(),{waterColor:e,waterRoughness:t,lightPosition:i}=As(kt),r=ne.useRef(),{simulation:s,addDrop:o,stepSimulation:a,texture:l,he
4574ightTexture:c}=z6(256),f=ne.useMemo(()=>{const g=new xo(3.99,3.99,128,128);return g.computeVertexNormals(),g},[]),d=new jt;d.position.set(-.5,0,0);const p=hc.useRef();ne.useEffect(()=>{const g=setInterval(()=>{const S=Math.random();if(S<.4){const A=Math.random()*2-1,E=Math.random()*2-1,I=2+Math.floor(Math.random()*3);for(let b=0;b<I;b++){const P=Math.random()*Math.PI*2,D=.05+Math.random()*.1,O=A+Math.cos(P)*D,C=E+Math.sin(P)*D;o(n,O,C,.02,.04)}}else if(S<.7){const A=Math.random()*2-1,E=Math.random()*2-1;o(n,A,E,.06,.2)}else{const A=Math.random()*2-1,E=Math.random()*2-1;o(n,A,E,.02,.03)}},2e3+Math.random()*2e3);return()=>clearInterval(g)},[]),ne.useEffect(()=>{for(let g=0;g<10;g++){const S=Math.random()*2-1,A=Math.random()*2-1;o(n,S,A,.15,.2)}},[]),ra(g=>{for(let S=0;S<3;S++)a(n)});const m=ne.useMemo(()=>new sr({color:new qe(`hsl(${e.hue}, ${e.saturation}%, ${e.luminosity}%)`).getHex(),roughness:t,metalness:0,clearcoat:.05,clearcoatRoughness:.1,specularIntensity:.2,side:fi,transmission:1,ior:1.935,thickness:-.15}),[e,t]),v=ne.useRef(0),_=ne.useRef({x:0,y:0}),x=g=>{const S=performance.now(),A=g.uv.x*2-1,E=g.uv.y*2-1,I=A-_.current.x,b=E-_.current.y,D=Math.sqrt(I*I+b*b)*10,O=Math.min(.04,.02+D*.1),C=Math.min(.08,.03+D*.2);o(n,A,E,O,C),v.current=S,_.current={x:A,y:E}};return re.jsxs(re.Fragment,{children:[re.jsx("mesh",{geometry:f,rotation:[-Math.PI/2,0,0],position:[0,-.25,0],onPointerMove:x,children:re.jsx(i9,{ref:r,baseMaterial:m,vertexShader:r9,uniforms:{tNormals:{value:l}}})}),re.jsx("spotLight",{position:i,intensity:2.5,angle:.55,color:"white",penumbra:.2,decay:0,"shadow-mapSize":[512,512],castShadow:!0,ref:p,target:d,map:c})]})}function Sg({texture:n,...e}){const{waterRoughness:t,waterColor:i}=As(kt),r=ne.useMemo(()=>new sr({map:n.colorMap,roughnessMap:n.roughnessMap,normalMap:n.normalMap,color:"#a1b8c8",side:Xr}),[n]),s=ne.useMemo(()=>new sr({transparent:!0,transmission:1,thickness:.2,roughness:t,color:new qe(`hsl(${i.hue-.001}, ${i.saturation}%, ${i.luminosity-.2}%)`).getHex(),side:ai}),[t,i]);return re.jsxs("group",{...e,children:[re.jsxs("mesh",{castShadow:!0,receiveShadow:!0,children:[re.jsx("planeGeometry",{args:[4,2]}),re.jsx("primitive",{object:r,attach:"material"})]}),re.jsxs("mesh",{frustumCulled:!1,position:[0,0,.001],children:[re.jsx("planeGeometry",{args:[4,2]}),re.jsx("primitive",{object:s,attach:"material"})]})]})}function E9(){const n=HM({colorMap:"/tiles_color.jpg",roughnessMap:"/tiles_roughness.jpg",normalMap:"/tiles_normal.jpg"});return re.jsxs("group",{position:[0,-1,0],children:[re.jsx(Sg,{position:[0,0,2],rotation:[0,Math.PI,0],texture:n}),re.jsx(Sg,{position:[0,0,-2],texture:n}),re.jsx(Sg,{position:[-2,0,0],rotation:[0,Math.PI/2,0],texture:n}),re.jsx(Sg,{position:[2,0,0],rotation:[0,-Math.PI/2,0],texture:n}),re.jsxs("mesh",{position:[0,-1,0],rotation:[-Math.PI/2,0,0],receiveShadow:!0,children:[re.jsx("planeGeometry",{args:[4,4]}),re.jsx("meshPhysicalMaterial",{map:n.colorMap,specularIntensity:.3,normalMap:n.normalMap,roughnessMap:n.roughnessMap,normalScale:[0,.1],color:"#535d63",roughness:.45,side:fi})]})]})}function w9({children:n,onChange:e,visible:t=!1}){const i=ne.useRef(),{camera:r}=In();ne.useEffect(()=>{i.current&&i.current.geometry.computeBoundingBox()},[]);let s;return ra(()=>{if(i.current&&i.current.geometry.boundingBox){const o=new G;r.getWorldPosition(o);const a=o.clone();i.current.worldToLocal(a),s=i.current.geometry.boundingBox.containsPoint(a),e==null||e(s)}}),re.jsx(re.Fragment,{children:re.jsxs("mesh",{ref:i,visible:t,position:[0,-1,0],children:[re.jsx("boxGeometry",{args:[4.001,1.95,4.01]}),re.jsx("meshBasicMaterial",{color:"#00cdff",transparent:!0,opacity:t?.2:0,side:Xr,depthWrite:!1})]})})}function HD(){const[n,e]=ne.useState(!1),t=hc.useCallback(({visible:i=!1})=>re.jsx(w9,{onChange:e,visible:i}),[]);return[n,t]}function T9(){const[n,e]=HD(),t=ne.useMemo(()=>new nn({vertexShader:`
4575      void main() {
4576        gl_Position = vec4(position, 1.0);
4577      }
4578      `,fragmentShader:`
4579      void main() {
4580        gl_FragColor = vec4(0.28, 0.63, 0.63, 0.3);
4581      }
4582      `,transparent:!0,depthWrite:!1}),[n]);
4582return re.jsxs(re.Fragment,{children:[re.jsx("mesh",{frustumCulled:!1,visible:n,material:t,children:re.jsx("planeGeometry",{args:[2,2]})}),re.jsx(e,{visible:!1})]})}function C9(n){const e=ne.useRef(),{nodes:t,materials:i,animations:r}=fp("/great_white_shark.glb"),{actions:s}=MD(r,e);return ne.useEffect(()=>{r.forEach(o=>{s[o.name].play(),s[o.name].loop=!0,s[o.name].timeScale=.6}),i.GreatWhite.roughness=.25}),re.jsx("group",{ref:e,...n,dispose:null,children:re.jsx("group",{name:"Sketchfab_Scene",children:re.jsx("group",{name:"Sketchfab_model",rotation:[-Math.PI/2,0,0],children:re.jsx("group",{name:"root",children:re.jsx("group",{name:"GLTF_SceneRootNode",rotation:[Math.PI/2,0,0],children:re.jsxs("group",{name:"GLTF_created_0",children:[re.jsx("primitive",{object:t.GLTF_created_0_rootJoint}),re.jsx("skinnedMesh",{name:"Object_7",geometry:t.Object_7.geometry,material:i.GreatWhite,skeleton:t.Object_7.skeleton,castShadow:!0,receiveShadow:!0}),re.jsx("group",{name:"GreatWhite_75",children:re.jsx("group",{name:"GreatWhite_76"})})]})})})})})})}function R9(n){const e=ne.useRef(),{nodes:t,materials:i,animations:r}=fp("/turtle.glb"),{actions:s}=MD(r,e);return ne.useEffect(()=>{s.Animation_Armature.play(),s.Animation_Armature.loop=!0,s.Animation_Armature.timeScale=1.2,i.Material_0.roughness=.15,i.Material_0.metalness=.9,i.Material_0.clearcoat=1,i.Material_0.clearcoatRoughness=0,i.Material_0.envMapIntensity=.5}),re.jsx("group",{ref:e,...n,dispose:null,children:re.jsx("group",{name:"Sketchfab_Scene",children:re.jsx("group",{name:"Sketchfab_model",rotation:[-Math.PI/2,0,0],children:re.jsx("group",{name:"root",children:re.jsx("group",{name:"GLTF_SceneRootNode",rotation:[Math.PI/2,0,0],children:re.jsx("group",{name:"Turtle_44",children:re.jsxs("group",{name:"GLTF_created_0",children:[re.jsx("primitive",{object:t.GLTF_created_0_rootJoint}),re.jsx("skinnedMesh",{name:"Object_7",geometry:t.Object_7.geometry,material:i.Material_0,skeleton:t.Object_7.skeleton,castShadow:!0,receiveShadow:!0}),re.jsx("group",{name:"Turtle_Green_43"})]})})})})})})})}/**
4583 * postprocessing v6.36.3 build Thu Sep 26 2024
4584 * https://github.com/pmndrs/postprocessing
4585 * Copyright 2015-2024 Raoul van Rüschen
4586 * @license Zlib
4587 */var J_=1/1e3,b9=1e3,I9=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(n){typeof document<"u"&&document.hidden!==void 0&&(n?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=n)}get delta(){return this._delta*J_}get fixedDelta(){return this._fixedDelta*J_}set fixedDelta(n){this._fixedDelta=n*b9}get elapsed(){return this._elapsed*J_}update(n){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(n!==void 0?n:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(n){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},P9=(()=>{const n=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),e=new Float32Array([0,0,2,0,0,2]),t=new bt;return t.setAttribute("position",new Yt(n,3)),t.setAttribute("uv",new Yt(e,2)),t})(),Cr=class RS{static get fullscreenGeometry(){return P9}constructor(e="Pass",t=new qo,i=new wf){this.name=e,this.renderer=null,this.scene=t,this.camera=i,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){const t=this.fullscreenMaterial;t!==null&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(e){let t=this.screen;t!==null?t.material=e:(t=new yn(RS.fullscreenGeometry,e),t.frustumCulled=!1,this.scene===null&&(this.scene=new qo),this.scene.add(t),this.screen=t)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}
vendor: 16,418 bytes, lines 4587-4597
4587setDepthTexture(e,t=ol){}render(e,t,i,r,s){throw new Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,i){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof xn||t instanceof Hn||t instanceof Qt||t instanceof RS)&&this[e].dispose()}this.fullscreenMaterial!==null&&this.fullscreenMaterial.dispose()}},B9=class extends Cr{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(n,e,t,i,r){const s=n.state.buffers.stencil;s.setLocked(!1),s.setTest(!1)}},D9=`#include <common>
4588#include <dithering_pars_fragment>
4589#ifdef FRAMEBUFFER_PRECISION_HIGH
4590uniform mediump sampler2D inputBuffer;
4591#else
4592uniform lowp sampler2D inputBuffer;
4593#endif
4594uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel;
4595#include <colorspace_fragment>
4596#include <dithering_fragment>
4597}`,nE="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",L9=class extends nn{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new Lt(null),opacity:new Lt(1)},blending:rr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:D9,vertexShader:nE})}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}getOpacity(n){return this.uniforms.opacity.value}setOpacity(n){this.uniforms.opacity.value=n}},GD=class extends Cr{constructor(n,e=!0){super("CopyPass"),this.fullscreenMaterial=new L9,this.needsSwap=!1,this.renderTarget=n,n===void 0&&(this.renderTarget=new xn(1,1,{minFilter:Ft,magFilter:Ft,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=e}get resize(){return this.autoResize}set resize(n){this.autoResize=n}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(n){this.autoResize=n}render(n,e,t,i,r){this.fullscreenMaterial.inputBuffer=e.texture,n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){this.autoResize&&this.renderTarget.setSize(n,e)}initialize(n,e,t){t!==void 0&&(this.renderTarget.texture.type=t,t!==di?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":n!==null&&n.outputColorSpace===jn&&(this.renderTarget.texture.colorSpace=jn))}},gb=new qe,VD=class extends Cr{constructor(n=!0,e=!0,t=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=n,this.depth=e,this.stencil=t,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(n,e,t){this.color=n,this.depth=e,this.stencil=t}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(n){this.overrideClearColor=n}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(n){this.overrideClearAlpha=n}render(n,e,t,i,r){const s=this.overrideClearColor,o=this.overrideClearAlpha,a=n.getClearAlpha(),l=s!==null,c=o>=0;l?(n.getClearColor(gb),n.setClearColor(s,c?o:a)):c&&n.setClearAlpha(o),n.setRenderTarget(this.renderToScreen?null:e),n.clear(this.color,this.depth,this.stencil),l?n.setClearColor(gb,a):c&&n.setClearAlpha(a)}},F9=class extends Cr{constructor(n,e){super("MaskPass",n,e),this.needsSwap=!1,this.clearPass=new VD(!1,!1,!0),this.inverse=!1}set mainScene(n){this.scene=n}set mainCamera(n){this.camera=n}get inverted(){return this.inverse}set inverted(n){this.inverse=n}get clear(){return this.clearPass.enabled}set clear(n){this.clearPass.enabled=n}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(n){this.inverted=n}render(n,e,t,i,r){const s=n.getContext(),o=n.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,f=this.inverted?0:1,d=1-f;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),o.stencil.setFunc(s.ALWAYS,f,4294967295),o.stencil.setClear(d),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(n,null):(c.render(n,e),c.render(n,t))),this.renderToScreen?(n.setRenderTarget(null),n.render(a,l)):(n.setRenderTarget(e),n.render(a,l),n.setRenderTarget(t),n.render(a,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(s.EQUAL,1,4294967295),o.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),o.stencil.setLocked(!0)}},N9=class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:i=!1,multisampling:r=0,frameBufferType:s}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,i,s,r),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new GD,this.depthTexture=null,this.passes=[],this.timer=new I9,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,i=this.multisampling;i>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):i!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){const t=e.getSize(new _e),i=e.getContext().getContextAttributes().alpha,r=this.inputBuffer.texture.type;r===di&&e.outputColorSpace===jn&&(this.inputBuffer.texture.colorSpace=jn,this.outputBuffer.texture.colorSpace=jn,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const s of this.passes)s.initialize(e,i,r)}}replaceRenderer(e,t=!0){const i=this.renderer,r=i.domElement.parentNode;return this.setRenderer(e),t&&r!==null&&(r.removeChild(i.domElement),r.appendChild(e.domElement)),i}createDepthTexture(){const e=this.depthTexture=new Fv;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=$a,e.type=qa):e.type=Vs,e}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,i,r){const s=this.renderer,o=s===null?new _e:s.getDrawingBufferSize(new _e),a={minFilter:Ft,magFilter:Ft,stencilBuffer:t,depthBuffer:e,type:i},l=new xn(o.width,o.height,a);return r>0&&(l.ignoreDepthForMultisampleCopy=!1,l.samples=r),i===di&&s!==null&&s.outputColorSpace===jn&&(l.texture.colorSpace=jn),l.texture.name="EffectComposer.Buffer",l.texture.generateMipmaps=!1,l}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const i=this.passes,r=this.renderer,s=r.getDrawingBufferSize(new _e),o=r.getContext().getContextAttributes().alpha,a=this.inputBuffer.texture.type;if(e.setRenderer(r),e.setSize(s.width,s.height),e.initialize(r,o,a),this.autoRenderToScreen&&(i.length>0&&(i[i.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),t!==void 0?i.splice(t,0,e):i.push(e),this.autoRenderToScreen&&(i[i.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const l=this.createDepthTexture();for(e of i)e.setDepthTexture(l)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,i=t.indexOf(e);if(i!==-1&&t.splice(i,1).length>0){if(this.depthTexture!==null){const o=(l,c)=>l||c.needsDepthTexture;t.reduce(o,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&i===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,i=this.copyPass;let r=this.inputBuffer,s=this.outputBuffer,o=!1,a,l,c;e===void 0&&(this.timer.update(),e=this.timer.getDelta());for(const f of this.passes)f.enabled&&(f.render(t,r,s,e,o),f.needsSwap&&(o&&(i.renderToScreen=f.renderToScreen,a=t.getContext(),l=t.state.buffers.stencil,l.setFunc(a.NOTEQUAL,1,4294967295),i.render(t,r,s,e,o),l.setFunc(a.EQUAL,1,4294967295)),c=r,r=s,s=c),f instanceof F9?o=!0:f instanceof B9&&(o=!1))}setSize(e,t,i){const r=this.renderer,s=r.getSize(new _e);(e===void 0||t===void 0)&&(e=s.width,t=s.height),(s.width!==e||s.height!==t)&&r.setSize(e,t,i);const o=r.getDrawingBufferSize(new _e);this.inputBuffer.setSize(o.width,o.height),this.outputBuffer.setSize(o.width,o.height);for(const a of this.passes)a.setSize(o.width,o.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(const e of this.passes)e.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose(),Cr.fullscreenGeometry.dispose()}},vs={NONE:0,DEPTH:1,CONVOLUTION:2},un={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},U9=class{constructor(){this.shaderParts=new Map([[un.FRAGMENT_HEAD,null],[un.FRAGMENT_MAIN_UV,null],[un.FRAGMENT_MAIN_IMAGE,null],[un.VERTEX_HEAD,null],[un.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=vs.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=Er}},Y_=!1,vb=class{constructor(n=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(n),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case fi:t=this.materialsFlatShadedDoubleSide;break;case ai:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded;break}else switch(e.material.side){case fi:t=this.materialsDoubleSide;break;case ai:t=this.materialsBackSide;break;default:t=this.materials;break}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}cloneMaterial(n){if(!(n instanceof nn))return n.clone();const e=n.uniforms,t=new Map;for(const r in e){const s=e[r].value;s.isRenderTargetTexture&&(e[r].value=null,t.set(r,s))}const i=n.clone();for(const r of t)e[r[0]].value=r[1],i.uniforms[r[0]].value=r[1];return i}setMaterial(n){if(this.disposeMaterials(),this.material=n,n!==null){const e=this.materials=[this.cloneMaterial(n),this.cloneMaterial(n),this.cloneMaterial(n)];for(const t of e)t.uniforms=Object.assign({},n.uniforms),t.side=Xr;e[2].skinning=!0,this.materialsBackSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.side=ai,i}),this.materialsDoubleSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.side=fi,i}),this.materialsFlatShaded=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.flatShading=!0,i}),this.materialsFlatShadedBackSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.flatShading=!0,i.side=ai,i}),this.materialsFlatShadedDoubleSide=e.map(t=>{const i=this.cloneMaterial(t);return i.uniforms=Object.assign({},n.uniforms),i.flatShading=!0,i.side=fi,i})}}render(n,e,t){const i=n.shadowMap.enabled;if(n.shadowMap.enabled=!1,Y_){const r=this.originalMaterials;this.meshCount=0,e.traverse(this.replaceMaterial),n.render(e,t);for(const s of r)s[0].material=s[1];this.meshCount!==r.size&&r.clear()}else{const r=e.overrideMaterial;e.overrideMaterial=this.material,n.render(e,t),e.overrideMaterial=r}n.shadowMap.enabled=i}disposeMaterials(){if(this.material!==null){const n=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const e of n)e.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Y_}static set workaroundEnabled(n){Y_=n}},wa=-1,Jo=class extends Tr{constructor(n,e=wa,t=wa,i=1){super(),this.resizable=n,this.baseSize=new _e(1,1),this.preferredSize=new _e(e,t),this.target=this.preferredSize,this.s=i,this.effectiveSize=new _e,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const n=this.baseSize,e=this.preferredSize,t=this.effectiveSize,i=this.scale;e.width!==wa?t.width=e.width:e.height!==wa?t.width=Math.round(e.height*(n.width/Math.max(n.height,1))):t.width=Math.round(n.width*i),e.height!==wa?t.height=e.height:e.width!==wa?t.height=Math.round(e.width/Math.max(n.width/Math.max(n.height,1),1)):t.height=Math.round(n.height*i)}get width(){return this.effectiveSize.width}set width(n){this.preferredWidth=n}get height(){return this.effectiveSize.height}set height(n){this.preferredHeight=n}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(n){this.s!==n&&(this.s=n,this.preferredSize.setScalar(wa),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(n){this.scale=n}get baseWidth(){return this.baseSize.width}set baseWidth(n){this.baseSize.width!==n&&(this.baseSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(n){this.baseWidth=n}get baseHeight(){return this.baseSize.height}set baseHeight(n){this.baseSize.height!==n&&(this.baseSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(n){this.baseHeight=n}setBaseSize(n,e){(this.baseSize.width!==n||this.baseSize.height!==e)&&(this.baseSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(n){this.preferredSize.width!==n&&(this.preferredSize.width=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(n){this.preferredWidth=n}get preferredHeight(){return this.preferredSize.height}set preferredHeight(n){this.preferredSize.height!==n&&(this.preferredSize.height=n,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(n){this.preferredHeight=n}setPreferredSize(n,e){(this.preferredSize.width!==n||this.preferredSize.height!==e)&&(this.preferredSize.set(n,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(n){this.s=n.scale,this.baseSize.set(n.baseWidth,n.baseHeight),this.preferredSize.set(n.preferredWidth,n.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return wa}},Dt={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},O9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}",k9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}",z9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}",H9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",G9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.
45970),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}",V9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}",W9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}",X9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}",j9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}",J9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}",Y9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}",K9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}",Q9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}",Z9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}",q9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}",$9="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}",eW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}",tW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}",nW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}",iW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",rW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}",sW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}",oW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}",aW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}",lW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}",cW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}",uW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",fW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}",hW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}",dW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}",pW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}",mW="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}",gW=new Map([[Dt.ADD,O9],[Dt.ALPHA,k9],[Dt.AVERAGE,z9],[Dt.COLOR,H9],[Dt.COLOR_BURN,G9],[Dt.COLOR_DODGE,V9],[Dt.DARKEN,W9],[Dt.DIFFERENCE,X9],[Dt.DIVIDE,j9],[Dt.DST,null],[Dt.EXCLUSION,J9],[Dt.HARD_LIGHT,Y9],[Dt.HARD_MIX,K9],[Dt.HUE,Q9],[Dt.INVERT,Z9],[Dt.INVERT_RGB,q9],[Dt.LIGHTEN,$9],[Dt.LINEAR_BURN,eW],[Dt.LINEAR_DODGE,tW],[Dt.LINEAR_LIGHT,nW],[Dt.LUMINOSITY,iW],[Dt.MULTIPLY,rW],[Dt.NEGATION,sW],[Dt.NORMAL,oW],[Dt.OVERLAY,aW],[Dt.PIN_LIGHT,lW],[Dt.REFLECT,cW],[Dt.SATURATION,uW],[Dt.SCREEN,fW],[Dt.SOFT_LIGHT,hW],[Dt.SRC,dW],[Dt.SUBTRACT,pW],[Dt.VIVID_LIGHT,mW]]),vW=class extends Tr{constructor(n,e=1){super(),this._blendFunction=n,this.opacity=new Lt(e)}getOpacity(){return this.opacity.value}setOpacity(n){this.opacity.value=n}get blendFunction(){return this._blendFunction}set blendFunction(n){this._blendFunction=n,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(n){this.blendFunction=n}getShaderCode(){return gW.get(this.blendFunction)}},yW=`#include <common>
4598#ifdef FRAMEBUFFER_PRECISION_HIGH
4599uniform mediump sampler2D inputBuffer;
4600#else
4601uniform lowp sampler2D inputBuffer;
4602#endif
4603#ifdef RANGE
4604uniform vec2 range;
4605#elif defined(THRESHOLD)
4606uniform float threshold;uniform float smoothing;
4607#endif
4608varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);
4609#ifdef RANGE
4610float low=step(range.x,l);float high=step(l,range.y);l*=low*high;
4611#elif defined(THRESHOLD)
4612l=smoothstep(threshold,threshold+smoothing,l)*l;
4613#endif
4614#ifdef COLOR
4615gl_FragColor=vec4(texel.rgb*clamp(l,0.0,1.0),l);
4616#else
4617gl_FragColor=vec4(l);
4618#endif
4619}`,xW=class extends nn{constructor(n=!1,e=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:yo.replace(/\D+/g,"")},uniforms:{inputBuffer:new Lt(null),threshold:new Lt(0),smoothing:new Lt(1),range:new Lt(null)},blending:rr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:yW,vertexShader:nE}),this.colorOutput=n,this.luminanceRange=e}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}get threshold(){return this.uniforms.threshold.value}set threshold(n){this.smoothing>0||n>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=n}getThreshold(){return this.threshold}setThreshold(n){this.threshold=n}get smoothing(){return this.uniforms.smoothing.value}set smoothing(n){this.threshold>0||n>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=n}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(n){this.smoothing=n}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(n){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(n){n?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(n){return this.colorOutput}setColorOutputEnabled(n){this.colorOutput=n}get useRange(){return this.luminanceRange!==null}set useRange(n){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(n){n!==null?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=n,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(n){this.luminanceRange=n}},_W=class extends Cr{constructor({renderTarget:n,luminanceRange:e,colorOutput:t,resolutionScale:i=1,width:r=Jo.AUTO_SIZE,height:s=Jo.AUTO_SIZE,resolutionX:o=r,resolutionY:a=s}={}){super("LuminancePass"),this.fullscreenMaterial=new xW(t,e),this.needsSwap=!1,this.renderTarget=n,this.renderTarget===void 0&&(this.renderTarget=new xn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new Jo(this,o,a,i);l.addEventListener("change",c=>this.setSize(l.baseWidth,l.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(n,e,t,i,r){const s=this.fullscreenMaterial;s.inputBuffer=e.texture,n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}initialize(n,e,t){t!==void 0&&t!==di&&(this.renderTarget.texture.type=t,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},ea=class extends Tr{constructor(n,e,{attributes:t=vs.NONE,blendFunction:i=Dt.NORMAL,defines:r=new Map,uniforms:s=new Map,extensions:o=null,vertexShader:a=null}={}){super(),this.name=n,this.renderer=null,this.attributes=t,this.fragmentShader=e,this.vertexShader=a,this.defines=r,this.uniforms=s,this.extensions=o,this.blendMode=new vW(i),this.blendMode.addEventListener("change",l=>
vendor: 4,254 bytes, lines 4619-4628
4619this.setChanged()),this._inputColorSpace=Er,this._outputColorSpace=us}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(n){this._inputColorSpace=n,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(n){this._outputColorSpace=n,this.setChanged()}set mainScene(n){}set mainCamera(n){}getName(){return this.name}setRenderer(n){this.renderer=n}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(n){this.attributes=n,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(n){this.fragmentShader=n,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(n){this.vertexShader=n,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(n,e=ol){}update(n,e,t){}setSize(n,e){}initialize(n,e,t){}dispose(){for(const n of Object.keys(this)){const e=this[n];(e instanceof xn||e instanceof Hn||e instanceof Qt||e instanceof Cr)&&this[n].dispose()}}},SW=`#ifdef RADIAL_MODULATION
4620uniform float modulationOffset;
4621#endif
4622varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 ra=inputColor.ra;vec2 ba=inputColor.ba;
4623#ifdef RADIAL_MODULATION
4624const vec2 center=vec2(0.5);float d=distance(uv,center)*2.0;d=max(d-modulationOffset,0.0);if(vActive>0.0&&d>0.0){ra=texture2D(inputBuffer,mix(uv,vUvR,d)).ra;ba=texture2D(inputBuffer,mix(uv,vUvB,d)).ba;}
4625#else
4626if(vActive>0.0){ra=texture2D(inputBuffer,vUvR).ra;ba=texture2D(inputBuffer,vUvB).ba;}
4627#endif
4628outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}`,AW="uniform vec2 offset;varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainSupport(const in vec2 uv){vec2 shift=offset*vec2(1.0,aspect);vActive=(shift.x!=0.0||shift.y!=0.0)?1.0:0.0;vUvR=uv+shift;vUvB=uv-shift;}",MW=class extends ea{constructor({offset:n=new _e(.001,5e-4),radialModulation:e=!1,modulationOffset:t=.15}={}){super("ChromaticAberrationEffect",SW,{vertexShader:AW,attributes:vs.CONVOLUTION,uniforms:new Map([["offset",new Lt(n)],["modulationOffset",new Lt(t)]])}),this.radialModulation=e}get offset(){return this.uniforms.get("offset").value}set offset(n){this.uniforms.get("offset").value=n}get radialModulation(){return this.defines.has("RADIAL_MODULATION")}set radialModulation(n){n?this.defines.set("RADIAL_MODULATION","1"):this.defines.delete("RADIAL_MODULATION"),this.setChanged()}get modulationOffset(){return this.uniforms.get("modulationOffset").value}set modulationOffset(n){this.uniforms.get("modulationOffset").value=n}getOffset(){return this.offset}setOffset(n){this.offset=n}},WD=class extends Cr{constructor(n,e,t=null){super("RenderPass",n,e),this.needsSwap=!1,this.clearPass=new VD,this.overrideMaterialManager=t===null?null:new vb(t),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(n){this.scene=n}set mainCamera(n){this.camera=n}get renderToScreen(){return super.renderToScreen}set renderToScreen(n){super.renderToScreen=n,this.clearPass.renderToScreen=n}get overrideMaterial(){const n=this.overrideMaterialManager;return n!==null?n.material:null}set overrideMaterial(n){const e=this.overrideMaterialManager;n!==null?e!==null?e.setMaterial(n):this.overrideMaterialManager=new vb(n):e!==null&&(e.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(n){this.overrideMaterial=n}get clear(){return this.clearPass.enabled}set clear(n){this.clearPass.enabled=n}getSelection(){return this.selection}setSelection(n){this.selection=n}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(n){this.ignoreBackground=n}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(n){this.skipShadowMapUpdate=n}getClearPass(){return this.clearPass}render(n,e,t,i,r){const s=this.scene,o=this.camera,a=this.selection,l=o.layers.mask,c=s.background,f=n.shadowMap.autoUpdate,d=this.renderToScreen?null:e;a!==null&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(n.shadowMap.autoUpdate=!1),(this.ignoreBackgroun
4628d||this.clearPass.overrideClearColor!==null)&&(s.background=null),this.clearPass.enabled&&this.clearPass.render(n,e),n.setRenderTarget(d),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(n,s,o):n.render(s,o),o.layers.mask=l,s.background=c,n.shadowMap.autoUpdate=f}},EW="uniform vec3 hue;uniform float saturation;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,hue.xyz),dot(inputColor.rgb,hue.zxy),dot(inputColor.rgb,hue.yzx));float average=(color.r+color.g+color.b)/3.0;vec3 diff=average-color;if(saturation>0.0){color+=diff*(1.0-1.0/(1.001-saturation));}else{color+=diff*-saturation;}outputColor=vec4(min(color,1.0),inputColor.a);}",wW=class extends ea{constructor({blendFunction:n=Dt.SRC,hue:e=0,saturation:t=0}={}){super("HueSaturationEffect",EW,{blendFunction:n,uniforms:new Map([["hue",new Lt(new G)],["saturation",new Lt(t)]])}),this.hue=e}get saturation(){return this.uniforms.get("saturation").value}set saturation(n){this.uniforms.get("saturation").value=n}getSaturation(){return this.saturation}setSaturation(n){this.saturation=n}get hue(){const n=this.uniforms.get("hue").value;return Math.acos((n.x*3-1)/2)}set hue(n){const e=Math.sin(n),t=Math.cos(n);this.uniforms.get("hue").value.set((2*t+1)/3,(-Math.sqrt(3)*e-t+1)/3,(Math.sqrt(3)*e-t+1)/3)}getHue(){return this.hue}setHue(n){this.hue=n}},Lr={LINEAR:0,REINHARD:1,REINHARD2:2,REINHARD2_ADAPTIVE:3,UNCHARTED2:4,OPTIMIZED_CINEON:5,CINEON:5,ACES_FILMIC:6,AGX:7,NEUTRAL:8},Eh={DEFAULT:0,ESKIL:1},TW=`#include <packing>
4629#ifdef GL_FRAGMENT_PRECISION_HIGH
4630uniform highp sampler2D depthBuffer;
4631#else
4632uniform mediump sampler2D depthBuffer;
4633#endif
4634#ifdef DOWNSAMPLE_NORMALS
4635uniform lowp sampler2D normalBuffer;
4636#endif
4637varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){
4638#if DEPTH_PACKING == 3201
4639return unpackRGBAToDepth(texture2D(depthBuffer,uv));
4640#else
4641return texture2D(depthBuffer,uv).r;
4642#endif
4643}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]<maxDistance){remaining[j++]=i;}else{rejected[k++]=i;}}for(;j<3;++j){remaining[j]=rejected[--k];}vec3 s=vec3(samples[remaining[0]],samples[remaining[1]],samples[remaining[2]]);c=(s.x+s.y+s.z)/3.0;distances[0]=abs(c-s.x);distances[1]=abs(c-s.y);distances[2]=abs(c-s.z);float minDistance=min(distances[0],min(distances[1],distances[2]));for(i=0;i<3;++i){if(distances[i]==minDistance){break;}}return remaining[i];}void main(){float d[4];d[0]=readDepth(vUv0);d[1]=readDepth(vUv1);d[2]=readDepth(vUv2);d[3]=readDepth(vUv3);int index=findBestDepth(d);
4644#ifdef DOWNSAMPLE_NORMALS
4645vec3 n[4];n[0]=texture2D(normalBuffer,vUv0).rgb;n[1]=texture2D(normalBuffer,vUv1).rgb;n[2]=texture2D(normalBuffer,vUv2).rgb;n[3]=texture2D(normalBuffer,vUv3).rgb;
4646#else
4647vec3 n[4];n[0]=vec3(0.0);n[1]=vec3(0.0);n[2]=vec3(0.0);n[3]=vec3(0.0);
4648#endif
4649gl_FragColor=vec4(n[index],d[index]);}`,CW="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}",RW=class extends nn{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Lt(null),normalBuffer:new Lt(null),texelSize:new Lt(new _e)},blending:rr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:TW,vertexShader:CW})}set depthBuffer(n){this.uniforms.depthBuffer.value=n}set depthPacking(n){this.defines.DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer(n,e=ol){this.depthBuffer=n,this.depthPacking=e}set normalBuffer(n){this.uniforms.normalBuffer.value=n,n!==null?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(n){this.normalBuffer=n}setTexelSize(n,e){this.uniforms.texelSize.value.set(n,e)}setSize(n,e){this.uniforms.texelSize.value.set(1/n,1/e)}},bW=class extends Cr{constructor({normalBuffer:n=null,resolutionScale:e=.5,width:t=Jo.AUTO_SIZE,height:i=Jo.AUTO_SIZE,resolutionX:r=t,resolutionY:s=i}={}){super("DepthDownsamplingPass");const o=new RW;o.normalBuffer=n,this.fullscreenMaterial=o,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new xn(1,1,{minFilter:Ht,magFilter:Ht,depthBuffer:!1,type:vn}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new Jo(this,r,s,e);a.addEventListener("change",l=>this.setSize(a.baseWidth,a.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(n,e=ol){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.depthPacking=e}render(n,e,t,i,r){n.setRenderTarget(this.renderToScreen?null:this.renderTarget),n.render(this.scene,this.camera)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height),this.fullscreenMaterial.setSize(n,e)}initialize(n,e,t){const i=n.getContext();if(!(i.getExtension("EXT_color_buffer_float")||i.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},IW=`#include <packing>
4650#define packFloatToRGBA(v) packDepthToRGBA(v)
4651#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
4652uniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;
4652uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));
4653#if __VERSION__ < 300
4654float l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;
4655#else
4656float l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;
4657#endif
4658l0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)?vec4(1.0):packFloatToRGBA(adaptedLum);}`,PW=class extends nn{constructor(){super({name:"AdaptiveLuminanceMaterial",defines:{MIP_LEVEL_1X1:"0.0"},uniforms:{luminanceBuffer0:new Lt(null),luminanceBuffer1:new Lt(null),minLuminance:new Lt(.01),deltaTime:new Lt(0),tau:new Lt(1)},extensions:{shaderTextureLOD:!0},blending:rr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:IW,vertexShader:nE})}set luminanceBuffer0(n){this.uniforms.luminanceBuffer0.value=n}setLuminanceBuffer0(n){this.uniforms.luminanceBuffer0.value=n}set luminanceBuffer1(n){this.uniforms.luminanceBuffer1.value=n}setLuminanceBuffer1(n){this.uniforms.luminanceBuffer1.value=n}set mipLevel1x1(n){this.defines.MIP_LEVEL_1X1=n.toFixed(1),this.needsUpdate=!0}setMipLevel1x1(n){this.mipLevel1x1=n}set deltaTime(n){this.uniforms.deltaTime.value=n}setDeltaTime(n){this.uniforms.deltaTime.value=n}get minLuminance(){return this.uniforms.minLuminance.value}set minLuminance(n){this.uniforms.minLuminance.value=n}getMinLuminance(){return this.uniforms.minLuminance.value}setMinLuminance(n){this.uniforms.minLuminance.value=n}get adaptationRate(){return this.uniforms.tau.value}set adaptationRate(n){this.uniforms.tau.value=n}getAdaptationRate(){return this.uniforms.tau.value}setAdaptationRate(n){this.uniforms.tau.value=n}},BW=class extends Cr{constructor(n,{minLuminance:e=.01,adaptationRate:t=1}={}){super("AdaptiveLuminancePass"),this.fullscreenMaterial=new PW,this.needsSwap=!1,this.renderTargetPrevious=new xn(1,1,{minFilter:Ht,magFilter:Ht,depthBuffer:!1}),this.renderTargetPrevious.texture.name="Luminance.Previous";const i=this.fullscreenMaterial;i.luminanceBuffer0=this.renderTargetPrevious.texture,i.luminanceBuffer1=n,i.minLuminance=e,i.adaptationRate=t,this.renderTargetAdapted=this.renderTargetPrevious.clone(),this.renderTargetAdapted.texture.name="Luminance.Adapted",this.copyPass=new GD(this.renderTargetPrevious,!1)}get texture(){return this.renderTargetAdapted.texture}getTexture(){return this.renderTargetAdapted.texture}set mipLevel1x1(n){this.fullscreenMaterial.mipLevel1x1=n}get adaptationRate(){return this.fullscreenMaterial.adaptationRate}set adaptationRate(n){this.fullscreenMaterial.adaptationRate=n}render(n,e,t,i,r){this.fullscreenMaterial.deltaTime=i,n.setRenderTarget(this.renderToScreen?null:this.renderTargetAdapted),n.render(this.scene,this.camera),this.copyPass.render(n,this.renderTargetAdapted)}},DW=`#include <tonemapping_pars_fragment>
4659uniform float whitePoint;
4660#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3
4661uniform float middleGrey;
4662#if TONE_MAPPING_MODE == 3
4663uniform lowp sampler2D luminanceBuffer;
4664#else
4665uniform float averageLuminance;
4666#endif
4667vec3 Reinhard2ToneMapping(vec3 color){color*=toneMappingExposure;float l=luminance(color);
4668#if TONE_MAPPING_MODE == 3
4669float lumAvg=unpackRGBAToFloat(texture2D(luminanceBuffer,vec2(0.5)));
4670#else
4671float lumAvg=averageLuminance;
4672#endif
4673float lumScaled=(l*middleGrey)/max(lumAvg,1e-6);float lumCompressed=lumScaled*(1.0+lumScaled/(whitePoint*whitePoint));lumCompressed/=(1.0+lumScaled);return clamp(lumCompressed*color,0.0,1.0);}
4674#elif TONE_MAPPING_MODE == 4
4675#define A 0.15
4676#define B 0.50
4677#define C 0.10
4678#define D 0.20
4679#define E 0.02
4680#define F 0.30
4681vec3 Uncharted2Helper(const in vec3 x){return((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}vec3 Uncharted2ToneMapping(vec3 color){color*=toneMappingExposure;return clamp(Uncharted2Helper(color)/Uncharted2Helper(vec3(whitePoint)),0.0,1.0);}
4682#endif
4683void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){
4684#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3
4685outputColor=vec4(Reinhard2ToneMapping(inputColor.rgb),inputColor.a);
4686#elif TONE_MAPPING_MODE == 4
4687outputColor=vec4(Uncharted2ToneMapping(inputColor.rgb),inputColor.a);
4688#else
4689outputColor=vec4(toneMapping(inputColor.rgb),inputColor.a);
4690#endif
4691}`,LW=class extends ea{constructor({blendFunction:n=Dt.SRC,adaptive:e=!1,mode:t=e?Lr.REINHARD2_ADAPTIVE:Lr.AGX,resolution:i=256,maxLuminance:r=4,whitePoint:s=r,middleGrey:o=.6,minLuminance:a=.01,averageLuminance:l=1,adaptationRate:c=1}={}){super("ToneMappingEffect",DW,{blendFunction:n,uniforms:new Map([["luminanceBuffer",new Lt(null)],["maxLuminance",new Lt(r)],["whitePoint",new Lt(s)],["middleGrey",new Lt(o)],["averageLuminance",new Lt(l)]])}),this.renderTargetLuminance=new xn(1,1,{minFilter:kr,depthBuffer:!1}),this.renderTargetLuminance.texture.generateMipmaps=!0,this.renderTargetLuminance.texture.name="Luminance",this.luminancePass=new _W({renderTarget:this.renderTargetLuminance}),this.adaptiveLuminancePass=new BW(this.luminancePass.texture,{minLuminance:a,adaptationRate:c}),this.uniforms.get("luminanceBuffer").value=this.adaptiveLuminancePass.texture,this.resolution=i,this.mode=t}get mode(){return Number(this.defines.get("TONE_MAPPING_MODE"))}set mode(n){if(this.mode===n)return;const t=yo.replace(/\D+/g,"")>=168?"CineonToneMapping(texel)":"OptimizedCineonToneMapping(texel)";switch(this.defines.clear(),this.defines.set("TONE_MAPPING_MODE",n.toFixed(0)),n){case Lr.LINEAR:this.defines.set("toneMapping(texel)","LinearToneMapping(texel)");break;case Lr.REINHARD:this.defines.set("toneMapping(texel)","ReinhardToneMapping(texel)");break;case Lr.CINEON:case Lr.OPTIMIZED_CINEON:this.defines.set("toneMapping(texel)",t);break;case Lr.ACES_FILMIC:this.defines.set("toneMapping(texel)","ACESFilmicToneMapping(texel)");break;case Lr.AGX:this.defines.set("toneMapping(texel)","AgXToneMapping(texel)");break;case Lr.NEUTRAL:this.defines.set("toneMapping(texel)","NeutralToneMapping(texel)");break;default:this.defines.set("toneMapping(texel)","texel");break}this.adaptiveLuminancePass.enabled=n===Lr.REINHARD2_ADAPTIVE,this.setChanged()}getMode(){return this.mode}setMode(n){this.mode=n}get whitePoint(){return this.uniforms.get("whitePoint").value}set whitePoint(n){this.uniforms.get("whitePoint").value=n}get middleGrey(){return this.uniforms.get("middleGrey").value}set middleGrey(n){this.uniforms.get("middleGrey").value=n}get averageLuminance(){return this.uniforms.get("averageLuminance").value}set averageLuminance(n){this.uniforms.get("averageLuminance").value=n}get adaptiveLuminanceMaterial(){return this.adaptiveLuminancePass.fullscreenMaterial}getAdaptiveLuminanceMaterial(){return this.adaptiveLuminanceMaterial}get resolution(){return this.luminancePass.resolution.width}set resolution(n){const e=Math.max(0,Math.ceil(Math.log2(n))),t=Math.pow(2,e);this.luminancePass.resolution.setPreferredSize(t,t),this.adaptiveLuminanceMaterial.mipLevel1x1=e}getResolution(){return this.resolution}setResolution(n){this.resolution=n}get adaptive(){return this.mode===Lr.REINHARD2_ADAPTIVE}set adaptive(n){this.mode=n?Lr.REINHARD2_ADAPTIVE:Lr.REINHARD2}get adaptationRate(){return this.adaptiveLuminanceMaterial.adaptationRate}set adaptationRate(n){this.adaptiveLuminanceMaterial.adaptationRate=n}get distinction(){return console.warn(this.name,"distinction was removed."),1}set distinction(n){console.warn(this.name,"distinction was removed.")}update(n,e,t){this.adaptiveLuminancePass.enabled&&(this.luminancePass.render(n,e),this.adaptiveLuminancePass.render(n,null,
vendor: 4,224 bytes, lines 4691-4731
4691null,t))}initialize(n,e,t){this.adaptiveLuminancePass.initialize(n,e,t)}},FW=`uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb;
4692#if VIGNETTE_TECHNIQUE == 0
4693float d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset));
4694#else
4695vec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord));
4696#endif
4697outputColor=vec4(color,inputColor.a);}`,NW=class extends ea{constructor({blendFunction:n,eskil:e=!1,technique:t=e?Eh.ESKIL:Eh.DEFAULT,offset:i=.5,darkness:r=.5}={}){super("VignetteEffect",FW,{blendFunction:n,defines:new Map([["VIGNETTE_TECHNIQUE",t.toFixed(0)]]),uniforms:new Map([["offset",new Lt(i)],["darkness",new Lt(r)]])})}get technique(){return Number(this.defines.get("VIGNETTE_TECHNIQUE"))}set technique(n){this.technique!==n&&(this.defines.set("VIGNETTE_TECHNIQUE",n.toFixed(0)),this.setChanged())}get eskil(){return this.technique===Eh.ESKIL}set eskil(n){this.technique=n?Eh.ESKIL:Eh.DEFAULT}getTechnique(){return this.technique}setTechnique(n){this.technique=n}get offset(){return this.uniforms.get("offset").value}set offset(n){this.uniforms.get("offset").value=n}getOffset(){return this.offset}setOffset(n){this.offset=n}get darkness(){return this.uniforms.get("darkness").value}set darkness(n){this.uniforms.get("darkness").value=n}getDarkness(){return this.darkness}setDarkness(n){this.darkness=n}},UW=`#include <common>
4698#include <packing>
4699#include <dithering_pars_fragment>
4700#define packFloatToRGBA(v) packDepthToRGBA(v)
4701#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
4702#ifdef FRAMEBUFFER_PRECISION_HIGH
4703uniform mediump sampler2D inputBuffer;
4704#else
4705uniform lowp sampler2D inputBuffer;
4706#endif
4707#if DEPTH_PACKING == 3201
4708uniform lowp sampler2D depthBuffer;
4709#elif defined(GL_FRAGMENT_PRECISION_HIGH)
4710uniform highp sampler2D depthBuffer;
4711#else
4712uniform mediump sampler2D depthBuffer;
4713#endif
4714uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){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);}float readDepth(const in vec2 uv){
4715#if DEPTH_PACKING == 3201
4716return unpackRGBAToDepth(texture2D(depthBuffer,uv));
4717#else
4718return texture2D(depthBuffer,uv).r;
4719#endif
4720}float getViewZ(const in float depth){
4721#ifdef PERSPECTIVE_CAMERA
4722return perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
4723#else
4724return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
4725#endif
4726}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;
4727#ifdef ENCODE_OUTPUT
4728#include <colorspace_fragment>
4729#endif
4730#include <dithering_fragment>
4731}`,OW="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}",kW=class extends nn{constructor(n,e,t,i,r=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:yo.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new Lt(null),depthBuffer:new Lt(null),resolution:new Lt(new _e),texelSize:new Lt(new _e),cameraNear:new Lt(.3),cameraFar:new Lt(1e3),aspect:ne
vendor: 10,755 bytes, lines 4731-4749
4731w Lt(1),time:new Lt(0)},blending:rr,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:r}),n&&this.setShaderParts(n),e&&this.setDefines(e),t&&this.setUniforms(t),this.copyCameraSettings(i)}set inputBuffer(n){this.uniforms.inputBuffer.value=n}setInputBuffer(n){this.uniforms.inputBuffer.value=n}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(n){this.uniforms.depthBuffer.value=n}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(n){this.defines.DEPTH_PACKING=n.toFixed(0),this.needsUpdate=!0}setDepthBuffer(n,e=ol){this.depthBuffer=n,this.depthPacking=e}setShaderData(n){this.setShaderParts(n.shaderParts),this.setDefines(n.defines),this.setUniforms(n.uniforms),this.setExtensions(n.extensions)}setShaderParts(n){return this.fragmentShader=UW.replace(un.FRAGMENT_HEAD,n.get(un.FRAGMENT_HEAD)||"").replace(un.FRAGMENT_MAIN_UV,n.get(un.FRAGMENT_MAIN_UV)||"").replace(un.FRAGMENT_MAIN_IMAGE,n.get(un.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader=OW.replace(un.VERTEX_HEAD,n.get(un.VERTEX_HEAD)||"").replace(un.VERTEX_MAIN_SUPPORT,n.get(un.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(n){for(const e of n.entries())this.defines[e[0]]=e[1];return this.needsUpdate=!0,this}setUniforms(n){for(const e of n.entries())this.uniforms[e[0]]=e[1];return this}setExtensions(n){this.extensions={};for(const e of n)this.extensions[e]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(n){this.encodeOutput!==n&&(n?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(n){return this.encodeOutput}setOutputEncodingEnabled(n){this.encodeOutput=n}get time(){return this.uniforms.time.value}set time(n){this.uniforms.time.value=n}setDeltaTime(n){this.uniforms.time.value+=n}adoptCameraSettings(n){this.copyCameraSettings(n)}copyCameraSettings(n){n&&(this.uniforms.cameraNear.value=n.near,this.uniforms.cameraFar.value=n.far,n instanceof Tn?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(n,e){const t=this.uniforms;t.resolution.value.set(n,e),t.texelSize.value.set(1/n,1/e),t.aspect.value=n/e}static get Section(){return un}};function yb(n,e,t){for(const i of e){const r="$1"+n+i.charAt(0).toUpperCase()+i.slice(1),s=new RegExp("([^\\.])(\\b"+i+"\\b)","g");for(const o of t.entries())o[1]!==null&&t.set(o[0],o[1].replace(s,r))}}function zW(n,e,t){let i=e.getFragmentShader(),r=e.getVertexShader();const s=i!==void 0&&/mainImage/.test(i),o=i!==void 0&&/mainUv/.test(i);if(t.attributes|=e.getAttributes(),i===void 0)throw new Error(`Missing fragment shader (${e.name})`);if(o&&t.attributes&vs.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${e.name})`);if(!s&&!o)throw new Error(`Could not find mainImage or mainUv function (${e.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=t.shaderParts;let c=l.get(un.FRAGMENT_HEAD)||"",f=l.get(un.FRAGMENT_MAIN_UV)||"",d=l.get(un.FRAGMENT_MAIN_IMAGE)||"",p=l.get(un.VERTEX_HEAD)||"",m=l.get(un.VERTEX_MAIN_SUPPORT)||"";const v=new Set,_=new Set;if(o&&(f+=`	${n}MainUv(UV);
4732`,t.uvTransformation=!0),r!==null&&/mainSupport/.test(r)){const S=/mainSupport *\([\w\s]*?uv\s*?\)/.test(r);m+=`	${n}MainSupport(`,m+=S?`vUv);
4733`:`);
4734`;for(const A of r.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const E of A[1].split(/\s*,\s*/))t.varyings.add(E),v.add(E),_.add(E);for(const A of r.matchAll(a))_.add(A[1])}for(const S of i.matchAll(a))_.add(S[1]);for(const S of e.defines.keys())_.add(S.replace(/\([\w\s,]*\)/g,""));for(const S of e.uniforms.keys())_.add(S);_.delete("while"),_.delete("for"),_.delete("if"),e.uniforms.forEach((S,A)=>t.uniforms.set(n+A.charAt(0).toUpperCase()+A.slice(1),S)),e.defines.forEach((S,A)=>t.defines.set(n+A.charAt(0).toUpperCase()+A.slice(1),S));const x=new Map([["fragment",i],["vertex",r]]);yb(n,_,t.defines),yb(n,_,x),i=x.get("fragment"),r=x.get("vertex");const g=e.blendMode;if(t.blendModes.set(g.blendFunction,g),s){e.inputColorSpace!==null&&e.inputColorSpace!==t.colorSpace&&(d+=e.inputColorSpace===jn?`color0 = sRGBTransferOETF(color0);
4735	`:`color0 = sRGBToLinear(color0);
4736	`),e.outputColorSpace!==us?t.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(t.colorSpace=e.inputColorSpace);const S=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;d+=`${n}MainImage(color0, UV, `,t.attributes&vs.DEPTH&&S.test(i)&&(d+="depth, ",t.readDepth=!0),d+=`color1);
4737	`;const A=n+"BlendOpacity";t.uniforms.set(A,g.opacity),d+=`color0 = blend${g.blendFunction}(color0, color1, ${A});
4738
4739	`,c+=`uniform float ${A};
4740
4741`}if(c+=i+`
4742`,r!==null&&(p+=r+`
4743`),l.set(un.FRAGMENT_HEAD,c),l.set(un.FRAGMENT_MAIN_UV,f),l.set(un.FRAGMENT_MAIN_IMAGE,d),l.set(un.VERTEX_HEAD,p),l.set(un.VERTEX_MAIN_SUPPORT,m),e.extensions!==null)for(const S of e.extensions)t.extensions.add(S)}}var HW=class extends Cr{constructor(n,...e){super("EffectPass"),this.fullscreenMaterial=new kW(null,null,null,n),this.listener=t=>this.handleEvent(t),this.effects=[],this.setEffects(e),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(n){for(const e of this.effects)e.mainScene=n}set mainCamera(n){this.fullscreenMaterial.copyCameraSettings(n);for(const e of this.effects)e.mainCamera=n}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(n){this.fullscreenMaterial.encodeOutput=n}get dithering(){return this.fullscreenMaterial.dithering}set dithering(n){const e=this.fullscreenMaterial;e.dithering=n,e.needsUpdate=!0}setEffects(n){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=n.sort((e,t)=>t.attributes-e.attributes);for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const n=new U9;let e=0;for(const o of this.effects)if(o.blendMode.blendFunction===Dt.DST)n.attributes|=o.getAttributes()&vs.DEPTH;else{if(n.attributes&o.getAttributes()&vs.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${o.name})`);zW("e"+e++,o,n)}let t=n.shaderParts.get(un.FRAGMENT_HEAD),i=n.shaderParts.get(un.FRAGMENT_MAIN_IMAGE),r=n.shaderParts.get(un.FRAGMENT_MAIN_UV);const s=/\bblend\b/g;for(const o of n.blendModes.values())t+=o.getShaderCode().replace(s,`blend${o.blendFunction}`)+`
4744`;n.attributes&vs.DEPTH?(n.readDepth&&(i=`float depth = readDepth(UV);
4745
4746	`+i),this.needsDepthTexture=this.getDepthTexture()===null):this.needsDepthTexture=!1,n.colorSpace===jn&&(i+=`color0 = sRGBToLinear(color0);
4747	`),n.uvTransformation?(r=`vec2 transformedUv = vUv;
4748`+r,n.defines.set("UV","transformedUv")):n.defines.set("UV","vUv"),n.shaderParts.set(un.FRAGMENT_HEAD,t),n.shaderParts.set(un.FRAGMENT_MAIN_IMAGE,i),n.shaderParts.set(un.FRAGMENT_MAIN_UV,r);for(const[o,a]of n.shaderParts)a!==null&&n.shaderParts.set(o,a.trim().replace(/^#/,`
4749#`));this.skipRendering=e===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(n)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(n,e=ol){this.fullscreenMaterial.depthBuffer=n,this.fullscreenMaterial.depthPacking=e;for(const t of this.effects)t.setDepthTexture(n,e)}render(n,e,t,i,r){for(const s of this.effects)s.update(n,e,i);if(!this.skipRendering||this.renderToScreen){const s=this.fullscreenMaterial;s.inputBuffer=e.texture,s.time+=i*this.timeScale,n.setRenderTarget(this.renderToScreen?null:t),n.render(this.scene,this.camera)}}setSize(n,e){this.fullscreenMaterial.setSize(n,e);for(const t of this.effects)t.setSize(n,e)}initialize(n,e,t){this.renderer=n;for(const i of this.effects)i.initialize(n,e,t);this.updateMaterial(),t!==void 0&&t!==di&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const n of this.effects)n.removeEventListener("change",this.listener),n.dispose()}handleEvent(n){switch(n.type){case"change":this.recompile();break}}},GW=class extends Cr{constructor(n,e,{renderTarget:t,resolutionScale:i=1,width:r=Jo.AUTO_SIZE,height:s=Jo.AUTO_SIZE,resolutionX:o=r,resolutionY:a=s}={}){super("NormalPass"),this.needsSwap=!1,this.renderPass=new WD(n,e,new yM);const l=this.renderPass;l.ignoreBackground=!0,l.skipShadowMapUpdate=!0;const c=l.getClearPass();c.overrideClearColor=new qe(7829503),c.overrideClearAlpha=1,this.renderTarget=t,this.renderTarget===void 0&&(this.renderTarget=new xn(1,1,{minFilter:Ht,magFilter:Ht}),this.renderTarget.texture.name="NormalPass.Target");const f=this.resolution=new Jo(this,o,a,i);f.addEventListener("change",d=>this.setSize(f.baseWidth,f.baseHeight))}set mainScene(n){this.renderPass.mainScene=n}set mainCamera(n){this.renderPass.mainCamera=n}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(n){this.resolution.scale=n}render(n,e,t,i,r){const s=this.renderToScreen?null:this.renderTarget;this.renderPass.render(n,s,s)}setSize(n,e){const t=this.resolution;t.setBaseSize(n,e),this.renderTarget.setSize(t.width,t.height)}};const VW=ne.createContext(null),xb=n=>(n.getAttributes()&vs.CONVOLUTION)===vs.CONVOLUTION,WW=hc.memo(ne.forwardRef(({children:n,camera:e,scene:t,resolutionScale:i,enabled:r=!0,renderPriority:s=1,autoClear:o=!0,depthBuffer:a,enableNormalPass:l,stencilBuffer:c,multisampling:f=8,frameBufferType:d=li},p)=>{const{gl:m,scene:v,camera:_,size:x}=In(),g=t||v,S=e||_,[A,E,I]=ne.useMemo(()=>{const O=u8(),C=new N9(m,{depthBuffer:a,stencilBuffer:c,multisampling:f>0&&O?f:0,frameBufferType:d});C.addPass(new WD(g,S));let B=null,Y=null;return l&&(Y=new GW(g,S),Y.enabled=!1,C.addPass(Y),i!==void 0&&O&&(B=new bW({normalBuffer:Y.texture,resolutionScale:i}),B.enabled=!1,C.addPass(B))),[C,Y,B]},[S,m,a,c,f,d,g,l,i]);ne.useEffect(()=>A==null?void 0:A.setSize(x.width,x.height),[A,x]),ra((O,C)=>{if(r){const B=m.autoClear;m.autoClear=o,c&&!o&&m.clearStencil(),A.render(C),m.autoClear=B}},r?s:0);const b=ne.useRef(null),P=bV(b);ne.useLayoutEffect(()=>{const O=[];if(b.current&&P.current&&A){const C=P.current.objects;for(let B=0;B<C.length;B++){const Y=C[B];if(Y instanceof ea){const $=[Y];if(!xb(Y)){let ce=null;for(;(ce=C[B+1])instanceof ea&&!xb(ce);)$.push(ce),B++}const se=new HW(S,...$);O.push(se)}else Y instanceof Cr&&O.push(Y)}for(const B of O)A==null||A.addPass(B);E&&(E.enabled=!0),I&&(I.enabled=!0)}return()=>{for(const C of O)A==null||A.removePass(C);E&&(E.enabled=!1),I&&(I.enabled=!1)}},[A,n,S,E,I,P]),ne.useEffect(()=>{const O=m.toneMapping;return m.toneMapping=Hs,()=>{m.toneMapping=O}},[]);const D=ne.useMemo(()=>({composer:A,normalPass:E,downSamplingPass:I,resolutionScale:i,camera:S,scene:g}),[A,E,I,i,S,g]);return ne.useImperativeHandle(p,()=>
4749A,[A]),re.jsx(VW.Provider,{value:D,children:re.jsx("group",{ref:b,children:n})})}));let XW=0;const _b=new WeakMap,ry=(n,e)=>hc.forwardRef(function({blendFunction:i=e==null?void 0:e.blendFunction,opacity:r=e==null?void 0:e.opacity,...s},o){let a=_b.get(n);if(!a){const f=`@react-three/postprocessing/${n.name}-${XW++}`;FM({[f]:n}),_b.set(n,a=f)}const l=In(f=>f.camera),c=hc.useMemo(()=>{var f,d;return[...(f=e==null?void 0:e.args)!=null?f:[],...(d=s.args)!=null?d:[{...e,...s}]]},[JSON.stringify(s)]);return re.jsx(a,{camera:l,"blendMode-blendFunction":i,"blendMode-opacity-value":r,...s,ref:o,args:c})}),jW=ry(MW),JW=ry(wW),YW=ne.forwardRef(function({blendFunction:e,adaptive:t,mode:i,resolution:r,maxLuminance:s,whitePoint:o,middleGrey:a,minLuminance:l,averageLuminance:c,adaptationRate:f,...d},p){const m=ne.useMemo(()=>new LW({blendFunction:e,adaptive:t,mode:i,resolution:r,maxLuminance:s,whitePoint:o,middleGrey:a,minLuminance:l,averageLuminance:c,adaptationRate:f}),[e,t,i,r,s,o,a,l,c,f]);return ne.useEffect(()=>{m.dispose()},[m]),re.jsx("primitive",{...d,ref:p,object:m,attributes:vs.CONVOLUTION})}),KW=ry(NW),QW={fragmentShader:`
4750
4751    // original shader by Evan Wallace
4752
4753    #define MAX_ITERATIONS 100
4754
4755    uniform float blur;
4756    uniform float taper;
4757    uniform vec2 start;
4758    uniform vec2 end;
4759    uniform vec2 direction;
4760    uniform int samples;
4761
4762    float random(vec3 scale, float seed) {
4763        /* use the fragment position for a different seed per-pixel */
4764        return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);
4765    }
4766
4767    void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
4768        vec4 color = vec4(0.0);
4769        float total = 0.0;
4770        vec2 startPixel = vec2(start.x * resolution.x, start.y * resolution.y);
4771        vec2 endPixel = vec2(end.x * resolution.x, end.y * resolution.y);
4772        float f_samples = float(samples);
4773        float half_samples = f_samples / 2.0;
4774
4775        // use screen diagonal to normalize blur radii
4776        float maxScreenDistance = distance(vec2(0.0), resolution); // diagonal distance
4777        float gradientRadius = taper * (maxScreenDistance);
4778        float blurRadius = blur * (maxScreenDistance / 16.0);
4779
4780        /* randomize the lookup values to hide the fixed number of samples */
4781        float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);
4782        vec2 normal = normalize(vec2(startPixel.y - endPixel.y, endPixel.x - startPixel.x));
4783        float radius = smoothstep(0.0, 1.0, abs(dot(uv * resolution - startPixel, normal)) / gradientRadius) * blurRadius;
4784
4785        #pragma unroll_loop_start
4786        for (int i = 0; i <= MAX_ITERATIONS; i++) {
4787            if (i >= samples) { break; } // return early if over sample count
4788            float f_i = float(i);
4789            float s_i = -half_samples + f_i;
4790            float percent = (s_i + offset - 0.5) / half_samples;
4791            float weight = 1.0 - abs(percent);
4792            vec4 sample_i = texture2D(inputBuffer, uv + normalize(direction) / resolution * percent * radius);
4793            /* switch to pre-multiplied alpha to correctly blur transparent images */
4794            sample_i.rgb *= sample_i.a;
4795            color += sample_i * weight;
4796            total += weight;
4797        }
4798        #pragma unroll_loop_end
4799
4800        outputColor = color / total;
4801
4802        /* switch back from pre-multiplied alpha */
4803        outputColor.rgb /= outputColor.a + 0.00001;
4804    }
4805    `};class ZW extends ea{constructor({blendFunction:e=Dt.NORMAL,blur:t=.15,taper:i=.5,start:r=[.5,0],end:s=[.5,1],samples:o=10,direction:a=[1,1]}={}){super("TiltShiftEffect",QW.fragmentShader,{blendFunction:e,attributes:vs.CONVOLUTION,uniforms:new Map([["blur",new Lt(t)],["taper",new Lt(i)],["start",new Lt(r)],["end",new Lt(s)],["samples",new Lt(o)],["direction",new Lt(a)]])})}}const qW=ry(ZW,{blendFunction:Dt.NORMAL});var XD={},sy={};sy.byteLength=tX;sy.toByteArray=iX;sy.fromByteArray=oX;var oo=[],as=[],$W=typeof Uint8Array<"u"?Uint8Array:Array,K_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var mu=0,eX=K_.length;mu<eX;++mu)oo[mu]=K_[mu],as[K_.charCodeAt(mu)]=mu;as[45]=62;as[95]=63;function jD(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var i=t===e?0:4-t%4;return[t,i]}function tX(n){var e=jD(n),t=e[0],i=e[1];return(t+i)*3/4-i}function nX(n,e,t){return(e+t)*3/4-t}function iX(n){var e,t=jD(n),i=t[0],r=t[1],s=new $W(nX(n,i,r)),o=0,a=r>0?i-4:i,l;for(l=0;l<a;
vendor: 23,246 bytes, lines 4805-4810
4805l+=4)e=as[n.charCodeAt(l)]<<18|as[n.charCodeAt(l+1)]<<12|as[n.charCodeAt(l+2)]<<6|as[n.charCodeAt(l+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return r===2&&(e=as[n.charCodeAt(l)]<<2|as[n.charCodeAt(l+1)]>>4,s[o++]=e&255),r===1&&(e=as[n.charCodeAt(l)]<<10|as[n.charCodeAt(l+1)]<<4|as[n.charCodeAt(l+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function rX(n){return oo[n>>18&63]+oo[n>>12&63]+oo[n>>6&63]+oo[n&63]}function sX(n,e,t){for(var i,r=[],s=e;s<t;s+=3)i=(n[s]<<16&16711680)+(n[s+1]<<8&65280)+(n[s+2]&255),r.push(rX(i));return r.join("")}function oX(n){for(var e,t=n.length,i=t%3,r=[],s=16383,o=0,a=t-i;o<a;o+=s)r.push(sX(n,o,o+s>a?a:o+s));return i===1?(e=n[t-1],r.push(oo[e>>2]+oo[e<<4&63]+"==")):i===2&&(e=(n[t-2]<<8)+n[t-1],r.push(oo[e>>10]+oo[e>>4&63]+oo[e<<2&63]+"=")),r.join("")}var iE={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */iE.read=function(n,e,t,i,r){var s,o,a=r*8-i-1,l=(1<<a)-1,c=l>>1,f=-7,d=t?r-1:0,p=t?-1:1,m=n[e+d];for(d+=p,s=m&(1<<-f)-1,m>>=-f,f+=a;f>0;s=s*256+n[e+d],d+=p,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=i;f>0;o=o*256+n[e+d],d+=p,f-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-c}return(m?-1:1)*o*Math.pow(2,s-i)};iE.write=function(n,e,t,i,r,s){var o,a,l,c=s*8-r-1,f=(1<<c)-1,d=f>>1,p=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:s-1,v=i?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?e+=p/l:e+=p*Math.pow(2,1-d),e*l>=2&&(o++,l/=2),o+d>=f?(a=0,o=f):o+d>=1?(a=(e*l-1)*Math.pow(2,r),o=o+d):(a=e*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;n[t+m]=a&255,m+=v,a/=256,r-=8);for(o=o<<r|a,c+=r;c>0;n[t+m]=o&255,m+=v,o/=256,c-=8);n[t+m-v]|=_*128};/*!
4806 * The buffer module from node.js, for the browser.
4807 *
4808 * @author   Feross Aboukhadijeh <https://feross.org>
4809 * @license  MIT
4810 */(function(n){const e=sy,t=iE,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=a,n.SlowBuffer=S,n.INSPECT_MAX_BYTES=50;const r=2147483647;n.kMaxLength=r,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const N=new Uint8Array(1),w={foo:function(){return 42}};return Object.setPrototypeOf(w,Uint8Array.prototype),Object.setPrototypeOf(N,w),N.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(N){if(N>r)throw new RangeError('The value "'+N+'" is invalid for option "size"');const w=new Uint8Array(N);return Object.setPrototypeOf(w,a.prototype),w}function a(N,w,R){if(typeof N=="number"){if(typeof w=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(N)}return l(N,w,R)}a.poolSize=8192;function l(N,w,R){if(typeof N=="string")return p(N,w);if(ArrayBuffer.isView(N))return v(N);if(N==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N);if(ge(N,ArrayBuffer)||N&&ge(N.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ge(N,SharedArrayBuffer)||N&&ge(N.buffer,SharedArrayBuffer)))return _(N,w,R);if(typeof N=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const z=N.valueOf&&N.valueOf();if(z!=null&&z!==N)return a.from(z,w,R);const Q=x(N);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof N[Symbol.toPrimitive]=="function")return a.from(N[Symbol.toPrimitive]("string"),w,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N)}a.from=function(N,w,R){return l(N,w,R)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(N){if(typeof N!="number")throw new TypeError('"size" argument must be of type number');if(N<0)throw new RangeError('The value "'+N+'" is invalid for option "size"')}function f(N,w,R){return c(N),N<=0?o(N):w!==void 0?typeof R=="string"?o(N).fill(w,R):o(N).fill(w):o(N)}a.alloc=function(N,w,R){return f(N,w,R)};function d(N){return c(N),o(N<0?0:g(N)|0)}a.allocUnsafe=function(N){return d(N)},a.allocUnsafeSlow=function(N){return d(N)};function p(N,w){if((typeof w!="string"||w==="")&&(w="utf8"),!a.isEncoding(w))throw new TypeError("Unknown encoding: "+w);const R=A(N,w)|0;let z=o(R);const Q=z.write(N,w);return Q!==R&&(z=z.slice(0,Q)),z}function m(N){const w=N.length<0?0:g(N.length)|0,R=o(w);for(let z=0;z<w;z+=1)R[z]=N[z]&255;return R}function v(N){if(ge(N,Uint8Array)){const w=new Uint8Array(N);return _(w.buffer,w.byteOffset,w.byteLength)}return m(N)}function _(N,w,R){if(w<0||N.byteLength<w)throw new RangeError('"offset" is outside of buffer bounds');if(N.byteLength<w+(R||0))throw new RangeError('"length" is outside of buffer bounds');let z;return w===void 0&&R===void 0?z=new Uint8Array(N):R===void 0?z=new Uint8Array(N,w):z=new Uint8Array(N,w,R),Object.setPrototypeOf(z,a.prototype),z}function x(N){if(a.isBuffer(N)){const w=g(N.length)|0,R=o(w);return R.length===0||N.copy(R,0,0,w),R}if(N.length!==void 0)return typeof N.length!="number"||Ie(N.length)?o(0):m(N);if(N.type==="Buffer"&&Array.isArray(N.data))return m(N.data)}function g(N){if(N>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return N|0}function S(N){return+N!=N&&(N=0),a.alloc(+N)}a.isBuffer=function(w){return w!=null&&w._isBuffer===!0&&w!==a.prototype},a.compare=function(w,R){if(ge(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),ge(R,Uint8Array)&&(R=a.from(R,R.offset,R.byteLength)),!a.isBuffer(w)||!a.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(w===R)return 0;let z=w.length,Q=R.length;for(let fe=0,ve=Math.min(z,Q);fe<ve;++fe)if(w[fe]!==R[fe]){z=w[fe],Q=R[fe];break}return z<Q?-1:Q<z?1:0},a.isEncoding=function(w){switch(String(w).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(w,R){if(!Array.isArray(w))throw new TypeError('"list" argument must be an Array of Buffers');if(w.length===0)return a.alloc(0);let z;if(R===void 0)for(R=0,z=0;z<w.length;++z)R+=w[z].length;const Q=a.allocUnsafe(R);let fe=0;for(z=0;z<w.length;++z){let ve=w[z];if(ge(ve,Uint8Array))fe+ve.length>Q.length?(a.isBuffer(ve)||(ve=a.from(ve)),ve.copy(Q,fe)):Uint8Array.prototype.set.call(Q,ve,fe);else if(a.isBuffer(ve))ve.copy(Q,fe);else throw new TypeError('"list" argument must be an Array of Buffers');fe+=ve.length}return Q};function A(N,w){if(a.isBuffer(N))return N.length;if(ArrayBuffer.isView(N)||ge(N,ArrayBuffer))return N.byteLength;if(typeof N!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof N);const R=N.length,z=arguments.length>2&&arguments[2]===!0;if(!z&&R===0)return 0;let Q=!1;for(;;)switch(w){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return Xe(N).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return j(N).length;default:if(Q)return z?-1:Xe(N).length;w=(""+w).toLowerCase(),Q=!0}}a.byteLength=A;function E(N,w,R){let z=!1;if((w===void 0||w<0)&&(w=0),w>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,w>>>=0,R<=w))return"";for(N||(N="utf8");;)switch(N){case"hex":return ue(this,w,R);case"utf8":case"utf-8":return se(this,w,R);case"ascii":return ye(this,w,R);case"latin1":case"binary":return W(this,w,R);case"base64":return $(this,w,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,w,R);default:if(z)throw new TypeError("Unknown encoding: "+N);N=(N+"").toLowerCase(),z=!0}}a.prototype._isBuffer=!0;function I(N,w,R){const z=N[w];N[w]=N[R],N[R]=z}a.prototype.swap16=function(){const w=this.length;if(w%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<w;R+=2)I(this,R,R+1);return this},a.prototype.swap32=function(){const w=this.length;if(w%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<w;R+=4)I(this,R,R+3),I(this,R+1,R+2);return this},a.prototype.swap64=function(){const w=this.length;if(w%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<w;R+=8)I(this,R,R+7),I(this,R+1,R+6),I(this,R+2,R+5),I(this,R+3,R+4);return this},a.prototype.toString=function(){const w=this.length;return w===0?"":arguments.length===0?se(this,0,w):E.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(w){if(!a.isBuffer(w))throw new TypeError("Argument must be a Buffer");return this===w?!0:a.compare(this,w)===0},a.prototype.inspect=function(){let w="";const R=n.INSPECT_MAX_BYTES;return w=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(w+=" ... "),"<Buffer "+w+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(w,R,z,Q,fe){if(ge(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),!a.isBuffer(w))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof w);if(R===void 0&&(R=0),z===void 0&&(z=w?w.length:0),Q===void 0&&(Q=0),fe===void 0&&(fe=this.length),R<0||z>w.length||Q<0||fe>this.length)throw new RangeError("out of range index");if(Q>=fe&&R>=z)return 0;if(Q>=fe)return-1;if(R>=z)return 1;if(R>>>=0,z>>>=0,Q>>>=0,fe>>>=0,this===w)return 0;let ve=fe-Q,Fe=z-R;const pt=Math.min(ve,Fe),q=this.slice(Q,fe),Te=w.slice(R,z);for(let J=0;J<pt;++J)if(q[J]!==Te[J]){ve=q[J],Fe=Te[J];break}return ve<Fe?-1:Fe<ve?1:0};function b(N,w,R,z,Q){if(N.length===0)return-1;if(typeof R=="string"?(z=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,Ie(R)&&(R=Q?0:N.length-1),R<0&&(R=N.length+R),R>=N.length){if(Q)return-1;R=N.length-1}else if(R<0)if(Q)R=0;else return-1;if(typeof w=="string"&&(w=a.from(w,z)),a.isBuffer(w))return w.length===0?-1:P(N,w,R,z,Q);if(typeof w=="number")return w=w&255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(N,w,R):Uint8Array.prototype.lastIndexOf.call(N,w,R):P(N,[w],R,z,Q);throw new TypeError("val must be string, number or Buffer")}function P(N,w,R,z,Q){let fe=1,ve=N.length,Fe=w.length;if(z!==void 0&&(z=String(z).toLowerCase(),z==="ucs2"||z==="ucs-2"||z==="utf16le"||z==="utf-16le")){if(N.length<2||w.length<2)return-1;fe=2,ve/=2,Fe/=2,R/=2}function pt(Te,J){return fe===1?Te[J]:Te.readUInt16BE(J*fe)}let q;if(Q){let Te=-1;for(q=R;q<ve;q++)if(pt(N,q)===pt(w,Te===-1?0:q-Te)){if(Te===-1&&(Te=q),q-Te+1===Fe)return Te*fe}else Te!==-1&&(q-=q-Te),Te=-1}else for(R+Fe>ve&&(R=ve-Fe),q=R;q>=0;q--){let Te=!0;for(let J=0;J<Fe;J++)if(pt(N,q+J)!==pt(w,J)){Te=!1;break}if(Te)return q}return-1}a.prototype.includes=function(w,R,z){return this.indexOf(w,R,z)!==-1},a.prototype.indexOf=function(w,R,z){return b(this,w,R,z,!0)},a.prototype.lastIndexOf=function(w,R,z){return b(this,w,R,z,!1)};function D(N,w,R,z){R=Number(R)||0;const Q=N.length-R;z?(z=Number(z),z>Q&&(z=Q)):z=Q;const fe=w.length;z>fe/2&&(z=fe/2);let ve;for(ve=0;ve<z;++ve){const Fe=parseInt(w.substr(ve*2,2),16);if(Ie(Fe))return ve;N[R+ve]=Fe}return ve}function O(N,w,R,z){return k(Xe(w,N.length-R),N,R,z)}function C(N,w,R,z){return k(ht(w),N,R,z)}function B(N,w,R,z){return k(j(w),N,R,z)}function Y(N,w,R,z){return k(et(w,N.length-R),N,R,z)}a.prototype.write=function(w,R,z,Q){if(R===void 0)Q="utf8",z=this.length,R=0;else if(z===void 0&&typeof R=="string")Q=R,z=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(z)?(z=z>>>0,Q===void 0&&(Q="utf8")):(Q=z,z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const fe=this.length-R;if((z===void 0||z>fe)&&(z=fe),w.length>0&&(z<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");let ve=!1;for(;;)switch(Q){case"hex":return D(this,w,R,z);case"utf8":case"utf-8":return O(this,w,R,z);case"ascii":case"latin1":case"binary":return C(this,w,R,z);case"base64":return B(this,w,R,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,w,R,z);default:if(ve)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),ve=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(N,w,R){return w===0&&R===N.length?e.fromByteArray(N):e.fromByteArray(N.slice(w,R))}function se(N,w,R){R=Math.min(N.length,R);const z=[];let Q=w;for(;Q<R;){const fe=N[Q];let ve=null,Fe=fe>239?4:fe>223?3:fe>191?2:1;if(Q+Fe<=R){let pt,q,Te,J;switch(Fe){case 1:fe<128&&(ve=fe);break;case 2:pt=N[Q+1],(pt&192)===128&&(J=(fe&31)<<6|pt&63,J>127&&(ve=J));break;case 3:pt=N[Q+1],q=N[Q+2],(pt&192)===128&&(q&192)===128&&(J=(fe&15)<<12|(pt&63)<<6|q&63,J>2047&&(J<55296||J>57343)&&(ve=J));break;case 4:pt=N[Q+1],q=N[Q+2],Te=N[Q+3],(pt&192)===128&&(q&192)===128&&(Te&192)===128&&(J=(fe&15)<<18|(pt&63)<<12|(q&63)<<6|Te&63,J>65535&&J<1114112&&(ve=J))}}ve===null?(ve=65533,Fe=1):ve>65535&&(ve-=65536,z.push(ve>>>10&1023|55296),ve=56320|ve&1023),z.push(ve),Q+=Fe}return ie(z)}const ce=4096;function ie(N){const w=N.length;if(w<=ce)return String.fromCharCode.apply(String,N);let R="",z=0;for(;z<w;)R+=String.fromCharCode.apply(String,N.slice(z,z+=ce));return R}function ye(N,w,R){let z="";R=Math.min(N.length,R);for(let Q=w;Q<R;++Q)z+=String.fromCharCode(N[Q]&127);return z}function W(N,w,R){let z="";R=Math.min(N.length,R);for(let Q=w;Q<R;++Q)z+=String.fromCharCode(N[Q]);return z}function ue(N,w,R){const z=N.length;(!w||w<0)&&(w=0),(!R||R<0||R>z)&&(R=z);let Q="";for(let fe=w;fe<R;++fe)Q+=De[N[fe]];return Q}function oe(N,w,R){const z=N.slice(w,R);let Q="";for(let fe=0;fe<z.length-1;fe+=2)Q+=String.fromCharCode(z[fe]+z[fe+1]*256);return Q}a.prototype.slice=function(w,R){const z=this.length;w=~~w,R=R===void 0?z:~~R,w<0?(w+=z,w<0&&(w=0)):w>z&&(w=z),R<0?(R+=z,R<0&&(R=0)):R>z&&(R=z),R<w&&(R=w);const Q=this.subarray(w,R);return Object.setPrototypeOf(Q,a.prototype),Q};function de(N,w,R){if(N%1!==0||N<0)throw new RangeError("offset is not uint");if(N+w>R)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(w,R,z){w=w>>>0,R=R>>>0,z||de(w,R,this.length);let Q=this[w],fe=1,ve=0;for(;++ve<R&&(fe*=256);)Q+=this[w+ve]*fe;return Q},a.prototype.readUintBE=a.prototype.readUIntBE=function(w,R,z){w=w>>>0,R=R>>>0,z||de(w,R,this.length);let Q=this[w+--R],fe=1;for(;R>0&&(fe*=256);)Q+=this[w+--R]*fe;return Q},a.prototype.readUint8=a.prototype.readUInt8=function(w,R){return w=w>>>0,R||de(w,1,this.length),this[w]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(w,R){return w=w>>>0,R||de(w,2,this.length),this[w]|this[w+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(w,R){return w=w>>>0,R||de(w,2,this.length),this[w]<<8|this[w+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(w,R){return w=w>>>0,R||de(w,4,this.length),(this[w]|this[w+1]<<8|this[w+2]<<16)+this[w+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(w,R){return w=w>>>0,R||de(w,4,this.length),this[w]*16777216+(this[w+1]<<16|this[w+2]<<8|this[w+3])},a.prototype.readBigUInt64LE=Re(function(w){w=w>>>0,X(w,"offset");const R=this[w],z=this[w+7];(R===void 0||z===void 0)&&We(w,this.length-8);const Q=R+this[++w]*2**8+this[++w]*2**16+this[++w]*2**24,fe=this[++w]+this[++w]*2**8+this[++w]*2**16+z*2**24;return BigInt(Q)+(BigInt(fe)<<BigInt(32))}),a.prototype.readBigUInt64BE=Re(function(w){w=w>>>0,X(w,"offset");const R=this[w],z=this[w+7];(R===void 0||z===void 0)&&We(w,this.length-8);const Q=R*2**24+this[++w]*2**16+this[++w]*2**8+this[++w],fe=this[++w]*2**24+this[++w]*2**16+this[++w]*2**8+z;return(BigInt(Q)<<BigInt(32))+BigInt(fe)}),a.prototype.readIntLE=function(w,R,z){w=w>>>0,R=R>>>0,z||de(w,R,this.length);let Q=this[w],fe=1,ve=0;for(;++ve<R&&(fe*=256);)Q+=this[w+ve]*fe;return fe*=128,Q>=fe&&(Q-=Math.pow(2,8*R)),Q},a.prototype.readIntBE=function(w,R,z){w=w>>>0,R=R>>>0,z||de(w,R,this.length);let Q=R,fe=1,ve=this[w+--Q];for(;Q>0&&(fe*=256);)ve+=this[w+--Q]*fe;return fe*=128,ve>=fe&&(ve-=Math.pow(2,8*R)),ve},a.prototype.readInt8=function(w,R){return w=w>>>0,R||de(w,1,this.length),this[w]&128?(255-this[w]+1)*-1:this[w]},a.prototype.readInt16LE=function(w,R){w=w>>>0,R||de(w,2,this.length);const z=this[w]|this[w+1]<<8;return z&32768?z|4294901760:z},a.prototype.readInt16BE=function(w,R){w=w>>>0,R||de(w,2,this.length);const z=this[w+1]|this[w]<<8;return z&32768?z|4294901760:z},a.prototype.readInt32LE=function(w,R){return w=w>>>0,R||de(w,4,this.length),this[w]|this[w+1]<<8|this[w+2]<<16|this[w+3]<<24},a.prototype.readInt32BE=function(w,R){return w=w>>>0,R||de(w,4,this.length),this[w]<<24|this[w+1]<<16|this[w+2]<<8|this[w+3]},a.prototype.readBigInt64LE=Re(function(w){w=w>>>0,X(w,"offset");const R=this[w],z=this[w+7];(R===void 0||z===void 0)&&We(w,this.length-8);const Q=this[w+4]+this[w+5]*2**8+this[w+6]*2**16+(z<<24);return(BigInt(Q)<<BigInt(32))+BigInt(R+this[++w]*2**8+this[++w]*2**16+this[++w]*2**24)}),a.prototype.readBigInt64BE=Re(function(w){w=w>>>0,X(w,"offset");const R=this[w],z=this[w+7];(R===void 0||z===void 0)&&We(w,this.length-8);const Q=(R<<24)+this[++w]*2**16+this[++w]*2**8+this[++w];return(BigInt(Q)<<BigInt(32))+BigInt(this[++w]*2**24+this[++w]*2**16+this[++w]*2**8+z)}),a.prototype.readFloatLE=function(w,R){return w=w>>>0,R||de(w,4,this.length),t.read(this,w,!0,23,4)},a.prototype.readFloatBE=function(w,R){return w=w>>>0,R||de(w,4,this.length),t.read(this,w,!1,23,4)},a.prototype.readDoubleLE=function(w,R){return w=w>>>0,R||de(w,8,this.length),t.read(this,w,!0,52,8)},a.prototype.readDoubleBE=function(w,R){return w=w>>>0,R||de(w,8,this.length),t.read(this,w,!1,52,8)};function we(N,w,R,z,Q,fe){if(!a.isBuffer(N))throw new TypeError('"buffer" argument must be a Buffer instance');if(w>Q||w<fe)throw new RangeError('"value" argument is out of bounds');if(R+z>N.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(w,R,z,Q){if(w=+w,R=R>>>0,z=z>>>0,!Q){const Fe=Math.pow(2,8*z)-1;we(this,w,R,z,Fe,0)}let fe=1,ve=0;for(this[R]=w&255;++ve<z&&(fe*=256);)this[R+ve]=w/fe&255;return R+z},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(w,R,z,Q){if(w=+w,R=R>>>0,z=z>>>0,!Q){const Fe=Math.pow(2,8*z)-1;we(this,w,R,z,Fe,0)}let fe=z-1,ve=1;for(this[R+fe]=w&255;--fe>=0&&(ve*=256);)this[R+fe]=w/ve&255;return R+z},a.prototype.writeUint8=a.prototype.writeUInt8=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,1,255,0),this[R]=w&255,R+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,2,65535,0),this[R]=w&255,this[R+1]=w>>>8,R+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,2,65535,0),this[R]=w>>>8,this[R+1]=w&255,R+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,4,4294967295,0),this[R+3]=w>>>24,this[R+2]=w>>>16,this[R+1]=w>>>8,this[R]=w&255,R+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,4,4294967295,0),this[R]=w>>>24,this[R+1]=w>>>16,this[R+2]=w>>>8,this[R+3]=w&255,R+4};function Ue(N,w,R,z,Q){Be(w,z,Q,N,R,7);let fe=Number(w&BigInt(4294967295));N[R++]=fe,fe=fe>>8,N[R++]=fe,fe=fe>>8,N[R++]=fe,fe=fe>>8,N[R++]=fe;let ve=Number(w>>BigInt(32)&BigInt(4294967295));return N[R++]=ve,ve=ve>>8,N[R++]=ve,ve=ve>>8,N[R++]=ve,ve=ve>>8,N[R++]=ve,R}function pe(N,w,R,z,Q){Be(w,z,Q,N,R,7);let fe=Number(w&BigInt(4294967295));N[R+7]=fe,fe=fe>>8,N[R+6]=fe,fe=fe>>8,N[R+5]=fe,fe=fe>>8,N[R+4]=fe;let ve=Number(w>>BigInt(32)&BigInt(4294967295));return N[R+3]=ve,ve=ve>>8,N[R+2]=ve,ve=ve>>8,N[R+1]=ve,ve=ve>>8,N[R]=ve,R+8}a.prototype.writeBigUInt64LE=Re(function(w,R=0){return Ue(this,w,R,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Re(function(w,R=0){return pe(this,w,R,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(w,R,z,Q){if(w=+w,R=R>>>0,!Q){const pt=Math.pow(2,8*z-1);we(this,w,R,z,pt-1,-pt)}let fe=0,ve=1,Fe=0;for(this[R]=w&255;++fe<z&&(ve*=256);)w<0&&Fe===0&&this[R+fe-1]!==0&&(Fe=1),this[R+fe]=(w/ve>>0)-Fe&255;return R+z},a.prototype.writeIntBE=function(w,R,z,Q){if(w=+w,R=R>>>0,!Q){const pt=Math.pow(2,8*z-1);we(this,w,R,z,pt-1,-pt)}let fe=z-1,ve=1,Fe=0;for(this[R+fe]=w&255;--fe>=0&&(ve*=256);)w<0&&Fe===0&&this[R+fe+1]!==0&&(Fe=1),this[R+fe]=(w/ve>>0)-Fe&255;return R+z},a.prototype.writeInt8=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,1,127,-128),w<0&&(w=255+w+1),this[R]=w&255,R+1},a.prototype.writeInt16LE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,2,32767,-32768),this[R]=w&255,this[R+1]=w>>>8,R+2},a.prototype.writeInt16BE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,2,32767,-32768),this[R]=w>>>8,this[R+1]=w&255,R+2},a.prototype.writeInt32LE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,4,2147483647,-2147483648),this[R]=w&255,this[R+1]=w>>>8,this[R+2]=w>>>16,this[R+3]=w>>>24,R+4},a.prototype.writeInt32BE=function(w,R,z){return w=+w,R=R>>>0,z||we(this,w,R,4,2147483647,-2147483648),w<0&&(w=4294967295+w+1),this[R]=w>>>24,this[R+1]=w>>>16,this[R+2]=w>>>8,this[R+3]=w&255,R+4},a.prototype.writeBigInt64LE=Re(function(w,R=0){return Ue(this,w,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Re(function(w,R=0){return pe(this,w,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function be(N,w,R,z,Q,fe){if(R+z>N.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function Ne(N,w,R,z,Q){return w=+w,R=R>>>0,Q||be(N,w,R,4),t.write(N,w,R,z,23,4),R+4}a.prototype.writeFloatLE=function(w,R,z){return Ne(this,w,R,!0,z)},a.prototype.writeFloatBE=function(w,R,z){return Ne(this,w,R,!1,z)};function ke(N,w,R,z,Q){return w=+w,R=R>>>0,Q||be(N,w,R,8),t.write(N,w,R,z,52,8),R+8}a.prototype.writeDoubleLE=function(w,R,z){return ke(this,w,R,!0,z)},a.prototype.writeDoubleBE=function(w,R,z){return ke(this,w,R,!1,z)},a.prototype.copy=function(w,R,z,Q){if(!a.isBuffer(w))throw new TypeError("argument should be a Buffer");if(z||(z=0),!Q&&Q!==0&&(Q=this.length),R>=w.length&&(R=w.length),R||(R=0),Q>0&&Q<z&&(Q=z),Q===z||w.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(z<0||z>=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),w.length-R<Q-z&&(Q=w.length-R+z);const fe=Q-z;return this===w&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(R,z,Q):Uint8Array.prototype.set.call(w,this.subarray(z,Q),R),fe},a.prototype.fill=function(w,R,z,Q){if(typeof w=="string"){if(typeof R=="str
4810ing"?(Q=R,R=0,z=this.length):typeof z=="string"&&(Q=z,z=this.length),Q!==void 0&&typeof Q!="string")throw new TypeError("encoding must be a string");if(typeof Q=="string"&&!a.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);if(w.length===1){const ve=w.charCodeAt(0);(Q==="utf8"&&ve<128||Q==="latin1")&&(w=ve)}}else typeof w=="number"?w=w&255:typeof w=="boolean"&&(w=Number(w));if(R<0||this.length<R||this.length<z)throw new RangeError("Out of range index");if(z<=R)return this;R=R>>>0,z=z===void 0?this.length:z>>>0,w||(w=0);let fe;if(typeof w=="number")for(fe=R;fe<z;++fe)this[fe]=w;else{const ve=a.isBuffer(w)?w:a.from(w,Q),Fe=ve.length;if(Fe===0)throw new TypeError('The value "'+w+'" is invalid for argument "value"');for(fe=0;fe<z-R;++fe)this[fe+R]=ve[fe%Fe]}return this};const nt={};function vt(N,w,R){nt[N]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:w.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${N}]`,this.stack,delete this.name}get code(){return N}set code(Q){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Q,writable:!0})}toString(){return`${this.name} [${N}]: ${this.message}`}}}vt("ERR_BUFFER_OUT_OF_BOUNDS",function(N){return N?`${N} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),vt("ERR_INVALID_ARG_TYPE",function(N,w){return`The "${N}" argument must be of type number. Received type ${typeof w}`},TypeError),vt("ERR_OUT_OF_RANGE",function(N,w,R){let z=`The value of "${N}" is out of range.`,Q=R;return Number.isInteger(R)&&Math.abs(R)>2**32?Q=ut(String(R)):typeof R=="bigint"&&(Q=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(Q=ut(Q)),Q+="n"),z+=` It must be ${w}. Received ${Q}`,z},RangeError);function ut(N){let w="",R=N.length;const z=N[0]==="-"?1:0;for(;R>=z+4;R-=3)w=`_${N.slice(R-3,R)}${w}`;return`${N.slice(0,R)}${w}`}function Ze(N,w,R){X(w,"offset"),(N[w]===void 0||N[w+R]===void 0)&&We(w,N.length-(R+1))}function Be(N,w,R,z,Q,fe){if(N>R||N<w){const ve=typeof w=="bigint"?"n":"";let Fe;throw w===0||w===BigInt(0)?Fe=`>= 0${ve} and < 2${ve} ** ${(fe+1)*8}${ve}`:Fe=`>= -(2${ve} ** ${(fe+1)*8-1}${ve}) and < 2 ** ${(fe+1)*8-1}${ve}`,new nt.ERR_OUT_OF_RANGE("value",Fe,N)}Ze(z,Q,fe)}function X(N,w){if(typeof N!="number")throw new nt.ERR_INVALID_ARG_TYPE(w,"number",N)}function We(N,w,R){throw Math.floor(N)!==N?(X(N,R),new nt.ERR_OUT_OF_RANGE("offset","an integer",N)):w<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${w}`,N)}const je=/[^+/0-9A-Za-z-_]/g;function Ve(N){if(N=N.split("=")[0],N=N.trim().replace(je,""),N.length<2)return"";for(;N.length%4!==0;)N=N+"=";return N}function Xe(N,w){w=w||1/0;let R;const z=N.length;let Q=null;const fe=[];for(let ve=0;ve<z;++ve){if(R=N.charCodeAt(ve),R>55295&&R<57344){if(!Q){if(R>56319){(w-=3)>-1&&fe.push(239,191,189);continue}else if(ve+1===z){(w-=3)>-1&&fe.push(239,191,189);continue}Q=R;continue}if(R<56320){(w-=3)>-1&&fe.push(239,191,189),Q=R;continue}R=(Q-55296<<10|R-56320)+65536}else Q&&(w-=3)>-1&&fe.push(239,191,189);if(Q=null,R<128){if((w-=1)<0)break;fe.push(R)}else if(R<2048){if((w-=2)<0)break;fe.push(R>>6|192,R&63|128)}else if(R<65536){if((w-=3)<0)break;fe.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((w-=4)<0)break;fe.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return fe}function ht(N){const w=[];for(let R=0;R<N.length;++R)w.push(N.charCodeAt(R)&255);return w}function et(N,w){let R,z,Q;const fe=[];for(let ve=0;ve<N.length&&!((w-=2)<0);++ve)R=N.charCodeAt(ve),z=R>>8,Q=R%256,fe.push(Q),fe.push(z);return fe}function j(N){return e.toByteArray(Ve(N))}function k(N,w,R,z){let Q;for(Q=0;Q<z&&!(Q+R>=w.length||Q>=N.length);++Q)w[Q+R]=N[Q];return Q}function ge(N,w){return N instanceof w||N!=null&&N.constructor!=null&&N.constructor.name!=null&&N.constructor.name===w.name}function Ie(N){return N!==N}const De=function(){const N="0123456789abcdef",w=new Array(256);for(let R=0;R<16;++R){const z=R*16;for(let Q=0;Q<16;++Q)w[z+Q]=N[R]+N[Q]}return w}();function Re(N){return typeof BigInt>"u"?ft:N}function ft(){throw new Error("BigInt not supported")}})(XD);var aX=Object.defineProperty,lX=(n,e,t)=>e in n?aX(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,cX=(n,e,t)=>(lX(n,e+"",t),t);class uX extends bt{constructor(){super(),cX(this,"boundingSphere",new wi),this.setAttribute("position",new Yt(new Float32Array([-1,-1,3,-1,-1,3]),2)),this.setAttribute("uv",new Yt(new Float32Array([0,0,2,0,0,2]),2))}computeBoundingSphere(){}}const fX=new uX,hX=new xr;class wh{constructor(e){this._mesh=new yn(fX,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,hX)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const dX={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new ct},viewMat:{value:new ct},projViewMat:{value:new ct},projectionMatrixInv:{value:new ct},viewMatrixInv:{value:new ct},cameraPos:{value:new G},resolution:{value:new _e},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:`
4811varying vec2 vUv;
4812void main() {
4813  vUv = uv;
4814  gl_Position = vec4(position, 1);
4815}`,fragmentShader:`
4816    #define SAMPLES 16
4817    #define FSAMPLES 16.0
4818uniform sampler2D sceneDiffuse;
4819uniform highp sampler2D sceneNormal;
4820uniform highp sampler2D sceneDepth;
4821uniform mat4 projectionMatrixInv;
4822uniform mat4 viewMatrixInv;
4823uniform mat4 projMat;
4824uniform mat4 viewMat;
4825uniform mat4 projViewMat;
4826uniform vec3 cameraPos;
4827uniform vec2 resolution;
4828uniform float time;
4829uniform vec3[SAMPLES] samples;
4830uniform float[SAMPLES] samplesR;
4831uniform float radius;
4832uniform float distanceFalloff;
4833uniform float near;
4834uniform float far;
4835uniform bool logDepth;
4836uniform bool ortho;
4837uniform bool screenSpaceRadius;
4838uniform sampler2D bluenoise;
4839    varying vec2 vUv;
4840    highp float linearize_depth(highp float d, highp float zNear,highp float zFar)
4841    {
4842        return (zFar * zNear) / (zFar - d * (zFar - zNear));
4843    }
4844    highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {
4845      return nearZ + (farZ - nearZ) * d;
4846    }
4847    highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {
4848      float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;
4849      float a = farZ / (farZ - nearZ);
4850      float b = farZ * nearZ / (nearZ - farZ);
4851      float linDepth = a + b / depth;
4852      return ortho ? linearize_depth_ortho(
4853        linDepth,
4854        nearZ,
4855        farZ
4856      ) :linearize_depth(linDepth, nearZ, farZ);
4857    }
4858
4859    vec3 getWorldPosLog(vec3 posS) {
4860      vec2 uv = posS.xy;
4861      float z = posS.z;
4862      float nearZ =near;
4863      float farZ = far;
4864      float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;
4865      float a = farZ / (farZ - nearZ);
4866      float b = farZ * nearZ / (nearZ - farZ);
4867      float linDepth = a + b / depth;
4868      vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;
4869      vec4 wpos = projectionMatrixInv * clipVec;
4870      return wpos.xyz / wpos.w;
4871    }
4872    vec3 getWorldPos(float depth, vec2 coord) {
4873      #ifdef LOGDEPTH
4874        return getWorldPosLog(vec3(coord, depth));
4875      #endif
4876      float z = depth * 2.0 - 1.0;
4877      vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);
4878      vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;
4879      // Perspective division
4880     vec4 worldSpacePosition = viewSpacePosition;
4881     worldSpacePosition.xyz /= worldSpacePosition.w;
4882      return worldSpacePosition.xyz;
4883  }
4884
4885  vec3 computeNormal(vec3 worldPos, vec2 vUv) {
4886    ivec2 p = ivec2(vUv * resolution);
4887    float c0 = texelFetch(sceneDepth, p, 0).x;
4888    float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;
4889    float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;
4890    float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;
4891    float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;
4892    float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;
4893    float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;
4894    float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;
4895    float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;
4896
4897    float dl = abs((2.0 * l1 - l2) - c0);
4898    float dr = abs((2.0 * r1 - r2) - c0);
4899    float db = abs((2.0 * b1 - b2) - c0);
4900    float dt = abs((2.0 * t1 - t2) - c0);
4901
4902    vec3 ce = getWorldPos(c0, vUv).xyz;
4903
4904    vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz
4905                          : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;
4906    vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz
4907                          : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;
4908
4909    return normalize(cross(dpdx, dpdy));
4910}
4911
4912void main() {
4913      vec4 diffuse = texture2D(sceneDiffuse, vUv);
4914      float depth = texture2D(sceneDepth, vUv).x;
4915      if (depth == 1.0) {
4916        gl_FragColor = vec4(vec3(1.0), 1.0);
4917        return;
4918      }
4919      vec3 worldPos = getWorldPos(depth, vUv);
4920    //  vec3 normal = texture2D(sceneNormal, vUv).rgb;//computeNormal(worldPos, vUv);
4921      #ifdef HALFRES
4922        vec3 normal = texture2D(sceneNormal, vUv).rgb;
4923      #else
4924        vec3 normal = computeNormal(worldPos, vUv);
4925      #endif
4926      vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0);
4927      vec3 randomVec = normalize(noise.rgb * 2.0 - 1.0);
4928      vec3 tangent = normalize(randomVec - normal * dot(randomVec, normal));
4929      vec3 bitangent = cross(normal, tangent);
4930      mat3 tbn = mat3(tangent, bitangent, normal);
4931      float occluded = 0.0;
4932      float totalWeight = 0.0;
4933     /* float radiusScreen = distance(
4934        worldPos,
4935        getWorldPos(depth, vUv + 
4936          vec2(48.0, 0.0) / resolution)
4937      );/*vUv.x < 0.5 ? radius : min(distance(
4938        worldPos,
4939        getWorldPos(depth, vUv + 
4940          vec2(100.0, 0.0) / resolution)
4941      ), radius);
4942      float distanceFalloffScreen = radiusScreen * 0.2;*/
4943      float radiusToUse = screenSpaceRadius ? distance(
4944        worldPos,
4945        getWorldPos(depth, vUv +
4946          vec2(radius, 0.0) / resolution)
4947      ) : radius;
4948      float distanceFalloffToUse =screenSpaceRadius ?
4949          radiusToUse * distanceFalloff
4950      : distanceFalloff;
4951      float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse;
4952      for(float i = 0.0; i < FSAMPLES; i++) {
4953        vec3 sampleDirection = 
4954        tbn * 
4955        samples[int(i)];
4956        ;
4957        float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))];
4958        vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection;
4959        vec4 offset = projMat * vec4(samplePos, 1.0);
4960        offset.xyz /= offset.w;
4961        offset.xyz = offset.xyz * 0.5 + 0.5;
4962        float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x;
4963        /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) 
4964         (ortho ?  linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/
4965        #ifdef LOGDEPTH
4966        float distSample = linearize_depth_log(sampleDepth, near, far);
4967        #else
4968        float distSample = ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far);
4969        #endif
4970        float distWorld = ortho ? linearize_depth_ortho(offset.z, near, far) : linearize_depth(offset.z, near, far);
4971        float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld)));
4972        vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution);
4973        float weight = dot(sampleDirection, normal);
4974          occluded += rangeCheck * weight * 
4975            (distSample + bias
4976               < distWorld ? 1.0 : 0.0) * (
4977          (dot(
4978            diff,
4979            diff
4980             
4981            ) < 1.0 || (sampleDepth == depth) || (
4982              offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0
4983            ) ? 0.0 : 1.0)
4984          );
4985          totalWeight += weight;
4986      }
4987      float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0);
4988      gl_FragColor = vec4(0.5 + 0.5 * normal, occ);
4989}`},pX=parseInt(yo.replace(/\D+/g,"")),mX=pX>=167?"sRGBTransferOETF":"LinearTosRGB",gX={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new ct},viewMat:{value:new ct},projectionMatrixInv:{value:new ct},viewMatrixInv:{value:new ct},cameraPos:{value:new G},resolution:{value:new _e},color:{value:new G(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0}},depthWrite:!1,depthTest:!1,vertexShader:`
4990		varying vec2 vUv;
4991		void main() {
4992			vUv = uv;
4993			gl_Position = vec4(position, 1);
4994		}`,fragmentShader:`
4995		uniform sampler2D sceneDiffuse;
4996    uniform highp sampler2D sceneDepth;
4997    uniform highp sampler2D downsampledDepth;
4998    uniform sampler2D tDiffuse;
4999    uniform sampler2D blueNoise;
5000    uniform vec2 resolution;
5001    uniform vec3 color;
5002    uniform mat4 projectionMatrixInv;
5003    uniform mat4 viewMatrixInv;
5004    uniform float intensity;
5005    uniform float renderMode;
5006    uniform float near;
5007    uniform float far;
5008    uniform bool gammaCorrection;
5009    uniform bool logDepth;
5010    uniform bool ortho;
5011    uniform bool screenSpaceRadius;
5012    uniform bool fog;
5013    uniform bool fogExp;
5014    uniform bool colorMultiply;
5015    uniform float fogDensity;
5016    uniform float fogNear;
5017    uniform float fogFar;
5018    uniform float radius;
5019    uniform float distanceFalloff;
5020    uniform vec3 cameraPos;
5021    varying vec2 vUv;
5022    highp float linearize_depth(highp float d, highp float zNear,highp float zFar)
5023    {
5024        return (zFar * zNear) / (zFar - d * (zFar - zNear));
5025    }
5026    highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {
5027      return nearZ + (farZ - nearZ) * d;
5028    }
5029    highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {
5030      float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;
5031      float a = farZ / (farZ - nearZ);
5032      float b = farZ * nearZ / (nearZ - farZ);
5033      float linDepth = a + b / depth;
5034      return ortho ? linearize_depth_ortho(
5035        linDepth,
5036        nearZ,
5037        farZ
5038      ) :linearize_depth(linDepth, nearZ, farZ);
5039    }
5040    vec3 getWorldPosLog(vec3 posS) {
5041        vec2 uv = posS.xy;
5042        float z = posS.z;
5043        float nearZ =near;
5044        float farZ = far;
5045        float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;
5046        float a = farZ / (farZ - nearZ);
5047        float b = farZ * nearZ / (nearZ - farZ);
5048        float linDepth = a + b / depth;
5049        vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;
5050        vec4 wpos = projectionMatrixInv * clipVec;
5051        return wpos.xyz / wpos.w;
5052      }
5053      vec3 getWorldPos(float depth, vec2 coord) {
5054       // if (logDepth) {
5055        #ifdef LOGDEPTH
5056          return getWorldPosLog(vec3(coord, depth));
5057        #endif
5058      //  }
5059        float z = depth * 2.0 - 1.0;
5060        vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);
5061        vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;
5062        // Perspective division
5063       vec4 worldSpacePosition = viewSpacePosition;
5064       worldSpacePosition.xyz /= worldSpacePosition.w;
5065        return worldSpacePosition.xyz;
5066    }
5067  
5068    vec3 computeNormal(vec3 worldPos, vec2 vUv) {
5069      ivec2 p = ivec2(vUv * resolution);
5070      float c0 = texelFetch(sceneDepth, p, 0).x;
5071      float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;
5072      float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;
5073      float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;
5074      float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;
5075      float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;
5076      float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;
5077      float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;
5078      float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;
5079  
5080      float dl = abs((2.0 * l1 - l2) - c0);
5081      float dr = abs((2.0 * r1 - r2) - c0);
5082      float db = abs((2.0 * b1 - b2) - c0);
5083      float dt = abs((2.0 * t1 - t2) - c0);
5084  
5085      vec3 ce = getWorldPos(c0, vUv).xyz;
5086  
5087      vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz
5088                            : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;
5089      vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz
5090                            : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;
5091  
5092      return normalize(cross(dpdx, dpdy));
5093  }
5094
5095    #include <common>
5096    #include <dithering_pars_fragment>
5097    void main() {
5098        //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0);
5099        vec4 sceneTexel = texture2D(sceneDiffuse, vUv);
5100        float depth = texture2D(
5101            sceneDepth,
5102            vUv
5103        ).x;
5104        #ifdef HALFRES 
5105        vec4 texel;
5106        if (depth == 1.0) {
5107            texel = vec4(0.0, 0.0, 0.0, 1.0);
5108        } else {
5109        vec3 worldPos = getWorldPos(depth, vUv);
5110        vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv);
5111       // vec4 texel = texture2D(tDiffuse, vUv);
5112       // Find closest depth;
5113       float totalWeight = 0.0;
5114       float radiusToUse = screenSpaceRadius ? distance(
5115        worldPos,
5116        getWorldPos(depth, vUv +
5117          vec2(radius, 0.0) / resolution)
5118      ) : radius;
5119      float distanceFalloffToUse =screenSpaceRadius ?
5120          radiusToUse * distanceFalloff
5121      : distanceFalloff;
5122        for(float x = -1.0; x <= 1.0; x++) {
5123            for(float y = -1.0; y <= 1.0; y++) {
5124                vec2 offset = vec2(x, y);
5125                ivec2 p = ivec2(
5126                    (vUv * resolution * 0.5) + offset
5127                );
5128                vec2 pUv = vec2(p) / (resolution * 0.5);
5129                float sampleDepth = texelFetch(downsampledDepth,p, 0).x;
5130                vec4 sampleInfo = texelFetch(tDiffuse, p, 0);
5131                vec3 normalSample = sampleInfo.xyz * 2.0 - 1.0;
5132                vec3 worldPosSample = getWorldPos(sampleDepth, pUv);
5133                float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));
5134                float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0);
5135                float weight = rangeCheck;
5136                totalWeight += weight;
5137                texel += sampleInfo * weight;
5138            }
5139        }
5140        if (totalWeight == 0.0) {
5141            texel = texture2D(tDiffuse, vUv);
5142        } else {
5143            texel /= totalWeight;
5144        }
5145    }
5146        #else
5147        vec4 texel = texture2D(tDiffuse, vUv);
5148        #endif
5149
5150        #ifdef LOGDEPTH
5151        texel.a = clamp(texel.a, 0.0, 1.0);
5152        if (texel.a == 0.0) {
5153          texel.a = 1.0;
5154        }
5155        #endif
5156     
5157        float finalAo = pow(texel.a, intensity);
5158        float fogFactor;
5159        float fogDepth = distance(
5160            cameraPos,
5161            getWorldPos(depth, vUv)
5162        );
5163        if (fog) {
5164            if (fogExp) {
5165                fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );
5166            } else {
5167                fogFactor = smoothstep( fogNear, fogFar, fogDepth );
5168            }
5169        }
5170        finalAo = mix(finalAo, 1.0, fogFactor);
5171        vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply));
5172        if (renderMode == 0.0) {
5173            gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);
5174        } else if (renderMode == 1.0) {
5175            gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);
5176        } else if (renderMode == 2.0) {
5177            gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);
5178        } else if (renderMode == 3.0) {
5179            if (vUv.x < 0.5) {
5180                gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);
5181            } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {
5182                gl_FragColor = vec4(1.0);
5183            } else {
5184                gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);
5185            }
5186        } else if (renderMode == 4.0) {
5187            if (vUv.x < 0.5) {
5188                gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);
5189            } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {
5190                gl_FragColor = vec4(1.0);
5191            } else {
5192                gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);
5193            }
5194        }
5195        #include <dithering_fragment>
5196        if (gammaCorrection) {
5197            gl_FragColor = ${mX}(gl_FragColor);
5198        }
5199    }
5200    `},vX={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new ct},viewMat:{value:new ct},projectionMatrixInv:{value:new ct},viewMatrixInv:{value:new ct},cameraPos:{value:new G},resolution:{value:new _e},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:`
5201		varying vec2 vUv;
5202		void main() {
5203			vUv = uv;
5204			gl_Position = vec4(position, 1.0);
5205		}`,fragmentShader:`
5206		uniform sampler2D sceneDiffuse;
5207    uniform highp sampler2D sceneDepth;
5208    uniform sampler2D tDiffuse;
5209    uniform sampler2D blueNoise;
5210    uniform mat4 projectionMatrixInv;
5211    uniform mat4 viewMatrixInv;
5212    uniform vec2 resolution;
5213    uniform float r;
5214    uniform float radius;
5215     uniform float worldRadius;
5216    uniform float index;
5217     uniform float near;
5218     uniform float far;
5219     uniform float distanceFalloff;
5220     uniform bool logDepth;
5221     uniform bool screenSpaceRadius;
5222    varying vec2 vUv;
5223
5224    highp float linearize_depth(highp float d, highp float zNear,highp float zFar)
5225    {
5226        highp float z_n = 2.0 * d - 1.0;
5227        return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));
5228    }
5229    highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {
5230     float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;
5231     float a = farZ / (farZ - nearZ);
5232     float b = farZ * nearZ / (nearZ - farZ);
5233     float linDepth = a + b / depth;
5234     return linearize_depth(linDepth, nearZ, farZ);
5235   }
5236   highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {
5237     return nearZ + (farZ - nearZ) * d;
5238   }
5239   vec3 getWorldPosLog(vec3 posS) {
5240     vec2 uv = posS.xy;
5241     float z = posS.z;
5242     float nearZ =near;
5243     float farZ = far;
5244     float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;
5245     float a = farZ / (farZ - nearZ);
5246     float b = farZ * nearZ / (nearZ - farZ);
5247     float linDepth = a + b / depth;
5248     vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;
5249     vec4 wpos = projectionMatrixInv * clipVec;
5250     return wpos.xyz / wpos.w;
5251   }
5252    vec3 getWorldPos(float depth, vec2 coord) {
5253     #ifdef LOGDEPTH
5254          return getWorldPosLog(vec3(coord, depth));
5255     #endif
5256        
5257        float z = depth * 2.0 - 1.0;
5258        vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);
5259        vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;
5260        // Perspective division
5261       vec4 worldSpacePosition = viewSpacePosition;
5262       worldSpacePosition.xyz /= worldSpacePosition.w;
5263        return worldSpacePosition.xyz;
5264    }
5265    #include <common>
5266    #define NUM_SAMPLES 16
5267    uniform vec2 poissonDisk[NUM_SAMPLES];
5268    void main() {
5269        const float pi = 3.14159;
5270        vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y);
5271        vec2 uv = vUv;
5272        vec4 data = texture2D(tDiffuse, vUv);
5273        float occlusion = data.a;
5274        float baseOcc = data.a;
5275        vec3 normal = data.rgb * 2.0 - 1.0;
5276        float count = 1.0;
5277        float d = texture2D(sceneDepth, vUv).x;
5278        if (d == 1.0) {
5279          gl_FragColor = data;
5280          return;
5281        }
5282        vec3 worldPos = getWorldPos(d, vUv);
5283        float size = radius;
5284        float angle;
5285        if (index == 0.0) {
5286             angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2;
5287        } else if (index == 1.0) {
5288             angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2;
5289        } else if (index == 2.0) {
5290             angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2;
5291        } else {
5292             angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2;
5293        }
5294
5295        mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
5296        float radiusToUse = screenSpaceRadius ? distance(
5297          worldPos,
5298          getWorldPos(d, vUv +
5299            vec2(worldRadius, 0.0) / resolution)
5300        ) : worldRadius;
5301        float distanceFalloffToUse =screenSpaceRadius ?
5302            radiusToUse * distanceFalloff
5303        : distanceFalloff;
5304
5305
5306        for(int i = 0; i < NUM_SAMPLES; i++) {
5307            vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size;
5308            vec4 dataSample = texture2D(tDiffuse, uv + offset);
5309            float occSample = dataSample.a;
5310            vec3 normalSample = dataSample.rgb * 2.0 - 1.0;
5311            float dSample = texture2D(sceneDepth, uv + offset).x;
5312            vec3 worldPosSample = getWorldPos(dSample, uv + offset);
5313            float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));
5314            float rangeCheck = dSample == 1.0 ? 0.0 :exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0) * (1.0 - abs(occSample - baseOcc));
5315            occlusion += occSample * rangeCheck;
5316            count += rangeCheck;
5317        }
5318        if (count > 0.0) {
5319          occlusion /= count;
5320        }
5321        #ifdef LOGDEPTH
5322          occlusion = clamp(occlusion, 0.0, 1.0);
5323          if (occlusion == 0.0) {
5324            occlusion = 1.0;
5325          }
5326        #endif
5327        gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion);
5328    }
5329    `},yX={uniforms:{sceneDepth:{value:null},resolution:{value:new _e},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new ct},projectionMatrixInv:{value:new ct},logDepth:{value:!1}},depthWrite:!1,depthTest:!1,vertexShader:`
5330    varying vec2 vUv;
5331    void main() {
5332        vUv = uv;
5333        gl_Position = vec4(position, 1);
5334    }`,fragmentShader:`
5335    uniform highp sampler2D sceneDepth;
5336    uniform vec2 resolution;
5337    uniform float near;
5338    uniform float far;
5339    uniform bool logDepth;
5340    uniform mat4 viewMatrixInv;
5341    uniform mat4 projectionMatrixInv;
5342    varying vec2 vUv;
5343    layout(location = 1) out vec4 gNormal;
5344    vec3 getWorldPosLog(vec3 posS) {
5345        vec2 uv = posS.xy;
5346        float z = posS.z;
5347        float nearZ =near;
5348        float farZ = far;
5349        float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;
5350        float a = farZ / (farZ - nearZ);
5351        float b = farZ * nearZ / (nearZ - farZ);
5352        float linDepth = a + b / depth;
5353        vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;
5354        vec4 wpos = projectionMatrixInv * clipVec;
5355        return wpos.xyz / wpos.w;
5356      }
5357      vec3 getWorldPos(float depth, vec2 coord) {
5358        if (logDepth) {
5359          return getWorldPosLog(vec3(coord, depth));
5360        }
5361        float z = depth * 2.0 - 1.0;
5362        vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);
5363        vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;
5364        // Perspective division
5365       vec4 worldSpacePosition = viewSpacePosition;
5366       worldSpacePosition.xyz /= worldSpacePosition.w;
5367        return worldSpacePosition.xyz;
5368    }
5369  
5370    vec3 computeNormal(vec3 worldPos, vec2 vUv) {
5371      ivec2 p = ivec2(vUv * resolution);
5372      float c0 = texelFetch(sceneDepth, p, 0).x;
5373      float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;
5374      float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;
5375      float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;
5376      float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;
5377      float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;
5378      float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;
5379      float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;
5380      float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;
5381  
5382      float dl = abs((2.0 * l1 - l2) - c0);
5383      float dr = abs((2.0 * r1 - r2) - c0);
5384      float db = abs((2.0 * b1 - b2) - c0);
5385      float dt = abs((2.0 * t1 - t2) - c0);
5386  
5387      vec3 ce = getWorldPos(c0, vUv).xyz;
5388  
5389      vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz
5390                            : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;
5391      vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz
5392                            : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;
5393  
5394      return normalize(cross(dpdx, dpdy));
5395  }
5396    void main() {
5397        vec2 uv = vUv - vec2(0.5) / resolution;
5398        vec2 pixelSize = vec2(1.0) / resolution;
5399        vec2[] uvSamples = vec2[4](
5400            uv,
5401            uv + vec2(pixelSize.x, 0.0),
5402            uv + vec2(0.0, pixelSize.y),
5403            uv + pixelSize
5404        );
5405        float depth00 = texture2D(sceneDepth, uvSamples[0]).r;
5406        float depth10 = texture2D(sceneDepth, uvSamples[1]).r;
5407        float depth01 = texture2D(sceneDepth, uvSamples[2]).r;
5408        float depth11 = texture2D(sceneDepth, uvSamples[3]).r;
5409        float minDepth = min(min(depth00, depth10), min(depth01, depth11));
5410        float maxDepth = max(max(depth00, depth10), max(depth01, depth11));
5411        float targetDepth = minDepth;
5412        // Checkerboard pattern to avoid artifacts
5413        if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { 
5414            targetDepth = maxDepth;
5415        }
5416        int chosenIndex = 0;
5417        float[] samples = float[4](depth00, depth10, depth01, depth11);
5418        for(int i = 0; i < 4; ++i) {
5419            if (samples[i] == targetDepth) {
5420                chosenIndex = i;
5421                break;
5422            }
5423        }
5424        gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0);
5425        gNormal = vec4(computeNormal(
5426            getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex]
5427        ), 0.0);
5428       /* float[] samples = float[4](depth00, depth10, depth01, depth11);
5429        float c = 0.25 * (depth00 + depth10 + depth01 + depth11);
5430        float[] distances = float[4](depth00, depth10, depth01, depth11);
5431        float maxDistance = max(max(distances[0], distances[1]), max(distances[2], distances[3]));
5432
5433        int remaining[3];
5434        int rejected[3];
5435        int i, j, k;
5436
5437        for(i = 0, j = 0, k = 0; i < 4; ++i) {
5438            if (distances[i] < maxDistance) {
5439                remaining[j++] = i;
5440            } else {
5441                rejected[k++] = i;
5442            }
5443        }
5444        for(;j < 3;++j) {
5445            remaining[j] = rejected[--k];
5446        }
5447        vec3 s = vec3(
5448            samples[remaining[0]],
5449            samples[remaining[1]],
5450            samples[remaining[2]]
5451        );
5452        c = (s.x + s.y + s.z) / 3.0;
5453
5454        distances[0] = abs(c - s.x);
5455        distances[1] = abs(c - s.y);
5456        distances[2] = abs(c - s.z);
5457
5458        float minDistance = min(min(distances[0], distances[1]), distances[2]);
5459
5460        for(i = 0; i < 3; ++i) {
5461            if (distances[i] == minDistance) {
5462                break;
5463            }
5464        }*/
5465      /*  gl_FragColor = vec4(samples[remaining[i]], 0.0, 0.0, 0.0);
5466        gNormal = vec4(computeNormal(
5467            getWorldPos(samples[remaining[i]], uvSamples[remaining[i]]), uvSamples[remaining[i]]
5468        ), 0.0);*/
5469    }`},xX="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/K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qUv35r2jTKvpPWBUWNm5fytX/QJwp6qkIOsSx7Y67BSCbCDVLM8/VcMG+T0j+INrgL9sfT1ICtACH8BI0G6ViUZPVzzCmQHW2oVIwZjAoFl6+meO/pD8teO1E+1y03mCpYfW9S8qhtH2GhlFlebPf4NbezVv9xbXKWz0xezRNQWqUqtYRTUbuzK7KTvjG4rQHfzBpVmK4wDLnSIwdSzTSk1fPNeY0WOpPZTLlvQ59xwgfFrb326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==",_X=XD.Buffer.from(xX,"base64");function JD(n,e,t){if(e.getQueryParameter(n,e.QUERY_RESULT_AVAILABLE)){const s=e.getQueryParameter(n,e.QUERY_RESULT)/1e6;t.lastTime=s}else setTimeout(()=>{JD(n,e,t)},1)}class SX extends Cr{constructor(e,t,i=512,r=512){super(),this.width=i,this.height=r,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new qe(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0},{set:(s,o,a)=>{const l=s[o];return s[o]=a,o==="aoSamples"&&l!==a&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),o==="denoiseSamples"&&l!==a&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),o==="halfRes"&&l!==a&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),o==="depthAwareUpsampling"&&l!==a&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),o==="gammaCorrection"&&(this.autosetGamma=!1),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.copyQuad=new wh(new nn({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:`
5470            varying vec2 vUv;
5471            void main() {
5472                vUv = uv;
5473                gl_Position = vec4(position, 1);
5474            }
5475            `,fragmentShader:`
5476            uniform sampler2D tDiffuse;
5477            varying vec2 vUv;
5478            void main() {
5479                gl_FragColor = texture2D(tDiffuse, vUv);
5480            }
5481            `})),this.writeTargetInternal=new xn(this.width,this.height,{minFilter:Ft,magFilter:Ft,depthBuffer:!1}),this.readTargetInternal=new xn(this.width,this.height,{minFilter:Ft,magFilter:Ft,depthBuffer:!1}),this.outputTargetInternal=new xn(this.width,this.height,{minFilter:Ft,magFilter:Ft,depthBuffer:!1}
5481),this.bluenoise=new gs(_X,128,128),this.bluenoise.colorSpace=us,this.bluenoise.wrapS=go,this.bluenoise.wrapT=go,this.bluenoise.minFilter=Ht,this.bluenoise.magFilter=Ht,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new _e,this._c=new qe}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new GB(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Ef,this.depthDownsampleTarget.texture[0].type=vn,this.depthDownsampleTarget.texture[0].minFilter=Ht,this.depthDownsampleTarget.texture[0].magFilter=Ht,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=Dn,this.depthDownsampleTarget.texture[1].type=li,this.depthDownsampleTarget.texture[1].minFilter=Ht,this.depthDownsampleTarget.texture[1].magFilter=Ht,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new wh(new nn(yX))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={...dX};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader=`#define LOGDEPTH
5482`+t.fragmentShader),this.configuration.halfRes&&(t.fragmentShader=`#define HALFRES
5483`+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new nn(t)):this.effectShaderQuad=new wh(new nn(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={...vX};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader=`#define LOGDEPTH
5484`+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new nn(t)):this.poissonBlurQuad=new wh(new nn(t))}configureEffectCompositer(e=!1){const t={...gX};e&&(t.fragmentShader=`#define LOGDEPTH
5485`+t.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(t.fragmentShader=`#define HALFRES
5486`+t.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new nn(t)):this.effectCompositerQuad=new wh(new nn(t))}generateHemisphereSamples(e){const t=[];for(let i=0;i<e;i++){const r=2.399963*i,s=Math.sqrt(i+.5)/Math.sqrt(e),o=s*Math.cos(r),a=s*Math.sin(r),l=Math.sqrt(1-(o*o+a*a));t.push(new G(o,a,l))}return t}generateHemisphereSamplesR(e){let t=[];for(let i=0;i<e;i++)t.push((i+1)/e);return t}generateDenoiseSamples(e,t){const i=2*Math.PI*t/e,r=1/e,s=r,o=[];let a=r,l=0;for(let c=0;c<e;c++)o.push(new _e(Math.cos(l),Math.sin(l)).multiplyScalar(Math.pow(a,.75))),a+=s,l+=i;return o}setSize(e,t){this.width=e,this.height=t;const i=this.configuration.halfRes?.5:1;this.writeTargetInternal.setSize(e*i,t*i),this.readTargetInternal.setSize(e*i,t*i),this.configuration.halfRes&&this.depthDownsampleTarget.setSize(e*i,t*i),this.outputTargetInternal.setSize(e,t)}setDepthTexture(e){this.depthTexture=e}render(e,t,i){const r=e.xr.enabled;e.xr.enabled=!1,e.capabilities.logarithmicDepthBuffer!==this.configuration.logarithmicDepthBuffer&&(this.configuration.logarithmicDepthBuffer=e.capabilities.logarithmicDepthBuffer,this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer)),t.texture.type!==this.outputTargetInternal.texture.type&&(this.outputTargetInternal.texture.type=t.texture.type,this.outputTargetInternal.texture.needsUpdate=!0);let s,o,a;this.debugMode&&(s=e.getContext(),o=s.getExtension("EXT_disjoint_timer_query_webgl2"),o===null&&(console.error("EXT_disjoint_timer_query_webgl2 not available, disabling debug mode."),this.debugMode=!1)),this.debugMode&&(a=s.createQuery(),s.beginQuery(o.TIME_ELAPSED_EXT,a)),this.camera.updateMatrixWorld(),this._r.set(this.width,this.height);let l=this.configuration.aoRadius;this.configuration.halfRes&&this.configuration.screenSpaceRadius&&(l*=.5),this.configuration.halfRes&&(e.setRenderTarget(this.depthDownsampleTarget),this.depthDownsampleQuad.material.uniforms.sceneDepth.value=this.depthTexture,this.depthDownsampleQuad.material.uniforms.resolution.value=this._r,this.depthDownsampleQuad.material.uniforms.near.value=this.camera.near,this.depthDownsampleQuad.material.uniforms.far.value=this.camera.far,this.depthDownsampleQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.depthDownsampleQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.depthDownsampleQuad.material.uniforms.logDepth.value=this.configuration.logarithmicDepthBuffer,this.depthDownsampleQuad.render(e)),this.effectShaderQuad.material.uniforms.sceneDiffuse.value=t.texture,this.effectShaderQuad.material.uniforms.sceneDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.texture[0]:this.depthTexture,this.effectShaderQuad.material.uniforms.sceneNormal.value=this.configuration.halfRes?this.depthDownsampleTarget.texture[1]:null,this.effectShaderQuad.material.uniforms.projMat.value=this.camera.projectionMatrix,this.effectShaderQuad.material.uniforms.viewMat.value=this.camera.matrixWorldInverse,this.effectShaderQuad.material.uniforms.projViewMat.value=this.camera.projectionMatrix.clone().multiply(this.camera.matrixWorldInverse.clone()),this.effectShaderQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.effectShaderQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.effectShaderQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new G),this.effectShaderQuad.material.uniforms.resolution.value=this.configuration.halfRes?this._r.clone().multiplyScalar(1/2).floor():this._r,this.effectShaderQuad.material.uniforms.time.value=performance.now()/1e3,this.effectShaderQuad.material.uniforms.samples.value=this.samples,this.effectShaderQuad.material.uniforms.samplesR.value=this.samplesR,this.effectShaderQuad.material.uniforms.bluenoise.value=this.bluenoise,this.effectShaderQuad.material.uniforms.radius.value=l,this.effectShaderQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.effectShaderQuad.material.uniforms.near.value=this.camera.near,this.effectShaderQuad.material.uniforms.far.value=this.camera.far,this.effectShaderQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.effectShaderQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.effectShaderQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,e.setRenderTarget(this.writeTargetInternal),this.effectShaderQuad.render(e);for(let c=0;c<this.configuration.denoiseIterations;c++)[this.writeTargetInternal,this.readTargetInternal]=[this.readTargetInternal,this.writeTargetInternal],this.poissonBlurQuad.material.uniforms.tDiffuse.value=this.readTargetInternal.texture,this.poissonBlurQuad.material.uniforms.sceneDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.texture[0]:this.depthTexture,this.poissonBlurQuad.material.uniforms.projMat.value=this.camera.projectionMatrix,this.poissonBlurQuad.material.uniforms.viewMat.value=this.camera.matrixWorldInverse,this.poissonBlurQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.poissonBlurQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.poissonBlurQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new G),this.poissonBlurQuad.material.uniforms.resolution.value=this.configuration.halfRes?this._r.clone().multiplyScalar(1/2).floor():this._r,this.poissonBlurQuad.material.uniforms.time.value=performance.now()/1e3,this.poissonBlurQuad.material.uniforms.blueNoise.value=this.bluenoise,this.poissonBlurQuad.material.uniforms.radius.value=this.configuration.denoiseRadius*(this.configuration.halfRes?1/2:1),this.poissonBlurQuad.material.uniforms.worldRadius.value=l,this.poissonBlurQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.poissonBlurQuad.material.uniforms.index.value=c,this.poissonBlurQuad.material.uniforms.poissonDisk.value=this.samplesDenoise,this.poissonBlurQuad.material.uniforms.near.value=this.camera.near,this.poissonBlurQuad.material.uniforms.far.value=this.camera.far,this.poissonBlurQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.poissonBlurQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,e.setRenderTarget(this.writeTargetInternal),this.poissonBlurQuad.render(e);this.effectCompositerQuad.material.uniforms.sceneDiffuse.value=t.texture,this.effectCompositerQuad.material.uniforms.sceneDepth.value=this.depthTexture,this.effectCompositerQuad.material.uniforms.near.value=this.camera.near,this.effectCompositerQuad.material.uniforms.far.value=this.camera.far,this.effectCompositerQuad.material.uniforms.projectionMatrixInv.value=this.camera.projectionMatrixInverse,this.effectCompositerQuad.material.uniforms.viewMatrixInv.value=this.camera.matrixWorld,this.effectCompositerQuad.material.uniforms.logDepth.value=e.capabilities.logarithmicDepthBuffer,this.effectCompositerQuad.material.uniforms.ortho.value=this.camera.isOrthographicCamera,this.effectCompositerQuad.material.uniforms.downsampledDepth.value=this.configuration.halfRes?this.depthDownsampleTarget.texture[0]:this.depthTexture,this.effectCompositerQuad.material.uniforms.resolution.value=this._r,this.effectCompositerQuad.material.uniforms.blueNoise.value=this.bluenoise,this.effectCompositerQuad.material.uniforms.intensity.value=this.configuration.intensity,this.effectCompositerQuad.material.uniforms.renderMode.value=this.configuration.renderMode,this.effectCompositerQuad.material.uniforms.screenSpaceRadius.value=this.configuration.screenSpaceRadius,this.effectCompositerQuad.material.uniforms.radius.value=l,this.effectCompositerQuad.material.uniforms.distanceFalloff.value=this.configuration.distanceFalloff,this.effectCompositerQuad.material.uniforms.gammaCorrection.value=this.autosetGamma?this.renderToScreen:this.configuration.gammaCorrection,this.effectCompositerQuad.material.uniforms.tDiffuse.value=this.writeTargetInternal.texture,this.effectCompositerQuad.material.uniforms.color.value=this._c.copy(this.configuration.color).convertSRGBToLinear(),this.effectCompositerQuad.material.uniforms.colorMultiply.value=this.configuration.colorMultiply,this.effectCompositerQuad.material.uniforms.cameraPos.value=this.camera.getWorldPosition(new G),this.effectCompositerQuad.material.uniforms.fog.value=!!this.scene.fog,this.scene.fog&&(this.scene.fog.isFog?(this.effectCompositerQuad.material.uniforms.fogExp.value=!1,this.effectCompositerQuad.material.uniforms.fogNear.value=this.scene.fog.near,this.effectCompositerQuad.material.uniforms.fogFar.value=this.scene.fog.far):this.scene.fog.isFogExp2?(this.effectCompositerQuad.material.uniforms.fogExp.value=!0,this.effectCompositerQuad.material.uniforms.fogDensity.value=this.scene.fog.density):console.error(`Unsupported fog type ${this.scene.fog.constructor.name} in SSAOPass.`)),e.setRenderTarget(this.outputTargetInternal),this.effectCompositerQuad.render(e),e.setRenderTarget(this.renderToScreen?null:i),this.copyQuad.material.uniforms.tDiffuse.value=this.outputTargetInternal.texture,this.copyQuad.render(e),this.debugMode&&(s.endQuery(o.TIME_ELAPSED_EXT),JD(a,s,this)),e.xr.enabled=r}enableDebugMode(){this.debugMode=!0}disableDebugMode(){this.debugMode=!1}setDisplayMode(e){this.configuration.renderMode=["Combined","AO","No AO","Split","Split AO"].indexOf(e)}setQualityMode(e){e==="Performance"?(this.configuration.aoSamples=8,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):e==="Low"?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=4,this.configuration.denoiseRadius=12):e==="Medium"?(this.configuration.aoSamples=16,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=12):e==="High"?(this.configuration.aoSamples=64,this.configuration.denoiseSamples=8,this.configuration.denoiseRadius=6):e==="Ultra"&&(this.configuration.aoSamples=64,this.configuration.denoiseSamples=16,this.configuration.denoiseRadius=6)}}const AX=ne.forwardRef(({halfRes:n,screenSpaceRadius:e,quality:t,depthAwareUpsampling:i=!0,aoRadius:r=5,aoSamples:s=16,denoiseSamples:o=4,denoiseRadius:a=12,distanceFalloff:l=1,intensity:c=1,color:f,renderMode:d=0},p)=>{const{camera:m,scene:v}=In(),_=ne.useMemo(()=>new SX(v,m),[]);return ne.useLayoutEffect(()=>{Oo(_.configuration,{color:f,aoRadius:r,distanceFalloff:l,intensity:c,aoSamples:s,denoiseSamples:o,denoiseRadius:a,screenSpaceRadius:e,renderMode:d,halfRes:n,depthAwareUpsampling:i})},[e,f,r,l,c,s,o,a,d,n,i]),ne.useLayoutEffect(()=>{t&&_.setQualityMode(t.charAt(0).toUpperCase()+t.slice(1))},[t]),re.jsx("primitive",{ref:p,object:_})}),MX=`
5487  uniform float time;
5488  uniform float intensity;
5489  uniform vec3 waterColor;
5490  uniform vec2 frequency;
5491  uniform vec2 amplitude;
5492  uniform float speed;
5493  uniform float waterLevel;
5494  uniform sampler2D depthTexture;
5495  uniform float cameraNear;
5496  uniform float cameraFar;
5497  uniform vec2 resolution;
5498  uniform int debugMode; // 0: normal, 1: depth, 2: mask
5499
5500  float getDepth(vec2 screenUv) {
5501    float depth = texture2D(depthTexture, screenUv).x;
5502    float viewZ = perspectiveDepthToViewZ(depth, cameraNear, cameraFar);
5503    return viewZToOrthographicDepth(viewZ, cameraNear, cameraFar);
5504  }
5505
5506  float random(vec2 p) {
5507    return fract(sin(dot(p.xy, vec2(12.9898,78.233))) * 43758.5453123);
5508  }
5509
5510  float noise(vec2 p) {
5511    vec2 i = floor(p);
5512    vec2 f = fract(p);
5513    f = f * f * (3.0 - 2.0 * f);
5514    float a = random(i);
5515    float b = random(i + vec2(1.0, 0.0));
5516    float c = random(i + vec2(0.0, 1.0));
5517    float d = random(i + vec2(1.0, 1.0));
5518    return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
5519  }
5520
5521  float getMask(vec2 screenUv) {
5522    float sceneDepth = getDepth(screenUv);
5523    // Invertemos a lógica e ajustamos o waterLevel
5524    return sceneDepth < waterLevel ? 1.0 : 0.0;  // Inverte a comparação
5525  }
5526
5527  void mainUv(inout vec2 uv) {
5528    vec2 screenUv = gl_FragCoord.xy / resolution;
5529    float mask = getMask(screenUv);
5530    
5531    if(mask > 0.0) {
5532      vec2 distortion = vec2(
5533        noise(uv * frequency + time * speed) * 2.0 - 1.0,
5534        noise(uv * frequency + vec2(1.0) + time * speed) * 2.0 - 1.0
5535      ) * amplitude;
5536      
5537      uv += distortion * intensity;
5538    }
5539  }
5540
5541  void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
5542    vec2 screenUv = gl_FragCoord.xy / resolution;
5543    float sceneDepth = getDepth(screenUv);
5544    float mask = getMask(screenUv);
5545
5546    // Debug modes
5547    if(debugMode == 1) {
5548      // Visualizar depth buffer
5549      outputColor = vec4(vec3(sceneDepth), 1.0);
5550      return;
5551    }
5552    else if(debugMode == 2) {
5553      // Visualizar máscara
5554      outputColor = vec4(vec3(mask), 1.0);
5555      return;
5556    }
5557    
5558    // Modo normal
5559    if(mask > 0.0) {
5560      vec4 distortedColor = inputColor;
5561      
5562      vec3 underwaterColor = mix(
5563        distortedColor.rgb,
5564        waterColor,
5565        0.4 * intensity
5566      );
5567
5568      float depth = sceneDepth;
5569      underwaterColor = mix(
5570        underwaterColor,
5571        waterColor * 0.7,
5572        depth * 0.4 * intensity
5573      );
5574
5575      float caustics = pow(
5576        noise(uv * 20.0 + time * 2.0) * 0.5 +
5577        noise(uv * 15.0 - time * 1.5) * 0.5,
5578        2.0
5579      ) * 0.05;
5580      
5581      underwaterColor += vec3(caustics) * intensity;
5582
5583      outputColor = vec4(underwaterColor, distortedColor.a);
5584    } else {
5585      outputColor = inputColor;
5586    }
5587  }
5588`;class EX extends ea{constructor({intensity:e=1,waterColor:t=new G(0,.4,.75),frequency:i=new _e(4,4),amplitude:r=new _e(.05,.05),speed:s=.5,waterLevel:o=.7,depthTexture:a=null,resolution:l=new _e(1,1),cameraNear:c=.1,c
5588ameraFar:f=1e3,debugMode:d=0}={}){super("MaskedUnderwaterEffect",MX,{uniforms:new Map([["intensity",{value:e}],["time",{value:0}],["waterColor",{value:t}],["frequency",{value:i}],["amplitude",{value:r}],["speed",{value:s}],["waterLevel",{value:o}],["depthTexture",{value:a}],["resolution",{value:l}],["cameraNear",{value:c}],["cameraFar",{value:f}],["debugMode",{value:d}]]),blendFunction:Dt.NORMAL})}update(e,t,i){this.uniforms.get("time").value+=i}setDebugMode(e){this.uniforms.get("debugMode").value=e}}const wX=ne.forwardRef(({intensity:n=1,waterColor:e=new G(0,.4,.75),frequency:t=new _e(4,4),amplitude:i=new _e(.05,.05),speed:r=.5,waterLevel:s=.5,depthTexture:o,camera:a,debugMode:l=0},c)=>{const{size:f,viewport:d}=In(),p=ne.useMemo(()=>new _e(f.width*Math.max(1.5,d.dpr),f.height*Math.max(1.5,d.dpr)),[f,d.dpr]),m=ne.useMemo(()=>new EX({intensity:n,waterColor:e,frequency:t,amplitude:i,speed:r,waterLevel:s,depthTexture:o,resolution:p,cameraNear:a==null?void 0:a.near,cameraFar:a==null?void 0:a.far,debugMode:l}),[n,e,t,i,r,s,o,p,a==null?void 0:a.near,a==null?void 0:a.far,l]);return re.jsx("primitive",{ref:c,object:m,dispose:null})}),TX=`
5589  uniform float time;
5590  uniform float initialTime;
5591  uniform vec2 resolution;
5592  uniform float rainAmount;
5593  uniform float distortionStrength;
5594  uniform float dropSize;
5595  uniform float appearProgress; // Controla o progresso da animação de entrada (0-1)
5596  uniform float appearDirection; // Controla a direção da máscara de entrada (0-1)
5597
5598
5599  #define S(a, b, t) smoothstep(a, b, t)
5600
5601  // Função auxiliar para ajustar as coordenadas UV mantendo o aspect ratio
5602  vec2 getAspectUv(vec2 uv) {
5603    vec2 aspectRatio = vec2(resolution.x / resolution.y, 1.0);
5604    if (resolution.x < resolution.y) {
5605      aspectRatio = vec2(1.0, resolution.y / resolution.x);
5606    }
5607    return (uv - 0.5) * aspectRatio + 0.5;
5608  }
5609
5610  vec3 N13(float p) {
5611    vec3 p3 = fract(vec3(p) * vec3(.1031,.11369,.13787));
5612    p3 += dot(p3, p3.yzx + 19.19);
5613    return fract(vec3((p3.x + p3.y)*p3.z, (p3.x+p3.z)*p3.y, (p3.y+p3.z)*p3.x));
5614  }
5615
5616  float N(float t) {
5617    return fract(sin(t*12345.564)*7658.76);
5618  }
5619
5620  float Saw(float b, float t) {
5621    return S(0., b, t)*S(1., b, t);
5622  }
5623
5624  vec2 MovingDropLayer(vec2 uv, float t, float size) {
5625    vec2 UV = getAspectUv(uv);
5626    vec2 adjustedUv = UV;
5627    
5628    float movingTime = time * 0.2;
5629    uv.y += movingTime * 0.75;
5630    vec2 a = vec2(4., 1.);
5631    vec2 grid = a*2.;
5632    vec2 id = floor(uv*grid);
5633    
5634    float colShift = N(id.x); 
5635    uv.y += colShift;
5636    
5637    id = floor(uv*grid);
5638    vec3 n = N13(id.x*35.2+id.y*2376.1);
5639    vec2 st = fract(uv*grid)-vec2(.5, 0);
5640    
5641    float x = n.x-.5;
5642    
5643    float y = UV.y*20.;
5644    float wiggle = sin(y+sin(y));
5645    x += wiggle*(.5-abs(x))*(n.z-.5);
5646    x *= .7;
5647    float ti = fract(movingTime+n.z);
5648    y = (Saw(.85, ti)-.5)*.9+.5;
5649    vec2 p = vec2(x, y);
5650    
5651    float d = length((st-p)*a.yx);
5652    
5653    // Ajustar a forma da gota para ser mais arredondada
5654    float mainDrop = pow(S(.6 * size, .0, d), 1.8); // Aumentado o expoente para mais curvatura
5655    
5656    float r = sqrt(S(1., y, st.y));
5657    float cd = abs(st.x-x);
5658    float trail = S(.23*r * size, .15*r*r * size, cd);
5659    float trailFront = S(-.02 * size, .02 * size, st.y-y);
5660    trail *= trailFront*r*r;
5661    
5662    y = UV.y;
5663    float trail2 = S(.2*r * size, .0, cd);
5664    float droplets = max(0., (sin(y*(1.-y)*120.)-st.y))*trail2*trailFront*n.z;
5665    y = fract(y*10.)+(st.y-.5);
5666    float dd = length(st-vec2(x, y));
5667    droplets = S(.4 * size, 0., dd);
5668    float m = mainDrop+droplets*r*trailFront;
5669    
5670    // Criar um efeito de borda mais suave
5671    float edge = (1.0 - d) * 0.5;
5672    
5673    return vec2(m, edge);
5674  }
5675
5676  float StaticDrops(vec2 uv, float t, float size) {
5677    vec2 UV = getAspectUv(uv);
5678    UV *= 30.;
5679    
5680    vec2 id = floor(uv);
5681    uv = fract(uv)-.5;
5682    vec3 n = N13(id.x*107.45+id.y*3543.654);
5683    vec2 p = (n.xy-.5)*.7;
5684    float d = length(uv-p);
5685    
5686    float fade = Saw(.025, fract(initialTime+n.z));
5687    float c = pow(S(.4 * size, 0., d), 1.8)*fract(n.z*10.)*fade;
5687 // Mesmo expoente para consistência
5688    return c;
5689  }
5690
5691  vec2 Drops(vec2 uv, float t, float l0, float l1, float l2, float size) {
5692    float s = StaticDrops(uv, t, size); 
5693    vec2 m1 = MovingDropLayer(uv, t, size);
5694    vec2 m2 = MovingDropLayer(uv*1.85, t, size);
5695    
5696    float c = s+m1.x+m2.x;
5697    c = S(.3, 1., c);
5698    
5699    return vec2(c, max(m1.y*l0, m2.y*l1));
5700  }
5701
5702  void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
5703    // Calcular a máscara de aparecimento (de cima para baixo)
5704    float appearMask = smoothstep(appearDirection - 1.0, appearDirection, 1.0 - uv.y);
5705    
5706    // Ajustar o tamanho das gotas com base no progresso de aparecimento
5707    float finalDropSize = dropSize * appearProgress * appearMask;
5708
5709    float T = time;
5710    float t = T * 0.2;
5711    
5712    float maxBlur = mix(3., 6., rainAmount);
5713    float minBlur = 2.;
5714        
5715    float staticDrops = S(-.5, 1., rainAmount)*2.;
5716    float layer1 = S(.25, .75, rainAmount);
5717    float layer2 = S(.0, .5, rainAmount);
5718    
5719    vec2 adjustedUV = getAspectUv(uv);
5720    vec2 c = Drops(adjustedUV, t, staticDrops, layer1, layer2, finalDropSize);
5721    
5722
5723    
5724    vec2 e = vec2(.005, 0.);
5725    float cx = Drops(adjustedUV + e, t, staticDrops, layer1, layer2, finalDropSize).x;
5726    float cy = Drops(adjustedUV + e.yx, t, staticDrops, layer1, layer2, finalDropSize).x;
5727    vec2 n = vec2(cx-c.x, cy-c.x);
5728    
5729    n *= 3.5;
5730    
5731    vec2 distortedUV = uv + n * distortionStrength * finalDropSize * (1.0 + c.x * 0.5);
5732    vec3 col = texture2D(inputBuffer, distortedUV).rgb;
5733    
5734    float refraction = c.x * 0.3;
5735    col.rg += n * refraction * distortionStrength * finalDropSize;
5736    
5737    float brightness = 1.0 + c.x * 0.05;
5738    col *= mix(vec3(1.0), vec3(brightness), c.x);
5739    
5740    float highlight = pow(c.y, 2.0) * 0.25;
5741    col += vec3(highlight) * (1.0 - c.x);
5742    
5743    outputColor = vec4(mix(inputColor.rgb, col, c.x * 0.9 * appearMask), 1.0);
5744  }
5745`;class CX extends ea{constructor({rainAmount:e=.5,distortionStrength:t=.2,blendFunction:i=Dt.NORMAL}={}){super("RainEffect",TX,{uniforms:new Map([["time",{value:0}],["initialTime",{value:0}],["resolution",{value:new _e}],["rainAmount",{value:e}],["distortionStrength",{value:t}],["dropSize",{value:1}],["appearProgress",{value:0}],["appearDirection",{value:1}]]),blendFunction:i})}update(e,t,i){this.uniforms.get("time").value+=i}}const RX=ne.forwardRef(({rainAmount:n=.2,distortionStrength:e=.25,blendFunction:t=Dt.NORMAL,isUnderwater:i=!1,dryingDuration:r=4.2,appearDuration:s=1.6,dropAppearDuration:o=1},a)=>{const[l,c]=ne.useState(0),[f,d]=ne.useState(0),[p,m]=ne.useState(!1),v=ne.useRef(i),_=ne.useMemo(()=>new CX({rainAmount:n,distortionStrength:e,blendFunction:t}),[n,e,t]),{size:x,viewport:g}=In();return ne.useEffect(()=>{_.uniforms.get("dropSize").value=0,_.uniforms.get("appearProgress").value=0,_.uniforms.get("appearDirection").value=0},[_]),ne.useEffect(()=>{_.uniforms.get("resolution").value.set(x.width*Math.max(1.5,g.dpr),x.height*Math.max(1.5,g.dpr))},[x,_]),ne.useEffect(()=>{v.current&&!i&&m(!0),v.current=i,!i&&p&&(c(0),d(0),_.uniforms.get("initialTime").value=_.uniforms.get("time").value,_.uniforms.get("dropSize").value=1,_.uniforms.get("appearProgress").value=0,_.uniforms.get("appearDirection").value=1)},[i,_,p]),ra((S,A)=>{if(p)if(i){const E=_.uniforms.get("dropSize").value,I=_.uniforms.get("appearProgress").value,b=_.uniforms.get("appearDirection").value;(E>0||I>0||b>0)&&(_.uniforms.get("dropSize").value=Math.max(0,E-A*2.5),_.uniforms.get("appearProgress").value=Math.max(0,I-A*2.5),_.uniforms.get("appearDirection").value=Math.max(0,b-A*2.5))}else{const E=l+A,I=f+A;if(I<=s){const b=Math.min(1,I/s);_.uniforms.get("appearDirection").value=b;const P=Math.min(1,I/o);_.uniforms.get("appearProgress").value=P,d(I)}else{const b=Math.max(0,1-(E-s)/r);_.uniforms.get("dropSize").value=b,c(E)}}}),re.jsx("primitive",{ref:a,object:_,dispose:null})});function bX({debugMode:n=0}){const[e,t]=HD(),{qualitySettings:i}=As(kt),r=ne.useRef();return re.jsxs(re.Fragment,{children:[re.jsxs(WW,{multisampling:4,disableNormalPass:!0,autoClear:!1,children:[e&&re.jsxs(re.Fragment,{children:[i==="ultra"&&re.jsxs(re.Fragment,{children:[re.
5745jsx(AX,{intensity:1.5,aoRadius:.4,quality:"performance"}),re.jsx(qW,{taper:1.25,blur:.6})]}),re.jsx(wX,{ref:r,intensity:.6,waterColor:new G(0,.24,.25),frequency:new _e(8,3),amplitude:new _e(.006,.002),speed:1.5,debugMode:n}),re.jsx(jW,{offset:new _e(.005,.005),modulationOffset:.4,radialModulation:!0}),re.jsx(KW,{darkness:.45,offset:.6,blendFunction:Dt.NORMAL})]}),re.jsx(RX,{rainAmount:.1,distortionStrength:.17,isUnderwater:e}),re.jsx(JW,{saturation:.15}),re.jsx(YW,{mode:6})]}),re.jsx(t,{visible:!1})]})}function IX(){const{qualitySettings:n,currentEnvironment:e,currentObject:t}=As(kt),[i,r]=ne.useState(e);return ne.useEffect(()=>{e!==i&&(kt.finishedLoadingAsset=!1)},[e,i]),re.jsxs(re.Fragment,{children:[re.jsx(M9,{}),n!=="performance"?re.jsx(bX,{}):re.jsx(T9,{}),re.jsx(E9,{}),re.jsxs(ne.Suspense,{fallback:re.jsx(PX,{actualEnvironment:i,currentEnvironment:e,setActualEnvironment:r}),children:[re.jsx(ID,{preset:e==="sky"?null:e,files:e==="sky"?"skymap.jpg":void 0,background:!0,environmentRotation:[0,.7,0],blur:.8}),re.jsx(S6,{speed:2,rotationIntensity:.1,children:t==="sphere"?re.jsx(_6,{args:[.25,32,32],position:[0,-1.5,0],castShadow:!0,children:re.jsx("meshPhysicalMaterial",{metalness:0,roughness:.5,color:"grey"})}):t==="shark"?re.jsx(C9,{scale:.002,position:[-.2,-1.5,0],rotation:[0,-Math.PI/2,0]}):re.jsx(R9,{scale:1,position:[0,-1.8,-.15],rotation:[0,-Math.PI/2,0]})})]})]})}function PX({actualEnvironment:n,currentEnvironment:e,setActualEnvironment:t}){var c,f;const{progress:i}=hD(),{currentObject:r}=As(kt),s=[{id:"sky",label:"Sky"},{id:"sunset",label:"Sunset"},{id:"dawn",label:"Dawn"},{id:"warehouse",label:"Warehouse"},{id:"forest",label:"Forest"},{id:"city",label:"City"}],o=[{id:"sphere",label:"Sphere"},{id:"shark",label:"Shark"},{id:"turtle",label:"Turtle"}],a=((c=s.find(d=>d.id===e))==null?void 0:c.label)||e,l=((f=o.find(d=>d.id===r))==null?void 0:f.label)||r;return ne.useEffect(()=>{i>99&&(kt.finishedLoadingAsset=!0,t(e))},[i,e,t]),re.jsxs(re.Fragment,{children:[re.jsx(ID,{preset:n==="sky"?null:n,files:n==="sky"?"skymap.jpg":void 0,background:!0,blur:.8}
5745),re.jsxs(c8,{wrapperClass:"loader-environment",calculatePosition:()=>[0,0,0],children:[re.jsx("span",{className:"loader"}),`LOADING ${e!==n?a.toUpperCase():l.toUpperCase()}...`]})]})}const BX=180/Math.PI,Sb=n=>{const e=n%360;return e<0?360+e:e},DX=({x:n,y:e},t)=>{const i=t.left+t.width/2,r=t.top+t.height/2;return Math.atan2(e-r,n-i)*BX},Q_=()=>{};class LX{constructor(e,t){this.active=!1,this.element=e,this.element.style.willChange="transform",this.initOptions(t),this.updateCSS(),this.bindHandlers(),this.addListeners()}get angle(){return this._angle}set angle(e){this._angle!==e&&(this._angle=Sb(e),this.updateCSS())}initOptions(e){e=e||{},this.onRotate=e.onRotate||Q_,this.onDragStart=e.onDragStart||Q_,this.onDragStop=e.onDragStop||Q_,this._angle=e.angle||0}bindHandlers(){this.onRotationStart=this.onRotationStart.bind(this),this.onRotated=this.onRotated.bind(this),this.onRotationStop=this.onRotationStop.bind(this)}addListeners(){this.element.addEventListener("touchstart",this.onRotationStart,{passive:!0}),document.addEventListener("touchmove",this.onRotated,{passive:!1}),document.addEventListener("touchend",this.onRotationStop,{passive:!0}),document.addEventListener("touchcancel",this.onRotationStop,{passive:!0}),this.element.addEventListener("mousedown",this.onRotationStart,{passive:!0}),document.addEventListener("mousemove",this.onRotated,{passive:!1}),document.addEventListener("mouseup",this.onRotationStop,{passive:!0}),document.addEventListener("mouseleave",this.onRotationStop,{passive:!1})}removeListeners(){this.element.removeEventListener("touchstart",this.onRotationStart),document.removeEventListener("touchmove",this.onRotated),document.removeEventListener("touchend",this.onRotationStop),document.removeEventListener("touchcancel",this.onRotationStop),this.element.removeEventListener("mousedown",this.onRotationStart),document.removeEventListener("mousemove",this.onRotated),document.removeEventListener("mouseup",this.onRotationStop),document.removeEventListener("mouseleave",this.onRotationStop)}destroy(){this.onRotationStop(),this.removeListeners()}onRotationStart(e){(e.type==="touchstart"||e.button===0)&&(this.active=!0,this.onDragStart(e),this.setAngleFromEvent(e))}onRotationStop(){this.active&&(this.active=!1,this.onDragStop()),this.active=!1}onRotated(e){this.active&&(e.preventDefault(),this.setAngleFromEvent(e))}setAngleFromEvent(e){const t=e.targetTouches?e.targetTouches[0]:e,i=DX({x:t.clientX,y:t.clientY},this.element.getBoundingClientRect());this._angle=Sb(i+90),this.updateCSS(),this.onRotate(this._angle)}updateCSS(){this.element.style.transform="rotate("+this._angle+"deg)"}}const Z_=()=>{},FX=["red","yellow","green","cyan","blue","magenta","red"],Ab={ArrowUp:(n,e)=>n+e,ArrowRight:(n,e)=>n+e,ArrowDown:(n,e)=>n-e,ArrowLeft:(n,e)=>n-e,PageUp:(n,e)=>n+e*10,PageDown:(n,e)=>n-e*10,Home:()=>0,End:()=>359},NX=({hue:n=0,saturation:e=100,luminosity:t=50,alpha:i=1,disabled:r=!1,step:s=1,variant:o="collapsible",initiallyCollapsed:a=!1,mouseScroll:l=!1,ariaLabelColorWell:c="color well",onInput:f=Z_,onChange:d=Z_,onSelect:p=Z_,className:m,...v})=>{const _=ne.useRef(null),x=ne.useRef(null),g=ne.useRef(null),S=ne.useRef(n),[A,E]=ne.useState(n),[I,b]=ne.useState(!a),[P,D]=ne.useState(!a),[O,C]=ne.useState(!1),[B,Y]=ne.useState(!1),[$,se]=ne.useState(!1);ne.useEffect(()=>(l&&_.current.addEventListener("wheel",ce),g.current=new LX(_.current,{angle:S.current,onRotate(Ue){S.current=Ue,f(Ue)},onDragStart(){se(!0)},onDragStop(){se(!1),d(S.current)}}),()=>{g.current.destroy(),g.current=null,l&&_.current.removeEventListener("wheel",ce)}),[]),ne.useEffect(()=>{S.current=n,g.current.angle=n},[n]);const ce=Ue=>{if(O||!I)return;Ue.preventDefault();const pe=Ue.deltaY>0?g.current.angle+s:g.current.angle-s;g.current.angle=pe,S.current=pe,f(pe),d(pe)},ie=Ue=>{Ue.key==="Enter"&&Ue.target===x.current&&W()},ye=Ue=>{if(r||O||!I||!(Ue.key in Ab))return;Ue.preventDefault();const pe=Ab[Ue.key](g.current.angle,s);g.current.angle=pe,S.current=pe,f(pe),d(pe)},W=()=>{C(!0),P&&I?(p(S.current),Y(!0)):D(!0)},ue=()=>{o!=="persistent"&&(I?b(!1):(b(!0),D(!0))),Y(!1),C(!1)},oe=()=>{I||D(!1)},de=`hsla(${S.current}, ${e}%, ${t}%, ${i}
5745)`,we=["rcp",m,$&&"dragging",r&&"disabled"].filter(Boolean).join(" ");return re.jsxs("div",{"aria-roledescription":"radial slider","aria-label":"color picker","aria-valuetext":FX[Math.round(S.current/60)],...v,"aria-expanded":P,"aria-valuenow":S.current,"aria-disabled":r,"aria-valuemin":0,"aria-valuemax":359,ref:x,role:"slider",className:we,tabIndex:r?-1:0,onKeyUp:ie,onKeyDown:ye,children:[re.jsx("div",{className:`rcp__palette ${P?"in":"out"}`,children:re.jsx("canvas",{})}),re.jsx("div",{ref:_,className:"rcp__rotator",style:{pointerEvents:r||O||!I?"none":null,transform:`rotate(${A}deg)`},children:re.jsx("div",{className:`rcp__knob ${I?"in":"out"}`,onTransitionEnd:oe})}),re.jsx("div",{className:`rcp__ripple ${B?"rippling":""}`.trim(),style:{borderColor:de}}),re.jsx("button",{type:"button",className:`rcp__well ${O?"pressed":""}`.trim(),style:{backgroundColor:de},"aria-label":c,disabled:r,tabIndex:r?-1:0,onAnimationEnd:ue,onClick:W})]})};function UX(){const n=As(kt),e=n.openedPanel==="config",t=()=>{kt.openedPanel=null};function i(f){kt.qualitySettings=f,localStorage.setItem("qualitySettings",kt.qualitySettings)}const r=f=>{kt.lightPosition[0]=f.target.value},s=f=>{kt.lightPosition[1]=f.target.value},o=f=>{kt.lightPosition[2]=f.target.value},a=f=>{kt.waterColor.hue=f},l=f=>{kt.waterRoughness=f.target.value},c=f=>{kt.waterColor.luminosity=f.target.value};return re.jsx(re.Fragment,{children:e&&re.jsxs("div",{className:"wrapper",children:[re.jsx("button",{className:"close-button-panel close-about",onClick:t,children:re.jsx("img",{src:"close.svg",width:20,height:20})}),re.jsxs("div",{className:"panel about",children:[re.jsxs("div",{className:"quality-options",children:[re.jsxs("div",{children:[re.jsx("h1",{children:"Quality options"}),re.jsx("p",{children:"⚠️ Changing setting will take effect on next reload"})]}),re.jsxs("label",{children:[re.jsx("input",{type:"radio",name:"quality",value:"performance",checked:n.qualitySettings==="performance",onChange:()=>i("performance")}),"Performance",re.jsx("p",{children:"Disable post processing and lower dpr"})]}),re.jsxs("label",{children:[re.jsx("input",{type:"radio",name:"quality",value:"balanced",checked:n.qualitySettings==="balanced",onChange:()=>i("balanced")}),"Balanced",re.jsx("p",{children:"Post processing and default dpr"})]}),re.jsxs("label",{children:[re.jsx("input",{type:"radio",name:"quality",value:"ultra",checked:n.qualitySettings==="ultra",onChange:()=>i("ultra")}),"Ultra",re.jsx("p",{children:"Edge blur & Ambient Occlusion underwater"})]})]}),re.jsxs("div",{className:"about-text",children:[re.jsx("h1",{children:"Light Settings"}),re.jsxs("div",{className:"customize--box",children:[re.jsx("label",{children:"Rotation"}),re.jsx("input",{id:"xposition",type:"range",min:"-6",max:"6",step:.1,defaultValue:n.lightPosition[0],onChange:r}),re.jsx("label",{children:"Elevation"}),re.jsx("input",{id:"yposition",type:"range",min:"4.5",max:"6",step:.1,defaultValue:n.lightPosition[1],onChange:s}),re.jsx("label",{children:"Azimut"}),re.jsx("input",{id:"zposition",type:"range",min:"-10",max:"10",step:.1,defaultValue:n.lightPosition[2],onChange:o})]})]}),re.jsxs("div",{className:"about-text",children:[re.jsx("h1",{children:"Water Settings"}),re.jsxs("div",{className:"customize--box",children:[re.jsx(NX,{...n.waterColor,onInput:a}),re.jsx("label",{children:"Luminosity"}),re.jsx("input",{id:"xposition",type:"range",min:"0",max:"100",step:1,defaultValue:n.waterColor.luminosity,onChange:c}),re.jsx("label",{children:"Roughness"}),re.jsx("input",{id:"yposition",type:"range",min:"0",max:"0.6",step:.01,defaultValue:n.waterRoughness,onChange:l})]})]}),re.jsxs("div",{className:"about-text",children:[re.jsx("h1",{children:"About this project"}),re.jsx("p",{className:"description",children:"Realistic water simulation using React three Fiber with caustics, underwater effects and water droplets when getting out of the water. Created by Anderson Mancini @2024."}),re.jsx("button",{onClick:()=>window.location.href="https://andersonmancini.dev",className:"button-white",children:"GET IN TOUCH"})]})]}),re.jsx("div",{className:"background-about-us"})]})})}const OX=[{id:"sky",label:"Sky",image:"/skymap.jpg"},{id:"sunset",label:"Sunset",image:"/sunset.jpeg"},{id:"dawn",label:"Dawn",image:"/dawn.jpeg"},{id:"warehouse",label:"Warehouse",image:"/warehouse.jpeg"},{id:"forest",label:"Forest",image:"/forest.jpeg"},{id:"city",label:"City",image:"/city.jpeg"}],kX=[{id:"sphere",label:"Sphere",image:"/sphere.jpeg"},{id:"shark",label:"Shark",image:"/shark.jpeg"},{id:"turtle",label:"Turtle",image:"/turtle.jpeg"}];function zX(){const n=As(kt),e=n.openedPanel==="scenes",t=s=>{kt.currentEnvironment=s,localStorage.setItem("selectedEnvironment",s),kt.openedPanel=null},i=s=>{kt.currentObject=s,localStorage.setItem("selectedObject",s),kt.openedPanel=null},r=()=>{kt.openedPanel=null};return re.jsx("div",{style:{position:"relative"},children:e&&re.jsx("div",{className:"wrapper",children:re.jsxs("div",{className:"panel about",children:[re.
5745jsx("button",{className:"close-button-panel close-about",onClick:r,children:re.jsx("img",{src:"/close.svg",alt:"close",height:20})}),re.jsxs("div",{className:"scene-selector-header",children:[re.jsx("h1",{children:"Object selection"}),re.jsx("p",{children:"Choose an object to add to the scene"})]}),re.jsx("div",{className:"environments-grid",children:kX.map(s=>re.jsxs("div",{className:`environment-item ${n.currentObject===s.id?"active":""}`,onClick:()=>i(s.id),children:[re.jsx("div",{className:"environment-image",children:re.jsx("img",{src:s.image,alt:s.label})}),re.jsx("span",{children:s.label})]},s.id))}),re.jsxs("div",{className:"scene-selector-header",children:[re.jsx("h1",{children:"Scene selection"}),re.jsx("p",{children:"Choose an environment preset to change the scene lighting and background"})]}),re.jsx("div",{className:"environments-grid",children:OX.map(s=>re.jsxs("div",{className:`environment-item ${n.currentEnvironment===s.id?"active":""}`,onClick:()=>t(s.id),children:[re.jsx("div",{className:"environment-image",children:re.jsx("img",{src:s.image,alt:s.label})}),re.jsx("span",{children:s.label})]},s.id))})]})})})}function HX(){const{openedPanel:n,isMobile:e,dive:t,controlsEnabled:i}=As(kt);return re.jsxs("div",{className:`header ${n!==null?"header hidden":""}`,children:[re.jsxs("div",{className:"header-text",children:[re.jsx("h2",{children:"Realistic Three.js Water"}),re.jsx("p",{children:"Water simulation with caustics and underwater effects created by Anderson Mancini"})]}),re.jsxs("div",{className:"buttons-wrapper",children:[re.jsxs("button",{className:"button-header button-dive",onClick:()=>{kt.dive=!kt.dive},children:[re.jsx("p",{children:t?"Surface":"Dive"}),re.jsx("img",{src:`${t?"/camera.svg":"/dive.svg"}`,alt:"dive",height:t?24:36,width:t?32:36})]}),e&&re.jsxs("button",{className:"button-header",onClick:()=>{kt.controlsEnabled=!kt.controlsEnabled},children:[re.jsx("p",{children:i?"Water":"Camera"}),re.jsx("img",{src:`${i?"/water.svg":"/camera.svg"}`,alt:"camera controls",height:20,width:30})]}),re.jsxs("button",{className:"button-header",onClick:()=>{kt.openedPanel="scenes"},children:[re.jsx("p",{children:"Scenes"}),re.jsx("img",{src:"/scenes.svg",alt:"scenes",height:33})]}),!e&&re.jsxs("button",{className:"button-header",onClick:()=>{window.open("https://webxr-water.vercel.app/","_self")},children:[re.jsx("p",{children:"WebXR"}),re.jsx("img",{src:"/ar.svg",alt:"AR",height:33})]}),re.jsxs("button",{onClick:()=>{kt.openedPanel="config"},className:"button-header",children:[re.jsx("p",{children:"Configure"}),re.jsx("img",{src:"/config.svg",alt:"configure",height:23})]})]})]})}function GX(){const{isMobile:n}=As(kt);return n?null:re.jsx("div",{className:"footer-tip",children:re.jsx("p",{children:"Tip: Zoom in to dive underwater and zoom out to see water droplets"})})}function VX(){const{progress:n}=hD(),{finishedMainLoading:e}=As(kt),t=document.getElementsByTagName("canvas"),[i,r]=ne.useState(!1),s=ne.useRef();return ne.useEffect(()=>{s&&s.current&&document.documentElement.style.setProperty("--progress",Math.floor(n)),n===100&&(kt.finishedMainLoading=!0,t[0].className=t[0].className+" visible")},[n]),re.jsx(re.Fragment,{children:!e&&re.jsx("div",{className:`loader-wrapper ${e?"finished-loading":""}`,children:re.jsxs("div",{className:"main-loader",ref:s,children:[re.jsxs("svg",{width:"250",height:"250",className:"circular-progress",viewBox:"0 0 250 250",opacity:i?0:1,children:[re.jsx("circle",{cy:125,cx:125,r:121,className:"bg"}),re.jsx("circle",{cy:125,cx:125,r:121,className:"fg"})]}),re.jsx("img",{className:"mantis-bg",src:"/water.svg",width:60,draggable:!1,style:{position:"absolute"}})]})})})}function WX(){return re.jsxs("div",{className:"overlay",children:[re.jsx(VX,{}),re.jsx(HX,{}),re.jsx(zX,{}),re.jsx(UX,{}),re.jsx(GX,{})]})}function Fo(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function YD(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*!
5746 * GSAP 3.12.5
5747 * https://gsap.com
5748 *
5749 * @license Copyright 2008-2024, GreenSock. All rights reserved.
5750 * Subject to the terms at https://gsap.com/standard-license or for
5751 * Club GSAP members, the agreement issued with that membership.
5752 * @author: Jack Doyle, [email protected]
5753*/var Vr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},mf={duration:.5,overwrite:!1,delay:0},rE,ji,Bn,ds=1e8,An=1/ds,bS=Math.PI*2,XX=bS/4,jX=0,KD=Math.sqrt,JX=Math.cos,YX=Math.sin,Ti=function(e){return typeof e=="string"},Yn=function(e){return typeof e=="function"},ta=function(e){return typeof e=="number"},sE=function(e){return typeof e>"u"},vo=function(e){return typeof e=="object"},_r=function(e){return e!==!1},oE=function(){return typeof window<"u"},Ag=function(e){return Yn(e)||Ti(e)},QD=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Ji=Array.isArray,IS=/(?:-?\.?\d|\.)+/gi,ZD=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Nu=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,q_=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,qD=/[+-]=-?[.\d]+/,$D=/[^,'"\[\]\s]+/gi,KX=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Un,ro,PS,aE,Jr={},tv={},eL,tL=function(e){return(tv=wc(e,Jr))&&wr},lE=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Ud=function(e,t){return!t&&console.warn(e)},nL=function(e,t){return e&&(Jr[e]=t)&&tv&&(tv[e]=t)||Jr},Od=function(){return 0},QX={suppressEvents:!0,isStart:!0,kill:!1},kg={suppressEvents:!0,kill:!1},ZX={suppressEvents:!0},cE={},ja=[],BS={},iL,Nr={},$_={},Mb=30,zg=[],uE="",fE=function(e){var t=e[0],i,r;if(vo(t)||Yn(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(r=zg.length;r--&&!zg[r].targetTest(t););i=zg[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new CL(e[r],i)))||e.splice(r,1);return e},lc=function(e){return e._gsap||fE(ps(e))[0]._gsap},rL=function(e,t,i){return(i=e[t])&&Yn(i)?e[t]():sE(i)&&e.getAttribute&&e.getAttribute(t)||i}
vendor: 64,078 bytes, lines 5753-5761
5753,Sr=function(e,t){return(e=e.split(",")).forEach(t)||e},qn=function(e){return Math.round(e*1e5)/1e5||0},Ai=function(e){return Math.round(e*1e7)/1e7||0},Yu=function(e,t){var i=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+r:i==="-"?e-r:i==="*"?e*r:e/r},qX=function(e,t){for(var i=t.length,r=0;e.indexOf(t[r])<0&&++r<i;);return r<i},nv=function(){var e=ja.length,t=ja.slice(0),i,r;for(BS={},ja.length=0,i=0;i<e;i++)r=t[i],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},sL=function(e,t,i,r){ja.length&&!ji&&nv(),e.render(t,i,ji&&t<0&&(e._initted||e._startAt)),ja.length&&!ji&&nv()},oL=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match($D).length<2?t:Ti(e)?e.trim():e},aL=function(e){return e},Ss=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},$X=function(e){return function(t,i){for(var r in i)r in t||r==="duration"&&e||r==="ease"||(t[r]=i[r])}},wc=function(e,t){for(var i in t)e[i]=t[i];return e},Eb=function n(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=vo(t[i])?n(e[i]||(e[i]={}),t[i]):t[i]);return e},iv=function(e,t){var i={},r;for(r in e)r in t||(i[r]=e[r]);return i},nd=function(e){var t=e.parent||Un,i=e.keyframes?$X(Ji(e.keyframes)):Ss;if(_r(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},e7=function(e,t){for(var i=e.length,r=i===t.length;r&&i--&&e[i]===t[i];);return i<0},lL=function(e,t,i,r,s){var o=e[r],a;if(s)for(a=t[s];o&&o[s]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},oy=function(e,t,i,r){i===void 0&&(i="_first"),r===void 0&&(r="_last");var s=t._prev,o=t._next;s?s._next=o:e[i]===t&&(e[i]=o),o?o._prev=s:e[r]===t&&(e[r]=s),t._next=t._prev=t.parent=null},tl=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},cc=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},t7=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},DS=function(e,t,i,r){return e._startAt&&(ji?e._startAt.revert(kg):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},n7=function n(e){return!e||e._ts&&n(e.parent)},wb=function(e){return e._repeat?gf(e._tTime,e=e.duration()+e._rDelay)*e:0},gf=function(e,t){var i=Math.floor(e/=t);return e&&i===e?i-1:i},rv=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},ay=function(e){return e._end=Ai(e._start+(e._tDur/Math.abs(e._ts||e._rts||An)||0))},ly=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Ai(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),ay(e),i._dirty||cc(i,e)),e},cL=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=rv(e.rawTime(),t),(!t._dur||hp(0,t.totalDuration(),i)-t._tTime>An)&&t.render(i,!0)),cc(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-An}},ao=function(e,t,i,r){return t.parent&&tl(t),t._start=Ai((ta(i)?i:i||e!==Un?ss(e,i,t):e._time)+t._delay),t._end=Ai(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),lL(e,t,"_first","_last",e._sort?"_start":0),LS(t)||(e._recent=t),r||cL(e,t),e._ts<0&&ly(e,e._tTime),e},uL=function(e,t){return(Jr.ScrollTrigger||lE("scrollTrigger",t))&&Jr.ScrollTrigger.create(t,e)},fL=function(e,t,i,r,s){if(dE(e,t,s),!e._initted)return 1;if(!i&&e._pt&&!ji&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&iL!==Ur.frame)return ja.push(e),e._lazy=[s,r],1},i7=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},LS=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},r7=function(e,t,i,r){var s=e.ratio,o=t<0||!t&&(!e._start&&i7(e)&&!(!e._initted&&LS(e))||(e._ts<0||e._dp._ts<0)&&!LS(e))?0:1,a=e._rDelay,l=0,c,f,d;if(a&&e._repeat&&(l=hp(0,e._tDur,t),f=gf(l,a),e._yoyo&&f&1&&(o=1-o),f!==gf(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==s||ji||r||e._zTime===An||!t&&e._zTime){if(!e._initted&&fL(e,t,r,i,l))return;for(d=e._zTime,e._zTime=t||(i?An:0),i||(i=t&&!d),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;t<0&&DS(e,t,i,!0),e._onUpdate&&!i&&zr(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&zr(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&tl(e,1),!i&&!ji&&(zr(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},s7=function(e,t,i){var r;if(i>t)for(r=e._first;r&&r._start<=i;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=i;){if(r.data==="isPause"&&r._start<t)return r;r=r._prev}},vf=function(e,t,i,r){var s=e._repeat,o=Ai(t)||0,a=e._tTime/e._tDur;return a&&!r&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s<0?1e10:Ai(o*(s+1)+e._rDelay*s):o,a>0&&!r&&ly(e,e._tTime=e._tDur*a),e.parent&&ay(e),i||cc(e.parent,e),e},Tb=function(e){return e instanceof nr?cc(e):vf(e,e._dur)},o7={_start:0,endTime:Od,totalDuration:Od},ss=function n(e,t,i){var r=e.labels,s=e._recent||o7,o=e.duration()>=ds?s.endTime(!1):e._dur,a,l,c;return Ti(t)&&(isNaN(t)||t in r)?(l=t.charAt(0),c=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(a<0?s:i).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),c&&i&&(l=l/100*(Ji(i)?i[0]:i).totalDuration()),a>1?n(e,t.substr(0,a-1),i)+l:o+l)):t==null?o:+t},id=function(e,t,i){var r=ta(t[1]),s=(r?2:1)+(e<2?0:1),o=t[s],a,l;if(r&&(o.duration=t[1]),o.parent=i,e){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=_r(l.vars.inherit)&&l.parent;o.immediateRender=_r(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[s-1]}return new si(t[0],o,t[s+1])},ul=function(e,t){return e||e===0?t(e):t},hp=function(e,t,i){return i<e?e:i>t?t:i},Wi=function(e,t){return!Ti(e)||!(t=KX.exec(e))?"":t[1]},a7=function(e,t,i){return ul(i,function(r){return hp(e,t,r)})},FS=[].slice,hL=function(e,t){return e&&vo(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&vo(e[0]))&&!e.nodeType&&e!==ro},l7=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(r){var s;return Ti(r)&&!t||hL(r,1)?(s=i).push.apply(s,ps(r)):i.push(r)})||i},ps=function(e,t,i){return Bn&&!t&&Bn.selector?Bn.selector(e):Ti(e)&&!i&&(PS||!yf())?FS.call((t||aE).querySelectorAll(e),0):Ji(e)?l7(e,i):hL(e)?FS.call(e,0):e?[e]:[]},NS=function(e){return e=ps(e)[0]||Ud("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return ps(t,i.querySelectorAll?i:i===e?Ud("Invalid scope")||aE.createElement("div"):e)}},dL=function(e){return e.sort(function(){return .5-Math.random()})},pL=function(e){if(Yn(e))return e;var t=vo(e)?e:{each:e},i=uc(t.ease),r=t.from||0,s=parseFloat(t.base)||0,o={},a=r>0&&r<1,l=isNaN(r)||a,c=t.axis,f=r,d=r;return Ti(r)?f=d={center:.5,edges:.5,end:1}[r]||0:!a&&l&&(f=r[0],d=r[1]),function(p,m,v){var _=(v||t).length,x=o[_],g,S,A,E,I,b,P,D,O;if(!x){if(O=t.grid==="auto"?0:(t.grid||[1,ds])[1],!O){for(P=-ds;P<(P=v[O++].getBoundingClientRect().left)&&O<_;);O<_&&O--}for(x=o[_]=[],g=l?Math.min(O,_)*f-.5:r%O,S=O===ds?0:l?_*d/O-.5:r/O|0,P=0,D=ds,b=0;b<_;b++)A=b%O-g,E=S-(b/O|0),x[b]=I=c?Math.abs(c==="y"?E:A):KD(A*A+E*E),I>P&&(P=I),I<D&&(D=I);r==="random"&&dL(x),x.max=P-D,x.min=D,x.v=_=(parseFloat(t.amount)||parseFloat(t.each)*(O>_?_-1:c?c==="y"?_/O:O:Math.max(O,_/O))||0)*(r==="edges"?-1:1),x.b=_<0?s-_:s,x.u=Wi(t.amount||t.each)||0,i=i&&_<0?EL(i):i}return _=(x[p]-x.min)/x.max||0,Ai(x.b+(i?i(_):_)*x.v)+x.u}},US=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var r=Ai(Math.round(parseFloat(i)/e)*e*t);return(r-r%1)/t+(ta(i)?0:Wi(i))}},mL=function(e,t){var i=Ji(e),r,s;return!i&&vo(e)&&(r=i=e.radius||ds,e.values?(e=ps(e.values),(s=!ta(e[0]))&&(r*=r)):e=US(e.increment)),ul(t,i?Yn(e)?function(o){return s=e(o),Math.abs(s-o)<=r?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=ds,f=0,d=e.length,p,m;d--;)s?(p=e[d].x-a,m=e[d].y-l,p=p*p+m*m):p=Math.abs(e[d]-a),p<c&&(c=p,f=d);return f=!r||c<=r?e[f]:o,s||f===o||ta(o)?f:f+Wi(o)}:US(e))},gL=function(e,t,i,r){return ul(Ji(e)?!t:i===!0?!!(i=0):!r,function(){return Ji(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(r=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*r)/r})},c7=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(r){return t.reduce(function(s,o){return o(s)},r)}},u7=function(e,t){return function(i){return e(parseFloat(i))+(t||Wi(i))}},f7=function(e,t,i){return yL(e,t,0,1,i)},vL=function(e,t,i){return ul(i,function(r){return e[~~t(r)]})},h7=function n(e,t,i){var r=t-e;return Ji(e)?vL(e,n(0,e.length),t):ul(i,function(s){return(r+(s-e)%r)%r+e})},d7=function n(e,t,i){var r=t-e,s=r*2;return Ji(e)?vL(e,n(0,e.length-1),t):ul(i,function(o){return o=(s+(o-e)%s)%s||0,e+(o>r?s-o:o)})},kd=function(e){for(var t=0,i="",r,s,o,a;~(r=e.indexOf("random(",t));)o=e.indexOf(")",r),a=e.charAt(r+7)==="[",s=e.substr(r+7,o-r-7).match(a?$D:IS),i+=e.substr(t,r-t)+gL(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),t=o+1;return i+e.substr(t,e.length-t)},yL=function(e,t,i,r,s){var o=t-e,a=r-i;return ul(s,function(l){return i+((l-e)/o*a||0)})},p7=function n(e,t,i,r){var s=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!s){var o=Ti(e),a={},l,c,f,d,p;if(i===!0&&(r=1)&&(i=null),o)e={p:e},t={p:t};else if(Ji(e)&&!Ji(t)){for(f=[],d=e.length,p=d-2,c=1;c<d;c++)f.push(n(e[c-1],e[c]));d--,s=function(v){v*=d;var _=Math.min(p,~~v);return f[_](v-_)},i=t}else r||(e=wc(Ji(e)?[]:{},e));if(!f){for(l in t)hE.call(a,e,l,"get",t[l]);s=function(v){return gE(v,a)||(o?e.p:e)}}}return ul(i,s)},Cb=function(e,t,i){var r=e.labels,s=ds,o,a,l;for(o in r)a=r[o]-t,a<0==!!i&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},zr=function(e,t,i){var r=e.vars,s=r[t],o=Bn,a=e._ctx,l,c,f;if(s)return l=r[t+"Params"],c=r.callbackScope||e,i&&ja.length&&nv(),a&&(Bn=a),f=l?s.apply(c,l):s.call(c),Bn=o,f},Lh=function(e){return tl(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ji),e.progress()<1&&zr(e,"onInterrupt"),e},Uu,xL=[],_L=function(e){if(e)if(e=!e.name&&e.default||e,oE()||e.headless){var t=e.name,i=Yn(e),r=t&&!i&&e.init?function(){this._props=[]}:e,s={init:Od,render:gE,add:hE,kill:I7,modifier:b7,rawVars:0},o={targetTest:0,get:0,getSetter:mE,aliases:{},register:0};if(yf(),e!==r){if(Nr[t])return;Ss(r,Ss(iv(e,s),o)),wc(r.prototype,wc(s,iv(e,o))),Nr[r.prop=t]=r,e.targetTest&&(zg.push(r),cE[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}nL(t,r),e.register&&e.register(wr,r,Ar)}else xL.push(e)},gn=255,Fh={aqua:[0,gn,gn],lime:[0,gn,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,gn],navy:[0,0,128],white:[gn,gn,gn],olive:[128,128,0],yellow:[gn,gn,0],orange:[gn,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[gn,0,0],pink:[gn,192,203],cyan:[0,gn,gn],transparent:[gn,gn,gn,0]},e1=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*gn+.5|0},SL=function(e,t,i){var r=e?ta(e)?[e>>16,e>>8&gn,e&gn]:0:Fh.black,s,o,a,l,c,f,d,p,m,v;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Fh[e])r=Fh[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+s+s+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&gn,r&gn,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&gn,e&gn]}else if(e.substr(0,3)==="hsl"){if(r=v=e.match(IS),!t)l=+r[0]%360/360,c=+r[1]/100,f=+r[2]/100,o=f<=.5?f*(c+1):f+c-f*c,s=f*2-o,r.length>3&&(r[3]*=1),r[0]=e1(l+1/3,s,o),r[1]=e1(l,s,o),r[2]=e1(l-1/3,s,o);else if(~e.indexOf("="))return r=e.match(ZD),i&&r.length<4&&(r[3]=1),r}else r=e.match(IS)||Fh.transparent;r=r.map(Number)}return t&&!v&&(s=r[0]/gn,o=r[1]/gn,a=r[2]/gn,d=Math.max(s,o,a),p=Math.min(s,o,a),f=(d+p)/2,d===p?l=c=0:(m=d-p,c=f>.5?m/(2-d-p):m/(d+p),l=d===s?(o-a)/m+(o<a?6:0):d===o?(a-s)/m+2:(s-o)/m+4,l*=60),r[0]=~~(l+.5),r[1]=~~(c*100+.5),r[2]=~~(f*100+.5)),i&&r.length<4&&(r[3]=1),r},AL=function(e){var t=[],i=[],r=-1;return e.split(Ja).forEach(function(s){var o=s.match(Nu)||[];t.push.apply(t,o),i.push(r+=o.length+1)}),t.c=i,t},Rb=function(e,t,i){var r="",s=(e+r).match(Ja),o=t?"hsla(":"rgba(",a=0,l,c,f,d;if(!s)return e;if(s=s.map(function(p){return(p=SL(p,t,1))&&o+(t?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),i&&(f=AL(e),l=i.c,l.join(r)!==f.c.join(r)))for(c=e.replace(Ja,"1").split(Nu),d=c.length-1;a<d;a++)r+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(f.length?f:s.length?s:i).shift());if(!c)for(c=e.split(Ja),d=c.length-1;a<d;a++)r+=c[a]+s[a];return r+c[d]},Ja=function(){var n="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Fh)n+="|"+e+"\\b";return new RegExp(n+")","gi")}(),m7=/hsl[a]?\(/,ML=function(e){var t=e.join(" "),i;if(Ja.lastIndex=0,Ja.test(t))return i=m7.test(t),e[1]=Rb(e[1],i),e[0]=Rb(e[0],i,AL(e[1])),!0},zd,Ur=function(){var n=Date.now,e=500,t=33,i=n(),r=i,s=1e3/240,o=s,a=[],l,c,f,d,p,m,v=function _(x){var g=n()-r,S=x===!0,A,E,I,b;if((g>e||g<0)&&(i+=g-t),r+=g,I=r-i,A=I-o,(A>0||S)&&(b=++d.frame,p=I-d.time*1e3,d.time=I=I/1e3,o+=A+(A>=s?4:s-A),E=1),S||(l=c(_)),E)for(m=0;m<a.length;m++)a[m](I,p,b,x)};return d={time:0,frame:0,tick:function(){v(!0)},deltaRatio:function(x){return p/(1e3/(x||60))},wake:function(){eL&&(!PS&&oE()&&(ro=PS=window,aE=ro.document||{},Jr.gsap=wr,(ro.gsapVersions||(ro.gsapVersions=[])).push(wr.version),tL(tv||ro.GreenSockGlobals||!ro.gsap&&ro||{}),xL.forEach(_L)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),c=f||function(x){return setTimeout(x,o-d.time*1e3+1|0)},zd=1,v(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(l),zd=0,c=Od},lagSmoothing:function(x,g){e=x||1/0,t=Math.min(g||33,e)},fps:function(x){s=1e3/(x||240),o=d.time*1e3+s},add:function(x,g,S){var A=g?function(E,I,b,P){x(E,I,b,P),d.remove(A)}:x;return d.remove(x),a[S?"unshift":"push"](A),yf(),A},remove:function(x,g){~(g=a.indexOf(x))&&a.splice(g,1)&&m>=g&&m--},_listeners:a},d}(),yf=function(){return!zd&&Ur.wake()},qt={},g7=/^[\d.\-M][\d.\-,\s]/,v7=/["']/g,y7=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),r=i[0],s=1,o=i.length,a,l,c;s<o;s++)l=i[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),t[r]=isNaN(c)?c.replace(v7,"").trim():+c,r=l.substr(a+1).trim();return t},x7=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),r=e.indexOf("(",t);return e.substring(t,~r&&r<i?e.indexOf(")",i+1):i)},_7=function(e){var t=(e+"").split("("),i=qt[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[y7(t[1])]:x7(e).split(",").map(oL)):qt._CE&&g7.test(e)?qt._CE("",e):i},EL=function(e){return function(t){return 1-e(1-t)}},wL=function n(e,t){for(var i=e._first,r;i;)i instanceof nr?n(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?n(i.timeline,t):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=t)),i=i._next},uc=function(e,t){return e&&(Yn(e)?e:qt[e]||_7(e))||t},Lc=function(e,t,i,r){i===void 0&&(i=function(l){return 1-t(1-l)}),r===void 0&&(r=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var s={easeIn:t,easeOut:i,easeInOut:r},o;return Sr(e,function(a){qt[a]=Jr[a]=s,qt[o=a.toLowerCase()]=i;for(var l in s)qt[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=qt[a+"."+l]=s[l]}),s},TL=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},t1=function n(e,t,i){var r=t>=1?t:1,s=(i||(e?.3:.45))/(t<1?t:1),o=s/bS*(Math.asin(1/r)||0),a=function(f){return f===1?1:r*Math.pow(2,-10*f)*YX((f-o)*s)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:TL(a);return s=bS/s,l.config=function(c,f){return n(e,c,f)},l},n1=function n(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?i:e==="in"?function(s){return 1-i(1-s)}:TL(i);return r.config=function(s){return n(e,s)},r};Sr("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Lc(n+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});qt.Linear.easeNone=qt.none=qt.Linear.easeIn;Lc("Elastic",t1("in"),t1("out"),t1());(function(n,e){var t=1/e,i=2*t,r=2.5*t,s=function(a){return a<t?n*a*a:a<i?n*Math.pow(a-1.5/e,2)+.75:a<r?n*(a-=2.25/e)*a+.9375:n*Math.pow(a-2.625/e,2)+.984375};Lc("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);Lc("Expo",function(n){return n?Math.pow(2,10*(n-1)):0});Lc("Circ",function(n){return-(KD(1-n*n)-1)});Lc("Sine",function(n){return n===1?1:-JX(n*XX)+1});Lc("Back",n1("in"),n1("out"),n1());qt.SteppedEase=qt.steps=Jr.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,r=e+(t?0:1),s=t?1:0,o=1-An;return function(a){return((r*hp(0,o,a)|0)+s)*i}}};mf.ease=qt["quad.out"];Sr("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(n){return uE+=n+","+n+"Params,"});var CL=function(e,t){this.id=jX++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:rL,this.set=t?t.getSetter:mE},Hd=function(){function n(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,vf(this,+t.duration,1,1),this.data=t.data,Bn&&(this._ctx=Bn,Bn.data.push(this)),zd||Ur.wake()}var e=n.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,vf(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,r){if(yf(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(ly(this,i),!s._dp||s.parent||cL(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&ao(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===An||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),sL(this,i,r)),this},e.time=function(i,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+wb(this))%(this._dur+this._rDelay)||(i?this._dur:0),r):this._time},e.totalProgress=function(i,r){return arguments.length?this.totalTime(this.totalDuration()*i,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(i,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+wb(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,r){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*s,r):this._repeat?gf(this._tTime,s)+1:1},e.timeScale=function(i,r){if(!arguments.length)return this._rts===-An?0:this._rts;if(this._rts===i)return this;var s=this.parent&&this._ts?rv(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-An?0:this._rts,this.totalTime(hp(-Math.abs(this._delay),this._tDur,s),r!==!1),ay(this),t7(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(yf(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==An&&(this._tTime-=An)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&ao(r,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(_r(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var r=this.parent||this._dp;return r?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?rv(r.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=ZX);var r=ji;return ji=i,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),ji=r,this},e.globalTime=function(i){for(var r=this,s=arguments.length?i:r.rawTime();r;)s=r._start+s/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(i):s},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,Tb(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var r=this._time;return this._rDelay=i,Tb(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,r){return this.totalTime(ss(this,i),_r(r))},e.restart=function(i,r){return this.play().totalTime(i?-this._delay:0,_r(r))},e.play=function(i,r){return i!=null&&this.seek(i,r),this.reversed(!1).paused(!1)},e.reverse=function(i,r){return i!=null&&this.seek(i||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(i,r){return i!=null&&this.seek(i,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-An:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-An,this},e.isActive=function(){var i=this.parent||this._dp,r=this._start,s;return!!(!i||this._ts&&this._initted&&i.isActive()&&(s=i.rawTime(!0))>=r&&s<this.endTime(!0)-An)},e.eventCallback=function(i,r,s){var o=this.vars;return arguments.length>1?(r?(o[i]=r,s&&(o[i+"Params"]=s),i==="onUpdate"&&(this._onUpdate=r)):delete o[i],this):o[i]},e.then=function(i){var r=this;return new Promise(function(s){var o=Yn(i)?i:aL,a=function(){var c=r.then;r.then=null,Yn(o)&&(o=o(r))&&(o.then||o===r)&&(r.then=c),s(o),r.then=c};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},e.kill=function(){Lh(this)},n}();Ss(Hd.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-An,_prom:0,_ps:!1,_rts:1});var nr=function(n){YD(e,n);function e(i,r){var s;return i===void 0&&(i={}),s=n.call(this,i)||this,s.labels={},s.smoothChildTiming=!!i.smoothChildTiming,s.autoRemoveChildren=!!i.autoRemoveChildren,s._sort=_r(i.sortChildren),Un&&ao(i.parent||Un,Fo(s),r),i.reversed&&s.reverse(),i.paused&&s.paused(!0),i.scrollTrigger&&uL(Fo(s),i.scrollTrigger),s}var t=e.prototype;return t.to=function(r,s,o){return id(0,arguments,this),this},t.from=function(r,s,o){return id(1,arguments,this),this},t.fromTo=function(r,s,o,a){return id(2,arguments,this),this},t.set=function(r,s,o){return s.duration=0,s.parent=this,nd(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new si(r,s,ss(this,o),1),this},t.call=function(r,s,o){return ao(this,si.delayedCall(0,r,s),o)},t.staggerTo=function(r,s,o,a,l,c,f){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=f,o.parent=this,new si(r,o,ss(this,l)),this},t.staggerFrom=function(r,s,o,a,l,c,f){return o.runBackwards=1,nd(o).immediateRender=_r(o.immediateRender),this.staggerTo(r,s,o,a,l,c,f)},t.staggerFromTo=function(r,s,o,a,l,c,f,d){return a.startAt=o,nd(a).immediateRender=_r(a.immediateRender),this.staggerTo(r,s,a,l,c,f,d)},t.render=function(r,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,f=r<=0?0:Ai(r),d=this._zTime<0!=r<0&&(this._initted||!c),p,m,v,_,x,g,S,A,E,I,b,P;if(this!==Un&&f>l&&r>=0&&(f=l),f!==this._tTime||o||d){if(a!==this._time&&c&&(f+=this._time-a,r+=this._time-a),p=f,E=this._start,A=this._ts,g=!A,d&&(c||(a=this._zTime),(r||!s)&&(this._zTime=r)),this._repeat){if(b=this._yoyo,x=c+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(x*100+r,s,o);if(p=Ai(f%x),f===l?(_=this._repeat,p=c):(_=~~(f/x),_&&_===f/x&&(p=c,_--),p>c&&(p=c)),I=gf(this._tTime,x),!a&&this._tTime&&I!==_&&this._tTime-I*x-this._dur<=0&&(I=_),b&&_&1&&(p=c-p,P=1),_!==I&&!this._lock){var D=b&&I&1,O=D===(b&&_&1);if(_<I&&(D=!D),a=D?0:f%c?c:f,this._lock=1,this.render(a||(P?0:Ai(_*x)),s,!c)._lock=0,this._tTime=f,!s&&this.parent&&zr(this,"onRepeat"),this.vars.repeatRefresh&&!P&&(this.invalidate()._lock=1),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,O&&(this._lock=2,a=D?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!P&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;wL(this,P)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=s7(this,Ai(a),Ai(p)),S&&(f-=p-(p=S._start))),this._tTime=f,this._time=p,this._act=!A,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,a=0),!a&&p&&!s&&!_&&(zr(this,"onStart"),this._tTime!==f))return this;if(p>=a&&r>=0)for(m=this._first;m;){if(v=m._next,(m._act||p>=m._start)&&m._ts&&S!==m){if(m.parent!==this)return this.render(r,s,o);if(m.render(m._ts>0?(p-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(p-m._start)*m._ts,s,o),p!==this._time||!this._ts&&!g){S=0,v&&(f+=this._zTime=-An);break}}m=v}else{m=this._last;for(var C=r<0?r:p;m;){if(v=m._prev,(m._act||C<=m._end)&&m._ts&&S!==m){if(m.parent!==this)return this.render(r,s,o);if(m.render(m._ts>0?(C-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(C-m._start)*m._ts,s,o||ji&&(m._initted||m._startAt)),p!==this._time||!this._ts&&!g){S=0,v&&(f+=this._zTime=C?-An:An);break}}m=v}}if(S&&!s&&(this.pause(),S.render(p>=a?0:-An)._zTime=p>=a?1:-1,this._ts))return this._start=E,ay(this),this.render(r,s,o);this._onUpdate&&!s&&zr(this,"onUpdate",!0),(f===l&&this._tTime>=this.totalDuration()||!f&&a)&&(E===this._start||Math.abs(A)!==Math.abs(this._ts))&&(this._lock||((r||!c)&&(f===l&&this._ts>0||!f&&this._ts<0)&&tl(this,1),!s&&!(r<0&&!a)&&(f||a||!l)&&(zr(this,f===l&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(r,s){var o=this;if(ta(s)||(s=ss(this,s,r)),!(r instanceof Hd)){if(Ji(r))return r.forEach(function(a){return o.add(a,s)}),this;if(Ti(r))return this.addLabel(r,s);if(Yn(r))r=si.delayedCall(0,r);else return this}return this!==r?ao(this,r,s):this},t.getChildren=function(r,s,o,a){r===void 0&&(r=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-ds);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof si?s&&l.push(c):(o&&l.push(c),r&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},t.getById=function(r){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===r)return s[o]},t.remove=function(r){return Ti(r)?this.removeLabel(r):Yn(r)?this.killTweensOf(r):(oy(this,r),r===this._recent&&(this._recent=this._last),cc(this))},t.totalTime=function(r,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ai(Ur.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),n.prototype.totalTime.call(this,r,s),this._forcing=0,this):this._tTime},t.addLabel=function(r,s){return this.labels[r]=ss(this,s),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,s,o){var a=si.delayedCall(0,s||Od,o);return a.data="isPause",this._hasPause=1,ao(this,a,ss(this,r))},t.removePause=function(r){var s=this._first;for(r=ss(this,r);s;)s._start===r&&s.data==="isPause"&&tl(s),s=s._next},t.killTweensOf=function(r,s,o){for(var a=this.getTweensOf(r,o),l=a.length;l--;)La!==a[l]&&a[l].kill(r,s);return this},t.getTweensOf=function(r,s){for(var o=[],a=ps(r),l=this._first,c=ta(s),f;l;)l instanceof si?qX(l._targets,a)&&(c?(!La||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(f=l.getTweensOf(a,s)).length&&o.push.apply(o,f),l=l._next;return o},t.tweenTo=function(r,s){s=s||{};var o=this,a=ss(o,r),l=s,c=l.startAt,f=l.onStart,d=l.onStartParams,p=l.immediateRender,m,v=si.to(o,Ss({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||An,onStart:function(){if(o.pause(),!m){var x=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());v._dur!==x&&vf(v,x,0,1).render(v._time,!0,!0),m=1}f&&f.apply(v,d||[])}},s));return p?v.render(0):v},t.tweenFromTo=function(r,s,o){return this.tweenTo(s,Ss({startAt:{time:ss(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),Cb(this,ss(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),Cb(this,ss(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+An)},t.shiftChildren=function(r,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,c;a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=r);return cc(this)},t.invalidate=function(r){var s=this._first;for(this._lock=0;s;)s.invalidate(r),s=s._next;return n.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),cc(this)},t.totalDuration=function(r){var s=0,o=this,a=o._last,l=ds,c,f,d;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(d=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),f=a._start,f>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,ao(o,a,f-a._delay,1)._lock=0):l=f,f<0&&a._ts&&(s-=f,(!d&&!o._dp||d&&d.smoothChildTiming)&&(o._start+=f/o._ts,o._time-=f,o._tTime-=f),o.shiftChildren(-f,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;vf(o,o===Un&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(Un._ts&&(sL(Un,rv(r,Un)),iL=Ur.frame),Ur.frame>=Mb){Mb+=Vr.autoSleep||120;var s=Un._first;if((!s||!s._ts)&&Vr.autoSleep&&Ur._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Ur.sleep()}}},e}(Hd);Ss(nr.prototype,{_lock:0,_hasPause:0,_forcing:0});var S7=function(e,t,i,r,s,o,a){var l=new Ar(this._pt,e,t,0,1,DL,null,s),c=0,f=0,d,p,m,v,_,x,g,S;for(l.b=i,l.e=r,i+="",r+="",(g=~r.indexOf("random("))&&(r=kd(r)),o&&(S=[i,r],o(S,e,t),i=S[0],r=S[1]),p=i.match(q_)||[];d=q_.exec(r);)v=d[0],_=r.substring(c,d.index),m?m=(m+1)%5:_.substr(-5)==="rgba("&&(m=1),v!==p[f++]&&(x=parseFloat(p[f-1])||0,l._pt={_next:l._pt,p:_||f===1?_:",",s:x,c:v.charAt(1)==="="?Yu(x,v)-x:parseFloat(v)-x,m:m&&m<4?Math.round:0},c=q_.lastIndex);return l.c=c<r.length?r.substring(c,r.length):"",l.fp=a,(qD.test(r)||g)&&(l.e=0),this._pt=l,l},hE=function(e,t,i,r,s,o,a,l,c,f){Yn(r)&&(r=r(s||0,e,o));var d=e[t],p=i!=="get"?i:Yn(d)?c?e[t.indexOf("set")||!Yn(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():d,m=Yn(d)?c?T7:PL:pE,v;if(Ti(r)&&(~r.indexOf("random(")&&(r=kd(r)),r.charAt(1)==="="&&(v=Yu(p,r)+(Wi(p)||0),(v||v===0)&&(r=v))),!f||p!==r||OS)return!isNaN(p*r)&&r!==""?(v=new Ar(this._pt,e,t,+p||0,r-(p||0),typeof d=="boolean"?R7:BL,0,m),c&&(v.fp=c),a&&v.modifier(a,this,e),this._pt=v):(!d&&!(t in e)&&lE(t,r),S7.call(this,e,t,p,r,m,l||Vr.stringFilter,c))},A7=function(e,t,i,r,s){if(Yn(e)&&(e=rd(e,s,t,i,r)),!vo(e)||e.style&&e.nodeType||Ji(e)||QD(e))return Ti(e)?rd(e,s,t,i,r):e;var o={},a;for(a in e)o[a]=rd(e[a],s,t,i,r);return o},RL=function(e,t,i,r,s,o){var a,l,c,f;if(Nr[e]&&(a=new Nr[e]).init(s,a.rawVars?t[e]:A7(t[e],r,s,o,i),i,r,o)!==!1&&(i._pt=l=new Ar(i._pt,s,e,0,1,a.render,a,0,a.priority),i!==Uu))for(c=i._ptLookup[i._targets.indexOf(s)],f=a._props.length;f--;)c[a._props[f]]=l;return a},La,OS,dE=function n(e,t,i){var r=e.vars,s=r.ease,o=r.startAt,a=r.immediateRender,l=r.lazy,c=r.onUpdate,f=r.runBackwards,d=r.yoyoEase,p=r.keyframes,m=r.autoRevert,v=e._dur,_=e._startAt,x=e._targets,g=e.parent,S=g&&g.data==="nested"?g.vars.targets:x,A=e._overwrite==="auto"&&!rE,E=e.timeline,I,b,P,D,O,C,B,Y,$,se,ce,ie,ye;if(E&&(!p||!s)&&(s="none"),e._ease=uc(s,mf.ease),e._yEase=d?EL(uc(d===!0?s:d,mf.ease)):0,d&&e._yoyo&&!e._repeat&&(d=e._yEase,e._yEase=e._ease,e._ease=d),e._from=!E&&!!r.runBackwards,!E||p&&!r.stagger){if(Y=x[0]?lc(x[0]).harness:0,ie=Y&&r[Y.prop],I=iv(r,cE),_&&(_._zTime<0&&_.progress(1),t<0&&f&&a&&!m?_.render(-1,!0):_.revert(f&&v?kg:QX),_._lazy=0),o){if(tl(e._startAt=si.set(x,Ss({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!_&&_r(l),startAt:null,delay:0,onUpdate:c&&function(){return zr(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ji||!a&&!m)&&e._startAt.revert(kg),a&&v&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(f&&v&&!_){if(t&&(a=!1),P=Ss({overwrite:!1,data:"isFromStart",lazy:a&&!_&&_r(l),immediateRender:a,stagger:0,parent:g},I),ie&&(P[Y.prop]=ie),tl(e._startAt=si.set(x,P)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ji?e._startAt.revert(kg):e._startAt.render(-1,!0)),e._zTime=t,!a)n(e._startAt,An,An);else if(!t)return}for(e._pt=e._ptCache=0,l=v&&_r(l)||l&&!v,b=0;b<x.length;b++){if(O=x[b],B=O._gsap||fE(x)[b]._gsap,e._ptLookup[b]=se={},BS[B.id]&&ja.length&&nv(),ce=S===x?b:S.indexOf(O),Y&&($=new Y).init(O,ie||I,e,ce,S)!==!1&&(e._pt=D=new Ar(e._pt,O,$.name,0,1,$.render,$,0,$.priority),$._props.forEach(function(W){se[W]=D}),$.priority&&(C=1)),!Y||ie)for(P in I)Nr[P]&&($=RL(P,I,e,ce,O,S))?$.priority&&(C=1):se[P]=D=hE.call(e,O,P,"get",I[P],ce,S,0,r.stringFilter);e._op&&e._op[b]&&e.kill(O,e._op[b]),A&&e._pt&&(La=e,Un.killTweensOf(O,se,e.globalTime(t)),ye=!e.parent,La=0),e._pt&&l&&(BS[B.id]=1)}C&&LL(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!ye,p&&t<=0&&E.render(ds,!0,!0)},M7=function(e,t,i,r,s,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],f,d,p,m;if(!c)for(c=e._ptCache[t]=[],p=e._ptLookup,m=e._targets.length;m--;){if(f=p[m][t],f&&f.d&&f.d._pt)for(f=f.d._pt;f&&f.p!==t&&f.fp!==t;)f=f._next;if(!f)return OS=1,e.vars[t]="+=0",dE(e,a),OS=0,l?Ud(t+" not eligible for reset"):1;c.push(f)}for(m=c.length;m--;)d=c[m],f=d._pt||d,f.s=(r||r===0)&&!s?r:f.s+(r||0)+o*f.c,f.c=i-f.s,d.e&&(d.e=qn(i)+Wi(d.e)),d.b&&(d.b=f.s+Wi(d.b))},E7=function(e,t){var i=e[0]?lc(e[0]).harness:0,r=i&&i.aliases,s,o,a,l;if(!r)return t;s=wc({},t);for(o in r)if(o in s)for(l=r[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},w7=function(e,t,i,r){var s=t.ease||r||"power1.inOut",o,a;if(Ji(t))a=i[e]||(i[e]=[]),t.forEach(function(l,c){return a.push({t:c/(t.length-1)*100,v:l,e:s})});else for(o in t)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:s})},rd=function(e,t,i,r,s){return Yn(e)?e.call(t,i,r,s):Ti(e)&&~e.indexOf("random(")?kd(e):e},bL=uE+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",IL={};Sr(bL+",id,stagger,delay,duration,paused,scrollTrigger",function(n){return IL[n]=1});var si=function(n){YD(e,n);function e(i,r,s,o){var a;typeof r=="number"&&(s.duration=r,r=s,s=null),a=n.call(this,o?r:nd(r))||this;var l=a.vars,c=l.duration,f=l.delay,d=l.immediateRender,p=l.stagger,m=l.overwrite,v=l.keyframes,_=l.defaults,x=l.scrollTrigger,g=l.yoyoEase,S=r.parent||Un,A=(Ji(i)||QD(i)?ta(i[0]):"length"in r)?[i]:ps(i),E,I,b,P,D,O,C,B;if(a._targets=A.length?fE(A):Ud("GSAP target "+i+" not found. https://gsap.com",!Vr.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=m,v||p||Ag(c)||Ag(f)){if(r=a.vars,E=a.timeline=new nr({data:"nested",defaults:_||{},targets:S&&S.data==="nested"?S.vars.targets:A}),E.kill(),E.parent=E._dp=Fo(a),E._start=0,p||Ag(c)||Ag(f)){if(P=A.length,C=p&&pL(p),vo(p))for(D in p)~bL.indexOf(D)&&(B||(B={}),B[D]=p[D]);for(I=0;I<P;I++)b=iv(r,IL),b.stagger=0,g&&(b.yoyoEase=g),B&&wc(b,B),O=A[I],b.duration=+rd(c,Fo(a),I,O,A),b.delay=(+rd(f,Fo(a),I,O,A)||0)-a._delay,!p&&P===1&&b.delay&&(a._delay=f=b.delay,a._start+=f,b.delay=0),E.to(O,b,C?C(I,O,A):0),E._ease=qt.none;E.duration()?c=f=0:a.timeline=0}else if(v){nd(Ss(E.vars.defaults,{ease:"none"})),E._ease=uc(v.ease||r.ease||"none");var Y=0,$,se,ce;if(Ji(v))v.forEach(function(ie){return E.to(A,ie,">")}),E.duration();else{b={};for(D in v)D==="ease"||D==="easeEach"||w7(D,v[D],b,v.easeEach);for(D in b)for($=b[D].sort(function(ie,ye){return ie.t-ye.t}),Y=0,I=0;I<$.length;I++)se=$[I],ce={ease:se.e,duration:(se.t-(I?$[I-1].t:0))/100*c},ce[D]=se.v,E.to(A,ce,Y),Y+=ce.duration;E.duration()<c&&E.to({},{duration:c-E.duration()})}}c||a.duration(c=E.duration())}else a.timeline=0;return m===!0&&!rE&&(La=Fo(a),Un.killTweensOf(A),La=0),ao(S,Fo(a),s),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(d||!c&&!v&&a._start===Ai(S._time)&&_r(d)&&n7(Fo(a))&&S.data!=="nested")&&(a._tTime=-An,a.render(Math.max(0,-f)||0)),x&&uL(Fo(a),x),a}var t=e.prototype;return t.render=function(r,s,o){var a=this._time,l=this._tDur,c=this._dur,f=r<0,d=r>l-An&&!f?l:r<An?0:r,p,m,v,_,x,g,S,A,E;if(!c)r7(this,r,s,o);else if(d!==this._tTime||!r||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==f){if(p=d,A=this.timeline,this._repeat){if(_=c+this._rDelay,this._repeat<-1&&f)return this.totalTime(_*100+r,s,o);if(p=Ai(d%_),d===l?(v=this._repeat,p=c):(v=~~(d/_),v&&v===Ai(d/_)&&(p=c,v--),p>c&&(p=c)),g=this._yoyo&&v&1,g&&(E=this._yEase,p=c-p),x=gf(this._tTime,_),p===a&&!o&&this._initted&&v===x)return this._tTime=d,this;v!==x&&(A&&this._yEase&&wL(A,g),this.vars.repeatRefresh&&!g&&!this._lock&&this._time!==_&&this._initted&&(this._lock=o=1,this.render(Ai(_*v),!0).invalidate()._lock=0))}if(!this._initted){if(fL(this,f?r:p,o,s,d))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&v!==x))return this;if(c!==this._dur)return this.render(r,s,o)}if(this._tTime=d,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=S=(E||this._ease)(p/c),this._from&&(this.ratio=S=1-S),p&&!a&&!s&&!v&&(zr(this,"onStart"),this._tTime!==d))return this;for(m=this._pt;m;)m.r(S,m.d),m=m._next;A&&A.render(r<0?r:A._dur*A._ease(p/this._dur),s,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!s&&(f&&DS(this,r,s,o),zr(this,"onUpdate")),this._repeat&&v!==x&&this.vars.onRepeat&&!s&&this.parent&&zr(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(f&&!this._onUpdate&&DS(this,r,!0,!0),(r||!c)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&tl(this,1),!s&&!(f&&!a)&&(d||a||g)&&(zr(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),n.prototype.invalidate.call(this,r)},t.resetTo=function(r,s,o,a,l){zd||Ur.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||dE(this,c),f=this._ease(c/this._dur),M7(this,r,s,o,a,f,c,l)?this.resetTo(r,s,o,a,1):(ly(this,0),this.parent||lL(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,s){if(s===void 0&&(s="all"),!r&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Lh(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,s,La&&La.vars.overwrite!==!0)._first||Lh(this),this.parent&&o!==this.timeline.totalDuration()&&vf(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=r?ps(r):a,c=this._ptLookup,f=this._pt,d,p,m,v,_,x,g;if((!s||s==="all")&&e7(a,l))return s==="all"&&(this._pt=0),Lh(this);for(d=this._op=this._op||[],s!=="all"&&(Ti(s)&&(_={},Sr(s,function(S){return _[S]=1}),s=_),s=E7(a,s)),g=a.length;g--;)if(~l.indexOf(a[g])){p=c[g],s==="all"?(d[g]=s,v=p,m={}):(m=d[g]=d[g]||{},v=s);for(_ in v)x=p&&p[_],x&&((!("kill"in x.d)||x.d.kill(_)===!0)&&oy(this,x,"_pt"),delete p[_]),m!=="all"&&(m[_]=1)}return this._initted&&!this._pt&&f&&Lh(this),this},e.to=function(r,s){return new e(r,s,arguments[2])},e.from=function(r,s){return id(1,arguments)},e.delayedCall=function(r,s,o,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,s,o){return id(2,arguments)},e.set=function(r,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(r,s)},e.killTweensOf=function(r,s,o){return Un.killTweensOf(r,s,o)},e}(Hd);Ss(si.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Sr("staggerTo,staggerFrom,staggerFromTo",function(n){si[n]=function(){var e=new nr,t=FS.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var pE=function(e,t,i){return e[t]=i},PL=function(e,t,i){return e[t](i)},T7=function(e,t,i,r){return e[t](r.fp,i)},C7=function(e,t,i){return e.setAttribute(t,i)},mE=function(e,t){return Yn(e[t])?PL:sE(e[t])&&e.setAttribute?C7:pE},BL=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},R7=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},DL=function(e,t){var i=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;i;)r=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+r,i=i._next;r+=t.c}t.set(t.t,t.p,r,t)},gE=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},b7=function(e,t,i,r){for(var s=this._pt,o;s;)o=s._next,s.p===r&&s.modifier(e,t,i),s=o},I7=function(e){for(var t=this._pt,i,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?oy(this,t,"_pt"):t.dep||(i=1),t=r;return!i},P7=function(e,t,i,r){r.mSet(e,t,r.m.call(r.tween,i,r.mt),r)},LL=function(e){for(var t=e._pt,i,r,s,o;t;){for(i=t._next,r=s;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:s=t,(t._next=r)?r._prev=t:o=t,t=i}e._pt=s},Ar=function(){function n(t,i,r,s,o,a,l,c,f){this.t=i,this.s=s,this.c=o,this.p=r,this.r=a||BL,this.d=l||this,this.set=c||pE,this.pr=f||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(i,r,s){this.mSet=this.mSet||this.set,this.set=P7,this.m=i,this.mt=s,this.tween=r},n}();Sr(uE+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(n){return cE[n]=1});Jr.TweenMax=Jr.TweenLite=si;Jr.TimelineLite=Jr.TimelineMax=nr;Un=new nr({sortChildren:!1,defaults:mf,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Vr.stringFilter=ML;var fc=[],Hg={},B7=[],bb=0,D7=0,i1=function(e){return(Hg[e]||B7).map(function(t){return t()})},kS=function(){var e=Date.now(),t=[];e-bb>2&&(i1("matchMediaInit"),fc.forEach(function(i){var r=i.queries,s=i.conditions,o,a,l,c;for(a in r)o=ro.matchMedia(r[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(i.revert(),l&&t.push(i))}),i1("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(r){return i.add(null,r)})}),bb=e,i1("matchMedia"))},FL=function(){function n(t,i){this.selector=i&&NS(i),this.data=[],this._r=[],this.isReverted=!1,this.id=D7++,t&&this.add(t)}var e=n.prototype;return e.add=function(i,r,s){Yn(i)&&(s=r,r=i,i=Yn);var o=this,a=function(){var c=Bn,f=o.selector,d;return c&&c!==o&&c.data.push(o),s&&(o.selector=NS(s)),Bn=o,d=r.apply(o,arguments),Yn(d)&&o._r.push(d),Bn=c,o.selector=f,o.isReverted=!1,d};return o.last=a,i===Yn?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},e.ignore=function(i){var r=Bn;Bn=null,i(this),Bn=r},e.getTweens=function(){var i=[];return this.data.forEach(function(r){return r instanceof n?i.push.apply(i,r.getTweens()):r instanceof si&&!(r.parent&&r.parent.data==="nested")&&i.push(r)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,r){var s=this;if(i?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(f){return a.splice(a.indexOf(f),1)}));for(a.map(function(f){return{g:f._dur||f._delay||f._sat&&!f._sat.vars.immediateRender?f.globalTime(0):-1/0,t:f}}).sort(function(f,d){return d.g-f.g||-1/0}).forEach(function(f){return f.t.revert(i)}),l=s.data.length;l--;)c=s.data[l],c instanceof nr?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof si)&&c.revert&&c.revert(i);s._r.forEach(function(f){return f(i,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=fc.length;o--;)fc[o].id===this.id&&fc.splice(o,1)},e.revert=function(i){this.kill(i||{})},n}(),L7=function(){function n(t){this.contexts=[],this.scope=t,Bn&&Bn.data.push(this)}var e=n.prototype;return e.add=function(i,r,s){vo(i)||(i={matches:i});var o=new FL(0,s||this.scope),a=o.conditions={},l,c,f;Bn&&!o.selector&&(o.selector=Bn.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=i;for(c in i)c==="all"?f=1:(l=ro.matchMedia(i[c]),l&&(fc.indexOf(o)<0&&fc.push(o),(a[c]=l.matches)&&(f=1),l.addListener?l.addListener(kS):l.addEventListener("change",kS)));return f&&r(o,function(d){return o.add(null,d)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(r){return r.kill(i,!0)})},n}(),sv={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(r){return _L(r)})},timeline:function(e){return new nr(e)},getTweensOf:function(e,t){return Un.getTweensOf(e,t)},getProperty:function(e,t,i,r){Ti(e)&&(e=ps(e)[0]);var s=lc(e||{}).get,o=i?aL:oL;return i==="native"&&(i=""),e&&(t?o((Nr[t]&&Nr[t].get||s)(e,t,i,r)):function(a,l,c){return o((Nr[a]&&Nr[a].get||s)(e,a,l,c))})},quickSetter:function(e,t,i){if(e=ps(e),e.length>1){var r=e.map(function(f){return wr.quickSetter(f,t,i)}),s=r.length;return function(f){for(var d=s;d--;)r[d](f)}}e=e[0]||{};var o=Nr[t],a=lc(e),l=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(f){var d=new o;Uu._pt=0,d.init(e,i?f+i:f,Uu,0,[e]),d.render(1,d),Uu._pt&&gE(1,Uu)}:a.set(e,l);return o?c:function(f){return c(e,l,i?f+i:f,a,1)}},quickTo:function(e,t,i){var r,s=wr.to(e,wc((r={},r[t]="+=0.1",r.paused=!0,r),i||{})),o=function(l,c,f){return s.resetTo(t,l,c,f)};return o.tween=s,o},isTweening:function(e){return Un.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=uc(e.ease,mf.ease)),Eb(mf,e||{})},config:function(e){return Eb(Vr,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,r=e.plugins,s=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!Nr[a]&&!Jr[a]&&Ud(t+" effect requires "+a+" plugin.")}),$_[t]=function(a,l,c){return i(ps(a),Ss(l||{},s),c)},o&&(nr.prototype[t]=function(a,l,c){return this.add($_[t](a,vo(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){qt[e]=uc(t)},parseEase:function(e,t){return arguments.length?uc(e,t):qt},getById:function(e){return Un.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new nr(e),r,s;for(i.smoothChildTiming=_r(e.smoothChildTiming),Un.remove(i),i._dp=0,i._time=i._tTime=Un._time,r=Un._first;r;)s=r._next,(t||!(!r._dur&&r instanceof si&&r.vars.onComplete===r._targets[0]))&&ao(i,r,r._start-r._delay),r=s;return ao(Un,i,0),i},context:function(e,t){return e?new FL(e,t):Bn},matchMedia:function(e){return new L7(e)},matchMediaRefresh:function(){return fc.forEach(function(e){var t=e.conditions,i,r;for(r in t)t[r]&&(t[r]=!1,i=1);i&&e.revert()})||kS()},addEventListener:function(e,t){var i=Hg[e]||(Hg[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=Hg[e],r=i&&i.indexOf(t);r>=0&&i.splice(r,1)},utils:{wrap:h7,wrapYoyo:d7,distribute:pL,random:gL,snap:mL,normalize:f7,getUnit:Wi,clamp:a7,splitColor:SL,toArray:ps,selector:NS,mapRange:yL,pipe:c7,unitize:u7,interpolate:p7,shuffle:dL},install:tL,effects:$_,ticker:Ur,updateRoot:nr.updateRoot,plugins:Nr,globalTimeline:Un,core:{PropTween:Ar,globals:nL,Tween:si,Timeline:nr,Animation:Hd,getCache:lc,_removeLinkedListItem:oy,reverting:function(){return ji},context:function(e){return e&&Bn&&(Bn.data.push(e),e._ctx=Bn),Bn},suppressOverwrites:function(e){return rE=e}}};Sr("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return sv[n]=si[n]});Ur.add(nr.updateRoot);Uu=sv.to({},{duration:0});var F7=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},N7=function(e,t){var i=e._targets,r,s,o;for(r in t)for(s=i.length;s--;)o=e._ptLookup[s][r],o&&(o=o.d)&&(o._pt&&(o=F7(o,r)),o&&o.modifier&&o.modifier(t[r],e,i[s],r))},r1=function(e,t){return{name:e,rawVars:1,init:function(r,s,o){o._onInit=function(a){var l,c;if(Ti(s)&&(l={},Sr(s,function(f){return l[f]=1}),s=l),t){l={};for(c in s)l[c]=t(s[c]);s=l}N7(a,s)}}}},wr=sv.registerPlugin({name:"attr",init:function(e,t,i,r,s){var o,a,l;this.tween=i;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],r,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)ji?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},r1("roundProps",US),r1("modifiers"),r1("snap",mL))||sv;si.version=nr.version=wr.version="3.12.5";eL=1;oE()&&yf();qt.Power0;qt.Power1;qt.Power2;qt.Power3;qt.Power4;qt.Linear;qt.Quad;qt.Cubic;qt.Quart;qt.Quint;qt.Strong;qt.Elastic;qt.Back;qt.SteppedEase;qt.Bounce;qt.Sine;qt.Expo;qt.Circ;/*!
5754 * CSSPlugin 3.12.5
5755 * https://gsap.com
5756 *
5757 * Copyright 2008-2024, GreenSock. All rights reserved.
5758 * Subject to the terms at https://gsap.com/standard-license or for
5759 * Club GSAP members, the agreement issued with that membership.
5760 * @author: Jack Doyle, [email protected]
5761*/var Ib,Fa,Ku,vE,ec,Pb,yE,U7=function(){return typeof window<"u"},na={},Hl=180/Math.PI,Qu=Math.PI/180,gu=Math.atan2,Bb=1e8,xE=/([A-Z])/g,O7=/(left|right|width|margin|padding|x)/i,k7=/[\s,\(]\S/,co={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},zS=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},z7=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},H7=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},G7=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},NL=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},UL=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},V7=function(e,t,i){return e.style[t]=i},W7=function(e,t,i){return e.style.setProperty(t,i)},X7=function(e,t,i){return e._gsap[t]=i},j7=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},J7=function(e,t,i,r,s){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(s,o)},Y7=function(e,t,i,r,s){var o=e._gsap;o[t]=i,o.renderTransform(s,o)},kn="transform",Mr=kn+"Origin",K7=function n(e,t){var i=this,r=this.target,s=r.style,o=r._gsap;if(e in na&&s){if(this.tfm=this.tfm||{},e!=="transform")e=co[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return i.tfm[a]=ko(r,a)}):this.tfm[e]=o.x?o[e]:ko(r,e),e===Mr&&(this.tfm.zOrigin=o.zOrigin);else return co.transform.split(",").forEach(function(a){return n.call(i,a,t)});if(this.props.indexOf(kn)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Mr,t,"")),e=kn}(s||t)&&this.props.push(e,t,s[e])},OL=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Q7=function(){var e=this.props,t=this.target,i=t.style,r=t._gsap,s,o;for(s=0;s<e.length;s+=3)e[s+1]?t[e[s]]=e[s+2]:e[s+2]?i[e[s]]=e[s+2]:i.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(xE,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)r[o]=this.tfm[o];r.svg&&(r.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=yE(),(!s||!s.isStart)&&!i[kn]&&(OL(i),r.zOrigin&&i[Mr]&&(i[Mr]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}},kL=function(e,t){var i={target:e,props:[],revert:Q7,save:K7};return e._gsap||wr.core.getCache(e),t&&t.split(",").forEach(function(r){return i.save(r)}),i},zL,HS=function(e,t){var i=Fa.createElementNS?Fa.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Fa.createElement(e);return i&&i.style?i:Fa.createElement(e)},po=function n(e,t,i){var r=getComputedStyle(e);return r[t]||r.getPropertyValue(t.replace(xE,"-$1").toLowerCase())||r.getPropertyValue(t)||!i&&n(e,xf(t)||t,1)||""},Db="O,Moz,ms,Ms,Webkit".split(","),xf=function(e,t,i){var r=t||ec,s=r.style,o=5;if(e in s&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Db[o]+e in s););return o<0?null:(o===3?"ms":o>=0?Db[o]:"")+e},GS=function(){U7()&&window.document&&(Ib=window,Fa=Ib.document,Ku=Fa.documentElement,ec=HS("div")||{style:{}},HS("div"),kn=xf(kn),Mr=kn+"Origin",ec.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",zL=!!xf("perspective"),yE=wr.core.reverting,vE=1)},s1=function n(e){var t=HS("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,r=this.nextSibling,s=this.style.cssText,o;if(Ku.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=n}catch{}else this._gsapBBox&&(o=this._gsapBBox());return i&&(r?i.insertBefore(this,r):i.appendChild(this)),Ku.removeChild(t),this.style.cssText=s,o},Lb=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},HL=function(e){var t;try{t=e.getBBox()}catch{t=s1.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===s1||(t=s1.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+Lb(e,["x","cx","x1"])||0,y:+Lb(e,["y","cy","y1"])||0,width:0,height:0}:t},GL=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&HL(e))},Tc=function(e,t){if(t){var i=e.style,r;t in na&&t!==Mr&&(t=kn),i.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(r==="--"?t:t.replace(xE,"-$1").toLowerCase())):i.removeAttribute(t)}},Na=function(e,t,i,r,s,o){var a=new Ar(e._pt,t,i,0,1,o?UL:NL);return e._pt=a,a.b=r,a.e=s,e._props.push(i),a},Fb={deg:1,rad:1,turn:1},Z7={grid:1,flex:1},nl=function n(e,t,i,r){var s=parseFloat(i)||0,o=(i+"").trim().substr((s+"").length)||"px",a=ec.style,l=O7.test(t),c=e.tagName.toLowerCase()==="svg",f=(c?"client":"offset")+(l?"Width":"Height"),d=100,p=r==="px",m=r==="%",v,_,x,g;if(r===o||!s||Fb[r]||Fb[o])return s;if(o!=="px"&&!p&&(s=n(e,t,i,"px")),g=e.getCTM&&GL(e),(m||o==="%")&&(na[t]||~t.indexOf("adius")))return v=g?e.getBBox()[l?"width":"height"]:e[f],qn(m?s/v*d:s/100*v);if(a[l?"width":"height"]=d+(p?o:r),_=~t.indexOf("adius")||r==="em"&&e.appendChild&&!c?e:e.parentNode,g&&(_=(e.ownerSVGElement||{}).parentNode),(!_||_===Fa||!_.appendChild)&&(_=Fa.body),x=_._gsap,x&&m&&x.width&&l&&x.time===Ur.time&&!x.uncache)return qn(s/x.width*d);if(m&&(t==="height"||t==="width")){var S=e.style[t];e.style[t]=d+r,v=e[f],S?e.style[t]=S:Tc(e,t)}else(m||o==="%")&&!Z7[po(_,"display")]&&(a.position=po(e,"position")),_===e&&(a.position="static"),_.appendChild(ec),v=ec[f],_.removeChild(ec),a.position="absolute";return l&&m&&(x=lc(_),x.time=Ur.time,x.width=_[f]),qn(p?v*s/d:v&&s?d/v*s:0)},ko=function(e,t,i,r){var s;return vE||GS(),t in co&&t!=="transform"&&(t=co[t],~t.indexOf(",")&&(t=t.split(",")[0])),na[t]&&t!=="transform"?(s=Vd(e,r),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:av(po(e,Mr))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||r||~(s+"").indexOf("calc("))&&(s=ov[t]&&ov[t](e,t,i)||po(e,t)||rL(e,t)||(t==="opacity"?1:0))),i&&!~(s+"").trim().indexOf(" ")?nl(e,t,s,i)+i:s},q7=function(e,t,i,r){if(!i||i==="none"){var s=xf(t,e,1),o=s&&po(e,s,1);o&&o!==i?(t=s,i=o):t==="borderColor"&&(i=po(e,"borderTopColor"))}var a=new Ar(this._pt,e.style,t,0,1,DL),l=0,c=0,f,d,p,m,v,_,x,g,S,A,E,I;if(a.b=i,a.e=r,i+="",r+="",r==="auto"&&(_=e.style[t],e.style[t]=r,r=po(e,t)||r,_?e.style[t]=_:Tc(e,t)),f=[i,r],ML(f),i=f[0],r=f[1],p=i.match(Nu)||[],I=r.match(Nu)||[],I.length){for(;d=Nu.exec(r);)x=d[0],S=r.substring(l,d.index),v?v=(v+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(v=1),x!==(_=p[c++]||"")&&(m=parseFloat(_)||0,E=_.substr((m+"").length),x.charAt(1)==="="&&(x=Yu(m,x)+E),g=parseFloat(x),A=x.substr((g+"").length),l=Nu.lastIndex-A.length,A||(A=A||Vr.units[t]||E,l===r.length&&(r+=A,a.e+=A)),E!==A&&(m=nl(e,t,_,A)||0),a._pt={_next:a._pt,p:S||c===1?S:",",s:m,c:g-m,m:v&&v<4||t==="zIndex"?Math.round:0});a.c=l<r.length?r.substring(l,r.length):""}else a.r=t==="display"&&r==="none"?UL:NL;return qD.test(r)&&(a.e=0),this._pt=a,a},Nb={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},$7=function(e){var t=e.split(" "),i=t[0],r=t[1]||"50%";return(i==="top"||i==="bottom"||r==="left"||r==="right")&&(e=i,i=r,r=e),t[0]=Nb[i]||i,t[1]=Nb[r]||r,t.join(" ")},ej=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,r=i.style,s=t.u,o=i._gsap,a,l,c;if(s==="all"||s===!0)r.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],na[a]&&(l=1,a=a==="transformOrigin"?Mr:kn),Tc(i,a);l&&(Tc(i,kn),o&&(o.svg&&i.removeAttribute("transform"),Vd(i,1),o.uncache=1,OL(r)))}},ov={clearProps:function(e,t,i,r,s){if(s.data!=="isFromStart"){var o=e._pt=new Ar(e._pt,t,i,0,0,ej);return o.u=r,o.pr=-10,o.tween=s,e._props.push(i),1}}},Gd=[1,0,0,1,0,0],VL={},WL=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Ub=function(e){var t=po(e,kn);return WL(t)?Gd:t.substr(7).match(ZD).map(qn)},_E=function(e,t){var i=e._gsap||lc(e),r=e.style,s=Ub(e),o,a,l,c;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Gd:s):(s===Gd&&!e.offsetParent&&e!==Ku&&!i.svg&&(l=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(c=1,a=e.nextElementSibling,Ku.appendChild(e)),s=Ub(e),l?r.display=l:Tc(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):Ku.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},VS=function(e,t,i,r,s,o){var a=e._gsap,l=s||_E(e,!0),c=a.xOrigin||0,f=a.yOrigin||0,d=a.xOffset||0,p=a.yOffset||0,m=l[0],v=l[1],_=l[2],x=l[3],g=l[4],S=l[5],A=t.split(" "),E=parseFloat(A[0])||0,I=parseFloat(A[1])||0,b,P,D,O;i?l!==Gd&&(P=m*x-v*_)&&(D=E*(x/P)+I*(-_/P)+(_*S-x*g)/P,O=E*(-v/P)+I*(m/P)-(m*S-v*g)/P,E=D,I=O):(b=HL(e),E=b.x+(~A[0].indexOf("%")?E/100*b.width:E),I=b.y+(~(A[1]||A[0]).indexOf("%")?I/100*b.height:I)),r||r!==!1&&a.smooth?(g=E-c,S=I-f,a.xOffset=d+(g*m+S*_)-g,a.yOffset=p+(g*v+S*x)-S):a.xOffset=a.yOffset=0,a.xOrigin=E,a.yOrigin=I,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!i,e.style[Mr]="0px 0px",o&&(Na(o,a,"xOrigin",c,E),Na(o,a,"yOrigin",f,I),Na(o,a,"xOffset",d,a.xOffset),Na(o,a,"yOffset",p,a.yOffset)),e.setAttribute("data-svg-origin",E+" "+I)},Vd=function(e,t){var i=e._gsap||new CL(e);if("x"in i&&!t&&!i.uncache)return i;var r=e.style,s=i.scaleX<0,o="px",a="deg",l=getComputedStyle(e),c=po(e,Mr)||"0",f,d,p,m,v,_,x,g,S,A,E,I,b,P,D,O,C,B,Y,$,se,ce,ie,ye,W,ue,oe,de,we,Ue,pe,be;return f=d=p=_=x=g=S=A=E=0,m=v=1,i.svg=!!(e.getCTM&&GL(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(r[kn]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[kn]!=="none"?l[kn]:"")),r.scale=r.rotate=r.translate="none"),P=_E(e,i.svg),i.svg&&(i.uncache?(W=e.getBBox(),c=i.xOrigin-W.x+"px "+(i.yOrigin-W.y)+"px",ye=""):ye=!t&&e.getAttribute("data-svg-origin"),VS(e,ye||c,!!ye||i.originIsAbsolute,i.smooth!==!1,P)),I=i.xOrigin||0,b=i.yOrigin||0,P!==Gd&&(B=P[0],Y=P[1],$=P[2],se=P[3],f=ce=P[4],d=ie=P[5],P.length===6?(m=Math.sqrt(B*B+Y*Y),v=Math.sqrt(se*se+$*$),_=B||Y?gu(Y,B)*Hl:0,S=$||se?gu($,se)*Hl+_:0,S&&(v*=Math.abs(Math.cos(S*Qu))),i.svg&&(f-=I-(I*B+b*$),d-=b-(I*Y+b*se))):(be=P[6],Ue=P[7],oe=P[8],de=P[9],we=P[10],pe=P[11],f=P[12],d=P[13],p=P[14],D=gu(be,we),x=D*Hl,D&&(O=Math.cos(-D),C=Math.sin(-D),ye=ce*O+oe*C,W=ie*O+de*C,ue=be*O+we*C,oe=ce*-C+oe*O,de=ie*-C+de*O,we=be*-C+we*O,pe=Ue*-C+pe*O,ce=ye,ie=W,be=ue),D=gu(-$,we),g=D*Hl,D&&(O=Math.cos(-D),C=Math.sin(-D),ye=B*O-oe*C,W=Y*O-de*C,ue=$*O-we*C,pe=se*C+pe*O,B=ye,Y=W,$=ue),D=gu(Y,B),_=D*Hl,D&&(O=Math.cos(D),C=Math.sin(D),ye=B*O+Y*C,W=ce*O+ie*C,Y=Y*O-B*C,ie=ie*O-ce*C,B=ye,ce=W),x&&Math.abs(x)+Math.abs(_)>359.9&&(x=_=0,g=180-g),m=qn(Math.sqrt(B*B+Y*Y+$*$)),v=qn(Math.sqrt(ie*ie+be*be)),D=gu(ce,ie),S=Math.abs(D)>2e-4?D*Hl:0,E=pe?1/(pe<0?-pe:pe):0),i.svg&&(ye=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!WL(po(e,kn)),ye&&e.setAttribute("transform",ye))),Math.abs(S)>90&&Math.abs(S)<270&&(s?(m*=-1,S+=_<=0?180:-180,_+=_<=0?180:-180):(v*=-1,S+=S<=0?180:-180)),t=t||i.uncache,i.x=f-((i.xPercent=f&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-f)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=d-((i.yPercent=d&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=p+o,i.scaleX=qn(m),i.scaleY=qn(v),i.rotation=qn(_)+a,i.rotationX=qn(x)+a,i.rotationY=qn(g)+a,i.skewX=S+a,i.skewY=A+a,i.transformPerspective=E+o,(i.zOrigin=parseFloat(c.split(" ")[2])||!t&&i.zOrigin||0)&&(r[Mr]=av(c)),i.xOffset=i.yOffset=0,i.force3D=Vr.force3D,i.renderTransform=i.svg?nj:zL?XL:tj,i.uncache=0,i},av=function(e){return(e=e.split(" "))[0]+" "+e[1]},o1=function(e,t,i){var r=Wi(t);return qn(parseFloat(t)+parseFloat(nl(e,"x",i+"px",r)))+r},tj=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,XL(e,t)},Dl="0deg",Th="0px",Ll=") ",XL=function(e,t){var i=t||this,r=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.z,c=i.rotation,f=i.rotationY,d=i.rotationX,p=i.skewX,m=i.skewY,v=i.scaleX,_=i.scaleY,x=i.transformPerspective,g=i.force3D,S=i.target,A=i.zOrigin,E="",I=g==="auto"&&e&&e!==1||g===!0;if(A&&(d!==Dl||f!==Dl)){var b=parseFloat(f)*Qu,P=Math.sin(b),D=Math.cos(b),O;b=parseFloat(d)*Qu,O=Math.cos(b),o=o1(S,o,P*O*-A),a=o1(S,a,-Math.sin(b)*-A),l=o1(S,l,D*O*-A+A)}x!==Th&&(E+="perspective("+x+Ll),(r||s)&&(E+="translate("+r+"%, "+s+"%) "),(I||o!==Th||a!==Th||l!==Th)&&(E+=l!==Th||I?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Ll),c!==Dl&&(E+="rotate("+c+Ll),f!==Dl&&(E+="rotateY("+f+Ll),d!==Dl&&(E+="rotateX("+d+Ll),(p!==Dl||m!==Dl)&&(E+="skew("+p+", "+m+Ll),(v!==1||_!==1)&&(E+="scale("+v+", "+_+Ll),S.style[kn]=E||"translate(0, 0)"},nj=function(e,t){var i=t||this,r=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.rotation,c=i.skewX,f=i.skewY,d=i.scaleX,p=i.scaleY,m=i.target,v=i.xOrigin,_=i.yOrigin,x=i.xOffset,g=i.yOffset,S=i.forceCSS,A=parseFloat(o),E=parseFloat(a),I,b,P,D,O;l=parseFloat(l),c=parseFloat(c),f=parseFloat(f),f&&(f=parseFloat(f),c+=f,l+=f),l||c?(l*=Qu,c*=Qu,I=Math.cos(l)*d,b=Math.sin(l)*d,P=Math.sin(l-c)*-p,D=Math.cos(l-c)*p,c&&(f*=Qu,O=Math.tan(c-f),O=Math.sqrt(1+O*O),P*=O,D*=O,f&&(O=Math.tan(f),O=Math.sqrt(1+O*O),I*=O,b*=O)),I=qn(I),b=qn(b),P=qn(P),D=qn(D)):(I=d,D=p,b=P=0),(A&&!~(o+"").indexOf("px")||E&&!~(a+"").indexOf("px"))&&(A=nl(m,"x",o,"px"),E=nl(m,"y",a,"px")),(v||_||x||g)&&(A=qn(A+v-(v*I+_*P)+x),E=qn(E+_-(v*b+_*D)+g)),(r||s)&&(O=m.getBBox(),A=qn(A+r/100*O.width),E=qn(E+s/100*O.height)),O="matrix("+I+","+b+","+P+","+D+","+A+","+E+")",m.setAttribute("transform",O),S&&(m.style[kn]=O)},ij=function(e,t,i,r,s){var o=360,a=Ti(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Hl:1),c=l-r,f=r+c+"deg",d,p;return a&&(d=s.split("_")[1],d==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),d==="cw"&&c<0?c=(c+o*Bb)%o-~~(c/o)*o:d==="ccw"&&c>0&&(c=(c-o*Bb)%o-~~(c/o)*o)),e._pt=p=new Ar(e._pt,t,i,r,c,z7),p.e=f,p.u="deg",e._props.push(i),p},Ob=function(e,t){for(var i in t)e[i]=t[i];return e},rj=function(e,t,i){var r=Ob({},i._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,c,f,d,p,m,v;r.svg?(c=i.getAttribute("transform"),i.setAttribute("transform",""),o[kn]=t,a=Vd(i,1),Tc(i,kn),i.setAttribute("transform",c)):(c=getComputedStyle(i)[kn],o[kn]=t,a=Vd(i,1),o[kn]=c);for(l in na)c=r[l],f=a[l],c!==f&&s.indexOf(l)<0&&(m=Wi(c),v=Wi(f),d=m!==v?nl(i,l,c,v):parseFloat(c),p=parseFloat(f),e._pt=new Ar(e._pt,a,l,d,p-d,zS),e._pt.u=v||0,e._props.push(l));Ob(a,r)};Sr("padding,margin,Width,Radius",function(n,e){var t="Top",i="Right",r="Bottom",s="Left",o=(e<3?[t,i,r,s]:[t+s,t+i,r+i,r+s]
vendor: 4,939 bytes, line 5761
5761).map(function(a){return e<2?n+a:"border"+a+n});ov[e>1?"border"+n:n]=function(a,l,c,f,d){var p,m;if(arguments.length<4)return p=o.map(function(v){return ko(a,v,c)}),m=p.join(" "),m.split(p[0]).length===5?p[0]:m;p=(f+"").split(" "),m={},o.forEach(function(v,_){return m[v]=p[_]=p[_]||p[(_-1)/2|0]}),a.init(l,m,d)}});var jL={name:"css",register:GS,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,r,s){var o=this._props,a=e.style,l=i.vars.startAt,c,f,d,p,m,v,_,x,g,S,A,E,I,b,P,D;vE||GS(),this.styles=this.styles||kL(e),D=this.styles.props,this.tween=i;for(_ in t)if(_!=="autoRound"&&(f=t[_],!(Nr[_]&&RL(_,t,i,r,e,s)))){if(m=typeof f,v=ov[_],m==="function"&&(f=f.call(i,r,e,s),m=typeof f),m==="string"&&~f.indexOf("random(")&&(f=kd(f)),v)v(this,e,_,f,i)&&(P=1);else if(_.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(_)+"").trim(),f+="",Ja.lastIndex=0,Ja.test(c)||(x=Wi(c),g=Wi(f)),g?x!==g&&(c=nl(e,_,c,g)+g):x&&(f+=x),this.add(a,"setProperty",c,f,r,s,0,0,_),o.push(_),D.push(_,0,a[_]);else if(m!=="undefined"){if(l&&_ in l?(c=typeof l[_]=="function"?l[_].call(i,r,e,s):l[_],Ti(c)&&~c.indexOf("random(")&&(c=kd(c)),Wi(c+"")||c==="auto"||(c+=Vr.units[_]||Wi(ko(e,_))||""),(c+"").charAt(1)==="="&&(c=ko(e,_))):c=ko(e,_),p=parseFloat(c),S=m==="string"&&f.charAt(1)==="="&&f.substr(0,2),S&&(f=f.substr(2)),d=parseFloat(f),_ in co&&(_==="autoAlpha"&&(p===1&&ko(e,"visibility")==="hidden"&&d&&(p=0),D.push("visibility",0,a.visibility),Na(this,a,"visibility",p?"inherit":"hidden",d?"inherit":"hidden",!d)),_!=="scale"&&_!=="transform"&&(_=co[_],~_.indexOf(",")&&(_=_.split(",")[0]))),A=_ in na,A){if(this.styles.save(_),E||(I=e._gsap,I.renderTransform&&!t.parseTransform||Vd(e,t.parseTransform),b=t.smoothOrigin!==!1&&I.smooth,E=this._pt=new Ar(this._pt,a,kn,0,1,I.renderTransform,I,0,-1),E.dep=1),_==="scale")this._pt=new Ar(this._pt,I,"scaleY",I.scaleY,(S?Yu(I.scaleY,S+d):d)-I.scaleY||0,zS),this._pt.u=0,o.push("scaleY",_),_+="X";else if(_==="transformOrigin"){D.push(Mr,0,a[Mr]),f=$7(f),I.svg?VS(e,f,0,b,0,this):(g=parseFloat(f.split(" ")[2])||0,g!==I.zOrigin&&Na(this,I,"zOrigin",I.zOrigin,g),Na(this,a,_,av(c),av(f)));continue}else if(_==="svgOrigin"){VS(e,f,1,b,0,this);continue}else if(_ in VL){ij(this,I,_,p,S?Yu(p,S+f):f);continue}else if(_==="smoothOrigin"){Na(this,I,"smooth",I.smooth,f);continue}else if(_==="force3D"){I[_]=f;continue}else if(_==="transform"){rj(this,f,e);continue}}else _ in a||(_=xf(_)||_);if(A||(d||d===0)&&(p||p===0)&&!k7.test(f)&&_ in a)x=(c+"").substr((p+"").length),d||(d=0),g=Wi(f)||(_ in Vr.units?Vr.units[_]:x),x!==g&&(p=nl(e,_,c,g)),this._pt=new Ar(this._pt,A?I:a,_,p,(S?Yu(p,S+d):d)-p,!A&&(g==="px"||_==="zIndex")&&t.autoRound!==!1?G7:zS),this._pt.u=g||0,x!==g&&g!=="%"&&(this._pt.b=c,this._pt.r=H7);else if(_ in a)q7.call(this,e,_,c,S?S+f:f);else if(_ in e)this.add(e,_,c||e[_],S?S+f:f,r,s);else if(_!=="parseTransform"){lE(_,f);continue}A||(_ in a?D.push(_,0,a[_]):D.push(_,1,c||e[_])),o.push(_)}}P&&LL(this)},render:function(e,t){if(t.tween._time||!yE())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:ko,aliases:co,getSetter:function(e,t,i){var r=co[t];return r&&r.indexOf(",")<0&&(t=r),t in na&&t!==Mr&&(e._gsap.x||ko(e,"x"))?i&&Pb===i?t==="scale"?j7:X7:(Pb=i||{})&&(t==="scale"?J7:Y7):e.style&&!sE(e.style[t])?V7:~t.indexOf("-")?W7:mE(e,t)},core:{_removeProperty:Tc,_getMatrix:_E}};wr.utils.checkPrefix=xf;wr.core.getStyleSaver=kL;(function(n,e,t,i){var r=Sr(n+","+e+","+t,function(s){na[s]=1});Sr(e,function(s){Vr.units[s]="deg",VL[s]=1}),co[r[13]]=n+","+e,Sr(i,function(s){var o=s.split(":");co[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Sr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Vr.units[n]="px"});wr.registerPlugin(jL);var WS=wr.registerPlugin(jL)||wr;WS.core.Tween;function sj(){const{camera:n}=In(),{dive:e,controlsEnabled:t}=As(kt);ne.useEffect(()=>{kt.controlsEnabled=!kt.isMobile},[kt.isMobile]);const i=WS.timeline();return ne.useEffect(()=>{e?i.to(n.position,{x:-1,y:-1.5,z:-1,duration:1.5,ease:"power2.inOut"}).to(n,{fov:85,duration:1.2,ease:"power2.inOut",onUpdate:()=>{n.updateProjectionMatrix()}},"-=1.1"):i.to(n.position,{x:-4,y:2.5,z:-4,duration:1.6,ease:"power4.inOut"}).to(n,{fov:55,duration:1.2,ease:"power2.inOut",onUpdate:()=>{n.updateProjectionMatrix()}},"<")},[e,n]),ne.useEffect(()=>{WS.to(n.position,{x:-4,y:2.5,z:-4,duration:2.5,ease:"power4.inOut"})},[]),re.jsx(g6,{target:[0,-1.5,0],dampingFactor:.25,maxDistance:6,minDistance:1.4,enableRotate:t,enableZoom:t,enablePan:t,minPolarAngle:.2,maxPolarAngle:1.7,makeDefault:!0})}function oj(){const{qualitySettings:n}=As(kt);return re.jsxs("div",{style:{width:"100vw",height:"100vh"}
5761,children:[re.jsx(WX,{}),re.jsx($V,{shadows:!0,gl:{antialias:!1,stencil:!1,alpha:!1},camera:{near:.01,far:1e3,fov:55,position:[-1,-1.5,-1]},dpr:n==="ultra"?[1,1.5]:n==="balanced"?[1,1.5]:.8,children:re.jsxs(ne.Suspense,{fallback:null,children:[re.jsx(IX,{}),re.jsx(sj,{})]})})]})}a1.createRoot(document.getElementById("root")).render(re.jsx(hc.StrictMode,{children:re.jsx(oj,{})}));

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.