vendor: 16,301 bytes, lines 1-25
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"]'))n(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"&&n(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 n(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();var WW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function CF(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Py={},x3={exports:{}},Qr={},K={exports:{}},Vt={};/** 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 Qh=Symbol.for("react.element"),TF=Symbol.for("react.portal"),RF=Symbol.for("react.fragment"),PF=Symbol.for("react.strict_mode"),bF=Symbol.for("react.profiler"),IF=Symbol.for("react.provider"),BF=Symbol.for("react.context"),DF=Symbol.for("react.forward_ref"),FF=Symbol.for("react.suspense"),LF=Symbol.for("react.memo"),NF=Symbol.for("react.lazy"),SM=Symbol.iterator;function OF(i){return i===null||typeof i!="object"?null:(i=SM&&i[SM]||i["@@iterator"],typeof i=="function"?i:null)}var A3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S3=Object.assign,E3={};function Pf(i,e,t){this.props=i,this.context=e,this.refs=E3,this.updater=t||A3}Pf.prototype.isReactComponent={};Pf.prototype.setState=function(i,e){if(typeof i!="object"&&typeof i!="function"&&i!=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,i,e,"setState")};Pf.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function w3(){}w3.prototype=Pf.prototype;function DA(i,e,t){this.props=i,this.context=e,this.refs=E3,this.updater=t||A3}var FA=DA.prototype=new w3;FA.constructor=DA;S3(FA,Pf.prototype);FA.isPureReactComponent=!0;var EM=Array.isArray,M3=Object.prototype.hasOwnProperty,LA={current:null},C3={key:!0,ref:!0,__self:!0,__source:!0};function T3(i,e,t){var n,r={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)M3.call(e,n)&&!C3.hasOwnProperty(n)&&(r[n]=e[n]);var a=arguments.length-2;if(a===1)r.children=t;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}if(i&&i.defaultProps)for(n in a=i.defaultProps,a)r[n]===void 0&&(r[n]=a[n]);return{$$typeof:Qh,type:i,key:s,ref:o,props:r,_owner:LA.current}}function UF(i,e){return{$$typeof:Qh,type:i.type,key:e,ref:i.ref,props:i.props,_owner:i._owner}}function NA(i){return typeof i=="object"&&i!==null&&i.$$typeof===Qh}function zF(i){var e={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(t){return e[t]})}var wM=/\/+/g;function H_(i,e){return typeof i=="object"&&i!==null&&i.key!=null?zF(""+i.key):e.toString(36)}function O0(i,e,t,n,r){var s=typeof i;(s==="undefined"||s==="boolean")&&(i=null);var o=!1;if(i===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(i.$$typeof){case Qh:case TF:o=!0}}if(o)return o=i,r=r(o),i=n===""?"."+H_(o,0):n,EM(r)?(t="",i!=null&&(t=i.replace(wM,"$&/")+"/"),O0(r,e,t,"",function(u){return u})):r!=null&&(NA(r)&&(r=UF(r,t+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(wM,"$&/")+"/")+i)),e.push(r)),1;if(o=0,n=n===""?".":n+":",EM(i))for(var a=0;a<i.length;a++){s=i[a];var l=n+H_(s,a);o+=O0(s,e,t,l,r)}else if(l=OF(i),typeof l=="function")for(i=l.call(i),a=0;!(s=i.next()).done;)s=s.value,l=n+H_(s,a++),o+=O0(s,e,t,l,r);else if(s==="object")throw e=String(i),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function um(i,e,t){if(i==null)return i;var n=[],r=0;return O0(i,n,"","",function(s){return e.call(t,s,r++)}),n}function kF(i){if(i._status===-1){var e=i._result;e=e(),e.then(function(t){(i._status===0||i._status===-1)&&(i._status=1,i._result=t)},function(t){(i._status===0||i._status===-1)&&(i._status=2,i._result=t)}),i._status===-1&&(i._status=0,i._result=e)}if(i._status===1)return i._result.default;throw i._result}var cr={current:null},U0={transition:null},GF={ReactCurrentDispatcher:cr,ReactCurrentBatchConfig:U0,ReactCurrentOwner:LA};function R3(){throw Error("act(...) is not supported in production builds of React.")}Vt.Children={map:um,forEach:function(i,e,t){um(i,function(){e.apply(this,arguments)},t)},count:function(i){var e=0;return um(i,function(){e++}),e},toArray:function(i){return um(i,function(e){return e})||[]},only:function(i){if(!NA(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};Vt.Component=Pf;Vt.Fragment=RF;Vt.Profiler=bF;Vt.PureComponent=DA;Vt.StrictMode=PF;Vt.Suspense=FF;Vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=GF;Vt.act=R3;Vt.cloneElement=function(i,e,t){if(i==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+i+".");var n=S3({},i.props),r=i.key,s=i.ref,o=i._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=LA.current),e.key!==void 0&&(r=""+e.key),i.type&&i.type.defaultProps)var a=i.type.defaultProps;for(l in e)M3.call(e,l)&&!C3.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=t;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:Qh,type:i.type,key:r,ref:s,props:n,_owner:o}};Vt.createContext=function(i){return i={$$typeof:BF,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},i.Provider={$$typeof:IF,_context:i},i.Consumer=i};Vt.createElement=T3;Vt.createFactory=function(i){var e=T3.bind(null,i);return e.type=i,e};Vt.createRef=function(){return{current:null}};Vt.forwardRef=function(i){return{$$typeof:DF,render:i}};Vt.isValidElement=NA;Vt.lazy=function(i){return{$$typeof:NF,_payload:{_status:-1,_result:i},_init:kF}};Vt.memo=function(i,e){return{$$typeof:LF,type:i,compare:e===void 0?null:e}};Vt.startTransition=function(i){var e=U0.transition;U0.transition={};try{i()}finally{U0.transition=e}};Vt.unstable_act=R3;Vt.useCallback=function(i,e){return cr.current.useCallback(i,e)};Vt.useContext=function(i){return cr.current.useContext(i)};Vt.useDebugValue=function(){};Vt.useDeferredValue=function(i){return cr.current.useDeferredValue(i)};Vt.useEffect=function(i,e){return cr.current.useEffect(i,e)};Vt.useId=function(){return cr.current.useId()};Vt.useImperativeHandle=function(i,e,t){return cr.current.useImperativeHandle(i,e,t)};Vt.useInsertionEffect=function(i,e){return cr.current.useInsertionEffect(i,e)};Vt.useLayoutEffect=function(i,e){return cr.current.useLayoutEffect(i,e)};Vt.useMemo=function(i,e){return cr.current.useMemo(i,e)};Vt.useReducer=function(i,e,t){return cr.current.useReducer(i,e,t)};Vt.useRef=function(i){return cr.current.useRef(i)};Vt.useState=function(i){return cr.current.useState(i)};Vt.useSyncExternalStore=function(i,e,t){return cr.current.useSyncExternalStore(i,e,t)};Vt.useTransition=function(){return cr.current.useTransition()};Vt.version="18.3.1";(function(i){i.exports=Vt})(K);var P3={exports:{}},b3={};/** 10 * @license React 11 * scheduler.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 */(function(i){function e(k,ne){var te=k.length;k.push(ne);e:for(;0<te;){var ce=te-1>>>1,_e=k[ce];if(0<r(_e,ne))k[ce]=ne,k[te]=_e,te=ce;else break e}}function t(k){return k.length===0?null:k[0]}function n(k){if(k.length===0)return null;var ne=k[0],te=k.pop();if(te!==ne){k[0]=te;e:for(var ce=0,_e=k.length,Fe=_e>>>1;ce<Fe;){var ue=2*(ce+1)-1,Ee=k[ue],Ce=ue+1,De=k[Ce];if(0>r(Ee,te))Ce<_e&&0>r(De,Ee)?(k[ce]=De,k[Ce]=te,ce=Ce):(k[ce]=Ee,k[ue]=te,ce=ue);else if(Ce<_e&&0>r(De,te))k[ce]=De,k[Ce]=te,ce=Ce;else break e}}return ne}function r(k,ne){var te=k.sortIndex-ne.sortIndex;return te!==0?te:k.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;i.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();i.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,h=null,p=3,m=!1,v=!1,_=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(k){for(var ne=t(u);ne!==null;){if(ne.callback===null)n(u);else if(ne.startTime<=k)n(u),ne.sortIndex=ne.expirationTime,e(l,ne);else break;ne=t(u)}}function w(k){if(_=!1,S(k),!v)if(t(l)!==null)v=!0,Q(P);else{var ne=t(u);ne!==null&&pe(w,ne.startTime-k)}}function P(k,ne){v=!1,_&&(_=!1,g(D),D=-1),m=!0;var te=p;try{for(S(ne),h=t(l);h!==null&&(!(h.expirationTime>ne)||k&&!N());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,p=h.priorityLevel;var _e=ce(h.expirationTime<=ne);ne=i.unstable_now(),typeof _e=="function"?h.callback=_e:h===t(l)&&n(l),S(ne)}else n(l);h=t(l)}if(h!==null)var Fe=!0;else{var ue=t(u);ue!==null&&pe(w,ue.startTime-ne),Fe=!1}return Fe}finally{h=null,p=te,m=!1}}var T=!1,I=null,D=-1,C=5,b=-1;function N(){return!(i.unstable_now()-b<C)}function j(){if(I!==null){var k=i.unstable_now();b=k;var ne=!0;try{ne=I(!0,k)}finally{ne?Y():(T=!1,I=null)}}else T=!1}var Y;if(typeof A=="function")Y=function(){A(j)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,re=q.port2;q.port1.onmessage=j,Y=function(){re.postMessage(null)}}else Y=function(){y(j,0)};function Q(k){I=k,T||(T=!0,Y())}function pe(k,ne){D=y(function(){k(i.unstable_now())},ne)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(k){k.callback=null},i.unstable_continueExecution=function(){v||m||(v=!0,Q(P))},i.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<k?Math.floor(1e3/k):5},i.unstable_getCurrentPriorityLevel=function(){return p},i.unstable_getFirstCallbackNode=function(){return t(l)},i.unstable_next=function(k){switch(p){case 1:case 2:case 3:var ne=3;break;default:ne=p}var te=p;p=ne;try{return k()}finally{p=te}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(k,ne){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var te=p;p=k;try{return ne()}finally{p=te}},i.unstable_scheduleCallback=function(k,ne,te){var ce=i.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?ce+te:ce):te=ce,k){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=te+_e,k={id:f++,callback:ne,priorityLevel:k,startTime:te,expirationTime:_e,sortIndex:-1},te>ce?(k.sortIndex=te,e(u,k),t(l)===null&&k===t(u)&&(_?(g(D),D=-1):_=!0,pe(w,te-ce))):(k.sortIndex=_e,e(l,k),v||m||(v=!0,Q(P))),k},i.unstable_shouldYield=N,i.unstable_wrapCallback=function(k){var ne=p;return function(){var te=p;p=ne;try{return k.apply(this,arguments)}finally{p=te}}}})(b3);(function(i){i.exports=b3})(P3);/** 18 * @license React 19 * react-dom.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var HF=K.exports,Jr=P3.exports;function Ge(i){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+i,t=1;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+i+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var I3=new Set,uh={};function Du(i,e){af(i,e),af(i+"Capture",e)}function af(i,e){for(uh[i]=e,i=0;i<e.length;i++)I3.add(e[i])}var jo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),by=Object.prototype.hasOwnProperty,VF=/^[: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]*$/,MM={},CM={};function WF(i){return by.call(CM,i)?!0:by.call(MM,i)?!1:VF.test(i)?CM[i]=!0:(MM[i]=!0,!1)}function XF(i,e,t,n){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function JF(i,e,t,n){if(e===null||typeof e>"u"||XF(i,e,t,n))return!0;if(n)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 fr(i,e,t,n,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=i,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Pi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){Pi[i]=new fr(i,0,!1,i,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var e=i[0];Pi[e]=new fr(e,1,!1,i[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(i){Pi[i]=new fr(i,2,!1,i.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){Pi[i]=new fr(i,2,!1,i,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(i){Pi[i]=new fr(i,3,!1,i.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(i){Pi[i]=new fr(i,3,!0,i,null,!1,!1)});["capture","download"].forEach(function(i){Pi[i]=new fr(i,4,!1,i,null,!1,!1)});["cols","rows","size","span"].forEach(function(i){Pi[i]=new fr(i,6,!1,i,null,!1,!1)});["rowSpan","start"].forEach(function(i){Pi[i]=new fr(i,5,!1,i.toLowerCase(),null,!1,!1)});var OA=/[\-:]([a-z])/g;function UA(i){return i[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
25-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(i){var e=i.replace(OA,UA);Pi[e]=new fr(e,1,!1,i,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var e=i.replace(OA,UA);Pi[e]=new fr(e,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(i){var e=i.replace(OA,UA);Pi[e]=new fr(e,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(i){Pi[i]=new fr(i,1,!1,i.toLowerCase(),null,!1,!1)});Pi.xlinkHref=new fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(i){Pi[i]=new fr(i,1,!1,i.toLowerCase(),null,!0,!0)});function zA(i,e,t,n){var r=Pi.hasOwnProperty(e)?Pi[e]:null;(r!==null?r.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(JF(e,t,r,n)&&(t=null),n||r===null?WF(e)&&(t===null?i.removeAttribute(e):i.setAttribute(e,""+t)):r.mustUseProperty?i[r.propertyName]=t===null?r.type===3?!1:"":t:(e=r.attributeName,n=r.attributeNamespace,t===null?i.removeAttribute(e):(r=r.type,t=r===3||r===4&&t===!0?"":""+t,n?i.setAttributeNS(n,e,t):i.setAttribute(e,t))))}var ea=HF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cm=Symbol.for("react.element"),bc=Symbol.for("react.portal"),Ic=Symbol.for("react.fragment"),kA=Symbol.for("react.strict_mode"),Iy=Symbol.for("react.profiler"),B3=Symbol.for("react.provider"),D3=Symbol.for("react.context"),GA=Symbol.for("react.forward_ref"),By=Symbol.for("react.suspense"),Dy=Symbol.for("react.suspense_list"),HA=Symbol.for("react.memo"),Ea=Symbol.for("react.lazy"),F3=Symbol.for("react.offscreen"),TM=Symbol.iterator;function ld(i){return i===null||typeof i!="object"?null:(i=TM&&i[TM]||i["@@iterator"],typeof i=="function"?i:null)}var Un=Object.assign,V_;function Od(i){if(V_===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);V_=e&&e[1]||""}return` 26`+V_+i}var W_=!1;function X_(i,e){if(!i||W_)return"";W_=!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(u){var n=u}Reflect.construct(i,[],e)}else{try{e.call()}catch(u){n=u}i.call(e.prototype)}else{try{throw Error()}catch(u){n=u}i()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var r=u.stack.split(` 27`),s=n.stack.split(` 28`),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=` 29`+r[o].replace(" at new "," at ");return i.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",i.displayName)),l}while(1<=o&&0<=a);break}}}finally{W_=!1,Error.prepareStackTrace=t}return(i=i?i.displayName||i.name:"")?Od(i):""}function jF(i){switch(i.tag){case 5:return Od(i.type);case 16:return Od("Lazy");case 13:return Od("Suspense");case 19:return Od("SuspenseList");case 0:case 2:case 15:return i=X_(i.type,!1),i;case 11:return i=X_(i.type.render,!1),i;case 1:return i=X_(i.type,!0),i;default:return""}}function Fy(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case Ic:return"Fragment";case bc:return"Portal";case Iy:return"Profiler";case kA:return"StrictMode";case By:return"Suspense";case Dy:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case D3:return(i.displayName||"Context")+".Consumer";case B3:return(i._context.displayName||"Context")+".Provider";case GA:var e=i.render;return i=i.displayName,i||(i=e.displayName||e.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case HA:return e=i.displayName||null,e!==null?e:Fy(i.type)||"Memo";case Ea:e=i._payload,i=i._init;try{return Fy(i(e))}catch{}}return null}function YF(i){var e=i.type;switch(i.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 i=e.render,i=i.displayName||i.name||"",e.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Fy(e);case 8:return e===kA?"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 Qa(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function L3(i){var e=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function KF(i){var e=L3(i)?"checked":"value",t=Object.getOwnPropertyDescriptor(i.constructor.prototype,e),n=""+i[e];if(!i.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(i,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(i,e,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){i._valueTracker=null,delete i[e]}}}}function fm(i){i._valueTracker||(i._valueTracker=KF(i))}function N3(i){if(!i)return!1;var e=i._valueTracker;if(!e)return!0;var t=e.getValue(),n="";return i&&(n=L3(i)?i.checked?"true":"false":i.value),i=n,i!==t?(e.setValue(i),!0):!1}function og(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Ly(i,e){var t=e.checked;return Un({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t!=null?t:i._wrapperState.initialChecked})}function RM(i,e){var t=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;t=Qa(e.value!=null?e.value:t),i._wrapperState={initialChecked:n,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function O3(i,e){e=e.checked,e!=null&&zA(i,"checked",e,!1)}function Ny(i,e){O3(i,e);var t=Qa(e.value),n=e.type;if(t!=null)n==="number"?(t===0&&i.value===""||i.value!=t)&&(i.value=""+t):i.value!==""+t&&(i.value=""+t);else if(n==="submit"||n==="reset"){i.removeAttribute("value");return}e.hasOwnProperty("value")?Oy(i,e.type,t):e.hasOwnProperty("defaultValue")&&Oy(i,e.type,Qa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(i.defaultChecked=!!e.defaultChecked)}function PM(i,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+i._wrapperState.initialValue,t||e===i.value||(i.value=e),i.defaultValue=e}t=i.name,t!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,t!==""&&(i.name=t)}function Oy(i,e,t){(e!=="number"||og(i.ownerDocument)!==i)&&(t==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+t&&(i.defaultValue=""+t))}var Ud=Array.isArray;function Yc(i,e,t,n){if(i=i.options,e){e={};for(var r=0;r<t.length;r++)e["$"+t[r]]=!0;for(t=0;t<i.length;t++)r=e.hasOwnProperty("$"+i[t].value),i[t].selected!==r&&(i[t].selected=r),r&&n&&(i[t].defaultSelected=!0)}else{for(t=""+Qa(t),e=null,r=0;r<i.length;r++){if(i[r].value===t){i[r].selected=!0,n&&(i[r].defaultSelected=!0);return}e!==null||i[r].disabled||(e=i[r])}e!==null&&(e.selected=!0)}}function Uy(i,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Ge(91));return Un({},e,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function bM(i,e){var t=e.value;if(t==null){if(t=e.children,e=e.defaultValue,t!=null){if(e!=null)throw Error(Ge(92));if(Ud(t)){if(1<t.length)throw Error(Ge(93));t=t[0]}e=t}e==null&&(e=""),t=e}i._wrapperState={initialValue:Qa(t)}}function U3(i,e){var t=Qa(e.value),n=Qa(e.defaultValue);t!=null&&(t=""+t,t!==i.value&&(i.value=t),e.defaultValue==null&&i.defaultValue!==t&&(i.defaultValue=t)),n!=null&&(i.defaultValue=""+n)}function IM(i){var e=i.textContent;e===i._wrapperState.initialValue&&e!==""&&e!==null&&(i.value=e)}function z3(i){switch(i){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 zy(i,e){return i==null||i==="http://www.w3.org/1999/xhtml"?z3(e):i==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var dm,k3=function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return i(e,t,n,r)})}:i}(function(i,e){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=e;else{for(dm=dm||document.createElement("div"),dm.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=dm.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;e.firstChild;)i.appendChild(e.firstChild)}});function ch(i,e){if(e){var t=i.firstChild;if(t&&t===i.lastChild&&t.nodeType===3){t.nodeValue=e;return}}i.textContent=e}var Xd={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},QF=["Webkit","ms","Moz","O"];
vendor: 15,111 bytes, line 29
29Object.keys(Xd).forEach(function(i){QF.forEach(function(e){e=e+i.charAt(0).toUpperCase()+i.substring(1),Xd[e]=Xd[i]})});function G3(i,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||Xd.hasOwnProperty(i)&&Xd[i]?(""+e).trim():e+"px"}function H3(i,e){i=i.style;for(var t in e)if(e.hasOwnProperty(t)){var n=t.indexOf("--")===0,r=G3(t,e[t],n);t==="float"&&(t="cssFloat"),n?i.setProperty(t,r):i[t]=r}}var qF=Un({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 ky(i,e){if(e){if(qF[i]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ge(137,i));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ge(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ge(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ge(62))}}function Gy(i,e){if(i.indexOf("-")===-1)return typeof e.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Hy=null;function VA(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Vy=null,Kc=null,Qc=null;function BM(i){if(i=$h(i)){if(typeof Vy!="function")throw Error(Ge(280));var e=i.stateNode;e&&(e=Kg(e),Vy(i.stateNode,i.type,e))}}function V3(i){Kc?Qc?Qc.push(i):Qc=[i]:Kc=i}function W3(){if(Kc){var i=Kc,e=Qc;if(Qc=Kc=null,BM(i),e)for(i=0;i<e.length;i++)BM(e[i])}}function X3(i,e){return i(e)}function J3(){}var J_=!1;function j3(i,e,t){if(J_)return i(e,t);J_=!0;try{return X3(i,e,t)}finally{J_=!1,(Kc!==null||Qc!==null)&&(J3(),W3())}}function fh(i,e){var t=i.stateNode;if(t===null)return null;var n=Kg(t);if(n===null)return null;t=n[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":(n=!n.disabled)||(i=i.type,n=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!n;break e;default:i=!1}if(i)return null;if(t&&typeof t!="function")throw Error(Ge(231,e,typeof t));return t}var Wy=!1;if(jo)try{var ud={};Object.defineProperty(ud,"passive",{get:function(){Wy=!0}}),window.addEventListener("test",ud,ud),window.removeEventListener("test",ud,ud)}catch{Wy=!1}function ZF(i,e,t,n,r,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(t,u)}catch(f){this.onError(f)}}var Jd=!1,ag=null,lg=!1,Xy=null,$F={onError:function(i){Jd=!0,ag=i}};function eL(i,e,t,n,r,s,o,a,l){Jd=!1,ag=null,ZF.apply($F,arguments)}function tL(i,e,t,n,r,s,o,a,l){if(eL.apply(this,arguments),Jd){if(Jd){var u=ag;Jd=!1,ag=null}else throw Error(Ge(198));lg||(lg=!0,Xy=u)}}function Fu(i){var e=i,t=i;if(i.alternate)for(;e.return;)e=e.return;else{i=e;do e=i,(e.flags&4098)!==0&&(t=e.return),i=e.return;while(i)}return e.tag===3?t:null}function Y3(i){if(i.tag===13){var e=i.memoizedState;if(e===null&&(i=i.alternate,i!==null&&(e=i.memoizedState)),e!==null)return e.dehydrated}return null}function DM(i){if(Fu(i)!==i)throw Error(Ge(188))}function nL(i){var e=i.alternate;if(!e){if(e=Fu(i),e===null)throw Error(Ge(188));return e!==i?null:i}for(var t=i,n=e;;){var r=t.return;if(r===null)break;var s=r.alternate;if(s===null){if(n=r.return,n!==null){t=n;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===t)return DM(r),i;if(s===n)return DM(r),e;s=s.sibling}throw Error(Ge(188))}if(t.return!==n.return)t=r,n=s;else{for(var o=!1,a=r.child;a;){if(a===t){o=!0,t=r,n=s;break}if(a===n){o=!0,n=r,t=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===t){o=!0,t=s,n=r;break}if(a===n){o=!0,n=s,t=r;break}a=a.sibling}if(!o)throw Error(Ge(189))}}if(t.alternate!==n)throw Error(Ge(190))}if(t.tag!==3)throw Error(Ge(188));return t.stateNode.current===t?i:e}function K3(i){return i=nL(i),i!==null?Q3(i):null}function Q3(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var e=Q3(i);if(e!==null)return e;i=i.sibling}return null}var q3=Jr.unstable_scheduleCallback,FM=Jr.unstable_cancelCallback,iL=Jr.unstable_shouldYield,rL=Jr.unstable_requestPaint,Yn=Jr.unstable_now,sL=Jr.unstable_getCurrentPriorityLevel,WA=Jr.unstable_ImmediatePriority,Z3=Jr.unstable_UserBlockingPriority,ug=Jr.unstable_NormalPriority,oL=Jr.unstable_LowPriority,$3=Jr.unstable_IdlePriority,Xg=null,co=null;function aL(i){if(co&&typeof co.onCommitFiberRoot=="function")try{co.onCommitFiberRoot(Xg,i,void 0,(i.current.flags&128)===128)}catch{}}var Us=Math.clz32?Math.clz32:cL,lL=Math.log,uL=Math.LN2;function cL(i){return i>>>=0,i===0?32:31-(lL(i)/uL|0)|0}var hm=64,pm=4194304;function zd(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function cg(i,e){var t=i.pendingLanes;if(t===0)return 0;var n=0,r=i.suspendedLanes,s=i.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?n=zd(a):(s&=o,s!==0&&(n=zd(s)))}else o=t&~r,o!==0?n=zd(o):s!==0&&(n=zd(s));if(n===0)return 0;if(e!==0&&e!==n&&(e&r)===0&&(r=n&-n,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if((n&4)!==0&&(n|=t&16),e=i.entangledLanes,e!==0)for(i=i.entanglements,e&=n;0<e;)t=31-Us(e),r=1<<t,n|=i[t],e&=~r;return n}function fL(i,e){switch(i){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 dL(i,e){for(var t=i.suspendedLanes,n=i.pingedLanes,r=i.expirationTimes,s=i.pendingLanes;0<s;){var o=31-Us(s),a=1<<o,l=r[o];l===-1?((a&t)===0||(a&n)!==0)&&(r[o]=fL(a,e)):l<=e&&(i.expiredLanes|=a),s&=~a}}function Jy(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function eR(){var i=hm;return hm<<=1,(hm&4194240)===0&&(hm=64),i}function j_(i){for(var e=[],t=0;31>t;t++)e.push(i);return e}function qh(i,e,t){i.pendingLanes|=e,e!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,e=31-Us(e),i[e]=t}function hL(i,e){var t=i.pendingLanes&~e;i.pendingLanes=e,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=e,i.mutableReadLanes&=e,i.entangledLanes&=e,e=i.entanglements;var n=i.eventTimes;for(i=i.expirationTimes;0<t;){var r=31-Us(t),s=1<<r;e[r]=0,n[r]=-1,i[r]=-1,t&=~s}}function XA(i,e){var t=i.entangledLanes|=e;for(i=i.entanglements;t;){var n=31-Us(t),r=1<<n;r&e|i[n]&e&&(i[n]|=e),t&=~r}}var fn=0;function tR(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var nR,JA,iR,rR,sR,jy=!1,mm=[],Oa=null,Ua=null,za=null,dh=new Map,hh=new Map,Ta=[],pL="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 LM(i,e){switch(i){case"focusin":case"focusout":Oa=null;break;case"dragenter":case"dragleave":Ua=null;break;case"mouseover":case"mouseout":za=null;break;case"pointerover":case"pointerout":dh.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":hh.delete(e.pointerId)}}function cd(i,e,t,n,r,s){return i===null||i.nativeEvent!==s?(i={blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:s,targetContainers:[r]},e!==null&&(e=$h(e),e!==null&&JA(e)),i):(i.eventSystemFlags|=n,e=i.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),i)}function mL(i,e,t,n,r){switch(e){case"focusin":return Oa=cd(Oa,i,e,t,n,r),!0;case"dragenter":return Ua=cd(Ua,i,e,t,n,r),!0;case"mouseover":return za=cd(za,i,e,t,n,r),!0;case"pointerover":var s=r.pointerId;return dh.set(s,cd(dh.get(s)||null,i,e,t,n,r)),!0;case"gotpointercapture":return s=r.pointerId,hh.set(s,cd(hh.get(s)||null,i,e,t,n,r)),!0}return!1}function oR(i){var e=jl(i.target);if(e!==null){var t=Fu(e);if(t!==null){if(e=t.tag,e===13){if(e=Y3(t),e!==null){i.blockedOn=e,sR(i.priority,function(){iR(t)});return}}else if(e===3&&t.stateNode.current.memoizedState.isDehydrated){i.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}i.blockedOn=null}function z0(i){if(i.blockedOn!==null)return!1;for(var e=i.targetContainers;0<e.length;){var t=Yy(i.domEventName,i.eventSystemFlags,e[0],i.nativeEvent);if(t===null){t=i.nativeEvent;var n=new t.constructor(t.type,t);Hy=n,t.target.dispatchEvent(n),Hy=null}else return e=$h(t),e!==null&&JA(e),i.blockedOn=t,!1;e.shift()}return!0}function NM(i,e,t){z0(i)&&t.delete(e)}function gL(){jy=!1,Oa!==null&&z0(Oa)&&(Oa=null),Ua!==null&&z0(Ua)&&(Ua=null),za!==null&&z0(za)&&(za=null),dh.forEach(NM),hh.forEach(NM)}function fd(i,e){i.blockedOn===e&&(i.blockedOn=null,jy||(jy=!0,Jr.unstable_scheduleCallback(Jr.unstable_NormalPriority,gL)))}function ph(i){function e(r){return fd(r,i)}if(0<mm.length){fd(mm[0],i);for(var t=1;t<mm.length;t++){var n=mm[t];n.blockedOn===i&&(n.blockedOn=null)}}for(Oa!==null&&fd(Oa,i),Ua!==null&&fd(Ua,i),za!==null&&fd(za,i),dh.forEach(e),hh.forEach(e),t=0;t<Ta.length;t++)n=Ta[t],n.blockedOn===i&&(n.blockedOn=null);for(;0<Ta.length&&(t=Ta[0],t.blockedOn===null);)oR(t),t.blockedOn===null&&Ta.shift()}var qc=ea.ReactCurrentBatchConfig,fg=!0;function vL(i,e,t,n){var r=fn,s=qc.transition;qc.transition=null;try{fn=1,jA(i,e,t,n)}finally{fn=r,qc.transition=s}}function _L(i,e,t,n){var r=fn,s=qc.transition;qc.transition=null;try{fn=4,jA(i,e,t,n)}finally{fn=r,qc.transition=s}}function jA(i,e,t,n){if(fg){var r=Yy(i,e,t,n);if(r===null)i1(i,e,n,dg,t),LM(i,n);else if(mL(r,i,e,t,n))n.stopPropagation();else if(LM(i,n),e&4&&-1<pL.indexOf(i)){for(;r!==null;){var s=$h(r);if(s!==null&&nR(s),s=Yy(i,e,t,n),s===null&&i1(i,e,n,dg,t),s===r)break;r=s}r!==null&&n.stopPropagation()}else i1(i,e,n,null,t)}}var dg=null;function Yy(i,e,t,n){if(dg=null,i=VA(n),i=jl(i),i!==null)if(e=Fu(i),e===null)i=null;else if(t=e.tag,t===13){if(i=Y3(e),i!==null)return i;i=null}else if(t===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;i=null}else e!==i&&(i=null);return dg=i,null}function aR(i){switch(i){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(sL()){case WA:return 1;case Z3:return 4;case ug:case oL:return 16;case $3:return 536870912;default:return 16}default:return 16}}var Ia=null,YA=null,k0=null;function lR(){if(k0)return k0;var i,e=YA,t=e.length,n,r="value"in Ia?Ia.value:Ia.textContent,s=r.length;for(i=0;i<t&&e[i]===r[i];i++);var o=t-i;for(n=1;n<=o&&e[t-n]===r[s-n];n++);return k0=r.slice(i,1<n?1-n:void 0)}function G0(i){var e=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&e===13&&(i=13)):i=e,i===10&&(i=13),32<=i||i===13?i:0}function gm(){return!0}function OM(){return!1}function qr(i){function e(t,n,r,s,o){this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in i)i.hasOwnProperty(a)&&(t=i[a],this[a]=t?t(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?gm:OM,this.isPropagationStopped=OM,this}return Un(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=gm)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=gm)},persist:function(){},isPersistent:gm}),e}var bf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},KA=qr(bf),Zh=Un({},bf,{view:0,detail:0}),yL=qr(Zh),Y_,K_,dd,Jg=Un({},Zh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:QA,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==dd&&(dd&&i.type==="mousemove"?(Y_=i.screenX-dd.screenX,K_=i.screenY-dd.screenY):K_=Y_=0,dd=i),Y_)},movementY:function(i){return"movementY"in i?i.movementY:K_}}),UM=qr(Jg),xL=Un({},Jg,{dataTransfer:0}),AL=qr(xL),SL=Un({},Zh,{relatedTarget:0}),Q_=qr(SL),EL=Un({},bf,{animationName:0,elapsedTime:0,pseudoElement:0}),wL=qr(EL),ML=Un({},bf,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),CL=qr(ML),TL=Un({},bf,{data:0}),zM=qr(TL),RL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PL={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"},bL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IL(i){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(i):(i=bL[i])?!!e[i]:!1}function QA(){return IL}var BL=Un({},Zh,{key:function(i){if(i.key){var e=RL[i.key]||i.key;if(e!=="Unidentified")return e}
vendor: 5,728 bytes, line 29
29return i.type==="keypress"?(i=G0(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?PL[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:QA,charCode:function(i){return i.type==="keypress"?G0(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?G0(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),DL=qr(BL),FL=Un({},Jg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kM=qr(FL),LL=Un({},Zh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:QA}),NL=qr(LL),OL=Un({},bf,{propertyName:0,elapsedTime:0,pseudoElement:0}),UL=qr(OL),zL=Un({},Jg,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),kL=qr(zL),GL=[9,13,27,32],qA=jo&&"CompositionEvent"in window,jd=null;jo&&"documentMode"in document&&(jd=document.documentMode);var HL=jo&&"TextEvent"in window&&!jd,uR=jo&&(!qA||jd&&8<jd&&11>=jd),GM=String.fromCharCode(32),HM=!1;function cR(i,e){switch(i){case"keyup":return GL.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fR(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Bc=!1;function VL(i,e){switch(i){case"compositionend":return fR(e);case"keypress":return e.which!==32?null:(HM=!0,GM);case"textInput":return i=e.data,i===GM&&HM?null:i;default:return null}}function WL(i,e){if(Bc)return i==="compositionend"||!qA&&cR(i,e)?(i=lR(),k0=YA=Ia=null,Bc=!1,i):null;switch(i){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 uR&&e.locale!=="ko"?null:e.data;default:return null}}var XL={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 VM(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e==="input"?!!XL[i.type]:e==="textarea"}function dR(i,e,t,n){V3(n),e=hg(e,"onChange"),0<e.length&&(t=new KA("onChange","change",null,t,n),i.push({event:t,listeners:e}))}var Yd=null,mh=null;function JL(i){ER(i,0)}function jg(i){var e=Lc(i);if(N3(e))return i}function jL(i,e){if(i==="change")return e}var hR=!1;if(jo){var q_;if(jo){var Z_="oninput"in document;if(!Z_){var WM=document.createElement("div");WM.setAttribute("oninput","return;"),Z_=typeof WM.oninput=="function"}q_=Z_}else q_=!1;hR=q_&&(!document.documentMode||9<document.documentMode)}function XM(){Yd&&(Yd.detachEvent("onpropertychange",pR),mh=Yd=null)}function pR(i){if(i.propertyName==="value"&&jg(mh)){var e=[];dR(e,mh,i,VA(i)),j3(JL,e)}}function YL(i,e,t){i==="focusin"?(XM(),Yd=e,mh=t,Yd.attachEvent("onpropertychange",pR)):i==="focusout"&&XM()}function KL(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return jg(mh)}function QL(i,e){if(i==="click")return jg(e)}function qL(i,e){if(i==="input"||i==="change")return jg(e)}function ZL(i,e){return i===e&&(i!==0||1/i===1/e)||i!==i&&e!==e}var ks=typeof Object.is=="function"?Object.is:ZL;function gh(i,e){if(ks(i,e))return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;var t=Object.keys(i),n=Object.keys(e);if(t.length!==n.length)return!1;for(n=0;n<t.length;n++){var r=t[n];if(!by.call(e,r)||!ks(i[r],e[r]))return!1}return!0}function JM(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function jM(i,e){var t=JM(i);i=0;for(var n;t;){if(t.nodeType===3){if(n=i+t.textContent.length,i<=e&&n>=e)return{node:t,offset:e-i};i=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=JM(t)}}function mR(i,e){return i&&e?i===e?!0:i&&i.nodeType===3?!1:e&&e.nodeType===3?mR(i,e.parentNode):"contains"in i?i.contains(e):i.compareDocumentPosition?!!(i.compareDocumentPosition(e)&16):!1:!1}function gR(){for(var i=window,e=og();e instanceof i.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)i=e.contentWindow;else break;e=og(i.document)}return e}function ZA(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e&&(e==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||e==="textarea"||i.contentEditable==="true")}function $L(i){var e=gR(),t=i.focusedElem,n=i.selectionRange;if(e!==t&&t&&t.ownerDocument&&mR(t.ownerDocument.documentElement,t)){if(n!==null&&ZA(t)){if(e=n.start,i=n.end,i===void 0&&(i=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(i,t.value.length);else if(i=(e=t.ownerDocument||document)&&e.defaultView||window,i.getSelection){i=i.getSelection();var r=t.textContent.length,s=Math.min(n.start,r);n=n.end===void 0?s:Math.min(n.end,r),!i.extend&&s>n&&(r=n,n=s,s=r),r=jM(t,s);var o=jM(t,n);r&&o&&(i.rangeCount!==1||i.anchorNode!==r.node||i.anchorOffset!==r.offset||i.focusNode!==o.node||i.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),i.removeAllRanges(),s>n?(i.addRange(e),i.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),i.addRange(e)))}}for(e=[],i=t;i=i.parentNode;)i.nodeType===1&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)i=e[t],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var eN=jo&&"documentMode"in document&&11>=document.documentMode,Dc=null,Ky=null,Kd=null,Qy=!1;
vendor: 4,120 bytes, line 29
29function YM(i,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Qy||Dc==null||Dc!==og(n)||(n=Dc,"selectionStart"in n&&ZA(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Kd&&gh(Kd,n)||(Kd=n,n=hg(Ky,"onSelect"),0<n.length&&(e=new KA("onSelect","select",null,e,t),i.push({event:e,listeners:n}),e.target=Dc)))}function vm(i,e){var t={};return t[i.toLowerCase()]=e.toLowerCase(),t["Webkit"+i]="webkit"+e,t["Moz"+i]="moz"+e,t}var Fc={animationend:vm("Animation","AnimationEnd"),animationiteration:vm("Animation","AnimationIteration"),animationstart:vm("Animation","AnimationStart"),transitionend:vm("Transition","TransitionEnd")},$_={},vR={};jo&&(vR=document.createElement("div").style,"AnimationEvent"in window||(delete Fc.animationend.animation,delete Fc.animationiteration.animation,delete Fc.animationstart.animation),"TransitionEvent"in window||delete Fc.transitionend.transition);function Yg(i){if($_[i])return $_[i];if(!Fc[i])return i;var e=Fc[i],t;for(t in e)if(e.hasOwnProperty(t)&&t in vR)return $_[i]=e[t];return i}var _R=Yg("animationend"),yR=Yg("animationiteration"),xR=Yg("animationstart"),AR=Yg("transitionend"),SR=new Map,KM="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 sl(i,e){SR.set(i,e),Du(e,[i])}for(var e1=0;e1<KM.length;e1++){var t1=KM[e1],tN=t1.toLowerCase(),nN=t1[0].toUpperCase()+t1.slice(1);sl(tN,"on"+nN)}sl(_R,"onAnimationEnd");sl(yR,"onAnimationIteration");sl(xR,"onAnimationStart");sl("dblclick","onDoubleClick");sl("focusin","onFocus");sl("focusout","onBlur");sl(AR,"onTransitionEnd");af("onMouseEnter",["mouseout","mouseover"]);af("onMouseLeave",["mouseout","mouseover"]);af("onPointerEnter",["pointerout","pointerover"]);af("onPointerLeave",["pointerout","pointerover"]);Du("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Du("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Du("onBeforeInput",["compositionend","keypress","textInput","paste"]);Du("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Du("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Du("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kd="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(" "),iN=new Set("cancel close invalid load scroll toggle".split(" ").concat(kd));function QM(i,e,t){var n=i.type||"unknown-event";i.currentTarget=t,tL(n,e,void 0,i),i.currentTarget=null}function ER(i,e){e=(e&4)!==0;for(var t=0;t<i.length;t++){var n=i[t],r=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break e;QM(r,a,u),s=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break e;QM(r,a,u),s=l}}}if(lg)throw i=Xy,lg=!1,Xy=null,i}function An(i,e){var t=e[tx];t===void 0&&(t=e[tx]=new Set);var n=i+"__bubble";t.has(n)||(wR(e,i,2,!1),t.add(n))}function n1(i,e,t){var n=0;e&&(n|=4),wR(t,i,n,e)}var _m="_reactListening"+Math.random().toString(36).slice(2);
vendor: 9,303 bytes, lines 29-30
29function vh(i){if(!i[_m]){i[_m]=!0,I3.forEach(function(t){t!=="selectionchange"&&(iN.has(t)||n1(t,!1,i),n1(t,!0,i))});var e=i.nodeType===9?i:i.ownerDocument;e===null||e[_m]||(e[_m]=!0,n1("selectionchange",!1,e))}}function wR(i,e,t,n){switch(aR(e)){case 1:var r=vL;break;case 4:r=_L;break;default:r=jA}t=r.bind(null,e,t,i),r=void 0,!Wy||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),n?r!==void 0?i.addEventListener(e,t,{capture:!0,passive:r}):i.addEventListener(e,t,!0):r!==void 0?i.addEventListener(e,t,{passive:r}):i.addEventListener(e,t,!1)}function i1(i,e,t,n,r){var s=n;if((e&1)===0&&(e&2)===0&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===r||a.nodeType===8&&a.parentNode===r)break;if(o===4)for(o=n.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=jl(a),o===null)return;if(l=o.tag,l===5||l===6){n=s=o;continue e}a=a.parentNode}}n=n.return}j3(function(){var u=s,f=VA(t),h=[];e:{var p=SR.get(i);if(p!==void 0){var m=KA,v=i;switch(i){case"keypress":if(G0(t)===0)break e;case"keydown":case"keyup":m=DL;break;case"focusin":v="focus",m=Q_;break;case"focusout":v="blur",m=Q_;break;case"beforeblur":case"afterblur":m=Q_;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=UM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=AL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=NL;break;case _R:case yR:case xR:m=wL;break;case AR:m=UL;break;case"scroll":m=yL;break;case"wheel":m=kL;break;case"copy":case"cut":case"paste":m=CL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=kM}var _=(e&4)!==0,y=!_&&i==="scroll",g=_?p!==null?p+"Capture":null:p;_=[];for(var A=u,S;A!==null;){S=A;var w=S.stateNode;if(S.tag===5&&w!==null&&(S=w,g!==null&&(w=fh(A,g),w!=null&&_.push(_h(A,w,S)))),y)break;A=A.return}0<_.length&&(p=new m(p,v,null,t,f),h.push({event:p,listeners:_}))}}if((e&7)===0){e:{if(p=i==="mouseover"||i==="pointerover",m=i==="mouseout"||i==="pointerout",p&&t!==Hy&&(v=t.relatedTarget||t.fromElement)&&(jl(v)||v[Yo]))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=u,v=v?jl(v):null,v!==null&&(y=Fu(v),v!==y||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=u),m!==v)){if(_=UM,w="onMouseLeave",g="onMouseEnter",A="mouse",(i==="pointerout"||i==="pointerover")&&(_=kM,w="onPointerLeave",g="onPointerEnter",A="pointer"),y=m==null?p:Lc(m),S=v==null?p:Lc(v),p=new _(w,A+"leave",m,t,f),p.target=y,p.relatedTarget=S,w=null,jl(f)===u&&(_=new _(g,A+"enter",v,t,f),_.target=S,_.relatedTarget=y,w=_),y=w,m&&v)t:{for(_=m,g=v,A=0,S=_;S;S=tc(S))A++;for(S=0,w=g;w;w=tc(w))S++;for(;0<A-S;)_=tc(_),A--;for(;0<S-A;)g=tc(g),S--;for(;A--;){if(_===g||g!==null&&_===g.alternate)break t;_=tc(_),g=tc(g)}_=null}else _=null;m!==null&&qM(h,p,m,_,!1),v!==null&&y!==null&&qM(h,y,v,_,!0)}}e:{if(p=u?Lc(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var P=jL;else if(VM(p))if(hR)P=qL;else{P=KL;var T=YL}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(P=QL);if(P&&(P=P(i,u))){dR(h,P,t,f);break e}T&&T(i,p,u),i==="focusout"&&(T=p._wrapperState)&&T.controlled&&p.type==="number"&&Oy(p,"number",p.value)}switch(T=u?Lc(u):window,i){case"focusin":(VM(T)||T.contentEditable==="true")&&(Dc=T,Ky=u,Kd=null);break;case"focusout":Kd=Ky=Dc=null;break;case"mousedown":Qy=!0;break;case"contextmenu":case"mouseup":case"dragend":Qy=!1,YM(h,t,f);break;case"selectionchange":if(eN)break;case"keydown":case"keyup":YM(h,t,f)}var I;if(qA)e:{switch(i){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Bc?cR(i,t)&&(D="onCompositionEnd"):i==="keydown"&&t.keyCode===229&&(D="onCompositionStart");D&&(uR&&t.locale!=="ko"&&(Bc||D!=="onCompositionStart"?D==="onCompositionEnd"&&Bc&&(I=lR()):(Ia=f,YA="value"in Ia?Ia.value:Ia.textContent,Bc=!0)),T=hg(u,D),0<T.length&&(D=new zM(D,i,null,t,f),h.push({event:D,listeners:T}),I?D.data=I:(I=fR(t),I!==null&&(D.data=I)))),(I=HL?VL(i,t):WL(i,t))&&(u=hg(u,"onBeforeInput"),0<u.length&&(f=new zM("onBeforeInput","beforeinput",null,t,f),h.push({event:f,listeners:u}),f.data=I))}ER(h,e)})}function _h(i,e,t){return{instance:i,listener:e,currentTarget:t}}function hg(i,e){for(var t=e+"Capture",n=[];i!==null;){var r=i,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=fh(i,t),s!=null&&n.unshift(_h(i,s,r)),s=fh(i,e),s!=null&&n.push(_h(i,s,r))),i=i.return}return n}function tc(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function qM(i,e,t,n,r){for(var s=e._reactName,o=[];t!==null&&t!==n;){var a=t,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,r?(l=fh(t,s),l!=null&&o.unshift(_h(t,l,a))):r||(l=fh(t,s),l!=null&&o.push(_h(t,l,a)))),t=t.return}o.length!==0&&i.push({event:e,listeners:o})}var rN=/\r\n?/g,sN=/\u0000|\uFFFD/g;function ZM(i){return(typeof i=="string"?i:""+i).replace(rN,` 30`).replace(sN,"")}function ym(i,e,t){if(e=ZM(e),ZM(i)!==e&&t)throw Error(Ge(425))}function pg(){}var qy=null,Zy=null;function $y(i,e){return i==="textarea"||i==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var ex=typeof setTimeout=="function"?setTimeout:void 0,oN=typeof clearTimeout=="function"?clearTimeout:void 0,$M=typeof Promise=="function"?Promise:void 0,aN=typeof queueMicrotask=="function"?queueMicrotask:typeof $M<"u"?function(i){return $M.resolve(null).then(i).catch(lN)}:ex;function lN(i){setTimeout(function(){throw i})}function r1(i,e){var t=e,n=0;do{var r=t.nextSibling;if(i.removeChild(t),r&&r.nodeType===8)if(t=r.data,t==="/$"){if(n===0){i.removeChild(r),ph(e);return}n--}else t!=="$"&&t!=="$?"&&t!=="$!"||n++;t=r}while(t);ph(e)}function ka(i){for(;i!=null;i=i.nextSibling){var e=i.nodeType;if(e===1||e===3)break;if(e===8){if(e=i.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return i}function eC(i){i=i.previousSibling;for(var e=0;i;){if(i.nodeType===8){var t=i.data;if(t==="$"||t==="$!"||t==="$?"){if(e===0)return i;e--}else t==="/$"&&e++}i=i.previousSibling}return null}var If=Math.random().toString(36).slice(2),so="__reactFiber$"+If,yh="__reactProps$"+If,Yo="__reactContainer$"+If,tx="__reactEvents$"+If,uN="__reactListeners$"+If,cN="__reactHandles$"+If;function jl(i){var e=i[so];if(e)return e;for(var t=i.parentNode;t;){if(e=t[Yo]||t[so]){if(t=e.alternate,e.child!==null||t!==null&&t.child!==null)for(i=eC(i);i!==null;){if(t=i[so])return t;i=eC(i)}return e}i=t,t=i.parentNode}return null}function $h(i){return i=i[so]||i[Yo],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Lc(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(Ge(33))}function Kg(i){return i[yh]||null}var nx=[],Nc=-1;function ol(i){return{current:i}}function wn(i){0>Nc||(i.current=nx[Nc],nx[Nc]=null,Nc--)}function xn(i,e){Nc++,nx[Nc]=i.current,i.current=e}var qa={},Qi=ol(qa),xr=ol(!1),gu=qa;function lf(i,e){var t=i.type.contextTypes;if(!t)return qa;var n=i.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return n&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=e,i.__reactInternalMemoizedMaskedChildContext=r),r}function Ar(i){return i=i.childContextTypes,i!=null}function mg(){wn(xr),wn(Qi)}function tC(i,e,t){if(Qi.current!==qa)throw Error(Ge(168));xn(Qi,e),xn(xr,t)}function MR(i,e,t){var n=i.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var r in n)if(!(r in e))throw Error(Ge(108,YF(i)||"Unknown",r));return Un({},t,n)}function gg(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||qa,gu=Qi.current,xn(Qi,i),xn(xr,xr.current),!0}function nC(i,e,t){var n=i.stateNode;if(!n)throw Error(Ge(169));t?(i=MR(i,e,gu),n.__reactInternalMemoizedMergedChildContext=i,wn(xr),wn(Qi),xn(Qi,i)):wn(xr),xn(xr,t)}var Oo=null,Qg=!1,s1=!1;function CR(i){Oo===null?Oo=[i]:Oo.push(i)}function fN(i){Qg=!0,CR(i)}function al(){if(!s1&&Oo!==null){s1=!0;var i=0,e=fn;try{var t=Oo;for(fn=1;i<t.length;i++){var n=t[i];do n=n(!0);while(n!==null)}Oo=null,Qg=!1}catch(r){throw Oo!==null&&(Oo=Oo.slice(i+1)),q3(WA,al),r}finally{fn=e,s1=!1}}return null}var Oc=[],Uc=0,vg=null,_g=0,us=[],cs=0,vu=null,Go=1,Ho="";function Gl(i,e){Oc[Uc++]=_g,Oc[Uc++]=vg,vg=i,_g=e}function TR(i,e,t){us[cs++]=Go,us[cs++]=Ho,us[cs++]=vu,vu=i;var n=Go;i=Ho;var r=32-Us(n)-1;n&=~(1<<r),t+=1;var s=32-Us(e)+r;if(30<s){var o=r-r%5;s=(n&(1<<o)-1).toString(32),n>>=o,r-=o,Go=1<<32-Us(e)+r|t<<r|n,Ho=s+i}else Go=1<<s|t<<r|n,Ho=i}function $A(i){i.return!==null&&(Gl(i,1),TR(i,1,0))}function eS(i){for(;i===vg;)vg=Oc[--Uc],Oc[Uc]=null,_g=Oc[--Uc],Oc[Uc]=null;for(;i===vu;
vendor: 7,123 bytes, line 30
30)vu=us[--cs],us[cs]=null,Ho=us[--cs],us[cs]=null,Go=us[--cs],us[cs]=null}var Vr=null,Gr=null,Rn=!1,Ns=null;function RR(i,e){var t=hs(5,null,null,0);t.elementType="DELETED",t.stateNode=e,t.return=i,e=i.deletions,e===null?(i.deletions=[t],i.flags|=16):e.push(t)}function iC(i,e){switch(i.tag){case 5:var t=i.type;return e=e.nodeType!==1||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(i.stateNode=e,Vr=i,Gr=ka(e.firstChild),!0):!1;case 6:return e=i.pendingProps===""||e.nodeType!==3?null:e,e!==null?(i.stateNode=e,Vr=i,Gr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(t=vu!==null?{id:Go,overflow:Ho}:null,i.memoizedState={dehydrated:e,treeContext:t,retryLane:1073741824},t=hs(18,null,null,0),t.stateNode=e,t.return=i,i.child=t,Vr=i,Gr=null,!0):!1;default:return!1}}function ix(i){return(i.mode&1)!==0&&(i.flags&128)===0}function rx(i){if(Rn){var e=Gr;if(e){var t=e;if(!iC(i,e)){if(ix(i))throw Error(Ge(418));e=ka(t.nextSibling);var n=Vr;e&&iC(i,e)?RR(n,t):(i.flags=i.flags&-4097|2,Rn=!1,Vr=i)}}else{if(ix(i))throw Error(Ge(418));i.flags=i.flags&-4097|2,Rn=!1,Vr=i}}}function rC(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Vr=i}function xm(i){if(i!==Vr)return!1;if(!Rn)return rC(i),Rn=!0,!1;var e;if((e=i.tag!==3)&&!(e=i.tag!==5)&&(e=i.type,e=e!=="head"&&e!=="body"&&!$y(i.type,i.memoizedProps)),e&&(e=Gr)){if(ix(i))throw PR(),Error(Ge(418));for(;e;)RR(i,e),e=ka(e.nextSibling)}if(rC(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ge(317));e:{for(i=i.nextSibling,e=0;i;){if(i.nodeType===8){var t=i.data;if(t==="/$"){if(e===0){Gr=ka(i.nextSibling);break e}e--}else t!=="$"&&t!=="$!"&&t!=="$?"||e++}i=i.nextSibling}Gr=null}}else Gr=Vr?ka(i.stateNode.nextSibling):null;return!0}function PR(){for(var i=Gr;i;)i=ka(i.nextSibling)}function uf(){Gr=Vr=null,Rn=!1}function tS(i){Ns===null?Ns=[i]:Ns.push(i)}var dN=ea.ReactCurrentBatchConfig;function hd(i,e,t){if(i=t.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(Ge(309));var n=t.stateNode}if(!n)throw Error(Ge(147,i));var r=n,s=""+i;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 i!="string")throw Error(Ge(284));if(!t._owner)throw Error(Ge(290,i))}return i}function Am(i,e){throw i=Object.prototype.toString.call(e),Error(Ge(31,i==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":i))}function sC(i){var e=i._init;return e(i._payload)}function bR(i){function e(g,A){if(i){var S=g.deletions;S===null?(g.deletions=[A],g.flags|=16):S.push(A)}}function t(g,A){if(!i)return null;for(;A!==null;)e(g,A),A=A.sibling;return null}function n(g,A){for(g=new Map;A!==null;)A.key!==null?g.set(A.key,A):g.set(A.index,A),A=A.sibling;return g}function r(g,A){return g=Wa(g,A),g.index=0,g.sibling=null,g}function s(g,A,S){return g.index=S,i?(S=g.alternate,S!==null?(S=S.index,S<A?(g.flags|=2,A):S):(g.flags|=2,A)):(g.flags|=1048576,A)}function o(g){return i&&g.alternate===null&&(g.flags|=2),g}function a(g,A,S,w){return A===null||A.tag!==6?(A=d1(S,g.mode,w),A.return=g,A):(A=r(A,S),A.return=g,A)}function l(g,A,S,w){var P=S.type;return P===Ic?f(g,A,S.props.children,w,S.key):A!==null&&(A.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Ea&&sC(P)===A.type)?(w=r(A,S.props),w.ref=hd(g,A,S),w.return=g,w):(w=Y0(S.type,S.key,S.props,null,g.mode,w),w.ref=hd(g,A,S),w.return=g,w)}function u(g,A,S,w){return A===null||A.tag!==4||A.stateNode.containerInfo!==S.containerInfo||A.stateNode.implementation!==S.implementation?(A=h1(S,g.mode,w),A.return=g,A):(A=r(A,S.children||[]),A.return=g,A)}function f(g,A,S,w,P){return A===null||A.tag!==7?(A=au(S,g.mode,w,P),A.return=g,A):(A=r(A,S),A.return=g,A)}function h(g,A,S){if(typeof A=="string"&&A!==""||typeof A=="number")return A=d1(""+A,g.mode,S),A.return=g,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case cm:return S=Y0(A.type,A.key,A.props,null,g.mode,S),S.ref=hd(g,null,A),S.return=g,S;case bc:return A=h1(A,g.mode,S),A.return=g,A;case Ea:var w=A._init;return h(g,w(A._payload),S)}if(Ud(A)||ld(A))return A=au(A,g.mode,S,null),A.return=g,A;Am(g,A)}return null}function p(g,A,S,w){var P=A!==null?A.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return P!==null?null:a(g,A,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case cm:return S.key===P?l(g,A,S,w):null;case bc:return S.key===P?u(g,A,S,w):null;case Ea:return P=S._init,p(g,A,P(S._payload),w)}if(Ud(S)||ld(S))return P!==null?null:f(g,A,S,w,null);Am(g,S)}return null}function m(g,A,S,w,P){if(typeof w=="string"&&w!==""||typeof w=="number")return g=g.get(S)||null,a(A,g,""+w,P);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case cm:return g=g.get(w.key===null?S:w.key)||null,l(A,g,w,P);case bc:return g=g.get(w.key===null?S:w.key)||null,u(A,g,w,P);case Ea:var T=w._init;return m(g,A,S,T(w._payload),P)}if(Ud(w)||ld(w))return g=g.get(S)||null,f(A,g,w,P,null);Am(A,w)}return null}function v(g,A,S,w){for(var P=null,T=null,I=A,D=A=0,C=null;I!==null&&D<S.length;D++){I.index>D?(C=I,I=null):C=I.sibling;var b=p(g,I,S[D],w);if(b===null){I===null&&(I=C);break}i&&I&&b.alternate===null&&e(g,I),A=s(b,A,D),T===null?P=b:T.sibling=b,T=b,I=C}if(D===S.length)return t(g,I),Rn&&Gl(g,D),P;if(I===null){for(;D<S.length;D++)I=h(g,S[D],w),I!==null&&(A=s(I,A,D),T===null?P=I:T.sibling=I,T=I);return Rn&&Gl(g,D),P}for(I=n(g,I);D<S.length;D++)C=m(I,g,D,S[D],w),C!==null&&(i&&C.alternate!==null&&I.delete(C.key===null?D:C.key),A=s(C,A,D),T===null?P=C:T.sibling=C,T=C);return i&&I.forEach(function(N){return e(g,N)}),Rn&&Gl(g,D),P}function _(g,A,S,w){var P=ld(S);if(typeof P!="function")throw Error(Ge(150));if(S=P.call(S),S==null)throw Error(Ge(151));for(var T=P=null,I=A,D=A=0,C=null,b=S.next();I!==null&&!b.done;D++,b=S.next()){I.index>D?(C=I,I=null):C=I.sibling;var N=p(g,I,b.value,w);if(N===null){I===null&&(I=C);break}i&&I&&N.alternate===null&&e(g,I),A=s(N,A,D),T===null?P=N:T.sibling=N,T=N,I=C}if(b.done)return t(g,I),Rn&&Gl(g,D),P;if(I===null){for(;!b.done;D++,b=S.next())b=h(g,b.value,w),b!==null&&(A=s(b,A,D),T===null?P=b:T.sibling=b,T=b);return Rn&&Gl(g,D),P}for(I=n(g,I);!b.done;D++,b=S.next())b=m(I,g,D,b.value,w),b!==null&&(i&&b.alternate!==null&&I.delete(b.key===null?D:b.key),A=s(b,A,D),T===null?P=b:T.sibling=b,T=b);return i&&I.forEach(function(j){return e(g,j)}),Rn&&Gl(g,D),P}function y(g,A,S,w){if(typeof S=="object"&&S!==null&&S.type===Ic&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case cm:e:{for(var P=S.key,T=A;T!==null;){if(T.key===P){if(P=S.type,P===Ic){if(T.tag===7){t(g,T.sibling),A=r(T,S.props.children),A.return=g,g=A;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Ea&&sC(P)===T.type){t(g,T.sibling),A=r(T,S.props),A.ref=hd(g,T,S),A.return=g,g=A;break e}t(g,T);break}else e(g,T);T=T.sibling}S.type===Ic?(A=au(S.props.children,g.mode,w,S.key),A.return=g,g=A):(w=Y0(S.type,S.key,S.props,null,g.mode,w),w.ref=hd(g,A,S),w.return=g,g=w)}return o(g);case bc:e:{for(T=S.key;A!==null;
vendor: 4,733 bytes, line 30
30){if(A.key===T)if(A.tag===4&&A.stateNode.containerInfo===S.containerInfo&&A.stateNode.implementation===S.implementation){t(g,A.sibling),A=r(A,S.children||[]),A.return=g,g=A;break e}else{t(g,A);break}else e(g,A);A=A.sibling}A=h1(S,g.mode,w),A.return=g,g=A}return o(g);case Ea:return T=S._init,y(g,A,T(S._payload),w)}if(Ud(S))return v(g,A,S,w);if(ld(S))return _(g,A,S,w);Am(g,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,A!==null&&A.tag===6?(t(g,A.sibling),A=r(A,S),A.return=g,g=A):(t(g,A),A=d1(S,g.mode,w),A.return=g,g=A),o(g)):t(g,A)}return y}var cf=bR(!0),IR=bR(!1),yg=ol(null),xg=null,zc=null,nS=null;function iS(){nS=zc=xg=null}function rS(i){var e=yg.current;wn(yg),i._currentValue=e}function sx(i,e,t){for(;i!==null;){var n=i.alternate;if((i.childLanes&e)!==e?(i.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),i===t)break;i=i.return}}function Zc(i,e){xg=i,nS=zc=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&e)!==0&&(yr=!0),i.firstContext=null)}function _s(i){var e=i._currentValue;if(nS!==i)if(i={context:i,memoizedValue:e,next:null},zc===null){if(xg===null)throw Error(Ge(308));zc=i,xg.dependencies={lanes:0,firstContext:i}}else zc=zc.next=i;return e}var Yl=null;function sS(i){Yl===null?Yl=[i]:Yl.push(i)}function BR(i,e,t,n){var r=e.interleaved;return r===null?(t.next=t,sS(e)):(t.next=r.next,r.next=t),e.interleaved=t,Ko(i,n)}function Ko(i,e){i.lanes|=e;var t=i.alternate;for(t!==null&&(t.lanes|=e),t=i,i=i.return;i!==null;)i.childLanes|=e,t=i.alternate,t!==null&&(t.childLanes|=e),t=i,i=i.return;return t.tag===3?t.stateNode:null}var wa=!1;function oS(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function DR(i,e){i=i.updateQueue,e.updateQueue===i&&(e.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Xo(i,e){return{eventTime:i,lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(i,e,t){var n=i.updateQueue;if(n===null)return null;if(n=n.shared,(nn&2)!==0){var r=n.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),n.pending=e,Ko(i,t)}return r=n.interleaved,r===null?(e.next=e,sS(n)):(e.next=r.next,r.next=e),n.interleaved=e,Ko(i,t)}function H0(i,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,XA(i,t)}}function oC(i,e){var t=i.updateQueue,n=i.alternate;if(n!==null&&(n=n.updateQueue,t===n)){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:n.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:n.shared,effects:n.effects},i.updateQueue=t;return}i=t.lastBaseUpdate,i===null?t.firstBaseUpdate=e:i.next=e,t.lastBaseUpdate=e}function Ag(i,e,t,n){var r=i.updateQueue;wa=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var f=i.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(s!==null){var h=r.baseState;o=0,f=u=l=null,a=s;do{var p=a.lane,m=a.eventTime;if((n&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=i,_=a;switch(p=e,m=t,_.tag){case 1:if(v=_.payload,typeof v=="function"){h=v.call(m,h,p);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=_.payload,p=typeof v=="function"?v.call(m,h,p):v,p==null)break e;h=Un({},h,p);break e;case 2:wa=!0}}a.callback!==null&&a.lane!==0&&(i.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?(u=f=m,l=h):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(1);if(f===null&&(l=h),r.baseState=l,r.firstBaseUpdate=u,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);yu|=o,i.lanes=o,i.memoizedState=h}}function aC(i,e,t){if(i=e.effects,e.effects=null,i!==null)for(e=0;e<i.length;e++){var n=i[e],r=n.callback;if(r!==null){if(n.callback=null,n=t,typeof r!="function")throw Error(Ge(191,r));r.call(n)}}}var ep={},fo=ol(ep),xh=ol(ep),Ah=ol(ep);function Kl(i){if(i===ep)throw Error(Ge(174));return i}function aS(i,e){switch(xn(Ah,e),xn(xh,i),xn(fo,ep),i=e.nodeType,i){case 9:case 11:e=(e
vendor: 6,449 bytes, line 30
30=e.documentElement)?e.namespaceURI:zy(null,"");break;default:i=i===8?e.parentNode:e,e=i.namespaceURI||null,i=i.tagName,e=zy(e,i)}wn(fo),xn(fo,e)}function ff(){wn(fo),wn(xh),wn(Ah)}function FR(i){Kl(Ah.current);var e=Kl(fo.current),t=zy(e,i.type);e!==t&&(xn(xh,i),xn(fo,t))}function lS(i){xh.current===i&&(wn(fo),wn(xh))}var Bn=ol(0);function Sg(i){for(var e=i;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)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break;for(;e.sibling===null;){if(e.return===null||e.return===i)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var o1=[];function uS(){for(var i=0;i<o1.length;i++)o1[i]._workInProgressVersionPrimary=null;o1.length=0}var V0=ea.ReactCurrentDispatcher,a1=ea.ReactCurrentBatchConfig,_u=0,On=null,si=null,mi=null,Eg=!1,Qd=!1,Sh=0,hN=0;function Ni(){throw Error(Ge(321))}function cS(i,e){if(e===null)return!1;for(var t=0;t<e.length&&t<i.length;t++)if(!ks(i[t],e[t]))return!1;return!0}function fS(i,e,t,n,r,s){if(_u=s,On=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,V0.current=i===null||i.memoizedState===null?vN:_N,i=t(n,r),Qd){s=0;do{if(Qd=!1,Sh=0,25<=s)throw Error(Ge(301));s+=1,mi=si=null,e.updateQueue=null,V0.current=yN,i=t(n,r)}while(Qd)}if(V0.current=wg,e=si!==null&&si.next!==null,_u=0,mi=si=On=null,Eg=!1,e)throw Error(Ge(300));return i}function dS(){var i=Sh!==0;return Sh=0,i}function io(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mi===null?On.memoizedState=mi=i:mi=mi.next=i,mi}function ys(){if(si===null){var i=On.alternate;i=i!==null?i.memoizedState:null}else i=si.next;var e=mi===null?On.memoizedState:mi.next;if(e!==null)mi=e,si=i;else{if(i===null)throw Error(Ge(310));si=i,i={memoizedState:si.memoizedState,baseState:si.baseState,baseQueue:si.baseQueue,queue:si.queue,next:null},mi===null?On.memoizedState=mi=i:mi=mi.next=i}return mi}function Eh(i,e){return typeof e=="function"?e(i):e}function l1(i){var e=ys(),t=e.queue;if(t===null)throw Error(Ge(311));t.lastRenderedReducer=i;var n=si,r=n.baseQueue,s=t.pending;if(s!==null){if(r!==null){var o=r.next;r.next=s.next,s.next=o}n.baseQueue=r=s,t.pending=null}if(r!==null){s=r.next,n=n.baseState;var a=o=null,l=null,u=s;do{var f=u.lane;if((_u&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:i(n,u.action);else{var h={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,o=n):l=l.next=h,On.lanes|=f,yu|=f}u=u.next}while(u!==null&&u!==s);l===null?o=n:l.next=a,ks(n,e.memoizedState)||(yr=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,t.lastRenderedState=n}if(i=t.interleaved,i!==null){r=i;do s=r.lane,On.lanes|=s,yu|=s,r=r.next;while(r!==i)}else r===null&&(t.lanes=0);return[e.memoizedState,t.dispatch]}function u1(i){var e=ys(),t=e.queue;if(t===null)throw Error(Ge(311));t.lastRenderedReducer=i;var n=t.dispatch,r=t.pending,s=e.memoizedState;if(r!==null){t.pending=null;var o=r=r.next;do s=i(s,o.action),o=o.next;while(o!==r);ks(s,e.memoizedState)||(yr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),t.lastRenderedState=s}return[s,n]}function LR(){}function NR(i,e){var t=On,n=ys(),r=e(),s=!ks(n.memoizedState,r);if(s&&(n.memoizedState=r,yr=!0),n=n.queue,hS(zR.bind(null,t,n,i),[i]),n.getSnapshot!==e||s||mi!==null&&mi.memoizedState.tag&1){if(t.flags|=2048,wh(9,UR.bind(null,t,n,r,e),void 0,null),_i===null)throw Error(Ge(349));(_u&30)!==0||OR(t,e,r)}return r}function OR(i,e,t){i.flags|=16384,i={getSnapshot:e,value:t},e=On.updateQueue,e===null?(e={lastEffect:null,stores:null},On.updateQueue=e,e.stores=[i]):(t=e.stores,t===null?e.stores=[i]:t.push(i))}function UR(i,e,t,n){e.value=t,e.getSnapshot=n,kR(e)&&GR(i)}function zR(i,e,t){return t(function(){kR(e)&&GR(i)})}function kR(i){var e=i.getSnapshot;i=i.value;try{var t=e();return!ks(i,t)}catch{return!0}}function GR(i){var e=Ko(i,1);e!==null&&zs(e,i,1,-1)}function lC(i){var e=io();return typeof i=="function"&&(i=i()),e.memoizedState=e.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:i},e.queue=i,i=i.dispatch=gN.bind(null,On,i),[e.memoizedState,i]}function wh(i,e,t,n){return i={tag:i,create:e,destroy:t,deps:n,next:null},e=On.updateQueue,e===null?(e={lastEffect:null,stores:null},On.updateQueue=e,e.lastEffect=i.next=i):(t=e.lastEffect,t===null?e.lastEffect=i.next=i:(n=t.next,t.next=i,i.next=n,e.lastEffect=i)),i}function HR(){return ys().memoizedState}function W0(i,e,t,n){var r=io();On.flags|=i,r.memoizedState=wh(1|e,t,void 0,n===void 0?null:n)}function qg(i,e,t,n){var r=ys();n=n===void 0?null:n;var s=void 0;if(si!==null){var o=si.memoizedState;if(s=o.destroy,n!==null&&cS(n,o.deps)){r.memoizedState=wh(e,t,s,n);return}}On.flags|=i,r.memoizedState=wh(1|e,t,s,n)}function uC(i,e){return W0(8390656,8,i,e)}function hS(i,e){return qg(2048,8,i,e)}function VR(i,e){return qg(4,2,i,e)}function WR(i,e){return qg(4,4,i,e)}function XR(i,e){if(typeof e=="function")return i=i(),e(i),function(){e(null)};if(e!=null)return i=i(),e.current=i,function(){e.current=null}}function JR(i,e,t){return t=t!=null?t.concat([i]):null,qg(4,4,XR.bind(null,e,i),t)}function pS(){}function jR(i,e){var t=ys();e=e===void 0?null:e;var n=t.memoizedState;return n!==null&&e!==null&&cS(e,n[1])?n[0]:(t.memoizedState=[i,e],i)}function YR(i,e){var t=ys();e=e===void 0?null:e;var n=t.memoizedState;return n!==null&&e!==null&&cS(e,n[1])?n[0]:(i=i(),t.memoizedState=[i,e],i)}function KR(i,e,t){return(_u&21)===0?(i.baseState&&(i.baseState=!1,yr=!0),i.memoizedState=t):(ks(t,e)||(t=eR(),On.lanes|=t,yu|=t,i.baseState=!0),e)}function pN(i,e){var t=fn;fn=t!==0&&4>t?t:4,i(!0);var n=a1.transition;a1.transition={};try{i(!1),e()}finally{fn=t,a1.transition=n}}function QR(){return ys().memoizedState}function mN(i,e,t){var n=Va(i);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},qR(i))ZR(e,t);else if(t=BR(i,e,t,n),t!==null){var r=lr();zs(t,i,n,r),$R(t,e,n)}}function gN(i,e,t){var n=Va(i),r={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(qR(i))ZR(e,r);else{var s=i.alternate;if(i.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);
vendor: 8,940 bytes, lines 30-32
30if(r.hasEagerState=!0,r.eagerState=a,ks(a,o)){var l=e.interleaved;l===null?(r.next=r,sS(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=BR(i,e,r,n),t!==null&&(r=lr(),zs(t,i,n,r),$R(t,e,n))}}function qR(i){var e=i.alternate;return i===On||e!==null&&e===On}function ZR(i,e){Qd=Eg=!0;var t=i.pending;t===null?e.next=e:(e.next=t.next,t.next=e),i.pending=e}function $R(i,e,t){if((t&4194240)!==0){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,XA(i,t)}}var wg={readContext:_s,useCallback:Ni,useContext:Ni,useEffect:Ni,useImperativeHandle:Ni,useInsertionEffect:Ni,useLayoutEffect:Ni,useMemo:Ni,useReducer:Ni,useRef:Ni,useState:Ni,useDebugValue:Ni,useDeferredValue:Ni,useTransition:Ni,useMutableSource:Ni,useSyncExternalStore:Ni,useId:Ni,unstable_isNewReconciler:!1},vN={readContext:_s,useCallback:function(i,e){return io().memoizedState=[i,e===void 0?null:e],i},useContext:_s,useEffect:uC,useImperativeHandle:function(i,e,t){return t=t!=null?t.concat([i]):null,W0(4194308,4,XR.bind(null,e,i),t)},useLayoutEffect:function(i,e){return W0(4194308,4,i,e)},useInsertionEffect:function(i,e){return W0(4,2,i,e)},useMemo:function(i,e){var t=io();return e=e===void 0?null:e,i=i(),t.memoizedState=[i,e],i},useReducer:function(i,e,t){var n=io();return e=t!==void 0?t(e):e,n.memoizedState=n.baseState=e,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:e},n.queue=i,i=i.dispatch=mN.bind(null,On,i),[n.memoizedState,i]},useRef:function(i){var e=io();return i={current:i},e.memoizedState=i},useState:lC,useDebugValue:pS,useDeferredValue:function(i){return io().memoizedState=i},useTransition:function(){var i=lC(!1),e=i[0];return i=pN.bind(null,i[1]),io().memoizedState=i,[e,i]},useMutableSource:function(){},useSyncExternalStore:function(i,e,t){var n=On,r=io();if(Rn){if(t===void 0)throw Error(Ge(407));t=t()}else{if(t=e(),_i===null)throw Error(Ge(349));(_u&30)!==0||OR(n,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,uC(zR.bind(null,n,s,i),[i]),n.flags|=2048,wh(9,UR.bind(null,n,s,t,e),void 0,null),t},useId:function(){var i=io(),e=_i.identifierPrefix;if(Rn){var t=Ho,n=Go;t=(n&~(1<<32-Us(n)-1)).toString(32)+t,e=":"+e+"R"+t,t=Sh++,0<t&&(e+="H"+t.toString(32)),e+=":"}else t=hN++,e=":"+e+"r"+t.toString(32)+":";return i.memoizedState=e},unstable_isNewReconciler:!1},_N={readContext:_s,useCallback:jR,useContext:_s,useEffect:hS,useImperativeHandle:JR,useInsertionEffect:VR,useLayoutEffect:WR,useMemo:YR,useReducer:l1,useRef:HR,useState:function(){return l1(Eh)},useDebugValue:pS,useDeferredValue:function(i){var e=ys();return KR(e,si.memoizedState,i)},useTransition:function(){var i=l1(Eh)[0],e=ys().memoizedState;return[i,e]},useMutableSource:LR,useSyncExternalStore:NR,useId:QR,unstable_isNewReconciler:!1},yN={readContext:_s,useCallback:jR,useContext:_s,useEffect:hS,useImperativeHandle:JR,useInsertionEffect:VR,useLayoutEffect:WR,useMemo:YR,useReducer:u1,useRef:HR,useState:function(){return u1(Eh)},useDebugValue:pS,useDeferredValue:function(i){var e=ys();return si===null?e.memoizedState=i:KR(e,si.memoizedState,i)},useTransition:function(){var i=u1(Eh)[0],e=ys().memoizedState;return[i,e]},useMutableSource:LR,useSyncExternalStore:NR,useId:QR,unstable_isNewReconciler:!1};function Ds(i,e){if(i&&i.defaultProps){e=Un({},e),i=i.defaultProps;for(var t in i)e[t]===void 0&&(e[t]=i[t]);return e}return e}function ox(i,e,t,n){e=i.memoizedState,t=t(n,e),t=t==null?e:Un({},e,t),i.memoizedState=t,i.lanes===0&&(i.updateQueue.baseState=t)}var Zg={isMounted:function(i){return(i=i._reactInternals)?Fu(i)===i:!1},enqueueSetState:function(i,e,t){i=i._reactInternals;var n=lr(),r=Va(i),s=Xo(n,r);s.payload=e,t!=null&&(s.callback=t),e=Ga(i,s,r),e!==null&&(zs(e,i,r,n),H0(e,i,r))},enqueueReplaceState:function(i,e,t){i=i._reactInternals;var n=lr(),r=Va(i),s=Xo(n,r);s.tag=1,s.payload=e,t!=null&&(s.callback=t),e=Ga(i,s,r),e!==null&&(zs(e,i,r,n),H0(e,i,r))},enqueueForceUpdate:function(i,e){i=i._reactInternals;var t=lr(),n=Va(i),r=Xo(t,n);r.tag=2,e!=null&&(r.callback=e),e=Ga(i,r,n),e!==null&&(zs(e,i,n,t),H0(e,i,n))}};function cC(i,e,t,n,r,s,o){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(n,s,o):e.prototype&&e.prototype.isPureReactComponent?!gh(t,n)||!gh(r,s):!0}function eP(i,e,t){var n=!1,r=qa,s=e.contextType;return typeof s=="object"&&s!==null?s=_s(s):(r=Ar(e)?gu:Qi.current,n=e.contextTypes,s=(n=n!=null)?lf(i,r):qa),e=new e(t,s),i.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Zg,i.stateNode=e,e._reactInternals=i,n&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=r,i.__reactInternalMemoizedMaskedChildContext=s),e}function fC(i,e,t,n){i=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(t,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(t,n),e.state!==i&&Zg.enqueueReplaceState(e,e.state,null)}function ax(i,e,t,n){var r=i.stateNode;r.props=t,r.state=i.memoizedState,r.refs={},oS(i);var s=e.contextType;typeof s=="object"&&s!==null?r.context=_s(s):(s=Ar(e)?gu:Qi.current,r.context=lf(i,s)),r.state=i.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(ox(i,e,s,t),r.state=i.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&&Zg.enqueueReplaceState(r,r.state,null),Ag(i,t,r,n),r.state=i.memoizedState),typeof r.componentDidMount=="function"&&(i.flags|=4194308)}function df(i,e){try{var t="",n=e;do t+=jF(n),n=n.return;while(n);var r=t}catch(s){r=` 31Error generating stack: `+s.message+` 32`+s.stack}return{value:i,source:e,stack:r,digest:null}}function c1(i,e,t){return{value:i,source:null,stack:t!=null?t:null,digest:e!=null?e:null}}function lx(i,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var xN=typeof WeakMap=="function"?WeakMap:Map;function tP(i,e,t){t=Xo(-1,t),t.tag=3,t.payload={element:null};var n=e.value;return t.callback=function(){Cg||(Cg=!0,_x=n),lx(i,e)},t}function nP(i,e,t){t=Xo(-1,t),t.tag=3;var n=i.type.getDerivedStateFromError;if(typeof n=="function"){var r=e.value;t.payload=function(){return n(r)},t.callback=function(){lx(i,e)}}var s=i.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){lx(i,e),typeof n!="function"&&(Ha===null?Ha=new Set([this]):Ha.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function dC(i,e,t){var n=i.pingCache;if(n===null){n=i.pingCache=new xN;var r=new Set;n.set(e,r)}else r=n.get(e),r===void 0&&(r=new Set,n.set(e,r));r.has(t)||(r.add(t),i=FN.bind(null,i,e,t),e.then(i,i))}function hC(i){do{var e;if((e=i.tag===13)&&(e=i.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return i;i=i.return}while(i!==null);return null}function pC(i,e,t,n,r){return(i.mode&1)===0?(i===e?i.flags|=65536:(i.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=Xo(-1,1),e.tag=2,Ga(t,e,1))),t.lanes|=1),i):(i.flags|=65536,i.lanes=r,i)}var AN=ea.ReactCurrentOwner,yr=!1;function sr(i,e,t,n){e.child=i===null?IR(e,null,t,n):cf(e,i.child,t,n)}function mC(i,e,t,n,r){t=t.render;var s=e.ref;return Zc(e,r),n=fS(i,e,t,n,s,r),t=dS(),i!==null&&!yr?(e.updateQueue=i.updateQueue,e.flags&=-2053,i.lanes&=~r,Qo(i,e,r)):(Rn&&t&&$A(e),e.flags|=1,sr(i,e,n,r),e.child)}function gC(i,e,t,n,r){if(i===null){var s=t.type;return typeof s=="function"&&!SS(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,iP(i,e,s,n,r)):(i=Y0(t.type,null,n,e,e.mode,r),i.ref=e.ref,i.return=e,e.child=i)}if(s=i.child,(i.lanes&r)===0){var o=s.memoizedProps;if(t=t.compare,t=t!==null?t:gh,t(o,n)&&i.ref===e.ref)return Qo(i,e,r)}return e.flags|=1,i=Wa(s,n),i.ref=e.ref,i.return=e,e.child=i}function iP(i,e,t,n,r){if(i!==null){var s=i.memoizedProps;if(gh(s,n)&&i.ref===e.ref)if(yr=!1,e.pendingProps=n=s,(i.lanes&r)!==0)(i.flags&131072)!==0&&(yr=!0);else return e.lanes=i.lanes,Qo(i,e,r)}return ux(i,e,t,n,r)}function rP(i,e,t){var n=e.pendingProps,r=n.children,s=i!==null?i.memoizedState:null;if(n.mode==="hidden")if((e.mode&1)===0)e.memoizedState={baseLanes:0,cachePool:null,transitions:null},xn(Gc,Or),Or|=t;else{if((t&1073741824)===0)return i=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:i,cachePool:null,transitions:null},e.updateQueue=null,xn(Gc,Or),Or|=i,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:t,xn(Gc,Or),Or|=n}else s!==null?(n=s.baseLanes|t,e.memoizedState=null):n=t,xn(Gc,Or),Or|=n;return sr(i,e,r,t),e.child}function sP(i,e){var t=e.ref;(i===null&&t!==null||i!==null&&i.ref!==t)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,723 bytes, line 32
32function ux(i,e,t,n,r){var s=Ar(t)?gu:Qi.current;return s=lf(e,s),Zc(e,r),t=fS(i,e,t,n,s,r),n=dS(),i!==null&&!yr?(e.updateQueue=i.updateQueue,e.flags&=-2053,i.lanes&=~r,Qo(i,e,r)):(Rn&&n&&$A(e),e.flags|=1,sr(i,e,t,r),e.child)}function vC(i,e,t,n,r){if(Ar(t)){var s=!0;gg(e)}else s=!1;if(Zc(e,r),e.stateNode===null)X0(i,e),eP(e,t,n),ax(e,t,n,r),n=!0;else if(i===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=t.contextType;typeof u=="object"&&u!==null?u=_s(u):(u=Ar(t)?gu:Qi.current,u=lf(e,u));var f=t.getDerivedStateFromProps,h=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&fC(e,o,n,u),wa=!1;var p=e.memoizedState;o.state=p,Ag(e,n,o,r),l=e.memoizedState,a!==n||p!==l||xr.current||wa?(typeof f=="function"&&(ox(e,t,f,n),l=e.memoizedState),(a=wa||cC(e,t,a,n,p,l,u))?(h||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=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,DR(i,e),a=e.memoizedProps,u=e.type===e.elementType?a:Ds(e.type,a),o.props=u,h=e.pendingProps,p=o.context,l=t.contextType,typeof l=="object"&&l!==null?l=_s(l):(l=Ar(t)?gu:Qi.current,l=lf(e,l));var m=t.getDerivedStateFromProps;(f=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||p!==l)&&fC(e,o,n,l),wa=!1,p=e.memoizedState,o.state=p,Ag(e,n,o,r);var v=e.memoizedState;a!==h||p!==v||xr.current||wa?(typeof m=="function"&&(ox(e,t,m,n),v=e.memoizedState),(u=wa||cC(e,t,u,n,p,v,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=v),o.props=n,o.state=v,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=1024),n=!1)}return cx(i,e,t,n,s,r)}function cx(i,e,t,n,r,s){sP(i,e);var o=(e.flags&128)!==0;if(!n&&!o)return r&&nC(e,t,!1),Qo(i,e,s);n=e.stateNode,AN.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,i!==null&&o?(e.child=cf(e,i.child,null,s),e.child=cf(e,null,a,s)):sr(i,e,a,s),e.memoizedState=n.state,r&&nC(e,t,!0),e.child}function oP(i){var e=i.stateNode;e.pendingContext?tC(i,e.pendingContext,e.pendingContext!==e.context):e.context&&tC(i,e.context,!1),aS(i,e.containerInfo)}function _C(i,e,t,n,r){return uf(),tS(r),e.flags|=256,sr(i,e,t,n),e.child}var fx={dehydrated:null,treeContext:null,retryLane:0};function dx(i){return{baseLanes:i,cachePool:null,transitions:null}}function aP(i,e,t){var n=e.pendingProps,r=Bn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=i!==null&&i.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(i===null||i.memoizedState!==null)&&(r|=1),xn(Bn,r&1),i===null)return rx(e),i=e.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((e.mode&1)===0?e.lanes=1:i.data==="$!"?e.lanes=8:e.lanes=1073741824,null):(o=n.children,i=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},(n&1)===0&&s!==null?(s.childLanes=0,s.pendingProps=o):s=tv(o,n,0,null),i=au(i,n,t,null),s.return=e,i.return=e,s.sibling=i,e.child=s,e.child.memoizedState=dx(t),e.memoizedState=fx,i):mS(e,o));if(r=i.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return SN(i,e,o,n,a,r,t);if(s){s=n.fallback,o=e.mode,r=i.child,a=r.sibling;var l={mode:"hidden",children:n.children};return(o&1)===0&&e.child!==r?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=Wa(r,l),n.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=Wa(a,s):(s=au(s,o,t,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=i.child.memoizedState,o=o===null?dx(t):{base
vendor: 8,272 bytes, line 32
32Lanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=i.childLanes&~t,e.memoizedState=fx,n}return s=i.child,i=s.sibling,n=Wa(s,{mode:"visible",children:n.children}),(e.mode&1)===0&&(n.lanes=t),n.return=e,n.sibling=null,i!==null&&(t=e.deletions,t===null?(e.deletions=[i],e.flags|=16):t.push(i)),e.child=n,e.memoizedState=null,n}function mS(i,e){return e=tv({mode:"visible",children:e},i.mode,0,null),e.return=i,i.child=e}function Sm(i,e,t,n){return n!==null&&tS(n),cf(e,i.child,null,t),i=mS(e,e.pendingProps.children),i.flags|=2,e.memoizedState=null,i}function SN(i,e,t,n,r,s,o){if(t)return e.flags&256?(e.flags&=-257,n=c1(Error(Ge(422))),Sm(i,e,o,n)):e.memoizedState!==null?(e.child=i.child,e.flags|=128,null):(s=n.fallback,r=e.mode,n=tv({mode:"visible",children:n.children},r,0,null),s=au(s,r,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,(e.mode&1)!==0&&cf(e,i.child,null,o),e.child.memoizedState=dx(o),e.memoizedState=fx,s);if((e.mode&1)===0)return Sm(i,e,o,null);if(r.data==="$!"){if(n=r.nextSibling&&r.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(Ge(419)),n=c1(s,n,void 0),Sm(i,e,o,n)}if(a=(o&i.childLanes)!==0,yr||a){if(n=_i,n!==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&(n.suspendedLanes|o))!==0?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Ko(i,r),zs(n,i,r,-1))}return AS(),n=c1(Error(Ge(421))),Sm(i,e,o,n)}return r.data==="$?"?(e.flags|=128,e.child=i.child,e=LN.bind(null,i),r._reactRetry=e,null):(i=s.treeContext,Gr=ka(r.nextSibling),Vr=e,Rn=!0,Ns=null,i!==null&&(us[cs++]=Go,us[cs++]=Ho,us[cs++]=vu,Go=i.id,Ho=i.overflow,vu=e),e=mS(e,n.children),e.flags|=4096,e)}function yC(i,e,t){i.lanes|=e;var n=i.alternate;n!==null&&(n.lanes|=e),sx(i.return,e,t)}function f1(i,e,t,n,r){var s=i.memoizedState;s===null?i.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:t,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=t,s.tailMode=r)}function lP(i,e,t){var n=e.pendingProps,r=n.revealOrder,s=n.tail;if(sr(i,e,n.children,t),n=Bn.current,(n&2)!==0)n=n&1|2,e.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=e.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&yC(i,t,e);else if(i.tag===19)yC(i,t,e);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}n&=1}if(xn(Bn,n),(e.mode&1)===0)e.memoizedState=null;else switch(r){case"forwards":for(t=e.child,r=null;t!==null;)i=t.alternate,i!==null&&Sg(i)===null&&(r=t),t=t.sibling;t=r,t===null?(r=e.child,e.child=null):(r=t.sibling,t.sibling=null),f1(e,!1,r,t,s);break;case"backwards":for(t=null,r=e.child,e.child=null;r!==null;){if(i=r.alternate,i!==null&&Sg(i)===null){e.child=r;break}i=r.sibling,r.sibling=t,t=r,r=i}f1(e,!0,t,null,s);break;case"together":f1(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function X0(i,e){(e.mode&1)===0&&i!==null&&(i.alternate=null,e.alternate=null,e.flags|=2)}function Qo(i,e,t){if(i!==null&&(e.dependencies=i.dependencies),yu|=e.lanes,(t&e.childLanes)===0)return null;if(i!==null&&e.child!==i.child)throw Error(Ge(153));if(e.child!==null){for(i=e.child,t=Wa(i,i.pendingProps),e.child=t,t.return=e;i.sibling!==null;)i=i.sibling,t=t.sibling=Wa(i,i.pendingProps),t.return=e;t.sibling=null}return e.child}function EN(i,e,t){switch(e.tag){case 3:oP(e),uf();break;case 5:FR(e);break;case 1:Ar(e.type)&&gg(e);break;case 4:aS(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,r=e.memoizedProps.value;xn(yg,n._currentValue),n._currentValue=r;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(xn(Bn,Bn.current&1),e.flags|=128,null):(t&e.child.childLanes)!==0?aP(i,e,t):(xn(Bn,Bn.current&1),i=Qo(i,e,t),i!==null?i.sibling:null);xn(Bn,Bn.current&1);break;case 19:if(n=(t&e.childLanes)!==0,(i.flags&128)!==0){if(n)return lP(i,e,t);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),xn(Bn,Bn.current),n)break;return null;case 22:case 23:return e.lanes=0,rP(i,e,t)}return Qo(i,e,t)}var uP,hx,cP,fP;uP=function(i,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)i.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}};hx=function(){};cP=function(i,e,t,n){var r=i.memoizedProps;if(r!==n){i=e.stateNode,Kl(fo.current);var s=null;switch(t){case"input":r=Ly(i,r),n=Ly(i,n),s=[];break;case"select":r=Un({},r,{value:void 0}),n=Un({},n,{value:void 0}),s=[];break;case"textarea":r=Uy(i,r),n=Uy(i,n),s=[];break;default:typeof r.onClick!="function"&&typeof n.onClick=="function"&&(i.onclick=pg)}ky(t,n);var o;t=null;for(u in r)if(!n.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var a=r[u];for(o in a)a.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(uh.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in n){var l=n[u];if(a=r!=null?r[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(t||(t={}),t[o]=l[o])}else t||(s||(s=[]),s.push(u,t)),t=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(uh.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&An("scroll",i),s||a===l||(s=[])):(s=s||[]).push(u,l))}t&&(s=s||[]).push("style",t);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};fP=function(i,e,t,n){t!==n&&(e.flags|=4)};function pd(i,e){if(!Rn)switch(i.tailMode){case"hidden":e=i.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?i.tail=null:t.sibling=null;break;case"collapsed":t=i.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e||i.tail===null?i.tail=null:i.tail.sibling=null:n.sibling=null}}function Oi(i){var e=i.alternate!==null&&i.alternate.child===i.child,t=0,n=0;if(e)for(var r=i.child;r!==null;)t|=r.lanes|r.childLanes,n|=r.subtreeFlags&14680064,n|=r.flags&14680064,r.return=i,r=r.sibling;else for(r=i.child;r!==null;)t|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=i,r=r.sibling;return i.subtreeFlags|=n,i.childLanes=t,e}function wN(i,e,t){var n=e.pendingProps;switch(eS(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oi(e),null;case 1:return Ar(e.type)&&mg(),Oi(e),null;case 3:return n=e.stateNode,ff(),wn(xr),wn(Qi),uS(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(i===null||i.child===null)&&(xm(e)?e.flags|=4:i===null||i.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Ns!==null&&(Ax(Ns),Ns=null))),hx(i,e),Oi(e),null;case 5:lS(e);var r=Kl(Ah.current);if(t=e.type,i!==null&&e.stateNode!=null)cP(i,e,t,n,r),i.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(Ge(166));return Oi(e),null}if(i=Kl(fo.current),xm(e)){n=e.stateNode,t=e.type;var s=e.memoizedProps;switch(n[so]=e,n[yh]=s,i=(e.mode&1)!==0,t){case"dialog":An("cancel",n),An("close",n);break;case"iframe":case"object":case"embed":An("load",n);break;case"video":case"audio":for(r=0;r<kd.length;r++)An(kd[r],n);break;case"source":An("error",n);break;case"img":case"image":case"link":An("error",n),An("load",n);break;case"details":An("toggle",n);break;case"input":RM(n,s),An("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},An("invalid",n);break;case"textarea":bM(n,s),An("invalid",n)}ky(t,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];
vendor: 8,553 bytes, line 32
32o==="children"?typeof a=="string"?n.textContent!==a&&(s.suppressHydrationWarning!==!0&&ym(n.textContent,a,i),r=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ym(n.textContent,a,i),r=["children",""+a]):uh.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&An("scroll",n)}switch(t){case"input":fm(n),PM(n,s,!0);break;case"textarea":fm(n),IM(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=pg)}n=r,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=z3(t)),i==="http://www.w3.org/1999/xhtml"?t==="script"?(i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof n.is=="string"?i=o.createElement(t,{is:n.is}):(i=o.createElement(t),t==="select"&&(o=i,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):i=o.createElementNS(i,t),i[so]=e,i[yh]=n,uP(i,e,!1,!1),e.stateNode=i;e:{switch(o=Gy(t,n),t){case"dialog":An("cancel",i),An("close",i),r=n;break;case"iframe":case"object":case"embed":An("load",i),r=n;break;case"video":case"audio":for(r=0;r<kd.length;r++)An(kd[r],i);r=n;break;case"source":An("error",i),r=n;break;case"img":case"image":case"link":An("error",i),An("load",i),r=n;break;case"details":An("toggle",i),r=n;break;case"input":RM(i,n),r=Ly(i,n),An("invalid",i);break;case"option":r=n;break;case"select":i._wrapperState={wasMultiple:!!n.multiple},r=Un({},n,{value:void 0}),An("invalid",i);break;case"textarea":bM(i,n),r=Uy(i,n),An("invalid",i);break;default:r=n}ky(t,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?H3(i,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&k3(i,l)):s==="children"?typeof l=="string"?(t!=="textarea"||l!=="")&&ch(i,l):typeof l=="number"&&ch(i,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(uh.hasOwnProperty(s)?l!=null&&s==="onScroll"&&An("scroll",i):l!=null&&zA(i,s,l,o))}switch(t){case"input":fm(i),PM(i,n,!1);break;case"textarea":fm(i),IM(i);break;case"option":n.value!=null&&i.setAttribute("value",""+Qa(n.value));break;case"select":i.multiple=!!n.multiple,s=n.value,s!=null?Yc(i,!!n.multiple,s,!1):n.defaultValue!=null&&Yc(i,!!n.multiple,n.defaultValue,!0);break;default:typeof r.onClick=="function"&&(i.onclick=pg)}switch(t){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Oi(e),null;case 6:if(i&&e.stateNode!=null)fP(i,e,i.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(Ge(166));if(t=Kl(Ah.current),Kl(fo.current),xm(e)){if(n=e.stateNode,t=e.memoizedProps,n[so]=e,(s=n.nodeValue!==t)&&(i=Vr,i!==null))switch(i.tag){case 3:ym(n.nodeValue,t,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&ym(n.nodeValue,t,(i.mode&1)!==0)}s&&(e.flags|=4)}else n=(t.nodeType===9?t:t.ownerDocument).createTextNode(n),n[so]=e,e.stateNode=n}return Oi(e),null;case 13:if(wn(Bn),n=e.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Rn&&Gr!==null&&(e.mode&1)!==0&&(e.flags&128)===0)PR(),uf(),e.flags|=98560,s=!1;else if(s=xm(e),n!==null&&n.dehydrated!==null){if(i===null){if(!s)throw Error(Ge(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Ge(317));s[so]=e}else uf(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Oi(e),s=!1}else Ns!==null&&(Ax(Ns),Ns=null),s=!0;if(!s)return e.flags&65536?e:null}return(e.flags&128)!==0?(e.lanes=t,e):(n=n!==null,n!==(i!==null&&i.memoizedState!==null)&&n&&(e.child.flags|=8192,(e.mode&1)!==0&&(i===null||(Bn.current&1)!==0?ai===0&&(ai=3):AS())),e.updateQueue!==null&&(e.flags|=4),Oi(e),null);case 4:return ff(),hx(i,e),i===null&&vh(e.stateNode.containerInfo),Oi(e),null;case 10:return rS(e.type._context),Oi(e),null;case 17:return Ar(e.type)&&mg(),Oi(e),null;case 19:if(wn(Bn),s=e.memoizedState,s===null)return Oi(e),null;if(n=(e.flags&128)!==0,o=s.rendering,o===null)if(n)pd(s,!1);else{if(ai!==0||i!==null&&(i.flags&128)!==0)for(i=e.child;i!==null;){if(o=Sg(i),o!==null){for(e.flags|=128,pd(s,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=t,t=e.child;t!==null;)s=t,i=n,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=i,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,i=o.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t=t.sibling;return xn(Bn,Bn.current&1|2),e.child}i=i.sibling}s.tail!==null&&Yn()>hf&&(e.flags|=128,n=!0,pd(s,!1),e.lanes=4194304)}else{if(!n)if(i=Sg(o),i!==null){if(e.flags|=128,n=!0,t=i.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),pd(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Rn)return Oi(e),null}else 2*Yn()-s.renderingStartTime>hf&&t!==1073741824&&(e.flags|=128,n=!0,pd(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=Yn(),e.sibling=null,t=Bn.current,xn(Bn,n?t&1|2:t&1),e):(Oi(e),null);case 22:case 23:return xS(),n=e.memoizedState!==null,i!==null&&i.memoizedState!==null!==n&&(e.flags|=8192),n&&(e.mode&1)!==0?(Or&1073741824)!==0&&(Oi(e),e.subtreeFlags&6&&(e.flags|=8192)):Oi(e),null;case 24:return null;case 25:return null}throw Error(Ge(156,e.tag))}function MN(i,e){switch(eS(e),e.tag){case 1:return Ar(e.type)&&mg(),i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 3:return ff(),wn(xr),wn(Qi),uS(),i=e.flags,(i&65536)!==0&&(i&128)===0?(e.flags=i&-65537|128,e):null;case 5:return lS(e),null;case 13:if(wn(Bn),i=e.memoizedState,i!==null&&i.dehydrated!==null){if(e.alternate===null)throw Error(Ge(340));uf()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 19:return wn(Bn),null;case 4:return ff(),null;case 10:return rS(e.type._context),null;case 22:case 23:return xS(),null;case 24:return null;default:return null}}var Em=!1,Vi=!1,CN=typeof WeakSet=="function"?WeakSet:Set,ot=null;function kc(i,e){var t=i.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Hn(i,e,n)}else t.current=null}function px(i,e,t){try{t()}catch(n){Hn(i,e,n)}}var xC=!1;function TN(i,e){if(qy=fg,i=gR(),ZA(i)){if("selectionStart"in i)var t={start:i.selectionStart,end:i.selectionEnd};else e:{t=(t=i.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var r=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,u=0,f=0,h=i,p=null;t:for(;;){for(var m;h!==t||r!==0&&h.nodeType!==3||(a=o+r),h!==s||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===i)break t;if(p===t&&++u===r&&(a=o),p===s&&++f===n&&(l=o),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(Zy={focusedElem:i,selectionRange:t},fg=!1,ot=e;ot!==null;)if(e=ot,i=e.child,(e.subtreeFlags&1028)!==0&&i!==null)i.return=e,ot=i;else for(;ot!==null;){e=ot;try{var v=e.alternate;if((e.flags&1024)!==0)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var _=v.memoizedProps,y=v.memoizedState,g=e.stateNode,A=g.getSnapshotBeforeUpdate(e.elementType===e.type?_:Ds(e.type,_),y);g.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ge(163))}}catch(w){Hn(e,e.return,w)}if(i=e.sibling,i!==null){i.return=e.return,ot=i;break}ot=e.return}return v=xC,xC=!1,v}function qd(i,e,t){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&i)===i){var s=r.destroy;r.destroy=void 0,s!==void 0&&px(e,t,s)}r=r.next}while(r!==n)}}function $g(i,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&i)===i){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}}function mx(i){var e=i.ref;if(e!==null){var t=i.stateNode;switch(i.tag){case 5:i=t;break;default:i=t}typeof e=="function"?e(i):e.current=i}}function dP(i){var e=i.alternate;
vendor: 1,080 bytes, line 32
32e!==null&&(i.alternate=null,dP(e)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(e=i.stateNode,e!==null&&(delete e[so],delete e[yh],delete e[tx],delete e[uN],delete e[cN])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function hP(i){return i.tag===5||i.tag===3||i.tag===4}function AC(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||hP(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function gx(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(i,e):t.insertBefore(i,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(i,t)):(e=t,e.appendChild(i)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=pg));else if(n!==4&&(i=i.child,i!==null))for(gx(i,e,t),i=i.sibling;i!==null;)gx(i,e,t),i=i.sibling}function vx(i,e,t){var n=i.tag;
vendor: 15,945 bytes, line 32
32if(n===5||n===6)i=i.stateNode,e?t.insertBefore(i,e):t.appendChild(i);else if(n!==4&&(i=i.child,i!==null))for(vx(i,e,t),i=i.sibling;i!==null;)vx(i,e,t),i=i.sibling}var Ei=null,Ls=!1;function fa(i,e,t){for(t=t.child;t!==null;)pP(i,e,t),t=t.sibling}function pP(i,e,t){if(co&&typeof co.onCommitFiberUnmount=="function")try{co.onCommitFiberUnmount(Xg,t)}catch{}switch(t.tag){case 5:Vi||kc(t,e);case 6:var n=Ei,r=Ls;Ei=null,fa(i,e,t),Ei=n,Ls=r,Ei!==null&&(Ls?(i=Ei,t=t.stateNode,i.nodeType===8?i.parentNode.removeChild(t):i.removeChild(t)):Ei.removeChild(t.stateNode));break;case 18:Ei!==null&&(Ls?(i=Ei,t=t.stateNode,i.nodeType===8?r1(i.parentNode,t):i.nodeType===1&&r1(i,t),ph(i)):r1(Ei,t.stateNode));break;case 4:n=Ei,r=Ls,Ei=t.stateNode.containerInfo,Ls=!0,fa(i,e,t),Ei=n,Ls=r;break;case 0:case 11:case 14:case 15:if(!Vi&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){r=n=n.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&((s&2)!==0||(s&4)!==0)&&px(t,e,o),r=r.next}while(r!==n)}fa(i,e,t);break;case 1:if(!Vi&&(kc(t,e),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(a){Hn(t,e,a)}fa(i,e,t);break;case 21:fa(i,e,t);break;case 22:t.mode&1?(Vi=(n=Vi)||t.memoizedState!==null,fa(i,e,t),Vi=n):fa(i,e,t);break;default:fa(i,e,t)}}function SC(i){var e=i.updateQueue;if(e!==null){i.updateQueue=null;var t=i.stateNode;t===null&&(t=i.stateNode=new CN),e.forEach(function(n){var r=NN.bind(null,i,n);t.has(n)||(t.add(n),n.then(r,r))})}}function Rs(i,e){var t=e.deletions;if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];try{var s=i,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ei=a.stateNode,Ls=!1;break e;case 3:Ei=a.stateNode.containerInfo,Ls=!0;break e;case 4:Ei=a.stateNode.containerInfo,Ls=!0;break e}a=a.return}if(Ei===null)throw Error(Ge(160));pP(s,o,r),Ei=null,Ls=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(u){Hn(r,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)mP(e,i),e=e.sibling}function mP(i,e){var t=i.alternate,n=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Rs(e,i),no(i),n&4){try{qd(3,i,i.return),$g(3,i)}catch(_){Hn(i,i.return,_)}try{qd(5,i,i.return)}catch(_){Hn(i,i.return,_)}}break;case 1:Rs(e,i),no(i),n&512&&t!==null&&kc(t,t.return);break;case 5:if(Rs(e,i),no(i),n&512&&t!==null&&kc(t,t.return),i.flags&32){var r=i.stateNode;try{ch(r,"")}catch(_){Hn(i,i.return,_)}}if(n&4&&(r=i.stateNode,r!=null)){var s=i.memoizedProps,o=t!==null?t.memoizedProps:s,a=i.type,l=i.updateQueue;if(i.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&O3(r,s),Gy(a,o);var u=Gy(a,s);for(o=0;o<l.length;o+=2){var f=l[o],h=l[o+1];f==="style"?H3(r,h):f==="dangerouslySetInnerHTML"?k3(r,h):f==="children"?ch(r,h):zA(r,f,h,u)}switch(a){case"input":Ny(r,s);break;case"textarea":U3(r,s);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?Yc(r,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?Yc(r,!!s.multiple,s.defaultValue,!0):Yc(r,!!s.multiple,s.multiple?[]:"",!1))}r[yh]=s}catch(_){Hn(i,i.return,_)}}break;case 6:if(Rs(e,i),no(i),n&4){if(i.stateNode===null)throw Error(Ge(162));r=i.stateNode,s=i.memoizedProps;try{r.nodeValue=s}catch(_){Hn(i,i.return,_)}}break;case 3:if(Rs(e,i),no(i),n&4&&t!==null&&t.memoizedState.isDehydrated)try{ph(e.containerInfo)}catch(_){Hn(i,i.return,_)}break;case 4:Rs(e,i),no(i);break;case 13:Rs(e,i),no(i),r=i.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(_S=Yn())),n&4&&SC(i);break;case 22:if(f=t!==null&&t.memoizedState!==null,i.mode&1?(Vi=(u=Vi)||f,Rs(e,i),Vi=u):Rs(e,i),no(i),n&8192){if(u=i.memoizedState!==null,(i.stateNode.isHidden=u)&&!f&&(i.mode&1)!==0)for(ot=i,f=i.child;f!==null;){for(h=ot=f;ot!==null;){switch(p=ot,m=p.child,p.tag){case 0:case 11:case 14:case 15:qd(4,p,p.return);break;case 1:kc(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){n=p,t=p.return;try{e=n,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(_){Hn(n,t,_)}}break;case 5:kc(p,p.return);break;case 22:if(p.memoizedState!==null){wC(h);continue}}m!==null?(m.return=p,ot=m):wC(h)}f=f.sibling}e:for(f=null,h=i;;){if(h.tag===5){if(f===null){f=h;try{r=h.stateNode,u?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=G3("display",o))}catch(_){Hn(i,i.return,_)}}}else if(h.tag===6){if(f===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(_){Hn(i,i.return,_)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===i)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===i)break e;for(;h.sibling===null;){if(h.return===null||h.return===i)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Rs(e,i),no(i),n&4&&SC(i);break;case 21:break;default:Rs(e,i),no(i)}}function no(i){var e=i.flags;if(e&2){try{e:{for(var t=i.return;t!==null;){if(hP(t)){var n=t;break e}t=t.return}throw Error(Ge(160))}switch(n.tag){case 5:var r=n.stateNode;n.flags&32&&(ch(r,""),n.flags&=-33);var s=AC(i);vx(i,s,r);break;case 3:case 4:var o=n.stateNode.containerInfo,a=AC(i);gx(i,a,o);break;default:throw Error(Ge(161))}}catch(l){Hn(i,i.return,l)}i.flags&=-3}e&4096&&(i.flags&=-4097)}function RN(i,e,t){ot=i,gP(i)}function gP(i,e,t){for(var n=(i.mode&1)!==0;ot!==null;){var r=ot,s=r.child;if(r.tag===22&&n){var o=r.memoizedState!==null||Em;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||Vi;a=Em;var u=Vi;if(Em=o,(Vi=l)&&!u)for(ot=r;ot!==null;)o=ot,l=o.child,o.tag===22&&o.memoizedState!==null?MC(r):l!==null?(l.return=o,ot=l):MC(r);for(;s!==null;)ot=s,gP(s),s=s.sibling;ot=r,Em=a,Vi=u}EC(i)}else(r.subtreeFlags&8772)!==0&&s!==null?(s.return=r,ot=s):EC(i)}}function EC(i){for(;ot!==null;){var e=ot;if((e.flags&8772)!==0){var t=e.alternate;try{if((e.flags&8772)!==0)switch(e.tag){case 0:case 11:case 15:Vi||$g(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Vi)if(t===null)n.componentDidMount();else{var r=e.elementType===e.type?t.memoizedProps:Ds(e.type,t.memoizedProps);n.componentDidUpdate(r,t.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&aC(e,s,n);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}aC(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 u=e.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var h=f.dehydrated;h!==null&&ph(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ge(163))}Vi||e.flags&512&&mx(e)}catch(p){Hn(e,e.return,p)}}if(e===i){ot=null;break}if(t=e.sibling,t!==null){t.return=e.return,ot=t;break}ot=e.return}}function wC(i){for(;ot!==null;){var e=ot;if(e===i){ot=null;break}var t=e.sibling;if(t!==null){t.return=e.return,ot=t;break}ot=e.return}}function MC(i){for(;ot!==null;){var e=ot;try{switch(e.tag){case 0:case 11:case 15:var t=e.return;try{$g(4,e)}catch(l){Hn(e,t,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var r=e.return;try{n.componentDidMount()}catch(l){Hn(e,r,l)}}var s=e.return;try{mx(e)}catch(l){Hn(e,s,l)}break;case 5:var o=e.return;try{mx(e)}catch(l){Hn(e,o,l)}}}catch(l){Hn(e,e.return,l)}if(e===i){ot=null;break}var a=e.sibling;if(a!==null){a.return=e.return,ot=a;break}ot=e.return}}var PN=Math.ceil,Mg=ea.ReactCurrentDispatcher,gS=ea.ReactCurrentOwner,vs=ea.ReactCurrentBatchConfig,nn=0,_i=null,ni=null,wi=0,Or=0,Gc=ol(0),ai=0,Mh=null,yu=0,ev=0,vS=0,Zd=null,vr=null,_S=0,hf=1/0,Fo=null,Cg=!1,_x=null,Ha=null,wm=!1,Ba=null,Tg=0,$d=0,yx=null,J0=-1,j0=0;function lr(){return(nn&6)!==0?Yn():J0!==-1?J0:J0=Yn()}function Va(i){return(i.mode&1)===0?1:(nn&2)!==0&&wi!==0?wi&-wi:dN.transition!==null?(j0===0&&(j0=eR()),j0):(i=fn,i!==0||(i=window.event,i=i===void 0?16:aR(i.type)),i)}function zs(i,e,t,n){if(50<$d)throw $d=0,yx=null,Error(Ge(185));qh(i,t,n),((nn&2)===0||i!==_i)&&(i===_i&&((nn&2)===0&&(ev|=t),ai===4&&Ra(i,wi)),Sr(i,n),t===1&&nn===0&&(e.mode&1)===0&&(hf=Yn()+500,Qg&&al()))}function Sr(i,e){var t=i.callbackNode;dL(i,e);var n=cg(i,i===_i?wi:0);if(n===0)t!==null&&FM(t),i.callbackNode=null,i.callbackPriority=0;else if(e=n&-n,i.callbackPriority!==e){if(t!=null&&FM(t),e===1)i.tag===0?fN(CC.bind(null,i)):CR(CC.bind(null,i)),aN(function(){(nn&6)===0&&al()}),t=null;else{switch(tR(n)){case 1:t=WA;break;case 4:t=Z3;break;case 16:t=ug;break;case 536870912:t=$3;break;default:t=ug}t=wP(t,vP.bind(null,i))}i.callbackPriority=e,i.callbackNode=t}}function vP(i,e){if(J0=-1,j0=0,(nn&6)!==0)throw Error(Ge(327));var t=i.callbackNode;if($c()&&i.callbackNode!==t)return null;var n=cg(i,i===_i?wi:0);if(n===0)return null;if((n&30)!==0||(n&i.expiredLanes)!==0||e)e=Rg(i,n);else{e=n;var r=nn;nn|=2;var s=yP();(_i!==i||wi!==e)&&(Fo=null,hf=Yn()+500,ou(i,e));do try{BN();break}catch(a){_P(i,a)}while(1);iS(),Mg.current=s,nn=r,ni!==null?e=0:(_i=null,wi=0,e=ai)}if(e!==0){if(e===2&&(r=Jy(i),r!==0&&(n=r,e=xx(i,r))),e===1)throw t=Mh,ou(i,0),Ra(i,n),Sr(i,Yn()),t;if(e===6)Ra(i,n);else{if(r=i.current.alternate,(n&30)===0&&!bN(r)&&(e=Rg(i,n),e===2&&(s=Jy(i),s!==0&&(n=s,e=xx(i,s))),e===1))throw t=Mh,ou(i,0),Ra(i,n),Sr(i,Yn()),t;switch(i.finishedWork=r,i.finishedLanes=n,e){case 0:case 1:throw Error(Ge(345));case 2:Hl(i,vr,Fo);break;case 3:if(Ra(i,n),(n&130023424)===n&&(e=_S+500-Yn(),10<e)){if(cg(i,0)!==0)break;if(r=i.suspendedLanes,(r&n)!==n){lr(),i.pingedLanes|=i.suspendedLanes&r;break}i.timeoutHandle=ex(Hl.bind(null,i,vr,Fo),e);break}Hl(i,vr,Fo);break;case 4:if(Ra(i,n),(n&4194240)===n)break;for(e=i.eventTimes,r=-1;0<n;){var o=31-Us(n);s=1<<o,o=e[o],o>r&&(r=o),n&=~s}if(n=r,n=Yn()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*PN(n/1960))-n,10<n){i.timeoutHandle=ex(Hl.bind(null,i,vr,Fo),n);break}Hl(i,vr,Fo);break;case 5:Hl(i,vr,Fo);break;default:throw Error(Ge(329))}}}return Sr(i,Yn()),i.callbackNode===t?vP.bind(null,i):null}function xx(i,e){var t=Zd;return i.current.memoizedState.isDehydrated&&(ou(i,e).flags|=256),i=Rg(i,e),i!==2&&(e=vr,vr=t,e!==null&&Ax(e)),i}function Ax(i){vr===null?vr=i:vr.push.apply(vr,i)}function bN(i){for(var e=i;;){if(e.flags&16384){var t=e.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var n=0;n<t.length;n++){var r=t[n],s=r.getSnapshot;r=r.value;try{if(!ks(s(),r))return!1}catch{return!1}}}if(t=e.child,e.subtreeFlags&16384&&t!==null)t.return=e,e=t;else{if(e===i)break;for(;e.sibling===null;){if(e.return===null||e.return===i)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ra(i,e){for(e&=~vS,e&=~ev,i.suspendedLanes|=e,i.pingedLanes&=~e,i=i.expirationTimes;0<e;){var t=31-Us(e),n=1<<t;i[t]=-1,e&=~n}}function CC(i){if((nn&6)!==0)throw Error(Ge(327));$c();var e=cg(i,0);if((e&1)===0)return Sr(i,Yn()),null;var t=Rg(i,e);if(i.tag!==0&&t===2){var n=Jy(i);n!==0&&(e=n,t=xx(i,n))}if(t===1)throw t=Mh,ou(i,0),Ra(i,e),Sr(i,Yn()),t;if(t===6)throw Error(Ge(345));return i.finishedWork=i.current.alternate,i.finishedLanes=e,Hl(i,vr,Fo),Sr(i,Yn()),null}function yS(i,e){var t=nn;nn|=1;try{return i(e)}finally{nn=t,nn===0&&(hf=Yn()+500,Qg&&al())}}function xu(i){Ba!==null&&Ba.tag===0&&(nn&6)===0&&$c();var e=nn;nn|=1;var t=vs.transition,n=fn;try{if(vs.transition=null,fn=1,i)return i()}finally{fn=n,vs.transition=t,nn=e,(nn&6)===0&&al()}}function xS(){Or=Gc.current,wn(Gc)}function ou(i,e){i.finishedWork=null,i.finishedLanes=0;var t=i.timeoutHandle;if(t!==-1&&(i.timeoutHandle=-1,oN(t)),ni!==null)for(t=ni.return;t!==null;){var n=t;switch(eS(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&mg();break;case 3:ff(),wn(xr),wn(Qi),uS();break;case 5:lS(n);break;case 4:ff();break;case 13:wn(Bn);break;case 19:wn(Bn);break;case 10:rS(n.type._context);break;case 22:case 23:xS()}t=t.return}if(_i=i,ni=i=Wa(i.current,null),wi=Or=e,ai=0,Mh=null,vS=ev=yu=0,vr=Zd=null,Yl!==null){for(e=0;e<Yl.length;e++)if(t=Yl[e],n=t.interleaved,n!==null){t.interleaved=null;var r=n.next,s=t.pending;if(s!==null){var o=s.next;s.next=r,n.next=o}t.pending=n}Yl=null}return i}function _P(i,e){do{var t=ni;try{if(iS(),V0.current=wg,Eg){for(var n=On.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Eg=!1}if(_u=0,mi=si=On=null,Qd=!1,Sh=0,gS.current=null,t===null||t.return===null){ai=1,Mh=e,ni=null;break}e:{var s=i,o=t.return,a=t,l=e;if(e=wi,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=a,h=f.tag;if((f.mode&1)===0&&(h===0||h===11||h===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=hC(o);if(m!==null){m.flags&=-257,pC(m,o,a,s,e),m.mode&1&&dC(s,u,e),e=m,l=u;var v=e.updateQueue;if(v===null){var _=new Set;_.add(l),e.updateQueue=_}else v.add(l);break e}else{if((e&1)===0){dC(s,u,e),AS();break e}l=Error(Ge(426))}}else if(Rn&&a.mode&1){var y=hC(o);if(y!==null){(y.flags&65536)===0&&(y.flags|=256),pC(y,o,a,s,e),tS(df(l,a));break e}}s=l=df(l,a),ai!==4&&(ai=2),Zd===null?Zd=[s]:Zd.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var g=tP(s,l,e);oC(s,g);break e;case 1:a=l;var A=s.type,S=s.stateNode;if((s.flags&128)===0&&(typeof A.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Ha===null||!Ha.has(S)))){s.flags|=65536,e&=-e,s.lanes|=e;var w=nP(s,a,e);oC(s,w);break e}}s=s.return}while(s!==null)}AP(t)}catch(P){e=P,ni===t&&t!==null&&(ni=t=t.return);continue}break}while(1)}function yP(){var i=Mg.current;return Mg.current=wg,i===null?wg:i}function AS(){(ai===0||ai===3||ai===2)&&(ai=4),_i===null||(yu&268435455)===0&&(ev&268435455)===0||Ra(_i,wi)}function Rg(i,e){var t=nn;nn|=2;var n=yP();(_i!==i||wi!==e)&&(Fo=null,ou(i,e));do try{IN();break}catch(r){_P(i,r)}while(1);if(iS(),nn=t,Mg.current=n,ni!==null)throw Error(Ge(261));return _i=null,wi=0,ai}function IN(){for(;ni!==null;)xP(ni)}function BN(){for(;ni!==null&&!iL();)xP(ni)}function xP(i){var e=EP(i.alternate,i,Or);i.memoizedProps=i.pendingProps,e===null?AP(i):ni=e,gS.current=null}function AP(i){var e=i;do{var t=e.alternate;if(i=e.return,(e.flags&32768)===0){if(t=wN(t,e,Or),t!==null){ni=t;return}}else{if(t=MN(t,e),t!==null){t.flags&=32767,ni=t;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{ai=6,ni=null;return}}if(e=e.sibling,e!==null){ni=e;return}ni=e=i}while(e!==null);ai===0&&(ai=5)}function Hl(i,e,t){var n=fn,r=vs.transition;try{vs.transition=null,fn=1,DN(i,e,t,n)}finally{vs.transition=r,fn=n}return null}function DN(i,e,t,n){do $c();while(Ba!==null);if((nn&6)!==0)throw Error(Ge(327));t=i.finishedWork;var r=i.finishedLanes;if(t===null)return null;if(i.finishedWork=null,i.finishedLanes=0,t===i.current)throw Error(Ge(177));i.callbackNode=null,i.callbackPriority=0;var s=t.lanes|t.childLanes;if(hL(i,s),i===_i&&(ni=_i=null,wi=0),(t.subtreeFlags&2064)===0&&(t.flags&2064)===0||wm||(wm=!0,wP(ug,function(){return $c(),null})),s=(t.flags&15990)!==0,(t.subtreeFlags&15990)!==0||s){s=vs.transition,vs.transition=null;var o=fn;fn=1;var a=nn;nn|=4,gS.current=null,TN(i,t),mP(t,i),$L(Zy),fg=!!qy,Zy=qy=null,i.current=t,RN(t),rL(),nn=a,fn=o,vs.transition=s}else i.current=t;if(wm&&(wm=!1,Ba=i,Tg=r),s=i.pendingLanes,s===0&&(Ha=null),aL(t.stateNode),Sr(i,Yn()),e!==null)for(n=i.onRecoverableError,t=0;t<e.length;t++)r=e[t],n(r.value,{componentStack:r.stack,digest:r.digest});if(Cg)throw Cg=!1,i=_x,_x=null,i;return(Tg&1)!==0&&i.tag!==0&&$c(),s=i.pendingLanes,(s&1)!==0?i===yx?$d++:($d=0,yx=i):$d=0,al(),null}function $c(){if(Ba!==null){var i=tR(Tg),e=vs.transition,t=fn;
vendor: 4,908 bytes, line 32
32try{if(vs.transition=null,fn=16>i?16:i,Ba===null)var n=!1;else{if(i=Ba,Ba=null,Tg=0,(nn&6)!==0)throw Error(Ge(331));var r=nn;for(nn|=4,ot=i.current;ot!==null;){var s=ot,o=s.child;if((ot.flags&16)!==0){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(ot=u;ot!==null;){var f=ot;switch(f.tag){case 0:case 11:case 15:qd(8,f,s)}var h=f.child;if(h!==null)h.return=f,ot=h;else for(;ot!==null;){f=ot;var p=f.sibling,m=f.return;if(dP(f),f===u){ot=null;break}if(p!==null){p.return=m,ot=p;break}ot=m}}}var v=s.alternate;if(v!==null){var _=v.child;if(_!==null){v.child=null;do{var y=_.sibling;_.sibling=null,_=y}while(_!==null)}}ot=s}}if((s.subtreeFlags&2064)!==0&&o!==null)o.return=s,ot=o;else e:for(;ot!==null;){if(s=ot,(s.flags&2048)!==0)switch(s.tag){case 0:case 11:case 15:qd(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,ot=g;break e}ot=s.return}}var A=i.current;for(ot=A;ot!==null;){o=ot;var S=o.child;if((o.subtreeFlags&2064)!==0&&S!==null)S.return=o,ot=S;else e:for(o=A;ot!==null;){if(a=ot,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:$g(9,a)}}catch(P){Hn(a,a.return,P)}if(a===o){ot=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,ot=w;break e}ot=a.return}}if(nn=r,al(),co&&typeof co.onPostCommitFiberRoot=="function")try{co.onPostCommitFiberRoot(Xg,i)}catch{}n=!0}return n}finally{fn=t,vs.transition=e}}return!1}function TC(i,e,t){e=df(t,e),e=tP(i,e,1),i=Ga(i,e,1),e=lr(),i!==null&&(qh(i,1,e),Sr(i,e))}function Hn(i,e,t){if(i.tag===3)TC(i,i,t);else for(;e!==null;){if(e.tag===3){TC(e,i,t);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ha===null||!Ha.has(n))){i=df(t,i),i=nP(e,i,1),e=Ga(e,i,1),i=lr(),e!==null&&(qh(e,1,i),Sr(e,i));break}}e=e.return}}function FN(i,e,t){var n=i.pingCache;n!==null&&n.delete(e),e=lr(),i.pingedLanes|=i.suspendedLanes&t,_i===i&&(wi&t)===t&&(ai===4||ai===3&&(wi&130023424)===wi&&500>Yn()-_S?ou(i,0):vS|=t),Sr(i,e)}function SP(i,e){e===0&&((i.mode&1)===0?e=1:(e=pm,pm<<=1,(pm&130023424)===0&&(pm=4194304)));var t=lr();i=Ko(i,e),i!==null&&(qh(i,e,t),Sr(i,t))}function LN(i){var e=i.memoizedState,t=0;e!==null&&(t=e.retryLane),SP(i,t)}function NN(i,e){var t=0;switch(i.tag){case 13:var n=i.stateNode,r=i.memoizedState;r!==null&&(t=r.retryLane);break;case 19:n=i.stateNode;break;default:throw Error(Ge(314))}n!==null&&n.delete(e),SP(i,t)}var EP;EP=function(i,e,t){if(i!==null)if(i.memoizedProps!==e.pendingProps||xr.current)yr=!0;else{if((i.lanes&t)===0&&(e.flags&128)===0)return yr=!1,EN(i,e,t);yr=(i.flags&131072)!==0}else yr=!1,Rn&&(e.flags&1048576)!==0&&TR(e,_g,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;X0(i,e),i=e.pendingProps;var r=lf(e,Qi.current);Zc(e,t),r=fS(null,e,n,i,r,t);var s=dS();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,Ar(n)?(s=!0,gg(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,oS(e),r.updater=Zg,e.stateNode=r,r._reactInternals=e,ax(e,n,i,t),e=cx(null,e,n,!0,s,t)):(e.tag=0,Rn&&s&&$A(e),sr(null,e,r,t),e=e.child),e;case 16:n=e.elementType;e:{switch(X0(i,e),i=e.pendingProps,r=n._init,n=r(n._payload),e.type=n,r=e.tag=UN(n),i=Ds(n,i),r){case 0:e=ux(null,e,n,i,t);break e;case 1:e=vC(null,e,n,i,t);break e;case 11:e=mC(null,e,n,i,t);break e;case 14:e=gC(null,e,n,Ds(n.type,i),t);break e}throw Error(Ge(306,n,""))}return e;case 0:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Ds(n,r),ux(i,e,n,r,t);case 1:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Ds(n,r),vC(i,e,n,r,t);case 3:e:{if(oP(e),i===null)throw Error(Ge(387));n=e.pendingProps,s=e.memoizedState,r=s.element,DR(i,e),Ag(e,n,null,t);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=df(Error(Ge(423)),e),e=_C(i,e,n,t,r);break e}else if(n!==r){r=df(Error(Ge(424)),e),e=_C(i,e,n,t,r);break e}else for(Gr=ka(e.stateNode.containerInfo.firstChild),Vr=e,Rn=!0,Ns=null,t=IR(e,null,n,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(uf(),n===r){e=Qo(i,e,t);break e}sr(i,e,n,t)}e=e.child}return e;case 5:return FR(e),i===null&&rx(e),n=e.type,r=e.pendingProps,s=i!==null?i.memoizedProps:null,o=r.children,$y(n,r)?o=null:s!==null&&$y(n,s)&&(e.flags|=32),sP(i,e),sr(i,e,o,t),e.child;case 6:return i===null&&rx(e),null;case 13:return aP(i,e,t);case 4:return aS(e,e.stateNode.containerInfo),n=e.pendingProps,i===null?e.child=cf(e,null,n,t):sr(i,e,n,t),e.child;case 11:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Ds(n,r),mC(i,e,n,r,t);case 7:return sr(i,e,e.pendingProps,t),e.child;case 8:return sr(i,e,e.pendingProps.children,t),e.child;case 12:return sr(i,e,e.pendingProps.children,t),e.child;
vendor: 4,552 bytes, line 32
32case 10:e:{if(n=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,xn(yg,n._currentValue),n._currentValue=o,s!==null)if(ks(s.value,o)){if(s.children===r.children&&!xr.current){e=Qo(i,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===n){if(s.tag===1){l=Xo(-1,t&-t),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),sx(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(Ge(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),sx(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}sr(i,e,r.children,t),e=e.child}return e;case 9:return r=e.type,n=e.pendingProps.children,Zc(e,t),r=_s(r),n=n(r),e.flags|=1,sr(i,e,n,t),e.child;case 14:return n=e.type,r=Ds(n,e.pendingProps),r=Ds(n.type,r),gC(i,e,n,r,t);case 15:return iP(i,e,e.type,e.pendingProps,t);case 17:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Ds(n,r),X0(i,e),e.tag=1,Ar(n)?(i=!0,gg(e)):i=!1,Zc(e,t),eP(e,n,r),ax(e,n,r,t),cx(null,e,n,!0,i,t);case 19:return lP(i,e,t);case 22:return rP(i,e,t)}throw Error(Ge(156,e.tag))};function wP(i,e){return q3(i,e)}function ON(i,e,t,n){this.tag=i,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hs(i,e,t,n){return new ON(i,e,t,n)}function SS(i){return i=i.prototype,!(!i||!i.isReactComponent)}function UN(i){if(typeof i=="function")return SS(i)?1:0;if(i!=null){if(i=i.$$typeof,i===GA)return 11;if(i===HA)return 14}return 2}function Wa(i,e){var t=i.alternate;return t===null?(t=hs(i.tag,e,i.key,i.mode),t.elementType=i.elementType,t.type=i.type,t.stateNode=i.stateNode,t.alternate=i,i.alternate=t):(t.pendingProps=e,t.type=i.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=i.flags&14680064,t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,e=i.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=i.sibling,t.index=i.index,t.ref=i.ref,t}function Y0(i,e,t,n,r,s){var o=2;if(n=i,typeof i=="function")SS(i)&&(o=1);else if(typeof i=="string")o=5;else e:switch(i){case Ic:return au(t.children,r,s,e);case kA:o=8,r|=8;break;case Iy:return i=hs(12,t,e,r|2),i.elementType=Iy,i.lanes=s,i;case By:return i=hs(13,t,e,r),i.elementType=By,i.lanes=s,i;case Dy:return i=hs(19,t,e,r),i.elementType=Dy,i.lanes=s,i;case F3:return tv(t,r,s,e);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case B3:o=10;break e;case D3:o=9;break e;case GA:o=11;break e;case HA:o=14;break e;case Ea:o=16,n=null;break e}throw Error(Ge(130,i==null?i:typeof i,""))}return e=hs(o,t,e,r),e.elementType=i,e.type=n,e.lanes=s,e}function au(i,e,t,n){return i=hs(7,i,n,e),i.lanes=t,i}function tv(i,e,t,n){return i=hs(22,i,n,e),i.elementType=F3,i.lanes=t,i.stateNode={isHidden:!1},i}function d1(i,e,t){return i=hs(6,i,null,e),i.lanes=t,i}function h1(i,e,t){return e=hs(4,i.children!==null?i.children:[],i.key,e),e.lanes=t,e.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},e}function zN(i,e,t,n,r){this.tag=e,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=j_(0),this.expirationTimes=j_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=j_(0),this.identifierPrefix=n,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function ES(i,e,t,n,r,s,o,a,l){return i=new zN(i,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=hs(3,null,null,e),i.current=s,s.stateNode=i,s.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},oS(s),i}function kN(i,e,t){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,605 bytes, line 32
32return{$$typeof:bc,key:n==null?null:""+n,children:i,containerInfo:e,implementation:t}}function MP(i){if(!i)return qa;i=i._reactInternals;e:{if(Fu(i)!==i||i.tag!==1)throw Error(Ge(170));var e=i;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ar(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Ge(171))}if(i.tag===1){var t=i.type;if(Ar(t))return MR(i,t,e)}return e}function CP(i,e,t,n,r,s,o,a,l){return i=ES(t,n,!0,i,r,s,o,a,l),i.context=MP(null),t=i.current,n=lr(),r=Va(t),s=Xo(n,r),s.callback=e!=null?e:null,Ga(t,s,r),i.current.lanes=r,qh(i,r,n),Sr(i,n),i}function nv(i,e,t,n){var r=e.current,s=lr(),o=Va(r);return t=MP(t),e.context===null?e.context=t:e.pendingContext=t,e=Xo(s,o),e.payload={element:i},n=n===void 0?null:n,n!==null&&(e.callback=n),i=Ga(r,e,o),i!==null&&(zs(i,r,o,s),H0(i,r,o)),o}function Pg(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function RC(i,e){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var t=i.retryLane;i.retryLane=t!==0&&t<e?t:e}}function wS(i,e){RC(i,e),(i=i.alternate)&&RC(i,e)}function GN(){return null}var TP=typeof reportError=="function"?reportError:function(i){console.error(i)};function MS(i){this._internalRoot=i}iv.prototype.render=MS.prototype.render=function(i){var e=this._internalRoot;if(e===null)throw Error(Ge(409));nv(i,e,null,null)};iv.prototype.unmount=MS.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var e=i.containerInfo;xu(function(){nv(null,i,null,null)}),e[Yo]=null}};function iv(i){this._internalRoot=i}iv.prototype.unstable_scheduleHydration=function(i){if(i){var e=rR();i={blockedOn:null,target:i,priority:e};for(var t=0;t<Ta.length&&e!==0&&e<Ta[t].priority;t++);Ta.splice(t,0,i),t===0&&oR(i)}};function CS(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function rv(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function PC(){}function HN(i,e,t,n,r){if(r){if(typeof n=="function"){var s=n;n=function(){var u=Pg(o);s.call(u)}}var o=CP(e,n,i,0,null,!1,!1,"",PC);return i._reactRootContainer=o,i[Yo]=o.current,vh(i.nodeType===8?i.parentNode:i),xu(),o}for(;r=i.lastChild;)i.removeChild(r);if(typeof n=="function"){var a=n;n=function(){var u=Pg(l);a.call(u)}}var l=ES(i,0,!1,null,null,!1,!1,"",PC);return i._reactRootContainer=l,i[Yo]=l.current,vh(i.nodeType===8?i.parentNode:i),xu(function(){nv(e,l,t,n)}),l}function sv(i,e,t,n,r){var s=t._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var a=r;r=function(){var l=Pg(o);a.call(l)}}nv(e,o,i,r)}else o=HN(t,e,i,r,n);return Pg(o)}nR=function(i){switch(i.tag){case 3:var e=i.stateNode;if(e.current.memoizedState.isDehydrated){var t=zd(e.pendingLanes);t!==0&&(XA(e,t|1),Sr(e,Yn()),(nn&6)===0&&(hf=Yn()+500,al()))}break;case 13:xu(function(){var n=Ko(i,1);if(n!==null){var r=lr();zs(n,i,1,r)}}),wS(i,1)}};JA=function(i){if(i.tag===13){var e=Ko(i,134217728);if(e!==null){var t=lr();zs(e,i,134217728,t)}wS(i,134217728)}};iR=function(i){if(i.tag===13){var e=Va(i),t=Ko(i,e);if(t!==null){var n=lr();zs(t,i,e,n)}wS(i,e)}};rR=function(){return fn};sR=function(i,e){var t=fn;try{return fn=i,e()}finally{fn=t}};Vy=function(i,e,t){switch(e){case"input":if(Ny(i,t),e=t.name,t.type==="radio"&&e!=null){for(t=i;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<t.length;e++){var n=t[e];if(n!==i&&n.form===i.form){var r=Kg(n);if(!r)throw Error(Ge(90));N3(n),Ny(n,r)}}}break;case"textarea":U3(i,t);break;case"select":e=t.value,e!=null&&Yc(i,!!t.multiple,e,!1)}};X3=yS;J3=xu;var VN={usingClientEntryPoint:!1,Events:[$h,Lc,Kg,V3,W3,yS]},md={findFiberByHostInstance:jl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},WN={bundleType:md.bundleType,version:md.version,rendererPackageName:md.rendererPackageName,rendererConfig:md.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ea.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=K3(i),i===null?null:i.stateNode},findFiberByHostInstance:md.findFiberByHostInstance||GN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
32if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mm.isDisabled&&Mm.supportsFiber)try{Xg=Mm.inject(WN),co=Mm}catch{}}Qr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VN;Qr.createPortal=function(i,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!CS(e))throw Error(Ge(200));return kN(i,e,null,t)};Qr.createRoot=function(i,e){if(!CS(i))throw Error(Ge(299));var t=!1,n="",r=TP;return e!=null&&(e.unstable_strictMode===!0&&(t=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=ES(i,1,!1,null,null,t,!1,n,r),i[Yo]=e.current,vh(i.nodeType===8?i.parentNode:i),new MS(e)};Qr.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var e=i._reactInternals;if(e===void 0)throw typeof i.render=="function"?Error(Ge(188)):(i=Object.keys(i).join(","),Error(Ge(268,i)));return i=K3(e),i=i===null?null:i.stateNode,i};Qr.flushSync=function(i){return xu(i)};Qr.hydrate=function(i,e,t){if(!rv(e))throw Error(Ge(200));return sv(null,i,e,!0,t)};Qr.hydrateRoot=function(i,e,t){if(!CS(i))throw Error(Ge(405));var n=t!=null&&t.hydratedSources||null,r=!1,s="",o=TP;if(t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),e=CP(e,null,i,1,t!=null?t:null,r,!1,s,o),i[Yo]=e.current,vh(i),n)for(i=0;i<n.length;i++)t=n[i],r=t._getVersion,r=r(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,r]:e.mutableSourceEagerHydrationData.push(t,r);return new iv(e)};Qr.render=function(i,e,t){if(!rv(e))throw Error(Ge(200));return sv(null,i,e,!1,t)};Qr.unmountComponentAtNode=function(i){if(!rv(i))throw Error(Ge(40));return i._reactRootContainer?(xu(function(){sv(null,null,i,!1,function(){i._reactRootContainer=null,i[Yo]=null})}),!0):!1};Qr.unstable_batchedUpdates=yS;Qr.unstable_renderSubtreeIntoContainer=function(i,e,t,n){if(!rv(t))throw Error(Ge(200));if(i==null||i._reactInternals===void 0)throw Error(Ge(38));return sv(i,e,t,!1,n)};Qr.version="18.3.1-next-f1338f8080-20240426";(function(i){function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}e(),i.exports=Qr})(x3);var bC=x3.exports;Py.createRoot=bC.createRoot,Py.hydrateRoot=bC.hydrateRoot;function RP(i,e,t){return Math.max(i,Math.min(e,t))}class XN{constructor(){this.isRunning=!1,this.value=0,this.from=0,this.to=0,this.duration=0,this.currentTime=0}advance(e){var t;if(!this.isRunning)return;let n=!1;if(this.duration&&this.easing){this.currentTime+=e;const r=RP(0,this.currentTime/this.duration,1);n=r>=1;const s=n?1:this.easing(r);this.value=this.from+(this.to-this.from)*s}else this.lerp?(this.value=function(s,o,a,l){return function(f,h,p){return(1-p)*f+p*h}(s,o,1-Math.exp(-a*l))}(this.value,this.to,60*this.lerp,e),Math.round(this.value)===this.to&&(this.value=this.to,n=!0)):(this.value=this.to,n=!0);n&&this.stop(),(t=this.onUpdate)===null||t===void 0||t.call(this,this.value,n)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:r,easing:s,onStart:o,onUpdate:a}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=r,this.easing=s,this.currentTime=0,this.isRunning=!0,o==null||o(),this.onUpdate=a}}class JN{constructor({wrapper:e,content:t,autoResize:n=!0,debounce:r=250}={}){this.width=0,this.height=0,this.scrollWidth=0,this.scrollHeight=0,this.resize=()=>{this.onWrapperResize(),this.onContentResize()},this.onWrapperResize=()=>{this.wrapper===window?(this.width=window.innerWidth,this.height=window.innerHeight):this.wrapper instanceof HTMLElement&&(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)},this.onContentResize=()=>{this.wrapper===window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):this.wrapper instanceof HTMLElement&&(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)},this.wrapper=e,this.content=t,n&&(this.debouncedResize=function(o,a){let l;return function(){let u=arguments,f=this;clearTimeout(l),l=setTimeout(function(){o.apply(f,u)},a)}}(this.resize,r),this.wrapper===window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)===null||e===void 0||e.disconnect(),(t=this.contentResizeObserver)===null||t===void 0||t.disconnect(),window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}}class PP{constructor(){this.events={}}emit(e,...t){let n=this.events[e]||[];for(let r=0,s=n.length;r<s;r++)n[r](...t)}on(e,t){var n;return!((n=this.events[e])===null||n===void 0)&&n.push(t)||(this.events[e]=[t]),()=>{var r;this.events[e]=(r=this.events[e])===null||r===void 0?void 0:r.filter(s=>t!==s)}}off(e,t){var n;this.events[e]=(n=this.events[e])===null||n===void 0?void 0:n.filter(r=>t!==r)}destroy(){this.events={}}}const IC=100/6;class jN{constructor(e,{wheelMultiplier:t=1,touchMultiplier:n=1}){this.lastDelta={x:0,y:0},this.windowWidth=0,this.windowHeight=0,this.onTouchStart=r=>{const{clientX:s,clientY:o}=r.targetTouches?r.targetTouches[0]:r;this.touchStart.x=s,this.touchStart.y=o,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:r})},this.onTouchMove=r=>{var s,o,a,l;const{clientX:u,clientY:f}=r.targetTouches?r.targetTouches[0]:r,h=-(u-((o=(s=this.touchStart)===null||s===void 0?void 0:s.x)!==null&&o!==void 0?o:0))*this.touchMultiplier,p=-(f-((l=(a=this.touchStart)===null||a===void 0?void 0:a.y)!==null&&l!==void 0?l:0))*this.touchMultiplier;this.touchStart.x=u,this.touchStart.y=f,this.lastDelta={x:h,y:p},this.emitter.emit("scroll",{deltaX:h,deltaY:p,event:r})},this.onTouchEnd=r=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:r})},this.onWheel=r=>{let{deltaX:s,deltaY:o,deltaMode:a}=r;s*=a===1?IC:a===2?this.windowWidth:1,o*=a===1?IC:a===2?this.windowHeight:1,s*=this.wheelMultiplier,o*=this.wheelMultiplier,this.emitter.emit("scroll",{deltaX:s,deltaY:o,event:r})},this.onWindowResize=()=>{this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight},this.element=e,this.wheelMultiplier=t,this.touchMultiplier=n,this.touchStart={x:null,y:null},this.emitter=new PP,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,{passive:!1}),this.element.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.addEventListener("touchend",this.onTouchEnd,{passive:!1})}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel),this.element.removeEventListener("touchstart",this.onTouchStart),this.element.removeEventListener("touchmove",this.onTouchMove),this.element.removeEventListener("touchend",this.onTouchEnd)}}class YN{constructor({wrapper:e=window,content:t=document.documentElement,wheelEventsTarget:n=e,eventsTarget:r=n,smoothWheel:s=!0,syncTouch:o=!1,syncTouchLerp:a=.075,touchInertiaMultiplier:l=35,duration:u,easing:f=P=>Math.min(1,1.001-Math.pow(2,-10*P)),lerp:h=.1,infinite:p=!1,orientation:m="vertical",gestureOrientation:v="vertical",touchMultiplier:_=1,wheelMultiplier:y=1,autoResize:g=!0,prevent:A,virtualScroll:S,__experimental__naiveDimensions:w=!1}={}){this.__isScrolling=!1,this.__isStopped=!1,this.__isLocked=!1,this.userData={},this.lastVelocity=0,this.velocity=0,this.direction=0,this.onPointerDown=P=>{P.button===1&&this.reset()},this.onVirtualScroll=P=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(P)===!1)return;const{deltaX:T,deltaY:I,event:D}=P;if(this.emitter.emit("virtual-scroll",{deltaX:T,deltaY:I,event:D}),D.ctrlKey)return;const C=D.type.includes("touch"),b=D.type.includes("wheel");if(this.isTouching=D.type==="touchstart"||D.type==="touchmove",this.options.syncTouch&&C&&D.type==="touchstart"&&!this.isStopped&&!this.isLocked)return void this.reset();const N=T===0&&I===0,j=this.options.gestureOrientation==="vertical"&&I===0||this.options.gestureOrientation==="horizontal"&&T===0;if(N||j)return;let Y=D.composedPath();Y=Y.slice(0,Y.indexOf(this.rootElement));const q=this.options.prevent;if(Y.find(k=>{var ne,te,ce,_e,Fe;return k instanceof Element&&(typeof q=="function"&&(q==null?void 0:q(k))||((ne=k.hasAttribute)===null||ne===void 0?void 0:ne.call(k,"data-lenis-prevent"))||C&&((te=k.hasAttribute)===null||te===void 0?void 0:te.call(k,"data-lenis-prevent-touch"))||b&&((ce=k.hasAttribute)===null||ce===void 0?void 0:ce.call(k,"data-lenis-prevent-wheel"))||((_e=k.classList)===null||_e===void 0?void 0:_e.contains("lenis"))&&!(!((Fe=k.classList)===null||Fe===void 0)&&Fe.contains("lenis-stopped")))}))return;if(this.isStopped||this.isLocked)return void D.preventDefault();if(!(this.options.syncTouch&&C||this.options.smoothWheel&&b))return this.isScrolling="native",void this.animate.stop();D.preventDefault();let re=I;this.options.gestureOrientation==="both"?re=Math.abs(I)>Math.abs(T)?I:T:this.options.gestureOrientation==="horizontal"&&(re=T);const Q=C&&this.options.syncTouch,pe=C&&D.type==="touchend"&&Math.abs(re)>5;
32pe&&(re=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+re,Object.assign({programmatic:!1},Q?{lerp:pe?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}))},this.onNativeScroll=()=>{if(clearTimeout(this.__resetVelocityTimeout),delete this.__resetVelocityTimeout,this.__preventNextNativeScrollEvent)delete this.__preventNextNativeScrollEvent;else if(this.isScrolling===!1||this.isScrolling==="native"){const P=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-P,this.direction=Math.sign(this.animatedScroll-P),this.isScrolling="native",this.emit(),this.velocity!==0&&(this.__resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}},window.lenisVersion="1.1.9",e&&e!==document.documentElement&&e!==document.body||(e=window),this.options={wrapper:e,content:t,wheelEventsTarget:n,eventsTarget:r,smoothWheel:s,syncTouch:o,syncTouchLerp:a,touchInertiaMultiplier:l,duration:u,easing:f,lerp:h,infinite:p,gestureOrientation:v,orientation:m,touchMultiplier:_,wheelMultiplier:y,autoResize:g,prevent:A,virtualScroll:S,__experimental__naiveDimensions:w},this.animate=new XN,this.emitter=new PP,this.dimensions=new JN({wrapper:e,content:t,autoResize:g}),this.updateClassName(),this.userData={},this.time=0,this.velocity=this.lastVelocity=0,this.isLocked=!1,this.isStopped=!1,this.isScrolling=!1,this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new jN(r,{touchMultiplier:_,wheelMultiplier:y}),this.virtualScroll.on("scroll",this.onVirtualScroll)}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName()}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}setScroll(e){this.isHorizontal?this.rootElement.scrollLeft=e:this.rootElement.scrollTop=e}resize(){this.dimensions.resize()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){this.isStopped&&(this.isStopped=!1,this.reset())}stop(){this.isStopped||(this.isStopped=!0,this.animate.stop(),this.reset())}raf(e){const t=e-(this.time||e);this.time=e,this.animate.advance(.001*t)}scrollTo(e,{offset:t=0,immediate:n=!1,lock:r=!1,duration:s=this.options.duration,easing:o=this.options.easing,lerp:a=this.options.lerp,onStart:l,onComplete:u,force:f=!1,programmatic:h=!0,userData:p={}}={}){if(!this.isStopped&&!this.isLocked||f){if(typeof e=="string"&&["top","left","start"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let m;if(typeof e=="string"?m=document.querySelector(e):e instanceof HTMLElement&&(e==null?void 0:e.nodeType)&&(m=e),m){if(this.options.wrapper!==window){const _=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?_.left:_.top}const v=m.getBoundingClientRect();e=(this.isHorizontal?v.left:v.top)+this.animatedScroll}}if(typeof e=="number"&&(e+=t,e=Math.round(e),this.options.infinite?h&&(this.targetScroll=this.animatedScroll=this.scroll):e=RP(0,e,this.limit),e!==this.targetScroll)){if(this.userData=p,n)return this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),u==null||u(this),void(this.userData={});h||(this.targetScroll=e),this.animate.fromTo(this.animatedScroll,e,{duration:s,easing:o,lerp:a,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling="smooth",l==null||l(this)},onUpdate:(m,v)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=m-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=m,this.setScroll(this.scroll),h&&(this.targetScroll=m),v||this.emit
32(),v&&(this.reset(),this.emit(),u==null||u(this),this.userData={},this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this.__preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{delete this.__preventNextNativeScrollEvent})}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.__experimental__naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop}get scroll(){return this.options.infinite?function(t,n){return(t%n+n)%n}(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this.__isScrolling}set isScrolling(e){this.__isScrolling!==e&&(this.__isScrolling=e,this.updateClassName())}get isStopped(){return this.__isStopped}set isStopped(e){this.__isStopped!==e&&(this.__isStopped=e,this.updateClassName())}get isLocked(){return this.__isLocked}set isLocked(e){this.__isLocked!==e&&(this.__isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}}function BC(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=Array(e);t<e;t++)n[t]=i[t];return n}function Xa(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t)return(t=t.call(i)).next.bind(t);if(Array.isArray(i)||(t=function(r,s){if(r){if(typeof r=="string")return BC(r,s);var o={}.toString.call(r).slice(8,-1);return o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set"?Array.from(r):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?BC(r,s):void 0}}(i))||e&&i&&typeof i.length=="number"){t&&(i=t);var n=0;return function(){return n>=i.length?{done:!0}:{done:!1,value:i[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 33In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sx(){return Sx=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Sx.apply(null,arguments)}var DC=function(){function i(t){var n=t.scrollElements,r=t.rootMargin,s=r===void 0?"-1px -1px -1px -1px":r,o=t.IORaf;this.scrollElements=void 0,this.rootMargin=void 0,this.IORaf=void 0,this.observer=void 0,this.scrollElements=n,this.rootMargin=s,this.IORaf=o,this._init()}var e=i.prototype;return e._init=function(){var t=this;this.observer=new IntersectionObserver(function(s){s.forEach(function(o){var a=t.scrollElements.find(function(l){return l.$el===o.target});o.isIntersecting?(a&&(a.isAlreadyIntersected=!0),t._setInview(o)):a&&a.isAlreadyIntersected&&t._setOutOfView(o)})},{rootMargin:this.rootMargin});for(var n,r=Xa(this.scrollElements);!(n=r()).done;)this.observe(n.value.$el)},e.destroy=function(){this.observer.disconnect()},e.observe=function(t){t&&this.observer.observe(t)},e.unobserve=function(t){t&&this.observer.unobserve(t)},e._setInview=function(t){var n=this.scrollElements.find(function(r){return r.$el===t.target});this.IORaf&&(n==null||n.setInteractivityOn()),!this.IORaf&&(n==null||n.setInview())},e._setOutOfView=function(t){var n=this.scrollElements.find(function(r){return r.$el===t.target});this.IORaf&&(n==null||n.setInteractivityOff()),!this.IORaf&&(n==null||n.setOutOfView()),n!=null&&n.attributes.scrollRepeat||this.IORaf||this.unobserve(t.target)},i}();function FC(i,e,t,n,r){return t+((r-i)/(e-i)*(n-t)||0)}function LC(i,e){return i.reduce(function(t,n){return Math.abs(n-e)<Math.abs(t-e)?n:t})}var KN=function(){function i(t){var n,r,s,o,a,l=t.$el,u=t.id,f=t.modularInstance,h=t.subscribeElementUpdateFn,p=t.unsubscribeElementUpdateFn,m=t.needRaf,v=t.scrollOrientation;this.$el=void 0,this.id=void 0,this.needRaf=void 0,this.attributes=void 0,this.scrollOrientation=void 0,this.isAlreadyIntersected=void 0,this.intersection=void 0,this.metrics=void 0,this.currentScroll=void 0,this.translateValue=void 0,this.progress=void 0,this.lastProgress=void 0,this.modularInstance=void 0,this.progressModularModules=void 0,this.isInview=void 0,this.isInteractive=void 0,this.isInFold=void 0,this.isFirstResize=void 0,this.subscribeElementUpdateFn=void 0,this.unsubscribeElementUpdateFn=void 0,this.$el=l,this.id=u,this.needRaf=m,this.scrollOrientation=v,this.modularInstance=f,this.subscribeElementUpdateFn=h,this.unsubscribeElementUpdateFn=p,this.attributes={scrollClass:(n=this.$el.dataset.scrollClass)!=null?n:"is-inview",scrollOffset:(r=this.$el.dataset.scrollOffset)!=null?r:"0,0",scrollPosition:(s=this.$el.dataset.scrollPosition)!=null?s:"start,end",scrollModuleProgress:this.$el.dataset.scrollModuleProgress!=null,scrollCssProgress:this.$el.dataset.scrollCssProgress!=null,scrollEventProgress:(o=this.$el.dataset.scrollEventProgress)!=null?o:null,scrollSpeed:this.$el.dataset.scrollSpeed!=null?parseFloat(this.$el.dataset.scrollSpeed):null,scrollRepeat:this.$el.dataset.scrollRepeat!=null,
33scrollCall:(a=this.$el.dataset.scrollCall)!=null?a:null,scrollCallSelf:this.$el.dataset.scrollCallSelf!=null,scrollIgnoreFold:this.$el.dataset.scrollIgnoreFold!=null,scrollEnableTouchSpeed:this.$el.dataset.scrollEnableTouchSpeed!=null},this.intersection={start:0,end:0},this.metrics={offsetStart:0,offsetEnd:0,bcr:{}},this.currentScroll=this.scrollOrientation==="vertical"?window.scrollY:window.scrollX,this.translateValue=0,this.progress=0,this.lastProgress=null,this.progressModularModules=[],this.isInview=!1,this.isInteractive=!1,this.isAlreadyIntersected=!1,this.isInFold=!1,this.isFirstResize=!0,this._init()}var e=i.prototype;return e._init=function(){this.needRaf&&(this.modularInstance&&this.attributes.scrollModuleProgress&&this._getProgressModularModules(),this._resize())},e.onResize=function(t){this.currentScroll=t.currentScroll,this._resize()},e.onRender=function(t){var n=t.smooth,r=this.scrollOrientation==="vertical"?window.innerHeight:window.innerWidth;if(this.currentScroll=t.currentScroll,this._computeProgress(),this.attributes.scrollSpeed&&!isNaN(this.attributes.scrollSpeed))if(this.attributes.scrollEnableTouchSpeed||n){if(this.isInFold){var s=Math.max(0,this.progress);this.translateValue=s*r*this.attributes.scrollSpeed*-1}else{var o=FC(0,1,-1,1,this.progress);this.translateValue=o*r*this.attributes.scrollSpeed*-1}this.$el.style.transform=this.scrollOrientation==="vertical"?"translate3d(0, "+this.translateValue+"px, 0)":"translate3d("+this.translateValue+"px, 0, 0)"}else this.translateValue&&(this.$el.style.transform="translate3d(0, 0, 0)"),this.translateValue=0},e.setInview=function(){if(!this.isInview){this.isInview=!0,this.$el.classList.add(this.attributes.scrollClass);var t=this._getScrollCallFrom();this.attributes.scrollCall&&this._dispatchCall("enter",t)}},e.setOutOfView=function(){if(this.isInview&&this.attributes.scrollRepeat){this.isInview=!1,this.$el.classList.remove(this.attributes.scrollClass);var t=this._getScrollCallFrom();this.attributes.scrollCall&&this._dispatchCall("leave",t)}},e.setInteractivityOn=function(){this.isInteractive||(this.isInteractive=!0,this.subscribeElementUpdateFn(this))},e.setInteractivityOff=function(){this.isInteractive&&(this.isInteractive=!1,this.unsubscribeElementUpdateFn(this),this.lastProgress!=null&&this._computeProgress(LC([0,1],this.lastProgress)))},e._resize=function(){this.metrics.bcr=this.$el.getBoundingClientRect(),this._computeMetrics(),this._computeIntersection(),this.isFirstResize&&(this.isFirstResize=!1,this.isInFold&&this.setInview())},e._computeMetrics=function(){var t=this.metrics.bcr,n=this.scrollOrientation==="vertical"?window.innerHeight:window.innerWidth,r=this.scrollOrientation==="vertical"?t.height:t.width;this.metrics.offsetStart=this.currentScroll+(this.scrollOrientation==="vertical"?t.top:t.left)-this.translateValue,this.metrics.offsetEnd=this.metrics.offsetStart+r,this.isInFold=this.metrics.offsetStart<n&&!this.attributes.scrollIgnoreFold},e._computeIntersection=function(){var t=this.scrollOrientation==="vertical"?window.innerHeight:window.innerWidth,n=this.scrollOrientation==="vertical"?this.metrics.bcr.height:this.metrics.bcr.width,r=this.attributes.scrollOffset.split(","),s=r[0]!=null?r[0].trim():"0",o=r[1]!=null?r[1].trim():"0",a=this.attributes.scrollPosition.split(","),l=a[0]!=null?a[0].trim():"start",u=a[1]!=null?a[1].trim():"end",f=s.includes("%")?t*parseInt(s.replace("%","").trim())*.01:parseInt(s),h=o.includes("%")?t*parseInt(o.replace("%","").trim())*.01:parseInt(o);switch(this.isInFold&&(l="fold"),l){case"start":default:this.intersection.start=this.metrics.offsetStart-t+f;break;case"middle":this.intersection.start=this.metrics.offsetStart-t+f+.5*n;break;case"end":this.intersection.start=this.metrics.offsetStart-t+f+n;break;case"fold":this.intersection.start=0}switch(u){case"start":this.intersection.end=this.metrics.offsetStart-h;break;case"middle":this.intersection.end=this.metrics.offsetStart-h+.5*n;break;default:this.intersection.end=this.metrics.offsetStart-h+n}if(this.intersection.end<=this.intersection.start)switch(u){case"start":default:this.intersection.end=this.intersection.start+1;break;case"middle":this.intersection.end=this.intersection.start+.5*n;break;case"end":this.intersection.end=this.intersection.start+n}},e._computeProgress=function(t){var n,r=t!=null?t:(n=FC(this.intersection.start,this.intersection.end,0,1,this.currentScroll))<0?0:n>1?1:n;
33if(this.progress=r,r!=this.lastProgress){if(this.lastProgress=r,this.attributes.scrollCssProgress&&this._setCssProgress(r),this.attributes.scrollEventProgress&&this._setCustomEventProgress(r),this.attributes.scrollModuleProgress)for(var s,o=Xa(this.progressModularModules);!(s=o()).done;){var a=s.value;this.modularInstance&&this.modularInstance.call("onScrollProgress",r,a.moduleName,a.moduleId)}r>0&&r<1&&this.setInview(),r===0&&this.setOutOfView(),r===1&&this.setOutOfView()}},e._setCssProgress=function(t){t===void 0&&(t=0),this.$el.style.setProperty("--progress",t.toString())},e._setCustomEventProgress=function(t){t===void 0&&(t=0);var n=this.attributes.scrollEventProgress;if(n){var r=new CustomEvent(n,{detail:{target:this.$el,progress:t}});window.dispatchEvent(r)}},e._getProgressModularModules=function(){if(this.modularInstance){var t=Object.keys(this.$el.dataset).filter(function(f){return f.includes("module")}),n=Object.entries(this.modularInstance.modules);if(t.length)for(var r,s=Xa(t);!(r=s()).done;){var o=this.$el.dataset[r.value];if(!o)return;for(var a,l=Xa(n);!(a=l()).done;){var u=a.value;o in u[1]&&this.progressModularModules.push({moduleName:u[0],moduleId:o})}}}},e._getScrollCallFrom=function(){var t=LC([this.intersection.start,this.intersection.end],this.currentScroll);return this.intersection.start===t?"start":"end"},e._dispatchCall=function(t,n){var r,s,o=(r=this.attributes.scrollCall)==null?void 0:r.split(","),a=(s=this.attributes)==null?void 0:s.scrollCallSelf;if(o&&o.length>1){var l,u,f=o[0],h=o[1],p=o[2];u=a?this.$el.dataset["module"+h.trim()]:p,this.modularInstance&&this.modularInstance.call(f.trim(),{target:this.$el,way:t,from:n},h.trim(),(l=u)==null?void 0:l.trim())}else if(o){var m=new CustomEvent(o[0],{detail:{target:this.$el,way:t,from:n}});window.dispatchEvent(m)}},i}(),QN=["scrollOffset","scrollPosition","scrollModuleProgress","scrollCssProgress","scrollEventProgress","scrollSpeed"],qN=function(){function i(t){var n=t.$el,r=t.modularInstance,s=t.triggerRootMargin,o=t.rafRootMargin,a=t.scrollOrientation;this.$scrollContainer=void 0,this.modularInstance=void 0,this.triggerRootMargin=void 0,this.rafRootMargin=void 0,this.scrollElements=void 0,this.triggeredScrollElements=void 0,this.RAFScrollElements=void 0,this.scrollElementsToUpdate=void 0,this.IOTriggerInstance=void 0,this.IORafInstance=void 0,this.scrollOrientation=void 0,n?(this.$scrollContainer=n,this.modularInstance=r,this.scrollOrientation=a,this.triggerRootMargin=s!=null?s:"-1px -1px -1px -1px",this.rafRootMargin=o!=null?o:"100% 100% 100% 100%",this.scrollElements=[],this.triggeredScrollElements=[],this.RAFScrollElements=[],this.scrollElementsToUpdate=[],this._init()):console.error("Please provide a DOM Element as scrollContainer")}var e=i.prototype;return e._init=function(){var t=this.$scrollContainer.querySelectorAll("[data-scroll]"),n=Array.from(t);this._subscribeScrollElements(n),this.IOTriggerInstance=new DC({scrollElements:[].concat(this.triggeredScrollElements),rootMargin:this.triggerRootMargin,IORaf:!1}),this.IORafInstance=new DC({scrollElements:[].concat(this.RAFScrollElements),rootMargin:this.rafRootMargin,IORaf:!0})},e.destroy=function(){this.IOTriggerInstance.destroy(),this.IORafInstance.destroy(),this._unsubscribeAllScrollElements()},e.onResize=function(t){for(var n,r=t.currentScroll,s=Xa(this.RAFScrollElements);!(n=s()).done;)n.value.onResize({currentScroll:r})},e.onRender=function(t){for(var n,r=t.currentScroll,s=t.smooth,o=Xa(this.scrollElementsToUpdate);!(n=o()).done;)n.value.onRender({currentScroll:r,smooth:s})},e.removeScrollElements=function(t){var n=this,r=t.querySelectorAll("[data-scroll]");if(r.length){for(var s=0;s<this.triggeredScrollElements.length;s++){var o=this.triggeredScrollElements[s];Array.from(r).indexOf(o.$el)>-1&&(this.IOTriggerInstance.unobserve(o.$el),this.triggeredScrollElements.splice(s,1))}for(var a=0;a<this.RAFScrollElements.length;a++){var l=this.RAFScrollElements[a];Array.from(r).indexOf(l.$el)>-1&&(this.IORafInstance.unobserve(l.$el),this.RAFScrollElements.splice(a,1))}
33r.forEach(function(u){var f=n.scrollElementsToUpdate.find(function(p){return p.$el===u}),h=n.scrollElements.find(function(p){return p.$el===u});f&&n._unsubscribeElementUpdate(f),h&&(n.scrollElements=n.scrollElements.filter(function(p){return p.id!=h.id}))})}},e.addScrollElements=function(t){var n=t.querySelectorAll("[data-scroll]"),r=[];this.scrollElements.forEach(function(a){r.push(a.id)});var s=Math.max.apply(Math,r.concat([0]))+1,o=Array.from(n);this._subscribeScrollElements(o,s,!0)},e._subscribeScrollElements=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=!1);for(var s=0;s<t.length;s++){var o=t[s],a=this._checkRafNeeded(o),l=new KN({$el:o,id:n+s,scrollOrientation:this.scrollOrientation,modularInstance:this.modularInstance,subscribeElementUpdateFn:this._subscribeElementUpdate.bind(this),unsubscribeElementUpdateFn:this._unsubscribeElementUpdate.bind(this),needRaf:a});this.scrollElements.push(l),a?(this.RAFScrollElements.push(l),r&&(this.IORafInstance.scrollElements.push(l),this.IORafInstance.observe(l.$el))):(this.triggeredScrollElements.push(l),r&&(this.IOTriggerInstance.scrollElements.push(l),this.IOTriggerInstance.observe(l.$el)))}},e._unsubscribeAllScrollElements=function(){this.scrollElements=[],this.RAFScrollElements=[],this.triggeredScrollElements=[],this.scrollElementsToUpdate=[]},e._subscribeElementUpdate=function(t){this.scrollElementsToUpdate.push(t)},e._unsubscribeElementUpdate=function(t){this.scrollElementsToUpdate=this.scrollElementsToUpdate.filter(function(n){return n.id!=t.id})},e._checkRafNeeded=function(t){var n=[].concat(QN),r=function(a){n=n.filter(function(l){return l!=a})};if(t.dataset.scrollOffset){if(t.dataset.scrollOffset.split(",").map(function(a){return a.replace("%","").trim()}).join(",")!="0,0")return!0;r("scrollOffset")}else r("scrollOffset");if(t.dataset.scrollPosition){if(t.dataset.scrollPosition.trim()!="top,bottom")return!0;r("scrollPosition")}else r("scrollPosition");if(t.dataset.scrollSpeed&&!isNaN(parseFloat(t.dataset.scrollSpeed)))return!0;r("scrollSpeed");for(var s,o=Xa(n);!(s=o()).done;)if(s.value in t.dataset)return!0;return!1},i}(),ZN=function(){function i(t){var n=t.resizeElements,r=t.resizeCallback,s=r===void 0?function(){}:r;this.$resizeElements=void 0,this.isFirstObserve=void 0,this.observer=void 0,this.resizeCallback=void 0,this.$resizeElements=n,this.resizeCallback=s,this.isFirstObserve=!0,this._init()}var e=i.prototype;return e._init=function(){var t=this;this.observer=new ResizeObserver(function(s){!t.isFirstObserve&&(t.resizeCallback==null||t.resizeCallback()),t.isFirstObserve=!1});for(var n,r=Xa(this.$resizeElements);!(n=r()).done;)this.observer.observe(n.value)},e.destroy=function(){this.observer.disconnect()},i}(),$N=function(){function i(t){var n=t===void 0?{}:t,r=n.lenisOptions,s=r===void 0?{}:r,o=n.modularInstance,a=n.triggerRootMargin,l=n.rafRootMargin,u=n.autoResize,f=u===void 0||u,h=n.autoStart,p=h===void 0||h,m=n.scrollCallback,v=m===void 0?function(){}:m,_=n.initCustomTicker,y=n.destroyCustomTicker;this.rafPlaying=void 0,this.lenisInstance=void 0,this.coreInstance=void 0,this.lenisOptions=void 0,this.modularInstance=void 0,this.triggerRootMargin=void 0,this.rafRootMargin=void 0,this.rafInstance=void 0,this.autoResize=void 0,this.autoStart=void 0,this.ROInstance=void 0,this.initCustomTicker=void 0,this.destroyCustomTicker=void 0,this._onRenderBind=void 0,this._onResizeBind=void 0,this._onScrollToBind=void 0;for(var g=0,A=Object.entries(s);g<A.length;g++){var S=A[g][0];["wrapper","content","infinite"].includes(S)&&console.warn('Warning: Key "'+S+'" is not possible to edit in Locomotive Scroll.')}Object.assign(this,{lenisOptions:s,modularInstance:o,triggerRootMargin:a,rafRootMargin:l,autoResize:f,autoStart:p,scrollCallback:v,initCustomTicker:_,destroyCustomTicker:y}),this._onRenderBind=this._onRender.bind(this),this._onScrollToBind=this._onScrollTo.bind(this),this._onResizeBind=this._onResize.bind(this),this.rafPlaying=!1,this._init()}var e=i.prototype;return e._init=function(){var t,n=this;this.lenisInstance=new YN(Sx({},this.lenisOptions,{wrapper:window,content:document.documentElement,infinite:!1})),(t=this.lenisInstance)==null||t.on("scroll",this.scrollCallback),document.documentElement.setAttribute("data-scroll-orientation",this.lenisInstance.options.orientation),requestAnimationFrame(function(){n.coreInstance=new qN({$el:n.lenisInstance.rootElement,modularInstance:n.modularInstance,triggerRootMargin:n.triggerRootMargin,rafRootMargin:n.rafRootMargin,scrollOrientation:n.lenisInstance.options.orientation}),n._bindEvents(),n.initCustomTicker&&!n.destroyCustomTicker?console.warn("init
33CustomTicker callback is declared, but destroyCustomTicker is not. Please pay attention. It could cause trouble."):!n.initCustomTicker&&n.destroyCustomTicker&&console.warn("destroyCustomTicker callback is declared, but initCustomTicker is not. Please pay attention. It could cause trouble."),n.autoStart&&n.start()})},e.destroy=function(){var t,n=this;this.stop(),this._unbindEvents(),this.lenisInstance.destroy(),(t=this.coreInstance)==null||t.destroy(),requestAnimationFrame(function(){var r;(r=n.coreInstance)==null||r.destroy()})},e._bindEvents=function(){this._bindScrollToEvents(),this.autoResize&&("ResizeObserver"in window?this.ROInstance=new ZN({resizeElements:[document.body],resizeCallback:this._onResizeBind}):window.addEventListener("resize",this._onResizeBind))},e._unbindEvents=function(){this._unbindScrollToEvents(),this.autoResize&&("ResizeObserver"in window?this.ROInstance&&this.ROInstance.destroy():window.removeEventListener("resize",this._onResizeBind))},e._bindScrollToEvents=function(t){var n=this,r=t||this.lenisInstance.rootElement,s=r==null?void 0:r.querySelectorAll("[data-scroll-to]");s!=null&&s.length&&s.forEach(function(o){o.addEventListener("click",n._onScrollToBind,!1)})},e._unbindScrollToEvents=function(t){var n=this,r=t||this.lenisInstance.rootElement,s=r==null?void 0:r.querySelectorAll("[data-scroll-to]");s!=null&&s.length&&s.forEach(function(o){o.removeEventListener("click",n._onScrollToBind,!1)})},e._onResize=function(){var t=this;requestAnimationFrame(function(){var n;(n=t.coreInstance)==null||n.onResize({currentScroll:t.lenisInstance.scroll})})},e._onRender=function(){var t,n;(t=this.lenisInstance)==null||t.raf(Date.now()),(n=this.coreInstance)==null||n.onRender({currentScroll:this.lenisInstance.scroll,smooth:this.lenisInstance.options.smoothWheel})},e._onScrollTo=function(t){var n;t.preventDefault();var r=(n=t.currentTarget)!=null?n:null;if(r){var s=r.getAttribute("data-scroll-to-href")||r.getAttribute("href"),o=r.getAttribute("data-scroll-to-offset")||0,a=r.getAttribute("data-scroll-to-duration")||this.lenisInstance.options.duration;s&&this.scrollTo(s,{offset:typeof o=="string"?parseInt(o):o,duration:typeof a=="string"?parseInt(a):a})}},e.start=function(){var t;this.rafPlaying||((t=this.lenisInstance)==null||t.start(),this.rafPlaying=!0,this.initCustomTicker?this.initCustomTicker(this._onRenderBind):this._raf())},e.stop=function(){var t;this.rafPlaying&&((t=this.lenisInstance)==null||t.stop(),this.rafPlaying=!1,this.destroyCustomTicker?this.destroyCustomTicker(this._onRenderBind):this.rafInstance&&cancelAnimationFrame(this.rafInstance))},e.removeScrollElements=function(t){var n;t?(this._unbindScrollToEvents(t),(n=this.coreInstance)==null||n.removeScrollElements(t)):console.error("Please provide a DOM Element as $oldContainer")},e.addScrollElements=function(t){var n,r=this;t?((n=this.coreInstance)==null||n.addScrollElements(t),requestAnimationFrame(function(){r._bindScrollToEvents(t)})):console.error("Please provide a DOM Element as $newContainer")},e.resize=function(){this._onResizeBind()},e.scrollTo=function(t,n){var r;(r=this.lenisInstance)==null||r.scrollTo(t,{offset:n==null?void 0:n.offset,lerp:n==null?void 0:n.lerp,duration:n==null?void 0:n.duration,immediate:n==null?void 0:n.immediate,lock:n==null?void 0:n.lock,force:n==null?void 0:n.force,easing:n==null?void 0:n.easing,onComplete:n==null?void 0:n.onComplete})},e._raf=function(){var t=this;this._onRenderBind(),this.rafInstance=requestAnimationFrame(function(){return t._raf()})},i}();const e4="_foreground_1jv4z_72",t4="_nowrap_1jv4z_93",In={"page-section":"_page-section_1jv4z_15","section-intro":"_section-intro_1jv4z_21","abs-center":"_abs-center_1jv4z_25","section-projects":"_section-projects_1jv4z_32","project-list":"_project-list_1jv4z_37","project-item":"_project-item_1jv4z_41","project-cover-img":"_project-cover-img_1jv4z_52","section-clients":"_section-clients_1jv4z_58","section-explore":"_section-explore_1jv4z_61","section-aboutUs":"_section-aboutUs_1jv4z_64","text-color-1":"_text-color-1_1jv4z_68",foreground:e4,"pseudo-block":"_pseudo-block_1jv4z_81",nowrap:t4,"client-section":"_client-section_1jv4z_97","client-section-content":"_client-section-content_1jv4z_109","client-logo-container":"_client-logo-container_1jv4z_113","client-logo":"_client-logo_1jv4z_113","client-section-mask":"_client-section-mask_1jv4z_128","content-width":"_content-width_1jv4z_143","explore-text":"_explore-text_1jv4z_148","ending-text":"_ending-text_1jv4z_164","t-1":"_t-1_1jv4z_178","t-2":"_t-2_1jv4z_182","t-3":"_t
33-3_1jv4z_186","ending-photo":"_ending-photo_1jv4z_191"};/** 34 * @license 35 * Copyright 2010-2024 Three.js Authors 36 * SPDX-License-Identifier: MIT 37 */const Bf="165",n4={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},i4={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},bP=0,Ex=1,IP=2,r4=3,BP=0,ov=1,eh=2,Fs=3,xs=0,Mi=1,fs=2,ho=0,Ja=1,pf=2,wx=3,Mx=4,DP=5,Pa=100,FP=101,LP=102,NP=103,OP=104,UP=200,zP=201,kP=202,GP=203,bg=204,Ig=205,HP=206,VP=207,WP=208,XP=209,JP=210,jP=211,YP=212,KP=213,QP=214,qP=0,ZP=1,$P=2,Ch=3,eb=4,tb=5,nb=6,ib=7,tp=0,rb=1,sb=2,po=0,ob=1,ab=2,lb=3,TS=4,ub=5,cb=6,fb=7,Cx="attached",db="detached",Za=300,_o=301,$a=302,mf=303,Th=304,Df=306,As=1e3,Kn=1001,gf=1002,li=1003,av=1004,s4=1004,Ql=1005,o4=1005,Qt=1006,ef=1007,a4=1007,ps=1008,Tx=1008,jr=1009,RS=1010,PS=1011,Rh=1012,lv=1013,el=1014,Nn=1015,vi=1016,bS=1017,IS=1018,Au=1020,hb=35902,pb=1021,mb=1022,ii=1023,gb=1024,vb=1025,lu=1026,Su=1027,uv=1028,BS=1029,_b=1030,DS=1031,FS=1033,K0=33776,Q0=33777,q0=33778,Z0=33779,Rx=35840,Px=35841,bx=35842,Ix=35843,Bx=36196,Dx=37492,Fx=37496,Lx=37808,Nx=37809,Ox=37810,Ux=37811,zx=37812,kx=37813,Gx=37814,Hx=37815,Vx=37816,Wx=37817,Xx=37818,Jx=37819,jx=37820,Yx=37821,$0=36492,Kx=36494,Qx=36495,yb=36283,qx=36284,Zx=36285,$x=36286,xb=2200,Ab=2201,Sb=2202,vf=2300,_f=2301,eg=2302,ql=2400,Zl=2401,Ph=2402,cv=2500,LS=2501,Eb=0,NS=1,Bg=2,wb=3200,Mb=3201,ll=0,Cb=1,zo="",gr="srgb",Ji="srgb-linear",fv="display-p3",np="display-p3-linear",bh="linear",vn="srgb",Ih="rec709",Bh="p3",l4=0,Vl=7680,u4=7681,c4=7682,f4=7683,d4=34055,h4=34056,p4=5386,m4=512,g4=513,v4=514,_4=515,y4=516,x4=517,A4=518,eA=519,Tb=512,Rb=513,Pb=514,OS=515,bb=516,Ib=517,Bb=518,Db=519,Dh=35044,tA=35048,S4=35040,E4=35045,w4=35049,M4=35041,C4=35046,T4=35050,R4=35042,P4="100",nA="300 es",ao=2e3,Fh=2001;class ta{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[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 n=this._listeners[e.type];if(n!==void 0){e.target=this;const r=n.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}}const Ui=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let NC=1234567;const uu=Math.PI/180,yf=180/Math.PI;function Wr(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ui[i&255]+Ui[i>>8&255]+Ui[i>>16&255]+Ui[i>>24&255]+"-"+Ui[e&255]+Ui[e>>8&255]+"-"+Ui[e>>16&15|64]+Ui[e>>24&255]+"-"+Ui[t&63|128]+Ui[t>>8&255]+"-"+Ui[t>>16&255]+Ui[t>>24&255]+Ui[n&255]+Ui[n>>8&255]+Ui[n>>16&255]+Ui[n>>24&255]).toLowerCase()}function Vn(i,e,t){return Math.max(e,Math.min(t,i))}function US(i,e){return(i%e+e)%e}function b4(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}
vendor: 80,742 bytes, line 37
37function I4(i,e,t){return i!==e?(t-i)/(e-i):0}function th(i,e,t){return(1-t)*i+t*e}function B4(i,e,t,n){return th(i,e,1-Math.exp(-t*n))}function D4(i,e=1){return e-Math.abs(US(i,e*2)-e)}function F4(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function L4(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function N4(i,e){return i+Math.floor(Math.random()*(e-i+1))}function O4(i,e){return i+Math.random()*(e-i)}function U4(i){return i*(.5-Math.random())}function z4(i){i!==void 0&&(NC=i);let e=NC+=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 k4(i){return i*uu}function G4(i){return i*yf}function H4(i){return(i&i-1)===0&&i!==0}function V4(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function W4(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function X4(i,e,t,n,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),u=s((e+n)/2),f=o((e+n)/2),h=s((e-n)/2),p=o((e-n)/2),m=s((n-e)/2),v=o((n-e)/2);switch(r){case"XYX":i.set(a*f,l*h,l*p,a*u);break;case"YZY":i.set(l*p,a*f,l*h,a*u);break;case"ZXZ":i.set(l*h,l*p,a*f,a*u);break;case"XZX":i.set(a*f,l*v,l*m,a*u);break;case"YXY":i.set(l*m,a*f,l*v,a*u);break;case"ZYZ":i.set(l*v,l*m,a*f,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function or(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Ft(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const Vo={DEG2RAD:uu,RAD2DEG:yf,generateUUID:Wr,clamp:Vn,euclideanModulo:US,mapLinear:b4,inverseLerp:I4,lerp:th,damp:B4,pingpong:D4,smoothstep:F4,smootherstep:L4,randInt:N4,randFloat:O4,randFloatSpread:U4,seededRandom:z4,degToRad:k4,radToDeg:G4,isPowerOfTwo:H4,ceilPowerOfTwo:V4,floorPowerOfTwo:W4,setQuaternionFromProperEuler:X4,normalize:Ft,denormalize:or};class Re{constructor(e=0,t=0){Re.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+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 n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*n-o*r+e.x,this.y=s*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Dt{constructor(e,t,n,r,s,o,a,l,u){Dt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,s,o,a,l,u)}set(e,t,n,r,s,o,a,l,u){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]=n,f[7]=o,f[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,s=this.elements,o=n[0],a=n[3],l=n[6],u=n[1],f=n[4],h=n[7],p=n[2],m=n[5],v=n[8],_=r[0],y=r[3],g=r[6],A=r[1],S=r[4],w=r[7],P=r[2],T=r[5],I=r[8];return s[0]=o*_+a*A+l*P,s[3]=o*y+a*S+l*T,s[6]=o*g+a*w+l*I,s[1]=u*_+f*A+h*P,s[4]=u*y+f*S+h*T,s[7]=u*g+f*w+h*I,s[2]=p*_+m*A+v*P,s[5]=p*y+m*S+v*T,s[8]=p*g+m*w+v*I,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],f=e[8];return t*o*f-t*a*u-n*s*f+n*a*l+r*s*u-r*o*l}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],f=e[8],h=f*o-a*u,p=a*l-f*s,m=u*s-o*l,v=t*h+n*p+r*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/v;return e[0]=h*_,e[1]=(r*u-f*n)*_,e[2]=(a*n-r*o)*_,e[3]=p*_,e[4]=(f*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=m*_,e[7]=(n*l-u*t)*_,e[8]=(o*t-n*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,n,r,s,o,a){const l=Math.cos(s),u=Math.sin(s);return this.set(n*l,n*u,-n*(l*o+u*a)+o+e,-r*u,r*l,-r*(-u*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(p1.makeScale(e,t)),this}rotate(e){return this.premultiply(p1.makeRotation(-e)),this}translate(e,t){return this.premultiply(p1.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const p1=new Dt;function Fb(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}const J4={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Hc(i,e){return new J4[i](e)}function Lh(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Lb(){const i=Lh("canvas");return i.style.display="block",i}const OC={};function zS(i){i in OC||(OC[i]=!0,console.warn(i))}function j4(i,e,t){return new Promise(function(n,r){function s(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:n()}}setTimeout(s,t)})}const UC=new Dt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),zC=new Dt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cm={[Ji]:{transfer:bh,primaries:Ih,toReference:i=>i,fromReference:i=>i},[gr]:{transfer:vn,primaries:Ih,toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[np]:{transfer:bh,primaries:Bh,toReference:i=>i.applyMatrix3(zC),fromReference:i=>i.applyMatrix3(UC)},[fv]:{transfer:vn,primaries:Bh,toReference:i=>i.convertSRGBToLinear().applyMatrix3(zC),fromReference:i=>i.applyMatrix3(UC).convertLinearToSRGB()}},Y4=new Set([Ji,np]),ln={enabled:!0,_workingColorSpace:Ji,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!Y4.has(i))throw new Error(`Unsupported working color space, "${i}".`);this._workingColorSpace=i},convert:function(i,e,t){if(this.enabled===!1||e===t||!e||!t)return i;const n=Cm[e].toReference,r=Cm[t].fromReference;return r(n(i))},fromWorkingColorSpace:function(i,e){return this.convert(i,this._workingColorSpace,e)},toWorkingColorSpace:function(i,e){return this.convert(i,e,this._workingColorSpace)},getPrimaries:function(i){return Cm[i].primaries},getTransfer:function(i){return i===zo?bh:Cm[i].transfer}};function tf(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function m1(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}let nc;class Nb{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{nc===void 0&&(nc=Lh("canvas")),nc.width=e.width,nc.height=e.height;const n=nc.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=nc}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=Lh("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=tf(s[o]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(tf(t[n]/255)*255):t[n]=tf(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let K4=0;class $l{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:K4++}),this.uuid=Wr(),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 n={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(g1(r[o].image)):s.push(g1(r[o]))}else s=g1(r);n.url=s}return t||(e.images[this.uuid]=n),n}}function g1(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?Nb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Q4=0;class qt extends ta{constructor(e=qt.DEFAULT_IMAGE,t=qt.DEFAULT_MAPPING,n=Kn,r=Kn,s=Qt,o=ps,a=ii,l=jr,u=qt.DEFAULT_ANISOTROPY,f=zo){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Q4++}),this.uuid=Wr(),this.name="",this.source=new $l(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=l,this.offset=new Re(0,0),this.repeat=new Re(1,1),this.center=new Re(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Dt,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 n={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&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Za)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case As:e.x=e.x-Math.floor(e.x);break;case Kn:e.x=e.x<0?0:1;break;case gf: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 As:e.y=e.y-Math.floor(e.y);break;case Kn:e.y=e.y<0?0:1;break;case gf: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=Za;qt.DEFAULT_ANISOTROPY=1;class cn{constructor(e=0,t=0,n=0,r=1){cn.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,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,n,r){return this.x=e,this.y=t,this.z=n,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,n=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*n+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,n,r,s;const l=e.elements,u=l[0],f=l[4],h=l[8],p=l[1],m=l[5],v=l[9],_=l[2],y=l[6],g=l[10];if(Math.abs(f-p)<.01&&Math.abs(h-_)<.01&&Math.abs(v-y)<.01){if(Math.abs(f+p)<.1&&Math.abs(h+_)<.1&&Math.abs(v+y)<.1&&Math.abs(u+m+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const S=(u+1)/2,w=(m+1)/2,P=(g+1)/2,T=(f+p)/4,I=(h+_)/4,D=(v+y)/4;return S>w&&S>P?S<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(S),r=T/n,s=I/n):w>P?w<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(w),n=T/r,s=D/r):P<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(P),n=I/s,r=D/s),this.set(n,r,s,t),this}let A=Math.sqrt((y-v)*(y-v)+(h-_)*(h-_)+(p-f)*(p-f));return Math.abs(A)<.001&&(A=1),this.x=(y-v)/A,this.y=(h-_)/A,this.z=(p-f)/A,this.w=Math.acos((u+m+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Ob extends ta{constructor(e=1,t=1,n={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new cn(0,0,e,t),this.scissorTest=!1,this.viewport=new cn(0,0,e,t);const r={width:e,height:t,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Qt,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const s=new qt(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);s.flipY=!1,s.generateMipmaps=n.generateMipmaps,s.internalFormat=n.internalFormat,this.textures=[];const o=n.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let 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=n;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 n=0,r=e.textures.length;n<r;n++)this.textures[n]=e.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new $l(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 Tr extends Ob{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class dv extends qt{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=li,this.minFilter=li,this.wrapR=Kn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class q4 extends Tr{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new dv(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class kS extends qt{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=li,this.minFilter=li,this.wrapR=Kn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Z4 extends Tr{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new kS(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class Ci{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,s,o,a){let l=n[r+0],u=n[r+1],f=n[r+2],h=n[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]=u,e[t+2]=f,e[t+3]=h;return}if(a===1){e[t+0]=p,e[t+1]=m,e[t+2]=v,e[t+3]=_;return}if(h!==_||l!==p||u!==m||f!==v){let y=1-a;const g=l*p+u*m+f*v+h*_,A=g>=0?1:-1,S=1-g*g;if(S>Number.EPSILON){const P=Math.sqrt(S),T=Math.atan2(P,g*A);y=Math.sin(y*T)/P,a=Math.sin(a*T)/P}const w=a*A;if(l=l*y+p*w,u=u*y+m*w,f=f*y+v*w,h=h*y+_*w,y===1-a){const P=1/Math.sqrt(l*l+u*u+f*f+h*h);l*=P,u*=P,f*=P,h*=P}}e[t]=l,e[t+1]=u,e[t+2]=f,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,r,s,o){const a=n[r],l=n[r+1],u=n[r+2],f=n[r+3],h=s[o],p=s[o+1],m=s[o+2],v=s[o+3];return e[t]=a*v+f*h+l*m-u*p,e[t+1]=l*v+f*p+u*h-a*m,e[t+2]=u*v+f*m+a*p-l*h,e[t+3]=f*v-a*h-l*p-u*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,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 n=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,u=a(n/2),f=a(r/2),h=a(s/2),p=l(n/2),m=l(r/2),v=l(s/2);switch(o){case"XYZ":this._x=p*f*h+u*m*v,this._y=u*m*h-p*f*v,this._z=u*f*v+p*m*h,this._w=u*f*h-p*m*v;break;case"YXZ":this._x=p*f*h+u*m*v,this._y=u*m*h-p*f*v,this._z=u*f*v-p*m*h,this._w=u*f*h+p*m*v;break;case"ZXY":this._x=p*f*h-u*m*v,this._y=u*m*h+p*f*v,this._z=u*f*v+p*m*h,this._w=u*f*h-p*m*v;break;case"ZYX":this._x=p*f*h-u*m*v,this._y=u*m*h+p*f*v,this._z=u*f*v-p*m*h,this._w=u*f*h+p*m*v;break;case"YZX":this._x=p*f*h+u*m*v,this._y=u*m*h+p*f*v,this._z=u*f*v-p*m*h,this._w=u*f*h-p*m*v;break;case"XZY":this._x=p*f*h-u*m*v,this._y=u*m*h-p*f*v,this._z=u*f*v+p*m*h,this._w=u*f*h+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 n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],u=t[2],f=t[6],h=t[10],p=n+a+h;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(f-l)*m,this._y=(s-u)*m,this._z=(o-r)*m}else if(n>a&&n>h){const m=2*Math.sqrt(1+n-a-h);this._w=(f-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+u)/m}else if(a>h){const m=2*Math.sqrt(1+a-n-h);this._w=(s-u)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+f)/m}else{const m=2*Math.sqrt(1+h-n-a);this._w=(o-r)/m,this._x=(s+u)/m,this._y=(l+f)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const r=Math.min(1,t/n);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 n=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,u=t._z,f=t._w;return this._x=n*f+o*a+r*u-s*l,this._y=r*f+o*l+s*a-n*u,this._z=s*f+o*u+n*l-r*a,this._w=o*f-n*a-r*l-s*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+n*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=n,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*n+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this}const u=Math.sqrt(l),f=Math.atan2(u,a),h=Math.sin((1-t)*f)/u,p=Math.sin(t*f)/u;return this._w=o*h+this._w*p,this._x=n*h+this._x*p,this._y=r*h+this._y*p,this._z=s*h+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),s=Math.sqrt(n);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 H{constructor(e=0,t=0,n=0){H.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}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(kC.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(kC.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6]*r,this.y=s[1]*t+s[4]*n+s[7]*r,this.z=s[2]*t+s[5]*n+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*n+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*n+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*n+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*n+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,u=2*(o*r-a*n),f=2*(a*t-s*r),h=2*(s*n-o*t);return this.x=t+l*u+o*h-a*f,this.y=n+l*f+a*u-s*h,this.z=r+l*h+s*f-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r,this.y=s[1]*t+s[5]*n+s[9]*r,this.z=s[2]*t+s[6]*n+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 n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,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-n*l,this.z=n*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return v1.copy(this).projectOnVector(e),this.sub(v1)}reflect(e){return this.sub(v1.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+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,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,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,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const v1=new H,kC=new Ci;class ji{constructor(e=new H(1/0,1/0,1/0),t=new H(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Ps.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Ps.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ps.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const s=n.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,Ps):Ps.fromBufferAttribute(s,o),Ps.applyMatrix4(e.matrixWorld),this.expandByPoint(Ps);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Tm.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Tm.copy(n.boundingBox)),Tm.applyMatrix4(e.matrixWorld),this.union(Tm)}const 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,Ps),Ps.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(gd),Rm.subVectors(this.max,gd),ic.subVectors(e.a,gd),rc.subVectors(e.b,gd),sc.subVectors(e.c,gd),da.subVectors(rc,ic),ha.subVectors(sc,rc),Ml.subVectors(ic,sc);let t=[0,-da.z,da.y,0,-ha.z,ha.y,0,-Ml.z,Ml.y,da.z,0,-da.x,ha.z,0,-ha.x,Ml.z,0,-Ml.x,-da.y,da.x,0,-ha.y,ha.x,0,-Ml.y,Ml.x,0];return!_1(t,ic,rc,sc,Rm)||(t=[1,0,0,0,1,0,0,0,1],!_1(t,ic,rc,sc,Rm))?!1:(Pm.crossVectors(da,ha),t=[Pm.x,Pm.y,Pm.z],_1(t,ic,rc,sc,Rm))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ps).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ps).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:(Ro[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ro[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ro[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ro[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ro[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ro[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ro[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ro[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ro),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 Ro=[new H,new H,new H,new H,new H,new H,new H,new H],Ps=new H,Tm=new ji,ic=new H,rc=new H,sc=new H,da=new H,ha=new H,Ml=new H,gd=new H,Rm=new H,Pm=new H,Cl=new H;function _1(i,e,t,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){Cl.fromArray(i,s);const a=r.x*Math.abs(Cl.x)+r.y*Math.abs(Cl.y)+r.z*Math.abs(Cl.z),l=e.dot(Cl),u=t.dot(Cl),f=n.dot(Cl);if(Math.max(-Math.max(l,u,f),Math.min(l,u,f))>a)return!1}return!0}const $4=new ji,vd=new H,y1=new H;class Ti{constructor(e=new H,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):$4.setFromPoints(e).getCenter(n);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,n.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 n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;vd.subVectors(e,this.center);const t=vd.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(vd,r/n),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):(y1.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(vd.copy(e.center).add(y1)),this.expandByPoint(vd.copy(e.center).sub(y1))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Po=new H,x1=new H,bm=new H,pa=new H,A1=new H,Im=new H,S1=new H;class Ff{constructor(e=new H,t=new H(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,Po)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Po.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Po.copy(this.origin).addScaledVector(this.direction,t),Po.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){x1.copy(e).add(t).multiplyScalar(.5),bm.copy(t).sub(e).normalize(),pa.copy(this.origin).sub(x1);const s=e.distanceTo(t)*.5,o=-this.direction.dot(bm),a=pa.dot(this.direction),l=-pa.dot(bm),u=pa.lengthSq(),f=Math.abs(1-o*o);let h,p,m,v;if(f>0)if(h=o*l-a,p=o*a-l,v=s*f,h>=0)if(p>=-v)if(p<=v){const _=1/f;h*=_,p*=_,m=h*(h+o*p+2*a)+p*(o*h+p+2*l)+u}else p=s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+u;else p=-s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+u;else p<=-v?(h=Math.max(0,-(-o*s+a)),p=h>0?-s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+u):p<=v?(h=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+u):(h=Math.max(0,-(o*s+a)),p=h>0?s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+u);else p=o>0?-s:s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+u;return n&&n.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(x1).addScaledVector(bm,p),m}intersectSphere(e,t){Po.subVectors(e.center,this.origin);const n=Po.dot(this.direction),r=Po.dot(Po)-n*n,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=n-o,l=n+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 n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,s,o,a,l;const u=1/this.direction.x,f=1/this.direction.y,h=1/this.direction.z,p=this.origin;return u>=0?(n=(e.min.x-p.x)*u,r=(e.max.x-p.x)*u):(n=(e.max.x-p.x)*u,r=(e.min.x-p.x)*u),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),n>o||s>r||((s>n||isNaN(n))&&(n=s),(o<r||isNaN(r))&&(r=o),h>=0?(a=(e.min.z-p.z)*h,l=(e.max.z-p.z)*h):(a=(e.max.z-p.z)*h,l=(e.min.z-p.z)*h),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,Po)!==null}intersectTriangle(e,t,n,r,s){A1.subVectors(t,e),Im.subVectors(n,e),S1.crossVectors(A1,Im);let o=this.direction.dot(S1),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;pa.subVectors(this.origin,e);const l=a*this.direction.dot(Im.crossVectors(pa,Im));if(l<0)return null;const u=a*this.direction.dot(A1.cross(pa));if(u<0||l+u>o)return null;const f=-a*pa.dot(S1);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 mt{constructor(e,t,n,r,s,o,a,l,u,f,h,p,m,v,_,y){mt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,s,o,a,l,u,f,h,p,m,v,_,y)}set(e,t,n,r,s,o,a,l,u,f,h,p,m,v,_,y){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=u,g[6]=f,g[10]=h,g[14]=p,g[3]=m,g[7]=v,g[11]=_,g[15]=y,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 mt().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/oc.setFromMatrixColumn(e,0).length(),s=1/oc.setFromMatrixColumn(e,1).length(),o=1/oc.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*s,t[5]=n[5]*s,t[6]=n[6]*s,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,s=e.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(r),u=Math.sin(r),f=Math.cos(s),h=Math.sin(s);if(e.order==="XYZ"){const p=o*f,m=o*h,v=a*f,_=a*h;t[0]=l*f,t[4]=-l*h,t[8]=u,t[1]=m+v*u,t[5]=p-_*u,t[9]=-a*l,t[2]=_-p*u,t[6]=v+m*u,t[10]=o*l}else if(e.order==="YXZ"){const p=l*f,m=l*h,v=u*f,_=u*h;t[0]=p+_*a,t[4]=v*a-m,t[8]=o*u,t[1]=o*h,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*h,v=u*f,_=u*h;t[0]=p-_*a,t[4]=-o*h,t[8]=v+m*a,t[1]=m+v*a,t[5]=o*f,t[9]=_-p*a,t[2]=-o*u,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*f,m=o*h,v=a*f,_=a*h;t[0]=l*f,t[4]=v*u-m,t[8]=p*u+_,t[1]=l*h,t[5]=_*u+p,t[9]=m*u-v,t[2]=-u,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*u,v=a*l,_=a*u;t[0]=l*f,t[4]=_-p*h,t[8]=v*h+m,t[1]=h,t[5]=o*f,t[9]=-a*f,t[2]=-u*f,t[6]=m*h+v,t[10]=p-_*h}else if(e.order==="XZY"){const p=o*l,m=o*u,v=a*l,_=a*u;t[0]=l*f,t[4]=-h,t[8]=u*f,t[1]=p*h+_,t[5]=o*f,t[9]=m*h-v,t[2]=v*h-m,t[6]=a*f,t[10]=_*h+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(eO,e,tO)}lookAt(e,t,n){const r=this.elements;return Dr.subVectors(e,t),Dr.lengthSq()===0&&(Dr.z=1),Dr.normalize(),ma.crossVectors(n,Dr),ma.lengthSq()===0&&(Math.abs(n.z)===1?Dr.x+=1e-4:Dr.z+=1e-4,Dr.normalize(),ma.crossVectors(n,Dr)),ma.normalize(),Bm.crossVectors(Dr,ma),r[0]=ma.x,r[4]=Bm.x,r[8]=Dr.x,r[1]=ma.y,r[5]=Bm.y,r[9]=Dr.y,r[2]=ma.z,r[6]=Bm.z,r[10]=Dr.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,s=this.elements,o=n[0],a=n[4],l=n[8],u=n[12],f=n[1],h=n[5],p=n[9],m=n[13],v=n[2],_=n[6],y=n[10],g=n[14],A=n[3],S=n[7],w=n[11],P=n[15],T=r[0],I=r[4],D=r[8],C=r[12],b=r[1],N=r[5],j=r[9],Y=r[13],q=r[2],re=r[6],Q=r[10],pe=r[14],k=r[3],ne=r[7],te=r[11],ce=r[15];return s[0]=o*T+a*b+l*q+u*k,s[4]=o*I+a*N+l*re+u*ne,s[8]=o*D+a*j+l*Q+u*te,s[12]=o*C+a*Y+l*pe+u*ce,s[1]=f*T+h*b+p*q+m*k,s[5]=f*I+h*N+p*re+m*ne,s[9]=f*D+h*j+p*Q+m*te,s[13]=f*C+h*Y+p*pe+m*ce,s[2]=v*T+_*b+y*q+g*k,s[6]=v*I+_*N+y*re+g*ne,s[10]=v*D+_*j+y*Q+g*te,s[14]=v*C+_*Y+y*pe+g*ce,s[3]=A*T+S*b+w*q+P*k,s[7]=A*I+S*N+w*re+P*ne,s[11]=A*D+S*j+w*Q+P*te,s[15]=A*C+S*Y+w*pe+P*ce,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],u=e[13],f=e[2],h=e[6],p=e[10],m=e[14],v=e[3],_=e[7],y=e[11],g=e[15];return v*(+s*l*h-r*u*h-s*a*p+n*u*p+r*a*m-n*l*m)+_*(+t*l*m-t*u*p+s*o*p-r*o*m+r*u*f-s*l*f)+y*(+t*u*h-t*a*m-s*o*h+n*o*m+s*a*f-n*u*f)+g*(-r*a*f-t*l*h+t*a*p+r*o*h-n*o*p+n*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,n){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]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7],f=e[8],h=e[9],p=e[10],m=e[11],v=e[12],_=e[13],y=e[14],g=e[15],A=h*y*u-_*p*u+_*l*m-a*y*m-h*l*g+a*p*g,S=v*p*u-f*y*u-v*l*m+o*y*m+f*l*g-o*p*g,w=f*_*u-v*h*u+v*a*m-o*_*m-f*a*g+o*h*g,P=v*h*l-f*_*l-v*a*p+o*_*p+f*a*y-o*h*y,T=t*A+n*S+r*w+s*P;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/T;return e[0]=A*I,e[1]=(_*p*s-h*y*s-_*r*m+n*y*m+h*r*g-n*p*g)*I,e[2]=(a*y*s-_*l*s+_*r*u-n*y*u-a*r*g+n*l*g)*I,e[3]=(h*l*s-a*p*s-h*r*u+n*p*u+a*r*m-n*l*m)*I,e[4]=S*I,e[5]=(f*y*s-v*p*s+v*r*m-t*y*m-f*r*g+t*p*g)*I,e[6]=(v*l*s-o*y*s-v*r*u+t*y*u+o*r*g-t*l*g)*I,e[7]=(o*p*s-f*l*s+f*r*u-t*p*u-o*r*m+t*l*m)*I,e[8]=w*I,e[9]=(v*h*s-f*_*s-v*n*m+t*_*m+f*n*g-t*h*g)*I,e[10]=(o*_*s-v*a*s+v*n*u-t*_*u-o*n*g+t*a*g)*I,e[11]=(f*a*s-o*h*s-f*n*u+t*h*u+o*n*m-t*a*m)*I,e[12]=P*I,e[13]=(f*_*r-v*h*r+v*n*p-t*_*p-f*n*y+t*h*y)*I,e[14]=(v*a*r-o*_*r-v*n*l+t*_*l+o*n*y-t*a*y)*I,e[15]=(o*h*r-f*a*r+f*n*l-t*h*l-o*n*p+t*a*p)*I,this}scale(e){const t=this.elements,n=e.x,r=e.y,s=e.z;return t[0]*=n,t[4]*=r,t[8]*=s,t[1]*=n,t[5]*=r,t[9]*=s,t[2]*=n,t[6]*=r,t[10]*=s,t[3]*=n,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],n=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,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),s=1-n,o=e.x,a=e.y,l=e.z,u=s*o,f=s*a;return this.set(u*o+n,u*a-r*l,u*l+r*a,0,u*a+r*l,f*a+n,f*l-r*o,0,u*l-r*a,f*l+r*o,s*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,s,o){return this.set(1,n,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,u=s+s,f=o+o,h=a+a,p=s*u,m=s*f,v=s*h,_=o*f,y=o*h,g=a*h,A=l*u,S=l*f,w=l*h,P=n.x,T=n.y,I=n.z;return r[0]=(1-(_+g))*P,r[1]=(m+w)*P,r[2]=(v-S)*P,r[3]=0,r[4]=(m-w)*T,r[5]=(1-(p+g))*T,r[6]=(y+A)*T,r[7]=0,r[8]=(v+S)*I,r[9]=(y-A)*I,r[10]=(1-(p+_))*I,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let s=oc.set(r[0],r[1],r[2]).length();const o=oc.set(r[4],r[5],r[6]).length(),a=oc.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],bs.copy(this);const u=1/s,f=1/o,h=1/a;return bs.elements[0]*=u,bs.elements[1]*=u,bs.elements[2]*=u,bs.elements[4]*=f,bs.elements[5]*=f,bs.elements[6]*=f,bs.elements[8]*=h,bs.elements[9]*=h,bs.elements[10]*=h,t.setFromRotationMatrix(bs),n.x=s,n.y=o,n.z=a,this}makePerspective(e,t,n,r,s,o,a=ao){const l=this.elements,u=2*s/(t-e),f=2*s/(n-r),h=(t+e)/(t-e),p=(n+r)/(n-r);let m,v;if(a===ao)m=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===Fh)m=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=u,l[4]=0,l[8]=h,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,n,r,s,o,a=ao){const l=this.elements,u=1/(t-e),f=1/(n-r),h=1/(o-s),p=(t+e)*u,m=(n+r)*f;let v,_;if(a===ao)v=(o+s)*h,_=-2*h;else if(a===Fh)v=s*h,_=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*u,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,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const oc=new H,bs=new mt,eO=new H(0,0,0),tO=new H(1,1,1),ma=new H,Bm=new H,Dr=new H,GC=new mt,HC=new Ci;class Yr{constructor(e=0,t=0,n=0,r=Yr.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,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,n,r=this._order){return this._x=e,this._y=t,this._z=n,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,n=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],u=r[5],f=r[9],h=r[2],p=r[6],m=r[10];switch(t){case"XYZ":this._y=Math.asin(Vn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-f,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Vn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(Vn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-h,m),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Vn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(Vn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-f,u),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Vn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,u),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,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return GC.makeRotationFromQuaternion(e),this.setFromRotationMatrix(GC,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return HC.setFromEuler(this),this.setFromQuaternion(HC,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}}Yr.DEFAULT_ORDER="XYZ";class cu{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 nO=0;const VC=new H,ac=new Ci,bo=new mt,Dm=new H,_d=new H,iO=new H,rO=new Ci,WC=new H(1,0,0),XC=new H(0,1,0),JC=new H(0,0,1),jC={type:"added"},sO={type:"removed"},lc={type:"childadded",child:null},E1={type:"childremoved",child:null};class Zt extends ta{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:nO++}),this.uuid=Wr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Zt.DEFAULT_UP.clone();const e=new H,t=new Yr,n=new Ci,r=new H(1,1,1);function s(){n.setFromEuler(t,!1)}function o(){t.setFromQuaternion(n,void 0,!1)}t._onChange(s),n._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:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new mt},normalMatrix:{value:new Dt}}),this.matrix=new mt,this.matrixWorld=new mt,this.matrixAutoUpdate=Zt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Zt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new cu,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 ac.setFromAxisAngle(e,t),this.quaternion.multiply(ac),this}rotateOnWorldAxis(e,t){return ac.setFromAxisAngle(e,t),this.quaternion.premultiply(ac),this}rotateX(e){return this.rotateOnAxis(WC,e)}rotateY(e){return this.rotateOnAxis(XC,e)}rotateZ(e){return this.rotateOnAxis(JC,e)}translateOnAxis(e,t){return VC.copy(e).applyQuaternion(this.quaternion),this.position.add(VC.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(WC,e)}translateY(e){return this.translateOnAxis(XC,e)}translateZ(e){return this.translateOnAxis(JC,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,n){e.isVector3?Dm.copy(e):Dm.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),_d.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?bo.lookAt(_d,Dm,this.up):bo.lookAt(Dm,_d,this.up),this.quaternion.setFromRotationMatrix(bo),r&&(bo.extractRotation(r.matrixWorld),ac.setFromRotationMatrix(bo),this.quaternion.premultiply(ac.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(jC),lc.child=e,this.dispatchEvent(lc),lc.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(sO),E1.child=e,this.dispatchEvent(E1),E1.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),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(jC),lc.child=e,this.dispatchEvent(lc),lc.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_d,e,iO),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(_d,rO,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.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 n=0,r=t.length;n<r;n++){const s=t[n];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.matrixWorldAutoUpdate===!0&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),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++){const a=r[s];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.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.maxGeometryCount=this._maxGeometryCount,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.boundingSphere.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 u=0,f=l.length;u<f;u++){const h=l[u];s(e.shapes,h)}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,u=this.material.length;l<u;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),u=o(e.textures),f=o(e.images),h=o(e.shapes),p=o(e.skeletons),m=o(e.animations),v=o(e.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),u.length>0&&(n.textures=u),f.length>0&&(n.images=f),h.length>0&&(n.shapes=h),p.length>0&&(n.skeletons=p),m.length>0&&(n.animations=m),v.length>0&&(n.nodes=v)}return n.object=r,n;function o(a){const l=[];for(const u in a){const f=a[u];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 n=0;n<e.children.length;n++){const r=e.children[n];this.add(r.clone())}return this}}Zt.DEFAULT_UP=new H(0,1,0);Zt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Zt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Is=new H,Io=new H,w1=new H,Bo=new H,uc=new H,cc=new H,YC=new H,M1=new H,C1=new H,T1=new H;class zr{constructor(e=new H,t=new H,n=new H){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Is.subVectors(e,t),r.cross(Is);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,n,r,s){Is.subVectors(r,t),Io.subVectors(n,t),w1.subVectors(e,t);const o=Is.dot(Is),a=Is.dot(Io),l=Is.dot(w1),u=Io.dot(Io),f=Io.dot(w1),h=o*u-a*a;if(h===0)return s.set(0,0,0),null;const p=1/h,m=(u*l-a*f)*p,v=(o*f-a*l)*p;return s.set(1-m-v,v,m)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Bo)===null?!1:Bo.x>=0&&Bo.y>=0&&Bo.x+Bo.y<=1}static getInterpolation(e,t,n,r,s,o,a,l){return this.getBarycoord(e,t,n,r,Bo)===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,Bo.x),l.addScaledVector(o,Bo.y),l.addScaledVector(a,Bo.z),l)}static isFrontFacing(e,t,n,r){return Is.subVectors(n,t),Io.subVectors(e,t),Is.cross(Io).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),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 Is.subVectors(this.c,this.b),Io.subVectors(this.a,this.b),Is.cross(Io).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return zr.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return zr.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,s){return zr.getInterpolation(e,this.a,this.b,this.c,t,n,r,s)}containsPoint(e){return zr.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return zr.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,s=this.c;let o,a;uc.subVectors(r,n),cc.subVectors(s,n),M1.subVectors(e,n);const l=uc.dot(M1),u=cc.dot(M1);if(l<=0&&u<=0)return t.copy(n);C1.subVectors(e,r);const f=uc.dot(C1),h=cc.dot(C1);if(f>=0&&h<=f)return t.copy(r);const p=l*h-f*u;if(p<=0&&l>=0&&f<=0)return o=l/(l-f),t.copy(n).addScaledVector(uc,o);T1.subVectors(e,s);const m=uc.dot(T1),v=cc.dot(T1);if(v>=0&&m<=v)return t.copy(s);const _=m*u-l*v;if(_<=0&&u>=0&&v<=0)return a=u/(u-v),t.copy(n).addScaledVector(cc,a);const y=f*v-m*h;if(y<=0&&h-f>=0&&m-v>=0)return YC.subVectors(s,r),a=(h-f)/(h-f+(m-v)),t.copy(r).addScaledVector(YC,a);const g=1/(y+_+p);return o=_*g,a=p*g,t.copy(n).addScaledVector(uc,o).addScaledVector(cc,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Ub={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},ga={h:0,s:0,l:0},Fm={h:0,s:0,l:0};function R1(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class He{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const 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,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=gr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ln.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=ln.workingColorSpace){return this.r=e,this.g=t,this.b=n,ln.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=ln.workingColorSpace){if(e=US(e,1),t=Vn(t,0,1),n=Vn(n,0,1),t===0)this.r=this.g=this.b=n;else{const s=n<=.5?n*(1+t):n+t-n*t,o=2*n-s;this.r=R1(o,s,e+1/3),this.g=R1(o,s,e),this.b=R1(o,s,e-1/3)}return ln.toWorkingColorSpace(this,r),this}setStyle(e,t=gr){function n(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 n(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 n(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 n(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=gr){const n=Ub[e.toLowerCase()];return n!==void 0?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=tf(e.r),this.g=tf(e.g),this.b=tf(e.b),this}copyLinearToSRGB(e){return this.r=m1(e.r),this.g=m1(e.g),this.b=m1(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=gr){return ln.fromWorkingColorSpace(zi.copy(this),e),Math.round(Vn(zi.r*255,0,255))*65536+Math.round(Vn(zi.g*255,0,255))*256+Math.round(Vn(zi.b*255,0,255))}getHexString(e=gr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ln.workingColorSpace){ln.fromWorkingColorSpace(zi.copy(this),t);const n=zi.r,r=zi.g,s=zi.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,u;const f=(a+o)/2;if(a===o)l=0,u=0;else{const h=o-a;switch(u=f<=.5?h/(o+a):h/(2-o-a),o){case n:l=(r-s)/h+(r<s?6:0);break;case r:l=(s-n)/h+2;break;case s:l=(n-r)/h+4;break}l/=6}return e.h=l,e.s=u,e.l=f,e}getRGB(e,t=ln.workingColorSpace){return ln.fromWorkingColorSpace(zi.copy(this),t),e.r=zi.r,e.g=zi.g,e.b=zi.b,e}getStyle(e=gr){ln.fromWorkingColorSpace(zi.copy(this),e);const t=zi.r,n=zi.g,r=zi.b;return e!==gr?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(ga),this.setHSL(ga.h+e,ga.s+t,ga.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}
vendor: 2,644 bytes, line 37
37lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(ga),e.getHSL(Fm);const n=th(ga.h,Fm.h,t),r=th(ga.s,Fm.s,t),s=th(ga.l,Fm.l,t);return this.setHSL(n,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,n=this.g,r=this.b,s=e.elements;return this.r=s[0]*t+s[3]*n+s[6]*r,this.g=s[1]*t+s[4]*n+s[7]*r,this.b=s[2]*t+s[5]*n+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 zi=new He;He.NAMES=Ub;let oO=0;class Qn extends ta{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:oO++}),this.uuid=Wr(),this.name="",this.type="Material",this.blending=Ja,this.side=xs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=bg,this.blendDst=Ig,this.blendEquation=Pa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new He(0,0,0),this.blendAlpha=0,this.depthFunc=Ch,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=eA,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Vl,this.stencilZFail=Vl,this.stencilZPass=Vl,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===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(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};
vendor: 51,983 bytes, lines 37-135
37n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Ja&&(n.blending=this.blending),this.side!==xs&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==bg&&(n.blendSrc=this.blendSrc),this.blendDst!==Ig&&(n.blendDst=this.blendDst),this.blendEquation!==Pa&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Ch&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==eA&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Vl&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Vl&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Vl&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function 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&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const r=t.length;n=new Array(r);for(let s=0;s!==r;++s)n[s]=t[s].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Xi extends Qn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new He(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 Yr,this.combine=tp,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 ko=aO();function aO(){const i=new ArrayBuffer(4),e=new Float32Array(i),t=new Uint32Array(i),n=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const u=l-127;u<-27?(n[l]=0,n[l|256]=32768,r[l]=24,r[l|256]=24):u<-14?(n[l]=1024>>-u-14,n[l|256]=1024>>-u-14|32768,r[l]=-u-1,r[l|256]=-u-1):u<=15?(n[l]=u+15<<10,n[l|256]=u+15<<10|32768,r[l]=13,r[l|256]=13):u<128?(n[l]=31744,n[l|256]=64512,r[l]=24,r[l|256]=24):(n[l]=31744,n[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let u=l<<13,f=0;for(;(u&8388608)===0;)u<<=1,f-=8388608;u&=-8388609,f+=947912704,s[l]=u|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:n,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function mr(i){Math.abs(i)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),i=Vn(i,-65504,65504),ko.floatView[0]=i;const e=ko.uint32View[0],t=e>>23&511;return ko.baseTable[t]+((e&8388607)>>ko.shiftTable[t])}function Gd(i){const e=i>>10;return ko.uint32View[0]=ko.mantissaTable[ko.offsetTable[e]+(i&1023)]+ko.exponentTable[e],ko.floatView[0]}const eu={toHalfFloat:mr,fromHalfFloat:Gd},ei=new H,Lm=new Re;class $t{constructor(e,t,n=!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=n,this.usage=Dh,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Nn,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return zS("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Lm.fromBufferAttribute(this,t),Lm.applyMatrix3(e),this.setXY(t,Lm.x,Lm.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix3(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix4(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyNormalMatrix(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.transformDirection(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=or(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ft(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=or(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ft(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=or(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ft(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=or(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ft(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=or(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ft(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array),r=Ft(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,s){return e*=this.itemSize,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array),r=Ft(r,this.array),s=Ft(s,this.array)),this.array[e+0]=t,this.array[e+1]=n,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!==Dh&&(e.usage=this.usage),e}}class lO extends $t{constructor(e,t,n){super(new Int8Array(e),t,n)}}class uO extends $t{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class cO extends $t{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class fO extends $t{constructor(e,t,n){super(new Int16Array(e),t,n)}}class GS extends $t{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class dO extends $t{constructor(e,t,n){super(new Int32Array(e),t,n)}}class HS extends $t{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class hO extends $t{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=Gd(this.array[e*this.itemSize]);return this.normalized&&(t=or(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ft(t,this.array)),this.array[e*this.itemSize]=mr(t),this}getY(e){let t=Gd(this.array[e*this.itemSize+1]);return this.normalized&&(t=or(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ft(t,this.array)),this.array[e*this.itemSize+1]=mr(t),this}getZ(e){let t=Gd(this.array[e*this.itemSize+2]);return this.normalized&&(t=or(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ft(t,this.array)),this.array[e*this.itemSize+2]=mr(t),this}getW(e){let t=Gd(this.array[e*this.itemSize+3]);return this.normalized&&(t=or(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ft(t,this.array)),this.array[e*this.itemSize+3]=mr(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array)),this.array[e+0]=mr(t),this.array[e+1]=mr(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array),r=Ft(r,this.array)),this.array[e+0]=mr(t),this.array[e+1]=mr(n),this.array[e+2]=mr(r),this}setXYZW(e,t,n,r,s){return e*=this.itemSize,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array),r=Ft(r,this.array),s=Ft(s,this.array)),this.array[e+0]=mr(t),this.array[e+1]=mr(n),this.array[e+2]=mr(r),this.array[e+3]=mr(s),this}}class ht extends $t{constructor(e,t,n){super(new Float32Array(e),t,n)}}let pO=0;const os=new mt,P1=new Zt,fc=new H,Fr=new ji,yd=new ji,pi=new H;class Bt extends ta{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:pO++}),this.uuid=Wr(),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(Fb(e)?HS:GS)(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,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const s=new Dt().getNormalMatrix(e);n.applyNormalMatrix(s),n.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 os.makeRotationFromQuaternion(e),this.applyMatrix4(os),this}rotateX(e){return os.makeRotationX(e),this.applyMatrix4(os),this}rotateY(e){return os.makeRotationY(e),this.applyMatrix4(os),this}rotateZ(e){return os.makeRotationZ(e),this.applyMatrix4(os),this}translate(e,t,n){return os.makeTranslation(e,t,n),this.applyMatrix4(os),this}scale(e,t,n){return os.makeScale(e,t,n),this.applyMatrix4(os),this}lookAt(e){return P1.lookAt(e),P1.updateMatrix(),this.applyMatrix4(P1.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(fc).negate(),this.translate(fc.x,fc.y,fc.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const s=e[n];t.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new ht(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ji);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 H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const s=t[n];Fr.setFromBufferAttribute(s),this.morphTargetsRelative?(pi.addVectors(this.boundingBox.min,Fr.min),this.boundingBox.expandByPoint(pi),pi.addVectors(this.boundingBox.max,Fr.max),this.boundingBox.expandByPoint(pi)):(this.boundingBox.expandByPoint(Fr.min),this.boundingBox.expandByPoint(Fr.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 Ti);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 H,1/0);return}if(e){const n=this.boundingSphere.center;if(Fr.setFromBufferAttribute(e),t)for(let s=0,o=t.length;s<o;s++){const a=t[s];yd.setFromBufferAttribute(a),this.morphTargetsRelative?(pi.addVectors(Fr.min,yd.min),Fr.expandByPoint(pi),pi.addVectors(Fr.max,yd.max),Fr.expandByPoint(pi)):(Fr.expandByPoint(yd.min),Fr.expandByPoint(yd.max))}Fr.getCenter(n);let r=0;for(let s=0,o=e.count;s<o;s++)pi.fromBufferAttribute(e,s),r=Math.max(r,n.distanceToSquared(pi));if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s],l=this.morphTargetsRelative;for(let u=0,f=a.count;u<f;u++)pi.fromBufferAttribute(a,u),l&&(fc.fromBufferAttribute(e,u),pi.add(fc)),r=Math.max(r,n.distanceToSquared(pi))}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 n=t.position,r=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new $t(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let D=0;D<n.count;D++)a[D]=new H,l[D]=new H;const u=new H,f=new H,h=new H,p=new Re,m=new Re,v=new Re,_=new H,y=new H;function g(D,C,b){u.fromBufferAttribute(n,D),f.fromBufferAttribute(n,C),h.fromBufferAttribute(n,b),p.fromBufferAttribute(s,D),m.fromBufferAttribute(s,C),v.fromBufferAttribute(s,b),f.sub(u),h.sub(u),m.sub(p),v.sub(p);const N=1/(m.x*v.y-v.x*m.y);!isFinite(N)||(_.copy(f).multiplyScalar(v.y).addScaledVector(h,-m.y).multiplyScalar(N),y.copy(h).multiplyScalar(m.x).addScaledVector(f,-v.x).multiplyScalar(N),a[D].add(_),a[C].add(_),a[b].add(_),l[D].add(y),l[C].add(y),l[b].add(y))}let A=this.groups;A.length===0&&(A=[{start:0,count:e.count}]);for(let D=0,C=A.length;D<C;++D){const b=A[D],N=b.start,j=b.count;for(let Y=N,q=N+j;Y<q;Y+=3)g(e.getX(Y+0),e.getX(Y+1),e.getX(Y+2))}const S=new H,w=new H,P=new H,T=new H;function I(D){P.fromBufferAttribute(r,D),T.copy(P);const C=a[D];S.copy(C),S.sub(P.multiplyScalar(P.dot(C))).normalize(),w.crossVectors(T,C);const N=w.dot(l[D])<0?-1:1;o.setXYZW(D,S.x,S.y,S.z,N)}for(let D=0,C=A.length;D<C;++D){const b=A[D],N=b.start,j=b.count;for(let Y=N,q=N+j;Y<q;Y+=3)I(e.getX(Y+0)),I(e.getX(Y+1)),I(e.getX(Y+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new $t(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let p=0,m=n.count;p<m;p++)n.setXYZ(p,0,0,0);const r=new H,s=new H,o=new H,a=new H,l=new H,u=new H,f=new H,h=new H;if(e)for(let p=0,m=e.count;p<m;p+=3){const v=e.getX(p+0),_=e.getX(p+1),y=e.getX(p+2);r.fromBufferAttribute(t,v),s.fromBufferAttribute(t,_),o.fromBufferAttribute(t,y),f.subVectors(o,s),h.subVectors(r,s),f.cross(h),a.fromBufferAttribute(n,v),l.fromBufferAttribute(n,_),u.fromBufferAttribute(n,y),a.add(f),l.add(f),u.add(f),n.setXYZ(v,a.x,a.y,a.z),n.setXYZ(_,l.x,l.y,l.z),n.setXYZ(y,u.x,u.y,u.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),h.subVectors(r,s),f.cross(h),n.setXYZ(p+0,f.x,f.y,f.z),n.setXYZ(p+1,f.x,f.y,f.z),n.setXYZ(p+2,f.x,f.y,f.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)pi.fromBufferAttribute(e,t),pi.normalize(),e.setXYZ(t,pi.x,pi.y,pi.z)}toNonIndexed(){function e(a,l){const u=a.array,f=a.itemSize,h=a.normalized,p=new u.constructor(l.length*f);let m=0,v=0;for(let _=0,y=l.length;_<y;_++){a.isInterleavedBufferAttribute?m=l[_]*a.data.stride+a.offset:m=l[_]*f;for(let g=0;g<f;g++)p[v++]=u[m++]}return new $t(p,f,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Bt,n=this.index.array,r=this.attributes;for(const a in r){const l=r[a],u=e(l,n);t.setAttribute(a,u)}const s=this.morphAttributes;for(const a in s){const l=[],u=s[a];for(let f=0,h=u.length;f<h;f++){const p=u[f],m=e(p,n);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 u=o[a];t.addGroup(u.start,u.count,u.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 u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const u=n[l];e.data.attributes[l]=u.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],f=[];for(let h=0,p=u.length;h<p;h++){const m=u[h];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 n=e.index;n!==null&&this.setIndex(n.clone(t));const r=e.attributes;for(const u in r){const f=r[u];this.setAttribute(u,f.clone(t))}const s=e.morphAttributes;for(const u in s){const f=[],h=s[u];for(let p=0,m=h.length;p<m;p++)f.push(h[p].clone(t));this.morphAttributes[u]=f}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let u=0,f=o.length;u<f;u++){const h=o[u];this.addGroup(h.start,h.count,h.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 KC=new mt,Tl=new Ff,Nm=new Ti,QC=new H,dc=new H,hc=new H,pc=new H,b1=new H,Om=new H,Um=new Re,zm=new Re,km=new Re,qC=new H,ZC=new H,$C=new H,Gm=new H,Hm=new H;class Mn extends Zt{constructor(e=new Bt,t=new Xi){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,n=Object.keys(t);if(n.length>0){const r=t[n[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 n=this.geometry,r=n.attributes.position,s=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){Om.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const f=a[l],h=s[l];f!==0&&(b1.fromBufferAttribute(h,e),o?Om.addScaledVector(b1,f):Om.addScaledVector(b1.sub(t),f))}t.add(Om)}return t}raycast(e,t){const n=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Nm.copy(n.boundingSphere),Nm.applyMatrix4(s),Tl.copy(e.ray).recast(e.near),!(Nm.containsPoint(Tl.origin)===!1&&(Tl.intersectSphere(Nm,QC)===null||Tl.origin.distanceToSquared(QC)>(e.far-e.near)**2))&&(KC.copy(s).invert(),Tl.copy(e.ray).applyMatrix4(KC),!(n.boundingBox!==null&&Tl.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Tl)))}_computeIntersections(e,t,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,u=s.attributes.uv,f=s.attributes.uv1,h=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 y=p[v],g=o[y.materialIndex],A=Math.max(y.start,m.start),S=Math.min(a.count,Math.min(y.start+y.count,m.start+m.count));for(let w=A,P=S;w<P;w+=3){const T=a.getX(w),I=a.getX(w+1),D=a.getX(w+2);r=Vm(this,g,e,n,u,f,h,T,I,D),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=y.materialIndex,t.push(r))}}else{const v=Math.max(0,m.start),_=Math.min(a.count,m.start+m.count);for(let y=v,g=_;y<g;y+=3){const A=a.getX(y),S=a.getX(y+1),w=a.getX(y+2);r=Vm(this,o,e,n,u,f,h,A,S,w),r&&(r.faceIndex=Math.floor(y/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,_=p.length;v<_;v++){const y=p[v],g=o[y.materialIndex],A=Math.max(y.start,m.start),S=Math.min(l.count,Math.min(y.start+y.count,m.start+m.count));for(let w=A,P=S;w<P;w+=3){const T=w,I=w+1,D=w+2;r=Vm(this,g,e,n,u,f,h,T,I,D),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=y.materialIndex,t.push(r))}}else{const v=Math.max(0,m.start),_=Math.min(l.count,m.start+m.count);for(let y=v,g=_;y<g;y+=3){const A=y,S=y+1,w=y+2;r=Vm(this,o,e,n,u,f,h,A,S,w),r&&(r.faceIndex=Math.floor(y/3),t.push(r))}}}}function mO(i,e,t,n,r,s,o,a){let l;if(e.side===Mi?l=n.intersectTriangle(o,s,r,!0,a):l=n.intersectTriangle(r,s,o,e.side===xs,a),l===null)return null;Hm.copy(a),Hm.applyMatrix4(i.matrixWorld);const u=t.ray.origin.distanceTo(Hm);return u<t.near||u>t.far?null:{distance:u,point:Hm.clone(),object:i}}function Vm(i,e,t,n,r,s,o,a,l,u){i.getVertexPosition(a,dc),i.getVertexPosition(l,hc),i.getVertexPosition(u,pc);const f=mO(i,e,t,n,dc,hc,pc,Gm);if(f){r&&(Um.fromBufferAttribute(r,a),zm.fromBufferAttribute(r,l),km.fromBufferAttribute(r,u),f.uv=zr.getInterpolation(Gm,dc,hc,pc,Um,zm,km,new Re)),s&&(Um.fromBufferAttribute(s,a),zm.fromBufferAttribute(s,l),km.fromBufferAttribute(s,u),f.uv1=zr.getInterpolation(Gm,dc,hc,pc,Um,zm,km,new Re)),o&&(qC.fromBufferAttribute(o,a),ZC.fromBufferAttribute(o,l),$C.fromBufferAttribute(o,u),f.normal=zr.getInterpolation(Gm,dc,hc,pc,qC,ZC,$C,new H),f.normal.dot(n.direction)>0&&f.normal.multiplyScalar(-1));const h={a,b:l,c:u,normal:new H,materialIndex:0};zr.getNormal(dc,hc,pc,h.normal),f.face=h}return f}class ul extends Bt{constructor(e=1,t=1,n=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],u=[],f=[],h=[];let p=0,m=0;v("z","y","x",-1,-1,n,t,e,o,s,0),v("z","y","x",1,-1,n,t,-e,o,s,1),v("x","z","y",1,1,e,n,t,r,o,2),v("x","z","y",1,-1,e,n,-t,r,o,3),v("x","y","z",1,-1,e,t,n,r,s,4),v("x","y","z",-1,-1,e,t,-n,r,s,5),this.setIndex(l),this.setAttribute("position",new ht(u,3)),this.setAttribute("normal",new ht(f,3)),this.setAttribute("uv",new ht(h,2));function v(_,y,g,A,S,w,P,T,I,D,C){const b=w/I,N=P/D,j=w/2,Y=P/2,q=T/2,re=I+1,Q=D+1;let pe=0,k=0;const ne=new H;for(let te=0;te<Q;te++){const ce=te*N-Y;for(let _e=0;_e<re;_e++){const Fe=_e*b-j;ne[_]=Fe*A,ne[y]=ce*S,ne[g]=q,u.push(ne.x,ne.y,ne.z),ne[_]=0,ne[y]=0,ne[g]=T>0?1:-1,f.push(ne.x,ne.y,ne.z),h.push(_e/I),h.push(1-te/D),pe+=1}}for(let te=0;te<D;te++)for(let ce=0;ce<I;ce++){const _e=p+ce+re*te,Fe=p+ce+re*(te+1),ue=p+(ce+1)+re*(te+1),Ee=p+(ce+1)+re*te;l.push(_e,Fe,Ee),l.push(Fe,ue,Ee),k+=6}a.addGroup(m,k,C),m+=k,p+=pe}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ul(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function xf(i){const e={};for(const t in i){e[t]={};for(const n in i[t]){const r=i[t][n];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][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function rr(i){const e={};for(let t=0;t<i.length;t++){const n=xf(i[t]);for(const r in n)e[r]=n[r]}return e}function gO(i){const e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function zb(i){const e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:ln.workingColorSpace}const VS={clone:xf,merge:rr};var vO=`void main() { 38 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 39}`,_O=`void main() { 40 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 41}`;class ur extends Qn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=vO,this.fragmentShader=_O,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=xf(e.uniforms),this.uniformsGroups=gO(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 n={};for(const r in this.extensions)this.extensions[r]===!0&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class ip extends Zt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new mt,this.projectionMatrix=new mt,this.projectionMatrixInverse=new mt,this.coordinateSystem=ao}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 va=new H,eT=new Re,tT=new Re;class oi extends ip{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,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=yf*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(uu*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return yf*2*Math.atan(Math.tan(uu*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){va.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(va.x,va.y).multiplyScalar(-e/va.z),va.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(va.x,va.y).multiplyScalar(-e/va.z)}getViewSize(e,t){return this.getViewBounds(e,eT,tT),t.subVectors(tT,eT)}setViewOffset(e,t,n,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=n,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(uu*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*n/u,r*=o.width/l,n*=o.height/u}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-n,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 mc=-90,gc=1;class kb extends Zt{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new oi(mc,gc,e,t);r.layers=this.layers,this.add(r);const s=new oi(mc,gc,e,t);s.layers=this.layers,this.add(s);const o=new oi(mc,gc,e,t);o.layers=this.layers,this.add(o);const a=new oi(mc,gc,e,t);a.layers=this.layers,this.add(a);const l=new oi(mc,gc,e,t);l.layers=this.layers,this.add(l);const u=new oi(mc,gc,e,t);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,s,o,a,l]=t;for(const u of t)this.remove(u);if(e===ao)n.up.set(0,1,0),n.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===Fh)n.up.set(0,-1,0),n.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 u of t)this.add(u),u.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,u,f]=this.children,h=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const _=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,s),e.setRenderTarget(n,1,r),e.render(t,o),e.setRenderTarget(n,2,r),e.render(t,a),e.setRenderTarget(n,3,r),e.render(t,l),e.setRenderTarget(n,4,r),e.render(t,u),n.texture.generateMipmaps=_,e.setRenderTarget(n,5,r),e.render(t,f),e.setRenderTarget(h,p,m),e.xr.enabled=v,n.texture.needsPMREMUpdate=!0}}class rp extends qt{constructor(e,t,n,r,s,o,a,l,u,f){e=e!==void 0?e:[],t=t!==void 0?t:_o,super(e,t,n,r,s,o,a,l,u,f),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class WS extends Tr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new rp(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:Qt}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 n={uniforms:{tEquirect:{value:null}},vertexShader:` 42 43 varying vec3 vWorldDirection; 44 45 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 46 47 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 48 49 } 50 51 void main() { 52 53 vWorldDirection = transformDirection( position, modelMatrix ); 54 55 #include <begin_vertex> 56 #include <project_vertex> 57 58 } 59 `,fragmentShader:` 60 61 uniform sampler2D tEquirect; 62 63 varying vec3 vWorldDirection; 64 65 #include <common> 66 67 void main() { 68 69 vec3 direction = normalize( vWorldDirection ); 70 71 vec2 sampleUV = equirectUv( direction ); 72 73 gl_FragColor = texture2D( tEquirect, sampleUV ); 74 75 } 76 `},r=new ul(5,5,5),s=new ur({name:"CubemapFromEquirect",uniforms:xf(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Mi,blending:ho});s.uniforms.tEquirect.value=t;const o=new Mn(r,s),a=t.minFilter;return t.minFilter===ps&&(t.minFilter=Qt),new kb(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(s)}}const I1=new H,yO=new H,xO=new Dt;class Ma{constructor(e=new H(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=I1.subVectors(n,t).cross(yO.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 n=e.delta(I1),r=this.normal.dot(n);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(n,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||xO.getNormalMatrix(e),r=this.coplanarPoint(I1).applyMatrix4(e),s=this.normal.applyMatrix3(n).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 Rl=new Ti,Wm=new H;class sp{constructor(e=new Ma,t=new Ma,n=new Ma,r=new Ma,s=new Ma,o=new Ma){this.planes=[e,t,n,r,s,o]}set(e,t,n,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=ao){const n=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],u=r[4],f=r[5],h=r[6],p=r[7],m=r[8],v=r[9],_=r[10],y=r[11],g=r[12],A=r[13],S=r[14],w=r[15];if(n[0].setComponents(l-s,p-u,y-m,w-g).normalize(),n[1].setComponents(l+s,p+u,y+m,w+g).normalize(),n[2].setComponents(l+o,p+f,y+v,w+A).normalize(),n[3].setComponents(l-o,p-f,y-v,w-A).normalize(),n[4].setComponents(l-a,p-h,y-_,w-S).normalize(),t===ao)n[5].setComponents(l+a,p+h,y+_,w+S).normalize();else if(t===Fh)n[5].setComponents(a,h,_,S).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(),Rl.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Rl.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Rl)}intersectsSprite(e){return Rl.center.set(0,0,0),Rl.radius=.7071067811865476,Rl.applyMatrix4(e.matrixWorld),this.intersectsSphere(Rl)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Wm.x=r.normal.x>0?e.max.x:e.min.x,Wm.y=r.normal.y>0?e.max.y:e.min.y,Wm.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Wm)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function Gb(){let i=null,e=!1,t=null,n=null;function r(s,o){t(s,o),n=i.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(n=i.requestAnimationFrame(r),e=!0)},stop:function(){i.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){i=s}}}function AO(i){const e=new WeakMap;function t(a,l){const u=a.array,f=a.usage,h=u.byteLength,p=i.createBuffer();i.bindBuffer(l,p),i.bufferData(l,u,f),a.onUploadCallback();let m;if(u instanceof Float32Array)m=i.FLOAT;else if(u instanceof Uint16Array)a.isFloat16BufferAttribute?m=i.HALF_FLOAT:m=i.UNSIGNED_SHORT;else if(u instanceof Int16Array)m=i.SHORT;else if(u instanceof Uint32Array)m=i.UNSIGNED_INT;else if(u instanceof Int32Array)m=i.INT;else if(u instanceof Int8Array)m=i.BYTE;else if(u instanceof Uint8Array)m=i.UNSIGNED_BYTE;else if(u instanceof Uint8ClampedArray)m=i.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+u);return{buffer:p,type:m,bytesPerElement:u.BYTES_PER_ELEMENT,version:a.version,size:h}}function n(a,l,u){const f=l.array,h=l._updateRange,p=l.updateRanges;if(i.bindBuffer(u,a),h.count===-1&&p.length===0&&i.bufferSubData(u,0,f),p.length!==0){for(let m=0,v=p.length;m<v;m++){const _=p[m];i.bufferSubData(u,_.start*f.BYTES_PER_ELEMENT,f,_.start,_.count)}l.clearUpdateRanges()}h.count!==-1&&(i.bufferSubData(u,h.offset*f.BYTES_PER_ELEMENT,f,h.offset,h.count),h.count=-1),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&&(i.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(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}a.isInterleavedBufferAttribute&&(a=a.data);const u=e.get(a);if(u===void 0)e.set(a,t(a,l));else if(u.version<a.version){if(u.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.");n(u.buffer,a,l),u.version=a.version}}return{get:r,remove:s,update:o}}class cl extends Bt{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const s=e/2,o=t/2,a=Math.floor(n),l=Math.floor(r),u=a+1,f=l+1,h=e/a,p=t/l,m=[],v=[],_=[],y=[];for(let g=0;g<f;g++){const A=g*p-o;for(let S=0;S<u;S++){const w=S*h-s;v.push(w,-A,0),_.push(0,0,1),y.push(S/a),y.push(1-g/l)}}for(let g=0;g<l;g++)for(let A=0;A<a;A++){const S=A+u*g,w=A+u*(g+1),P=A+1+u*(g+1),T=A+1+u*g;m.push(S,w,T),m.push(w,P,T)}this.setIndex(m),this.setAttribute("position",new ht(v,3)),this.setAttribute("normal",new ht(_,3)),this.setAttribute("uv",new ht(y,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new cl(e.width,e.height,e.widthSegments,e.heightSegments)}}var SO=`#ifdef USE_ALPHAHASH 77 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 78#endif`,EO=`#ifdef USE_ALPHAHASH 79 const float ALPHA_HASH_SCALE = 0.05; 80 float hash2D( vec2 value ) { 81 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 82 } 83 float hash3D( vec3 value ) { 84 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 85 } 86 float getAlphaHashThreshold( vec3 position ) { 87 float maxDeriv = max( 88 length( dFdx( position.xyz ) ), 89 length( dFdy( position.xyz ) ) 90 ); 91 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 92 vec2 pixScales = vec2( 93 exp2( floor( log2( pixScale ) ) ), 94 exp2( ceil( log2( pixScale ) ) ) 95 ); 96 vec2 alpha = vec2( 97 hash3D( floor( pixScales.x * position.xyz ) ), 98 hash3D( floor( pixScales.y * position.xyz ) ) 99 ); 100 float lerpFactor = fract( log2( pixScale ) ); 101 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 102 float a = min( lerpFactor, 1.0 - lerpFactor ); 103 vec3 cases = vec3( 104 x * x / ( 2.0 * a * ( 1.0 - a ) ), 105 ( x - 0.5 * a ) / ( 1.0 - a ), 106 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 107 ); 108 float threshold = ( x < ( 1.0 - a ) ) 109 ? ( ( x < a ) ? cases.x : cases.y ) 110 : cases.z; 111 return clamp( threshold , 1.0e-6, 1.0 ); 112 } 113#endif`,wO=`#ifdef USE_ALPHAMAP 114 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 115#endif`,MO=`#ifdef USE_ALPHAMAP 116 uniform sampler2D alphaMap; 117#endif`,CO=`#ifdef USE_ALPHATEST 118 #ifdef ALPHA_TO_COVERAGE 119 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 120 if ( diffuseColor.a == 0.0 ) discard; 121 #else 122 if ( diffuseColor.a < alphaTest ) discard; 123 #endif 124#endif`,TO=`#ifdef USE_ALPHATEST 125 uniform float alphaTest; 126#endif`,RO=`#ifdef USE_AOMAP 127 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 128 reflectedLight.indirectDiffuse *= ambientOcclusion; 129 #if defined( USE_CLEARCOAT ) 130 clearcoatSpecularIndirect *= ambientOcclusion; 131 #endif 132 #if defined( USE_SHEEN ) 133 sheenSpecularIndirect *= ambientOcclusion; 134 #endif 135 #if defined( USE_ENVMAP ) && defined( STANDARD )
136 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 137 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 138 #endif 139#endif`,PO=`#ifdef USE_AOMAP 140 uniform sampler2D aoMap; 141 uniform float aoMapIntensity; 142#endif`,bO=`#ifdef USE_BATCHING 143 attribute float batchId; 144 uniform highp sampler2D batchingTexture; 145 mat4 getBatchingMatrix( const in float i ) { 146 int size = textureSize( batchingTexture, 0 ).x; 147 int j = int( i ) * 4; 148 int x = j % size; 149 int y = j / size; 150 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 151 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 152 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 153 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 154 return mat4( v1, v2, v3, v4 ); 155 } 156#endif 157#ifdef USE_BATCHING_COLOR 158 uniform sampler2D batchingColorTexture; 159 vec3 getBatchingColor( const in float i ) { 160 int size = textureSize( batchingColorTexture, 0 ).x; 161 int j = int( i ); 162 int x = j % size; 163 int y = j / size; 164 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; 165 } 166#endif`,IO=`#ifdef USE_BATCHING 167 mat4 batchingMatrix = getBatchingMatrix( batchId ); 168#endif`,BO=`vec3 transformed = vec3( position ); 169#ifdef USE_ALPHAHASH 170 vPosition = vec3( position ); 171#endif`,DO=`vec3 objectNormal = vec3( normal ); 172#ifdef USE_TANGENT 173 vec3 objectTangent = vec3( tangent.xyz ); 174#endif`,FO=`float G_BlinnPhong_Implicit( ) { 175 return 0.25; 176} 177float D_BlinnPhong( const in float shininess, const in float dotNH ) { 178 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 179} 180vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 181 vec3 halfDir = normalize( lightDir + viewDir ); 182 float dotNH = saturate( dot( normal, halfDir ) ); 183 float dotVH = saturate( dot( viewDir, halfDir ) ); 184 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 185 float G = G_BlinnPhong_Implicit( ); 186 float D = D_BlinnPhong( shininess, dotNH ); 187 return F * ( G * D ); 188} // validated`,LO=`#ifdef USE_IRIDESCENCE 189 const mat3 XYZ_TO_REC709 = mat3( 190 3.2404542, -0.9692660, 0.0556434, 191 -1.5371385, 1.8760108, -0.2040259, 192 -0.4985314, 0.0415560, 1.0572252 193 ); 194 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 195 vec3 sqrtF0 = sqrt( fresnel0 ); 196 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 197 } 198 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 199 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 200 } 201 float IorToFresnel0( float transmittedIor, float incidentIor ) { 202 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 203 } 204 vec3 evalSensitivity( float OPD, vec3 shift ) { 205 float phase = 2.0 * PI * OPD * 1.0e-9; 206 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 207 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 208 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 209 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 210 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 ) ); 211 xyz /= 1.0685e-7; 212 vec3 rgb = XYZ_TO_REC709 * xyz; 213 return rgb; 214 } 215 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 216 vec3 I; 217 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 218 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 219 float cosTheta2Sq = 1.0 - sinTheta2Sq; 220 if ( cosTheta2Sq < 0.0 ) { 221 return vec3( 1.0 ); 222 } 223 float cosTheta2 = sqrt( cosTheta2Sq ); 224 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 225 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
226 float T121 = 1.0 - R12; 227 float phi12 = 0.0; 228 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 229 float phi21 = PI - phi12; 230 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 231 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 232 vec3 phi23 = vec3( 0.0 ); 233 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 234 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 235 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 236 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 237 vec3 phi = vec3( phi21 ) + phi23; 238 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 239 vec3 r123 = sqrt( R123 ); 240 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 241 vec3 C0 = R12 + Rs; 242 I = C0; 243 vec3 Cm = Rs - T121; 244 for ( int m = 1; m <= 2; ++ m ) { 245 Cm *= r123; 246 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 247 I += Cm * Sm; 248 } 249 return max( I, vec3( 0.0 ) ); 250 } 251#endif`,NO=`#ifdef USE_BUMPMAP 252 uniform sampler2D bumpMap; 253 uniform float bumpScale; 254 vec2 dHdxy_fwd() { 255 vec2 dSTdx = dFdx( vBumpMapUv ); 256 vec2 dSTdy = dFdy( vBumpMapUv ); 257 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 258 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 259 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 260 return vec2( dBx, dBy ); 261 } 262 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 263 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 264 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 265 vec3 vN = surf_norm; 266 vec3 R1 = cross( vSigmaY, vN ); 267 vec3 R2 = cross( vN, vSigmaX ); 268 float fDet = dot( vSigmaX, R1 ) * faceDirection; 269 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 270 return normalize( abs( fDet ) * surf_norm - vGrad ); 271 } 272#endif`,OO=`#if NUM_CLIPPING_PLANES > 0 273 vec4 plane; 274 #ifdef ALPHA_TO_COVERAGE 275 float distanceToPlane, distanceGradient; 276 float clipOpacity = 1.0; 277 #pragma unroll_loop_start 278 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 279 plane = clippingPlanes[ i ]; 280 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 281 distanceGradient = fwidth( distanceToPlane ) / 2.0; 282 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 283 if ( clipOpacity == 0.0 ) discard; 284 } 285 #pragma unroll_loop_end 286 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 287 float unionClipOpacity = 1.0; 288 #pragma unroll_loop_start 289 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 290 plane = clippingPlanes[ i ]; 291 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 292 distanceGradient = fwidth( distanceToPlane ) / 2.0; 293 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 294 } 295 #pragma unroll_loop_end 296 clipOpacity *= 1.0 - unionClipOpacity; 297 #endif 298 diffuseColor.a *= clipOpacity; 299 if ( diffuseColor.a == 0.0 ) discard; 300 #else 301 #pragma unroll_loop_start 302 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 303 plane = clippingPlanes[ i ]; 304 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 305 } 306 #pragma unroll_loop_end 307 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 308 bool clipped = true; 309 #pragma unroll_loop_start 310 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 311 plane = clippingPlanes[ i ]; 312 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 313 } 314 #pragma unroll_loop_end 315 if ( clipped ) discard; 316 #endif 317 #endif 318#endif`,UO=`#if NUM_CLIPPING_PLANES > 0 319 varying vec3 vClipPosition; 320 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 321#endif`,zO=`#if NUM_CLIPPING_PLANES > 0 322 varying vec3 vClipPosition; 323#endif`,kO=`#if NUM_CLIPPING_PLANES > 0 324 vClipPosition = - mvPosition.xyz; 325#endif`,GO=`#if defined( USE_COLOR_ALPHA ) 326 diffuseColor *= vColor; 327#elif defined( USE_COLOR ) 328 diffuseColor.rgb *= vColor; 329#endif`,HO=`#if defined( USE_COLOR_ALPHA ) 330 varying vec4 vColor; 331#elif defined( USE_COLOR ) 332 varying vec3 vColor; 333#endif`,VO=`#if defined( USE_COLOR_ALPHA ) 334 varying vec4 vColor; 335#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 336 varying vec3 vColor; 337#endif`,WO=`#if defined( USE_COLOR_ALPHA ) 338 vColor = vec4( 1.0 ); 339#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 340 vColor = vec3( 1.0 ); 341#endif 342#ifdef USE_COLOR 343 vColor *= color; 344#endif 345#ifdef USE_INSTANCING_COLOR 346 vColor.xyz *= instanceColor.xyz; 347#endif 348#ifdef USE_BATCHING_COLOR 349 vec3 batchingColor = getBatchingColor( batchId ); 350 vColor.xyz *= batchingColor.xyz; 351#endif`,XO=`#define PI 3.141592653589793 352#define PI2 6.283185307179586 353#define PI_HALF 1.5707963267948966 354#define RECIPROCAL_PI 0.3183098861837907 355#define RECIPROCAL_PI2 0.15915494309189535 356#define EPSILON 1e-6 357#ifndef saturate 358#define saturate( a ) clamp( a, 0.0, 1.0 ) 359#endif 360#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 361float pow2( const in float x ) { return x*x; } 362vec3 pow2( const in vec3 x ) { return x*x; } 363float pow3( const in float x ) { return x*x*x; } 364float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 365float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 366float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 367highp float rand( const in vec2 uv ) { 368 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 369 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 370 return fract( sin( sn ) * c ); 371} 372#ifdef HIGH_PRECISION 373 float precisionSafeLength( vec3 v ) { return length( v ); } 374#else 375 float precisionSafeLength( vec3 v ) { 376 float maxComponent = max3( abs( v ) ); 377 return length( v / maxComponent ) * maxComponent; 378 } 379#endif 380struct IncidentLight { 381 vec3 color; 382 vec3 direction; 383 bool visible; 384}; 385struct ReflectedLight { 386 vec3 directDiffuse; 387 vec3 directSpecular; 388 vec3 indirectDiffuse; 389 vec3 indirectSpecular; 390}; 391#ifdef USE_ALPHAHASH 392 varying vec3 vPosition; 393#endif 394vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 395 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 396} 397vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 398 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 399} 400mat3 transposeMat3( const in mat3 m ) { 401 mat3 tmp; 402 tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); 403 tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); 404 tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); 405 return tmp; 406} 407float luminance( const in vec3 rgb ) { 408 const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); 409 return dot( weights, rgb ); 410} 411bool isPerspectiveMatrix( mat4 m ) { 412 return m[ 2 ][ 3 ] == - 1.0; 413} 414vec2 equirectUv( in vec3 dir ) { 415 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 416 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 417 return vec2( u, v ); 418}
419vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 420 return RECIPROCAL_PI * diffuseColor; 421} 422vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 423 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 424 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 425} 426float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 427 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 428 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 429} // validated`,JO=`#ifdef ENVMAP_TYPE_CUBE_UV 430 #define cubeUV_minMipLevel 4.0 431 #define cubeUV_minTileSize 16.0 432 float getFace( vec3 direction ) { 433 vec3 absDirection = abs( direction ); 434 float face = - 1.0; 435 if ( absDirection.x > absDirection.z ) { 436 if ( absDirection.x > absDirection.y ) 437 face = direction.x > 0.0 ? 0.0 : 3.0; 438 else 439 face = direction.y > 0.0 ? 1.0 : 4.0; 440 } else { 441 if ( absDirection.z > absDirection.y ) 442 face = direction.z > 0.0 ? 2.0 : 5.0; 443 else 444 face = direction.y > 0.0 ? 1.0 : 4.0; 445 } 446 return face; 447 } 448 vec2 getUV( vec3 direction, float face ) { 449 vec2 uv; 450 if ( face == 0.0 ) { 451 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 452 } else if ( face == 1.0 ) { 453 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 454 } else if ( face == 2.0 ) { 455 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 456 } else if ( face == 3.0 ) { 457 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 458 } else if ( face == 4.0 ) { 459 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 460 } else { 461 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 462 } 463 return 0.5 * ( uv + 1.0 ); 464 } 465 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 466 float face = getFace( direction ); 467 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 468 mipInt = max( mipInt, cubeUV_minMipLevel ); 469 float faceSize = exp2( mipInt ); 470 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 471 if ( face > 2.0 ) { 472 uv.y += faceSize; 473 face -= 3.0; 474 } 475 uv.x += face * faceSize; 476 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 477 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 478 uv.x *= CUBEUV_TEXEL_WIDTH; 479 uv.y *= CUBEUV_TEXEL_HEIGHT; 480 #ifdef texture2DGradEXT 481 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 482 #else 483 return texture2D( envMap, uv ).rgb; 484 #endif 485 } 486 #define cubeUV_r0 1.0 487 #define cubeUV_m0 - 2.0 488 #define cubeUV_r1 0.8 489 #define cubeUV_m1 - 1.0 490 #define cubeUV_r4 0.4 491 #define cubeUV_m4 2.0 492 #define cubeUV_r5 0.305 493 #define cubeUV_m5 3.0 494 #define cubeUV_r6 0.21 495 #define cubeUV_m6 4.0 496 float roughnessToMip( float roughness ) { 497 float mip = 0.0; 498 if ( roughness >= cubeUV_r1 ) { 499 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 500 } else if ( roughness >= cubeUV_r4 ) { 501 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 502 } else if ( roughness >= cubeUV_r5 ) { 503 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 504 } else if ( roughness >= cubeUV_r6 ) { 505 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 506 } else { 507 mip = - 2.0 * log2( 1.16 * roughness ); } 508 return mip; 509 } 510 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 511 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 512 float mipF = fract( mip ); 513 float mipInt = floor( mip ); 514 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 515 if ( mipF == 0.0 ) { 516 return vec4( color0, 1.0 ); 517 } else { 518 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 519 return vec4( mix( color0, color1, mipF ), 1.0 ); 520 } 521 } 522#endif`,jO=`vec3 transformedNormal = objectNormal; 523#ifdef USE_TANGENT 524 vec3 transformedTangent = objectTangent; 525#endif 526#ifdef USE_BATCHING 527 mat3 bm = mat3( batchingMatrix ); 528 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 529 transformedNormal = bm * transformedNormal; 530 #ifdef USE_TANGENT 531 transformedTangent = bm * transformedTangent; 532 #endif 533#endif 534#ifdef USE_INSTANCING 535 mat3 im = mat3( instanceMatrix ); 536 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 537 transformedNormal = im * transformedNormal; 538 #ifdef USE_TANGENT 539 transformedTangent = im * transformedTangent; 540 #endif 541#endif 542transformedNormal = normalMatrix * transformedNormal; 543#ifdef FLIP_SIDED 544 transformedNormal = - transformedNormal; 545#endif 546#ifdef USE_TANGENT 547 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 548 #ifdef FLIP_SIDED 549 transformedTangent = - transformedTangent; 550 #endif 551#endif`,YO=`#ifdef USE_DISPLACEMENTMAP 552 uniform sampler2D displacementMap; 553 uniform float displacementScale; 554 uniform float displacementBias; 555#endif`,KO=`#ifdef USE_DISPLACEMENTMAP 556 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
556placementBias ); 557#endif`,QO=`#ifdef USE_EMISSIVEMAP 558 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 559 totalEmissiveRadiance *= emissiveColor.rgb; 560#endif`,qO=`#ifdef USE_EMISSIVEMAP 561 uniform sampler2D emissiveMap; 562#endif`,ZO="gl_FragColor = linearToOutputTexel( gl_FragColor );",$O=` 563const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( 564 vec3( 0.8224621, 0.177538, 0.0 ), 565 vec3( 0.0331941, 0.9668058, 0.0 ), 566 vec3( 0.0170827, 0.0723974, 0.9105199 ) 567); 568const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( 569 vec3( 1.2249401, - 0.2249404, 0.0 ), 570 vec3( - 0.0420569, 1.0420571, 0.0 ), 571 vec3( - 0.0196376, - 0.0786361, 1.0982735 ) 572); 573vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { 574 return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); 575} 576vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { 577 return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); 578} 579vec4 LinearTransferOETF( in vec4 value ) { 580 return value; 581} 582vec4 sRGBTransferOETF( in vec4 value ) { 583 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 ); 584} 585vec4 LinearToLinear( in vec4 value ) { 586 return value; 587} 588vec4 LinearTosRGB( in vec4 value ) { 589 return sRGBTransferOETF( value ); 590}`,eU=`#ifdef USE_ENVMAP 591 #ifdef ENV_WORLDPOS 592 vec3 cameraToFrag; 593 if ( isOrthographic ) { 594 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 595 } else { 596 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 597 } 598 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 599 #ifdef ENVMAP_MODE_REFLECTION 600 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 601 #else 602 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 603 #endif 604 #else 605 vec3 reflectVec = vReflect; 606 #endif 607 #ifdef ENVMAP_TYPE_CUBE 608 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 609 #else 610 vec4 envColor = vec4( 0.0 ); 611 #endif 612 #ifdef ENVMAP_BLENDING_MULTIPLY 613 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 614 #elif defined( ENVMAP_BLENDING_MIX ) 615 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 616 #elif defined( ENVMAP_BLENDING_ADD ) 617 outgoingLight += envColor.xyz * specularStrength * reflectivity; 618 #endif 619#endif`,tU=`#ifdef USE_ENVMAP 620 uniform float envMapIntensity; 621 uniform float flipEnvMap; 622 uniform mat3 envMapRotation; 623 #ifdef ENVMAP_TYPE_CUBE 624 uniform samplerCube envMap; 625 #else 626 uniform sampler2D envMap; 627 #endif 628 629#endif`,nU=`#ifdef USE_ENVMAP 630 uniform float reflectivity; 631 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 632 #define ENV_WORLDPOS 633 #endif 634 #ifdef ENV_WORLDPOS 635 varying vec3 vWorldPosition; 636 uniform float refractionRatio; 637 #else 638 varying vec3 vReflect; 639 #endif 640#endif`,iU=`#ifdef USE_ENVMAP 641 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 642 #define ENV_WORLDPOS 643 #endif 644 #ifdef ENV_WORLDPOS 645 646 varying vec3 vWorldPosition; 647 #else 648 varying vec3 vReflect; 649 uniform float refractionRatio; 650 #endif 651#endif`,rU=`#ifdef USE_ENVMAP 652 #ifdef ENV_WORLDPOS 653 vWorldPosition = worldPosition.xyz; 654 #else 655 vec3 cameraToVertex; 656 if ( isOrthographic ) { 657 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 658 } else {
659 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 660 } 661 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 662 #ifdef ENVMAP_MODE_REFLECTION 663 vReflect = reflect( cameraToVertex, worldNormal ); 664 #else 665 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 666 #endif 667 #endif 668#endif`,sU=`#ifdef USE_FOG 669 vFogDepth = - mvPosition.z; 670#endif`,oU=`#ifdef USE_FOG 671 varying float vFogDepth; 672#endif`,aU=`#ifdef USE_FOG 673 #ifdef FOG_EXP2 674 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 675 #else 676 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 677 #endif 678 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 679#endif`,lU=`#ifdef USE_FOG 680 uniform vec3 fogColor; 681 varying float vFogDepth; 682 #ifdef FOG_EXP2 683 uniform float fogDensity; 684 #else 685 uniform float fogNear; 686 uniform float fogFar; 687 #endif 688#endif`,uU=`#ifdef USE_GRADIENTMAP 689 uniform sampler2D gradientMap; 690#endif 691vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 692 float dotNL = dot( normal, lightDirection ); 693 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 694 #ifdef USE_GRADIENTMAP 695 return vec3( texture2D( gradientMap, coord ).r ); 696 #else 697 vec2 fw = fwidth( coord ) * 0.5; 698 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 699 #endif 700}`,cU=`#ifdef USE_LIGHTMAP 701 uniform sampler2D lightMap; 702 uniform float lightMapIntensity; 703#endif`,fU=`LambertMaterial material; 704material.diffuseColor = diffuseColor.rgb; 705material.specularStrength = specularStrength;`,dU=`varying vec3 vViewPosition; 706struct LambertMaterial { 707 vec3 diffuseColor; 708 float specularStrength; 709}; 710void 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 ) { 711 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 712 vec3 irradiance = dotNL * directLight.color; 713 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 714} 715void 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 ) { 716 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 717} 718#define RE_Direct RE_Direct_Lambert 719#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,hU=`uniform bool receiveShadow; 720uniform vec3 ambientLightColor; 721#if defined( USE_LIGHT_PROBES ) 722 uniform vec3 lightProbe[ 9 ]; 723#endif 724vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 725 float x = normal.x, y = normal.y, z = normal.z; 726 vec3 result = shCoefficients[ 0 ] * 0.886227; 727 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 728 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 729 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 730 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 731 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 732 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 733 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 734 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 735 return result; 736} 737vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 738 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 739 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 740 return irradiance; 741} 742vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 743 vec3 irradiance = ambientLightColor; 744 return irradiance; 745} 746float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 747 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 748 if ( cutoffDistance > 0.0 ) { 749 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 750 } 751 return distanceFalloff; 752} 753float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 754 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 755} 756#if NUM_DIR_LIGHTS > 0 757 struct DirectionalLight { 758 vec3 direction; 759 vec3 color; 760 }; 761 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 762 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 763 light.color = directionalLight.color; 764 light.direction = directionalLight.direction; 765 light.visible = true; 766 } 767#endif 768#if NUM_POINT_LIGHTS > 0 769 struct PointLight { 770 vec3 position; 771 vec3 color; 772 float distance; 773 float decay; 774 }; 775 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 776 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 777 vec3 lVector = pointLight.position - geometryPosition; 778 light.direction = normalize( lVector ); 779 float lightDistance = length( lVector ); 780 light.color = pointLight.color; 781 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 782 light.visible = ( light.color != vec3( 0.0 ) ); 783 } 784#endif
785#if NUM_SPOT_LIGHTS > 0 786 struct SpotLight { 787 vec3 position; 788 vec3 direction; 789 vec3 color; 790 float distance; 791 float decay; 792 float coneCos; 793 float penumbraCos; 794 }; 795 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 796 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 797 vec3 lVector = spotLight.position - geometryPosition; 798 light.direction = normalize( lVector ); 799 float angleCos = dot( light.direction, spotLight.direction ); 800 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 801 if ( spotAttenuation > 0.0 ) { 802 float lightDistance = length( lVector ); 803 light.color = spotLight.color * spotAttenuation; 804 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 805 light.visible = ( light.color != vec3( 0.0 ) ); 806 } else { 807 light.color = vec3( 0.0 ); 808 light.visible = false; 809 } 810 } 811#endif 812#if NUM_RECT_AREA_LIGHTS > 0 813 struct RectAreaLight { 814 vec3 color; 815 vec3 position; 816 vec3 halfWidth; 817 vec3 halfHeight; 818 }; 819 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 820 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 821#endif 822#if NUM_HEMI_LIGHTS > 0 823 struct HemisphereLight { 824 vec3 direction; 825 vec3 skyColor; 826 vec3 groundColor; 827 }; 828 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 829 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 830 float dotNL = dot( normal, hemiLight.direction ); 831 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 832 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 833 return irradiance; 834 } 835#endif`,pU=`#ifdef USE_ENVMAP 836 vec3 getIBLIrradiance( const in vec3 normal ) { 837 #ifdef ENVMAP_TYPE_CUBE_UV 838 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 839 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 840 return PI * envMapColor.rgb * envMapIntensity; 841 #else 842 return vec3( 0.0 ); 843 #endif 844 } 845 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 846 #ifdef ENVMAP_TYPE_CUBE_UV 847 vec3 reflectVec = reflect( - viewDir, normal ); 848 reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); 849 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 850 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 851 return envMapColor.rgb * envMapIntensity; 852 #else 853 return vec3( 0.0 ); 854 #endif 855 } 856 #ifdef USE_ANISOTROPY 857 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 858 #ifdef ENVMAP_TYPE_CUBE_UV 859 vec3 bentNormal = cross( bitangent, viewDir ); 860 bentNormal = normalize( cross( bentNormal, bitangent ) ); 861 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 862 return getIBLRadiance( viewDir, bentNormal, roughness ); 863 #else 864 return vec3( 0.0 ); 865 #endif 866 } 867 #endif 868#endif`,mU=`ToonMaterial material; 869material.diffuseColor = diffuseColor.rgb;`,gU=`varying vec3 vViewPosition; 870struct ToonMaterial { 871 vec3 diffuseColor; 872}; 873void 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 ) { 874 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 875 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 876} 877void 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 ) { 878 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 879} 880#define RE_Direct RE_Direct_Toon 881#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,vU=`BlinnPhongMaterial material; 882material.diffuseColor = diffuseColor.rgb; 883material.specularColor = specular; 884material.specularShininess = shininess; 885material.specularStrength = specularStrength;`,_U=`varying vec3 vViewPosition; 886struct BlinnPhongMaterial { 887 vec3 diffuseColor; 888 vec3 specularColor; 889 float specularShininess; 890 float specularStrength; 891}; 892void 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 ) {
893 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 894 vec3 irradiance = dotNL * directLight.color; 895 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 896 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 897} 898void 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 ) { 899 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 900} 901#define RE_Direct RE_Direct_BlinnPhong 902#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,yU=`PhysicalMaterial material; 903material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 904vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 905float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 906material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 907material.roughness = min( material.roughness, 1.0 ); 908#ifdef IOR 909 material.ior = ior; 910 #ifdef USE_SPECULAR 911 float specularIntensityFactor = specularIntensity; 912 vec3 specularColorFactor = specularColor; 913 #ifdef USE_SPECULAR_COLORMAP 914 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 915 #endif 916 #ifdef USE_SPECULAR_INTENSITYMAP 917 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 918 #endif 919 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 920 #else 921 float specularIntensityFactor = 1.0; 922 vec3 specularColorFactor = vec3( 1.0 ); 923 material.specularF90 = 1.0; 924 #endif 925 material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); 926#else 927 material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); 928 material.specularF90 = 1.0; 929#endif 930#ifdef USE_CLEARCOAT 931 material.clearcoat = clearcoat; 932 material.clearcoatRoughness = clearcoatRoughness; 933 material.clearcoatF0 = vec3( 0.04 ); 934 material.clearcoatF90 = 1.0; 935 #ifdef USE_CLEARCOATMAP 936 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 937 #endif 938 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 939 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 940 #endif 941 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 942 material.clearcoatRoughness += geometryRoughness; 943 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 944#endif 945#ifdef USE_DISPERSION 946 material.dispersion = dispersion; 947#endif 948#ifdef USE_IRIDESCENCE 949 material.iridescence = iridescence; 950 material.iridescenceIOR = iridescenceIOR; 951 #ifdef USE_IRIDESCENCEMAP 952 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 953 #endif 954 #ifdef USE_IRIDESCENCE_THICKNESSMAP 955 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 956 #else 957 material.iridescenceThickness = iridescenceThicknessMaximum; 958 #endif 959#endif 960#ifdef USE_SHEEN 961 material.sheenColor = sheenColor; 962 #ifdef USE_SHEEN_COLORMAP 963 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 964 #endif 965 material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); 966 #ifdef USE_SHEEN_ROUGHNESSMAP 967 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 968 #endif 969#endif 970#ifdef USE_ANISOTROPY 971 #ifdef USE_ANISOTROPYMAP 972 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 973 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 974 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 975 #else 976 vec2 anisotropyV = anisotropyVector; 977 #endif 978 material.anisotropy = length( anisotropyV ); 979 if( material.anisotropy == 0.0 ) { 980 anisotropyV = vec2( 1.0, 0.0 ); 981 } else { 982 anisotropyV /= material.anisotropy; 983 material.anisotropy = saturate( material.anisotropy ); 984 } 985 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
986 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 987 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 988#endif`,xU
vendor: 14,687 bytes, lines 988-1289
988=`struct PhysicalMaterial { 989 vec3 diffuseColor; 990 float roughness; 991 vec3 specularColor; 992 float specularF90; 993 float dispersion; 994 #ifdef USE_CLEARCOAT 995 float clearcoat; 996 float clearcoatRoughness; 997 vec3 clearcoatF0; 998 float clearcoatF90; 999 #endif 1000 #ifdef USE_IRIDESCENCE 1001 float iridescence; 1002 float iridescenceIOR; 1003 float iridescenceThickness; 1004 vec3 iridescenceFresnel; 1005 vec3 iridescenceF0; 1006 #endif 1007 #ifdef USE_SHEEN 1008 vec3 sheenColor; 1009 float sheenRoughness; 1010 #endif 1011 #ifdef IOR 1012 float ior; 1013 #endif 1014 #ifdef USE_TRANSMISSION 1015 float transmission; 1016 float transmissionAlpha; 1017 float thickness; 1018 float attenuationDistance; 1019 vec3 attenuationColor; 1020 #endif 1021 #ifdef USE_ANISOTROPY 1022 float anisotropy; 1023 float alphaT; 1024 vec3 anisotropyT; 1025 vec3 anisotropyB; 1026 #endif 1027}; 1028vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1029vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1030vec3 sheenSpecularDirect = vec3( 0.0 ); 1031vec3 sheenSpecularIndirect = vec3(0.0 ); 1032vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1033 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1034 float x2 = x * x; 1035 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1036 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1037} 1038float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1039 float a2 = pow2( alpha ); 1040 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1041 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1042 return 0.5 / max( gv + gl, EPSILON ); 1043} 1044float D_GGX( const in float alpha, const in float dotNH ) { 1045 float a2 = pow2( alpha ); 1046 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1047 return RECIPROCAL_PI * a2 / pow2( denom ); 1048} 1049#ifdef USE_ANISOTROPY 1050 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 ) { 1051 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1052 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1053 float v = 0.5 / ( gv + gl ); 1054 return saturate(v); 1055 } 1056 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1057 float a2 = alphaT * alphaB; 1058 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1059 highp float v2 = dot( v, v ); 1060 float w2 = a2 / v2; 1061 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1062 } 1063#endif 1064#ifdef USE_CLEARCOAT 1065 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1066 vec3 f0 = material.clearcoatF0; 1067 float f90 = material.clearcoatF90; 1068 float roughness = material.clearcoatRoughness; 1069 float alpha = pow2( roughness ); 1070 vec3 halfDir = normalize( lightDir + viewDir ); 1071 float dotNL = saturate( dot( normal, lightDir ) ); 1072 float dotNV = saturate( dot( normal, viewDir ) ); 1073 float dotNH = saturate( dot( normal, halfDir ) ); 1074 float dotVH = saturate( dot( viewDir, halfDir ) ); 1075 vec3 F = F_Schlick( f0, f90, dotVH ); 1076 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1077 float D = D_GGX( alpha, dotNH ); 1078 return F * ( V * D ); 1079 } 1080#endif 1081vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1082 vec3 f0 = material.specularColor; 1083 float f90 = material.specularF90; 1084 float roughness = material.roughness; 1085 float alpha = pow2( roughness ); 1086 vec3 halfDir = normalize( lightDir + viewDir ); 1087 float dotNL = saturate( dot( normal, lightDir ) ); 1088 float dotNV = saturate( dot( normal, viewDir ) ); 1089 float dotNH = saturate( dot( normal, halfDir ) ); 1090 float dotVH = saturate( dot( viewDir, halfDir ) ); 1091 vec3 F = F_Schlick( f0, f90, dotVH ); 1092 #ifdef USE_IRIDESCENCE 1093 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1094 #endif 1095 #ifdef USE_ANISOTROPY 1096 float dotTL = dot( material.anisotropyT, lightDir ); 1097 float dotTV = dot( material.anisotropyT, viewDir ); 1098 float dotTH = dot( material.anisotropyT, halfDir ); 1099 float dotBL = dot( material.anisotropyB, lightDir ); 1100 float dotBV = dot( material.anisotropyB, viewDir ); 1101 float dotBH = dot( material.anisotropyB, halfDir ); 1102 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1103 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1104 #else 1105 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1106 float D = D_GGX( alpha, dotNH ); 1107 #endif 1108 return F * ( V * D ); 1109} 1110vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1111 const float LUT_SIZE = 64.0; 1112 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1113 const float LUT_BIAS = 0.5 / LUT_SIZE; 1114 float dotNV = saturate( dot( N, V ) ); 1115 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1116 uv = uv * LUT_SCALE + LUT_BIAS; 1117 return uv; 1118} 1119float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1120 float l = length( f ); 1121 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1122} 1123vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1124 float x = dot( v1, v2 ); 1125 float y = abs( x ); 1126 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1127 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1128 float v = a / b; 1129 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1130 return cross( v1, v2 ) * theta_sintheta; 1131} 1132vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1133 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1134 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1135 vec3 lightNormal = cross( v1, v2 ); 1136 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1137 vec3 T1, T2; 1138 T1 = normalize( V - N * dot( V, N ) ); 1139 T2 = - cross( N, T1 ); 1140 mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); 1141 vec3 coords[ 4 ]; 1142 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1143 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1144 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1145 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1146 coords[ 0 ] = normalize( coords[ 0 ] ); 1147 coords[ 1 ] = normalize( coords[ 1 ] ); 1148 coords[ 2 ] = normalize( coords[ 2 ] ); 1149 coords[ 3 ] = normalize( coords[ 3 ] ); 1150 vec3 vectorFormFactor = vec3( 0.0 ); 1151 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1152 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1153 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1154 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1155 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1156 return vec3( result ); 1157} 1158#if defined( USE_SHEEN ) 1159float D_Charlie( float roughness, float dotNH ) { 1160 float alpha = pow2( roughness ); 1161 float invAlpha = 1.0 / alpha; 1162 float cos2h = dotNH * dotNH; 1163 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1164 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1165} 1166float V_Neubelt( float dotNV, float dotNL ) { 1167 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1168} 1169vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1170 vec3 halfDir = normalize( lightDir + viewDir ); 1171 float dotNL = saturate( dot( normal, lightDir ) ); 1172 float dotNV = saturate( dot( normal, viewDir ) ); 1173 float dotNH = saturate( dot( normal, halfDir ) ); 1174 float D = D_Charlie( sheenRoughness, dotNH ); 1175 float V = V_Neubelt( dotNV, dotNL ); 1176 return sheenColor * ( D * V ); 1177} 1178#endif 1179float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1180 float dotNV = saturate( dot( normal, viewDir ) ); 1181 float r2 = roughness * roughness; 1182 float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; 1183 float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; 1184 float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); 1185 return saturate( DG * RECIPROCAL_PI ); 1186} 1187vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1188 float dotNV = saturate( dot( normal, viewDir ) ); 1189 const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); 1190 const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); 1191 vec4 r = roughness * c0 + c1; 1192 float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; 1193 vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; 1194 return fab; 1195} 1196vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1197 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1198 return specularColor * fab.x + specularF90 * fab.y; 1199} 1200#ifdef USE_IRIDESCENCE 1201void 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 ) { 1202#else 1203void 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 ) { 1204#endif 1205 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1206 #ifdef USE_IRIDESCENCE 1207 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1208 #else 1209 vec3 Fr = specularColor; 1210 #endif 1211 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1212 float Ess = fab.x + fab.y; 1213 float Ems = 1.0 - Ess; 1214 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1215 singleScatter += FssEss; 1216 multiScatter += Fms * Ems; 1217} 1218#if NUM_RECT_AREA_LIGHTS > 0 1219 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 ) { 1220 vec3 normal = geometryNormal; 1221 vec3 viewDir = geometryViewDir; 1222 vec3 position = geometryPosition; 1223 vec3 lightPos = rectAreaLight.position; 1224 vec3 halfWidth = rectAreaLight.halfWidth; 1225 vec3 halfHeight = rectAreaLight.halfHeight; 1226 vec3 lightColor = rectAreaLight.color; 1227 float roughness = material.roughness; 1228 vec3 rectCoords[ 4 ]; 1229 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1230 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1231 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1232 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1233 vec4 t1 = texture2D( ltc_1, uv ); 1234 vec4 t2 = texture2D( ltc_2, uv ); 1235 mat3 mInv = mat3( 1236 vec3( t1.x, 0, t1.y ), 1237 vec3( 0, 1, 0 ), 1238 vec3( t1.z, 0, t1.w ) 1239 ); 1240 vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); 1241 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1242 reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1243 } 1244#endif 1245void 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 ) { 1246 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1247 vec3 irradiance = dotNL * directLight.color; 1248 #ifdef USE_CLEARCOAT 1249 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1250 vec3 ccIrradiance = dotNLcc * directLight.color; 1251 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1252 #endif 1253 #ifdef USE_SHEEN 1254 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1255 #endif 1256 reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); 1257 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1258} 1259void 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 ) { 1260 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1261} 1262void 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) { 1263 #ifdef USE_CLEARCOAT 1264 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1265 #endif 1266 #ifdef USE_SHEEN 1267 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1268 #endif 1269 vec3 singleScattering = vec3( 0.0 ); 1270 vec3 multiScattering = vec3( 0.0 ); 1271 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1272 #ifdef USE_IRIDESCENCE 1273 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); 1274 #else 1275 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); 1276 #endif 1277 vec3 totalScattering = singleScattering + multiScattering; 1278 vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); 1279 reflectedLight.indirectSpecular += radiance * singleScattering; 1280 reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; 1281 reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; 1282} 1283#define RE_Direct RE_Direct_Physical 1284#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1285#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1286#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1287float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1288 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1289}`,
1289AU=` 1290vec3 geometryPosition = - vViewPosition; 1291vec3 geometryNormal = normal; 1292vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1293vec3 geometryClearcoatNormal = vec3( 0.0 ); 1294#ifdef USE_CLEARCOAT 1295 geometryClearcoatNormal = clearcoatNormal; 1296#endif 1297#ifdef USE_IRIDESCENCE 1298 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1299 if ( material.iridescenceThickness == 0.0 ) { 1300 material.iridescence = 0.0; 1301 } else { 1302 material.iridescence = saturate( material.iridescence ); 1303 } 1304 if ( material.iridescence > 0.0 ) { 1305 material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1306 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1307 } 1308#endif 1309IncidentLight directLight; 1310#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1311 PointLight pointLight; 1312 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1313 PointLightShadow pointLightShadow; 1314 #endif 1315 #pragma unroll_loop_start 1316 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1317 pointLight = pointLights[ i ]; 1318 getPointLightInfo( pointLight, geometryPosition, directLight ); 1319 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) 1320 pointLightShadow = pointLightShadows[ i ]; 1321 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1322 #endif 1323 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1324 } 1325 #pragma unroll_loop_end 1326#endif 1327#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1328 SpotLight spotLight; 1329 vec4 spotColor; 1330 vec3 spotLightCoord; 1331 bool inSpotLightMap; 1332 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1333 SpotLightShadow spotLightShadow; 1334 #endif 1335 #pragma unroll_loop_start 1336 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1337 spotLight = spotLights[ i ]; 1338 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1339 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1340 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1341 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1342 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1343 #else 1344 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1345 #endif 1346 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1347 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1348 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1349 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1350 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1351 #endif 1352 #undef SPOT_LIGHT_MAP_INDEX 1353 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1354 spotLightShadow = spotLightShadows[ i ]; 1355 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1356 #endif 1357 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1358 } 1359 #pragma unroll_loop_end 1360#endif 1361#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1362 DirectionalLight directionalLight; 1363 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1364 DirectionalLightShadow directionalLightShadow; 1365 #endif 1366 #pragma unroll_loop_start 1367 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1368 directionalLight = directionalLights[ i ]; 1369 getDirectionalLightInfo( directionalLight, directLight ); 1370 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1371 directionalLightShadow = directionalLightShadows[ i ]; 1372 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1373 #endif 1374 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1375 } 1376 #pragma unroll_loop_end 1377#endif 1378#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1379 RectAreaLight rectAreaLight; 1380 #pragma unroll_loop_start 1381 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1382 rectAreaLight = rectAreaLights[ i ]; 1383 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1384 } 1385 #pragma unroll_loop_end 1386#endif 1387#if defined( RE_IndirectDiffuse ) 1388 vec3 iblIrradiance = vec3( 0.0 ); 1389 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1390 #if defined( USE_LIGHT_PROBES ) 1391 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1392 #endif 1393 #if ( NUM_HEMI_LIGHTS > 0 ) 1394 #pragma unroll_loop_start 1395 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1396 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1397 } 1398 #pragma unroll_loop_end 1399 #endif 1400#endif 1401#if defined( RE_IndirectSpecular ) 1402 vec3 radiance = vec3( 0.0 ); 1403 vec3 clearcoatRadiance = vec3( 0.0 ); 1404#endif`,SU=`#if defined( RE_IndirectDiffuse ) 1405 #ifdef USE_LIGHTMAP 1406 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1407 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1408 irradiance += lightMapIrradiance; 1409 #endif 1410 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1411 iblIrradiance += getIBLIrradiance( geometryNormal ); 1412 #endif 1413#endif 1414#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1415 #ifdef USE_ANISOTROPY 1416 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1417 #else 1418 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1419 #endif 1420 #ifdef USE_CLEARCOAT 1421 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1422 #endif 1423#endif`,EU=`#if defined( RE_IndirectDiffuse ) 1424 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1425#endif 1426#if defined( RE_IndirectSpecular ) 1427 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1428#endif`,wU=`#if defined( USE_LOGDEPTHBUF ) 1429 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1430#endif`,MU=`#if defined( USE_LOGDEPTHBUF ) 1431 uniform float logDepthBufFC; 1432 varying float vFragDepth; 1433 varying float vIsPerspective; 1434#endif`,CU=`#ifdef USE_LOGDEPTHBUF 1435 varying float vFragDepth; 1436 varying float vIsPerspective; 1437#endif`,TU=`#ifdef USE_LOGDEPTHBUF 1438 vFragDepth = 1.0 + gl_Position.w; 1439 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1440#endif`,RU=`#ifdef USE_MAP 1441 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1442 #ifdef DECODE_VIDEO_TEXTURE 1443 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 ); 1444 1445 #endif 1446 diffuseColor *= sampledDiffuseColor; 1447#endif`,PU=`#ifdef USE_MAP 1448 uniform sampler2D map; 1449#endif`,bU=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1450 #if defined( USE_POINTS_UV ) 1451 vec2 uv = vUv; 1452 #else 1453 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1454 #endif 1455#endif 1456#ifdef USE_MAP 1457 diffuseColor *= texture2D( map, uv ); 1458#endif 1459#ifdef USE_ALPHAMAP 1460 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1461#endif`,IU=`#if defined( USE_POINTS_UV ) 1462 varying vec2 vUv; 1463#else 1464 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1465 uniform mat3 uvTransform; 1466 #endif 1467#endif 1468#ifdef USE_MAP 1469 uniform sampler2D map; 1470#endif 1471#ifdef USE_ALPHAMAP 1472 uniform sampler2D alphaMap; 1473#endif`,BU=`float metalnessFactor = metalness; 1474#ifdef USE_METALNESSMAP 1475 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1476 metalnessFactor *= texelMetalness.b; 1477#endif`,DU=`#ifdef USE_METALNESSMAP 1478 uniform sampler2D metalnessMap; 1479#endif`,FU=`#ifdef USE_INSTANCING_MORPH 1480 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1481 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1482 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1483 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1484 } 1485#endif`,LU=`#if defined( USE_MORPHCOLORS ) 1486 vColor *= morphTargetBaseInfluence; 1487 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1488 #if defined( USE_COLOR_ALPHA ) 1489 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1490 #elif defined( USE_COLOR ) 1491 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1492 #endif 1493 } 1494#endif`,NU=`#ifdef USE_MORPHNORMALS 1495 objectNormal *= morphTargetBaseInfluence; 1496 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1497 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1498 } 1499#endif`,OU=`#ifdef USE_MORPHTARGETS 1500 #ifndef USE_INSTANCING_MORPH 1501 uniform float morphTargetBaseInfluence; 1502 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1503 #endif 1504 uniform sampler2DArray morphTargetsTexture; 1505 uniform ivec2 morphTargetsTextureSize; 1506 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1507 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1508 int y = texelIndex / morphTargetsTextureSize.x; 1509 int x = texelIndex - y * morphTargetsTextureSize.x; 1510 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1511 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1512 } 1513#endif`,UU=`#ifdef USE_MORPHTARGETS 1514 transformed *= morphTargetBaseInfluence; 1515 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1516 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1517 } 1518#endif`,zU=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1519#ifdef FLAT_SHADED 1520 vec3 fdx = dFdx( vViewPosition ); 1521 vec3 fdy = dFdy( vViewPosition ); 1522 vec3 normal = normalize( cross( fdx, fdy ) ); 1523#else 1524 vec3 normal = normalize( vNormal ); 1525 #ifdef DOUBLE_SIDED 1526 normal *= faceDirection; 1527 #endif 1528#endif 1529#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1530 #ifdef USE_TANGENT 1531 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1532 #else 1533 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1534 #if defined( USE_NORMALMAP ) 1535 vNormalMapUv 1536 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1537 vClearcoatNormalMapUv 1538 #else 1539 vUv 1540 #endif 1541 ); 1542 #endif 1543 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1544 tbn[0] *= faceDirection; 1545 tbn[1] *= faceDirection; 1546 #endif 1547#endif 1548#ifdef USE_CLEARCOAT_NORMALMAP 1549 #ifdef USE_TANGENT 1550 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1551 #else 1552 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1553 #endif 1554 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1555 tbn2[0] *= faceDirection; 1556 tbn2[1] *= faceDirection; 1557 #endif 1558#endif 1559vec3 nonPerturbedNormal = normal;`,kU=`#ifdef USE_NORMALMAP_OBJECTSPACE 1560 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1561 #ifdef FLIP_SIDED 1562 normal = - normal; 1563 #endif 1564 #ifdef DOUBLE_SIDED 1565 normal = normal * faceDirection; 1566 #endif 1567 normal = normalize( normalMatrix * normal ); 1568#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1569 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1570 mapN.xy *= normalScale; 1571 normal = normalize( tbn * mapN ); 1572#elif defined( USE_BUMPMAP )
1573 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1574#endif`,GU=`#ifndef FLAT_SHADED 1575 varying vec3 vNormal; 1576 #ifdef USE_TANGENT 1577 varying vec3 vTangent; 1578 varying vec3 vBitangent; 1579 #endif 1580#endif`,HU=`#ifndef FLAT_SHADED 1581 varying vec3 vNormal; 1582 #ifdef USE_TANGENT 1583 varying vec3 vTangent; 1584 varying vec3 vBitangent; 1585 #endif 1586#endif`,VU=`#ifndef FLAT_SHADED 1587 vNormal = normalize( transformedNormal ); 1588 #ifdef USE_TANGENT 1589 vTangent = normalize( transformedTangent ); 1590 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1591 #endif 1592#endif`,WU=`#ifdef USE_NORMALMAP 1593 uniform sampler2D normalMap; 1594 uniform vec2 normalScale; 1595#endif 1596#ifdef USE_NORMALMAP_OBJECTSPACE 1597 uniform mat3 normalMatrix; 1598#endif 1599#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1600 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1601 vec3 q0 = dFdx( eye_pos.xyz ); 1602 vec3 q1 = dFdy( eye_pos.xyz ); 1603 vec2 st0 = dFdx( uv.st ); 1604 vec2 st1 = dFdy( uv.st ); 1605 vec3 N = surf_norm; 1606 vec3 q1perp = cross( q1, N ); 1607 vec3 q0perp = cross( N, q0 ); 1608 vec3 T = q1perp * st0.x + q0perp * st1.x; 1609 vec3 B = q1perp * st0.y + q0perp * st1.y; 1610 float det = max( dot( T, T ), dot( B, B ) ); 1611 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1612 return mat3( T * scale, B * scale, N ); 1613 } 1614#endif`,XU=`#ifdef USE_CLEARCOAT 1615 vec3 clearcoatNormal = nonPerturbedNormal; 1616#endif`,JU=`#ifdef USE_CLEARCOAT_NORMALMAP 1617 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1618 clearcoatMapN.xy *= clearcoatNormalScale; 1619 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1620#endif`,jU=`#ifdef USE_CLEARCOATMAP 1621 uniform sampler2D clearcoatMap; 1622#endif 1623#ifdef USE_CLEARCOAT_NORMALMAP 1624 uniform sampler2D clearcoatNormalMap; 1625 uniform vec2 clearcoatNormalScale; 1626#endif 1627#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1628 uniform sampler2D clearcoatRoughnessMap; 1629#endif`,YU=`#ifdef USE_IRIDESCENCEMAP 1630 uniform sampler2D iridescenceMap; 1631#endif 1632#ifdef USE_IRIDESCENCE_THICKNESSMAP 1633 uniform sampler2D iridescenceThicknessMap; 1634#endif`,KU=`#ifdef OPAQUE 1635diffuseColor.a = 1.0; 1636#endif 1637#ifdef USE_TRANSMISSION 1638diffuseColor.a *= material.transmissionAlpha; 1639#endif 1640gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,QU=`vec3 packNormalToRGB( const in vec3 normal ) { 1641 return normalize( normal ) * 0.5 + 0.5; 1642} 1643vec3 unpackRGBToNormal( const in vec3 rgb ) { 1644 return 2.0 * rgb.xyz - 1.0; 1645} 1646const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; 1647const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); 1648const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); 1649const float ShiftRight8 = 1. / 256.; 1650vec4 packDepthToRGBA( const in float v ) { 1651 vec4 r = vec4( fract( v * PackFactors ), v ); 1652 r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; 1653} 1654float unpackRGBAToDepth( const in vec4 v ) { 1655 return dot( v, UnpackFactors ); 1656} 1657vec2 packDepthToRG( in highp float v ) { 1658 return packDepthToRGBA( v ).yx; 1659} 1660float unpackRGToDepth( const in highp vec2 v ) { 1661 return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); 1662} 1663vec4 pack2HalfToRGBA( vec2 v ) { 1664 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1665 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1666} 1667vec2 unpackRGBATo2Half( vec4 v ) { 1668 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1669} 1670float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1671 return ( viewZ + near ) / ( near - far ); 1672} 1673float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1674 return depth * ( near - far ) - near; 1675} 1676float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1677 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1678} 1679float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1680 return ( near * far ) / ( ( far - near ) * depth - far ); 1681}`,qU=`#ifdef PREMULTIPLIED_ALPHA 1682 gl_FragColor.rgb *= gl_FragColor.a; 1683#endif`,ZU=`vec4 mvPosition = vec4( transformed, 1.0 ); 1684#ifdef USE_BATCHING 1685 mvPosition = batchingMatrix * mvPosition; 1686#endif 1687#ifdef USE_INSTANCING 1688 mvPosition = instanceMatrix * mvPosition; 1689#endif 1690mvPosition = modelViewMatrix * mvPosition; 1691gl_Position = projectionMatrix * mvPosition;`,$U=`#ifdef DITHERING 1692 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1693#endif`,e5=`#ifdef DITHERING 1694 vec3 dithering( vec3 color ) { 1695 float grid_position = rand( gl_FragCoord.xy ); 1696 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1697 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1698 return color + dither_shift_RGB; 1699 } 1700#endif`,t5=`float roughnessFactor = roughness; 1701#ifdef USE_ROUGHNESSMAP 1702 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1703 roughnessFactor *= texelRoughness.g; 1704#endif`,n5=`#ifdef USE_ROUGHNESSMAP 1705 uniform sampler2D roughnessMap; 1706#endif`,i5
vendor: 8,706 bytes, lines 1706-1889
1706=`#if NUM_SPOT_LIGHT_COORDS > 0 1707 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1708#endif 1709#if NUM_SPOT_LIGHT_MAPS > 0 1710 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1711#endif 1712#ifdef USE_SHADOWMAP 1713 #if NUM_DIR_LIGHT_SHADOWS > 0 1714 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1715 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1716 struct DirectionalLightShadow { 1717 float shadowBias; 1718 float shadowNormalBias; 1719 float shadowRadius; 1720 vec2 shadowMapSize; 1721 }; 1722 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1723 #endif 1724 #if NUM_SPOT_LIGHT_SHADOWS > 0 1725 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1726 struct SpotLightShadow { 1727 float shadowBias; 1728 float shadowNormalBias; 1729 float shadowRadius; 1730 vec2 shadowMapSize; 1731 }; 1732 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1733 #endif 1734 #if NUM_POINT_LIGHT_SHADOWS > 0 1735 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1736 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1737 struct PointLightShadow { 1738 float shadowBias; 1739 float shadowNormalBias; 1740 float shadowRadius; 1741 vec2 shadowMapSize; 1742 float shadowCameraNear; 1743 float shadowCameraFar; 1744 }; 1745 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1746 #endif 1747 float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { 1748 return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); 1749 } 1750 vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { 1751 return unpackRGBATo2Half( texture2D( shadow, uv ) ); 1752 } 1753 float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ 1754 float occlusion = 1.0; 1755 vec2 distribution = texture2DDistribution( shadow, uv ); 1756 float hard_shadow = step( compare , distribution.x ); 1757 if (hard_shadow != 1.0 ) { 1758 float distance = compare - distribution.x ; 1759 float variance = max( 0.00000, distribution.y * distribution.y ); 1760 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 ); 1761 } 1762 return occlusion; 1763 } 1764 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1765 float shadow = 1.0; 1766 shadowCoord.xyz /= shadowCoord.w; 1767 shadowCoord.z += shadowBias; 1768 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1769 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1770 if ( frustumTest ) { 1771 #if defined( SHADOWMAP_TYPE_PCF ) 1772 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1773 float dx0 = - texelSize.x * shadowRadius; 1774 float dy0 = - texelSize.y * shadowRadius; 1775 float dx1 = + texelSize.x * shadowRadius; 1776 float dy1 = + texelSize.y * shadowRadius; 1777 float dx2 = dx0 / 2.0; 1778 float dy2 = dy0 / 2.0; 1779 float dx3 = dx1 / 2.0; 1780 float dy3 = dy1 / 2.0; 1781 shadow = ( 1782 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + 1783 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + 1784 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + 1785 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + 1786 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + 1787 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + 1788 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + 1789 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + 1790 texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + 1791 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + 1792 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + 1793 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + 1794 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + 1795 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + 1796 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + 1797 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + 1798 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) 1799 ) * ( 1.0 / 17.0 ); 1800 #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) 1801 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1802 float dx = texelSize.x; 1803 float dy = texelSize.y; 1804 vec2 uv = shadowCoord.xy; 1805 vec2 f = fract( uv * shadowMapSize + 0.5 ); 1806 uv -= f * texelSize; 1807 shadow = ( 1808 texture2DCompare( shadowMap, uv, shadowCoord.z ) + 1809 texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + 1810 texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + 1811 texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + 1812 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), 1813 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), 1814 f.x ) + 1815 mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), 1816 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), 1817 f.x ) + 1818 mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), 1819 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), 1820 f.y ) + 1821 mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), 1822 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), 1823 f.y ) + 1824 mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), 1825 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), 1826 f.x ), 1827 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), 1828 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), 1829 f.x ), 1830 f.y ) 1831 ) * ( 1.0 / 9.0 ); 1832 #elif defined( SHADOWMAP_TYPE_VSM ) 1833 shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); 1834 #else 1835 shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); 1836 #endif 1837 } 1838 return shadow; 1839 } 1840 vec2 cubeToUV( vec3 v, float texelSizeY ) { 1841 vec3 absV = abs( v ); 1842 float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); 1843 absV *= scaleToCube; 1844 v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); 1845 vec2 planar = v.xy; 1846 float almostATexel = 1.5 * texelSizeY; 1847 float almostOne = 1.0 - almostATexel; 1848 if ( absV.z >= almostOne ) { 1849 if ( v.z > 0.0 ) 1850 planar.x = 4.0 - v.x; 1851 } else if ( absV.x >= almostOne ) { 1852 float signX = sign( v.x ); 1853 planar.x = v.z * signX + 2.0 * signX; 1854 } else if ( absV.y >= almostOne ) { 1855 float signY = sign( v.y ); 1856 planar.x = v.x + 2.0 * signY + 2.0; 1857 planar.y = v.z * signY - 2.0; 1858 } 1859 return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); 1860 } 1861 float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1862 float shadow = 1.0; 1863 vec3 lightToPosition = shadowCoord.xyz; 1864 1865 float lightToPositionLength = length( lightToPosition ); 1866 if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { 1867 float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; 1868 vec3 bd3D = normalize( lightToPosition ); 1869 vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); 1870 #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) 1871 vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; 1872 shadow = ( 1873 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + 1874 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + 1875 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + 1876 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + 1877 texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + 1878 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + 1879 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + 1880 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + 1881 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) 1882 ) * ( 1.0 / 9.0 ); 1883 #else 1884 shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); 1885 #endif 1886 } 1887 return shadow; 1888 } 1889#endif`,
1889r5=`#if NUM_SPOT_LIGHT_COORDS > 0 1890 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1891 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1892#endif 1893#ifdef USE_SHADOWMAP 1894 #if NUM_DIR_LIGHT_SHADOWS > 0 1895 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 1896 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1897 struct DirectionalLightShadow { 1898 float shadowBias; 1899 float shadowNormalBias; 1900 float shadowRadius; 1901 vec2 shadowMapSize; 1902 }; 1903 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1904 #endif 1905 #if NUM_SPOT_LIGHT_SHADOWS > 0 1906 struct SpotLightShadow { 1907 float shadowBias; 1908 float shadowNormalBias; 1909 float shadowRadius; 1910 vec2 shadowMapSize; 1911 }; 1912 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1913 #endif 1914 #if NUM_POINT_LIGHT_SHADOWS > 0 1915 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 1916 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1917 struct PointLightShadow { 1918 float shadowBias; 1919 float shadowNormalBias; 1920 float shadowRadius; 1921 vec2 shadowMapSize; 1922 float shadowCameraNear; 1923 float shadowCameraFar; 1924 }; 1925 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1926 #endif 1927#endif`,s5=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 1928 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 1929 vec4 shadowWorldPosition; 1930#endif 1931#if defined( USE_SHADOWMAP ) 1932 #if NUM_DIR_LIGHT_SHADOWS > 0 1933 #pragma unroll_loop_start 1934 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 1935 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 1936 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 1937 } 1938 #pragma unroll_loop_end 1939 #endif 1940 #if NUM_POINT_LIGHT_SHADOWS > 0 1941 #pragma unroll_loop_start 1942 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 1943 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 1944 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 1945 } 1946 #pragma unroll_loop_end 1947 #endif 1948#endif 1949#if NUM_SPOT_LIGHT_COORDS > 0 1950 #pragma unroll_loop_start 1951 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 1952 shadowWorldPosition = worldPosition; 1953 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1954 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 1955 #endif 1956 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 1957 } 1958 #pragma unroll_loop_end 1959#endif`,o5=`float getShadowMask() { 1960 float shadow = 1.0; 1961 #ifdef USE_SHADOWMAP 1962 #if NUM_DIR_LIGHT_SHADOWS > 0 1963 DirectionalLightShadow directionalLight; 1964 #pragma unroll_loop_start 1965 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 1966 directionalLight = directionalLightShadows[ i ]; 1967 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1968 } 1969 #pragma unroll_loop_end 1970 #endif 1971 #if NUM_SPOT_LIGHT_SHADOWS > 0 1972 SpotLightShadow spotLight; 1973 #pragma unroll_loop_start 1974 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 1975 spotLight = spotLightShadows[ i ]; 1976 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1977 } 1978 #pragma unroll_loop_end 1979 #endif 1980 #if NUM_POINT_LIGHT_SHADOWS > 0 1981 PointLightShadow pointLight; 1982 #pragma unroll_loop_start 1983 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 1984 pointLight = pointLightShadows[ i ]; 1985 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 1986 } 1987 #pragma unroll_loop_end 1988 #endif 1989 #endif 1990 return shadow; 1991}`,a5=`#ifdef USE_SKINNING 1992 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 1993 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 1994 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 1995 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 1996#endif`,l5=`#ifdef USE_SKINNING 1997 uniform mat4 bindMatrix; 1998 uniform mat4 bindMatrixInverse; 1999 uniform highp sampler2D boneTexture; 2000 mat4 getBoneMatrix( const in float i ) { 2001 int size = textureSize( boneTexture, 0 ).x; 2002 int j = int( i ) * 4; 2003 int x = j % size; 2004 int y = j / size; 2005 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2006 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2007 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2008 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2009 return mat4( v1, v2, v3, v4 ); 2010 } 2011#endif`,u5=`#ifdef USE_SKINNING 2012 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2013 vec4 skinned = vec4( 0.0 ); 2014 skinned += boneMatX * skinVertex * skinWeight.x; 2015 skinned += boneMatY * skinVertex * skinWeight.y; 2016 skinned += boneMatZ * skinVertex * skinWeight.z; 2017 skinned += boneMatW * skinVertex * skinWeight.w; 2018 transformed = ( bindMatrixInverse * skinned ).xyz; 2019#endif`,c5=`#ifdef USE_SKINNING 2020 mat4 skinMatrix = mat4( 0.0 ); 2021 skinMatrix += skinWeight.x * boneMatX; 2022 skinMatrix += skinWeight.y * boneMatY; 2023 skinMatrix += skinWeight.z * boneMatZ; 2024 skinMatrix += skinWeight.w * boneMatW; 2025 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2026 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2027 #ifdef USE_TANGENT 2028 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2029 #endif 2030#endif`,f5=`float specularStrength; 2031#ifdef USE_SPECULARMAP 2032 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2033 specularStrength = texelSpecular.r; 2034#else 2035 specularStrength = 1.0; 2036#endif`,d5=`#ifdef USE_SPECULARMAP 2037 uniform sampler2D specularMap; 2038#endif`,h5=`#if defined( TONE_MAPPING ) 2039 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2040#endif`,p5=`#ifndef saturate 2041#define saturate( a ) clamp( a, 0.0, 1.0 ) 2042#endif 2043uniform float toneMappingExposure; 2044vec3 LinearToneMapping( vec3 color ) { 2045 return saturate( toneMappingExposure * color ); 2046} 2047vec3 ReinhardToneMapping( vec3 color ) { 2048 color *= toneMappingExposure; 2049 return saturate( color / ( vec3( 1.0 ) + color ) ); 2050} 2051vec3 OptimizedCineonToneMapping( vec3 color ) { 2052 color *= toneMappingExposure; 2053 color = max( vec3( 0.0 ), color - 0.004 ); 2054 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2055} 2056vec3 RRTAndODTFit( vec3 v ) { 2057 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2058 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2059 return a / b; 2060} 2061vec3 ACESFilmicToneMapping( vec3 color ) { 2062 const mat3 ACESInputMat = mat3( 2063 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2064 vec3( 0.04823, 0.01566, 0.83777 ) 2065 ); 2066 const mat3 ACESOutputMat = mat3( 2067 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2068 vec3( -0.07367, -0.00605, 1.07602 ) 2069 ); 2070 color *= toneMappingExposure / 0.6; 2071 color = ACESInputMat * color; 2072 color = RRTAndODTFit( color ); 2073 color = ACESOutputMat * color; 2074 return saturate( color ); 2075} 2076const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2077 vec3( 1.6605, - 0.1246, - 0.0182 ), 2078 vec3( - 0.5876, 1.1329, - 0.1006 ), 2079 vec3( - 0.0728, - 0.0083, 1.1187 ) 2080); 2081const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2082 vec3( 0.6274, 0.0691, 0.0164 ), 2083 vec3( 0.3293, 0.9195, 0.0880 ), 2084 vec3( 0.0433, 0.0113, 0.8956 ) 2085); 2086vec3 agxDefaultContrastApprox( vec3 x ) { 2087 vec3 x2 = x * x; 2088 vec3 x4 = x2 * x2; 2089 return + 15.5 * x4 * x2 2090 - 40.14 * x4 * x 2091 + 31.96 * x4 2092 - 6.868 * x2 * x 2093 + 0.4298 * x2 2094 + 0.1191 * x 2095 - 0.00232; 2096} 2097vec3 AgXToneMapping( vec3 color ) { 2098 const mat3 AgXInsetMatrix = mat3( 2099 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2100 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2101 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2102 );
2103 const mat3 AgXOutsetMatrix = mat3( 2104 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2105 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2106 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2107 ); 2108 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2109 color *= toneMappingExposure; 2110 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2111 color = AgXInsetMatrix * color; 2112 color = max( color, 1e-10 ); color = log2( color ); 2113 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2114 color = clamp( color, 0.0, 1.0 ); 2115 color = agxDefaultContrastApprox( color ); 2116 color = AgXOutsetMatrix * color; 2117 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2118 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2119 color = clamp( color, 0.0, 1.0 ); 2120 return color; 2121} 2122vec3 NeutralToneMapping( vec3 color ) { 2123 const float StartCompression = 0.8 - 0.04; 2124 const float Desaturation = 0.15; 2125 color *= toneMappingExposure; 2126 float x = min( color.r, min( color.g, color.b ) ); 2127 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2128 color -= offset; 2129 float peak = max( color.r, max( color.g, color.b ) ); 2130 if ( peak < StartCompression ) return color; 2131 float d = 1. - StartCompression; 2132 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2133 color *= newPeak / peak; 2134 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2135 return mix( color, vec3( newPeak ), g ); 2136} 2137vec3 CustomToneMapping( vec3 color ) { return color; }`,m5=`#ifdef USE_TRANSMISSION 2138 material.transmission = transmission; 2139 material.transmissionAlpha = 1.0; 2140 material.thickness = thickness; 2141 material.attenuationDistance = attenuationDistance; 2142 material.attenuationColor = attenuationColor; 2143 #ifdef USE_TRANSMISSIONMAP 2144 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2145 #endif 2146 #ifdef USE_THICKNESSMAP 2147 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2148 #endif 2149 vec3 pos = vWorldPosition; 2150 vec3 v = normalize( cameraPosition - pos ); 2151 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2152 vec4 transmitted = getIBLVolumeRefraction( 2153 n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, 2154 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2155 material.attenuationColor, material.attenuationDistance ); 2156 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2157 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2158#endif`,g5=`#ifdef USE_TRANSMISSION 2159 uniform float transmission; 2160 uniform float thickness; 2161 uniform float attenuationDistance; 2162 uniform vec3 attenuationColor; 2163 #ifdef USE_TRANSMISSIONMAP 2164 uniform sampler2D transmissionMap; 2165 #endif 2166 #ifdef USE_THICKNESSMAP 2167 uniform sampler2D thicknessMap; 2168 #endif 2169 uniform vec2 transmissionSamplerSize; 2170 uniform sampler2D transmissionSamplerMap; 2171 uniform mat4 modelMatrix; 2172 uniform mat4 projectionMatrix; 2173 varying vec3 vWorldPosition; 2174 float w0( float a ) { 2175 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2176 } 2177 float w1( float a ) { 2178 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2179 } 2180 float w2( float a ){ 2181 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2182 } 2183 float w3( float a ) { 2184 return ( 1.0 / 6.0 ) * ( a * a * a ); 2185 } 2186 float g0( float a ) { 2187 return w0( a ) + w1( a ); 2188 } 2189 float g1( float a ) { 2190 return w2( a ) + w3( a ); 2191 } 2192 float h0( float a ) { 2193 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2194 } 2195 float h1( float a ) { 2196 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2197 } 2198 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2199 uv = uv * texelSize.zw + 0.5; 2200 vec2 iuv = floor( uv ); 2201 vec2 fuv = fract( uv ); 2202 float g0x = g0( fuv.x ); 2203 float g1x = g1( fuv.x ); 2204 float h0x = h0( fuv.x ); 2205 float h1x = h1( fuv.x ); 2206 float h0y = h0( fuv.y ); 2207 float h1y = h1( fuv.y ); 2208 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2209 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2210 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2211 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2212 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2213 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2214 } 2215 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2216 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2217 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2218 vec2 fLodSizeInv = 1.0 / fLodSize; 2219 vec2 cLodSizeInv = 1.0 / cLodSize; 2220 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2221 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2222 return mix( fSample, cSample, fract( lod ) ); 2223 } 2224 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2225 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2226 vec3 modelScale; 2227 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2228 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2229 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2230 return normalize( refractionVector ) * thickness * modelScale; 2231 } 2232 float applyIorToRoughness( const in float roughness, const in float ior ) { 2233 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2234 } 2235 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2236 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2237 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2238 } 2239 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2240 if ( isinf( attenuationDistance ) ) { 2241 return vec3( 1.0 ); 2242 } else { 2243 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2244 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2245 } 2246 } 2247 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2248 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2249 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2250 const in vec3 attenuationColor, const in float attenuationDistance ) { 2251 vec4 transmittedLight; 2252 vec3 transmittance; 2253 #ifdef USE_DISPERSION 2254 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2255 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2256 for ( int i = 0; i < 3; i ++ ) { 2257 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2258 vec3 refractedRayExit = position + transmissionRay; 2259 2260 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2261 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2262 refractionCoords += 1.0; 2263 refractionCoords /= 2.0; 2264 2265 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2266 transmittedLight[ i ] = transmissionSample[ i ]; 2267 transmittedLight.a += transmissionSample.a; 2268 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2269 } 2270 transmittedLight.a /= 3.0; 2271 2272 #else 2273 2274 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2275 vec3 refractedRayExit = position + transmissionRay; 2276 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2277 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2278 refractionCoords += 1.0; 2279 refractionCoords /= 2.0; 2280 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2281 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2282 2283 #endif 2284 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2285 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2286 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2287 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2288 } 2289#endif`,v5=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2290 varying vec2 vUv; 2291#endif 2292#ifdef USE_MAP 2293 varying vec2 vMapUv; 2294#endif 2295#ifdef USE_ALPHAMAP
2296 varying vec2 vAlphaMapUv; 2297#endif 2298#ifdef USE_LIGHTMAP 2299 varying vec2 vLightMapUv; 2300#endif 2301#ifdef USE_AOMAP 2302 varying vec2 vAoMapUv; 2303#endif 2304#ifdef USE_BUMPMAP 2305 varying vec2 vBumpMapUv; 2306#endif 2307#ifdef USE_NORMALMAP 2308 varying vec2 vNormalMapUv; 2309#endif 2310#ifdef USE_EMISSIVEMAP 2311 varying vec2 vEmissiveMapUv; 2312#endif 2313#ifdef USE_METALNESSMAP 2314 varying vec2 vMetalnessMapUv; 2315#endif 2316#ifdef USE_ROUGHNESSMAP 2317 varying vec2 vRoughnessMapUv; 2318#endif 2319#ifdef USE_ANISOTROPYMAP 2320 varying vec2 vAnisotropyMapUv; 2321#endif 2322#ifdef USE_CLEARCOATMAP 2323 varying vec2 vClearcoatMapUv; 2324#endif 2325#ifdef USE_CLEARCOAT_NORMALMAP 2326 varying vec2 vClearcoatNormalMapUv; 2327#endif 2328#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2329 varying vec2 vClearcoatRoughnessMapUv; 2330#endif 2331#ifdef USE_IRIDESCENCEMAP 2332 varying vec2 vIridescenceMapUv; 2333#endif 2334#ifdef USE_IRIDESCENCE_THICKNESSMAP 2335 varying vec2 vIridescenceThicknessMapUv; 2336#endif 2337#ifdef USE_SHEEN_COLORMAP 2338 varying vec2 vSheenColorMapUv; 2339#endif 2340#ifdef USE_SHEEN_ROUGHNESSMAP 2341 varying vec2 vSheenRoughnessMapUv; 2342#endif 2343#ifdef USE_SPECULARMAP 2344 varying vec2 vSpecularMapUv; 2345#endif 2346#ifdef USE_SPECULAR_COLORMAP 2347 varying vec2 vSpecularColorMapUv; 2348#endif 2349#ifdef USE_SPECULAR_INTENSITYMAP 2350 varying vec2 vSpecularIntensityMapUv; 2351#endif 2352#ifdef USE_TRANSMISSIONMAP 2353 uniform mat3 transmissionMapTransform; 2354 varying vec2 vTransmissionMapUv; 2355#endif 2356#ifdef USE_THICKNESSMAP 2357 uniform mat3 thicknessMapTransform; 2358 varying vec2 vThicknessMapUv; 2359#endif`,_5=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2360 varying vec2 vUv; 2361#endif 2362#ifdef USE_MAP 2363 uniform mat3 mapTransform; 2364 varying vec2 vMapUv; 2365#endif 2366#ifdef USE_ALPHAMAP 2367 uniform mat3 alphaMapTransform; 2368 varying vec2 vAlphaMapUv; 2369#endif 2370#ifdef USE_LIGHTMAP 2371 uniform mat3 lightMapTransform; 2372 varying vec2 vLightMapUv; 2373#endif 2374#ifdef USE_AOMAP 2375 uniform mat3 aoMapTransform; 2376 varying vec2 vAoMapUv; 2377#endif 2378#ifdef USE_BUMPMAP 2379 uniform mat3 bumpMapTransform; 2380 varying vec2 vBumpMapUv; 2381#endif 2382#ifdef USE_NORMALMAP 2383 uniform mat3 normalMapTransform; 2384 varying vec2 vNormalMapUv; 2385#endif 2386#ifdef USE_DISPLACEMENTMAP 2387 uniform mat3 displacementMapTransform; 2388 varying vec2 vDisplacementMapUv; 2389#endif 2390#ifdef USE_EMISSIVEMAP 2391 uniform mat3 emissiveMapTransform; 2392 varying vec2 vEmissiveMapUv; 2393#endif 2394#ifdef USE_METALNESSMAP 2395 uniform mat3 metalnessMapTransform; 2396 varying vec2 vMetalnessMapUv; 2397#endif 2398#ifdef USE_ROUGHNESSMAP 2399 uniform mat3 roughnessMapTransform; 2400 varying vec2 vRoughnessMapUv; 2401#endif 2402#ifdef USE_ANISOTROPYMAP 2403 uniform mat3 anisotropyMapTransform; 2404 varying vec2 vAnisotropyMapUv; 2405#endif 2406#ifdef USE_CLEARCOATMAP 2407 uniform mat3 clearcoatMapTransform; 2408 varying vec2 vClearcoatMapUv; 2409#endif 2410#ifdef USE_CLEARCOAT_NORMALMAP 2411 uniform mat3 clearcoatNormalMapTransform; 2412 varying vec2 vClearcoatNormalMapUv; 2413#endif 2414#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2415 uniform mat3 clearcoatRoughnessMapTransform; 2416 varying vec2 vClearcoatRoughnessMapUv; 2417#endif 2418#ifdef USE_SHEEN_COLORMAP 2419 uniform mat3 sheenColorMapTransform; 2420 varying vec2 vSheenColorMapUv; 2421#endif 2422#ifdef USE_SHEEN_ROUGHNESSMAP 2423 uniform mat3 sheenRoughnessMapTransform; 2424 varying vec2 vSheenRoughnessMapUv; 2425#endif 2426#ifdef USE_IRIDESCENCEMAP 2427 uniform mat3 iridescenceMapTransform; 2428 varying vec2 vIridescenceMapUv; 2429#endif 2430#ifdef USE_IRIDESCENCE_THICKNESSMAP 2431 uniform mat3 iridescenceThicknessMapTransform; 2432 varying vec2 vIridescenceThicknessMapUv; 2433#endif 2434#ifdef USE_SPECULARMAP 2435 uniform mat3 specularMapTransform; 2436 varying vec2 vSpecularMapUv; 2437#endif 2438#ifdef USE_SPECULAR_COLORMAP 2439 uniform mat3 specularColorMapTransform; 2440 varying vec2 vSpecularColorMapUv; 2441#endif 2442#ifdef USE_SPECULAR_INTENSITYMAP 2443 uniform mat3 specularIntensityMapTransform; 2444 varying vec2 vSpecularIntensityMapUv; 2445#endif 2446#ifdef USE_TRANSMISSIONMAP 2447 uniform mat3 transmissionMapTransform; 2448 varying vec2 vTransmissionMapUv; 2449#endif 2450#ifdef USE_THICKNESSMAP 2451 uniform mat3 thicknessMapTransform; 2452 varying vec2 vThicknessMapUv; 2453#endif`,y5=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2454 vUv = vec3( uv, 1 ).xy; 2455#endif 2456#ifdef USE_MAP 2457 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2458#endif 2459#ifdef USE_ALPHAMAP 2460 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2461#endif 2462#ifdef USE_LIGHTMAP 2463 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2464#endif 2465#ifdef USE_AOMAP 2466 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2467#endif 2468#ifdef USE_BUMPMAP 2469 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2470#endif 2471#ifdef USE_NORMALMAP 2472 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2473#endif 2474#ifdef USE_DISPLACEMENTMAP 2475 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2476#endif 2477#ifdef USE_EMISSIVEMAP 2478 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2479#endif 2480#ifdef USE_METALNESSMAP 2481 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2482#endif 2483#ifdef USE_ROUGHNESSMAP 2484 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2485#endif 2486#ifdef USE_ANISOTROPYMAP 2487 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2488#endif 2489#ifdef USE_CLEARCOATMAP 2490 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2491#endif 2492#ifdef USE_CLEARCOAT_NORMALMAP 2493 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2494#endif 2495#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2496 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2497#endif
2498#ifdef USE_IRIDESCENCEMAP 2499 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2500#endif 2501#ifdef USE_IRIDESCENCE_THICKNESSMAP 2502 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2503#endif 2504#ifdef USE_SHEEN_COLORMAP 2505 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2506#endif 2507#ifdef USE_SHEEN_ROUGHNESSMAP 2508 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2509#endif 2510#ifdef USE_SPECULARMAP 2511 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2512#endif 2513#ifdef USE_SPECULAR_COLORMAP 2514 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2515#endif 2516#ifdef USE_SPECULAR_INTENSITYMAP 2517 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2518#endif 2519#ifdef USE_TRANSMISSIONMAP 2520 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2521#endif 2522#ifdef USE_THICKNESSMAP 2523 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2524#endif`,x5=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2525 vec4 worldPosition = vec4( transformed, 1.0 ); 2526 #ifdef USE_BATCHING 2527 worldPosition = batchingMatrix * worldPosition; 2528 #endif 2529 #ifdef USE_INSTANCING 2530 worldPosition = instanceMatrix * worldPosition; 2531 #endif 2532 worldPosition = modelMatrix * worldPosition; 2533#endif`;const A5=`varying vec2 vUv; 2534uniform mat3 uvTransform; 2535void main() { 2536 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2537 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2538}`,S5=`uniform sampler2D t2D; 2539uniform float backgroundIntensity; 2540varying vec2 vUv; 2541void main() { 2542 vec4 texColor = texture2D( t2D, vUv ); 2543 #ifdef DECODE_VIDEO_TEXTURE 2544 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 ); 2545 #endif 2546 texColor.rgb *= backgroundIntensity; 2547 gl_FragColor = texColor; 2548 #include <tonemapping_fragment> 2549 #include <colorspace_fragment> 2550}`,E5=`varying vec3 vWorldDirection; 2551#include <common> 2552void main() { 2553 vWorldDirection = transformDirection( position, modelMatrix ); 2554 #include <begin_vertex> 2555 #include <project_vertex> 2556 gl_Position.z = gl_Position.w; 2557}`,w5=`#ifdef ENVMAP_TYPE_CUBE 2558 uniform samplerCube envMap; 2559#elif defined( ENVMAP_TYPE_CUBE_UV ) 2560 uniform sampler2D envMap; 2561#endif 2562uniform float flipEnvMap; 2563uniform float backgroundBlurriness; 2564uniform float backgroundIntensity; 2565uniform mat3 backgroundRotation; 2566varying vec3 vWorldDirection; 2567#include <cube_uv_reflection_fragment> 2568void main() { 2569 #ifdef ENVMAP_TYPE_CUBE 2570 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2571 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2572 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2573 #else 2574 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2575 #endif 2576 texColor.rgb *= backgroundIntensity; 2577 gl_FragColor = texColor; 2578 #include <tonemapping_fragment> 2579 #include <colorspace_fragment> 2580}`,M5=`varying vec3 vWorldDirection; 2581#include <common> 2582void main() { 2583 vWorldDirection = transformDirection( position, modelMatrix ); 2584 #include <begin_vertex> 2585 #include <project_vertex> 2586 gl_Position.z = gl_Position.w; 2587}`,C5=`uniform samplerCube tCube; 2588uniform float tFlip; 2589uniform float opacity; 2590varying vec3 vWorldDirection; 2591void main() { 2592 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2593 gl_FragColor = texColor; 2594 gl_FragColor.a *= opacity; 2595 #include <tonemapping_fragment> 2596 #include <colorspace_fragment> 2597}`,T5=`#include <common> 2598#include <batching_pars_vertex> 2599#include <uv_pars_vertex> 2600#include <displacementmap_pars_vertex> 2601#include <morphtarget_pars_vertex> 2602#include <skinning_pars_vertex> 2603#include <logdepthbuf_pars_vertex> 2604#include <clipping_planes_pars_vertex> 2605varying vec2 vHighPrecisionZW; 2606void main() { 2607 #include <uv_vertex> 2608 #include <batching_vertex> 2609 #include <skinbase_vertex> 2610 #include <morphinstance_vertex> 2611 #ifdef USE_DISPLACEMENTMAP 2612 #include <beginnormal_vertex> 2613 #include <morphnormal_vertex> 2614 #include <skinnormal_vertex> 2615 #endif 2616 #include <begin_vertex> 2617 #include <morphtarget_vertex> 2618 #include <skinning_vertex> 2619 #include <displacementmap_vertex> 2620 #include <project_vertex> 2621 #include <logdepthbuf_vertex> 2622 #include <clipping_planes_vertex> 2623 vHighPrecisionZW = gl_Position.zw; 2624}`,R5=`#if DEPTH_PACKING == 3200 2625 uniform float opacity; 2626#endif 2627#include <common> 2628#include <packing> 2629#include <uv_pars_fragment> 2630#include <map_pars_fragment> 2631#include <alphamap_pars_fragment> 2632#include <alphatest_pars_fragment> 2633#include <alphahash_pars_fragment> 2634#include <logdepthbuf_pars_fragment> 2635#include <clipping_planes_pars_fragment> 2636varying vec2 vHighPrecisionZW; 2637void main() { 2638 vec4 diffuseColor = vec4( 1.0 ); 2639 #include <clipping_planes_fragment> 2640 #if DEPTH_PACKING == 3200 2641 diffuseColor.a = opacity; 2642 #endif 2643 #include <map_fragment> 2644 #include <alphamap_fragment> 2645 #include <alphatest_fragment> 2646 #include <alphahash_fragment> 2647 #include <logdepthbuf_fragment> 2648 float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; 2649 #if DEPTH_PACKING == 3200 2650 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2651 #elif DEPTH_PACKING == 3201 2652 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2653 #endif 2654}`,P5=`#define DISTANCE 2655varying vec3 vWorldPosition; 2656#include <common> 2657#include <batching_pars_vertex> 2658#include <uv_pars_vertex> 2659#include <displacementmap_pars_vertex> 2660#include <morphtarget_pars_vertex> 2661#include <skinning_pars_vertex> 2662#include <clipping_planes_pars_vertex> 2663void main() { 2664 #include <uv_vertex> 2665 #include <batching_vertex> 2666 #include <skinbase_vertex> 2667 #include <morphinstance_vertex> 2668 #ifdef USE_DISPLACEMENTMAP 2669 #include <beginnormal_vertex> 2670 #include <morphnormal_vertex> 2671 #include <skinnormal_vertex> 2672 #endif 2673 #include <begin_vertex> 2674 #include <morphtarget_vertex> 2675 #include <skinning_vertex> 2676 #include <displacementmap_vertex> 2677 #include <project_vertex> 2678 #include <worldpos_vertex> 2679 #include <clipping_planes_vertex> 2680 vWorldPosition = worldPosition.xyz; 2681}`,b5=`#define DISTANCE 2682uniform vec3 referencePosition; 2683uniform float nearDistance; 2684uniform float farDistance; 2685varying vec3 vWorldPosition; 2686#include <common> 2687#include <packing> 2688#include <uv_pars_fragment> 2689#include <map_pars_fragment> 2690#include <alphamap_pars_fragment> 2691#include <alphatest_pars_fragment> 2692#include <alphahash_pars_fragment> 2693#include <clipping_planes_pars_fragment> 2694void main () { 2695 vec4 diffuseColor = vec4( 1.0 ); 2696 #include <clipping_planes_fragment> 2697 #include <map_fragment> 2698 #include <alphamap_fragment> 2699 #include <alphatest_fragment> 2700 #include <alphahash_fragment> 2701 float dist = length( vWorldPosition - referencePosition ); 2702 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2703 dist = saturate( dist ); 2704 gl_FragColor = packDepthToRGBA( dist ); 2705}`,I5=`varying vec3 vWorldDirection; 2706#include <common> 2707void main() { 2708 vWorldDirection = transformDirection( position, modelMatrix ); 2709 #include <begin_vertex> 2710 #include <project_vertex> 2711}`,B5=`uniform sampler2D tEquirect; 2712varying vec3 vWorldDirection; 2713#include <common> 2714void main() { 2715 vec3 direction = normalize( vWorldDirection ); 2716 vec2 sampleUV = equirectUv( direction ); 2717 gl_FragColor = texture2D( tEquirect, sampleUV ); 2718 #include <tonemapping_fragment> 2719 #include <colorspace_fragment> 2720}`,D5=`uniform float scale; 2721attribute float lineDistance; 2722varying float vLineDistance; 2723#include <common> 2724#include <uv_pars_vertex> 2725#include <color_pars_vertex> 2726#include <fog_pars_vertex> 2727#include <morphtarget_pars_vertex> 2728#include <logdepthbuf_pars_vertex> 2729#include <clipping_planes_pars_vertex> 2730void main() { 2731 vLineDistance = scale * lineDistance; 2732 #include <uv_vertex> 2733 #include <color_vertex> 2734 #include <morphinstance_vertex> 2735 #include <morphcolor_vertex> 2736 #include <begin_vertex> 2737 #include <morphtarget_vertex> 2738 #include <project_vertex> 2739 #include <logdepthbuf_vertex> 2740 #include <clipping_planes_vertex> 2741 #include <fog_vertex> 2742}`,F5=`uniform vec3 diffuse; 2743uniform float opacity; 2744uniform float dashSize; 2745uniform float totalSize; 2746varying float vLineDistance; 2747#include <common> 2748#include <color_pars_fragment> 2749#include <uv_pars_fragment> 2750#include <map_pars_fragment> 2751#include <fog_pars_fragment> 2752#include <logdepthbuf_pars_fragment> 2753#include <clipping_planes_pars_fragment> 2754void main() { 2755 vec4 diffuseColor = vec4( diffuse, opacity ); 2756 #include <clipping_planes_fragment> 2757 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2758 discard; 2759 } 2760 vec3 outgoingLight = vec3( 0.0 ); 2761 #include <logdepthbuf_fragment> 2762 #include <map_fragment> 2763 #include <color_fragment> 2764 outgoingLight = diffuseColor.rgb; 2765 #include <opaque_fragment> 2766 #include <tonemapping_fragment> 2767 #include <colorspace_fragment> 2768 #include <fog_fragment> 2769 #include <premultiplied_alpha_fragment> 2770}`,L5=`#include <common> 2771#include <batching_pars_vertex> 2772#include <uv_pars_vertex> 2773#include <envmap_pars_vertex> 2774#include <color_pars_vertex> 2775#include <fog_pars_vertex> 2776#include <morphtarget_pars_vertex> 2777#include <skinning_pars_vertex> 2778#include <logdepthbuf_pars_vertex> 2779#include <clipping_planes_pars_vertex> 2780void main() { 2781 #include <uv_vertex> 2782 #include <color_vertex> 2783 #include <morphinstance_vertex> 2784 #include <morphcolor_vertex> 2785 #include <batching_vertex> 2786 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2787 #include <beginnormal_vertex> 2788 #include <morphnormal_vertex> 2789 #include <skinbase_vertex> 2790 #include <skinnormal_vertex> 2791 #include <defaultnormal_vertex> 2792 #endif 2793 #include <begin_vertex> 2794 #include <morphtarget_vertex> 2795 #include <skinning_vertex> 2796 #include <project_vertex> 2797 #include <logdepthbuf_vertex> 2798 #include <clipping_planes_vertex> 2799 #include <worldpos_vertex> 2800 #include <envmap_vertex> 2801 #include <fog_vertex> 2802}`,N5=`uniform vec3 diffuse; 2803uniform float opacity; 2804#ifndef FLAT_SHADED 2805 varying vec3 vNormal; 2806#endif 2807#include <common> 2808#include <dithering_pars_fragment> 2809#include <color_pars_fragment> 2810#include <uv_pars_fragment> 2811#include <map_pars_fragment> 2812#include <alphamap_pars_fragment> 2813#include <alphatest_pars_fragment> 2814#include <alphahash_pars_fragment> 2815#include <aomap_pars_fragment> 2816#include <lightmap_pars_fragment> 2817#include <envmap_common_pars_fragment> 2818#include <envmap_pars_fragment> 2819#include <fog_pars_fragment> 2820#include <specularmap_pars_fragment> 2821#include <logdepthbuf_pars_fragment> 2822#include <clipping_planes_pars_fragment> 2823void main() { 2824 vec4 diffuseColor = vec4( diffuse, opacity ); 2825 #include <clipping_planes_fragment> 2826 #include <logdepthbuf_fragment> 2827 #include <map_fragment> 2828 #include <color_fragment> 2829 #include <alphamap_fragment> 2830 #include <alphatest_fragment> 2831 #include <alphahash_fragment> 2832 #include <specularmap_fragment> 2833 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2834 #ifdef USE_LIGHTMAP 2835 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2836 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2837 #else 2838 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2839 #endif 2840 #include <aomap_fragment> 2841 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2842 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2843 #include <envmap_fragment> 2844 #include <opaque_fragment> 2845 #include <tonemapping_fragment> 2846 #include <colorspace_fragment> 2847 #include <fog_fragment> 2848 #include <premultiplied_alpha_fragment> 2849 #include <dithering_fragment> 2850}`,O5=`#define LAMBERT 2851varying vec3 vViewPosition; 2852#include <common> 2853#include <batching_pars_vertex> 2854#include <uv_pars_vertex> 2855#include <displacementmap_pars_vertex> 2856#include <envmap_pars_vertex> 2857#include <color_pars_vertex> 2858#include <fog_pars_vertex> 2859#include <normal_pars_vertex> 2860#include <morphtarget_pars_vertex> 2861#include <skinning_pars_vertex> 2862#include <shadowmap_pars_vertex> 2863#include <logdepthbuf_pars_vertex> 2864#include <clipping_planes_pars_vertex> 2865void main() { 2866 #include <uv_vertex> 2867 #include <color_vertex> 2868 #include <morphinstance_vertex> 2869 #include <morphcolor_vertex> 2870 #include <batching_vertex> 2871 #include <beginnormal_vertex> 2872 #include <morphnormal_vertex> 2873 #include <skinbase_vertex> 2874 #include <skinnormal_vertex> 2875 #include <defaultnormal_vertex> 2876 #include <normal_vertex> 2877 #include <begin_vertex> 2878 #include <morphtarget_vertex> 2879 #include <skinning_vertex> 2880 #include <displacementmap_vertex> 2881 #include <project_vertex> 2882 #include <logdepthbuf_vertex> 2883 #include <clipping_planes_vertex> 2884 vViewPosition = - mvPosition.xyz; 2885 #include <worldpos_vertex> 2886 #include <envmap_vertex> 2887 #include <shadowmap_vertex> 2888 #include <fog_vertex> 2889}`,U5=`#define LAMBERT 2890uniform vec3 diffuse; 2891uniform vec3 emissive; 2892uniform float opacity; 2893#include <common> 2894#include <packing> 2895#include <dithering_pars_fragment> 2896#include <color_pars_fragment> 2897#include <uv_pars_fragment> 2898#include <map_pars_fragment> 2899#include <alphamap_pars_fragment> 2900#include <alphatest_pars_fragment> 2901#include <alphahash_pars_fragment> 2902#include <aomap_pars_fragment> 2903#include <lightmap_pars_fragment> 2904#include <emissivemap_pars_fragment> 2905#include <envmap_common_pars_fragment> 2906#include <envmap_pars_fragment> 2907#include <fog_pars_fragment> 2908#include <bsdfs> 2909#include <lights_pars_begin> 2910#include <normal_pars_fragment> 2911#include <lights_lambert_pars_fragment> 2912#include <shadowmap_pars_fragment> 2913#include <bumpmap_pars_fragment> 2914#include <normalmap_pars_fragment> 2915#include <specularmap_pars_fragment> 2916#include <logdepthbuf_pars_fragment> 2917#include <clipping_planes_pars_fragment> 2918void main() { 2919 vec4 diffuseColor = vec4( diffuse, opacity ); 2920 #include <clipping_planes_fragment> 2921 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2922 vec3 totalEmissiveRadiance = emissive; 2923 #include <logdepthbuf_fragment> 2924 #include <map_fragment> 2925 #include <color_fragment> 2926 #include <alphamap_fragment> 2927 #include <alphatest_fragment> 2928 #include <alphahash_fragment> 2929 #include <specularmap_fragment> 2930 #include <normal_fragment_begin> 2931 #include <normal_fragment_maps> 2932 #include <emissivemap_fragment> 2933 #include <lights_lambert_fragment> 2934 #include <lights_fragment_begin> 2935 #include <lights_fragment_maps> 2936 #include <lights_fragment_end> 2937 #include <aomap_fragment> 2938 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 2939 #include <envmap_fragment> 2940 #include <opaque_fragment> 2941 #include <tonemapping_fragment> 2942 #include <colorspace_fragment> 2943 #include <fog_fragment> 2944 #include <premultiplied_alpha_fragment> 2945 #include <dithering_fragment> 2946}`,z5=`#define MATCAP 2947varying vec3 vViewPosition; 2948#include <common> 2949#include <batching_pars_vertex> 2950#include <uv_pars_vertex> 2951#include <color_pars_vertex> 2952#include <displacementmap_pars_vertex> 2953#include <fog_pars_vertex> 2954#include <normal_pars_vertex> 2955#include <morphtarget_pars_vertex> 2956#include <skinning_pars_vertex> 2957#include <logdepthbuf_pars_vertex> 2958#include <clipping_planes_pars_vertex> 2959void main() { 2960 #include <uv_vertex> 2961 #include <color_vertex> 2962 #include <morphinstance_vertex> 2963 #include <morphcolor_vertex> 2964 #include <batching_vertex> 2965 #include <beginnormal_vertex> 2966 #include <morphnormal_vertex> 2967 #include <skinbase_vertex> 2968 #include <skinnormal_vertex> 2969 #include <defaultnormal_vertex> 2970 #include <normal_vertex> 2971 #include <begin_vertex> 2972 #include <morphtarget_vertex> 2973 #include <skinning_vertex> 2974 #include <displacementmap_vertex> 2975 #include <project_vertex> 2976 #include <logdepthbuf_vertex> 2977 #include <clipping_planes_vertex> 2978 #include <fog_vertex> 2979 vViewPosition = - mvPosition.xyz; 2980}`,k5=`#define MATCAP 2981uniform vec3 diffuse; 2982uniform float opacity; 2983uniform sampler2D matcap; 2984varying vec3 vViewPosition; 2985#include <common> 2986#include <dithering_pars_fragment> 2987#include <color_pars_fragment> 2988#include <uv_pars_fragment> 2989#include <map_pars_fragment> 2990#include <alphamap_pars_fragment> 2991#include <alphatest_pars_fragment> 2992#include <alphahash_pars_fragment> 2993#include <fog_pars_fragment> 2994#include <normal_pars_fragment> 2995#include <bumpmap_pars_fragment> 2996#include <normalmap_pars_fragment> 2997#include <logdepthbuf_pars_fragment> 2998#include <clipping_planes_pars_fragment> 2999void main() { 3000 vec4 diffuseColor = vec4( diffuse, opacity ); 3001 #include <clipping_planes_fragment> 3002 #include <logdepthbuf_fragment> 3003 #include <map_fragment> 3004 #include <color_fragment> 3005 #include <alpha
3005map_fragment> 3006 #include <alphatest_fragment> 3007 #include <alphahash_fragment> 3008 #include <normal_fragment_begin> 3009 #include <normal_fragment_maps> 3010 vec3 viewDir = normalize( vViewPosition ); 3011 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3012 vec3 y = cross( viewDir, x ); 3013 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3014 #ifdef USE_MATCAP 3015 vec4 matcapColor = texture2D( matcap, uv ); 3016 #else 3017 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3018 #endif 3019 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3020 #include <opaque_fragment> 3021 #include <tonemapping_fragment> 3022 #include <colorspace_fragment> 3023 #include <fog_fragment> 3024 #include <premultiplied_alpha_fragment> 3025 #include <dithering_fragment> 3026}`,G5=`#define NORMAL 3027#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3028 varying vec3 vViewPosition; 3029#endif 3030#include <common> 3031#include <batching_pars_vertex> 3032#include <uv_pars_vertex> 3033#include <displacementmap_pars_vertex> 3034#include <normal_pars_vertex> 3035#include <morphtarget_pars_vertex> 3036#include <skinning_pars_vertex> 3037#include <logdepthbuf_pars_vertex> 3038#include <clipping_planes_pars_vertex> 3039void main() { 3040 #include <uv_vertex> 3041 #include <batching_vertex> 3042 #include <beginnormal_vertex> 3043 #include <morphinstance_vertex> 3044 #include <morphnormal_vertex> 3045 #include <skinbase_vertex> 3046 #include <skinnormal_vertex> 3047 #include <defaultnormal_vertex> 3048 #include <normal_vertex> 3049 #include <begin_vertex> 3050 #include <morphtarget_vertex> 3051 #include <skinning_vertex> 3052 #include <displacementmap_vertex> 3053 #include <project_vertex> 3054 #include <logdepthbuf_vertex> 3055 #include <clipping_planes_vertex> 3056#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3057 vViewPosition = - mvPosition.xyz; 3058#endif 3059}`,H5=`#define NORMAL 3060uniform float opacity; 3061#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3062 varying vec3 vViewPosition; 3063#endif 3064#include <packing> 3065#include <uv_pars_fragment> 3066#include <normal_pars_fragment> 3067#include <bumpmap_pars_fragment> 3068#include <normalmap_pars_fragment> 3069#include <logdepthbuf_pars_fragment> 3070#include <clipping_planes_pars_fragment> 3071void main() { 3072 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3073 #include <clipping_planes_fragment> 3074 #include <logdepthbuf_fragment> 3075 #include <normal_fragment_begin> 3076 #include <normal_fragment_maps> 3077 gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); 3078 #ifdef OPAQUE 3079 gl_FragColor.a = 1.0; 3080 #endif 3081}`,V5=`#define PHONG 3082varying vec3 vViewPosition; 3083#include <common> 3084#include <batching_pars_vertex> 3085#include <uv_pars_vertex> 3086#include <displacementmap_pars_vertex> 3087#include <envmap_pars_vertex> 3088#include <color_pars_vertex> 3089#include <fog_pars_vertex> 3090#include <normal_pars_vertex> 3091#include <morphtarget_pars_vertex> 3092#include <skinning_pars_vertex> 3093#include <shadowmap_pars_vertex> 3094#include <logdepthbuf_pars_vertex> 3095#include <clipping_planes_pars_vertex> 3096void main() { 3097 #include <uv_vertex> 3098 #include <color_vertex> 3099 #include <morphcolor_vertex> 3100 #include <batching_vertex> 3101 #include <beginnormal_vertex> 3102 #include <morphinstance_vertex> 3103 #include <morphnormal_vertex> 3104 #include <skinbase_vertex> 3105 #include <skinnormal_vertex> 3106 #include <defaultnormal_vertex> 3107 #include <normal_vertex> 3108 #include <begin_vertex> 3109 #include <morphtarget_vertex> 3110 #include <skinning_vertex> 3111 #include <displacementmap_vertex> 3112 #include <project_vertex> 3113 #include <logdepthbuf_vertex> 3114 #include <clipping_planes_vertex> 3115 vViewPosition = - mvPosition.xyz; 3116 #include <worldpos_vertex> 3117 #include <envmap_vertex> 3118 #include <shadowmap_vertex> 3119 #include <fog_vertex> 3120}`,W5=`#define PHONG 3121uniform vec3 diffuse; 3122uniform vec3 emissive; 3123uniform vec3 specular; 3124uniform float shininess; 3125uniform float opacity; 3126#include <common> 3127#include <packing> 3128#include <dithering_pars_fragment> 3129#include <color_pars_fragment> 3130#include <uv_pars_fragment> 3131#include <map_pars_fragment> 3132#include <alphamap_pars_fragment> 3133#include <alphatest_pars_fragment> 3134#include <alphahash_pars_fragment> 3135#include <aomap_pars_fragment> 3136#include <lightmap_pars_fragment> 3137#include <emissivemap_pars_fragment> 3138#include <envmap_common_pars_fragment> 3139#include <envmap_pars_fragment> 3140#include <fog_pars_fragment> 3141#include <bsdfs> 3142#include <lights_pars_begin> 3143#include <normal_pars_fragment> 3144#include <lights_phong_pars_fragment> 3145#include <shadowmap_pars_fragment> 3146#include <bumpmap_pars_fragment> 3147#include <normalmap_pars_fragment> 3148#include <specularmap_pars_fragment> 3149#include <logdepthbuf_pars_fragment> 3150#include <clipping_planes_pars_fragment> 3151void main() { 3152 vec4 diffuseColor = vec4( diffuse, opacity ); 3153 #include <clipping_planes_fragment> 3154 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3155 vec3 totalEmissiveRadiance = emissive; 3156 #include <logdepthbuf_fragment> 3157 #include <map_fragment> 3158 #include <color_fragment> 3159 #include <alphamap_fragment> 3160 #include <alphatest_fragment> 3161 #include <alphahash_fragment> 3162 #include <specularmap_fragment> 3163 #include <normal_fragment_begin> 3164 #include <normal_fragment_maps> 3165 #include <emissivemap_fragment> 3166 #include <lights_phong_fragment> 3167 #include <lights_fragment_begin> 3168 #include <lights_fragment_maps> 3169 #include <lights_fragment_end> 3170 #include <aomap_fragment> 3171 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3172 #include <envmap_fragment> 3173 #include <opaque_fragment> 3174 #include <tonemapping_fragment> 3175 #include <colorspace_fragment> 3176 #include <fog_fragment> 3177 #include <premultiplied_alpha_fragment> 3178 #include <dithering_fragment> 3179}`,X5=`#define STANDARD 3180varying vec3 vViewPosition; 3181#ifdef USE_TRANSMISSION 3182 varying vec3 vWorldPosition; 3183#endif 3184#include <common> 3185#include <batching_pars_vertex> 3186#include <uv_pars_vertex> 3187#include <displacementmap_pars_vertex> 3188#include <color_pars_vertex> 3189#include <fog_pars_vertex> 3190#include <normal_pars_vertex> 3191#include <morphtarget_pars_vertex> 3192#include <skinning_pars_vertex> 3193#include <shadowmap_pars_vertex> 3194#include <logdepthbuf_pars_vertex> 3195#include <clipping_planes_pars_vertex> 3196void main() { 3197 #include <uv_vertex> 3198 #include <color_vertex> 3199 #include <morphinstance_vertex> 3200 #include <morphcolor_vertex> 3201 #include <batching_vertex> 3202 #include <beginnormal_vertex> 3203 #include <morphnormal_vertex> 3204 #include <skinbase_vertex> 3205 #include <skinnormal_vertex> 3206 #include <defaultnormal_vertex> 3207 #include <normal_vertex> 3208 #include <begin_vertex> 3209 #include <morphtarget_vertex> 3210 #include <skinning_vertex> 3211 #include <displacementmap_vertex> 3212 #include <project_vertex> 3213 #include <logdepthbuf_vertex> 3214 #include <clipping_planes_vertex> 3215 vViewPosition = - mvPosition.xyz; 3216 #include <worldpos_vertex> 3217 #include <shadowmap_vertex> 3218 #include <fog_vertex> 3219#ifdef USE_TRANSMISSION 3220 vWorldPosition = worldPosition.xyz; 3221#endif 3222}`,J5=`#define STANDARD 3223#ifdef PHYSICAL 3224 #define IOR 3225 #define USE_SPECULAR 3226#endif 3227uniform vec3 diffuse; 3228uniform vec3 emissive; 3229uniform float roughness; 3230uniform float metalness; 3231uniform float opacity; 3232#ifdef IOR 3233 uniform float ior; 3234#endif 3235#ifdef USE_SPECULAR 3236 uniform float specularIntensity; 3237 uniform vec3 specularColor; 3238 #ifdef USE_SPECULAR_COLORMAP 3239 uniform sampler2D specularColorMap; 3240 #endif 3241 #ifdef USE_SPECULAR_INTENSITYMAP 3242 uniform sampler2D specularIntensityMap; 3243 #endif 3244#endif 3245#ifdef USE_CLEARCOAT 3246 uniform float clearcoat; 3247 uniform float clearcoatRoughness; 3248#endif 3249#ifdef USE_DISPERSION 3250 uniform float dispersion; 3251#endif
3252#ifdef USE_IRIDESCENCE 3253 uniform float iridescence; 3254 uniform float iridescenceIOR; 3255 uniform float iridescenceThicknessMinimum; 3256 uniform float iridescenceThicknessMaximum; 3257#endif 3258#ifdef USE_SHEEN 3259 uniform vec3 sheenColor; 3260 uniform float sheenRoughness; 3261 #ifdef USE_SHEEN_COLORMAP 3262 uniform sampler2D sheenColorMap; 3263 #endif 3264 #ifdef USE_SHEEN_ROUGHNESSMAP 3265 uniform sampler2D sheenRoughnessMap; 3266 #endif 3267#endif 3268#ifdef USE_ANISOTROPY 3269 uniform vec2 anisotropyVector; 3270 #ifdef USE_ANISOTROPYMAP 3271 uniform sampler2D anisotropyMap; 3272 #endif 3273#endif 3274varying vec3 vViewPosition; 3275#include <common> 3276#include <packing> 3277#include <dithering_pars_fragment> 3278#include <color_pars_fragment> 3279#include <uv_pars_fragment> 3280#include <map_pars_fragment> 3281#include <alphamap_pars_fragment> 3282#include <alphatest_pars_fragment> 3283#include <alphahash_pars_fragment> 3284#include <aomap_pars_fragment> 3285#include <lightmap_pars_fragment> 3286#include <emissivemap_pars_fragment> 3287#include <iridescence_fragment> 3288#include <cube_uv_reflection_fragment> 3289#include <envmap_common_pars_fragment> 3290#include <envmap_physical_pars_fragment> 3291#include <fog_pars_fragment> 3292#include <lights_pars_begin> 3293#include <normal_pars_fragment> 3294#include <lights_physical_pars_fragment> 3295#include <transmission_pars_fragment> 3296#include <shadowmap_pars_fragment> 3297#include <bumpmap_pars_fragment> 3298#include <normalmap_pars_fragment> 3299#include <clearcoat_pars_fragment> 3300#include <iridescence_pars_fragment> 3301#include <roughnessmap_pars_fragment> 3302#include <metalnessmap_pars_fragment> 3303#include <logdepthbuf_pars_fragment> 3304#include <clipping_planes_pars_fragment> 3305void main() { 3306 vec4 diffuseColor = vec4( diffuse, opacity ); 3307 #include <clipping_planes_fragment> 3308 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3309 vec3 totalEmissiveRadiance = emissive; 3310 #include <logdepthbuf_fragment> 3311 #include <map_fragment> 3312 #include <color_fragment> 3313 #include <alphamap_fragment> 3314 #include <alphatest_fragment> 3315 #include <alphahash_fragment> 3316 #include <roughnessmap_fragment> 3317 #include <metalnessmap_fragment> 3318 #include <normal_fragment_begin> 3319 #include <normal_fragment_maps> 3320 #include <clearcoat_normal_fragment_begin> 3321 #include <clearcoat_normal_fragment_maps> 3322 #include <emissivemap_fragment> 3323 #include <lights_physical_fragment> 3324 #include <lights_fragment_begin> 3325 #include <lights_fragment_maps> 3326 #include <lights_fragment_end> 3327 #include <aomap_fragment> 3328 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3329 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3330 #include <transmission_fragment> 3331 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3332 #ifdef USE_SHEEN 3333 float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); 3334 outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; 3335 #endif 3336 #ifdef USE_CLEARCOAT 3337 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3338 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3339 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3340 #endif 3341 #include <opaque_fragment> 3342 #include <tonemapping_fragment> 3343 #include <colorspace_fragment> 3344 #include <fog_fragment> 3345 #include <premultiplied_alpha_fragment> 3346 #include <dithering_fragment> 3347}`,j5=`#define TOON 3348varying vec3 vViewPosition; 3349#include <common> 3350#include <batching_pars_vertex> 3351#include <uv_pars_vertex> 3352#include <displacementmap_pars_vertex> 3353#include <color_pars_vertex> 3354#include <fog_pars_vertex> 3355#include <normal_pars_vertex> 3356#include <morphtarget_pars_vertex> 3357#include <skinning_pars_vertex> 3358#include <shadowmap_pars_vertex> 3359#include <logdepthbuf_pars_vertex> 3360#include <clipping_planes_pars_vertex> 3361void main() { 3362 #include <uv_vertex> 3363 #include <color_vertex> 3364 #include <morphinstance_vertex> 3365 #include <morphcolor_vertex> 3366 #include <batching_vertex> 3367 #include <beginnormal_vertex> 3368 #include <morphnormal_vertex> 3369 #include <skinbase_vertex> 3370 #include <skinnormal_vertex> 3371 #include <defaultnormal_vertex> 3372 #include <normal_vertex> 3373 #include <begin_vertex> 3374 #include <morphtarget_vertex> 3375 #include <skinning_vertex> 3376 #include <displacementmap_vertex> 3377 #include <project_vertex> 3378 #include <logdepthbuf_vertex> 3379 #include <clipping_planes_vertex> 3380 vViewPosition = - mvPosition.xyz; 3381 #include <worldpos_vertex> 3382 #include <shadowmap_vertex> 3383 #include <fog_vertex> 3384}`,Y5=`#define TOON 3385uniform vec3 diffuse; 3386uniform vec3 emissive; 3387uniform float opacity; 3388#include <common> 3389#include <packing> 3390#include <dithering_pars_fragment> 3391#include <color_pars_fragment> 3392#include <uv_pars_fragment> 3393#include <map_pars_fragment> 3394#include <alphamap_pars_fragment> 3395#include <alphatest_pars_fragment> 3396#include <alphahash_pars_fragment> 3397#include <aomap_pars_fragment> 3398#include <lightmap_pars_fragment> 3399#include <emissivemap_pars_fragment> 3400#include <gradientmap_pars_fragment> 3401#include <fog_pars_fragment> 3402#include <bsdfs> 3403#include <lights_pars_begin> 3404#include <normal_pars_fragment> 3405#include <lights_toon_pars_fragment> 3406#include <shadowmap_pars_fragment> 3407#include <bumpmap_pars_fragment> 3408#include <normalmap_pars_fragment> 3409#include <logdepthbuf_pars_fragment> 3410#include <clipping_planes_pars_fragment> 3411void main() { 3412 vec4 diffuseColor = vec4( diffuse, opacity ); 3413 #include <clipping_planes_fragment> 3414 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3415 vec3 totalEmissiveRadiance = emissive; 3416 #include <logdepthbuf_fragment> 3417 #include <map_fragment> 3418 #include <color_fragment> 3419 #include <alphamap_fragment> 3420 #include <alphatest_fragment> 3421 #include <alphahash_fragment> 3422 #include <normal_fragment_begin> 3423 #include <normal_fragment_maps> 3424 #include <emissivemap_fragment> 3425 #include <lights_toon_fragment> 3426 #include <lights_fragment_begin> 3427 #include <lights_fragment_maps> 3428 #include <lights_fragment_end> 3429 #include <aomap_fragment> 3430 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3431 #include <opaque_fragment> 3432 #include <tonemapping_fragment> 3433 #include <colorspace_fragment> 3434 #include <fog_fragment> 3435 #include <premultiplied_alpha_fragment> 3436 #include <dithering_fragment> 3437}`,K5=`uniform float size; 3438uniform float scale; 3439#include <common> 3440#include <color_pars_vertex> 3441#include <fog_pars_vertex> 3442#include <morphtarget_pars_vertex> 3443#include <logdepthbuf_pars_vertex> 3444#include <clipping_planes_pars_vertex> 3445#ifdef USE_POINTS_UV 3446 varying vec2 vUv; 3447 uniform mat3 uvTransform; 3448#endif 3449void main() { 3450 #ifdef USE_POINTS_UV 3451 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3452 #endif 3453 #include <color_vertex> 3454 #include <morphinstance_vertex> 3455 #include <morphcolor_vertex> 3456 #include <begin_vertex> 3457 #include <morphtarget_vertex> 3458 #include <project_vertex> 3459 gl_PointSize = size; 3460 #ifdef USE_SIZEATTENUATION 3461 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3462 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3463 #endif 3464 #include <logdepthbuf_vertex> 3465 #include <clipping_planes_vertex> 3466 #include <worldpos_vertex> 3467 #include <fog_vertex> 3468}`,Q5=`uniform vec3 diffuse; 3469uniform float opacity; 3470#include <common> 3471#include <color_pars_fragment> 3472#include <map_particle_pars_fragment> 3473#include <alphatest_pars_fragment> 3474#include <alphahash_pars_fragment> 3475#include <fog_pars_fragment> 3476#include <logdepthbuf_pars_fragment> 3477#include <clipping_planes_pars_fragment> 3478void main() { 3479 vec4 diffuseColor = vec4( diffuse, opacity ); 3480 #include <clipping_planes_fragment> 3481 vec3 outgoingLight = vec3( 0.0 ); 3482 #include <logdepthbuf_fragment> 3483 #include <map_particle_fragment> 3484 #include <color_fragment> 3485 #include <alphatest_fragment> 3486 #include <alphahash_fragment> 3487 outgoingLight = diffuseColor.rgb; 3488 #include <opaque_fragment> 3489 #include <tonemapping_fragment> 3490 #include <colorspace_fragment> 3491 #include <fog_fragment> 3492 #include <premultiplied_alpha_fragment> 3493}`,q5=`#include <common> 3494#include <batching_pars_vertex> 3495#include <fog_pars_vertex> 3496#include <morphtarget_pars_vertex> 3497#include <skinning_pars_vertex> 3498#include <logdepthbuf_pars_vertex> 3499#include <shadowmap_pars_vertex> 3500void main() { 3501 #include <batching_vertex> 3502 #include <beginnormal_vertex> 3503 #include <morphinstance_vertex> 3504 #include <morphnormal_vertex> 3505 #include <skinbase_vertex> 3506 #include <skinnormal_vertex> 3507 #include <defaultnormal_vertex> 3508 #include <begin_vertex> 3509 #include <morphtarget_vertex> 3510 #include <skinning_vertex> 3511 #include <project_vertex> 3512 #include <logdepthbuf_vertex> 3513 #include <worldpos_vertex> 3514 #include <shadowmap_vertex> 3515 #include <fog_vertex> 3516}`,Z5=`uniform vec3 color; 3517uniform float opacity; 3518#include <common> 3519#include <packing> 3520#include <fog_pars_fragment> 3521#include <bsdfs> 3522#include <lights_pars_begin> 3523#include <logdepthbuf_pars_fragment> 3524#include <shadowmap_pars_fragment> 3525#include <shadowmask_pars_fragment> 3526void main() { 3527 #include <logdepthbuf_fragment> 3528 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3529 #include <tonemapping_fragment> 3530 #include <colorspace_fragment> 3531 #include <fog_fragment> 3532}`,$5=`uniform float rotation; 3533uniform vec2 center; 3534#include <common> 3535#include <uv_pars_vertex> 3536#include <fog_pars_vertex> 3537#include <logdepthbuf_pars_vertex> 3538#include <clipping_planes_pars_vertex> 3539void main() { 3540 #include <uv_vertex> 3541 vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); 3542 vec2 scale; 3543 scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); 3544 scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); 3545 #ifndef USE_SIZEATTENUATION 3546 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3547 if ( isPerspective ) scale *= - mvPosition.z; 3548 #endif 3549 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3550 vec2 rotatedPosition; 3551 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3552 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3553 mvPosition.xy += rotatedPosition; 3554 gl_Position = projectionMatrix * mvPosition; 3555 #include <logdepthbuf_vertex> 3556 #include <clipping_planes_vertex> 3557 #include <fog_vertex> 3558}`,e8=`uniform vec3 diffuse; 3559uniform float opacity; 3560#include <common> 3561#include <uv_pars_fragment> 3562#include <map_pars_fragment> 3563#include <alphamap_pars_fragment> 3564#include <alphatest_pars_fragment> 3565#include <alphahash_pars_fragment> 3566#include <fog_pars_fragment> 3567#include <logdepthbuf_pars_fragment> 3568#include <clipping_planes_pars_fragment> 3569void main() { 3570 vec4 diffuseColor = vec4( diffuse, opacity ); 3571 #include <clipping_planes_fragment> 3572 vec3 outgoingLight = vec3( 0.0 ); 3573 #include <logdepthbuf_fragment> 3574 #include <map_fragment> 3575 #include <alphamap_fragment> 3576 #include <alphatest_fragment> 3577 #include <alphahash_fragment> 3578 outgoingLight = diffuseColor.rgb; 3579 #include <opaque_fragment> 3580 #include <tonemapping_fragment> 3581 #include <colorspace_fragment> 3582 #include <fog_fragment> 3583}`,Nt={alphahash_fragment:SO,alphahash_pars_fragment:EO,alphamap_fragment:wO,alphamap_pars_fragment:MO,alphatest_fragment:CO,alphatest_pars_fragment:TO,aomap_fragment:RO,aomap_pars_fragment:PO,batching_pars_vertex:bO,batching_vertex:IO,begin_vertex:BO,beginnormal_vertex:DO,bsdfs:FO,iridescence_fragment:LO,bumpmap_pars_fragment:NO,clipping_planes_fragment:OO,clipping_planes_pars_fragment:UO,clipping_planes_pars_vertex:zO,clipping_planes_vertex:kO,color_fragment:GO,color_pars_fragment:HO,color_pars_vertex:VO,color_vertex:WO,common:XO,cube_uv_reflection_fragment:JO,defaultnormal_vertex:jO,displacementmap_pars_vertex:YO,displacementmap_vertex:KO,emissivemap_fragment:QO,emissivemap_pars_fragment:qO,colorspace_fragment:ZO,colorspace_pars_fragment:$O,envmap_fragment:eU,envmap_common_pars_fragment:tU,envmap_pars_fragment:nU,envmap_pars_vertex:iU,envmap_physical_pars_fragment:pU,envmap_vertex:rU,fog_vertex:sU,fog_pars_vertex:oU,fog_fragment:aU,fog_pars_fragment:lU,gradientmap_pars_fragment:uU,lightmap_pars_fragment:cU,lights_lambert_fragment:fU,lights_lambert_pars_fragment:dU,lights_pars_begin:hU,lights_toon_fragment:mU,lights_toon_pars_fragment:gU,lights_phong_fragment:vU,lights_phong_pars_fragment:_U,lights_physical_fragment:yU,lights_physical_pars_fragment:xU,lights_fragment_begin:AU,lights_fragment_maps:SU,lights_fragment_end:EU,logdepthbuf_fragment:wU,logdepthbuf_pars_fragment:MU,logdepthbuf_pars_vertex:CU,logdepthbuf_vertex:TU,map_fragment:RU,map_pars_fragment:PU,map_particle_fragment:bU,map_particle_pars_fragment:IU,metalnessmap_fragment:BU,metalnessmap_pars_fragment:DU,morphinstance_vertex:FU,morphcolor_vertex:LU,morphnormal_vertex:NU,morphtarget_pars_vertex:OU,morphtarget_vertex:UU,normal_fragment_begin:zU,normal_fragment_maps:kU,normal_pars_fragment:GU,normal_pars_vertex:HU,normal_vertex:VU,normalmap_pars_fragment:WU,clearcoat_normal_fragment_begin:XU,clearcoat_normal_fragment_maps:JU,clearcoat_pars_fragment:jU,iridescence_pars_fragment:YU,opaque_fragment:KU,packing:QU,premultiplied_alpha_fragment:qU,project_vertex:ZU,dithering_fragment:$U,dithering_pars_fragment:e5,roughnessmap_fragment:t5,roughnessmap_pars_fragment:n5,shadowmap_pars_fragment:i5,shadowmap_pars_vertex:r5,shadowmap_vertex:s5,shadowmask_pars_fragment:o5,skinbase_vertex:a5,skinning_pars_vertex:l5,skinning_vertex:u5,skinnormal_vertex:c5,specularmap_fragment:f5,specularmap_pars_fragment:d5,tonemapping_fragment:h5,tonemapping_pars_fragment:p5,transmission_fragment:m5,transmission_pars_fragment:g5,uv_pars_fragment:v5,uv_pars_vertex:_5,uv_vertex:y5,worldpos_vertex:x5,background_vert:A5,background_frag:S5,backgroundCube_vert:E5,backgroundCube_frag:w5,cube_vert:M5,cube_frag:C5,depth_vert:T5,depth_frag:R5,distanceRGBA_vert:P5,distanceRGBA_frag:b5,equirect_vert:I5,equirect_frag:B5,linedashed_vert:D5,linedashed_frag:F5,meshbasic_vert:L5,meshbasic_frag:N5,meshlambert_vert:O5,meshlambert_frag:U5,meshmatcap_vert:z5,meshmatcap_frag:k5,meshnormal_vert:G5,meshnormal_frag:H5,meshphong_vert:V5,meshphong_frag:W5,meshphysical_vert:X5,meshphysical_frag:J5,meshtoon_vert:j5,meshtoon_frag:Y5,points_vert:K5,points_frag:Q5,shadow_vert:q5,shadow_frag:Z5,sprite_vert:$5,sprite_frag:e8},Ze={common:{diffuse:{value:new He(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Dt},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Dt}},envmap:{envMap:{value:null},envMapRotation:{value:new Dt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Dt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Dt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Dt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Dt},normalScale:{value:new Re(1,1)}}
vendor: 28,850 bytes, lines 3583-3658
3583,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Dt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Dt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Dt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Dt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new He(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new He(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0},uvTransform:{value:new Dt}},sprite:{diffuse:{value:new He(16777215)},opacity:{value:1},center:{value:new Re(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Dt},alphaMap:{value:null},alphaMapTransform:{value:new Dt},alphaTest:{value:0}}},Os={basic:{uniforms:rr([Ze.common,Ze.specularmap,Ze.envmap,Ze.aomap,Ze.lightmap,Ze.fog]),vertexShader:Nt.meshbasic_vert,fragmentShader:Nt.meshbasic_frag},lambert:{uniforms:rr([Ze.common,Ze.specularmap,Ze.envmap,Ze.aomap,Ze.lightmap,Ze.emissivemap,Ze.bumpmap,Ze.normalmap,Ze.displacementmap,Ze.fog,Ze.lights,{emissive:{value:new He(0)}}]),vertexShader:Nt.meshlambert_vert,fragmentShader:Nt.meshlambert_frag},phong:{uniforms:rr([Ze.common,Ze.specularmap,Ze.envmap,Ze.aomap,Ze.lightmap,Ze.emissivemap,Ze.bumpmap,Ze.normalmap,Ze.displacementmap,Ze.fog,Ze.lights,{emissive:{value:new He(0)},specular:{value:new He(1118481)},shininess:{value:30}}]),vertexShader:Nt.meshphong_vert,fragmentShader:Nt.meshphong_frag},standard:{uniforms:rr([Ze.common,Ze.envmap,Ze.aomap,Ze.lightmap,Ze.emissivemap,Ze.bumpmap,Ze.normalmap,Ze.displacementmap,Ze.roughnessmap,Ze.metalnessmap,Ze.fog,Ze.lights,{emissive:{value:new He(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Nt.meshphysical_vert,fragmentShader:Nt.meshphysical_frag},toon:{uniforms:rr([Ze.common,Ze.aomap,Ze.lightmap,Ze.emissivemap,Ze.bumpmap,Ze.normalmap,Ze.displacementmap,Ze.gradientmap,Ze.fog,Ze.lights,{emissive:{value:new He(0)}}]),vertexShader:Nt.meshtoon_vert,fragmentShader:Nt.meshtoon_frag},matcap:{uniforms:rr([Ze.common,Ze.bumpmap,Ze.normalmap,Ze.displacementmap,Ze.fog,{matcap:{value:null}}]),vertexShader:Nt.meshmatcap_vert,fragmentShader:Nt.meshmatcap_frag},points:{uniforms:rr([Ze.points,Ze.fog]),vertexShader:Nt.points_vert,fragmentShader:Nt.points_frag},dashed:{uniforms:rr([Ze.common,Ze.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Nt.linedashed_vert,fragmentShader:Nt.linedashed_frag},depth:{uniforms:rr([Ze.common,Ze.displacementmap]),vertexShader:Nt.depth_vert,fragmentShader:Nt.depth_frag},normal:{uniforms:rr([Ze.common,Ze.bumpmap,Ze.normalmap,Ze.displacementmap,{opacity:{value:1}}]),vertexShader:Nt.meshnormal_vert,fragmentShader:Nt.meshnormal_frag},sprite:{uniforms:rr([Ze.sprite,Ze.fog]),vertexShader:Nt.sprite_vert,fragmentShader:Nt.sprite_frag},background:{uniforms:{uvTransform:{value:new Dt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Nt.background_vert,fragmentShader:Nt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Dt}},vertexShader:Nt.backgroundCube_vert,fragmentShader:Nt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Nt.cube_vert,fragmentShader:Nt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Nt.equirect_vert,fragmentShader:Nt.equirect_frag},distanceRGBA:{uniforms:rr([Ze.common,Ze.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Nt.distanceRGBA_vert,fragmentShader:Nt.distanceRGBA_frag},shadow:{uniforms:rr([Ze.lights,Ze.fog,{color:{value:new He(0)},opacity:{value:1}}]),vertexShader:Nt.shadow_vert,fragmentShader:Nt.shadow_frag}};Os.physical={uniforms:rr([Os.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Dt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Dt},clearcoatNormalScale:{value:new Re(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Dt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Dt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Dt},sheen:{value:0},sheenColor:{value:new He(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Dt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Dt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Dt},transmissionSamplerSize:{value:new Re},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Dt},attenuationDistance:{value:0},attenuationColor:{value:new He(0)},specularColor:{value:new He(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Dt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Dt},anisotropyVector:{value:new Re},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Dt}}]),vertexShader:Nt.meshphysical_vert,fragmentShader:Nt.meshphysical_frag};const Xm={r:0,b:0,g:0},Pl=new Yr,t8=new mt;function n8(i,e,t,n,r,s,o){const a=new He(0);let l=s===!0?0:1,u,f,h=null,p=0,m=null;function v(A){let S=A.isScene===!0?A.background:null;return S&&S.isTexture&&(S=(A.backgroundBlurriness>0?t:e).get(S)),S}function _(A){let S=!1;const w=v(A);w===null?g(a,l):w&&w.isColor&&(g(w,1),S=!0);const P=i.xr.getEnvironmentBlendMode();P==="additive"?n.buffers.color.setClear(0,0,0,1,o):P==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||S)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))}function y(A,S){const w=v(S);w&&(w.isCubeTexture||w.mapping===Df)?(f===void 0&&(f=new Mn(new ul(1,1,1),new ur({name:"BackgroundCubeMaterial",uniforms:xf(Os.backgroundCube.uniforms),vertexShader:Os.backgroundCube.vertexShader,fragmentShader:Os.backgroundCube.fragmentShader,side:Mi,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),f.geometry.deleteAttribute("uv"),f.onBeforeRender=function(P,T,I){this.matrixWorld.copyPosition(I.matrixWorld)},Object.defineProperty(f.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(f)),Pl.copy(S.backgroundRotation),Pl.x*=-1,Pl.y*=-1,Pl.z*=-1,w.isCubeTexture&&w.isRenderTargetTexture===!1&&(Pl.y*=-1,Pl.z*=-1),f.material.uniforms.envMap.value=w,f.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,f.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,f.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,f.material.uniforms.backgroundRotation.value.setFromMatrix4(t8.makeRotationFromEuler(Pl)),f.material.toneMapped=ln.getTransfer(w.colorSpace)!==vn,(h!==w||p!==w.version||m!==i.toneMapping)&&(f.material.needsUpdate=!0,h=w,p=w.version,m=i.toneMapping),f.layers.enableAll(),A.unshift(f,f.geometry,f.material,0,0,null)):w&&w.isTexture&&(u===void 0&&(u=new Mn(new cl(2,2),new ur({name:"BackgroundMaterial",uniforms:xf(Os.background.uniforms),vertexShader:Os.background.vertexShader,fragmentShader:Os.background.fragmentShader,side:xs,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=w,u.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,u.material.toneMapped=ln.getTransfer(w.colorSpace)!==vn,w.matrixAutoUpdate===!0&&w.updateMatrix(),u.material.uniforms.uvTransform.value.copy(w.matrix),(h!==w||p!==w.version||m!==i.toneMapping)&&(u.material.needsUpdate=!0,h=w,p=w.version,m=i.toneMapping),u.layers.enableAll(),A.unshift(u,u.geometry,u.material,0,0,null))}function g(A,S){A.getRGB(Xm,zb(i)),n.buffers.color.setClear(Xm.r,Xm.g,Xm.b,S,o)}return{getClearColor:function(){return a},setClearColor:function(A,S=1){a.set(A),l=S,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(A){l=A,g(a,l)},render:_,addToRenderList:y}}function i8(i,e){const t=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function a(b,N,j,Y,q){let re=!1;const Q=h(Y,j,N);s!==Q&&(s=Q,u(s.object)),re=m(b,Y,j,q),re&&v(b,Y,j,q),q!==null&&e.update(q,i.ELEMENT_ARRAY_BUFFER),(re||o)&&(o=!1,w(b,N,j,Y),q!==null&&i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,e.get(q).buffer))}function l(){return i.createVertexArray()}function u(b){return i.bindVertexArray(b)}function f(b){return i.deleteVertexArray(b)}function h(b,N,j){const Y=j.wireframe===!0;let q=n[b.id];q===void 0&&(q={},n[b.id]=q);let re=q[N.id];re===void 0&&(re={},q[N.id]=re);let Q=re[Y];return Q===void 0&&(Q=p(l()),re[Y]=Q),Q}function p(b){const N=[],j=[],Y=[];for(let q=0;q<t;q++)N[q]=0,j[q]=0,Y[q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:N,enabledAttributes:j,attributeDivisors:Y,object:b,attributes:{},index:null}}function m(b,N,j,Y){const q=s.attributes,re=N.attributes;let Q=0;const pe=j.getAttributes();for(const k in pe)if(pe[k].location>=0){const te=q[k];let ce=re[k];if(ce===void 0&&(k==="instanceMatrix"&&b.instanceMatrix&&(ce=b.instanceMatrix),k==="instanceColor"&&b.instanceColor&&(ce=b.instanceColor)),te===void 0||te.attribute!==ce||ce&&te.data!==ce.data)return!0;Q++}return s.attributesNum!==Q||s.index!==Y}function v(b,N,j,Y){const q={},re=N.attributes;let Q=0;const pe=j.getAttributes();for(const k in pe)if(pe[k].location>=0){let te=re[k];te===void 0&&(k==="instanceMatrix"&&b.instanceMatrix&&(te=b.instanceMatrix),k==="instanceColor"&&b.instanceColor&&(te=b.instanceColor));const ce={};ce.attribute=te,te&&te.data&&(ce.data=te.data),q[k]=ce,Q++}s.attributes=q,s.attributesNum=Q,s.index=Y}function _(){const b=s.newAttributes;for(let N=0,j=b.length;N<j;N++)b[N]=0}function y(b){g(b,0)}function g(b,N){const j=s.newAttributes,Y=s.enabledAttributes,q=s.attributeDivisors;j[b]=1,Y[b]===0&&(i.enableVertexAttribArray(b),Y[b]=1),q[b]!==N&&(i.vertexAttribDivisor(b,N),q[b]=N)}function A(){const b=s.newAttributes,N=s.enabledAttributes;for(let j=0,Y=N.length;j<Y;j++)N[j]!==b[j]&&(i.disableVertexAttribArray(j),N[j]=0)}function S(b,N,j,Y,q,re,Q){Q===!0?i.vertexAttribIPointer(b,N,j,q,re):i.vertexAttribPointer(b,N,j,Y,q,re)}function w(b,N,j,Y){_();const q=Y.attributes,re=j.getAttributes(),Q=N.defaultAttributeValues;for(const pe in re){const k=re[pe];if(k.location>=0){let ne=q[pe];if(ne===void 0&&(pe==="instanceMatrix"&&b.instanceMatrix&&(ne=b.instanceMatrix),pe==="instanceColor"&&b.instanceColor&&(ne=b.instanceColor)),ne!==void 0){const te=ne.normalized,ce=ne.itemSize,_e=e.get(ne);if(_e===void 0)continue;const Fe=_e.buffer,ue=_e.type,Ee=_e.bytesPerElement,Ce=ue===i.INT||ue===i.UNSIGNED_INT||ne.gpuType===lv;if(ne.isInterleavedBufferAttribute){const De=ne.data,dt=De.stride,At=ne.offset;if(De.isInstancedInterleavedBuffer){for(let it=0;it<k.locationSize;it++)g(k.location+it,De.meshPerAttribute);b.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=De.meshPerAttribute*De.count)}else for(let it=0;it<k.locationSize;it++)y(k.location+it);i.bindBuffer(i.ARRAY_BUFFER,Fe);for(let it=0;it<k.locationSize;it++)S(k.location+it,ce/k.locationSize,ue,te,dt*Ee,(At+ce/k.locationSize*it)*Ee,Ce)}else{if(ne.isInstancedBufferAttribute){for(let De=0;De<k.locationSize;De++)g(k.location+De,ne.meshPerAttribute);b.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=ne.meshPerAttribute*ne.count)}else for(let De=0;De<k.locationSize;De++)y(k.location+De);i.bindBuffer(i.ARRAY_BUFFER,Fe);for(let De=0;De<k.locationSize;De++)S(k.location+De,ce/k.locationSize,ue,te,ce*Ee,ce/k.locationSize*De*Ee,Ce)}}else if(Q!==void 0){const te=Q[pe];if(te!==void 0)switch(te.length){case 2:i.vertexAttrib2fv(k.location,te);break;case 3:i.vertexAttrib3fv(k.location,te);break;case 4:i.vertexAttrib4fv(k.location,te);break;default:i.vertexAttrib1fv(k.location,te)}}}}A()}function P(){D();for(const b in n){const N=n[b];for(const j in N){const Y=N[j];for(const q in Y)f(Y[q].object),delete Y[q];delete N[j]}delete n[b]}}function T(b){if(n[b.id]===void 0)return;const N=n[b.id];for(const j in N){const Y=N[j];for(const q in Y)f(Y[q].object),delete Y[q];delete N[j]}delete n[b.id]}function I(b){for(const N in n){const j=n[N];if(j[b.id]===void 0)continue;const Y=j[b.id];for(const q in Y)f(Y[q].object),delete Y[q];delete j[b.id]}}function D(){C(),o=!0,s!==r&&(s=r,u(s.object))}function C(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:a,reset:D,resetDefaultState:C,dispose:P,releaseStatesOfGeometry:T,releaseStatesOfProgram:I,initAttributes:_,enableAttribute:y,disableUnusedAttributes:A}}function r8(i,e,t){let n;function r(u){n=u}function s(u,f){i.drawArrays(n,u,f),t.update(f,n,1)}function o(u,f,h){h!==0&&(i.drawArraysInstanced(n,u,f,h),t.update(f,n,h))}function a(u,f,h){if(h===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let m=0;m<h;m++)this.render(u[m],f[m]);else{p.multiDrawArraysWEBGL(n,u,0,f,0,h);let m=0;for(let v=0;v<h;v++)m+=f[v];t.update(m,n,1)}}function l(u,f,h,p){if(h===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let v=0;v<u.length;v++)o(u[v],f[v],p[v]);else{m.multiDrawArraysInstancedWEBGL(n,u,0,f,0,p,0,h);let v=0;for(let _=0;_<h;_++)v+=f[_];for(let _=0;_<p.length;_++)t.update(v,n,p[_])}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function s8(i,e,t,n){let r;function s(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const T=e.get("EXT_texture_filter_anisotropic");r=i.getParameter(T.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function o(T){return!(T!==ii&&n.convert(T)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(T){const I=T===vi&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(T!==jr&&n.convert(T)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&T!==Nn&&!I)}function l(T){if(T==="highp"){if(i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.HIGH_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let u=t.precision!==void 0?t.precision:"highp";const f=l(u);f!==u&&(console.warn("THREE.WebGLRenderer:",u,"not supported, using",f,"instead."),u=f);const h=t.logarithmicDepthBuffer===!0,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),m=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v=i.getParameter(i.MAX_TEXTURE_SIZE),_=i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE),y=i.getParameter(i.MAX_VERTEX_ATTRIBS),g=i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS),A=i.getParameter(i.MAX_VARYING_VECTORS),S=i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS),w=m>0,P=i.getParameter(i.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:u,logarithmicDepthBuffer:h,maxTextures:p,maxVertexTextures:m,maxTextureSize:v,maxCubemapSize:_,maxAttributes:y,maxVertexUniforms:g,maxVaryings:A,maxFragmentUniforms:S,vertexTextures:w,maxSamples:P}}function o8(i){const e=this;let t=null,n=0,r=!1,s=!1;const o=new Ma,a=new Dt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,p){const m=h.length!==0||p||n!==0||r;return r=p,n=h.length,m},this.beginShadows=function(){s=!0,f(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(h,p){t=f(h,p,0)},this.setState=function(h,p,m){const v=h.clippingPlanes,_=h.clipIntersection,y=h.clipShadows,g=i.get(h);if(!r||v===null||v.length===0||s&&!y)s?f(null):u();else{const A=s?0:n,S=A*4;let w=g.clippingState||null;l.value=w,w=f(v,p,S,m);for(let P=0;P!==S;++P)w[P]=t[P];g.clippingState=w,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=A}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function f(h,p,m,v){const _=h!==null?h.length:0;let y=null;if(_!==0){if(y=l.value,v!==!0||y===null){const g=m+_*4,A=p.matrixWorldInverse;a.getNormalMatrix(A),(y===null||y.length<g)&&(y=new Float32Array(g));for(let S=0,w=m;S!==_;++S,w+=4)o.copy(h[S]).applyMatrix4(A,a),o.normal.toArray(y,w),y[w+3]=o.constant}l.value=y,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,y}}function a8(i){let e=new WeakMap;function t(o,a){return a===mf?o.mapping=_o:a===Th&&(o.mapping=$a),o}function n(o){if(o&&o.isTexture){const a=o.mapping;if(a===mf||a===Th)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 u=new WS(l.height);return u.fromEquirectangularTexture(i,o),e.set(o,u),o.addEventListener("dispose",r),t(u.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:n,dispose:s}}class Lu extends ip{constructor(e=-1,t=1,n=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,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,n,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=n,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),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=n-e,o=n+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,f=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,o=s+u*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 Vc=4,nT=[.125,.215,.35,.446,.526,.582],Jl=20,B1=new Lu,iT=new He;let D1=null,F1=0,L1=0,N1=!1;const Wl=(1+Math.sqrt(5))/2,vc=1/Wl,rT=[new H(-Wl,vc,0),new H(Wl,vc,0),new H(-vc,0,Wl),new H(vc,0,Wl),new H(0,Wl,-vc),new H(0,Wl,vc),new H(-1,1,-1),new H(1,1,-1),new H(-1,1,1),new H(1,1,1)];class iA{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){D1=this._renderer.getRenderTarget(),F1=this._renderer.getActiveCubeFace(),L1=this._renderer.getActiveMipmapLevel(),N1=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,n,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=aT(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=oT(),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(D1,F1,L1),this._renderer.xr.enabled=N1,e.scissorTest=!1,Jm(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===_o||e.mapping===$a?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),D1=this._renderer.getRenderTarget(),F1=this._renderer.getActiveCubeFace(),L1=this._renderer.getActiveMipmapLevel(),N1=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Qt,minFilter:Qt,generateMipmaps:!1,type:vi,format:ii,colorSpace:Ji,depthBuffer:!1},r=sT(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=sT(e,t,n);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=l8(s)),this._blurMaterial=u8(s,e,t)}return r}_compileMaterial(e){const t=new Mn(this._lodPlanes[0],e);this._renderer.compile(t,B1)}_sceneToCubeUV(e,t,n,r){const a=new oi(90,1,t,n),l=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],f=this._renderer,h=f.autoClear,p=f.toneMapping;f.getClearColor(iT),f.toneMapping=po,f.autoClear=!1;const m=new Xi({name:"PMREM.Background",side:Mi,depthWrite:!1,depthTest:!1}),v=new Mn(new ul,m);let _=!1;const y=e.background;y?y.isColor&&(m.color.copy(y),e.background=null,_=!0):(m.color.copy(iT),_=!0);for(let g=0;g<6;g++){const A=g%3;A===0?(a.up.set(0,l[g],0),a.lookAt(u[g],0,0)):A===1?(a.up.set(0,0,l[g]),a.lookAt(0,u[g],0)):(a.up.set(0,l[g],0),a.lookAt(0,0,u[g]));const S=this._cubeSize;Jm(r,A*S,g>2?S:0,S,S),f.setRenderTarget(r),_&&f.render(v,a),f.render(e,a)}v.geometry.dispose(),v.material.dispose(),f.toneMapping=p,f.autoClear=h,e.background=y}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===_o||e.mapping===$a;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=aT()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=oT());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Mn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Jm(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(o,B1)}_applyPMREM(e){const t=this._renderer,n=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=rT[(r-s-1)%rT.length];this._blur(e,s-1,s,o,a)}t.autoClear=n}_blur(e,t,n,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",s),this._halfBlur(o,e,n,n,r,"longitudinal",s)}_halfBlur(e,t,n,r,s,o,a){const l=this._renderer,u=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const f=3,h=new Mn(this._lodPlanes[r],u),p=u.uniforms,m=this._sizeLods[n]-1,v=isFinite(s)?Math.PI/(2*m):2*Math.PI/(2*Jl-1),_=s/v,y=isFinite(s)?1+Math.floor(f*_):Jl;y>Jl&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${Jl}`);const g=[];let A=0;for(let I=0;I<Jl;++I){const D=I/_,C=Math.exp(-D*D/2);g.push(C),I===0?A+=C:I<y&&(A+=2*C)}for(let I=0;I<g.length;I++)g[I]=g[I]/A;p.envMap.value=e.texture,p.samples.value=y,p.weights.value=g,p.latitudinal.value=o==="latitudinal",a&&(p.poleAxis.value=a);const{_lodMax:S}=this;p.dTheta.value=v,p.mipInt.value=S-n;const w=this._sizeLods[r],P=3*w*(r>S-Vc?r-S+Vc:0),T=4*(this._cubeSize-w);Jm(t,P,T,3*w,2*w),l.setRenderTarget(t),l.render(h,B1)}}function l8(i){const e=[],t=[],n=[];let r=i;const s=i-Vc+1+nT.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);t.push(a);let l=1/a;o>i-Vc?l=nT[o-i+Vc-1]:o===0&&(l=0),n.push(l);const u=1/(a-2),f=-u,h=1+u,p=[f,f,h,f,h,h,f,f,h,h,f,h],m=6,v=6,_=3,y=2,g=1,A=new Float32Array(_*v*m),S=new Float32Array(y*v*m),w=new Float32Array(g*v*m);for(let T=0;T<m;T++){const I=T%3*2/3-1,D=T>2?0:-1,C=[I,D,0,I+2/3,D,0,I+2/3,D+1,0,I,D,0,I+2/3,D+1,0,I,D+1,0];A.set(C,_*v*T),S.set(p,y*v*T);const b=[T,T,T,T,T,T];w.set(b,g*v*T)}const P=new Bt;P.setAttribute("position",new $t(A,_)),P.setAttribute("uv",new $t(S,y)),P.setAttribute("faceIndex",new $t(w,g)),e.push(P),r>Vc&&r--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function sT(i,e,t){const n=new Tr(i,e,t);return n.texture.mapping=Df,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Jm(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function u8(i,e,t){const n=new Float32Array(Jl),r=new H(0,1,0);return new ur({name:"SphericalGaussianBlur",defines:{n:Jl,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:XS(),fragmentShader:` 3584 3585 precision mediump float; 3586 precision mediump int; 3587 3588 varying vec3 vOutputDirection; 3589 3590 uniform sampler2D envMap; 3591 uniform int samples; 3592 uniform float weights[ n ]; 3593 uniform bool latitudinal; 3594 uniform float dTheta; 3595 uniform float mipInt; 3596 uniform vec3 poleAxis; 3597 3598 #define ENVMAP_TYPE_CUBE_UV 3599 #include <cube_uv_reflection_fragment> 3600 3601 vec3 getSample( float theta, vec3 axis ) { 3602 3603 float cosTheta = cos( theta ); 3604 // Rodrigues' axis-angle rotation 3605 vec3 sampleDirection = vOutputDirection * cosTheta 3606 + cross( axis, vOutputDirection ) * sin( theta ) 3607 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3608 3609 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3610 3611 } 3612 3613 void main() { 3614 3615 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3616 3617 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3618 3619 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3620 3621 } 3622 3623 axis = normalize( axis ); 3624 3625 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3626 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3627 3628 for ( int i = 1; i < n; i++ ) { 3629 3630 if ( i >= samples ) { 3631 3632 break; 3633 3634 } 3635 3636 float theta = dTheta * float( i ); 3637 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3638 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3639 3640 } 3641 3642 } 3643 `,blending:ho,depthTest:!1,depthWrite:!1})}function oT(){return new ur({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:XS(),fragmentShader:` 3644 3645 precision mediump float; 3646 precision mediump int; 3647 3648 varying vec3 vOutputDirection; 3649 3650 uniform sampler2D envMap; 3651 3652 #include <common> 3653 3654 void main() { 3655 3656 vec3 outputDirection = normalize( vOutputDirection ); 3657 vec2 uv = equirectUv( outputDirection ); 3658
3659 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3660 3661 } 3662 `,blending:ho,depthTest:!1,depthWrite:!1})}function aT(){return new ur({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:XS(),fragmentShader:` 3663 3664 precision mediump float; 3665 precision mediump int; 3666 3667 uniform float flipEnvMap; 3668 3669 varying vec3 vOutputDirection; 3670 3671 uniform samplerCube envMap; 3672 3673 void main() { 3674 3675 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3676 3677 } 3678 `,blending:ho,depthTest:!1,depthWrite:!1})}function XS(){return` 3679 3680 precision mediump float; 3681 precision mediump int; 3682 3683 attribute float faceIndex; 3684 3685 varying vec3 vOutputDirection; 3686 3687 // RH coordinate system; PMREM face-indexing convention 3688 vec3 getDirection( vec2 uv, float face ) { 3689 3690 uv = 2.0 * uv - 1.0; 3691 3692 vec3 direction = vec3( uv, 1.0 ); 3693 3694 if ( face == 0.0 ) { 3695 3696 direction = direction.zyx; // ( 1, v, u ) pos x 3697 3698 } else if ( face == 1.0 ) { 3699 3700 direction = direction.xzy; 3701 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3702 3703 } else if ( face == 2.0 ) { 3704 3705 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3706 3707 } else if ( face == 3.0 ) { 3708 3709 direction = direction.zyx; 3710 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3711 3712 } else if ( face == 4.0 ) { 3713 3714 direction = direction.xzy; 3715 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3716 3717 } else if ( face == 5.0 ) { 3718 3719 direction.z *= -1.0; // ( u, v, -1 ) neg z 3720 3721 } 3722 3723 return direction; 3724 3725 } 3726 3727 void main() { 3728 3729 vOutputDirection = getDirection( uv, faceIndex ); 3730 gl_Position = vec4( position, 1.0 ); 3731 3732 } 3733 `}function c8(i){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture){const l=a.mapping,u=l===mf||l===Th,f=l===_o||l===$a;if(u||f){let h=e.get(a);const p=h!==void 0?h.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==p)return t===null&&(t=new iA(i)),h=u?t.fromEquirectangular(a,h):t.fromCubemap(a,h),h.texture.pmremVersion=a.pmremVersion,e.set(a,h),h.texture;if(h!==void 0)return h.texture;{const m=a.image;return u&&m&&m.height>0||f&&m&&r(m)?(t===null&&(t=new iA(i)),h=u?t.fromEquirectangular(a):t.fromCubemap(a),h.texture.pmremVersion=a.pmremVersion,e.set(a,h),a.addEventListener("dispose",s),h.texture):null}}}return a}function r(a){let l=0;const u=6;for(let f=0;f<u;f++)a[f]!==void 0&&l++;return l===u}function s(a){const l=a.target;l.removeEventListener("dispose",s);const u=e.get(l);u!==void 0&&(e.delete(l),u.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:o}}function f8(i){const e={};function t(n){if(e[n]!==void 0)return e[n];let r;switch(n){case"WEBGL_depth_texture":r=i.getExtension("WEBGL_depth_texture")||i.getExtension("MOZ_WEBGL_depth_texture")||i.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=i.getExtension("WEBGL_compressed_texture_s3tc")||i.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=i.getExtension("WEBGL_compressed_texture_pvrtc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=i.getExtension(n)}return e[n]=r,r}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const r=t(n);return r===null&&zS("THREE.WebGLRenderer: "+n+" extension not supported."),r}}}function d8(i,e,t,n){const r={},s=new WeakMap;function o(h){const p=h.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 y=0,g=_.length;y<g;y++)e.remove(_[y])}p.removeEventListener("dispose",o),delete r[p.id];const m=s.get(p);m&&(e.remove(m),s.delete(p)),n.releaseStatesOfGeometry(p),p.isInstancedBufferGeometry===!0&&delete p._maxInstanceCount,t.memory.geometries--}function a(h,p){return r[p.id]===!0||(p.addEventListener("dispose",o),r[p.id]=!0,t.memory.geometries++),p}function l(h){const p=h.attributes;for(const v in p)e.update(p[v],i.ARRAY_BUFFER);const m=h.morphAttributes;for(const v in m){const _=m[v];for(let y=0,g=_.length;y<g;y++)e.update(_[y],i.ARRAY_BUFFER)}}function u(h){const p=[],m=h.index,v=h.attributes.position;let _=0;if(m!==null){const A=m.array;_=m.version;for(let S=0,w=A.length;S<w;S+=3){const P=A[S+0],T=A[S+1],I=A[S+2];p.push(P,T,T,I,I,P)}}else if(v!==void 0){const A=v.array;_=v.version;for(let S=0,w=A.length/3-1;S<w;S+=3){const P=S+0,T=S+1,I=S+2;p.push(P,T,T,I,I,P)}}else return;const y=new(Fb(p)?HS:GS)(p,1);y.version=_;const g=s.get(h);g&&e.remove(g),s.set(h,y)}function f(h){const p=s.get(h);if(p){const m=h.index;m!==null&&p.version<m.version&&u(h)}else u(h);return s.get(h)}return{get:a,update:l,getWireframeAttribute:f}}function h8(i,e,t){let n;function r(p){n=p}let s,o;function a(p){s=p.type,o=p.bytesPerElement}function l(p,m){i.drawElements(n,m,s,p*o),t.update(m,n,1)}function u(p,m,v){v!==0&&(i.drawElementsInstanced(n,m,s,p*o,v),t.update(m,n,v))}function f(p,m,v){if(v===0)return;const _=e.get("WEBGL_multi_draw");if(_===null)for(let y=0;y<v;y++)this.render(p[y]/o,m[y]);else{_.multiDrawElementsWEBGL(n,m,0,s,p,0,v);let y=0;for(let g=0;g<v;g++)y+=m[g];t.update(y,n,1)}}function h(p,m,v,_){if(v===0)return;const y=e.get("WEBGL_multi_draw");if(y===null)for(let g=0;g<p.length;g++)u(p[g]/o,m[g],_[g]);
vendor: 17,847 bytes, lines 3733-3766
3733else{y.multiDrawElementsInstancedWEBGL(n,m,0,s,p,0,_,0,v);let g=0;for(let A=0;A<v;A++)g+=m[A];for(let A=0;A<_.length;A++)t.update(g,n,_[A])}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=u,this.renderMultiDraw=f,this.renderMultiDrawInstances=h}function p8(i){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(s,o,a){switch(t.calls++,o){case i.TRIANGLES:t.triangles+=a*(s/3);break;case i.LINES:t.lines+=a*(s/2);break;case i.LINE_STRIP:t.lines+=a*(s-1);break;case i.LINE_LOOP:t.lines+=a*s;break;case i.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:n}}function m8(i,e,t){const n=new WeakMap,r=new cn;function s(o,a,l){const u=o.morphTargetInfluences,f=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,h=f!==void 0?f.length:0;let p=n.get(a);if(p===void 0||p.count!==h){let C=function(){I.dispose(),n.delete(a),a.removeEventListener("dispose",C)};p!==void 0&&p.texture.dispose();const m=a.morphAttributes.position!==void 0,v=a.morphAttributes.normal!==void 0,_=a.morphAttributes.color!==void 0,y=a.morphAttributes.position||[],g=a.morphAttributes.normal||[],A=a.morphAttributes.color||[];let S=0;m===!0&&(S=1),v===!0&&(S=2),_===!0&&(S=3);let w=a.attributes.position.count*S,P=1;w>e.maxTextureSize&&(P=Math.ceil(w/e.maxTextureSize),w=e.maxTextureSize);const T=new Float32Array(w*P*4*h),I=new dv(T,w,P,h);I.type=Nn,I.needsUpdate=!0;const D=S*4;for(let b=0;b<h;b++){const N=y[b],j=g[b],Y=A[b],q=w*P*4*b;for(let re=0;re<N.count;re++){const Q=re*D;m===!0&&(r.fromBufferAttribute(N,re),T[q+Q+0]=r.x,T[q+Q+1]=r.y,T[q+Q+2]=r.z,T[q+Q+3]=0),v===!0&&(r.fromBufferAttribute(j,re),T[q+Q+4]=r.x,T[q+Q+5]=r.y,T[q+Q+6]=r.z,T[q+Q+7]=0),_===!0&&(r.fromBufferAttribute(Y,re),T[q+Q+8]=r.x,T[q+Q+9]=r.y,T[q+Q+10]=r.z,T[q+Q+11]=Y.itemSize===4?r.w:1)}}p={count:h,texture:I,size:new Re(w,P)},n.set(a,p),a.addEventListener("dispose",C)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(i,"morphTexture",o.morphTexture,t);else{let m=0;for(let _=0;_<u.length;_++)m+=u[_];const v=a.morphTargetsRelative?1:1-m;l.getUniforms().setValue(i,"morphTargetBaseInfluence",v),l.getUniforms().setValue(i,"morphTargetInfluences",u)}l.getUniforms().setValue(i,"morphTargetsTexture",p.texture,t),l.getUniforms().setValue(i,"morphTargetsTextureSize",p.size)}return{update:s}}function g8(i,e,t,n){let r=new WeakMap;function s(l){const u=n.render.frame,f=l.geometry,h=e.get(l,f);if(r.get(h)!==u&&(e.update(h),r.set(h,u)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==u&&(t.update(l.instanceMatrix,i.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,i.ARRAY_BUFFER),r.set(l,u))),l.isSkinnedMesh){const p=l.skeleton;r.get(p)!==u&&(p.update(),r.set(p,u))}return h}function o(){r=new WeakMap}function a(l){const u=l.target;u.removeEventListener("dispose",a),t.remove(u.instanceMatrix),u.instanceColor!==null&&t.remove(u.instanceColor)}return{update:s,dispose:o}}class hv extends qt{constructor(e,t,n,r,s,o,a,l,u,f=lu){if(f!==lu&&f!==Su)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&f===lu&&(n=el),n===void 0&&f===Su&&(n=Au),super(null,r,s,o,a,l,f,n,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:li,this.minFilter=l!==void 0?l:li,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 Hb=new qt,Vb=new hv(1,1);Vb.compareFunction=OS;const Wb=new dv,Xb=new kS,Jb=new rp,lT=[],uT=[],cT=new Float32Array(16),fT=new Float32Array(9),dT=new Float32Array(4);function Lf(i,e,t){const n=i[0];if(n<=0||n>0)return i;const r=e*t;let s=lT[r];if(s===void 0&&(s=new Float32Array(r),lT[r]=s),e!==0){n.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,i[o].toArray(s,a)}return s}function ui(i,e){if(i.length!==e.length)return!1;for(let t=0,n=i.length;t<n;t++)if(i[t]!==e[t])return!1;return!0}function ci(i,e){for(let t=0,n=e.length;t<n;t++)i[t]=e[t]}function pv(i,e){let t=uT[e];t===void 0&&(t=new Int32Array(e),uT[e]=t);for(let n=0;n!==e;++n)t[n]=i.allocateTextureUnit();return t}function v8(i,e){const t=this.cache;t[0]!==e&&(i.uniform1f(this.addr,e),t[0]=e)}function _8(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(i.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ui(t,e))return;i.uniform2fv(this.addr,e),ci(t,e)}}function y8(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(i.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)&&(i.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(ui(t,e))return;i.uniform3fv(this.addr,e),ci(t,e)}}function x8(i,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)&&(i.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(ui(t,e))return;i.uniform4fv(this.addr,e),ci(t,e)}}function A8(i,e){const t=this.cache,n=e.elements;if(n===void 0){if(ui(t,e))return;i.uniformMatrix2fv(this.addr,!1,e),ci(t,e)}else{if(ui(t,n))return;dT.set(n),i.uniformMatrix2fv(this.addr,!1,dT),ci(t,n)}}function S8(i,e){const t=this.cache,n=e.elements;if(n===void 0){if(ui(t,e))return;i.uniformMatrix3fv(this.addr,!1,e),ci(t,e)}else{if(ui(t,n))return;fT.set(n),i.uniformMatrix3fv(this.addr,!1,fT),ci(t,n)}}function E8(i,e){const t=this.cache,n=e.elements;if(n===void 0){if(ui(t,e))return;i.uniformMatrix4fv(this.addr,!1,e),ci(t,e)}else{if(ui(t,n))return;cT.set(n),i.uniformMatrix4fv(this.addr,!1,cT),ci(t,n)}}function w8(i,e){const t=this.cache;t[0]!==e&&(i.uniform1i(this.addr,e),t[0]=e)}function M8(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(i.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ui(t,e))return;i.uniform2iv(this.addr,e),ci(t,e)}}function C8(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(i.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ui(t,e))return;i.uniform3iv(this.addr,e),ci(t,e)}}function T8(i,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)&&(i.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(ui(t,e))return;i.uniform4iv(this.addr,e),ci(t,e)}}function R8(i,e){const t=this.cache;t[0]!==e&&(i.uniform1ui(this.addr,e),t[0]=e)}function P8(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(i.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ui(t,e))return;i.uniform2uiv(this.addr,e),ci(t,e)}}function b8(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(i.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ui(t,e))return;i.uniform3uiv(this.addr,e),ci(t,e)}}function I8(i,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)&&(i.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(ui(t,e))return;i.uniform4uiv(this.addr,e),ci(t,e)}}function B8(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r);const s=this.type===i.SAMPLER_2D_SHADOW?Vb:Hb;t.setTexture2D(e||s,r)}function D8(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r),t.setTexture3D(e||Xb,r)}function F8(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r),t.setTextureCube(e||Jb,r)}function L8(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r),t.setTexture2DArray(e||Wb,r)}function N8(i){switch(i){case 5126:return v8;case 35664:return _8;case 35665:return y8;case 35666:return x8;case 35674:return A8;case 35675:return S8;case 35676:return E8;case 5124:case 35670:return w8;case 35667:case 35671:return M8;case 35668:case 35672:return C8;case 35669:case 35673:return T8;case 5125:return R8;case 36294:return P8;case 36295:return b8;case 36296:return I8;case 35678:case 36198:case 36298:case 36306:case 35682:return B8;case 35679:case 36299:case 36307:return D8;case 35680:case 36300:case 36308:case 36293:return F8;case 36289:case 36303:case 36311:case 36292:return L8}}function O8(i,e){i.uniform1fv(this.addr,e)}function U8(i,e){const t=Lf(e,this.size,2);i.uniform2fv(this.addr,t)}function z8(i,e){const t=Lf(e,this.size,3);i.uniform3fv(this.addr,t)}function k8(i,e){const t=Lf(e,this.size,4);i.uniform4fv(this.addr,t)}function G8(i,e){const t=Lf(e,this.size,4);i.uniformMatrix2fv(this.addr,!1,t)}function H8(i,e){const t=Lf(e,this.size,9);i.uniformMatrix3fv(this.addr,!1,t)}function V8(i,e){const t=Lf(e,this.size,16);i.uniformMatrix4fv(this.addr,!1,t)}function W8(i,e){i.uniform1iv(this.addr,e)}function X8(i,e){i.uniform2iv(this.addr,e)}function J8(i,e){i.uniform3iv(this.addr,e)}function j8(i,e){i.uniform4iv(this.addr,e)}function Y8(i,e){i.uniform1uiv(this.addr,e)}function K8(i,e){i.uniform2uiv(this.addr,e)}function Q8(i,e){i.uniform3uiv(this.addr,e)}function q8(i,e){i.uniform4uiv(this.addr,e)}function Z8(i,e,t){const n=this.cache,r=e.length,s=pv(t,r);ui(n,s)||(i.uniform1iv(this.addr,s),ci(n,s));for(let o=0;o!==r;++o)t.setTexture2D(e[o]||Hb,s[o])}function $8(i,e,t){const n=this.cache,r=e.length,s=pv(t,r);ui(n,s)||(i.uniform1iv(this.addr,s),ci(n,s));for(let o=0;o!==r;++o)t.setTexture3D(e[o]||Xb,s[o])}function e6(i,e,t){const n=this.cache,r=e.length,s=pv(t,r);ui(n,s)||(i.uniform1iv(this.addr,s),ci(n,s));for(let o=0;o!==r;++o)t.setTextureCube(e[o]||Jb,s[o])}function t6(i,e,t){const n=this.cache,r=e.length,s=pv(t,r);ui(n,s)||(i.uniform1iv(this.addr,s),ci(n,s));for(let o=0;o!==r;++o)t.setTexture2DArray(e[o]||Wb,s[o])}function n6(i){switch(i){case 5126:return O8;case 35664:return U8;case 35665:return z8;case 35666:return k8;case 35674:return G8;case 35675:return H8;case 35676:return V8;case 5124:case 35670:return W8;case 35667:case 35671:return X8;case 35668:case 35672:return J8;case 35669:case 35673:return j8;case 5125:return Y8;case 36294:return K8;case 36295:return Q8;case 36296:return q8;case 35678:case 36198:case 36298:case 36306:case 35682:return Z8;case 35679:case 36299:case 36307:return $8;case 35680:case 36300:case 36308:case 36293:return e6;case 36289:case 36303:case 36311:case 36292:return t6}}class i6{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=N8(t.type)}}class r6{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=n6(t.type)}}class s6{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,t[a.id],n)}}}const O1=/(\w+)(\])?(\[|\.)?/g;function hT(i,e){i.seq.push(e),i.map[e.id]=e}function o6(i,e,t){const n=i.name,r=n.length;for(O1.lastIndex=0;;){const s=O1.exec(n),o=O1.lastIndex;let a=s[1];const l=s[2]==="]",u=s[3];if(l&&(a=a|0),u===void 0||u==="["&&o+2===r){hT(t,u===void 0?new i6(a,i,e):new r6(a,i,e));break}else{let h=t.map[a];h===void 0&&(h=new s6(a),hT(t,h)),t=h}}}class tg{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<n;++r){const s=e.getActiveUniform(t,r),o=e.getUniformLocation(t,s.name);o6(s,o,this)}}setValue(e,t,n,r){const s=this.map[t];s!==void 0&&s.setValue(e,n,r)}setOptional(e,t,n){const r=t[n];r!==void 0&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let s=0,o=t.length;s!==o;++s){const a=t[s],l=n[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,t){const n=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in t&&n.push(o)}return n}}function pT(i,e,t){const n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}const a6=37297;let l6=0;function u6(i,e){const t=i.split(` 3734`),n=[],r=Math.max(e-6,0),s=Math.min(e+6,t.length);for(let o=r;o<s;o++){const a=o+1;n.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return n.join(` 3735`)}function c6(i){const e=ln.getPrimaries(ln.workingColorSpace),t=ln.getPrimaries(i);let n;switch(e===t?n="":e===Bh&&t===Ih?n="LinearDisplayP3ToLinearSRGB":e===Ih&&t===Bh&&(n="LinearSRGBToLinearDisplayP3"),i){case Ji:case np:return[n,"LinearTransferOETF"];case gr:case fv:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",i),[n,"LinearTransferOETF"]}}function mT(i,e,t){const n=i.getShaderParameter(e,i.COMPILE_STATUS),r=i.getShaderInfoLog(e).trim();if(n&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` 3736 3737`+r+` 3738 3739`+u6(i.getShaderSource(e),o)}else return r}function f6(i,e){const t=c6(e);return`vec4 ${i}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function d6(i,e){let t;switch(e){case ob:t="Linear";break;case ab:t="Reinhard";break;case lb:t="OptimizedCineon";break;case TS:t="ACESFilmic";break;case cb:t="AgX";break;case fb:t="Neutral";break;case ub:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+i+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function h6(i){return[i.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",i.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Hd).join(` 3740`)}function p6(i){const e=[];for(const t in i){const n=i[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` 3741`)}function m6(i,e){const t={},n=i.getProgramParameter(e,i.ACTIVE_ATTRIBUTES);for(let r=0;r<n;r++){const s=i.getActiveAttrib(e,r),o=s.name;let a=1;s.type===i.FLOAT_MAT2&&(a=2),s.type===i.FLOAT_MAT3&&(a=3),s.type===i.FLOAT_MAT4&&(a=4),t[o]={type:s.type,location:i.getAttribLocation(e,o),locationSize:a}}return t}function Hd(i){return i!==""}function gT(i,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return i.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 vT(i,e){return i.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const g6=/^[ \t]*#include +<([\w\d./]+)>/gm;function rA(i){return i.replace(g6,_6)}const v6=new Map;function _6(i,e){let t=Nt[e];if(t===void 0){const n=v6.get(e);if(n!==void 0)t=Nt[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return rA(t)}const y6=/#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 _T(i){return i.replace(y6,x6)}function x6(i,e,t,n){let r="";for(let s=parseInt(e);s<parseInt(t);s++)r+=n.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function yT(i){let e=`precision ${i.precision} float; 3742 precision ${i.precision} int; 3743 precision ${i.precision} sampler2D; 3744 precision ${i.precision} samplerCube; 3745 precision ${i.precision} sampler3D; 3746 precision ${i.precision} sampler2DArray; 3747 precision ${i.precision} sampler2DShadow; 3748 precision ${i.precision} samplerCubeShadow; 3749 precision ${i.precision} sampler2DArrayShadow; 3750 precision ${i.precision} isampler2D; 3751 precision ${i.precision} isampler3D; 3752 precision ${i.precision} isamplerCube; 3753 precision ${i.precision} isampler2DArray; 3754 precision ${i.precision} usampler2D; 3755 precision ${i.precision} usampler3D; 3756 precision ${i.precision} usamplerCube; 3757 precision ${i.precision} usampler2DArray; 3758 `;return i.precision==="highp"?e+=` 3759#define HIGH_PRECISION`:i.precision==="mediump"?e+=` 3760#define MEDIUM_PRECISION`:i.precision==="lowp"&&(e+=` 3761#define LOW_PRECISION`),e}function A6(i){let e="SHADOWMAP_TYPE_BASIC";return i.shadowMapType===ov?e="SHADOWMAP_TYPE_PCF":i.shadowMapType===eh?e="SHADOWMAP_TYPE_PCF_SOFT":i.shadowMapType===Fs&&(e="SHADOWMAP_TYPE_VSM"),e}function S6(i){let e="ENVMAP_TYPE_CUBE";if(i.envMap)switch(i.envMapMode){case _o:case $a:e="ENVMAP_TYPE_CUBE";break;case Df:e="ENVMAP_TYPE_CUBE_UV";break}return e}function E6(i){let e="ENVMAP_MODE_REFLECTION";if(i.envMap)switch(i.envMapMode){case $a:e="ENVMAP_MODE_REFRACTION";break}return e}function w6(i){let e="ENVMAP_BLENDING_NONE";if(i.envMap)switch(i.combine){case tp:e="ENVMAP_BLENDING_MULTIPLY";break;case rb:e="ENVMAP_BLENDING_MIX";break;case sb:e="ENVMAP_BLENDING_ADD";break}return e}function M6(i){const e=i.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:n,maxMip:t}}function C6(i,e,t,n){const r=i.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=A6(t),u=S6(t),f=E6(t),h=w6(t),p=M6(t),m=h6(t),v=p6(s),_=r.createProgram();let y,g,A=t.glslVersion?"#version "+t.glslVersion+` 3762`:"";t.isRawShaderMaterial?(y=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,v].filter(Hd).join(` 3763`),y.length>0&&(y+=` 3764`),g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,v].filter(Hd).join(` 3765`),g.length>0&&(g+=` 3766`)):(y=[yT(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,v,t.extensionCl
vendor: 6,400 bytes, lines 3766-3768
3766ipCullDistance?"#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":"","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",` 3767`].filter(Hd).join(` 3768`),g=[yT(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 "+u:"",t.envMap?"#define "+f:"",t.envMap?"#define "+h:"",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_IR
3768IDESCENCE":"",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":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==po?"#define TONE_MAPPING":"",t.toneMapping!==po?Nt.tonemapping_pars_fragment:"",t.toneMapping!==po?d6("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Nt.colorspace_pars_fragment,f6("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` 3769`].filter(Hd).join(` 3770`)),o=rA(o),o=gT(o,t),o=vT(o,t),a=rA(a),a=gT(a,t),a=vT(a,t),o=_T(o),a=_T(a),t.isRawShaderMaterial!==!0&&(A=`#version 300 es 3771`,y=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` 3772`)+` 3773`+y,g=["#define varying in",t.glslVersion===nA?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===nA?"":"#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(` 3774`)+` 3775`+g);const S=A+y+o,w=A+g+a,P=pT(r,r.VERTEX_SHADER,S),T=pT(r,r.FRAGMENT_SHADER,w);r.attachShader(_,P),r.attachShader(_,T),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function I(N){if(i.debug.checkShaderErrors){const j=r.getProgramInfoLog(_).trim(),Y=r.getShaderInfoLog(P).trim(),q=r.getShaderInfoLog(T).trim();let re=!0,Q=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(re=!1,typeof i.debug.onShaderError=="function")i.debug.onShaderError(r,_,P,T);else{const pe=mT(r,P,"vertex"),k=mT(r,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+` 3776 3777Material Name: `+N.name+` 3778Material Type: `+N.type+` 3779 3780Program Info Log: `+j+` 3781`+pe+` 3782`+k)}else j!==""?console.warn("THREE.WebGLProgram: Program Info Log:",j):(Y===""||q==="")&&(Q=!1);Q&&(N.diagnostics={runnable:re,programLog:j,vertexShader:{log:Y,prefix:y},fragmentShader:{log:q,prefix:g}})}r.deleteShader(P),r.deleteShader(T),D=new tg(r,_),C=m6(r,_)}let D;this.getUniforms=function(){return D===void 0&&I(this),D};let C;this.getAttributes=function(){return C===void 0&&I(this),C};let b=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return b===!1&&(b=r.getProgramParameter(_,a6)),b},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=l6++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=P,this.fragmentShader=T,this}let T6=0;class R6{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(n),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 n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new P6(e),t.set(e,n)),n}}class P6{constructor(e){this.id=T6++,this.code=e,this.usedTimes=0}}function b6(i,e,t,n,r,s,o){const a=new cu,l=new R6,u=new Set,f=[],h=r.logarithmicDepthBuffer,p=r.vertexTextures;let m=r.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(C){return u.add(C),C===0?"uv":`uv${C}`}function y(C,b,N,j,Y){const q=j.fog,re=Y.geometry,Q=C.isMeshStandardMaterial?j.environment:null,pe=(C.isMeshStandardMaterial?t:e).get(C.envMap||Q),k=!!pe&&pe.mapping===Df?pe.image.height:null,ne=v[C.type];C.precision!==null&&(m=r.getMaxPrecision(C.precision),m!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",m,"instead."));const te=re.morphAttributes.position||re.morphAttributes.normal||re.morphAttributes.color,ce=te!==void 0?te.length:0;let _e=0;re.morphAttributes.position!==void 0&&(_e=1),re.morphAttributes.normal!==void 0&&(_e=2),re.morphAttributes.color!==void 0&&(_e=3);let Fe,ue,Ee,Ce;if(ne){const en=Os[ne];Fe=en.vertexShader,ue=en.fragmentShader}else Fe=C.vertexShader,ue=C.fragmentShader,l.update(C),Ee=l.getVertexShaderID(C),Ce=l.getFragmentShaderID(C);const De=i.getRenderTarget(),dt=Y.isInstancedMesh===!0,At=Y.isBatchedMesh===!0,it=!!C.map,Z=!!C.matcap,Pe=!!pe,le=!!C.aoMap,Me=!!C.lightMap,xe=!!C.bumpMap,we=!!C.normalMap,Oe=!!C.displacementMap,Je=!!C.emissiveMap,ke=!!C.metalnessMap,G=!!C.roughnessMap,O
vendor: 17,929 bytes, lines 3782-3788
3782=C.anisotropy>0,fe=C.clearcoat>0,Te=C.dispersion>0,Se=C.iridescence>0,be=C.sheen>0,st=C.transmission>0,Le=O&&!!C.anisotropyMap,Ve=fe&&!!C.clearcoatMap,pt=fe&&!!C.clearcoatNormalMap,Ne=fe&&!!C.clearcoatRoughnessMap,Ke=Se&&!!C.iridescenceMap,xt=Se&&!!C.iridescenceThicknessMap,tt=be&&!!C.sheenColorMap,Ue=be&&!!C.sheenRoughnessMap,_t=!!C.specularMap,Ct=!!C.specularColorMap,Mt=!!C.specularIntensityMap,ee=st&&!!C.transmissionMap,Qe=st&&!!C.thicknessMap,se=!!C.gradientMap,Ie=!!C.alphaMap,je=C.alphaTest>0,Tt=!!C.alphaHash,Wt=!!C.extensions;let mn=po;C.toneMapped&&(De===null||De.isXRRenderTarget===!0)&&(mn=i.toneMapping);const zn={shaderID:ne,shaderType:C.type,shaderName:C.name,vertexShader:Fe,fragmentShader:ue,defines:C.defines,customVertexShaderID:Ee,customFragmentShaderID:Ce,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:m,batching:At,batchingColor:At&&Y._colorsTexture!==null,instancing:dt,instancingColor:dt&&Y.instanceColor!==null,instancingMorph:dt&&Y.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:De===null?i.outputColorSpace:De.isXRRenderTarget===!0?De.texture.colorSpace:Ji,alphaToCoverage:!!C.alphaToCoverage,map:it,matcap:Z,envMap:Pe,envMapMode:Pe&&pe.mapping,envMapCubeUVHeight:k,aoMap:le,lightMap:Me,bumpMap:xe,normalMap:we,displacementMap:p&&Oe,emissiveMap:Je,normalMapObjectSpace:we&&C.normalMapType===Cb,normalMapTangentSpace:we&&C.normalMapType===ll,metalnessMap:ke,roughnessMap:G,anisotropy:O,anisotropyMap:Le,clearcoat:fe,clearcoatMap:Ve,clearcoatNormalMap:pt,clearcoatRoughnessMap:Ne,dispersion:Te,iridescence:Se,iridescenceMap:Ke,iridescenceThicknessMap:xt,sheen:be,sheenColorMap:tt,sheenRoughnessMap:Ue,specularMap:_t,specularColorMap:Ct,specularIntensityMap:Mt,transmission:st,transmissionMap:ee,thicknessMap:Qe,gradientMap:se,opaque:C.transparent===!1&&C.blending===Ja&&C.alphaToCoverage===!1,alphaMap:Ie,alphaTest:je,alphaHash:Tt,combine:C.combine,mapUv:it&&_(C.map.channel),aoMapUv:le&&_(C.aoMap.channel),lightMapUv:Me&&_(C.lightMap.channel),bumpMapUv:xe&&_(C.bumpMap.channel),normalMapUv:we&&_(C.normalMap.channel),displacementMapUv:Oe&&_(C.displacementMap.channel),emissiveMapUv:Je&&_(C.emissiveMap.channel),metalnessMapUv:ke&&_(C.metalnessMap.channel),roughnessMapUv:G&&_(C.roughnessMap.channel),anisotropyMapUv:Le&&_(C.anisotropyMap.channel),clearcoatMapUv:Ve&&_(C.clearcoatMap.channel),clearcoatNormalMapUv:pt&&_(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ne&&_(C.clearcoatRoughnessMap.channel),iridescenceMapUv:Ke&&_(C.iridescenceMap.channel),iridescenceThicknessMapUv:xt&&_(C.iridescenceThicknessMap.channel),sheenColorMapUv:tt&&_(C.sheenColorMap.channel),sheenRoughnessMapUv:Ue&&_(C.sheenRoughnessMap.channel),specularMapUv:_t&&_(C.specularMap.channel),specularColorMapUv:Ct&&_(C.specularColorMap.channel),specularIntensityMapUv:Mt&&_(C.specularIntensityMap.channel),transmissionMapUv:ee&&_(C.transmissionMap.channel),thicknessMapUv:Qe&&_(C.thicknessMap.channel),alphaMapUv:Ie&&_(C.alphaMap.channel),vertexTangents:!!re.attributes.tangent&&(we||O),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!re.attributes.color&&re.attributes.color.itemSize===4,pointsUvs:Y.isPoints===!0&&!!re.attributes.uv&&(it||Ie),fog:!!q,useFog:C.fog===!0,fogExp2:!!q&&q.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:Y.isSkinnedMesh===!0,morphTargets:re.morphAttributes.position!==void 0,morphNormals:re.morphAttributes.normal!==void 0,morphColors:re.morphAttributes.color!==void 0,morphTargetsCount:ce,morphTextureStride:_e,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:i.shadowMap.enabled&&N.length>0,shadowMapType:i.shadowMap.type,toneMapping:mn,decodeVideoTexture:it&&C.map.isVideoTexture===!0&&ln.getTransfer(C.map.colorSpace)===vn,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===fs,flipSided:C.side===Mi,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionClipCullDistance:Wt&&C.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Wt&&C.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()};return zn.vertexUv1s=u.has(1),zn.vertexUv2s=u.has(2),zn.vertexUv3s=u.has(3),u.clear(),zn}function g(C){const b=[];if(C.shaderID?b.push(C.shaderID):(b.push(C.customVertexShaderID),b.push(C.customFragmentShaderID)),C.defines!==void 0)for(const N in C.defines)b.push(N),b.push(C.defines[N]);return C.isRawShaderMaterial===!1&&(A(b,C),S(b,C),b.push(i.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 S(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.skinning&&a.enable(4),b.morphTargets&&a.enable(5),b.morphNormals&&a.enable(6),b.morphColors&&a.enable(7),b.premultipliedAlpha&&a.enable(8),b.shadowMapEnabled&&a.enable(9),b.doubleSided&&a.enable(10),b.flipSided&&a.enable(11),b.useDepthPacking&&a.enable(12),b.dithering&&a.enable(13),b.transmission&&a.enable(14),b.sheen&&a.enable(15),b.opaque&&a.enable(16),b.pointsUvs&&a.enable(17),b.decodeVideoTexture&&a.enable(18),b.alphaToCoverage&&a.enable(19),C.push(a.mask)}function w(C){const b=v[C.type];let N;if(b){const j=Os[b];N=VS.clone(j.uniforms)}else N=C.uniforms;return N}function P(C,b){let N;for(let j=0,Y=f.length;j<Y;j++){const q=f[j];if(q.cacheKey===b){N=q,++N.usedTimes;break}}return N===void 0&&(N=new C6(i,b,C,s),f.push(N)),N}function T(C){if(--C.usedTimes===0){const b=f.indexOf(C);f[b]=f[f.length-1],f.pop(),C.destroy()}}function I(C){l.remove(C)}function D(){l.dispose()}return{getParameters:y,getProgramCacheKey:g,getUniforms:w,acquireProgram:P,releaseProgram:T,releaseShaderCache:I,programs:f,dispose:D}}function I6(){let i=new WeakMap;function e(s){let o=i.get(s);return o===void 0&&(o={},i.set(s,o)),o}function t(s){i.delete(s)}function n(s,o,a){i.get(s)[o]=a}function r(){i=new WeakMap}return{get:e,remove:t,update:n,dispose:r}}function B6(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.material.id!==e.material.id?i.material.id-e.material.id:i.z!==e.z?i.z-e.z:i.id-e.id}function xT(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.z!==e.z?e.z-i.z:i.id-e.id}function AT(){const i=[];let e=0;const t=[],n=[],r=[];function s(){e=0,t.length=0,n.length=0,r.length=0}function o(h,p,m,v,_,y){let g=i[e];return g===void 0?(g={id:h.id,object:h,geometry:p,material:m,groupOrder:v,renderOrder:h.renderOrder,z:_,group:y},i[e]=g):(g.id=h.id,g.object=h,g.geometry=p,g.material=m,g.groupOrder=v,g.renderOrder=h.renderOrder,g.z=_,g.group=y),e++,g}function a(h,p,m,v,_,y){const g=o(h,p,m,v,_,y);m.transmission>0?n.push(g):m.transparent===!0?r.push(g):t.push(g)}function l(h,p,m,v,_,y){const g=o(h,p,m,v,_,y);m.transmission>0?n.unshift(g):m.transparent===!0?r.unshift(g):t.unshift(g)}function u(h,p){t.length>1&&t.sort(h||B6),n.length>1&&n.sort(p||xT),r.length>1&&r.sort(p||xT)}function f(){for(let h=e,p=i.length;h<p;h++){const m=i[h];if(m.id===null)break;m.id=null,m.object=null,m.geometry=null,m.material=null,m.group=null}}return{opaque:t,transmissive:n,transparent:r,init:s,push:a,unshift:l,finish:f,sort:u}}function D6(){let i=new WeakMap;function e(n,r){const s=i.get(n);let o;return s===void 0?(o=new AT,i.set(n,[o])):r>=s.length?(o=new AT,s.push(o)):o=s[r],o}function t(){i=new WeakMap}return{get:e,dispose:t}}function F6(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new H,color:new He};break;case"SpotLight":t={position:new H,direction:new H,color:new He,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new H,color:new He,distance:0,decay:0};break;case"HemisphereLight":t={direction:new H,skyColor:new He,groundColor:new He};break;case"RectAreaLight":t={color:new He,position:new H,halfWidth:new H,halfHeight:new H};break}return i[e.id]=t,t}}}function L6(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Re};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Re};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Re,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}let N6=0;function O6(i,e){return(e.castShadow?2:0)-(i.castShadow?2:0)+(e.map?1:0)-(i.map?1:0)}function U6(i){const e=new F6,t=L6(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)n.probe.push(new H);const r=new H,s=new mt,o=new mt;function a(u){let f=0,h=0,p=0;for(let C=0;C<9;C++)n.probe[C].set(0,0,0);let m=0,v=0,_=0,y=0,g=0,A=0,S=0,w=0,P=0,T=0,I=0;u.sort(O6);for(let C=0,b=u.length;C<b;C++){const N=u[C],j=N.color,Y=N.intensity,q=N.distance,re=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)f+=j.r*Y,h+=j.g*Y,p+=j.b*Y;else if(N.isLightProbe){for(let Q=0;Q<9;Q++)n.probe[Q].addScaledVector(N.sh.coefficients[Q],Y);I++}else if(N.isDirectionalLight){const Q=e.get(N);if(Q.color.copy(N.color).multiplyScalar(N.intensity),N.castShadow){const pe=N.shadow,k=t.get(N);k.shadowBias=pe.bias,k.shadowNormalBias=pe.normalBias,k.shadowRadius=pe.radius,k.shadowMapSize=pe.mapSize,n.directionalShadow[m]=k,n.directionalShadowMap[m]=re,n.directionalShadowMatrix[m]=N.shadow.matrix,A++}n.directional[m]=Q,m++}else if(N.isSpotLight){const Q=e.get(N);Q.position.setFromMatrixPosition(N.matrixWorld),Q.color.copy(j).multiplyScalar(Y),Q.distance=q,Q.coneCos=Math.cos(N.angle),Q.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),Q.decay=N.decay,n.spot[_]=Q;const pe=N.shadow;if(N.map&&(n.spotLightMap[P]=N.map,P++,pe.updateMatrices(N),N.castShadow&&T++),n.spotLightMatrix[_]=pe.matrix,N.castShadow){const k=t.get(N);k.shadowBias=pe.bias,k.shadowNormalBias=pe.normalBias,k.shadowRadius=pe.radius,k.shadowMapSize=pe.mapSize,n.spotShadow[_]=k,n.spotShadowMap[_]=re,w++}_++}else if(N.isRectAreaLight){const Q=e.get(N);Q.color.copy(j).multiplyScalar(Y),Q.halfWidth.set(N.width*.5,0,0),Q.halfHeight.set(0,N.height*.5,0),n.rectArea[y]=Q,y++}else if(N.isPointLight){const Q=e.get(N);if(Q.color.copy(N.color).multiplyScalar(N.intensity),Q.distance=N.distance,Q.decay=N.decay,N.castShadow){const pe=N.shadow,k=t.get(N);k.shadowBias=pe.bias,k.shadowNormalBias=pe.normalBias,k.shadowRadius=pe.radius,k.shadowMapSize=pe.mapSize,k.shadowCameraNear=pe.camera.near,k.shadowCameraFar=pe.camera.far,n.pointShadow[v]=k,n.pointShadowMap[v]=re,n.pointShadowMatrix[v]=N.shadow.matrix,S++}n.point[v]=Q,v++}else if(N.isHemisphereLight){const Q=e.get(N);Q.skyColor.copy(N.color).multiplyScalar(Y),Q.groundColor.copy(N.groundColor).multiplyScalar(Y),n.hemi[g]=Q,g++}}y>0&&(i.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ze.LTC_FLOAT_1,n.rectAreaLTC2=Ze.LTC_FLOAT_2):(n.rectAreaLTC1=Ze.LTC_HALF_1,n.rectAreaLTC2=Ze.LTC_HALF_2)),n.ambient[0]=f,n.ambient[1]=h,n.ambient[2]=p;const D=n.hash;(D.directionalLength!==m||D.pointLength!==v||D.spotLength!==_||D.rectAreaLength!==y||D.hemiLength!==g||D.numDirectionalShadows!==A||D.numPointShadows!==S||D.numSpotShadows!==w||D.numSpotMaps!==P||D.numLightProbes!==I)&&(n.directional.length=m,n.spot.length=_,n.rectArea.length=y,n.point.length=v,n.hemi.length=g,n.directionalShadow.length=A,n.directionalShadowMap.length=A,n.pointShadow.length=S,n.pointShadowMap.length=S,n.spotShadow.length=w,n.spotShadowMap.length=w,n.directionalShadowMatrix.length=A,n.pointShadowMatrix.length=S,n.spotLightMatrix.length=w+P-T,n.spotLightMap.length=P,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=I,D.directionalLength=m,D.pointLength=v,D.spotLength=_,D.rectAreaLength=y,D.hemiLength=g,D.numDirectionalShadows=A,D.numPointShadows=S,D.numSpotShadows=w,D.numSpotMaps=P,D.numLightProbes=I,n.version=N6++)}function l(u,f){let h=0,p=0,m=0,v=0,_=0;const y=f.matrixWorldInverse;for(let g=0,A=u.length;g<A;g++){const S=u[g];if(S.isDirectionalLight){const w=n.directional[h];w.direction.setFromMatrixPosition(S.matrixWorld),r.setFromMatrixPosition(S.target.matrixWorld),w.direction.sub(r),w.direction.transformDirection(y),h++}else if(S.isSpotLight){const w=n.spot[m];w.position.setFromMatrixPosition(S.matrixWorld),w.position.applyMatrix4(y),w.direction.setFromMatrixPosition(S.matrixWorld),r.setFromMatrixPosition(S.target.matrixWorld),w.direction.sub(r),w.direction.transformDirection(y),m++}else if(S.isRectAreaLight){const w=n.rectArea[v];w.position.setFromMatrixPosition(S.matrixWorld),w.position.applyMatrix4(y),o.identity(),s.copy(S.matrixWorld),s.premultiply(y),o.extractRotation(s),w.halfWidth.set(S.width*.5,0,0),w.halfHeight.set(0,S.height*.5,0),w.halfWidth.applyMatrix4(o),w.halfHeight.applyMatrix4(o),v++}else if(S.isPointLight){const w=n.point[p];w.position.setFromMatrixPosition(S.matrixWorld),w.position.applyMatrix4(y),p++}else if(S.isHemisphereLight){const w=n.hemi[_];w.direction.setFromMatrixPosition(S.matrixWorld),w.direction.transformDirection(y),_++}}}return{setup:a,setupView:l,state:n}}function ST(i){const e=new U6(i),t=[],n=[];function r(f){u.camera=f,t.length=0,n.length=0}function s(f){t.push(f)}function o(f){n.push(f)}function a(){e.setup(t)}function l(f){e.setupView(t,f)}const u={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:r,state:u,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function z6(i){let e=new WeakMap;function t(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new ST(i),e.set(r,[a])):s>=o.length?(a=new ST(i),o.push(a)):a=o[s],a}function n(){e=new WeakMap}return{get:t,dispose:n}}class JS extends Qn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=wb,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 jS extends Qn{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 k6=`void main() { 3783 gl_Position = vec4( position, 1.0 ); 3784}`,G6=`uniform sampler2D shadow_pass; 3785uniform vec2 resolution; 3786uniform float radius; 3787#include <packing> 3788void main() {
3789 const float samples = float( VSM_SAMPLES ); 3790 float mean = 0.0; 3791 float squared_mean = 0.0; 3792 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 3793 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 3794 for ( float i = 0.0; i < samples; i ++ ) { 3795 float uvOffset = uvStart + i * uvStride; 3796 #ifdef HORIZONTAL_PASS 3797 vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); 3798 mean += distribution.x; 3799 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 3800 #else 3801 float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); 3802 mean += depth; 3803 squared_mean += depth * depth; 3804 #endif 3805 } 3806 mean = mean / samples; 3807 squared_mean = squared_mean / samples; 3808 float std_dev = sqrt( squared_mean - mean * mean ); 3809 gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); 3810}`;function H6(i,e,t){let n=new sp;const r=new Re,s=new Re,o=new cn,a=new JS({depthPacking:Mb}),l=new jS,u={},f=t.maxTextureSize,h={[xs]:Mi,[Mi]:xs,[fs]:fs},p=new ur({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Re},radius:{value:4}},vertexShader:k6,fragmentShader:G6}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const v=new Bt;v.setAttribute("position",new $t(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Mn(v,p),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=ov;let g=this.type;this.render=function(T,I,D){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||T.length===0)return;const C=i.getRenderTarget(),b=i.getActiveCubeFace(),N=i.getActiveMipmapLevel(),j=i.state;j.setBlending(ho),j.buffers.color.setClear(1,1,1,1),j.buffers.depth.setTest(!0),j.setScissorTest(!1);const Y=g!==Fs&&this.type===Fs,q=g===Fs&&this.type!==Fs;for(let re=0,Q=T.length;re<Q;re++){const pe=T[re],k=pe.shadow;if(k===void 0){console.warn("THREE.WebGLShadowMap:",pe,"has no shadow.");continue}if(k.autoUpdate===!1&&k.needsUpdate===!1)continue;r.copy(k.mapSize);const ne=k.getFrameExtents();if(r.multiply(ne),s.copy(k.mapSize),(r.x>f||r.y>f)&&(r.x>f&&(s.x=Math.floor(f/ne.x),r.x=s.x*ne.x,k.mapSize.x=s.x),r.y>f&&(s.y=Math.floor(f/ne.y),r.y=s.y*ne.y,k.mapSize.y=s.y)),k.map===null||Y===!0||q===!0){const ce=this.type!==Fs?{minFilter:li,magFilter:li}:{};k.map!==null&&k.map.dispose(),k.map=new Tr(r.x,r.y,ce),k.map.texture.name=pe.name+".shadowMap",k.camera.updateProjectionMatrix()}i.setRenderTarget(k.map),i.clear();const te=k.getViewportCount();for(let ce=0;ce<te;ce++){const _e=k.getViewport(ce);o.set(s.x*_e.x,s.y*_e.y,s.x*_e.z,s.y*_e.w),j.viewport(o),k.updateMatrices(pe,ce),n=k.getFrustum(),w(I,D,k.camera,pe,this.type)}k.isPointLightShadow!==!0&&this.type===Fs&&A(k,D),k.needsUpdate=!1}g=this.type,y.needsUpdate=!1,i.setRenderTarget(C,b,N)};function A(T,I){const D=e.update(_);p.defines.VSM_SAMPLES!==T.blurSamples&&(p.defines.VSM_SAMPLES=T.blurSamples,m.defines.VSM_SAMPLES=T.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Tr(r.x,r.y)),p.uniforms.shadow_pass.value=T.map.texture,p.uniforms.resolution.value=T.mapSize,p.uniforms.radius.value=T.radius,i.setRenderTarget(T.mapPass),i.clear(),i.renderBufferDirect(I,null,D,p,_,null),m.uniforms.shadow_pass.value=T.mapPass.texture,m.uniforms.resolution.value=T.mapSize,m.uniforms.radius.value=T.radius,i.setRenderTarget(T.map),i.clear(),i.renderBufferDirect(I,null,D,m,_,null)}function S(T,I,D,C){let b=null;const N=D.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(N!==void 0)b=N;else if(b=D.isPointLight===!0?l:a,i.localClippingEnabled&&I.clipShadows===!0&&Array.isArray(I.clippingPlanes)&&I.clippingPlanes.length!==0||I.displacementMap&&I.displacementScale!==0||I.alphaMap&&I.alphaTest>0||I.map&&I.alphaTest>0){const j=b.uuid,Y=I.uuid;let q=u[j];q===void 0&&(q={},u[j]=q);let re=q[Y];re===void 0&&(re=b.clone(),q[Y]=re,I.addEventListener("dispose",P)),b=re}if(b.visible=I.visible,b.wireframe=I.wireframe,C===Fs?b.side=I.shadowSide!==null?I.shadowSide:I.side:b.side=I.shadowSide!==null?I.shadowSide:h[I.side],b.alphaMap=I.alphaMap,b.alphaTest=I.alphaTest,b.map=I.map,b.clipSh
vendor: 10,233 bytes, line 3810
3810adows=I.clipShadows,b.clippingPlanes=I.clippingPlanes,b.clipIntersection=I.clipIntersection,b.displacementMap=I.displacementMap,b.displacementScale=I.displacementScale,b.displacementBias=I.displacementBias,b.wireframeLinewidth=I.wireframeLinewidth,b.linewidth=I.linewidth,D.isPointLight===!0&&b.isMeshDistanceMaterial===!0){const j=i.properties.get(b);j.light=D}return b}function w(T,I,D,C,b){if(T.visible===!1)return;if(T.layers.test(I.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&b===Fs)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,T.matrixWorld);const Y=e.update(T),q=T.material;if(Array.isArray(q)){const re=Y.groups;for(let Q=0,pe=re.length;Q<pe;Q++){const k=re[Q],ne=q[k.materialIndex];if(ne&&ne.visible){const te=S(T,ne,C,b);T.onBeforeShadow(i,T,I,D,Y,te,k),i.renderBufferDirect(D,null,Y,te,T,k),T.onAfterShadow(i,T,I,D,Y,te,k)}}}else if(q.visible){const re=S(T,q,C,b);T.onBeforeShadow(i,T,I,D,Y,re,null),i.renderBufferDirect(D,null,Y,re,T,null),T.onAfterShadow(i,T,I,D,Y,re,null)}}const j=T.children;for(let Y=0,q=j.length;Y<q;Y++)w(j[Y],I,D,C,b)}function P(T){T.target.removeEventListener("dispose",P);for(const D in u){const C=u[D],b=T.target.uuid;b in C&&(C[b].dispose(),delete C[b])}}}function V6(i){function e(){let ee=!1;const Qe=new cn;let se=null;const Ie=new cn(0,0,0,0);return{setMask:function(je){se!==je&&!ee&&(i.colorMask(je,je,je,je),se=je)},setLocked:function(je){ee=je},setClear:function(je,Tt,Wt,mn,zn){zn===!0&&(je*=mn,Tt*=mn,Wt*=mn),Qe.set(je,Tt,Wt,mn),Ie.equals(Qe)===!1&&(i.clearColor(je,Tt,Wt,mn),Ie.copy(Qe))},reset:function(){ee=!1,se=null,Ie.set(-1,0,0,0)}}}function t(){let ee=!1,Qe=null,se=null,Ie=null;return{setTest:function(je){je?Ce(i.DEPTH_TEST):De(i.DEPTH_TEST)},setMask:function(je){Qe!==je&&!ee&&(i.depthMask(je),Qe=je)},setFunc:function(je){if(se!==je){switch(je){case qP:i.depthFunc(i.NEVER);break;case ZP:i.depthFunc(i.ALWAYS);break;case $P:i.depthFunc(i.LESS);break;case Ch:i.depthFunc(i.LEQUAL);break;case eb:i.depthFunc(i.EQUAL);break;case tb:i.depthFunc(i.GEQUAL);break;case nb:i.depthFunc(i.GREATER);break;case ib:i.depthFunc(i.NOTEQUAL);break;default:i.depthFunc(i.LEQUAL)}se=je}},setLocked:function(je){ee=je},setClear:function(je){Ie!==je&&(i.clearDepth(je),Ie=je)},reset:function(){ee=!1,Qe=null,se=null,Ie=null}}}function n(){let ee=!1,Qe=null,se=null,Ie=null,je=null,Tt=null,Wt=null,mn=null,zn=null;return{setTest:function(en){ee||(en?Ce(i.STENCIL_TEST):De(i.STENCIL_TEST))},setMask:function(en){Qe!==en&&!ee&&(i.stencilMask(en),Qe=en)},setFunc:function(en,Zi,$i){(se!==en||Ie!==Zi||je!==$i)&&(i.stencilFunc(en,Zi,$i),se=en,Ie=Zi,je=$i)},setOp:function(en,Zi,$i){(Tt!==en||Wt!==Zi||mn!==$i)&&(i.stencilOp(en,Zi,$i),Tt=en,Wt=Zi,mn=$i)},setLocked:function(en){ee=en},setClear:function(en){zn!==en&&(i.clearStencil(en),zn=en)},reset:function(){ee=!1,Qe=null,se=null,Ie=null,je=null,Tt=null,Wt=null,mn=null,zn=null}}}const r=new e,s=new t,o=new n,a=new WeakMap,l=new WeakMap;let u={},f={},h=new WeakMap,p=[],m=null,v=!1,_=null,y=null,g=null,A=null,S=null,w=null,P=null,T=new He(0,0,0),I=0,D=!1,C=null,b=null,N=null,j=null,Y=null;const q=i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let re=!1,Q=0;const pe=i.getParameter(i.VERSION);pe.indexOf("WebGL")!==-1?(Q=parseFloat(/^WebGL (\d)/.exec(pe)[1]),re=Q>=1):pe.indexOf("OpenGL ES")!==-1&&(Q=parseFloat(/^OpenGL ES (\d)/.exec(pe)[1]),re=Q>=2);let k=null,ne={};const te=i.getParameter(i.SCISSOR_BOX),ce=i.getParameter(i.VIEWPORT),_e=new cn().fromArray(te),Fe=new cn().fromArray(ce);function ue(ee,Qe,se,Ie){const je=new Uint8Array(4),Tt=i.createTexture();i.bindTexture(ee,Tt),i.texParameteri(ee,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(ee,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Wt=0;Wt<se;Wt++)ee===i.TEXTURE_3D||ee===i.TEXTURE_2D_ARRAY?i.texImage3D(Qe,0,i.RGBA,1,1,Ie,0,i.RGBA,i.UNSIGNED_BYTE,je):i.texImage2D(Qe+Wt,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,je);return Tt}const Ee={};Ee[i.TEXTURE_2D]=ue(i.TEXTURE_2D,i.TEXTURE_2D,1),Ee[i.TEXTURE_CUBE_MAP]=ue(i.TEXTURE_CUBE_MAP,i.TEXTURE_CUBE_MAP_POSITIVE_X,6),Ee[i.TEXTURE_2D_ARRAY]=ue(i.TEXTURE_2D_ARRAY,i.TEXTURE_2D_ARRAY,1,1),Ee[i.TEXTURE_3D]=ue(i.TEXTURE_3D,i.TEXTURE_3D,1,1),r.setClear(0,0,0,1),s.setClear(1),o.setClear(0),Ce(i.DEPTH_TEST),s.setFunc(Ch),xe(!1),we(Ex),Ce(i.CULL_FACE),le(ho);function Ce(ee){u[ee]!==!0&&(i.enable(ee),u[ee]=!0)}function De(ee){u[ee]!==!1&&(i.disable(ee),u[ee]=!1)}function dt(ee,Qe){return f[ee]!==Qe?(i.bindFramebuffer(ee,Qe),f[ee]=Qe,ee===i.DRAW_FRAMEBUFFER&&(f[i.FRAMEBUFFER]=Qe),ee===i.FRAMEBUFFER&&(f[i.DRAW_FRAMEBUFFER]=Qe),!0):!1}function At(ee,Qe){let se=p,Ie=!1;if(ee){se=h.get(Qe),se===void 0&&(se=[],h.set(Qe,se));const je=ee.textures;if(se.length!==je.length||se[0]!==i.COLOR_ATTACHMENT0){for(let Tt=0,Wt=je.length;Tt<Wt;Tt++)se[Tt]=i.COLOR_ATTACHMENT0+Tt;se.length=je.length,Ie=!0}}else se[0]!==i.BACK&&(se[0]=i.BACK,Ie=!0);Ie&&i.drawBuffers(se)}function it(ee){return m!==ee?(i.useProgram(ee),m=ee,!0):!1}const Z={[Pa]:i.FUNC_ADD,[FP]:i.FUNC_SUBTRACT,[LP]:i.FUNC_REVERSE_SUBTRACT};Z[NP]=i.MIN,Z[OP]=i.MAX;const Pe={[UP]:i.ZERO,[zP]:i.ONE,[kP]:i.SRC_COLOR,[bg]:i.SRC_ALPHA,[JP]:i.SRC_ALPHA_SATURATE,[WP]:i.DST_COLOR,[HP]:i.DST_ALPHA,[GP]:i.ONE_MINUS_SRC_COLOR,[Ig]:i.ONE_MINUS_SRC_ALPHA,[XP]:i.ONE_MINUS_DST_COLOR,[VP]:i.ONE_MINUS_DST_ALPHA,[jP]:i.CONSTANT_COLOR,[YP]:i.ONE_MINUS_CONSTANT_COLOR,[KP]:i.CONSTANT_ALPHA,[QP]:i.ONE_MINUS_CONSTANT_ALPHA};function le(ee,Qe,se,Ie,je,Tt,Wt,mn,zn,en){if(ee===ho){v===!0&&(De(i.BLEND),v=!1);return}if(v===!1&&(Ce(i.BLEND),v=!0),ee!==DP){if(ee!==_||en!==D){if((y!==Pa||S!==Pa)&&(i.blendEquation(i.FUNC_ADD),y=Pa,S=Pa),en)switch(ee){case Ja:i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case pf:i.blendFunc(i.ONE,i.ONE);break;case wx:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Mx:i.blendFuncSeparate(i.ZERO,i.SRC_COLOR,i.ZERO,i.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",ee);break}else switch(ee){case Ja:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case pf:i.blendFunc(i.SRC_ALPHA,i.ONE);break;case wx:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Mx:i.blendFunc(i.ZERO,i.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",ee);break}g=null,A=null,w=null,P=null,T.set(0,0,0),I=0,_=ee,D=en}return}je=je||Qe,Tt=Tt||se,Wt=Wt||Ie,(Qe!==y||je!==S)&&(i.blendEquationSeparate(Z[Qe],Z[je]),y=Qe,S=je),(se!==g||Ie!==A||Tt!==w||Wt!==P)&&(i.blendFuncSeparate(Pe[se],Pe[Ie],Pe[Tt],Pe[Wt]),g=se,A=Ie,w=Tt,P=Wt),(mn.equals(T)===!1||zn!==I)&&(i.blendColor(mn.r,mn.g,mn.b,zn),T.copy(mn),I=zn),_=ee,D=!1}function Me(ee,Qe){ee.side===fs?De(i.CULL_FACE):Ce(i.CULL_FACE);let se=ee.side===Mi;Qe&&(se=!se),xe(se),ee.blending===Ja&&ee.transparent===!1?le(ho):le(ee.blending,ee.blendEquation,ee.blendSrc,ee.blendDst,ee.blendEquationAlpha,ee.blendSrcAlpha,ee.blendDstAlpha,ee.blendColor,ee.blendAlpha,ee.premultipliedAlpha),s.setFunc(ee.depthFunc),s.setTest(ee.depthTest),s.setMask(ee.depthWrite),r.setMask(ee.colorWrite);const Ie=ee.stencilWrite;o.setTest(Ie),Ie&&(o.setMask(ee.stencilWriteMask),o.setFunc(ee.stencilFunc,ee.stencilRef,ee.stencilFuncMask),o.setOp(ee.stencilFail,ee.stencilZFail,ee.stencilZPass)),Je(ee.polygonOffset,ee.polygonOffsetFactor,ee.polygonOffsetUnits),ee.alphaToCoverage===!0?Ce(i.SAMPLE_ALPHA_TO_COVERAGE):De(i.SAMPLE_ALPHA_TO_COVERAGE)}function xe(ee){C!==ee&&(ee?i.frontFace(i.CW):i.frontFace(i.CCW),C=ee)}function we(ee){ee!==bP?(Ce(i.CULL_FACE),ee!==b&&(ee===Ex?i.cullFace(i.BACK):ee===IP?i.cullFace(i.FRONT):i.cullFace(i.FRONT_AND_BACK))):De(i.CULL_FACE),b=ee}function Oe(ee){ee!==N&&(re&&i.lineWidth(ee),N=ee)}function Je(ee,Qe,se){ee?(Ce(i.POLYGON_OFFSET_FILL),(j!==Qe||Y!==se)&&(i.polygonOffset(Qe,se),j=Qe,Y=se)):De(i.POLYGON_OFFSET_FILL)}function ke(ee){ee?Ce(i.SCISSOR_TEST):De(i.SCISSOR_TEST)}function G(ee){ee===void 0&&(ee=i.TEXTURE0+q-1),k!==ee&&(i.activeTexture(ee),k=ee)}function O(ee,Qe,se){se===void 0&&(k===null?se=i.TEXTURE0+q-1:se=k);let Ie=ne[se];Ie===void 0&&(Ie={type:void 0,texture:void 0},ne[se]=Ie),(Ie.type!==ee||Ie.texture!==Qe)&&(k!==se&&(i.activeTexture(se),k=se),i.bindTexture(ee,Qe||Ee[ee]),Ie.type=ee,Ie.texture=Qe)}function fe(){const ee=ne[k];ee!==void 0&&ee.type!==void 0&&(i.bindTexture(ee.type,null),ee.type=void 0,ee.texture=void 0)}function Te(){try{i.compressedTexImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Se(){try{i.compressedTexImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function be(){try{i.texSubImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function st(){try{i.texSubImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Le(){try{i.compressedTexSubImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Ve(){try{i.compressedTexSubImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function pt(){try{i.texStorage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Ne(){try{i.texStorage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Ke(){try{i.texImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function xt(){try{i.texImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function tt(ee){_e.equals(ee)===!1&&(i.scissor(ee.x,ee.y,ee.z,ee.w),_e.copy(ee))}function Ue(ee){Fe.equals(ee)===!1&&(i.viewport(ee.x,ee.y,ee.z,ee.w),Fe.copy(ee))}function _t(ee,Qe){let se=l.get(Qe);se===void 0&&(se=new WeakMap,l.set(Qe,se));let Ie=se.get(ee);Ie===void 0&&(Ie=i.getUniformBlockIndex(Qe,ee.name),se.set(ee,Ie))}function Ct(ee,Qe){const Ie=l.get(Qe).get(ee);a.get(Qe)!==Ie&&(i.uniformBlockBinding(Qe,Ie,ee.__bindingPointIndex),a.set(Qe,Ie))}function Mt(){i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.DEPTH_TEST),i.disable(i.POLYGON_OFFSET_FILL),i.disable(i.SCISSOR_TEST),i.disable(i.STENCIL_TEST),i.disable(i.SAMPLE_ALPHA_TO_COVERAGE),i.blendEquation(i.FUNC_ADD),i.blendFunc(i.ONE,i.ZERO),i.blendFuncSeparate(i.ONE,i.ZERO,i.ONE,i.ZERO),i.blendColor
vendor: 5,096 bytes, line 3810
3810(0,0,0,0),i.colorMask(!0,!0,!0,!0),i.clearColor(0,0,0,0),i.depthMask(!0),i.depthFunc(i.LESS),i.clearDepth(1),i.stencilMask(4294967295),i.stencilFunc(i.ALWAYS,0,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),i.clearStencil(0),i.cullFace(i.BACK),i.frontFace(i.CCW),i.polygonOffset(0,0),i.activeTexture(i.TEXTURE0),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.useProgram(null),i.lineWidth(1),i.scissor(0,0,i.canvas.width,i.canvas.height),i.viewport(0,0,i.canvas.width,i.canvas.height),u={},k=null,ne={},f={},h=new WeakMap,p=[],m=null,v=!1,_=null,y=null,g=null,A=null,S=null,w=null,P=null,T=new He(0,0,0),I=0,D=!1,C=null,b=null,N=null,j=null,Y=null,_e.set(0,0,i.canvas.width,i.canvas.height),Fe.set(0,0,i.canvas.width,i.canvas.height),r.reset(),s.reset(),o.reset()}return{buffers:{color:r,depth:s,stencil:o},enable:Ce,disable:De,bindFramebuffer:dt,drawBuffers:At,useProgram:it,setBlending:le,setMaterial:Me,setFlipSided:xe,setCullFace:we,setLineWidth:Oe,setPolygonOffset:Je,setScissorTest:ke,activeTexture:G,bindTexture:O,unbindTexture:fe,compressedTexImage2D:Te,compressedTexImage3D:Se,texImage2D:Ke,texImage3D:xt,updateUBOMapping:_t,uniformBlockBinding:Ct,texStorage2D:pt,texStorage3D:Ne,texSubImage2D:be,texSubImage3D:st,compressedTexSubImage2D:Le,compressedTexSubImage3D:Ve,scissor:tt,viewport:Ue,reset:Mt}}function W6(i,e,t,n,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),u=new Re,f=new WeakMap;let h;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(G,O){return m?new OffscreenCanvas(G,O):Lh("canvas")}function _(G,O,fe){let Te=1;const Se=ke(G);if((Se.width>fe||Se.height>fe)&&(Te=fe/Math.max(Se.width,Se.height)),Te<1)if(typeof HTMLImageElement<"u"&&G instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&G instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&G instanceof ImageBitmap||typeof VideoFrame<"u"&&G instanceof VideoFrame){const be=Math.floor(Te*Se.width),st=Math.floor(Te*Se.height);h===void 0&&(h=v(be,st));const Le=O?v(be,st):h;return Le.width=be,Le.height=st,Le.getContext("2d").drawImage(G,0,0,be,st),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Se.width+"x"+Se.height+") to ("+be+"x"+st+")."),Le}else return"data"in G&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Se.width+"x"+Se.height+")."),G;return G}function y(G){return G.generateMipmaps&&G.minFilter!==li&&G.minFilter!==Qt}function g(G){i.generateMipmap(G)}function A(G,O,fe,Te,Se=!1){if(G!==null){if(i[G]!==void 0)return i[G];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+G+"'")}let be=O;if(O===i.RED&&(fe===i.FLOAT&&(be=i.R32F),fe===i.HALF_FLOAT&&(be=i.R16F),fe===i.UNSIGNED_BYTE&&(be=i.R8)),O===i.RED_INTEGER&&(fe===i.UNSIGNED_BYTE&&(be=i.R8UI),fe===i.UNSIGNED_SHORT&&(be=i.R16UI),fe===i.UNSIGNED_INT&&(be=i.R32UI),fe===i.BYTE&&(be=i.R8I),fe===i.SHORT&&(be=i.R16I),fe===i.INT&&(be=i.R32I)),O===i.RG&&(fe===i.FLOAT&&(be=i.RG32F),fe===i.HALF_FLOAT&&(be=i.RG16F),fe===i.UNSIGNED_BYTE&&(be=i.RG8)),O===i.RG_INTEGER&&(fe===i.UNSIGNED_BYTE&&(be=i.RG8UI),fe===i.UNSIGNED_SHORT&&(be=i.RG16UI),fe===i.UNSIGNED_INT&&(be=i.RG32UI),fe===i.BYTE&&(be=i.RG8I),fe===i.SHORT&&(be=i.RG16I),fe===i.INT&&(be=i.RG32I)),O===i.RGB&&fe===i.UNSIGNED_INT_5_9_9_9_REV&&(be=i.RGB9_E5),O===i.RGBA){const st=Se?bh:ln.getTransfer(Te);fe===i.FLOAT&&(be=i.RGBA32F),fe===i.HALF_FLOAT&&(be=i.RGBA16F),fe===i.UNSIGNED_BYTE&&(be=st===vn?i.SRGB8_ALPHA8:i.RGBA8),fe===i.UNSIGNED_SHORT_4_4_4_4&&(be=i.RGBA4),fe===i.UNSIGNED_SHORT_5_5_5_1&&(be=i.RGB5_A1)}return(be===i.R16F||be===i.R32F||be===i.RG16F||be===i.RG32F||be===i.RGBA16F||be===i.RGBA32F)&&e.get("EXT_color_buffer_float"),be}function S(G,O){let fe;return G?O===null||O===el||O===Au?fe=i.DEPTH24_STENCIL8:O===Nn?fe=i.DEPTH32F_STENCIL8:O===Rh&&(fe=i.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):O===null||O===el||O===Au?fe=i.DEPTH_COMPONENT24:O===Nn?fe=i.DEPTH_COMPONENT32F:O===Rh&&(fe=i.DEPTH_COMPONENT16),fe}function w(G,O){return y(G)===!0||G.isFramebufferTexture&&G.minFilter!==li&&G.minFilter!==Qt?Math.log2(Math.max(O.width,O.height))+1:G.mipmaps!==void 0&&G.mipmaps.length>0?G.mipmaps.length:G.isCompressedTexture&&Array.isArray(G.image)?O.mipmaps.length:1}function P(G){const O=G.target;O.removeEventListener("dispose",P),I(O),O.isVideoTexture&&f.delete(O)}function T(G){const O=G.target;O.removeEventListener("dispose",T),C(O)}function I(G){const O=n.get(G);if(O.__webglInit===void 0)return;const fe=G.source,Te=p.get(fe);if(Te){const Se=Te[O.__cacheKey];Se.usedTimes--,Se.usedTimes===0&&D(G),Object.keys(Te).length===0&&p.delete(fe)}n.remove(G)}function D(G){const O=n.get(G);i.deleteTexture(O.__webglTexture);const fe=G.source,Te=p.get(fe);delete Te[O.__cacheKey],o.memory.textures--}function C(G){const O=n.get(G);
vendor: 4,910 bytes, line 3810
3810if(G.depthTexture&&G.depthTexture.dispose(),G.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++){if(Array.isArray(O.__webglFramebuffer[Te]))for(let Se=0;Se<O.__webglFramebuffer[Te].length;Se++)i.deleteFramebuffer(O.__webglFramebuffer[Te][Se]);else i.deleteFramebuffer(O.__webglFramebuffer[Te]);O.__webglDepthbuffer&&i.deleteRenderbuffer(O.__webglDepthbuffer[Te])}else{if(Array.isArray(O.__webglFramebuffer))for(let Te=0;Te<O.__webglFramebuffer.length;Te++)i.deleteFramebuffer(O.__webglFramebuffer[Te]);else i.deleteFramebuffer(O.__webglFramebuffer);if(O.__webglDepthbuffer&&i.deleteRenderbuffer(O.__webglDepthbuffer),O.__webglMultisampledFramebuffer&&i.deleteFramebuffer(O.__webglMultisampledFramebuffer),O.__webglColorRenderbuffer)for(let Te=0;Te<O.__webglColorRenderbuffer.length;Te++)O.__webglColorRenderbuffer[Te]&&i.deleteRenderbuffer(O.__webglColorRenderbuffer[Te]);O.__webglDepthRenderbuffer&&i.deleteRenderbuffer(O.__webglDepthRenderbuffer)}const fe=G.textures;for(let Te=0,Se=fe.length;Te<Se;Te++){const be=n.get(fe[Te]);be.__webglTexture&&(i.deleteTexture(be.__webglTexture),o.memory.textures--),n.remove(fe[Te])}n.remove(G)}let b=0;function N(){b=0}function j(){const G=b;return G>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+G+" texture units while this GPU supports only "+r.maxTextures),b+=1,G}function Y(G){const O=[];return O.push(G.wrapS),O.push(G.wrapT),O.push(G.wrapR||0),O.push(G.magFilter),O.push(G.minFilter),O.push(G.anisotropy),O.push(G.internalFormat),O.push(G.format),O.push(G.type),O.push(G.generateMipmaps),O.push(G.premultiplyAlpha),O.push(G.flipY),O.push(G.unpackAlignment),O.push(G.colorSpace),O.join()}function q(G,O){const fe=n.get(G);if(G.isVideoTexture&&Oe(G),G.isRenderTargetTexture===!1&&G.version>0&&fe.__version!==G.version){const Te=G.image;if(Te===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Te.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Fe(fe,G,O);return}}t.bindTexture(i.TEXTURE_2D,fe.__webglTexture,i.TEXTURE0+O)}function re(G,O){const fe=n.get(G);if(G.version>0&&fe.__version!==G.version){Fe(fe,G,O);return}t.bindTexture(i.TEXTURE_2D_ARRAY,fe.__webglTexture,i.TEXTURE0+O)}function Q(G,O){const fe=n.get(G);if(G.version>0&&fe.__version!==G.version){Fe(fe,G,O);return}t.bindTexture(i.TEXTURE_3D,fe.__webglTexture,i.TEXTURE0+O)}function pe(G,O){const fe=n.get(G);if(G.version>0&&fe.__version!==G.version){ue(fe,G,O);return}t.bindTexture(i.TEXTURE_CUBE_MAP,fe.__webglTexture,i.TEXTURE0+O)}const k={[As]:i.REPEAT,[Kn]:i.CLAMP_TO_EDGE,[gf]:i.MIRRORED_REPEAT},ne={[li]:i.NEAREST,[av]:i.NEAREST_MIPMAP_NEAREST,[Ql]:i.NEAREST_MIPMAP_LINEAR,[Qt]:i.LINEAR,[ef]:i.LINEAR_MIPMAP_NEAREST,[ps]:i.LINEAR_MIPMAP_LINEAR},te={[Tb]:i.NEVER,[Db]:i.ALWAYS,[Rb]:i.LESS,[OS]:i.LEQUAL,[Pb]:i.EQUAL,[Bb]:i.GEQUAL,[bb]:i.GREATER,[Ib]:i.NOTEQUAL};function ce(G,O){if(O.type===Nn&&e.has("OES_texture_float_linear")===!1&&(O.magFilter===Qt||O.magFilter===ef||O.magFilter===Ql||O.magFilter===ps||O.minFilter===Qt||O.minFilter===ef||O.minFilter===Ql||O.minFilter===ps)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(G,i.TEXTURE_WRAP_S,k[O.wrapS]),i.texParameteri(G,i.TEXTURE_WRAP_T,k[O.wrapT]),(G===i.TEXTURE_3D||G===i.TEXTURE_2D_ARRAY)&&i.texParameteri(G,i.TEXTURE_WRAP_R,k[O.wrapR]),i.texParameteri(G,i.TEXTURE_MAG_FILTER,ne[O.magFilter]),i.texParameteri(G,i.TEXTURE_MIN_FILTER,ne[O.minFilter]),O.compareFunction&&(i.texParameteri(G,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(G,i.TEXTURE_COMPARE_FUNC,te[O.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(O.magFilter===li||O.minFilter!==Ql&&O.minFilter!==ps||O.type===Nn&&e.has("OES_texture_float_linear")===!1)return;if(O.anisotropy>1||n.get(O).__currentAnisotropy){const fe=e.get("EXT_texture_filter_anisotropic");i.texParameterf(G,fe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(O.anisotropy,r.getMaxAnisotropy())),n.get(O).__currentAnisotropy=O.anisotropy}}}function _e(G,O){let fe=!1;G.__webglInit===void 0&&(G.__webglInit=!0,O.addEventListener("dispose",P));const Te=O.source;let Se=p.get(Te);Se===void 0&&(Se={},p.set(Te,Se));const be=Y(O);if(be!==G.__cacheKey){Se[be]===void 0&&(Se[be]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,fe=!0),Se[be].usedTimes++;const st=Se[G.__cacheKey];st!==void 0&&(Se[G.__cacheKey].usedTimes--,st.usedTimes===0&&D(O)),G.__cacheKey=be,G.__webglTexture=Se[be].texture}return fe}function Fe(G,O,fe){let Te=i.TEXTURE_2D;(O.isDataArrayTexture||O.isCompressedArrayTexture)&&(Te=i.TEXTURE_2D_ARRAY),O.isData3DTexture&&(Te=i.TEXTURE_3D);const Se=_e(G,O),be=O.source;t.bindTexture(Te,G.__webglTexture,i.TEXTURE0+fe);const st=n.get(be);if(be.version!==st.__version||Se===!0){t.activeTexture(i.TEXTURE0+fe);
vendor: 4,743 bytes, line 3810
3810const Le=ln.getPrimaries(ln.workingColorSpace),Ve=O.colorSpace===zo?null:ln.getPrimaries(O.colorSpace),pt=O.colorSpace===zo||Le===Ve?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,O.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,O.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);let Ne=_(O.image,!1,r.maxTextureSize);Ne=Je(O,Ne);const Ke=s.convert(O.format,O.colorSpace),xt=s.convert(O.type);let tt=A(O.internalFormat,Ke,xt,O.colorSpace,O.isVideoTexture);ce(Te,O);let Ue;const _t=O.mipmaps,Ct=O.isVideoTexture!==!0,Mt=st.__version===void 0||Se===!0,ee=be.dataReady,Qe=w(O,Ne);if(O.isDepthTexture)tt=S(O.format===Su,O.type),Mt&&(Ct?t.texStorage2D(i.TEXTURE_2D,1,tt,Ne.width,Ne.height):t.texImage2D(i.TEXTURE_2D,0,tt,Ne.width,Ne.height,0,Ke,xt,null));else if(O.isDataTexture)if(_t.length>0){Ct&&Mt&&t.texStorage2D(i.TEXTURE_2D,Qe,tt,_t[0].width,_t[0].height);for(let se=0,Ie=_t.length;se<Ie;se++)Ue=_t[se],Ct?ee&&t.texSubImage2D(i.TEXTURE_2D,se,0,0,Ue.width,Ue.height,Ke,xt,Ue.data):t.texImage2D(i.TEXTURE_2D,se,tt,Ue.width,Ue.height,0,Ke,xt,Ue.data);O.generateMipmaps=!1}else Ct?(Mt&&t.texStorage2D(i.TEXTURE_2D,Qe,tt,Ne.width,Ne.height),ee&&t.texSubImage2D(i.TEXTURE_2D,0,0,0,Ne.width,Ne.height,Ke,xt,Ne.data)):t.texImage2D(i.TEXTURE_2D,0,tt,Ne.width,Ne.height,0,Ke,xt,Ne.data);else if(O.isCompressedTexture)if(O.isCompressedArrayTexture){Ct&&Mt&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Qe,tt,_t[0].width,_t[0].height,Ne.depth);for(let se=0,Ie=_t.length;se<Ie;se++)if(Ue=_t[se],O.format!==ii)if(Ke!==null)if(Ct){if(ee)if(O.layerUpdates.size>0){for(const je of O.layerUpdates){const Tt=Ue.width*Ue.height;t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,se,0,0,je,Ue.width,Ue.height,1,Ke,Ue.data.slice(Tt*je,Tt*(je+1)),0,0)}O.clearLayerUpdates()}else t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,se,0,0,0,Ue.width,Ue.height,Ne.depth,Ke,Ue.data,0,0)}else t.compressedTexImage3D(i.TEXTURE_2D_ARRAY,se,tt,Ue.width,Ue.height,Ne.depth,0,Ue.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Ct?ee&&t.texSubImage3D(i.TEXTURE_2D_ARRAY,se,0,0,0,Ue.width,Ue.height,Ne.depth,Ke,xt,Ue.data):t.texImage3D(i.TEXTURE_2D_ARRAY,se,tt,Ue.width,Ue.height,Ne.depth,0,Ke,xt,Ue.data)}else{Ct&&Mt&&t.texStorage2D(i.TEXTURE_2D,Qe,tt,_t[0].width,_t[0].height);for(let se=0,Ie=_t.length;se<Ie;se++)Ue=_t[se],O.format!==ii?Ke!==null?Ct?ee&&t.compressedTexSubImage2D(i.TEXTURE_2D,se,0,0,Ue.width,Ue.height,Ke,Ue.data):t.compressedTexImage2D(i.TEXTURE_2D,se,tt,Ue.width,Ue.height,0,Ue.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ct?ee&&t.texSubImage2D(i.TEXTURE_2D,se,0,0,Ue.width,Ue.height,Ke,xt,Ue.data):t.texImage2D(i.TEXTURE_2D,se,tt,Ue.width,Ue.height,0,Ke,xt,Ue.data)}else if(O.isDataArrayTexture)if(Ct){if(Mt&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Qe,tt,Ne.width,Ne.height,Ne.depth),ee)if(O.layerUpdates.size>0){let se;switch(xt){case i.UNSIGNED_BYTE:switch(Ke){case i.ALPHA:se=1;break;case i.LUMINANCE:se=1;break;case i.LUMINANCE_ALPHA:se=2;break;case i.RGB:se=3;break;case i.RGBA:se=4;break;default:throw new Error(`Unknown texel size for format ${Ke}.`)}break;case i.UNSIGNED_SHORT_4_4_4_4:case i.UNSIGNED_SHORT_5_5_5_1:case i.UNSIGNED_SHORT_5_6_5:se=1;break;default:throw new Error(`Unknown texel size for type ${xt}.`)}const Ie=Ne.width*Ne.height*se;for(const je of O.layerUpdates)t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,je,Ne.width,Ne.height,1,Ke,xt,Ne.data.slice(Ie*je,Ie*(je+1)));O.clearLayerUpdates()}else t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,Ne.width,Ne.height,Ne.depth,Ke,xt,Ne.data)}else t.texImage3D(i.TEXTURE_2D_ARRAY,0,tt,Ne.width,Ne.height,Ne.depth,0,Ke,xt,Ne.data);else if(O.isData3DTexture)Ct?(Mt&&t.texStorage3D(i.TEXTURE_3D,Qe,tt,Ne.width,Ne.height,Ne.depth),ee&&t.texSubImage3D(i.TEXTURE_3D,0,0,0,0,Ne.width,Ne.height,Ne.depth,Ke,xt,Ne.data)):t.texImage3D(i.TEXTURE_3D,0,tt,Ne.width,Ne.height,Ne.depth,0,Ke,xt,Ne.data);else if(O.isFramebufferTexture){if(Mt)if(Ct)t.texStorage2D(i.TEXTURE_2D,Qe,tt,Ne.width,Ne.height);else{let se=Ne.width,Ie=Ne.height;for(let je=0;je<Qe;je++)t.texImage2D(i.TEXTURE_2D,je,tt,se,Ie,0,Ke,xt,null),se>>=1,Ie>>=1}}else if(_t.length>0){if(Ct&&Mt){const se=ke(_t[0]);t.texStorage2D(i.TEXTURE_2D,Qe,tt,se.width,se.height)}for(let se=0,Ie=_t.length;se<Ie;se++)Ue=_t[se],Ct?ee&&t.texSubImage2D(i.TEXTURE_2D,se,0,0,Ke,xt,Ue):t.texImage2D(i.TEXTURE_2D,se,tt,Ke,xt,Ue);O.generateMipmaps=!1}else if(Ct){if(Mt){const se=ke(Ne);t.texStorage2D(i.TEXTURE_2D,Qe,tt,se.width,se.height)}ee&&t.texSubImage2D(i.TEXTURE_2D,0,0,0,Ke,xt,Ne)}else t.texImage2D(i.TEXTURE_2D,0,tt,Ke,xt,Ne);
vendor: 9,341 bytes, line 3810
3810y(O)&&g(Te),st.__version=be.version,O.onUpdate&&O.onUpdate(O)}G.__version=O.version}function ue(G,O,fe){if(O.image.length!==6)return;const Te=_e(G,O),Se=O.source;t.bindTexture(i.TEXTURE_CUBE_MAP,G.__webglTexture,i.TEXTURE0+fe);const be=n.get(Se);if(Se.version!==be.__version||Te===!0){t.activeTexture(i.TEXTURE0+fe);const st=ln.getPrimaries(ln.workingColorSpace),Le=O.colorSpace===zo?null:ln.getPrimaries(O.colorSpace),Ve=O.colorSpace===zo||st===Le?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,O.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,O.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ve);const pt=O.isCompressedTexture||O.image[0].isCompressedTexture,Ne=O.image[0]&&O.image[0].isDataTexture,Ke=[];for(let Ie=0;Ie<6;Ie++)!pt&&!Ne?Ke[Ie]=_(O.image[Ie],!0,r.maxCubemapSize):Ke[Ie]=Ne?O.image[Ie].image:O.image[Ie],Ke[Ie]=Je(O,Ke[Ie]);const xt=Ke[0],tt=s.convert(O.format,O.colorSpace),Ue=s.convert(O.type),_t=A(O.internalFormat,tt,Ue,O.colorSpace),Ct=O.isVideoTexture!==!0,Mt=be.__version===void 0||Te===!0,ee=Se.dataReady;let Qe=w(O,xt);ce(i.TEXTURE_CUBE_MAP,O);let se;if(pt){Ct&&Mt&&t.texStorage2D(i.TEXTURE_CUBE_MAP,Qe,_t,xt.width,xt.height);for(let Ie=0;Ie<6;Ie++){se=Ke[Ie].mipmaps;for(let je=0;je<se.length;je++){const Tt=se[je];O.format!==ii?tt!==null?Ct?ee&&t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je,0,0,Tt.width,Tt.height,tt,Tt.data):t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je,_t,Tt.width,Tt.height,0,Tt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Ct?ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je,0,0,Tt.width,Tt.height,tt,Ue,Tt.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je,_t,Tt.width,Tt.height,0,tt,Ue,Tt.data)}}}else{if(se=O.mipmaps,Ct&&Mt){se.length>0&&Qe++;const Ie=ke(Ke[0]);t.texStorage2D(i.TEXTURE_CUBE_MAP,Qe,_t,Ie.width,Ie.height)}for(let Ie=0;Ie<6;Ie++)if(Ne){Ct?ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,0,0,Ke[Ie].width,Ke[Ie].height,tt,Ue,Ke[Ie].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,_t,Ke[Ie].width,Ke[Ie].height,0,tt,Ue,Ke[Ie].data);for(let je=0;je<se.length;je++){const Wt=se[je].image[Ie].image;Ct?ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je+1,0,0,Wt.width,Wt.height,tt,Ue,Wt.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je+1,_t,Wt.width,Wt.height,0,tt,Ue,Wt.data)}}else{Ct?ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,0,0,tt,Ue,Ke[Ie]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,_t,tt,Ue,Ke[Ie]);for(let je=0;je<se.length;je++){const Tt=se[je];Ct?ee&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je+1,0,0,tt,Ue,Tt.image[Ie]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,je+1,_t,tt,Ue,Tt.image[Ie])}}}y(O)&&g(i.TEXTURE_CUBE_MAP),be.__version=Se.version,O.onUpdate&&O.onUpdate(O)}G.__version=O.version}function Ee(G,O,fe,Te,Se,be){const st=s.convert(fe.format,fe.colorSpace),Le=s.convert(fe.type),Ve=A(fe.internalFormat,st,Le,fe.colorSpace);if(!n.get(O).__hasExternalTextures){const Ne=Math.max(1,O.width>>be),Ke=Math.max(1,O.height>>be);Se===i.TEXTURE_3D||Se===i.TEXTURE_2D_ARRAY?t.texImage3D(Se,be,Ve,Ne,Ke,O.depth,0,st,Le,null):t.texImage2D(Se,be,Ve,Ne,Ke,0,st,Le,null)}t.bindFramebuffer(i.FRAMEBUFFER,G),we(O)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Te,Se,n.get(fe).__webglTexture,0,xe(O)):(Se===i.TEXTURE_2D||Se>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&Se<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Te,Se,n.get(fe).__webglTexture,be),t.bindFramebuffer(i.FRAMEBUFFER,null)}function Ce(G,O,fe){if(i.bindRenderbuffer(i.RENDERBUFFER,G),O.depthBuffer){const Te=O.depthTexture,Se=Te&&Te.isDepthTexture?Te.type:null,be=S(O.stencilBuffer,Se),st=O.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Le=xe(O);we(O)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Le,be,O.width,O.height):fe?i.renderbufferStorageMultisample(i.RENDERBUFFER,Le,be,O.width,O.height):i.renderbufferStorage(i.RENDERBUFFER,be,O.width,O.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,st,i.RENDERBUFFER,G)}else{const Te=O.textures;for(let Se=0;Se<Te.length;Se++){const be=Te[Se],st=s.convert(be.format,be.colorSpace),Le=s.convert(be.type),Ve=A(be.internalFormat,st,Le,be.colorSpace),pt=xe(O);fe&&we(O)===!1?i.renderbufferStorageMultisample(i.RENDERBUFFER,pt,Ve,O.width,O.height):we(O)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,pt,Ve,O.width,O.height):i.renderbufferStorage(i.RENDERBUFFER,Ve,O.width,O.height)}}i.bindRenderbuffer(i.RENDERBUFFER,null)}function De(G,O){if(O&&O.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(i.FRAMEBUFFER,G),!(O.depthTexture&&O.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(O.depthTexture).__webglTexture||O.depthTexture.image.width!==O.width||O.depthTexture.image.height!==O.height)&&(O.depthTexture.image.width=O.width,O.depthTexture.image.height=O.height,O.depthTexture.needsUpdate=!0),q(O.depthTexture,0);const Te=n.get(O.depthTexture).__webglTexture,Se=xe(O);if(O.depthTexture.format===lu)we(O)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,Te,0,Se):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,Te,0);else if(O.depthTexture.format===Su)we(O)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,Te,0,Se):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,Te,0);else throw new Error("Unknown depthTexture format")}function dt(G){const O=n.get(G),fe=G.isWebGLCubeRenderTarget===!0;if(G.depthTexture&&!O.__autoAllocateDepthBuffer){if(fe)throw new Error("target.depthTexture not supported in Cube render targets");De(O.__webglFramebuffer,G)}else if(fe){O.__webglDepthbuffer=[];for(let Te=0;Te<6;Te++)t.bindFramebuffer(i.FRAMEBUFFER,O.__webglFramebuffer[Te]),O.__webglDepthbuffer[Te]=i.createRenderbuffer(),Ce(O.__webglDepthbuffer[Te],G,!1)}else t.bindFramebuffer(i.FRAMEBUFFER,O.__webglFramebuffer),O.__webglDepthbuffer=i.createRenderbuffer(),Ce(O.__webglDepthbuffer,G,!1);t.bindFramebuffer(i.FRAMEBUFFER,null)}function At(G,O,fe){const Te=n.get(G);O!==void 0&&Ee(Te.__webglFramebuffer,G,G.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,0),fe!==void 0&&dt(G)}function it(G){const O=G.texture,fe=n.get(G),Te=n.get(O);G.addEventListener("dispose",T);const Se=G.textures,be=G.isWebGLCubeRenderTarget===!0,st=Se.length>1;if(st||(Te.__webglTexture===void 0&&(Te.__webglTexture=i.createTexture()),Te.__version=O.version,o.memory.textures++),be){fe.__webglFramebuffer=[];for(let Le=0;Le<6;Le++)if(O.mipmaps&&O.mipmaps.length>0){fe.__webglFramebuffer[Le]=[];for(let Ve=0;Ve<O.mipmaps.length;Ve++)fe.__webglFramebuffer[Le][Ve]=i.createFramebuffer()}else fe.__webglFramebuffer[Le]=i.createFramebuffer()}else{if(O.mipmaps&&O.mipmaps.length>0){fe.__webglFramebuffer=[];for(let Le=0;Le<O.mipmaps.length;Le++)fe.__webglFramebuffer[Le]=i.createFramebuffer()}else fe.__webglFramebuffer=i.createFramebuffer();if(st)for(let Le=0,Ve=Se.length;Le<Ve;Le++){const pt=n.get(Se[Le]);pt.__webglTexture===void 0&&(pt.__webglTexture=i.createTexture(),o.memory.textures++)}if(G.samples>0&&we(G)===!1){fe.__webglMultisampledFramebuffer=i.createFramebuffer(),fe.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,fe.__webglMultisampledFramebuffer);for(let Le=0;Le<Se.length;Le++){const Ve=Se[Le];fe.__webglColorRenderbuffer[Le]=i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,fe.__webglColorRenderbuffer[Le]);const pt=s.convert(Ve.format,Ve.colorSpace),Ne=s.convert(Ve.type),Ke=A(Ve.internalFormat,pt,Ne,Ve.colorSpace,G.isXRRenderTarget===!0),xt=xe(G);i.renderbufferStorageMultisample(i.RENDERBUFFER,xt,Ke,G.width,G.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+Le,i.RENDERBUFFER,fe.__webglColorRenderbuffer[Le])}i.bindRenderbuffer(i.RENDERBUFFER,null),G.depthBuffer&&(fe.__webglDepthRenderbuffer=i.createRenderbuffer(),Ce(fe.__webglDepthRenderbuffer,G,!0)),t.bindFramebuffer(i.FRAMEBUFFER,null)}}if(be){t.bindTexture(i.TEXTURE_CUBE_MAP,Te.__webglTexture),ce(i.TEXTURE_CUBE_MAP,O);for(let Le=0;Le<6;Le++)if(O.mipmaps&&O.mipmaps.length>0)for(let Ve=0;Ve<O.mipmaps.length;Ve++)Ee(fe.__webglFramebuffer[Le][Ve],G,O,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Le,Ve);else Ee(fe.__webglFramebuffer[Le],G,O,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0);y(O)&&g(i.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(st){for(let Le=0,Ve=Se.length;Le<Ve;Le++){const pt=Se[Le],Ne=n.get(pt);t.bindTexture(i.TEXTURE_2D,Ne.__webglTexture),ce(i.TEXTURE_2D,pt),Ee(fe.__webglFramebuffer,G,pt,i.COLOR_ATTACHMENT0+Le,i.TEXTURE_2D,0),y(pt)&&g(i.TEXTURE_2D)}t.unbindTexture()}else{let Le=i.TEXTURE_2D;if((G.isWebGL3DRenderTarget||G.isWebGLArrayRenderTarget)&&(Le=G.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY),t.bindTexture(Le,Te.__webglTexture),ce(Le,O),O.mipmaps&&O.mipmaps.length>0)for(let Ve=0;Ve<O.mipmaps.length;Ve++)Ee(fe.__webglFramebuffer[Ve],G,O,i.COLOR_ATTACHMENT0,Le,Ve);else Ee(fe.__webglFramebuffer,G,O,i.COLOR_ATTACHMENT0,Le,0);y(O)&&g(Le),t.unbindTexture()}G.depthBuffer&&dt(G)}function Z(G){const O=G.textures;for(let fe=0,Te=O.length;fe<Te;fe++){const Se=O[fe];
vendor: 6,274 bytes, line 3810
3810if(y(Se)){const be=G.isWebGLCubeRenderTarget?i.TEXTURE_CUBE_MAP:i.TEXTURE_2D,st=n.get(Se).__webglTexture;t.bindTexture(be,st),g(be),t.unbindTexture()}}}const Pe=[],le=[];function Me(G){if(G.samples>0){if(we(G)===!1){const O=G.textures,fe=G.width,Te=G.height;let Se=i.COLOR_BUFFER_BIT;const be=G.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,st=n.get(G),Le=O.length>1;if(Le)for(let Ve=0;Ve<O.length;Ve++)t.bindFramebuffer(i.FRAMEBUFFER,st.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+Ve,i.RENDERBUFFER,null),t.bindFramebuffer(i.FRAMEBUFFER,st.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+Ve,i.TEXTURE_2D,null,0);t.bindFramebuffer(i.READ_FRAMEBUFFER,st.__webglMultisampledFramebuffer),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,st.__webglFramebuffer);for(let Ve=0;Ve<O.length;Ve++){if(G.resolveDepthBuffer&&(G.depthBuffer&&(Se|=i.DEPTH_BUFFER_BIT),G.stencilBuffer&&G.resolveStencilBuffer&&(Se|=i.STENCIL_BUFFER_BIT)),Le){i.framebufferRenderbuffer(i.READ_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,st.__webglColorRenderbuffer[Ve]);const pt=n.get(O[Ve]).__webglTexture;i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,pt,0)}i.blitFramebuffer(0,0,fe,Te,0,0,fe,Te,Se,i.NEAREST),l===!0&&(Pe.length=0,le.length=0,Pe.push(i.COLOR_ATTACHMENT0+Ve),G.depthBuffer&&G.resolveDepthBuffer===!1&&(Pe.push(be),le.push(be),i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,le)),i.invalidateFramebuffer(i.READ_FRAMEBUFFER,Pe))}if(t.bindFramebuffer(i.READ_FRAMEBUFFER,null),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),Le)for(let Ve=0;Ve<O.length;Ve++){t.bindFramebuffer(i.FRAMEBUFFER,st.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+Ve,i.RENDERBUFFER,st.__webglColorRenderbuffer[Ve]);const pt=n.get(O[Ve]).__webglTexture;t.bindFramebuffer(i.FRAMEBUFFER,st.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+Ve,i.TEXTURE_2D,pt,0)}t.bindFramebuffer(i.DRAW_FRAMEBUFFER,st.__webglMultisampledFramebuffer)}else if(G.depthBuffer&&G.resolveDepthBuffer===!1&&l){const O=G.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,[O])}}}function xe(G){return Math.min(r.maxSamples,G.samples)}function we(G){const O=n.get(G);return G.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&O.__useRenderToTexture!==!1}function Oe(G){const O=o.render.frame;f.get(G)!==O&&(f.set(G,O),G.update())}function Je(G,O){const fe=G.colorSpace,Te=G.format,Se=G.type;return G.isCompressedTexture===!0||G.isVideoTexture===!0||fe!==Ji&&fe!==zo&&(ln.getTransfer(fe)===vn?(Te!==ii||Se!==jr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",fe)),O}function ke(G){return typeof HTMLImageElement<"u"&&G instanceof HTMLImageElement?(u.width=G.naturalWidth||G.width,u.height=G.naturalHeight||G.height):typeof VideoFrame<"u"&&G instanceof VideoFrame?(u.width=G.displayWidth,u.height=G.displayHeight):(u.width=G.width,u.height=G.height),u}this.allocateTextureUnit=j,this.resetTextureUnits=N,this.setTexture2D=q,this.setTexture2DArray=re,this.setTexture3D=Q,this.setTextureCube=pe,this.rebindTextures=At,this.setupRenderTarget=it,this.updateRenderTargetMipmap=Z,this.updateMultisampleRenderTarget=Me,this.setupDepthRenderbuffer=dt,this.setupFrameBufferTexture=Ee,this.useMultisampledRTT=we}function jb(i,e){function t(n,r=zo){let s;const o=ln.getTransfer(r);if(n===jr)return i.UNSIGNED_BYTE;if(n===bS)return i.UNSIGNED_SHORT_4_4_4_4;if(n===IS)return i.UNSIGNED_SHORT_5_5_5_1;if(n===hb)return i.UNSIGNED_INT_5_9_9_9_REV;if(n===RS)return i.BYTE;if(n===PS)return i.SHORT;if(n===Rh)return i.UNSIGNED_SHORT;if(n===lv)return i.INT;if(n===el)return i.UNSIGNED_INT;if(n===Nn)return i.FLOAT;if(n===vi)return i.HALF_FLOAT;if(n===pb)return i.ALPHA;if(n===mb)return i.RGB;if(n===ii)return i.RGBA;if(n===gb)return i.LUMINANCE;if(n===vb)return i.LUMINANCE_ALPHA;if(n===lu)return i.DEPTH_COMPONENT;if(n===Su)return i.DEPTH_STENCIL;if(n===uv)return i.RED;if(n===BS)return i.RED_INTEGER;if(n===_b)return i.RG;if(n===DS)return i.RG_INTEGER;if(n===FS)return i.RGBA_INTEGER;if(n===K0||n===Q0||n===q0||n===Z0)if(o===vn)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===K0)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Q0)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===q0)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Z0)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===K0)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Q0)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===q0)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Z0)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Rx||n===Px||n===bx||n===Ix)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Rx)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Px)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===bx)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Ix)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Bx||n===Dx||n===Fx)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Bx||n===Dx)return o===vn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===Fx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Lx||n===Nx||n===Ox||n===Ux||n===zx||n===kx||n===Gx||n===Hx||n===Vx||n===Wx||n===Xx||n===Jx||n===jx||n===Yx)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Lx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Nx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Ox)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===Ux)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===zx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===kx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Gx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;
vendor: 13,966 bytes, lines 3810-3834
3810if(n===Hx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Vx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Wx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Xx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Jx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===jx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Yx)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===$0||n===Kx||n===Qx)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===$0)return o===vn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===Kx)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Qx)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===yb||n===qx||n===Zx||n===$x)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===$0)return s.COMPRESSED_RED_RGTC1_EXT;if(n===qx)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Zx)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===$x)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Au?i.UNSIGNED_INT_24_8:i[n]!==void 0?i[n]:null}return{convert:t}}class Yb extends oi{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class lo extends Zt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const X6={type:"move"};class U1{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new lo,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 lo,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new lo,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const _ of e.hand.values()){const y=t.getJointPose(_,n),g=this._getHandJoint(u,_);y!==null&&(g.matrix.fromArray(y.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=y.radius),g.visible=y!==null}const f=u.joints["index-finger-tip"],h=u.joints["thumb-tip"],p=f.position.distanceTo(h.position),m=.02,v=.005;u.inputState.pinching&&p>m+v?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&p<=m-v&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,n),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,n),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(X6)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new lo;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}const J6=` 3811void main() { 3812 3813 gl_Position = vec4( position, 1.0 ); 3814 3815}`,j6=` 3816uniform sampler2DArray depthColor; 3817uniform float depthWidth; 3818uniform float depthHeight; 3819 3820void main() { 3821 3822 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 3823 3824 if ( coord.x >= 1.0 ) { 3825 3826 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 3827 3828 } else { 3829 3830 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 3831 3832 } 3833 3834}`;class Y6{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const r=new qt,s=e.properties.get(r);s.__webglTexture=t.texture,(t.depthNear!=n.depthNear||t.depthFar!=n.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,n=new ur({vertexShader:J6,fragmentShader:j6,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Mn(new cl(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}}class K6 extends ta{constructor(e,t){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,u=null,f=null,h=null,p=null,m=null,v=null;const _=new Y6,y=t.getContextAttributes();let g=null,A=null;const S=[],w=[],P=new Re;let T=null;const I=new oi;I.layers.enable(1),I.viewport=new cn;const D=new oi;D.layers.enable(2),D.viewport=new cn;const C=[I,D],b=new Yb;b.layers.enable(1),b.layers.enable(2);let N=null,j=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ue){let Ee=S[ue];return Ee===void 0&&(Ee=new U1,S[ue]=Ee),Ee.getTargetRaySpace()},this.getControllerGrip=function(ue){let Ee=S[ue];return Ee===void 0&&(Ee=new U1,S[ue]=Ee),Ee.getGripSpace()},this.getHand=function(ue){let Ee=S[ue];return Ee===void 0&&(Ee=new U1,S[ue]=Ee),Ee.getHandSpace()};function Y(ue){const Ee=w.indexOf(ue.inputSource);if(Ee===-1)return;const Ce=S[Ee];Ce!==void 0&&(Ce.update(ue.inputSource,ue.frame,u||o),Ce.dispatchEvent({type:ue.type,data:ue.inputSource}))}function q(){r.removeEventListener("select",Y),r.removeEventListener("selectstart",Y),r.removeEventListener("selectend",Y),r.removeEventListener("squeeze",Y),r.removeEventListener("squeezestart",Y),r.removeEventListener("squeezeend",Y),r.removeEventListener("end",q),r.removeEventListener("inputsourceschange",re);for(let ue=0;ue<S.length;ue++){const Ee=w[ue];Ee!==null&&(w[ue]=null,S[ue].disconnect(Ee))}N=null,j=null,_.reset(),e.setRenderTarget(g),m=null,p=null,h=null,r=null,A=null,Fe.stop(),n.isPresenting=!1,e.setPixelRatio(T),e.setSize(P.width,P.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(ue){s=ue,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ue){a=ue,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(ue){u=ue},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return h},this.getFrame=function(){return v},this.getSession=function(){return r},this.setSession=async function(ue){if(r=ue,r!==null){if(g=e.getRenderTarget(),r.addEventListener("select",Y),r.addEventListener("selectstart",Y),r.addEventListener("selectend",Y),r.addEventListener("squeeze",Y),r.addEventListener("squeezestart",Y),r.addEventListener("squeezeend",Y),r.addEventListener("end",q),r.addEventListener("inputsourceschange",re),y.xrCompatible!==!0&&await t.makeXRCompatible(),T=e.getPixelRatio(),e.getSize(P),r.renderState.layers===void 0){const Ee={antialias:y.antialias,alpha:!0,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,Ee),r.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),A=new Tr(m.framebufferWidth,m.framebufferHeight,{format:ii,type:jr,colorSpace:e.outputColorSpace,stencilBuffer:y.stencil})}else{let Ee=null,Ce=null,De=null;y.depth&&(De=y.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,Ee=y.stencil?Su:lu,Ce=y.stencil?Au:el);const dt={colorFormat:t.RGBA8,depthFormat:De,scaleFactor:s};h=new XRWebGLBinding(r,t),p=h.createProjectionLayer(dt),r.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),A=new Tr(p.textureWidth,p.textureHeight,{format:ii,type:jr,depthTexture:new hv(p.textureWidth,p.textureHeight,Ce,void 0,void 0,void 0,void 0,void 0,void 0,Ee),stencilBuffer:y.stencil,colorSpace:e.outputColorSpace,samples:y.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1})}A.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=await r.requestReferenceSpace(a),Fe.setContext(r),Fe.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function re(ue){for(let Ee=0;Ee<ue.removed.length;Ee++){const Ce=ue.removed[Ee],De=w.indexOf(Ce);De>=0&&(w[De]=null,S[De].disconnect(Ce))}for(let Ee=0;Ee<ue.added.length;Ee++){const Ce=ue.added[Ee];let De=w.indexOf(Ce);if(De===-1){for(let At=0;At<S.length;At++)if(At>=w.length){w.push(Ce),De=At;break}else if(w[At]===null){w[At]=Ce,De=At;break}if(De===-1)break}const dt=S[De];dt&&dt.connect(Ce)}}const Q=new H,pe=new H;function k(ue,Ee,Ce){Q.setFromMatrixPosition(Ee.matrixWorld),pe.setFromMatrixPosition(Ce.matrixWorld);const De=Q.distanceTo(pe),dt=Ee.projectionMatrix.elements,At=Ce.projectionMatrix.elements,it=dt[14]/(dt[10]-1),Z=dt[14]/(dt[10]+1),Pe=(dt[9]+1)/dt[5],le=(dt[9]-1)/dt[5],Me=(dt[8]-1)/dt[0],xe=(At[8]+1)/At[0],we=it*Me,Oe=it*xe,Je=De/(-Me+xe),ke=Je*-Me;Ee.matrixWorld.decompose(ue.position,ue.quaternion,ue.scale),ue.translateX(ke),ue.translateZ(Je),ue.matrixWorld.compose(ue.position,ue.quaternion,ue.scale),ue.matrixWorldInverse.copy(ue.matrixWorld).invert();const G=it+Je,O=Z+Je,fe=we-ke,Te=Oe+(De-ke),Se=Pe*Z/O*G,be=le*Z/O*G;ue.projectionMatrix.makePerspective(fe,Te,Se,be,G,O),ue.projectionMatrixInverse.copy(ue.projectionMatrix).invert()}function ne(ue,Ee){Ee===null?ue.matrixWorld.copy(ue.matrix):ue.matrixWorld.multiplyMatrices(Ee.matrixWorld,ue.matrix),ue.matrixWorldInverse.copy(ue.matrixWorld).invert()}this.updateCamera=function(ue){if(r===null)return;_.texture!==null&&(ue.near=_.depthNear,ue.far=_.depthFar),b.near=D.near=I.near=ue.near,b.far=D.far=I.far=ue.far,(N!==b.near||j!==b.far)&&(r.updateRenderState({depthNear:b.near,depthFar:b.far}),N=b.near,j=b.far,I.near=N,I.far=j,D.near=N,D.far=j,I.updateProjectionMatrix(),D.updateProjectionMatrix(),ue.updateProjectionMatrix());const Ee=ue.parent,Ce=b.cameras;ne(b,Ee);for(let De=0;De<Ce.length;De++)ne(Ce[De],Ee);Ce.length===2?k(b,I,D):b.projectionMatrix.copy(I.projectionMatrix),te(ue,b,Ee)};function te(ue,Ee,Ce){Ce===null?ue.matrix.copy(Ee.matrixWorld):(ue.matrix.copy(Ce.matrixWorld),ue.matrix.invert(),ue.matrix.multiply(Ee.matrixWorld)),ue.matrix.decompose(ue.position,ue.quaternion,ue.scale),ue.updateMatrixWorld(!0),ue.projectionMatrix.copy(Ee.projectionMatrix),ue.projectionMatrixInverse.copy(Ee.projectionMatrixInverse),ue.isPerspectiveCamera&&(ue.fov=yf*2*Math.atan(1/ue.projectionMatrix.elements[5]),ue.zoom=1)}this.getCamera=function(){return b},this.getFoveation=function(){if(!(p===null&&m===null))return l},this.setFoveation=function(ue){l=ue,p!==null&&(p.fixedFoveation=ue),m!==null&&m.fixedFoveation!==void 0&&(m.fixedFoveation=ue)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(b)};let ce=null;function _e(ue,Ee){if(f=Ee.getViewerPose(u||o),v=Ee,f!==null){const Ce=f.views;m!==null&&(e.setRenderTargetFramebuffer(A,m.framebuffer),e.setRenderTarget(A));let De=!1;Ce.length!==b.cameras.length&&(b.cameras.length=0,De=!0);for(let At=0;At<Ce.length;At++){const it=Ce[At];let Z=null;if(m!==null)Z=m.getViewport(it);else{const le=h.getViewSubImage(p,it);Z=le.viewport,At===0&&(e.setRenderTargetTextures(A,le.colorTexture,p.ignoreDepthValues?void 0:le.depthStencilTexture),e.setRenderTarget(A))}let Pe=C[At];Pe===void 0&&(Pe=new oi,Pe.layers.enable(At),Pe.viewport=new cn,C[At]=Pe),Pe.matrix.fromArray(it.transform.matrix),Pe.matrix.decompose(Pe.position,Pe.quaternion,Pe.scale),Pe.projectionMatrix.fromArray(it.projectionMatrix),Pe.projectionMatrixInverse.copy(Pe.projectionMatrix).invert(),Pe.viewport.set(Z.x,Z.y,Z.width,Z.height),At===0&&(b.matrix.copy(Pe.matrix),b.matrix.decompose(b.position,b.quaternion,b.scale)),De===!0&&b.cameras.push(Pe)}const dt=r.enabledFeatures;if(dt&&dt.includes("depth-sensing")){const At=h.getDepthInformation(Ce[0]);At&&At.isValid&&At.texture&&_.init(e,At,r.renderState)}}for(let Ce=0;Ce<S.length;Ce++){const De=w[Ce],dt=S[Ce];De!==null&&dt!==void 0&&dt.update(De,Ee,u||o)}ce&&ce(ue,Ee),Ee.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Ee}),v=null}const Fe=new Gb;Fe.setAnimationLoop(_e),this.setAnimationLoop=function(ue){ce=ue},this.dispose=function(){}}}const bl=new Yr,Q6=new mt;function q6(i,e){function t(y,g){y.matrixAutoUpdate===!0&&y.updateMatrix(),g.value.copy(y.matrix
vendor: 6,675 bytes, line 3834
3834)}function n(y,g){g.color.getRGB(y.fogColor.value,zb(i)),g.isFog?(y.fogNear.value=g.near,y.fogFar.value=g.far):g.isFogExp2&&(y.fogDensity.value=g.density)}function r(y,g,A,S,w){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(y,g):g.isMeshToonMaterial?(s(y,g),h(y,g)):g.isMeshPhongMaterial?(s(y,g),f(y,g)):g.isMeshStandardMaterial?(s(y,g),p(y,g),g.isMeshPhysicalMaterial&&m(y,g,w)):g.isMeshMatcapMaterial?(s(y,g),v(y,g)):g.isMeshDepthMaterial?s(y,g):g.isMeshDistanceMaterial?(s(y,g),_(y,g)):g.isMeshNormalMaterial?s(y,g):g.isLineBasicMaterial?(o(y,g),g.isLineDashedMaterial&&a(y,g)):g.isPointsMaterial?l(y,g,A,S):g.isSpriteMaterial?u(y,g):g.isShadowMaterial?(y.color.value.copy(g.color),y.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(y,g){y.opacity.value=g.opacity,g.color&&y.diffuse.value.copy(g.color),g.emissive&&y.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(y.map.value=g.map,t(g.map,y.mapTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,t(g.alphaMap,y.alphaMapTransform)),g.bumpMap&&(y.bumpMap.value=g.bumpMap,t(g.bumpMap,y.bumpMapTransform),y.bumpScale.value=g.bumpScale,g.side===Mi&&(y.bumpScale.value*=-1)),g.normalMap&&(y.normalMap.value=g.normalMap,t(g.normalMap,y.normalMapTransform),y.normalScale.value.copy(g.normalScale),g.side===Mi&&y.normalScale.value.negate()),g.displacementMap&&(y.displacementMap.value=g.displacementMap,t(g.displacementMap,y.displacementMapTransform),y.displacementScale.value=g.displacementScale,y.displacementBias.value=g.displacementBias),g.emissiveMap&&(y.emissiveMap.value=g.emissiveMap,t(g.emissiveMap,y.emissiveMapTransform)),g.specularMap&&(y.specularMap.value=g.specularMap,t(g.specularMap,y.specularMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest);const A=e.get(g),S=A.envMap,w=A.envMapRotation;S&&(y.envMap.value=S,bl.copy(w),bl.x*=-1,bl.y*=-1,bl.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(bl.y*=-1,bl.z*=-1),y.envMapRotation.value.setFromMatrix4(Q6.makeRotationFromEuler(bl)),y.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=g.reflectivity,y.ior.value=g.ior,y.refractionRatio.value=g.refractionRatio),g.lightMap&&(y.lightMap.value=g.lightMap,y.lightMapIntensity.value=g.lightMapIntensity,t(g.lightMap,y.lightMapTransform)),g.aoMap&&(y.aoMap.value=g.aoMap,y.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,y.aoMapTransform))}function o(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,g.map&&(y.map.value=g.map,t(g.map,y.mapTransform))}function a(y,g){y.dashSize.value=g.dashSize,y.totalSize.value=g.dashSize+g.gapSize,y.scale.value=g.scale}function l(y,g,A,S){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.size.value=g.size*A,y.scale.value=S*.5,g.map&&(y.map.value=g.map,t(g.map,y.uvTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,t(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function u(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.rotation.value=g.rotation,g.map&&(y.map.value=g.map,t(g.map,y.mapTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,t(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function f(y,g){y.specular.value.copy(g.specular),y.shininess.value=Math.max(g.shininess,1e-4)}function h(y,g){g.gradientMap&&(y.gradientMap.value=g.gradientMap)}function p(y,g){y.metalness.value=g.metalness,g.metalnessMap&&(y.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,y.metalnessMapTransform)),y.roughness.value=g.roughness,g.roughnessMap&&(y.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,y.roughnessMapTransform)),g.envMap&&(y.envMapIntensity.value=g.envMapIntensity)}function m(y,g,A){y.ior.value=g.ior,g.sheen>0&&(y.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),y.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(y.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,y.sheenColorMapTransform)),g.sheenRoughnessMap&&(y.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,y.sheenRoughnessMapTransform))),g.clearcoat>0&&(y.clearcoat.value=g.clearcoat,y.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(y.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,y.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(y.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Mi&&y.clearcoatNormalScale.value.negate())),g.dispersion>0&&(y.dispersion.value=g.dispersion),g.iridescence>0&&(y.iridescence.value=g.iridescence,y.iridescenceIOR.value=g.iridescenceIOR,y.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(y.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,y.iridescenceMapTransform)),g.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),g.transmission>0&&(y.transmission.value=g.transmission,y.transmissionSamplerMap.value=A.texture,y.transmissionSamplerSize.value.set(A.width,A.height),g.transmissionMap&&(y.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,y.transmissionMapTransform)),y.thickness.value=g.thickness,g.thicknessMap&&(y.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=g.attenuationDistance,y.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(y.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(y.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=g.specularIntensity,y.specularColor.value.copy(g.specularColor),g.specularColorMap&&(y.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,y.specularColorMapTransform)),g.specularIntensityMap&&(y.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,y.specularIntensityMapTransform))}function v(y,g){g.matcap&&(y.matcap.value=g.matcap)}function _(y,g){const A=e.get(g).light;y.referencePosition.value.setFromMatrixPosition(A.matrixWorld),y.nearDistance.value=A.shadow.camera.near,y.farDistance.value=A.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:r}}function Z6(i,e,t,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function l(A,S){const w=S.program;n.uniformBlockBinding(A,w)}
vendor: 4,248 bytes, line 3834
3834function u(A,S){let w=r[A.id];w===void 0&&(v(A),w=f(A),r[A.id]=w,A.addEventListener("dispose",y));const P=S.program;n.updateUBOMapping(A,P);const T=e.render.frame;s[A.id]!==T&&(p(A),s[A.id]=T)}function f(A){const S=h();A.__bindingPointIndex=S;const w=i.createBuffer(),P=A.__size,T=A.usage;return i.bindBuffer(i.UNIFORM_BUFFER,w),i.bufferData(i.UNIFORM_BUFFER,P,T),i.bindBuffer(i.UNIFORM_BUFFER,null),i.bindBufferBase(i.UNIFORM_BUFFER,S,w),w}function h(){for(let A=0;A<a;A++)if(o.indexOf(A)===-1)return o.push(A),A;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(A){const S=r[A.id],w=A.uniforms,P=A.__cache;i.bindBuffer(i.UNIFORM_BUFFER,S);for(let T=0,I=w.length;T<I;T++){const D=Array.isArray(w[T])?w[T]:[w[T]];for(let C=0,b=D.length;C<b;C++){const N=D[C];if(m(N,T,C,P)===!0){const j=N.__offset,Y=Array.isArray(N.value)?N.value:[N.value];let q=0;for(let re=0;re<Y.length;re++){const Q=Y[re],pe=_(Q);typeof Q=="number"||typeof Q=="boolean"?(N.__data[0]=Q,i.bufferSubData(i.UNIFORM_BUFFER,j+q,N.__data)):Q.isMatrix3?(N.__data[0]=Q.elements[0],N.__data[1]=Q.elements[1],N.__data[2]=Q.elements[2],N.__data[3]=0,N.__data[4]=Q.elements[3],N.__data[5]=Q.elements[4],N.__data[6]=Q.elements[5],N.__data[7]=0,N.__data[8]=Q.elements[6],N.__data[9]=Q.elements[7],N.__data[10]=Q.elements[8],N.__data[11]=0):(Q.toArray(N.__data,q),q+=pe.storage/Float32Array.BYTES_PER_ELEMENT)}i.bufferSubData(i.UNIFORM_BUFFER,j,N.__data)}}}i.bindBuffer(i.UNIFORM_BUFFER,null)}function m(A,S,w,P){const T=A.value,I=S+"_"+w;if(P[I]===void 0)return typeof T=="number"||typeof T=="boolean"?P[I]=T:P[I]=T.clone(),!0;{const D=P[I];if(typeof T=="number"||typeof T=="boolean"){if(D!==T)return P[I]=T,!0}else if(D.equals(T)===!1)return D.copy(T),!0}return!1}function v(A){const S=A.uniforms;let w=0;const P=16;for(let I=0,D=S.length;I<D;I++){const C=Array.isArray(S[I])?S[I]:[S[I]];for(let b=0,N=C.length;b<N;b++){const j=C[b],Y=Array.isArray(j.value)?j.value:[j.value];for(let q=0,re=Y.length;q<re;q++){const Q=Y[q],pe=_(Q),k=w%P;k!==0&&P-k<pe.boundary&&(w+=P-k),j.__data=new Float32Array(pe.storage/Float32Array.BYTES_PER_ELEMENT),j.__offset=w,w+=pe.storage}}}const T=w%P;return T>0&&(w+=P-T),A.__size=w,A.__cache={},this}function _(A){const S={boundary:0,storage:0};return typeof A=="number"||typeof A=="boolean"?(S.boundary=4,S.storage=4):A.isVector2?(S.boundary=8,S.storage=8):A.isVector3||A.isColor?(S.boundary=16,S.storage=12):A.isVector4?(S.boundary=16,S.storage=16):A.isMatrix3?(S.boundary=48,S.storage=48):A.isMatrix4?(S.boundary=64,S.storage=64):A.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",A),S}function y(A){const S=A.target;S.removeEventListener("dispose",y);const w=o.indexOf(S.__bindingPointIndex);o.splice(w,1),i.deleteBuffer(r[S.id]),delete r[S.id],delete s[S.id]}function g(){for(const A in r)i.deleteBuffer(r[A]);o=[],r={},s={}}return{bind:l,update:u,dispose:g}}class YS{constructor(e={}){const{canvas:t=Lb(),context:n=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:f="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=n.getContextAttributes().alpha}else p=o;const m=new Uint32Array(4),v=new Int32Array(4);let _=null,y=null;const g=[],A=[];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=gr,this.toneMapping=po,this.toneMappingExposure=1;const S=this;let w=!1,P=0,T=0,I=null,D=-1,C=null;const b=new cn,N=new cn;let j=null;const Y=new He(0);let q=0,re=t.width,Q=t.height,pe=1,k=null,ne=null;const te=new cn(0,0,re,Q),ce=new cn(0,0,re,Q);let _e=!1;const Fe=new sp;let ue=!1,Ee=!1;const Ce=new mt,De=new H,dt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let At=!1;
vendor: 8,474 bytes, line 3834
3834function it(){return I===null?pe:1}let Z=n;function Pe(R,U){return t.getContext(R,U)}try{const R={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:f,failIfMajorPerformanceCaveat:h};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Bf}`),t.addEventListener("webglcontextlost",Qe,!1),t.addEventListener("webglcontextrestored",se,!1),t.addEventListener("webglcontextcreationerror",Ie,!1),Z===null){const U="webgl2";if(Z=Pe(U,R),Z===null)throw Pe(U)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(R){throw console.error("THREE.WebGLRenderer: "+R.message),R}let le,Me,xe,we,Oe,Je,ke,G,O,fe,Te,Se,be,st,Le,Ve,pt,Ne,Ke,xt,tt,Ue,_t,Ct;function Mt(){le=new f8(Z),le.init(),Ue=new jb(Z,le),Me=new s8(Z,le,e,Ue),xe=new V6(Z),we=new p8(Z),Oe=new I6,Je=new W6(Z,le,xe,Oe,Me,Ue,we),ke=new a8(S),G=new c8(S),O=new AO(Z),_t=new i8(Z,O),fe=new d8(Z,O,we,_t),Te=new g8(Z,fe,O,we),Ke=new m8(Z,Me,Je),Ve=new o8(Oe),Se=new b6(S,ke,G,le,Me,_t,Ve),be=new q6(S,Oe),st=new D6,Le=new z6(le),Ne=new n8(S,ke,G,xe,Te,p,l),pt=new H6(S,Te,Me),Ct=new Z6(Z,we,Me,xe),xt=new r8(Z,le,we),tt=new h8(Z,le,we),we.programs=Se.programs,S.capabilities=Me,S.extensions=le,S.properties=Oe,S.renderLists=st,S.shadowMap=pt,S.state=xe,S.info=we}Mt();const ee=new K6(S,Z);this.xr=ee,this.getContext=function(){return Z},this.getContextAttributes=function(){return Z.getContextAttributes()},this.forceContextLoss=function(){const R=le.get("WEBGL_lose_context");R&&R.loseContext()},this.forceContextRestore=function(){const R=le.get("WEBGL_lose_context");R&&R.restoreContext()},this.getPixelRatio=function(){return pe},this.setPixelRatio=function(R){R!==void 0&&(pe=R,this.setSize(re,Q,!1))},this.getSize=function(R){return R.set(re,Q)},this.setSize=function(R,U,V=!0){if(ee.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}re=R,Q=U,t.width=Math.floor(R*pe),t.height=Math.floor(U*pe),V===!0&&(t.style.width=R+"px",t.style.height=U+"px"),this.setViewport(0,0,R,U)},this.getDrawingBufferSize=function(R){return R.set(re*pe,Q*pe).floor()},this.setDrawingBufferSize=function(R,U,V){re=R,Q=U,pe=V,t.width=Math.floor(R*V),t.height=Math.floor(U*V),this.setViewport(0,0,R,U)},this.getCurrentViewport=function(R){return R.copy(b)},this.getViewport=function(R){return R.copy(te)},this.setViewport=function(R,U,V,W){R.isVector4?te.set(R.x,R.y,R.z,R.w):te.set(R,U,V,W),xe.viewport(b.copy(te).multiplyScalar(pe).round())},this.getScissor=function(R){return R.copy(ce)},this.setScissor=function(R,U,V,W){R.isVector4?ce.set(R.x,R.y,R.z,R.w):ce.set(R,U,V,W),xe.scissor(N.copy(ce).multiplyScalar(pe).round())},this.getScissorTest=function(){return _e},this.setScissorTest=function(R){xe.setScissorTest(_e=R)},this.setOpaqueSort=function(R){k=R},this.setTransparentSort=function(R){ne=R},this.getClearColor=function(R){return R.copy(Ne.getClearColor())},this.setClearColor=function(){Ne.setClearColor.apply(Ne,arguments)},this.getClearAlpha=function(){return Ne.getClearAlpha()},this.setClearAlpha=function(){Ne.setClearAlpha.apply(Ne,arguments)},this.clear=function(R=!0,U=!0,V=!0){let W=0;if(R){let J=!1;if(I!==null){const oe=I.texture.format;J=oe===FS||oe===DS||oe===BS}if(J){const oe=I.texture.type,de=oe===jr||oe===el||oe===Rh||oe===Au||oe===bS||oe===IS,me=Ne.getClearColor(),ge=Ne.getClearAlpha(),ye=me.r,qe=me.g,Be=me.b;de?(m[0]=ye,m[1]=qe,m[2]=Be,m[3]=ge,Z.clearBufferuiv(Z.COLOR,0,m)):(v[0]=ye,v[1]=qe,v[2]=Be,v[3]=ge,Z.clearBufferiv(Z.COLOR,0,v))}else W|=Z.COLOR_BUFFER_BIT}U&&(W|=Z.DEPTH_BUFFER_BIT),V&&(W|=Z.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Z.clear(W)},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",Qe,!1),t.removeEventListener("webglcontextrestored",se,!1),t.removeEventListener("webglcontextcreationerror",Ie,!1),st.dispose(),Le.dispose(),Oe.dispose(),ke.dispose(),G.dispose(),Te.dispose(),_t.dispose(),Ct.dispose(),Se.dispose(),ee.dispose(),ee.removeEventListener("sessionstart",Zi),ee.removeEventListener("sessionend",$i),Ms.stop()};function Qe(R){R.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),w=!0}function se(){console.log("THREE.WebGLRenderer: Context Restored."),w=!1;const R=we.autoReset,U=pt.enabled,V=pt.autoUpdate,W=pt.needsUpdate,J=pt.type;Mt(),we.autoReset=R,pt.enabled=U,pt.autoUpdate=V,pt.needsUpdate=W,pt.type=J}function Ie(R){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",R.statusMessage)}function je(R){const U=R.target;U.removeEventListener("dispose",je),Tt(U)}function Tt(R){Wt(R),Oe.remove(R)}function Wt(R){const U=Oe.get(R).programs;U!==void 0&&(U.forEach(function(V){Se.releaseProgram(V)}),R.isShaderMaterial&&Se.releaseShaderCache(R))}this.renderBufferDirect=function(R,U,V,W,J,oe){U===null&&(U=dt);const de=J.isMesh&&J.matrixWorld.determinant()<0,me=Hf(R,U,V,W,J);xe.setMaterial(W,de);let ge=V.index,ye=1;if(W.wireframe===!0){if(ge=fe.getWireframeAttribute(V),ge===void 0)return;ye=2}const qe=V.drawRange,Be=V.attributes.position;let We=qe.start*ye,rt=(qe.start+qe.count)*ye;oe!==null&&(We=Math.max(We,oe.start*ye),rt=Math.min(rt,(oe.start+oe.count)*ye)),ge!==null?(We=Math.max(We,0),rt=Math.min(rt,ge.count)):Be!=null&&(We=Math.max(We,0),rt=Math.min(rt,Be.count));const at=rt-We;if(at<0||at===1/0)return;_t.setup(J,W,me,V,ge);let Rt,lt=xt;if(ge!==null&&(Rt=O.get(ge),lt=tt,lt.setIndex(Rt)),J.isMesh)W.wireframe===!0?(xe.setLineWidth(W.wireframeLinewidth*it()),lt.setMode(Z.LINES)):lt.setMode(Z.TRIANGLES);else if(J.isLine){let ze=W.linewidth;ze===void 0&&(ze=1),xe.setLineWidth(ze*it()),J.isLineSegments?lt.setMode(Z.LINES):J.isLineLoop?lt.setMode(Z.LINE_LOOP):lt.setMode(Z.LINE_STRIP)}else J.isPoints?lt.setMode(Z.POINTS):J.isSprite&<.setMode(Z.TRIANGLES);if(J.isBatchedMesh)J._multiDrawInstances!==null?lt.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances):lt.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else if(J.isInstancedMesh)lt.renderInstances(We,at,J.count);else if(V.isInstancedBufferGeometry){const ze=V._maxInstanceCount!==void 0?V._maxInstanceCount:1/0,gt=Math.min(V.instanceCount,ze);lt.renderInstances(We,at,gt)}else lt.render(We,at)};function mn(R,U,V){R.transparent===!0&&R.side===fs&&R.forceSinglePass===!1?(R.side=Mi,R.needsUpdate=!0,Ii(R,U,V),R.side=xs,R.needsUpdate=!0,Ii(R,U,V),R.side=fs):Ii(R,U,V)}this.compile=function(R,U,V=null){V===null&&(V=R),y=Le.get(V),y.init(U),A.push(y),V.traverseVisible(function(J){J.isLight&&J.layers.test(U.layers)&&(y.pushLight(J),J.castShadow&&y.pushShadow(J))}),R!==V&&R.traverseVisible(function(J){J.isLight&&J.layers.test(U.layers)&&(y.pushLight(J),J.castShadow&&y.pushShadow(J))}),y.setupLights();const W=new Set;return R.traverse(function(J){const oe=J.material;if(oe)if(Array.isArray(oe))for(let de=0;de<oe.length;de++){const me=oe[de];mn(me,V,J),W.add(me)}else mn(oe,V,J),W.add(oe)}),A.pop(),y=null,W},this.compileAsync=function(R,U,V=null){const W=this.compile(R,U,V);return new Promise(J=>{function oe(){if(W.forEach(function(de){Oe.get(de).currentProgram.isReady()&&W.delete(de)}),W.size===0){J(R);return}setTimeout(oe,10)}le.get("KHR_parallel_shader_compile")!==null?oe():setTimeout(oe,10)})};let zn=null;function en(R){zn&&zn(R)}function Zi(){Ms.stop()}function $i(){Ms.start()}const Ms=new Gb;Ms.setAnimationLoop(en),typeof self<"u"&&Ms.setContext(self),this.setAnimationLoop=function(R){zn=R,ee.setAnimationLoop(R),R===null?Ms.stop():Ms.start()},ee.addEventListener("sessionstart",Zi),ee.addEventListener("sessionend",$i),this.render=function(R,U){if(U!==void 0&&U.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(w===!0)return;if(R.matrixWorldAutoUpdate===!0&&R.updateMatrixWorld(),U.parent===null&&U.matrixWorldAutoUpdate===!0&&U.updateMatrixWorld(),ee.enabled===!0&&ee.isPresenting===!0&&(ee.cameraAutoUpdate===!0&&ee.updateCamera(U),U=ee.getCamera()),R.isScene===!0&&R.onBeforeRender(S,R,U,I),y=Le.get(R,A.length),y.init(U),A.push(y),Ce.multiplyMatrices(U.projectionMatrix,U.matrixWorldInverse),Fe.setFromProjectionMatrix(Ce),Ee=this.localClippingEnabled,ue=Ve.init(this.clippingPlanes,Ee),_=st.get(R,g.length),_.init(
vendor: 4,681 bytes, line 3834
3834),g.push(_),ee.enabled===!0&&ee.isPresenting===!0){const oe=S.xr.getDepthSensingMesh();oe!==null&&pl(oe,U,-1/0,S.sortObjects)}pl(R,U,0,S.sortObjects),_.finish(),S.sortObjects===!0&&_.sort(k,ne),At=ee.enabled===!1||ee.isPresenting===!1||ee.hasDepthSensing()===!1,At&&Ne.addToRenderList(_,R),this.info.render.frame++,ue===!0&&Ve.beginShadows();const V=y.state.shadowsArray;pt.render(V,R,U),ue===!0&&Ve.endShadows(),this.info.autoReset===!0&&this.info.reset();const W=_.opaque,J=_.transmissive;if(y.setupLights(),U.isArrayCamera){const oe=U.cameras;if(J.length>0)for(let de=0,me=oe.length;de<me;de++){const ge=oe[de];Xs(W,J,R,ge)}At&&Ne.render(R);for(let de=0,me=oe.length;de<me;de++){const ge=oe[de];Hu(_,R,ge,ge.viewport)}}else J.length>0&&Xs(W,J,R,U),At&&Ne.render(R),Hu(_,R,U);I!==null&&(Je.updateMultisampleRenderTarget(I),Je.updateRenderTargetMipmap(I)),R.isScene===!0&&R.onAfterRender(S,R,U),_t.resetDefaultState(),D=-1,C=null,A.pop(),A.length>0?(y=A[A.length-1],ue===!0&&Ve.setGlobalState(S.clippingPlanes,y.state.camera)):y=null,g.pop(),g.length>0?_=g[g.length-1]:_=null};function pl(R,U,V,W){if(R.visible===!1)return;if(R.layers.test(U.layers)){if(R.isGroup)V=R.renderOrder;else if(R.isLOD)R.autoUpdate===!0&&R.update(U);else if(R.isLight)y.pushLight(R),R.castShadow&&y.pushShadow(R);else if(R.isSprite){if(!R.frustumCulled||Fe.intersectsSprite(R)){W&&De.setFromMatrixPosition(R.matrixWorld).applyMatrix4(Ce);const de=Te.update(R),me=R.material;me.visible&&_.push(R,de,me,V,De.z,null)}}else if((R.isMesh||R.isLine||R.isPoints)&&(!R.frustumCulled||Fe.intersectsObject(R))){const de=Te.update(R),me=R.material;if(W&&(R.boundingSphere!==void 0?(R.boundingSphere===null&&R.computeBoundingSphere(),De.copy(R.boundingSphere.center)):(de.boundingSphere===null&&de.computeBoundingSphere(),De.copy(de.boundingSphere.center)),De.applyMatrix4(R.matrixWorld).applyMatrix4(Ce)),Array.isArray(me)){const ge=de.groups;for(let ye=0,qe=ge.length;ye<qe;ye++){const Be=ge[ye],We=me[Be.materialIndex];We&&We.visible&&_.push(R,de,We,V,De.z,Be)}}else me.visible&&_.push(R,de,me,V,De.z,null)}}const oe=R.children;for(let de=0,me=oe.length;de<me;de++)pl(oe[de],U,V,W)}function Hu(R,U,V,W){const J=R.opaque,oe=R.transmissive,de=R.transparent;y.setupLightsView(V),ue===!0&&Ve.setGlobalState(S.clippingPlanes,V),W&&xe.viewport(b.copy(W)),J.length>0&&Js(J,U,V),oe.length>0&&Js(oe,U,V),de.length>0&&Js(de,U,V),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function Xs(R,U,V,W){if((V.isScene===!0?V.overrideMaterial:null)!==null)return;y.state.transmissionRenderTarget[W.id]===void 0&&(y.state.transmissionRenderTarget[W.id]=new Tr(1,1,{generateMipmaps:!0,type:le.has("EXT_color_buffer_half_float")||le.has("EXT_color_buffer_float")?vi:jr,minFilter:ps,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ln.workingColorSpace}));const oe=y.state.transmissionRenderTarget[W.id],de=W.viewport||b;oe.setSize(de.z,de.w);const me=S.getRenderTarget();S.setRenderTarget(oe),S.getClearColor(Y),q=S.getClearAlpha(),q<1&&S.setClearColor(16777215,.5),At?Ne.render(V):S.clear();const ge=S.toneMapping;S.toneMapping=po;const ye=W.viewport;if(W.viewport!==void 0&&(W.viewport=void 0),y.setupLightsView(W),ue===!0&&Ve.setGlobalState(S.clippingPlanes,W),Js(R,V,W),Je.updateMultisampleRenderTarget(oe),Je.updateRenderTargetMipmap(oe),le.has("WEBGL_multisampled_render_to_texture")===!1){let qe=!1;for(let Be=0,We=U.length;Be<We;Be++){const rt=U[Be],at=rt.object,Rt=rt.geometry,lt=rt.material,ze=rt.group;if(lt.side===fs&&at.layers.test(W.layers)){const gt=lt.side;lt.side=Mi,lt.needsUpdate=!0,js(at,V,W,Rt,lt,ze),lt.side=gt,lt.needsUpdate=!0,qe=!0}}qe===!0&&(Je.updateMultisampleRenderTarget(oe),Je.updateRenderTargetMipmap(oe))}S.setRenderTarget(me),S.setClearColor(Y,q),ye!==void 0&&(W.viewport=ye),S.toneMapping=ge}function Js(R,U,V){const W=U.isScene===!0?U.overrideMaterial:null;for(let J=0,oe=R.length;J<oe;J++){const de=R[J],me=de.object,ge=de.geometry,ye=W===null?de.material:W,qe=de.group;me.layers.test(V.layers)&&js(me,U,V,ge,ye,qe)}}function js(R,U,V,W,J,oe){R.onBeforeRender(S,U,V,W,J,oe),R.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,R.matrixWorld),R.normalMatrix.getNormalMatrix(R.modelViewMatrix),J.onBeforeRender(S,U,V,W,R,oe),J.transparent===!0&&J.side===fs&&J.forceSinglePass===!1?(J.side=Mi,J.needsUpdate=!0,S.renderBufferDirect(V,U,W,J,R,oe),J.side=xs,J.needsUpdate=!0,S.renderBufferDirect(V,U,W,J,R,oe),J.side=fs):S.renderBufferDirect(V,U,W,J,R,oe),R.onAfterRender(S,U,V,W,J,oe)}function Ii(R,U,V){U.isScene!==!0&&(U=dt);const W=Oe.get(R),J=y.state.lights,oe=y.state.shadowsArray,de=J.state.ver
vendor: 9,150 bytes, line 3834
3834sion,me=Se.getParameters(R,J.state,oe,U,V),ge=Se.getProgramCacheKey(me);let ye=W.programs;W.environment=R.isMeshStandardMaterial?U.environment:null,W.fog=U.fog,W.envMap=(R.isMeshStandardMaterial?G:ke).get(R.envMap||W.environment),W.envMapRotation=W.environment!==null&&R.envMap===null?U.environmentRotation:R.envMapRotation,ye===void 0&&(R.addEventListener("dispose",je),ye=new Map,W.programs=ye);let qe=ye.get(ge);if(qe!==void 0){if(W.currentProgram===qe&&W.lightsStateVersion===de)return ml(R,me),qe}else me.uniforms=Se.getUniforms(R),R.onBuild(V,me,S),R.onBeforeCompile(me,S),qe=Se.acquireProgram(me,ge),ye.set(ge,qe),W.uniforms=me.uniforms;const Be=W.uniforms;return(!R.isShaderMaterial&&!R.isRawShaderMaterial||R.clipping===!0)&&(Be.clippingPlanes=Ve.uniform),ml(R,me),W.needsLights=z(R),W.lightsStateVersion=de,W.needsLights&&(Be.ambientLightColor.value=J.state.ambient,Be.lightProbe.value=J.state.probe,Be.directionalLights.value=J.state.directional,Be.directionalLightShadows.value=J.state.directionalShadow,Be.spotLights.value=J.state.spot,Be.spotLightShadows.value=J.state.spotShadow,Be.rectAreaLights.value=J.state.rectArea,Be.ltc_1.value=J.state.rectAreaLTC1,Be.ltc_2.value=J.state.rectAreaLTC2,Be.pointLights.value=J.state.point,Be.pointLightShadows.value=J.state.pointShadow,Be.hemisphereLights.value=J.state.hemi,Be.directionalShadowMap.value=J.state.directionalShadowMap,Be.directionalShadowMatrix.value=J.state.directionalShadowMatrix,Be.spotShadowMap.value=J.state.spotShadowMap,Be.spotLightMatrix.value=J.state.spotLightMatrix,Be.spotLightMap.value=J.state.spotLightMap,Be.pointShadowMap.value=J.state.pointShadowMap,Be.pointShadowMatrix.value=J.state.pointShadowMatrix),W.currentProgram=qe,W.uniformsList=null,qe}function Ot(R){if(R.uniformsList===null){const U=R.currentProgram.getUniforms();R.uniformsList=tg.seqWithValue(U.seq,R.uniforms)}return R.uniformsList}function ml(R,U){const V=Oe.get(R);V.outputColorSpace=U.outputColorSpace,V.batching=U.batching,V.batchingColor=U.batchingColor,V.instancing=U.instancing,V.instancingColor=U.instancingColor,V.instancingMorph=U.instancingMorph,V.skinning=U.skinning,V.morphTargets=U.morphTargets,V.morphNormals=U.morphNormals,V.morphColors=U.morphColors,V.morphTargetsCount=U.morphTargetsCount,V.numClippingPlanes=U.numClippingPlanes,V.numIntersection=U.numClipIntersection,V.vertexAlphas=U.vertexAlphas,V.vertexTangents=U.vertexTangents,V.toneMapping=U.toneMapping}function Hf(R,U,V,W,J){U.isScene!==!0&&(U=dt),Je.resetTextureUnits();const oe=U.fog,de=W.isMeshStandardMaterial?U.environment:null,me=I===null?S.outputColorSpace:I.isXRRenderTarget===!0?I.texture.colorSpace:Ji,ge=(W.isMeshStandardMaterial?G:ke).get(W.envMap||de),ye=W.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,qe=!!V.attributes.tangent&&(!!W.normalMap||W.anisotropy>0),Be=!!V.morphAttributes.position,We=!!V.morphAttributes.normal,rt=!!V.morphAttributes.color;let at=po;W.toneMapped&&(I===null||I.isXRRenderTarget===!0)&&(at=S.toneMapping);const Rt=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,lt=Rt!==void 0?Rt.length:0,ze=Oe.get(W),gt=y.state.lights;if(ue===!0&&(Ee===!0||R!==C)){const rn=R===C&&W.id===D;Ve.setState(W,R,rn)}let ct=!1;W.version===ze.__version?(ze.needsLights&&ze.lightsStateVersion!==gt.state.version||ze.outputColorSpace!==me||J.isBatchedMesh&&ze.batching===!1||!J.isBatchedMesh&&ze.batching===!0||J.isBatchedMesh&&ze.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&ze.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&ze.instancing===!1||!J.isInstancedMesh&&ze.instancing===!0||J.isSkinnedMesh&&ze.skinning===!1||!J.isSkinnedMesh&&ze.skinning===!0||J.isInstancedMesh&&ze.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&ze.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&ze.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&ze.instancingMorph===!1&&J.morphTexture!==null||ze.envMap!==ge||W.fog===!0&&ze.fog!==oe||ze.numClippingPlanes!==void 0&&(ze.numClippingPlanes!==Ve.numPlanes||ze.numIntersection!==Ve.numIntersection)||ze.vertexAlphas!==ye||ze.vertexTangents!==qe||ze.morphTargets!==Be||ze.morphNormals!==We||ze.morphColors!==rt||ze.toneMapping!==at||ze.morphTargetsCount!==lt)&&(ct=!0):(ct=!0,ze.__version=W.version);let Gt=ze.currentProgram;ct===!0&&(Gt=Ii(W,U,J));let Pt=!1,Jt=!1,qn=!1;const zt=Gt.getUniforms(),gn=ze.uniforms;if(xe.useProgram(Gt.program)&&(Pt=!0,Jt=!0,qn=!0),W.id!==D&&(D=W.id,Jt=!0),Pt||C!==R){zt.setValue(Z,"projectionMatrix",R.projectionMatrix),zt.setValue(Z,"viewMatrix",R.matrixWorldInverse);const rn=zt.map.cameraPosition;rn!==void 0&&rn.setValue(Z,De.setFromMatrixPosition(R.matrixWorld)),Me.logarithmicDepthBuffer&&zt.setValue(Z,"logDepthBufFC",2/(Math.log(R.far+1)/Math.LN2)),(W.isMeshPhongMaterial||W.isMeshToonMaterial||W.isMeshLambertMaterial||W.isMeshBasicMaterial||W.isMeshStandardMaterial||W.isShaderMaterial)&&zt.setValue(Z,"isOrthographic",R.isOrthographicCamera===!0),C!==R&&(C=R,Jt=!0,qn=!0)}if(J.isSkinnedMesh){zt.setOptional(Z,J,"bindMatrix"),zt.setOptional(Z,J,"bindMatrixInverse");const rn=J.skeleton;rn&&(rn.boneTexture===null&&rn.computeBoneTexture(),zt.setValue(Z,"boneTexture",rn.boneTexture,Je))}J.isBatchedMesh&&(zt.setOptional(Z,J,"batchingTexture"),zt.setValue(Z,"batchingTexture",J._matricesTexture,Je),zt.setOptional(Z,J,"batchingColorTexture"),J._colorsTexture!==null&&zt.setValue(Z,"batchingColorTexture",J._colorsTexture,Je));const jt=V.morphAttributes;if((jt.position!==void 0||jt.normal!==void 0||jt.color!==void 0)&&Ke.update(J,V,Gt),(Jt||ze.receiveShadow!==J.receiveShadow)&&(ze.receiveShadow=J.receiveShadow,zt.setValue(Z,"receiveShadow",J.receiveShadow)),W.isMeshGouraudMaterial&&W.envMap!==null&&(gn.envMap.value=ge,gn.flipEnvMap.value=ge.isCubeTexture&&ge.isRenderTargetTexture===!1?-1:1),W.isMeshStandardMaterial&&W.envMap===null&&U.environment!==null&&(gn.envMapIntensity.value=U.environmentIntensity),Jt&&(zt.setValue(Z,"toneMappingExposure",S.toneMappingExposure),ze.needsLights&&L(gn,qn),oe&&W.fog===!0&&be.refreshFogUniforms(gn,oe),be.refreshMaterialUniforms(gn,W,pe,Q,y.state.transmissionRenderTarget[R.id]),tg.upload(Z,Ot(ze),gn,Je)),W.isShaderMaterial&&W.uniformsNeedUpdate===!0&&(tg.upload(Z,Ot(ze),gn,Je),W.uniformsNeedUpdate=!1),W.isSpriteMaterial&&zt.setValue(Z,"center",J.center),zt.setValue(Z,"modelViewMatrix",J.modelViewMatrix),zt.setValue(Z,"normalMatrix",J.normalMatrix),zt.setValue(Z,"modelMatrix",J.matrixWorld),W.isShaderMaterial||W.isRawShaderMaterial){const rn=W.uniformsGroups;for(let tn=0,Yt=rn.length;tn<Yt;tn++){const dn=rn[tn];Ct.update(dn,Gt),Ct.bind(dn,Gt)}}return Gt}function L(R,U){R.ambientLightColor.needsUpdate=U,R.lightProbe.needsUpdate=U,R.directionalLights.needsUpdate=U,R.directionalLightShadows.needsUpdate=U,R.pointLights.needsUpdate=U,R.pointLightShadows.needsUpdate=U,R.spotLights.needsUpdate=U,R.spotLightShadows.needsUpdate=U,R.rectAreaLights.needsUpdate=U,R.hemisphereLights.needsUpdate=U}function z(R){return R.isMeshLambertMaterial||R.isMeshToonMaterial||R.isMeshPhongMaterial||R.isMeshStandardMaterial||R.isShadowMaterial||R.isShaderMaterial&&R.lights===!0}this.getActiveCubeFace=function(){return P},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return I},this.setRenderTargetTextures=function(R,U,V){Oe.get(R.texture).__webglTexture=U,Oe.get(R.depthTexture).__webglTexture=V;const W=Oe.get(R);W.__hasExternalTextures=!0,W.__autoAllocateDepthBuffer=V===void 0,W.__autoAllocateDepthBuffer||le.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),W.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(R,U){const V=Oe.get(R);V.__webglFramebuffer=U,V.__useDefaultFramebuffer=U===void 0},this.setRenderTarget=function(R,U=0,V=0){I=R,P=U,T=V;let W=!0,J=null,oe=!1,de=!1;if(R){const ge=Oe.get(R);ge.__useDefaultFramebuffer!==void 0?(xe.bindFramebuffer(Z.FRAMEBUFFER,null),W=!1):ge.__webglFramebuffer===void 0?Je.setupRenderTarget(R):ge.__hasExternalTextures&&Je.rebindTextures(R,Oe.get(R.texture).__webglTexture,Oe.get(R.depthTexture).__webglTexture);const ye=R.texture;(ye.isData3DTexture||ye.isDataArrayTexture||ye.isCompressedArrayTexture)&&(de=!0);const qe=Oe.get(R).__webglFramebuffer;R.isWebGLCubeRenderTarget?(Array.isArray(qe[U])?J=qe[U][V]:J=qe[U],oe=!0):R.samples>0&&Je.useMultisampledRTT(R)===!1?J=Oe.get(R).__webglMultisampledFramebuffer:Array.isArray(qe)?J=qe[V]:J=qe,b.copy(R.viewport),N.copy(R.scissor),j=R.scissorTest}else b.copy(te).multiplyScalar(pe).floor(),N.copy(ce).multiplyScalar(pe).floor(),j=_e;if(xe.bindFramebuffer(Z.FRAMEBUFFER,J)&&W&&xe.drawBuffers(R,J),xe.viewport(b),xe.scissor(N),xe.setScissorTest(j),oe){const ge=Oe.get(R.texture);Z.framebufferTexture2D(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_CUBE_MAP_POSITIVE_X+U,ge.__webglTexture,V)}else if(de){const ge=Oe.get(R.texture),ye=U||0;Z.framebufferTextureLayer(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,ge.__webglTexture,V||0,ye)}D=-1},this.readRenderTargetPixels=function(R,U,V,W,J,oe,de){if(!(R&&R.isWebG
3834LRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let me=Oe.get(R).__webglFramebuffer;if(R.isWebGLCubeRenderTarget&&de!==void 0&&(me=me[de]),me){xe.bindFramebuffer(Z.FRAMEBUFFER,me);try{const ge=R.texture,ye=ge.format,qe=ge.type;if(!Me.textureFormatReadable(ye)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Me.textureTypeReadable(qe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}U>=0&&U<=R.width-W&&V>=0&&V<=R.height-J&&Z.readPixels(U,V,W,J,Ue.convert(ye),Ue.convert(qe),oe)}finally{const ge=I!==null?Oe.get(I).__webglFramebuffer:null;xe.bindFramebuffer(Z.FRAMEBUFFER,ge)}}},this.readRenderTargetPixelsAsync=async function(R,U,V,W,J,oe,de){if(!(R&&R.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let me=Oe.get(R).__webglFramebuffer;if(R.isWebGLCubeRenderTarget&&de!==void 0&&(me=me[de]),me){xe.bindFramebuffer(Z.FRAMEBUFFER,me);try{const ge=R.texture,ye=ge.format,qe=ge.type;if(!Me.textureFormatReadable(ye))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Me.textureTypeReadable(qe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(U>=0&&U<=R.width-W&&V>=0&&V<=R.height-J){const Be=Z.createBuffer();Z.bindBuffer(Z.PIXEL_PACK_BUFFER,Be),Z.bufferData(Z.PIXEL_PACK_BUFFER,oe.byteLength,Z.STREAM_READ),Z.readPixels(U,V,W,J,Ue.convert(ye),Ue.convert(qe),0),Z.flush();const We=Z.fenceSync(Z.SYNC_GPU_COMMANDS_COMPLETE,0);await j4(Z,We,4);try{Z.bindBuffer(Z.PIXEL_PACK_BUFFER,Be),Z.getBufferSubData(Z.PIXEL_PACK_BUFFER,0,oe)}finally{Z.deleteBuffer(Be),Z.deleteSync(We)}return oe}}finally{const ge=I!==null?Oe.get(I).__webglFramebuffer:null;xe.bindFramebuffer(Z.FRAMEBUFFER,ge)}}},this.copyFramebufferToTexture=function(R,U=null,V=0){R.isTexture!==!0&&(console.warn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),U=arguments[0]||null,R=arguments[1]);const W=Math.pow(2,-V),J=Math.floor(R.image.width*W),oe=Math.floor(R.image.height*W),de=U!==null?U.x:0,me=U!==null?U.y:0;Je.setTexture2D(R,0),Z.copyTexSubImage2D(Z.TEXTURE_2D,V,0,0,de,me,J,oe),xe.unbindTexture()},this.copyTextureToTexture=function(R,U,V=null,W=null,J=0){R.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture function signature has changed."),W=arguments[0]||null,R=arguments[1],U=arguments[2],J=arguments[3]||0,V=null);let oe,de,me,ge,ye,qe;V!==null?(oe=V.max.x-V.min.x,de=V.max.y-V.min.y,me=V.min.x,ge=V.min.y):(oe=R.image.width,de=R.image.height,me=0,ge=0),W!==null?(ye=W.x,qe=W.y):(ye=0,qe=0);const Be=Ue.convert(U.format),We=Ue.convert(U.type);Je.setTexture2D(U,0),Z.pixelStorei(Z.UNPACK_FLIP_Y_WEBGL,U.flipY),Z.pixelStorei(Z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),Z.pixelStorei(Z.UNPACK_ALIGNMENT,U.unpackAlignment);const rt=Z.getParameter(Z.UNPACK_ROW_LENGTH),at=Z.getParameter(Z.UNPACK_IMAGE_HEIGHT),Rt=Z.getParameter(Z.UNPACK_SKIP_PIXELS),lt=Z.getParameter(Z.UNPACK_SKIP_ROWS),ze=Z.getParameter(Z.UNPACK_SKIP_IMAGES),gt=R.isCompressedTexture?R.mipmaps[J]:R.image;Z.pixelStorei(Z.UNPACK_ROW_LENGTH,gt.width),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,gt.height),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,me),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,ge),R.isDataTexture?Z.texSubImage2D(Z.TEXTURE_2D,J,ye,qe,oe,de,Be,We,gt.data):R.isCompressedTexture?Z.compressedTexSubImage2D(Z.TEXTURE_2D,J,ye,qe,gt.width,gt.height,Be,gt.data):Z.texSubImage2D(Z.TEXTURE_2D,J,ye,qe,Be,We,gt),Z.pixelStorei(Z.UNPACK_ROW_LENGTH,rt),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,at),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,Rt),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,lt),Z.pixelStorei(Z.UNPACK_SKIP_IMAGES,ze),J===0&&U.generateMipmaps&&Z.generateMipmap(Z.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(R,U,V=null,W=null,J=0){R.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),V=arguments[0]||null,W=arguments[1]||null,R=arguments[2],U=arguments[3],J=arguments[4]||0);let oe,de,me,ge,ye,qe,Be,We,rt;const at=R.isCompressedTexture?R.mipmaps[J]:R.image;V!==null?(oe=V.max.x-V.min.x,de=V.max.y-V.min.y,me=V.max.z-V.min.z,ge=V.min.x,ye=V.min.y,qe=V.min.z):(oe=at.width,de=at.height,me=at.depth,ge=0,ye=0,qe=0),W!==null?(Be=W.x,We=W.y,rt=W.z):(Be=0,We=0,rt=0);const Rt=Ue.convert(U.format),lt=Ue.convert(U.type);let ze;if(U.isData3DTexture)Je.setTexture3D(U,0),ze=Z.TEXTURE_3D;else if(U.isDataArrayTexture||U.isCompressedArrayTexture)Je.setTexture2DArray(U,0),ze=Z.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Z.pixelStorei(Z.UNPACK_FLIP_Y_WEBGL,U.flipY),Z.pixelStorei(Z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),Z.pixelStorei(Z.UNPACK_ALIGNMENT,U.unpackAlignment);const gt=Z.getParameter(Z.UNPACK_ROW_LENGTH),ct=Z.getParameter(Z.UNPACK_IMAGE_HEIGHT),Gt=Z.getParameter(Z.UNPACK_SKIP_PIXELS),Pt=Z.getParameter(Z.UNPACK_SKIP_ROWS),Jt=Z.getParameter(Z.UNPACK_SKIP_IMAGES);Z.pixelStorei(Z.UNPACK_ROW_LENGTH,at.width),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,at.height),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,ge),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,ye),Z.pixelStorei(Z.UNPACK_SKIP_IMAGES,qe),R.isDataTexture||R.isData3DTexture?Z.texSubImage3D(ze,J,Be,We,rt,oe,de,me,Rt,lt,at.data):U.isCompressedArrayTexture?Z.compressedTexSubImage3D(ze,J,Be,We,rt,oe,de,me,Rt,at.data):Z.texSubImage3D(ze,J,Be,We,rt,oe,de,me,Rt,lt,at),Z.pixelStorei(Z.UNPACK_ROW_LENGTH,gt),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,ct),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,Gt),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,Pt),Z.pixelStorei(Z.UNPACK_SKIP_IMAGES,Jt),J===0&&U.generateMipmaps&&Z.generateMipmap(ze),xe.unbindTexture()},this.initRenderTarget=function(R){Oe.get(R).__webglFramebuffer===void 0&&Je.setupRenderTarget(R)},this.initTexture=function(R){R.isCubeTexture?Je.setTextureCube(R,0):R.isData3DTexture?Je.setTexture3D(R,0):R.isDataArrayTexture||R.isCompressedArrayTexture?Je.setTexture2DArray(R,0):Je.setTexture2D(R,0),xe.unbindTexture()},this.resetState=function(){P=0,T=0,I=null,xe.reset(),_t.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ao}get outputColorSpace(){return this._outputColorSpace}
vendor: 20,519 bytes, line 3834
3834set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===fv?"display-p3":"srgb",t.unpackColorSpace=ln.workingColorSpace===np?"display-p3":"srgb"}}class mv{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new He(e),this.density=t}clone(){return new mv(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class gv{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new He(e),this.near=t,this.far=n}clone(){return new gv(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Eu extends Zt{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 Yr,this.environmentIntensity=1,this.environmentRotation=new Yr,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 op{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Dh,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Wr()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return zS("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,s=this.stride;r<s;r++)this.array[e+r]=t.array[n+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=Wr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Wr()),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 ir=new H;class tl{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,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,n=this.data.count;t<n;t++)ir.fromBufferAttribute(this,t),ir.applyMatrix4(e),this.setXYZ(t,ir.x,ir.y,ir.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ir.fromBufferAttribute(this,t),ir.applyNormalMatrix(e),this.setXYZ(t,ir.x,ir.y,ir.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ir.fromBufferAttribute(this,t),ir.transformDirection(e),this.setXYZ(t,ir.x,ir.y,ir.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=or(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ft(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=Ft(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Ft(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Ft(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Ft(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=or(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=or(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=or(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=or(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array),r=Ft(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ft(t,this.array),n=Ft(n,this.array),r=Ft(r,this.array),s=Ft(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,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 n=0;n<this.count;n++){const r=n*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[r+s])}return new $t(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 tl(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const r=n*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 KS extends Qn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new He(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 _c;const xd=new H,yc=new H,xc=new H,Ac=new Re,Ad=new Re,Kb=new mt,jm=new H,Sd=new H,Ym=new H,ET=new Re,z1=new Re,wT=new Re;class Qb extends Zt{constructor(e=new KS){if(super(),this.isSprite=!0,this.type="Sprite",_c===void 0){_c=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]),n=new op(t,5);_c.setIndex([0,1,2,0,2,3]),_c.setAttribute("position",new tl(n,3,0,!1)),_c.setAttribute("uv",new tl(n,2,3,!1))}this.geometry=_c,this.material=e,this.center=new Re(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),yc.setFromMatrixScale(this.matrixWorld),Kb.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),xc.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&yc.multiplyScalar(-xc.z);const n=this.material.rotation;let r,s;n!==0&&(s=Math.cos(n),r=Math.sin(n));const o=this.center;Km(jm.set(-.5,-.5,0),xc,o,yc,r,s),Km(Sd.set(.5,-.5,0),xc,o,yc,r,s),Km(Ym.set(.5,.5,0),xc,o,yc,r,s),ET.set(0,0),z1.set(1,0),wT.set(1,1);let a=e.ray.intersectTriangle(jm,Sd,Ym,!1,xd);if(a===null&&(Km(Sd.set(-.5,.5,0),xc,o,yc,r,s),z1.set(0,1),a=e.ray.intersectTriangle(jm,Ym,Sd,!1,xd),a===null))return;const l=e.ray.origin.distanceTo(xd);l<e.near||l>e.far||t.push({distance:l,point:xd.clone(),uv:zr.getInterpolation(xd,jm,Sd,Ym,ET,z1,wT,new Re),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 Km(i,e,t,n,r,s){Ac.subVectors(i,t).addScalar(.5).multiply(n),r!==void 0?(Ad.x=s*Ac.x-r*Ac.y,Ad.y=r*Ac.x+s*Ac.y):Ad.copy(Ac),i.copy(e),i.x+=Ad.x,i.y+=Ad.y,i.applyMatrix4(Kb)}const Qm=new H,MT=new H;class qb extends Zt{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 n=0,r=t.length;n<r;n++){const s=t[n];this.addLevel(s.object.clone(),s.distance,s.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=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:n,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let s=t[n].distance;if(t[n].object.visible&&(s-=s*t[n].hysteresis),e<s)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){Qm.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(Qm);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Qm.setFromMatrixPosition(e.matrixWorld),MT.setFromMatrixPosition(this.matrixWorld);const n=Qm.distanceTo(MT)/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),n>=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 n=this.levels;for(let r=0,s=n.length;r<s;r++){const o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const CT=new H,TT=new cn,RT=new cn,$6=new H,PT=new mt,qm=new H,k1=new Ti,bT=new mt,G1=new Ff;class QS extends Mn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Cx,this.bindMatrix=new mt,this.bindMatrixInverse=new mt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new ji),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qm),this.boundingBox.expandByPoint(qm)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ti),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qm),this.boundingSphere.expandByPoint(qm)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),k1.copy(this.boundingSphere),k1.applyMatrix4(r),e.ray.intersectsSphere(k1)!==!1&&(bT.copy(r).invert(),G1.copy(e.ray).applyMatrix4(bT),!(this.boundingBox!==null&&G1.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,G1)))}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 cn,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===Cx?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===db?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;TT.fromBufferAttribute(r.attributes.skinIndex,e),RT.fromBufferAttribute(r.attributes.skinWeight,e),CT.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=RT.getComponent(s);if(o!==0){const a=TT.getComponent(s);PT.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector($6.copy(CT).applyMatrix4(PT),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class vv extends Zt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class mo extends qt{constructor(e=null,t=1,n=1,r,s,o,a,l,u=li,f=li,h,p){super(null,o,a,l,u,f,r,s,h,p),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const IT=new mt,ez=new mt;class ap{constructor(e=[],t=[]){this.uuid=Wr(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new mt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new mt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const a=e[s]?e[s].matrixWorld:ez;IT.multiplyMatrices(a,t[s]),IT.toArray(n,s*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new ap(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new mo(t,e,e,ii,Nn);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const 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 n=0,r=e.bones.length;n<r;n++){const s=e.bones[n];let o=t[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new vv),this.bones.push(o),this.boneInverses.push(new mt().fromArray(e.boneInverses[n]))}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,n=this.boneInverses;for(let r=0,s=t.length;r<s;r++){const o=t[r];e.bones.push(o.uuid);const a=n[r];e.boneInverses.push(a.toArray())}return e}}class wu extends $t{constructor(e,t,n,r=1){super(e,t,n),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 Sc=new mt,BT=new mt,Zm=[],DT=new ji,tz=new mt,Ed=new Mn,wd=new Ti;class qS extends Mn{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new wu(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<n;r++)this.setMatrixAt(r,tz)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new ji),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Sc),DT.copy(e.boundingBox).applyMatrix4(Sc),this.boundingBox.union(DT)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ti),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Sc),wd.copy(e.boundingSphere).applyMatrix4(Sc),this.boundingSphere.union(wd)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const n=t.morphTargetInfluences,r=this.morphTexture.source.data.data,s=n.length+1,o=e*s+1;for(let a=0;a<n.length;a++)n[a]=r[o+a]}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Ed.geometry=this.geometry,Ed.material=this.material,Ed.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),wd.copy(this.boundingSphere),wd.applyMatrix4(n),e.ray.intersectsSphere(wd)!==!1))for(let s=0;s<r;s++){this.getMatrixAt(s,Sc),BT.multiplyMatrices(n,Sc),Ed.matrixWorld=BT,Ed.raycast(e,Zm);for(let o=0,a=Zm.length;o<a;o++){const l=Zm[o];l.instanceId=s,l.object=this,t.push(l)}Zm.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new wu(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){const n=t.morphTargetInfluences,r=n.length+1;this.morphTexture===null&&(this.morphTexture=new mo(new Float32Array(r*this.count),r,this.count,uv,Nn));const s=this.morphTexture.source.data.data;let o=0;for(let u=0;u<n.length;u++)o+=n[u];const a=this.geometry.morphTargetsRelative?1:1-o,l=r*e;s[l]=a,s.set(n,l+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}function nz(i,e){return i.z-e.z}function iz(i,e){return e.z-i.z}class rz{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t){const n=this.pool,r=this.list;this.index>=n.length&&n.push({start:-1,count:-1,z:-1});const s=n[this.index];r.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=t}reset(){this.list.length=0,this.index=0}}const Ec="batchId",_a=new mt,H1=new mt,sz=new mt,oz=new He(1,1,1),FT=new mt,V1=new sp,$m=new ji,Il=new Ti,Md=new H,LT=new H,az=new H,W1=new rz,ki=new Mn,e0=[];function lz(i,e,t=0){const n=e.itemSize;
3834if(i.isInterleavedBufferAttribute||i.array.constructor!==e.array.constructor){const r=i.count;for(let s=0;s<r;s++)for(let o=0;o<n;o++)e.setComponent(s+t,o,i.getComponent(s,o))}else e.array.set(i.array,t*n);e.needsUpdate=!0}class Zb extends Mn{get maxGeometryCount(){return this._maxGeometryCount}constructor(e,t,n=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._drawRanges=[],this._reservedRanges=[],this._visibility=[],this._active=[],this._bounds=[],this._maxGeometryCount=e,this._maxVertexCount=t,this._maxIndexCount=n,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._initMatricesTexture(),this._colorsTexture=null}_initMatricesTexture(){let e=Math.sqrt(this._maxGeometryCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new mo(t,e,e,ii,Nn);this._matricesTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxGeometryCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),n=new mo(t,e,e,ii,Nn);
vendor: 8,820 bytes, line 3834
3834n.colorSpace=ln.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,r=this._maxGeometryCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const a in e.attributes){const l=e.getAttribute(a),{array:u,itemSize:f,normalized:h}=l,p=new u.constructor(n*f),m=new $t(p,f,h);t.setAttribute(a,m)}if(e.getIndex()!==null){const a=n>65536?new Uint32Array(s):new Uint16Array(s);t.setIndex(new $t(a,1))}const o=r>65536?new Uint32Array(n):new Uint16Array(n);t.setAttribute(Ec,new $t(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(Ec))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Ec}"`);const t=this.geometry;if(Boolean(e.getIndex())!==Boolean(t.getIndex()))throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(n===Ec)continue;if(!e.hasAttribute(n))throw new Error(`BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const r=e.getAttribute(n),s=t.getAttribute(n);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 ji);const e=this._geometryCount,t=this.boundingBox,n=this._active;t.makeEmpty();for(let r=0;r<e;r++)n[r]!==!1&&(this.getMatrixAt(r,_a),this.getBoundingBoxAt(r,$m).applyMatrix4(_a),t.union($m))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ti);const e=this._geometryCount,t=this.boundingSphere,n=this._active;t.makeEmpty();for(let r=0;r<e;r++)n[r]!==!1&&(this.getMatrixAt(r,_a),this.getBoundingSphereAt(r,Il).applyMatrix4(_a),t.union(Il))}addGeometry(e,t=-1,n=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._geometryCount>=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry 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 u=e.getIndex(),f=u!==null;if(f&&(n===-1?r.indexCount=u.count:r.indexCount=n,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 h=this._visibility,p=this._active,m=this._matricesTexture,v=this._matricesTexture.image.data,_=this._colorsTexture;h.push(!0),p.push(!0);const y=this._geometryCount;this._geometryCount++,sz.toArray(v,y*16),m.needsUpdate=!0,_!==null&&(oz.toArray(_.image.data,y*4),_.needsUpdate=!0),o.push(r),a.push({start:f?r.indexStart:r.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new ji,sphereInitialized:!1,sphere:new Ti});const g=this.geometry.getAttribute(Ec);for(let A=0;A<r.vertexCount;A++)g.setX(r.vertexStart+A,y);return g.needsUpdate=!0,this.setGeometryAt(y,e),y}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,r=n.getIndex()!==null,s=n.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,u=a.vertexCount;for(const m in n.attributes){if(m===Ec)continue;const v=t.getAttribute(m),_=n.getAttribute(m);lz(v,_,l);const y=v.itemSize;for(let g=v.count,A=u;g<A;g++){const S=l+g;for(let w=0;w<y;w++)_.setComponent(S,w,0)}_.needsUpdate=!0,_.addUpdateRange(l*y,u*y)}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 h=this._drawRanges[e],p=t.getAttribute("position");return h.count=r?o.count:p.count,this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._active;return e>=t.length||t[e]===!1?this:(t[e]=!1,this._visibilityChanged=!0,this)}getInstanceCountAt(e){return this._multiDrawInstances===null?null:this._multiDrawInstances[e]}setInstanceCountAt(e,t){return this._multiDrawInstances===null&&(this._multiDrawInstances=new Int32Array(this._maxGeometryCount).fill(1)),this._multiDrawInstances[e]=t,e}getBoundingBoxAt(e,t){if(this._active[e]===!1)return null;const r=this._bounds[e],s=r.box,o=this.geometry;if(r.boxInitialized===!1){s.makeEmpty();const a=o.index,l=o.attributes.position,u=this._drawRanges[e];for(let f=u.start,h=u.start+u.count;f<h;f++){let p=f;a&&(p=a.getX(p)),s.expandByPoint(Md.fromBufferAttribute(l,p))}r.boxInitialized=!0}return t.copy(s),t}getBoundingSphereAt(e,t){if(this._active[e]===!1)return null;const r=this._bounds[e],s=r.sphere,o=this.geometry;if(r.sphereInitialized===!1){s.makeEmpty(),this.getBoundingBoxAt(e,$m),$m.getCenter(s.center);const a=o.index,l=o.attributes.position,u=this._drawRanges[e];let f=0;for(let h=u.start,p=u.start+u.count;h<p;h++){let m=h;a&&(m=a.getX(m)),Md.fromBufferAttribute(l,m),f=Math.max(f,s.center.distanceToSquared(Md))}s.radius=Math.sqrt(f),r.sphereInitialized=!0}return t.copy(s),t}setMatrixAt(e,t){const n=this._active,r=this._matricesTexture,s=this._matricesTexture.image.data,o=this._geometryCount;return e>=o||n[e]===!1?this:(t.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,t){const n=this._active,r=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||n[e]===!1?null:t.fromArray(r,e*16)}setColorAt(e,t){this._colorsTexture===null&&this._initColorsTexture();const n=this._active,r=this._colorsTexture,s=this._colorsTexture.image.data,o=this._geometryCount;return e>=o||n[e]===!1?this:(t.toArray(s,e*4),r.needsUpdate=!0,this)}getColorAt(e,t){const n=this._active,r=this._colorsTexture.image.data,s=this._geometryCount;return e>=s||n[e]===!1?null:t.fromArray(r,e*4)}setVisibleAt(e,t){const n=this._visibility,r=this._active,s=this._geometryCount;return e>=s||r[e]===!1||n[e]===t?this:(n[e]=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._visibility,n=this._active,r=this._geometryCount;return e>=r||n[e]===!1?!1:t[e]}raycast(e,t){const n=this._visibility,r=this._active,s=this._drawRanges,o=this._geometryCount,a=this.matrixWorld,l=this.geometry;ki.material=this.material,ki.geometry.index=l.index,ki.geometry.attributes=l.attributes,ki.geometry.boundingBox===null&&(ki.geometry.boundingBox=new ji),ki.geometry.boundingSphere===null&&(ki.geometry.boundingSphere=new Ti);for(let u=0;u<o;u++){if(!n[u]||!r[u])continue;const f=s[u];ki.geometry.setDrawRange(f.start,f.count),this.getMatrixAt(u,ki.matrixWorld).premultiply(a),this.getBoundingBoxAt(u,ki.geometry.boundingBox),this.getBoundingSphereAt(u,ki.geometry.boundingSphere),ki.raycast(e,e0);for(let h=0,p=e0.length;h<p;h++){const m=e0[h];m.object=this,m.batchId=u,t.push(m)}e0.length=0}ki.material=null,ki.geometry.index=null,ki.geometry.attributes={},ki.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._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,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.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}
3834onBeforeRender(e,t,n,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._active,u=this._visibility,f=this._multiDrawStarts,h=this._multiDrawCounts,p=this._drawRanges,m=this.perObjectFrustumCulled;m&&(FT.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),V1.setFromProjectionMatrix(FT,e.coordinateSystem));let v=0;if(this.sortObjects){H1.copy(this.matrixWorld).invert(),Md.setFromMatrixPosition(n.matrixWorld).applyMatrix4(H1),LT.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(H1);for(let g=0,A=u.length;g<A;g++)if(u[g]&&l[g]){this.getMatrixAt(g,_a),this.getBoundingSphereAt(g,Il).applyMatrix4(_a);let S=!1;if(m&&(S=!V1.intersectsSphere(Il)),!S){const w=az.subVectors(Il.center,Md).dot(LT);W1.push(p[g],w)}}const _=W1.list,y=this.customSort;y===null?_.sort(s.transparent?iz:nz):y.call(this,_,n);for(let g=0,A=_.length;g<A;g++){const S=_[g];f[v]=S.start*a,h[v]=S.count,v++}W1.reset()}else for(let _=0,y=u.length;_<y;_++)if(u[_]&&l[_]){let g=!1;if(m&&(this.getMatrixAt(_,_a),this.getBoundingSphereAt(_,Il).applyMatrix4(_a),g=!V1.intersectsSphere(Il)),!g){const A=p[_];f[v]=A.start*a,h[v]=A.count,v++}}this._multiDrawCount=v,this._visibilityChanged=!1}onBeforeShadow(e,t,n,r,s,o){this.onBeforeRender(e,null,r,s,o)}}class qi extends Qn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new He(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 Dg=new H,Fg=new H,NT=new mt,Cd=new Ff,t0=new Ti,X1=new H,OT=new H;class qo extends Zt{constructor(e=new Bt,t=new qi){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,n=[0];for(let r=1,s=t.count;r<s;r++)Dg.fromBufferAttribute(t,r-1),Fg.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=Dg.distanceTo(Fg);e.setAttribute("lineDistance",new ht(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),t0.copy(n.boundingSphere),t0.applyMatrix4(r),t0.radius+=s,e.ray.intersectsSphere(t0)===!1)return;NT.copy(r).invert(),Cd.copy(e.ray).applyMatrix4(NT);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,u=this.isLineSegments?2:1,f=n.index,p=n.attributes.position;if(f!==null){const m=Math.max(0,o.start),v=Math.min(f.count,o.start+o.count);for(let _=m,y=v-1;_<y;_+=u){const g=f.getX(_),A=f.getX(_+1),S=n0(this,e,Cd,l,g,A);S&&t.push(S)}if(this.isLineLoop){const _=f.getX(v-1),y=f.getX(m),g=n0(this,e,Cd,l,_,y);g&&t.push(g)}}else{const m=Math.max(0,o.start),v=Math.min(p.count,o.start+o.count);for(let _=m,y=v-1;_<y;_+=u){const g=n0(this,e,Cd,l,_,_+1);g&&t.push(g)}if(this.isLineLoop){const _=n0(this,e,Cd,l,v-1,m);_&&t.push(_)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[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 n0(i,e,t,n,r,s){const o=i.geometry.attributes.position;if(Dg.fromBufferAttribute(o,r),Fg.fromBufferAttribute(o,s),t.distanceSqToSegment(Dg,Fg,X1,OT)>n)return;X1.applyMatrix4(i.matrixWorld);const l=e.ray.origin.distanceTo(X1);if(!(l<e.near||l>e.far))return{distance:l,point:OT.clone().applyMatrix4(i.matrixWorld),index:r,face:null,faceIndex:null,object:i}}const UT=new H,zT=new H;class Hs extends qo{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let r=0,s=t.count;r<s;r+=2)UT.fromBufferAttribute(t,r),zT.fromBufferAttribute(t,r+1),n[r]=r===0?0:n[r-1],n[r+1]=n[r]+UT.distanceTo(zT);
vendor: 12,232 bytes, line 3834
3834e.setAttribute("lineDistance",new ht(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class ZS extends qo{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class _v extends Qn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new He(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 kT=new mt,sA=new Ff,i0=new Ti,r0=new H;class $S extends Zt{constructor(e=new Bt,t=new _v){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 n=this.geometry,r=this.matrixWorld,s=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),i0.copy(n.boundingSphere),i0.applyMatrix4(r),i0.radius+=s,e.ray.intersectsSphere(i0)===!1)return;kT.copy(r).invert(),sA.copy(e.ray).applyMatrix4(kT);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,u=n.index,h=n.attributes.position;if(u!==null){const p=Math.max(0,o.start),m=Math.min(u.count,o.start+o.count);for(let v=p,_=m;v<_;v++){const y=u.getX(v);r0.fromBufferAttribute(h,y),GT(r0,y,l,r,e,t,this)}}else{const p=Math.max(0,o.start),m=Math.min(h.count,o.start+o.count);for(let v=p,_=m;v<_;v++)r0.fromBufferAttribute(h,v),GT(r0,v,l,r,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[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 GT(i,e,t,n,r,s,o){const a=sA.distanceSqToPoint(i);if(a<t){const l=new H;sA.closestPointToPoint(i,l),l.applyMatrix4(n);const u=r.ray.origin.distanceTo(l);if(u<r.near||u>r.far)return;s.push({distance:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class $b extends qt{constructor(e,t,n,r,s,o,a,l,u){super(e,t,n,r,s,o,a,l,u),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Qt,this.magFilter=s!==void 0?s:Qt,this.generateMipmaps=!1;const f=this;function h(){f.needsUpdate=!0,e.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(h)}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 uz extends qt{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=li,this.minFilter=li,this.generateMipmaps=!1,this.needsUpdate=!0}}class yv extends qt{constructor(e,t,n,r,s,o,a,l,u,f,h,p){super(null,o,a,l,u,f,r,s,h,p),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class cz extends yv{constructor(e,t,n,r,s,o){super(e,t,n,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Kn,this.layerUpdates=new Set}addLayerUpdates(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class fz extends yv{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,_o),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class dz extends qt{constructor(e,t,n,r,s,o,a,l,u){super(e,t,n,r,s,o,a,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Vs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),s+=n.distanceTo(r),t.push(s),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const s=n.length;let o;t?o=t:o=e*n[s-1];let a=0,l=s-1,u;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),u=n[r]-o,u<0)a=r+1;else if(u>0)l=r-1;else{l=r;break}if(r=l,n[r]===o)return r/(s-1);const f=n[r],p=n[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 Re:new H);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new H,r=[],s=[],o=[],a=new H,l=new mt;for(let m=0;m<=e;m++){const v=m/e;r[m]=this.getTangentAt(v,new H)}s[0]=new H,o[0]=new H;let u=Number.MAX_VALUE;const f=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);f<=u&&(u=f,n.set(1,0,0)),h<=u&&(u=h,n.set(0,1,0)),p<=u&&n.set(0,0,1),a.crossVectors(r[0],n).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(Vn(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(Vn(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 xv extends Vs{constructor(e=0,t=0,n=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=n,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new Re){const n=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),u=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const f=Math.cos(this.aRotation),h=Math.sin(this.aRotation),p=l-this.aX,m=u-this.aY;l=p*f-m*h+this.aX,u=p*h+m*f+this.aY}return n.set(l,u)}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 eI extends xv{constructor(e,t,n,r,s,o){super(e,t,n,n,r,s,o),this.isArcCurve=!0,this.type="ArcCurve"}}function eE(){let i=0,e=0,t=0,n=0;function r(s,o,a,l){i=s,e=a,t=-3*s+3*o-2*a-l,n=2*s-2*o+a+l}return{initCatmullRom:function(s,o,a,l,u){r(o,a,u*(a-s),u*(l-o))},initNonuniformCatmullRom:function(s,o,a,l,u,f,h){let p=(o-s)/u-(a-s)/(u+f)+(a-o)/f,m=(a-o)/f-(l-o)/(f+h)+(l-a)/h;p*=f,m*=f,r(o,a,p,m)},calc:function(s){const o=s*s,a=o*s;return i+e*s+t*o+n*a}}}const s0=new H,J1=new eE,j1=new eE,Y1=new eE;class tI extends Vs{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new H){const n=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 u,f;this.closed||a>0?u=r[(a-1)%s]:(s0.subVectors(r[0],r[1]).add(r[0]),u=s0);const h=r[a%s],p=r[(a+1)%s];if(this.closed||a+2<s?f=r[(a+2)%s]:(s0.subVectors(r[s-1],r[s-2]).add(r[s-1]),f=s0),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let v=Math.pow(u.distanceToSquared(h),m),_=Math.pow(h.distanceToSquared(p),m),y=Math.pow(p.distanceToSquared(f),m);_<1e-4&&(_=1),v<1e-4&&(v=_),y<1e-4&&(y=_),J1.initNonuniformCatmullRom(u.x,h.x,p.x,f.x,v,_,y),j1.initNonuniformCatmullRom(u.y,h.y,p.y,f.y,v,_,y),Y1.initNonuniformCatmullRom(u.z,h.z,p.z,f.z,v,_,y)}else this.curveType==="catmullrom"&&(J1.initCatmullRom(u.x,h.x,p.x,f.x,this.tension),j1.initCatmullRom(u.y,h.y,p.y,f.y,this.tension),Y1.initCatmullRom(u.z,h.z,p.z,f.z,this.tension));return n.set(J1.calc(l),j1.calc(l),Y1.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;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,n=this.points.length;t<n;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,n=e.points.length;t<n;t++){const r=e.points[t];this.points.push(new H().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function HT(i,e,t,n,r){const s=(n-e)*.5,o=(r-t)*.5,a=i*i,l=i*a;return(2*t-2*n+s+o)*l+(-3*t+3*n-2*s-o)*a+s*i+t}function hz(i,e){const t=1-i;return t*t*e}function pz(i,e){return 2*(1-i)*i*e}function mz(i,e){return i*i*e}function nh(i,e,t,n){return hz(i,e)+pz(i,t)+mz(i,n)}function gz(i,e){const t=1-i;return t*t*t*e}function vz(i,e){const t=1-i;return 3*t*t*i*e}function _z(i,e){return 3*(1-i)*i*i*e}function yz(i,e){return i*i*i*e}function ih(i,e,t,n,r){return gz(i,e)+vz(i,t)+_z(i,n)+yz(i,r)}class tE extends Vs{constructor(e=new Re,t=new Re,n=new Re,r=new Re){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Re){const n=t,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return n.set(ih(e,r.x,s.x,o.x,a.x),ih(e,r.y,s.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class nI extends Vs{constructor(e=new H,t=new H,n=new H,r=new H){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new H){const n=t,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return n.set(ih(e,r.x,s.x,o.x,a.x),ih(e,r.y,s.y,o.y,a.y),ih(e,r.z,s.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class nE extends Vs{constructor(e=new Re,t=new Re){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Re){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}
vendor: 4,414 bytes, line 3834
3834getTangent(e,t=new Re){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 iI extends Vs{constructor(e=new H,t=new H){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new H){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new H){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 iE extends Vs{constructor(e=new Re,t=new Re,n=new Re){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Re){const n=t,r=this.v0,s=this.v1,o=this.v2;return n.set(nh(e,r.x,s.x,o.x),nh(e,r.y,s.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class rE extends Vs{constructor(e=new H,t=new H,n=new H){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new H){const n=t,r=this.v0,s=this.v1,o=this.v2;return n.set(nh(e,r.x,s.x,o.x),nh(e,r.y,s.y,o.y),nh(e,r.z,s.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class sE extends Vs{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Re){const n=t,r=this.points,s=(r.length-1)*e,o=Math.floor(s),a=s-o,l=r[o===0?o:o-1],u=r[o],f=r[o>r.length-2?r.length-1:o+1],h=r[o>r.length-3?r.length-1:o+2];return n.set(HT(a,l.x,u.x,f.x,h.x),HT(a,l.y,u.y,f.y,h.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const r=e.points[t];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const r=this.points[t];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const r=e.points[t];this.points.push(new Re().fromArray(r))}return this}}var Lg=Object.freeze({__proto__:null,ArcCurve:eI,CatmullRomCurve3:tI,CubicBezierCurve:tE,CubicBezierCurve3:nI,EllipseCurve:xv,LineCurve:nE,LineCurve3:iI,QuadraticBezierCurve:iE,QuadraticBezierCurve3:rE,SplineCurve:sE});class rI extends Vs{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Lg[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let s=0;for(;s<r.length;){if(r[s]>=n){const o=r[s]-n,a=this.curves[s],l=a.getLength(),u=l===0?0:1-o/l;return a.getPointAt(u,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let 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,561 bytes, line 3834
3834plineCurve?e*o.points.length:e,l=o.getPoints(a);for(let u=0;u<l.length;u++){const f=l[u];n&&n.equals(f)||(t.push(f),n=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,n=e.curves.length;t<n;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,n=this.curves.length;t<n;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,n=e.curves.length;t<n;t++){const r=e.curves[t];this.curves.push(new Lg[r.type]().fromJSON(r))}return this}}class Nh extends rI{constructor(e){super(),this.type="Path",this.currentPoint=new Re,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new nE(this.currentPoint.clone(),new Re(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const s=new iE(this.currentPoint.clone(),new Re(e,t),new Re(n,r));return this.curves.push(s),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,s,o){const a=new tE(this.currentPoint.clone(),new Re(e,t),new Re(n,r),new Re(s,o));return this.curves.push(a),this.currentPoint.set(s,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new sE(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,s,o){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,t+l,n,r,s,o),this}absarc(e,t,n,r,s,o){return this.absellipse(e,t,n,n,r,s,o),this}ellipse(e,t,n,r,s,o,a,l){const u=this.currentPoint.x,f=this.currentPoint.y;return this.absellipse(e+u,t+f,n,r,s,o,a,l),this}absellipse(e,t,n,r,s,o,a,l){const u=new xv(e,t,n,r,s,o,a,l);if(this.curves.length>0){const h=u.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(u);const f=u.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 lp extends Bt{constructor(e=[new Re(0,-.5),new Re(.5,0),new Re(0,.5)],t=12,n=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=Vn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],u=[],f=1/t,h=new H,p=new Re,m=new H,v=new H,_=new H;let y=0,g=0;for(let A=0;A<=e.length-1;A++)switch(A){case 0:y=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,m.x=g*1,m.y=-y,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:y=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,m.x=g*1,m.y=-y,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 A=0;A<=t;A++){const S=n+A*f*r,w=Math.sin(S),P=Math.cos(S);for(let T=0;T<=e.length-1;T++){h.x=e[T].x*w,h.y=e[T].y,h.z=e[T].x*P,o.push(h.x,h.y,h.z),p.x=A/t,p.y=T/(e.length-1),a.push(p.x,p.y);const I=l[3*T+0]*w,D=l[3*T+1],C=l[3*T+0]*P;u.push(I,D,C)}}for(let A=0;A<t;A++)for(let S=0;S<e.length-1;S++){const w=S+A*e.length,P=w,T=w+e.length,I=w+e.length+1,D=w+1;s.push(P,T,D),s.push(I,D,T)}this.setIndex(s),this.setAttribute("position",new ht(o,3)),this.setAttribute("uv",new ht(a,2)),this.setAttribute("normal",new ht(u,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new lp(e.points,e.segments,e.phiStart,e.phiLength)}}class Av extends lp{constructor(e=1,t=1,n=4,r=8){const s=new Nh;s.absarc(0,-t/2,e,Math.PI*1.5,0),s.absarc(0,t/2,e,0,Math.PI*.5),super(s.getPoints(n),r),this.type="CapsuleGeometry",this.parameters={radius:e,length:t,capSegments:n,radialSegments:r}}static fromJSON(e){return new Av(e.radius,e.length,e.capSegments,e.radialSegments)}}class Sv extends Bt{constructor(e=1,t=32,n=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const s=[],o=[],a=[],l=[],u=new H,f=new Re;o.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let h=0,p=3;h<=t;h++,p+=3){const m=n+h/t*r;u.x=e*Math.cos(m),u.y=e*Math.sin(m),o.push(u.x,u.y,u.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 h=1;h<=t;h++)s.push(h,h+1,0);this.setIndex(s),this.setAttribute("position",new ht(o,3)),this.setAttribute("normal",new ht(a,3)),this.setAttribute("uv",new ht(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Sv(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Nu extends Bt{constructor(e=1,t=1,n=1,r=32,s=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:s,openEnded:o,thetaStart:a,thetaLength:l};const u=this;r=Math.floor(r),s=Math.floor(s);const f=[],h=[],p=[],m=[];let v=0;const _=[],y=n/2;let g=0;A(),o===!1&&(e>0&&S(!0),t>0&&S(!1)),this.setIndex(f),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2));function A(){const w=new H,P=new H;let T=0;const I=(t-e)/n;for(let D=0;D<=s;D++){const C=[],b=D/s,N=b*(t-e)+e;for(let j=0;j<=r;j++){const Y=j/r,q=Y*l+a,re=Math.sin(q),Q=Math.cos(q);P.x=N*re,P.y=-b*n+y,P.z=N*Q,h.push(P.x,P.y,P.z),w.set(re,I,Q).normalize(),p.push(w.x,w.y,w.z),m.push(Y,1-b),C.push(v++)}_.push(C)}for(let D=0;D<r;D++)for(let C=0;C<s;C++){const b=_[C][D],N=_[C+1][D],j=_[C+1][D+1],Y=_[C][D+1];f.push(b,N,Y),f.push(N,j,Y),T+=6}u.addGroup(g,T,0),g+=T}function S(w){const P=v,T=new Re,I=new H;let D=0;const C=w===!0?e:t,b=w===!0?1:-1;for(let j=1;j<=r;j++)h.push(0,y*b,0),p.push(0,b,0),m.push(.5,.5),v++;const N=v;for(let j=0;j<=r;j++){const q=j/r*l+a,re=Math.cos(q),Q=Math.sin(q);I.x=C*Q,I.y=y*b,I.z=C*re,h.push(I.x,I.y,I.z),p.push(0,b,0),T.x=re*.5+.5,T.y=Q*.5*b+.5,m.push(T.x,T.y),v++}for(let j=0;j<r;j++){const Y=P+j,q=N+j;w===!0?f.push(q,q+1,Y):f.push(q+1,q,Y),D+=3}u.addGroup(g,D,w===!0?1:2),g+=D}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Nu(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class up extends Nu{constructor(e=1,t=1,n=32,r=1,s=!1,o=0,a=Math.PI*2){super(0,e,t,n,r,s,o,a),this.type="C
3834oneGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new up(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class fl extends Bt{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const s=[],o=[];a(r),u(n),f(),this.setAttribute("position",new ht(s,3)),this.setAttribute("normal",new ht(s.slice(),3)),this.setAttribute("uv",new ht(o,2)),r===0?this.computeVertexNormals():this.normalizeNormals();function a(A){const S=new H,w=new H,P=new H;for(let T=0;T<t.length;T+=3)m(t[T+0],S),m(t[T+1],w),m(t[T+2],P),l(S,w,P,A)}function l(A,S,w,P){const T=P+1,I=[];for(let D=0;D<=T;D++){I[D]=[];const C=A.clone().lerp(w,D/T),b=S.clone().lerp(w,D/T),N=T-D;for(let j=0;j<=N;j++)j===0&&D===T?I[D][j]=C:I[D][j]=C.clone().lerp(b,j/N)}for(let D=0;D<T;D++)for(let C=0;C<2*(T-D)-1;C++){const b=Math.floor(C/2);C%2===0?(p(I[D][b+1]),p(I[D+1][b]),p(I[D][b])):(p(I[D][b+1]),p(I[D+1][b+1]),p(I[D+1][b]))}}function u(A){const S=new H;for(let w=0;w<s.length;w+=3)S.x=s[w+0],S.y=s[w+1],S.z=s[w+2],S.normalize().multiplyScalar(A),s[w+0]=S.x,s[w+1]=S.y,s[w+2]=S.z}function f(){const A=new H;for(let S=0;S<s.length;S+=3){A.x=s[S+0],A.y=s[S+1],A.z=s[S+2];const w=y(A)/2/Math.PI+.5,P=g(A)/Math.PI+.5;o.push(w,1-P)}v(),h()}function h(){for(let A=0;A<o.length;A+=6){const S=o[A+0],w=o[A+2],P=o[A+4],T=Math.max(S,w,P),I=Math.min(S,w,P);T>.9&&I<.1&&(S<.2&&(o[A+0]+=1),w<.2&&(o[A+2]+=1),P<.2&&(o[A+4]+=1))}}function p(A){s.push(A.x,A.y,A.z)}function m(A,S){const w=A*3;S.x=e[w+0],S.y=e[w+1],S.z=e[w+2]}function v(){const A=new H,S=new H,w=new H,P=new H,T=new Re,I=new Re,D=new Re;for(let C=0,b=0;C<s.length;C+=9,b+=6){A.set(s[C+0],s[C+1],s[C+2]),S.set(s[C+3],s[C+4],s[C+5]),w.set(s[C+6],s[C+7],s[C+8]),T.set(o[b+0],o[b+1]),I.set(o[b+2],o[b+3]),D.set(o[b+4],o[b+5]),P.copy(A).add(S).add(w).divideScalar(3);const N=y(P);_(T,b+0,A,N),_(I,b+2,S,N),_(D,b+4,w,N)}}function _(A,S,w,P){P<0&&A.x===1&&(o[S]=A.x-1),w.x===0&&w.z===0&&(o[S]=P/2/Math.PI+.5)}function y(A){return Math.atan2(A.z,-A.x)}function g(A){return Math.atan2(-A.y,Math.sqrt(A.x*A.x+A.z*A.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new fl(e.vertices,e.indices,e.radius,e.details)}}class Ev extends fl{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n,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,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,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: 169,249 bytes, lines 3834-3859
383419,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 Ev(e.radius,e.detail)}}const o0=new H,a0=new H,K1=new H,l0=new zr;class sI 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(uu*t),o=e.getIndex(),a=e.getAttribute("position"),l=o?o.count:a.count,u=[0,0,0],f=["a","b","c"],h=new Array(3),p={},m=[];for(let v=0;v<l;v+=3){o?(u[0]=o.getX(v),u[1]=o.getX(v+1),u[2]=o.getX(v+2)):(u[0]=v,u[1]=v+1,u[2]=v+2);const{a:_,b:y,c:g}=l0;if(_.fromBufferAttribute(a,u[0]),y.fromBufferAttribute(a,u[1]),g.fromBufferAttribute(a,u[2]),l0.getNormal(K1),h[0]=`${Math.round(_.x*r)},${Math.round(_.y*r)},${Math.round(_.z*r)}`,h[1]=`${Math.round(y.x*r)},${Math.round(y.y*r)},${Math.round(y.z*r)}`,h[2]=`${Math.round(g.x*r)},${Math.round(g.y*r)},${Math.round(g.z*r)}`,!(h[0]===h[1]||h[1]===h[2]||h[2]===h[0]))for(let A=0;A<3;A++){const S=(A+1)%3,w=h[A],P=h[S],T=l0[f[A]],I=l0[f[S]],D=`${w}_${P}`,C=`${P}_${w}`;C in p&&p[C]?(K1.dot(p[C].normal)<=s&&(m.push(T.x,T.y,T.z),m.push(I.x,I.y,I.z)),p[C]=null):D in p||(p[D]={index0:u[A],index1:u[S],normal:K1.clone()})}}for(const v in p)if(p[v]){const{index0:_,index1:y}=p[v];o0.fromBufferAttribute(a,_),a0.fromBufferAttribute(a,y),m.push(o0.x,o0.y,o0.z),m.push(a0.x,a0.y,a0.z)}this.setAttribute("position",new ht(m,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class fu extends Nh{constructor(e){super(e),this.uuid=Wr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const 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,n=this.holes.length;t<n;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,n=e.holes.length;t<n;t++){const r=e.holes[t];this.holes.push(new Nh().fromJSON(r))}return this}}const xz={triangulate:function(i,e,t=2){const n=e&&e.length,r=n?e[0]*t:i.length;let s=oI(i,0,r,t,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,u,f,h,p,m;if(n&&(s=Mz(i,e,s,t)),i.length>80*t){a=u=i[0],l=f=i[1];for(let v=t;v<r;v+=t)h=i[v],p=i[v+1],h<a&&(a=h),p<l&&(l=p),h>u&&(u=h),p>f&&(f=p);m=Math.max(u-a,f-l),m=m!==0?32767/m:0}return Oh(s,o,t,a,l,m,0),o}};function oI(i,e,t,n,r){let s,o;if(r===Nz(i,e,t,n)>0)for(s=e;s<t;s+=n)o=VT(s,i[s],i[s+1],o);else for(s=t-n;s>=e;s-=n)o=VT(s,i[s],i[s+1],o);return o&&wv(o,o.next)&&(zh(o),o=o.next),o}function Mu(i,e){if(!i)return i;e||(e=i);let t=i,n;do if(n=!1,!t.steiner&&(wv(t,t.next)||Fn(t.prev,t,t.next)===0)){if(zh(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function Oh(i,e,t,n,r,s,o){if(!i)return;!o&&s&&bz(i,n,r,s);let a=i,l,u;for(;i.prev!==i.next;){if(l=i.prev,u=i.next,s?Sz(i,n,r,s):Az(i)){e.push(l.i/t|0),e.push(i.i/t|0),e.push(u.i/t|0),zh(i),i=u.next,a=u.next;continue}if(i=u,i===a){o?o===1?(i=Ez(Mu(i),e,t),Oh(i,e,t,n,r,s,2)):o===2&&wz(i,e,t,n,r,s):Oh(Mu(i),e,t,n,r,s,1);break}}}function Az(i){const e=i.prev,t=i,n=i.next;if(Fn(e,t,n)>=0)return!1;const r=e.x,s=t.x,o=n.x,a=e.y,l=t.y,u=n.y,f=r<s?r<o?r:o:s<o?s:o,h=a<l?a<u?a:u:l<u?l:u,p=r>s?r>o?r:o:s>o?s:o,m=a>l?a>u?a:u:l>u?l:u;let v=n.next;for(;v!==e;){if(v.x>=f&&v.x<=p&&v.y>=h&&v.y<=m&&Wc(r,a,s,l,o,u,v.x,v.y)&&Fn(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function Sz(i,e,t,n){const r=i.prev,s=i,o=i.next;if(Fn(r,s,o)>=0)return!1;const a=r.x,l=s.x,u=o.x,f=r.y,h=s.y,p=o.y,m=a<l?a<u?a:u:l<u?l:u,v=f<h?f<p?f:p:h<p?h:p,_=a>l?a>u?a:u:l>u?l:u,y=f>h?f>p?f:p:h>p?h:p,g=oA(m,v,e,t,n),A=oA(_,y,e,t,n);let S=i.prevZ,w=i.nextZ;for(;S&&S.z>=g&&w&&w.z<=A;){if(S.x>=m&&S.x<=_&&S.y>=v&&S.y<=y&&S!==r&&S!==o&&Wc(a,f,l,h,u,p,S.x,S.y)&&Fn(S.prev,S,S.next)>=0||(S=S.prevZ,w.x>=m&&w.x<=_&&w.y>=v&&w.y<=y&&w!==r&&w!==o&&Wc(a,f,l,h,u,p,w.x,w.y)&&Fn(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;S&&S.z>=g;){if(S.x>=m&&S.x<=_&&S.y>=v&&S.y<=y&&S!==r&&S!==o&&Wc(a,f,l,h,u,p,S.x,S.y)&&Fn(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;w&&w.z<=A;){if(w.x>=m&&w.x<=_&&w.y>=v&&w.y<=y&&w!==r&&w!==o&&Wc(a,f,l,h,u,p,w.x,w.y)&&Fn(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function Ez(i,e,t){let n=i;do{const r=n.prev,s=n.next.next;!wv(r,s)&&aI(r,n,n.next,s)&&Uh(r,s)&&Uh(s,r)&&(e.push(r.i/t|0),e.push(n.i/t|0),e.push(s.i/t|0),zh(n),zh(n.next),n=i=s),n=n.next}while(n!==i);return Mu(n)}function wz(i,e,t,n,r,s){let o=i;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&Dz(o,a)){let l=lI(o,a);o=Mu(o,o.next),l=Mu(l,l.next),Oh(o,e,t,n,r,s,0),Oh(l,e,t,n,r,s,0);return}a=a.next}o=o.next}while(o!==i)}function Mz(i,e,t,n){const r=[];let s,o,a,l,u;for(s=0,o=e.length;s<o;s++)a=e[s]*n,l=s<o-1?e[s+1]*n:i.length,u=oI(i,a,l,n,!1),u===u.next&&(u.steiner=!0),r.push(Bz(u));for(r.sort(Cz),s=0;s<r.length;s++)t=Tz(r[s],t);return t}function Cz(i,e){return i.x-e.x}function Tz(i,e){const t=Rz(i,e);if(!t)return e;const n=lI(t,i);return Mu(n,n.next),Mu(t,t.next)}function Rz(i,e){let t=e,n=-1/0,r;const s=i.x,o=i.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>n&&(n=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,u=r.y;let f=1/0,h;t=r;do s>=t.x&&t.x>=l&&s!==t.x&&Wc(o<u?s:n,o,l,u,o<u?n:s,o,t.x,t.y)&&(h=Math.abs(o-t.y)/(s-t.x),Uh(t,i)&&(h<f||h===f&&(t.x>r.x||t.x===r.x&&Pz(r,t)))&&(r=t,f=h)),t=t.next;while(t!==a);return r}function Pz(i,e){return Fn(i.prev,i,e.prev)<0&&Fn(e.next,i,i.next)<0}function bz(i,e,t,n){let r=i;do r.z===0&&(r.z=oA(r.x,r.y,e,t,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==i);r.prevZ.nextZ=null,r.prevZ=null,Iz(r)}function Iz(i){let e,t,n,r,s,o,a,l,u=1;do{for(t=i,i=null,s=null,o=0;t;){for(o++,n=t,a=0,e=0;e<u&&(a++,n=n.nextZ,!!n);e++);for(l=u;a>0||l>0&&n;)a!==0&&(l===0||!n||t.z<=n.z)?(r=t,t=t.nextZ,a--):(r=n,n=n.nextZ,l--),s?s.nextZ=r:i=r,r.prevZ=s,s=r;t=n}s.nextZ=null,u*=2}while(o>1);return i}function oA(i,e,t,n,r){return i=(i-t)*r|0,e=(e-n)*r|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,i|e<<1}function Bz(i){let e=i,t=i;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==i);return t}function Wc(i,e,t,n,r,s,o,a){return(r-o)*(e-a)>=(i-o)*(s-a)&&(i-o)*(n-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(n-a)}function Dz(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!Fz(i,e)&&(Uh(i,e)&&Uh(e,i)&&Lz(i,e)&&(Fn(i.prev,i,e.prev)||Fn(i,e.prev,e))||wv(i,e)&&Fn(i.prev,i,i.next)>0&&Fn(e.prev,e,e.next)>0)}function Fn(i,e,t){return(e.y-i.y)*(t.x-e.x)-(e.x-i.x)*(t.y-e.y)}function wv(i,e){return i.x===e.x&&i.y===e.y}function aI(i,e,t,n){const r=c0(Fn(i,e,t)),s=c0(Fn(i,e,n)),o=c0(Fn(t,n,i)),a=c0(Fn(t,n,e));return!!(r!==s&&o!==a||r===0&&u0(i,t,e)||s===0&&u0(i,n,e)||o===0&&u0(t,i,n)||a===0&&u0(t,e,n))}function u0(i,e,t){return e.x<=Math.max(i.x,t.x)&&e.x>=Math.min(i.x,t.x)&&e.y<=Math.max(i.y,t.y)&&e.y>=Math.min(i.y,t.y)}function c0(i){return i>0?1:i<0?-1:0}function Fz(i,e){let t=i;do{if(t.i!==i.i&&t.next.i!==i.i&&t.i!==e.i&&t.next.i!==e.i&&aI(t,t.next,i,e))return!0;t=t.next}while(t!==i);return!1}function Uh(i,e){return Fn(i.prev,i,i.next)<0?Fn(i,e,i.next)>=0&&Fn(i,i.prev,e)>=0:Fn(i,e,i.prev)<0||Fn(i,i.next,e)<0}function Lz(i,e){let t=i,n=!1;const r=(i.x+e.x)/2,s=(i.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&&(n=!n),t=t.next;while(t!==i);return n}function lI(i,e){const t=new aA(i.i,i.x,i.y),n=new aA(e.i,e.x,e.y),r=i.next,s=e.prev;return i.next=e,e.prev=i,t.next=r,r.prev=t,n.next=t,t.prev=n,s.next=n,n.prev=s,n}function VT(i,e,t,n){const r=new aA(i,e,t);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function zh(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function aA(i,e,t){this.i=i,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 Nz(i,e,t,n){let r=0;for(let s=e,o=t-n;s<t;s+=n)r+=(i[o]-i[s])*(i[s+1]+i[o+1]),o=s;return r}class go{static area(e){const t=e.length;let n=0;for(let r=t-1,s=0;s<t;r=s++)n+=e[r].x*e[s].y-e[s].x*e[r].y;return n*.5}static isClockWise(e){return go.area(e)<0}static triangulateShape(e,t){const n=[],r=[],s=[];WT(e),XT(n,e);let o=e.length;t.forEach(WT);for(let l=0;l<t.length;l++)r.push(o),o+=t[l].length,XT(n,t[l]);const a=xz.triangulate(n,r);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function WT(i){const e=i.length;e>2&&i[e-1].equals(i[0])&&i.pop()}function XT(i,e){for(let t=0;t<e.length;t++)i.push(e[t].x),i.push(e[t].y)}class Mv extends Bt{constructor(e=new fu([new Re(.5,.5),new Re(-.5,.5),new Re(-.5,-.5),new Re(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],s=[];for(let a=0,l=e.length;a<l;a++){const u=e[a];o(u)}this.setAttribute("position",new ht(r,3)),this.setAttribute("uv",new ht(s,2)),this.computeVertexNormals();function o(a){const l=[],u=t.curveSegments!==void 0?t.curveSegments:12,f=t.steps!==void 0?t.steps:1,h=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,y=t.bevelSegments!==void 0?t.bevelSegments:3;const g=t.extrudePath,A=t.UVGenerator!==void 0?t.UVGenerator:Oz;let S,w=!1,P,T,I,D;g&&(S=g.getSpacedPoints(f),w=!0,p=!1,P=g.computeFrenetFrames(f,!1),T=new H,I=new H,D=new H),p||(y=0,m=0,v=0,_=0);const C=a.extractPoints(u);let b=C.shape;const N=C.holes;if(!go.isClockWise(b)){b=b.reverse();for(let Pe=0,le=N.length;Pe<le;Pe++){const Me=N[Pe];go.isClockWise(Me)&&(N[Pe]=Me.reverse())}}const Y=go.triangulateShape(b,N),q=b;for(let Pe=0,le=N.length;Pe<le;Pe++){const Me=N[Pe];b=b.concat(Me)}function re(Pe,le,Me){return le||console.error("THREE.ExtrudeGeometry: vec does not exist"),Pe.clone().addScaledVector(le,Me)}const Q=b.length,pe=Y.length;function k(Pe,le,Me){let xe,we,Oe;const Je=Pe.x-le.x,ke=Pe.y-le.y,G=Me.x-Pe.x,O=Me.y-Pe.y,fe=Je*Je+ke*ke,Te=Je*O-ke*G;if(Math.abs(Te)>Number.EPSILON){const Se=Math.sqrt(fe),be=Math.sqrt(G*G+O*O),st=le.x-ke/Se,Le=le.y+Je/Se,Ve=Me.x-O/be,pt=Me.y+G/be,Ne=((Ve-st)*O-(pt-Le)*G)/(Je*O-ke*G);xe=st+Je*Ne-Pe.x,we=Le+ke*Ne-Pe.y;const Ke=xe*xe+we*we;if(Ke<=2)return new Re(xe,we);Oe=Math.sqrt(Ke/2)}else{let Se=!1;Je>Number.EPSILON?G>Number.EPSILON&&(Se=!0):Je<-Number.EPSILON?G<-Number.EPSILON&&(Se=!0):Math.sign(ke)===Math.sign(O)&&(Se=!0),Se?(xe=-ke,we=Je,Oe=Math.sqrt(fe)):(xe=Je,we=ke,Oe=Math.sqrt(fe/2))}return new Re(xe/Oe,we/Oe)}const ne=[];for(let Pe=0,le=q.length,Me=le-1,xe=Pe+1;Pe<le;Pe++,Me++,xe++)Me===le&&(Me=0),xe===le&&(xe=0),ne[Pe]=k(q[Pe],q[Me],q[xe]);const te=[];let ce,_e=ne.concat();for(let Pe=0,le=N.length;Pe<le;Pe++){const Me=N[Pe];ce=[];for(let xe=0,we=Me.length,Oe=we-1,Je=xe+1;xe<we;xe++,Oe++,Je++)Oe===we&&(Oe=0),Je===we&&(Je=0),ce[xe]=k(Me[xe],Me[Oe],Me[Je]);te.push(ce),_e=_e.concat(ce)}for(let Pe=0;Pe<y;Pe++){const le=Pe/y,Me=m*Math.cos(le*Math.PI/2),xe=v*Math.sin(le*Math.PI/2)+_;for(let we=0,Oe=q.length;we<Oe;we++){const Je=re(q[we],ne[we],xe);De(Je.x,Je.y,-Me)}for(let we=0,Oe=N.length;we<Oe;we++){const Je=N[we];ce=te[we];for(let ke=0,G=Je.length;ke<G;ke++){const O=re(Je[ke],ce[ke],xe);De(O.x,O.y,-Me)}}}const Fe=v+_;for(let Pe=0;Pe<Q;Pe++){const le=p?re(b[Pe],_e[Pe],Fe):b[Pe];w?(I.copy(P.normals[0]).multiplyScalar(le.x),T.copy(P.binormals[0]).multiplyScalar(le.y),D.copy(S[0]).add(I).add(T),De(D.x,D.y,D.z)):De(le.x,le.y,0)}for(let Pe=1;Pe<=f;Pe++)for(let le=0;le<Q;le++){const Me=p?re(b[le],_e[le],Fe):b[le];w?(I.copy(P.normals[Pe]).multiplyScalar(Me.x),T.copy(P.binormals[Pe]).multiplyScalar(Me.y),D.copy(S[Pe]).add(I).add(T),De(D.x,D.y,D.z)):De(Me.x,Me.y,h/f*Pe)}for(let Pe=y-1;Pe>=0;Pe--){const le=Pe/y,Me=m*Math.cos(le*Math.PI/2),xe=v*Math.sin(le*Math.PI/2)+_;for(let we=0,Oe=q.length;we<Oe;we++){const Je=re(q[we],ne[we],xe);De(Je.x,Je.y,h+Me)}for(let we=0,Oe=N.length;we<Oe;we++){const Je=N[we];ce=te[we];for(let ke=0,G=Je.length;ke<G;ke++){const O=re(Je[ke],ce[ke],xe);w?De(O.x,O.y+S[f-1].y,S[f-1].x+Me):De(O.x,O.y,h+Me)}}}ue(),Ee();function ue(){const Pe=r.length/3;if(p){let le=0,Me=Q*le;for(let xe=0;xe<pe;xe++){const we=Y[xe];dt(we[2]+Me,we[1]+Me,we[0]+Me)}le=f+y*2,Me=Q*le;for(let xe=0;xe<pe;xe++){const we=Y[xe];dt(we[0]+Me,we[1]+Me,we[2]+Me)}}else{for(let le=0;le<pe;le++){const Me=Y[le];dt(Me[2],Me[1],Me[0])}for(let le=0;le<pe;le++){const Me=Y[le];dt(Me[0]+Q*f,Me[1]+Q*f,Me[2]+Q*f)}}n.addGroup(Pe,r.length/3-Pe,0)}function Ee(){const Pe=r.length/3;let le=0;Ce(q,le),le+=q.length;for(let Me=0,xe=N.length;Me<xe;Me++){const we=N[Me];Ce(we,le),le+=we.length}n.addGroup(Pe,r.length/3-Pe,1)}function Ce(Pe,le){let Me=Pe.length;for(;--Me>=0;){const xe=Me;let we=Me-1;we<0&&(we=Pe.length-1);for(let Oe=0,Je=f+y*2;Oe<Je;Oe++){const ke=Q*Oe,G=Q*(Oe+1),O=le+xe+ke,fe=le+we+ke,Te=le+we+G,Se=le+xe+G;At(O,fe,Te,Se)}}}function De(Pe,le,Me){l.push(Pe),l.push(le),l.push(Me)}function dt(Pe,le,Me){it(Pe),it(le),it(Me);const xe=r.length/3,we=A.generateTopUV(n,r,xe-3,xe-2,xe-1);Z(we[0]),Z(we[1]),Z(we[2])}function At(Pe,le,Me,xe){it(Pe),it(le),it(xe),it(le),it(Me),it(xe);const we=r.length/3,Oe=A.generateSideWallUV(n,r,we-6,we-3,we-2,we-1);Z(Oe[0]),Z(Oe[1]),Z(Oe[3]),Z(Oe[1]),Z(Oe[2]),Z(Oe[3])}function it(Pe){r.push(l[Pe*3+0]),r.push(l[Pe*3+1]),r.push(l[Pe*3+2])}function Z(Pe){s.push(Pe.x),s.push(Pe.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,n=this.parameters.options;return Uz(t,n,e)}static fromJSON(e,t){const n=[];for(let s=0,o=e.shapes.length;s<o;s++){const a=t[e.shapes[s]];n.push(a)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new Lg[r.type]().fromJSON(r)),new Mv(n,e.options)}}const Oz={generateTopUV:function(i,e,t,n,r){const s=e[t*3],o=e[t*3+1],a=e[n*3],l=e[n*3+1],u=e[r*3],f=e[r*3+1];return[new Re(s,o),new Re(a,l),new Re(u,f)]},generateSideWallUV:function(i,e,t,n,r,s){const o=e[t*3],a=e[t*3+1],l=e[t*3+2],u=e[n*3],f=e[n*3+1],h=e[n*3+2],p=e[r*3],m=e[r*3+1],v=e[r*3+2],_=e[s*3],y=e[s*3+1],g=e[s*3+2];return Math.abs(a-f)<Math.abs(o-u)?[new Re(o,1-l),new Re(u,1-h),new Re(p,1-v),new Re(_,1-g)]:[new Re(a,1-l),new Re(f,1-h),new Re(m,1-v),new Re(y,1-g)]}};function Uz(i,e,t){if(t.shapes=[],Array.isArray(i))for(let n=0,r=i.length;n<r;n++){const s=i[n];t.shapes.push(s.uuid)}else t.shapes.push(i.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class Nf extends fl{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],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 Nf(e.radius,e.detail)}}class Of extends fl{constructor(e=1,t=0){const n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],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(n,r,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Of(e.radius,e.detail)}}class Cv extends Bt{constructor(e=.5,t=1,n=32,r=1,s=0,o=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:s,thetaLength:o},n=Math.max(3,n),r=Math.max(1,r);const a=[],l=[],u=[],f=[];let h=e;const p=(t-e)/r,m=new H,v=new Re;for(let _=0;_<=r;_++){for(let y=0;y<=n;y++){const g=s+y/n*o;m.x=h*Math.cos(g),m.y=h*Math.sin(g),l.push(m.x,m.y,m.z),u.push(0,0,1),v.x=(m.x/t+1)/2,v.y=(m.y/t+1)/2,f.push(v.x,v.y)}h+=p}for(let _=0;_<r;_++){const y=_*(n+1);for(let g=0;g<n;g++){const A=g+y,S=A,w=A+n+1,P=A+n+2,T=A+1;a.push(S,w,T),a.push(w,P,T)}}this.setIndex(a),this.setAttribute("position",new ht(l,3)),this.setAttribute("normal",new ht(u,3)),this.setAttribute("uv",new ht(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Cv(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Tv extends Bt{constructor(e=new fu([new Re(0,.5),new Re(-.5,-.5),new Re(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],s=[],o=[];let a=0,l=0;if(Array.isArray(e)===!1)u(e);else for(let f=0;f<e.length;f++)u(e[f]),this.addGroup(a,l,f),a+=l,l=0;this.setIndex(n),this.setAttribute("position",new ht(r,3)),this.setAttribute("normal",new ht(s,3)),this.setAttribute("uv",new ht(o,2));function u(f){const h=r.length/3,p=f.extractPoints(t);let m=p.shape;const v=p.holes;go.isClockWise(m)===!1&&(m=m.reverse());for(let y=0,g=v.length;y<g;y++){const A=v[y];go.isClockWise(A)===!0&&(v[y]=A.reverse())}const _=go.triangulateShape(m,v);for(let y=0,g=v.length;y<g;y++){const A=v[y];m=m.concat(A)}for(let y=0,g=m.length;y<g;y++){const A=m[y];r.push(A.x,A.y,0),s.push(0,0,1),o.push(A.x,A.y)}for(let y=0,g=_.length;y<g;y++){const A=_[y],S=A[0]+h,w=A[1]+h,P=A[2]+h;n.push(S,w,P),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 zz(t,e)}static fromJSON(e,t){const n=[];for(let r=0,s=e.shapes.length;r<s;r++){const o=t[e.shapes[r]];n.push(o)}return new Tv(n,e.curveSegments)}}function zz(i,e){if(e.shapes=[],Array.isArray(i))for(let t=0,n=i.length;t<n;t++){const r=i[t];e.shapes.push(r.uuid)}else e.shapes.push(i.uuid);return e}class Cu extends Bt{constructor(e=1,t=32,n=16,r=0,s=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(o+a,Math.PI);let u=0;const f=[],h=new H,p=new H,m=[],v=[],_=[],y=[];for(let g=0;g<=n;g++){const A=[],S=g/n;let w=0;g===0&&o===0?w=.5/t:g===n&&l===Math.PI&&(w=-.5/t);for(let P=0;P<=t;P++){const T=P/t;h.x=-e*Math.cos(r+T*s)*Math.sin(o+S*a),h.y=e*Math.cos(o+S*a),h.z=e*Math.sin(r+T*s)*Math.sin(o+S*a),v.push(h.x,h.y,h.z),p.copy(h).normalize(),_.push(p.x,p.y,p.z),y.push(T+w,1-S),A.push(u++)}f.push(A)}for(let g=0;g<n;g++)for(let A=0;A<t;A++){const S=f[g][A+1],w=f[g][A],P=f[g+1][A],T=f[g+1][A+1];(g!==0||o>0)&&m.push(S,w,T),(g!==n-1||l<Math.PI)&&m.push(w,P,T)}this.setIndex(m),this.setAttribute("position",new ht(v,3)),this.setAttribute("normal",new ht(_,3)),this.setAttribute("uv",new ht(y,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Cu(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class cp extends fl{constructor(e=1,t=0){const n=[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(n,r,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new cp(e.radius,e.detail)}}class fp extends Bt{constructor(e=1,t=.4,n=12,r=48,s=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:s},n=Math.floor(n),r=Math.floor(r);const o=[],a=[],l=[],u=[],f=new H,h=new H,p=new H;for(let m=0;m<=n;m++)for(let v=0;v<=r;v++){const _=v/r*s,y=m/n*Math.PI*2;h.x=(e+t*Math.cos(y))*Math.cos(_),h.y=(e+t*Math.cos(y))*Math.sin(_),h.z=t*Math.sin(y),a.push(h.x,h.y,h.z),f.x=e*Math.cos(_),f.y=e*Math.sin(_),p.subVectors(h,f).normalize(),l.push(p.x,p.y,p.z),u.push(v/r),u.push(m/n)}for(let m=1;m<=n;m++)for(let v=1;v<=r;v++){const _=(r+1)*m+v-1,y=(r+1)*(m-1)+v-1,g=(r+1)*(m-1)+v,A=(r+1)*m+v;o.push(_,y,A),o.push(y,g,A)}this.setIndex(o),this.setAttribute("position",new ht(a,3)),this.setAttribute("normal",new ht(l,3)),this.setAttribute("uv",new ht(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new fp(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Rv extends Bt{constructor(e=1,t=.4,n=64,r=8,s=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:s,q:o},n=Math.floor(n),r=Math.floor(r);const a=[],l=[],u=[],f=[],h=new H,p=new H,m=new H,v=new H,_=new H,y=new H,g=new H;for(let S=0;S<=n;++S){const w=S/n*s*Math.PI*2;A(w,s,o,e,m),A(w+.01,s,o,e,v),y.subVectors(v,m),g.addVectors(v,m),_.crossVectors(y,g),g.crossVectors(_,y),_.normalize(),g.normalize();for(let P=0;P<=r;++P){const T=P/r*Math.PI*2,I=-t*Math.cos(T),D=t*Math.sin(T);h.x=m.x+(I*g.x+D*_.x),h.y=m.y+(I*g.y+D*_.y),h.z=m.z+(I*g.z+D*_.z),l.push(h.x,h.y,h.z),p.subVectors(h,m).normalize(),u.push(p.x,p.y,p.z),f.push(S/n),f.push(P/r)}}for(let S=1;S<=n;S++)for(let w=1;w<=r;w++){const P=(r+1)*(S-1)+(w-1),T=(r+1)*S+(w-1),I=(r+1)*S+w,D=(r+1)*(S-1)+w;a.push(P,T,D),a.push(T,I,D)}this.setIndex(a),this.setAttribute("position",new ht(l,3)),this.setAttribute("normal",new ht(u,3)),this.setAttribute("uv",new ht(f,2));function A(S,w,P,T,I){const D=Math.cos(S),C=Math.sin(S),b=P/w*S,N=Math.cos(b);I.x=T*(2+N)*.5*D,I.y=T*(2+N)*C*.5,I.z=T*Math.sin(b)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Rv(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Pv extends Bt{constructor(e=new rE(new H(-1,-1,0),new H(-1,1,0),new H(1,1,0)),t=64,n=1,r=8,s=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,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 H,l=new H,u=new Re;let f=new H;const h=[],p=[],m=[],v=[];_(),this.setIndex(v),this.setAttribute("position",new ht(h,3)),this.setAttribute("normal",new ht(p,3)),this.setAttribute("uv",new ht(m,2));function _(){for(let S=0;S<t;S++)y(S);y(s===!1?t:0),A(),g()}function y(S){f=e.getPointAt(S/t,f);const w=o.normals[S],P=o.binormals[S];for(let T=0;T<=r;T++){const I=T/r*Math.PI*2,D=Math.sin(I),C=-Math.cos(I);l.x=C*w.x+D*P.x,l.y=C*w.y+D*P.y,l.z=C*w.z+D*P.z,l.normalize(),p.push(l.x,l.y,l.z),a.x=f.x+n*l.x,a.y=f.y+n*l.y,a.z=f.z+n*l.z,h.push(a.x,a.y,a.z)}}function g(){for(let S=1;S<=t;S++)for(let w=1;w<=r;w++){const P=(r+1)*(S-1)+(w-1),T=(r+1)*S+(w-1),I=(r+1)*S+w,D=(r+1)*(S-1)+w;v.push(P,T,D),v.push(T,I,D)}}function A(){for(let S=0;S<=t;S++)for(let w=0;w<=r;w++)u.x=S/t,u.y=w/r,m.push(u.x,u.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 Pv(new Lg[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class uI extends Bt{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,r=new H,s=new H;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 u=0,f=l.length;u<f;++u){const h=l[u],p=h.start,m=h.count;for(let v=p,_=p+m;v<_;v+=3)for(let y=0;y<3;y++){const g=a.getX(v+y),A=a.getX(v+(y+1)%3);r.fromBufferAttribute(o,g),s.fromBufferAttribute(o,A),JT(r,s,n)===!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 u=0;u<3;u++){const f=3*a+u,h=3*a+(u+1)%3;r.fromBufferAttribute(o,f),s.fromBufferAttribute(o,h),JT(r,s,n)===!0&&(t.push(r.x,r.y,r.z),t.push(s.x,s.y,s.z))}}this.setAttribute("position",new ht(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function JT(i,e,t){const n=`${i.x},${i.y},${i.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${i.x},${i.y},${i.z}`;return t.has(n)===!0||t.has(r)===!0?!1:(t.add(n),t.add(r),!0)}var jT=Object.freeze({__proto__:null,BoxGeometry:ul,CapsuleGeometry:Av,CircleGeometry:Sv,ConeGeometry:up,CylinderGeometry:Nu,DodecahedronGeometry:Ev,EdgesGeometry:sI,ExtrudeGeometry:Mv,IcosahedronGeometry:Nf,LatheGeometry:lp,OctahedronGeometry:Of,PlaneGeometry:cl,PolyhedronGeometry:fl,RingGeometry:Cv,ShapeGeometry:Tv,SphereGeometry:Cu,TetrahedronGeometry:cp,TorusGeometry:fp,TorusKnotGeometry:Rv,TubeGeometry:Pv,WireframeGeometry:uI});class cI extends Qn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new He(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 fI extends ur{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Uf extends Qn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new He(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 He(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ll,this.normalScale=new Re(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 Yr,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 Es extends Uf{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 Re(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Vn(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 He(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 He(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new He(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 dI extends Qn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new He(16777215),this.specular=new He(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new He(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ll,this.normalScale=new Re(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Yr,this.combine=tp,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 hI extends Qn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new He(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new He(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ll,this.normalScale=new Re(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 pI extends Qn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ll,this.normalScale=new Re(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 mI extends Qn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new He(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new He(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ll,this.normalScale=new Re(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Yr,this.combine=tp,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 gI extends Qn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new He(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ll,this.normalScale=new Re(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 vI extends qi{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 tu(i,e,t){return!i||!t&&i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)}function _I(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function yI(i){function e(r,s){return i[r]-i[s]}const t=i.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(e),n}function lA(i,e,t){const n=i.length,r=new i.constructor(n);for(let s=0,o=0;o!==n;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=i[a+l]}return r}function oE(i,e,t,n){let r=1,s=i[0];for(;s!==void 0&&s[n]===void 0;)s=i[r++];if(s===void 0)return;let o=s[n];if(o!==void 0)if(Array.isArray(o))do o=s[n],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=i[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[n],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=i[r++];while(s!==void 0);else do o=s[n],o!==void 0&&(e.push(s.time),t.push(o)),s=i[r++];while(s!==void 0)}function kz(i,e,t,n,r=30){const s=i.clone();s.name=e;const o=[];for(let l=0;l<s.tracks.length;++l){const u=s.tracks[l],f=u.getValueSize(),h=[],p=[];for(let m=0;m<u.times.length;++m){const v=u.times[m]*r;if(!(v<t||v>=n)){h.push(u.times[m]);for(let _=0;_<f;++_)p.push(u.values[m*f+_])}}h.length!==0&&(u.times=tu(h,u.times.constructor),u.values=tu(p,u.values.constructor),o.push(u))}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 Gz(i,e=0,t=i,n=30){n<=0&&(n=30);const r=t.tracks.length,s=e/n;for(let o=0;o<r;++o){const a=t.tracks[o],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const u=i.tracks.find(function(g){return g.name===a.name&&g.ValueTypeName===l});if(u===void 0)continue;let f=0;const h=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(f=h/3);let p=0;const m=u.getValueSize();u.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=m/3);const v=a.times.length-1;let _;if(s<=a.times[0]){const g=f,A=h-f;_=a.values.slice(g,A)}else if(s>=a.times[v]){const g=v*h+f,A=g+h-f;_=a.values.slice(g,A)}else{const g=a.createInterpolant(),A=f,S=h-f;g.evaluate(s),_=g.resultBuffer.slice(A,S)}l==="quaternion"&&new Ci().fromArray(_).normalize().conjugate().toArray(_);const y=u.times.length;for(let g=0;g<y;++g){const A=g*m+p;if(l==="quaternion")Ci.multiplyQuaternionsFlat(u.values,A,_,0,u.values,A);else{const S=m-p*2;for(let w=0;w<S;++w)u.values[A+w]-=_[w]}}}return i.blendMode=LS,i}const Hz={convertArray:tu,isTypedArray:_I,getKeyframeOrder:yI,sortedArray:lA,flattenJSON:oE,subclip:kz,makeClipAdditive:Gz};class zf{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],s=t[n-1];e:{t:{let o;n:{i:if(!(e<r)){for(let a=n+2;;){if(r===void 0){if(e<s)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(s=r,r=t[++n],e<r)break t}o=t.length;break n}if(!(e>=s)){const a=t[1];e<a&&(n=2,s=a);for(let l=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(r=s,s=t[--n-1],e>=s)break t}o=n,n=0;break n}break e}for(;n<o;){const a=n+o>>>1;e<t[a]?o=a:n=a+1}if(r=t[n],s=t[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,r)}return this.interpolate_(n,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,s=e*r;for(let o=0;o!==r;++o)t[o]=n[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class xI extends zf{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:ql,endingEnd:ql}}intervalChanged_(e,t,n){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 Zl:s=e,a=2*t-n;break;case Ph:s=r.length-2,a=t+r[s]-r[s+1];break;default:s=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Zl:o=e,l=2*n-t;break;case Ph:o=1,l=n+r[1]-r[0];break;default:o=e-1,l=t}const u=(n-t)*.5,f=this.valueSize;this._weightPrev=u/(t-a),this._weightNext=u/(l-n),this._offsetPrev=s*f,this._offsetNext=o*f}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,u=l-a,f=this._offsetPrev,h=this._offsetNext,p=this._weightPrev,m=this._weightNext,v=(n-t)/(r-t),_=v*v,y=_*v,g=-p*y+2*p*_-p*v,A=(1+p)*y+(-1.5-2*p)*_+(-.5+p)*v+1,S=(-1-m)*y+(1.5+m)*_+.5*v,w=m*y-m*_;for(let P=0;P!==a;++P)s[P]=g*o[f+P]+A*o[u+P]+S*o[l+P]+w*o[h+P];return s}}class aE extends zf{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,u=l-a,f=(n-t)/(r-t),h=1-f;for(let p=0;p!==a;++p)s[p]=o[u+p]*h+o[l+p]*f;return s}}class AI extends zf{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Ws{constructor(e,t,n,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=tu(t,this.TimeBufferType),this.values=tu(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:tu(e.times,Array),values:tu(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(n.interpolation=r)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new AI(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new aE(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new xI(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case vf:t=this.InterpolantFactoryMethodDiscrete;break;case _f:t=this.InterpolantFactoryMethodLinear;break;case eg:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return vf;case this.InterpolantFactoryMethodLinear:return _f;case this.InterpolantFactoryMethodSmooth:return eg}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let s=0,o=r-1;for(;s!==r&&n[s]<e;)++s;for(;o!==-1&&n[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=n.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 n=this.times,r=this.values,s=n.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=n[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&&_I(r))for(let a=0,l=r.length;a!==l;++a){const u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===eg,s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const u=e[a],f=e[a+1];if(u!==f&&(a!==1||u!==e[0]))if(r)l=!0;else{const h=a*n,p=h-n,m=h+n;for(let v=0;v!==n;++v){const _=t[h+v];if(_!==t[p+v]||_!==t[m+v]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const h=a*n,p=o*n;for(let m=0;m!==n;++m)t[p+m]=t[h+m]}++o}}if(s>0){e[o]=e[s];for(let a=s*n,l=o*n,u=0;u!==n;++u)t[l+u]=t[a+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Ws.prototype.TimeBufferType=Float32Array;Ws.prototype.ValueBufferType=Float32Array;Ws.prototype.DefaultInterpolation=_f;class Ou extends Ws{constructor(e,t,n){super(e,t,n)}}Ou.prototype.ValueTypeName="bool";Ou.prototype.ValueBufferType=Array;Ou.prototype.DefaultInterpolation=vf;Ou.prototype.InterpolantFactoryMethodLinear=void 0;Ou.prototype.InterpolantFactoryMethodSmooth=void 0;class lE extends Ws{}lE.prototype.ValueTypeName="color";class Tu extends Ws{}Tu.prototype.ValueTypeName="number";class SI extends zf{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-t)/(r-t);let u=e*a;for(let f=u+a;u!==f;u+=4)Ci.slerpFlat(s,0,o,u-a,o,u,l);return s}}class Ru extends Ws{InterpolantFactoryMethodLinear(e){return new SI(this.times,this.values,this.getValueSize(),e)}}Ru.prototype.ValueTypeName="quaternion";Ru.prototype.InterpolantFactoryMethodSmooth=void 0;class Uu extends Ws{constructor(e,t,n){super(e,t,n)}}Uu.prototype.ValueTypeName="string";Uu.prototype.ValueBufferType=Array;Uu.prototype.DefaultInterpolation=vf;Uu.prototype.InterpolantFactoryMethodLinear=void 0;Uu.prototype.InterpolantFactoryMethodSmooth=void 0;class Pu extends Ws{}Pu.prototype.ValueTypeName="vector";class Af{constructor(e="",t=-1,n=[],r=cv){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Wr(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(Wz(n[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=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=n.length;s!==o;++s)t.push(Ws.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const s=t.length,o=[];for(let a=0;a<s;a++){let l=[],u=[];l.push((a+s-1)%s,a,(a+1)%s),u.push(0,1,0);const f=yI(l);l=lA(l,1,f),u=lA(u,1,f),!r&&l[0]===0&&(l.push(s),u.push(u[0])),o.push(new Tu(".morphTargetInfluences["+t[a].name+"]",l,u).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const r=e;n=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const u=e[a],f=u.name.match(s);if(f&&f.length>1){const h=f[1];let p=r[h];p||(r[h]=p=[]),p.push(u)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(h,p,m,v,_){if(m.length!==0){const y=[],g=[];oE(m,y,g,v),y.length!==0&&_.push(new h(p,y,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let h=0;h<u.length;h++){const p=u[h].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 y=[],g=[];for(let A=0;A!==p[v].morphTargets.length;++A){const S=p[v];y.push(S.time),g.push(S.morphTarget===_?1:0)}r.push(new Tu(".morphTargetInfluence["+_+"]",y,g))}l=m.length*o}else{const m=".bones["+t[h].name+"]";n(Pu,m+".position",p,"pos",r),n(Ru,m+".quaternion",p,"rot",r),n(Pu,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 n=0,r=e.length;n!==r;++n){const s=this.tracks[n];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 Vz(i){switch(i.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Tu;case"vector":case"vector2":case"vector3":case"vector4":return Pu;case"color":return lE;case"quaternion":return Ru;case"bool":case"boolean":return Ou;case"string":return Uu}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+i)}function Wz(i){if(i.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=Vz(i.type);if(i.times===void 0){const t=[],n=[];oE(i.keys,t,n,"value"),i.times=t,i.values=n}return e.parse!==void 0?e.parse(i):new e(i.name,i.times,i.values,i.interpolation)}const Wo={enabled:!1,files:{},add:function(i,e){this.enabled!==!1&&(this.files[i]=e)},get:function(i){if(this.enabled!==!1)return this.files[i]},remove:function(i){delete this.files[i]},clear:function(){this.files={}}};class bv{constructor(e,t,n){const r=this;let s=!1,o=0,a=0,l;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,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,h){return u.push(f,h),this},this.removeHandler=function(f){const h=u.indexOf(f);return h!==-1&&u.splice(h,2),this},this.getHandler=function(f){for(let h=0,p=u.length;h<p;h+=2){const m=u[h],v=u[h+1];if(m.global&&(m.lastIndex=0),m.test(f))return v}return null}}}const Xc=new bv;class bi{constructor(e){this.manager=e!==void 0?e:Xc,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(r,s){n.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 Do={};class Xz extends Error{constructor(e,t){super(e),this.response=t}}class Ri extends bi{constructor(e){super(e)}load(e,t,n,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(Do[e]!==void 0){Do[e].push({onLoad:t,onProgress:n,onError:r});return}Do[e]=[],Do[e].push({onLoad:t,onProgress:n,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const f=Do[e],h=u.body.getReader(),p=u.headers.get("X-File-Size")||u.headers.get("Content-Length"),m=p?parseInt(p):0,v=m!==0;let _=0;const y=new ReadableStream({start(g){A();function A(){h.read().then(({done:S,value:w})=>{if(S)g.close();else{_+=w.byteLength;const P=new ProgressEvent("progress",{lengthComputable:v,loaded:_,total:m});for(let T=0,I=f.length;T<I;T++){const D=f[T];D.onProgress&&D.onProgress(P)}g.enqueue(w),A()}},S=>{g.error(S)})}}});return new Response(y)}else throw new Xz(`fetch for "${u.url}" responded with ${u.status}: ${u.statusText}`,u)}).then(u=>{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(f=>new DOMParser().parseFromString(f,a));case"json":return u.json();default:if(a===void 0)return u.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),p=h&&h[1]?h[1].toLowerCase():void 0,m=new TextDecoder(p);return u.arrayBuffer().then(v=>m.decode(v))}}}).then(u=>{Wo.add(e,u);const f=Do[e];delete Do[e];for(let h=0,p=f.length;h<p;h++){const m=f[h];m.onLoad&&m.onLoad(u)}}).catch(u=>{const f=Do[e];if(f===void 0)throw this.manager.itemError(e),u;delete Do[e];for(let h=0,p=f.length;h<p;h++){const m=f[h];m.onError&&m.onError(u)}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 Jz extends bi{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new Ri(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)}},n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=Af.parse(e[n]);t.push(r)}return t}}class jz extends bi{constructor(e){super(e)}load(e,t,n,r){const s=this,o=[],a=new yv,l=new Ri(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(s.withCredentials);let u=0;function f(h){l.load(e[h],function(p){const m=s.parse(p,!0);o[h]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps},u+=1,u===6&&(m.mipmapCount===1&&(a.minFilter=Qt),a.image=o,a.format=m.format,a.needsUpdate=!0,t&&t(a))},n,r)}if(Array.isArray(e))for(let h=0,p=e.length;h<p;++h)f(h);else l.load(e,function(h){const p=s.parse(h,!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=Qt),a.format=p.format,a.needsUpdate=!0,t&&t(a)},n,r);return a}}class kh extends bi{constructor(e){super(e)}load(e,t,n,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=Lh("img");function l(){f(),Wo.add(e,this),t&&t(this),s.manager.itemEnd(e)}function u(h){f(),r&&r(h),s.manager.itemError(e),s.manager.itemEnd(e)}function f(){a.removeEventListener("load",l,!1),a.removeEventListener("error",u,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class EI extends bi{constructor(e){super(e)}load(e,t,n,r){const s=new rp;s.colorSpace=gr;const o=new kh(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function l(u){o.load(e[u],function(f){s.images[u]=f,a++,a===6&&(s.needsUpdate=!0,t&&t(s))},void 0,r)}for(let u=0;u<e.length;++u)l(u);return s}}class uE extends bi{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new mo,a=new Ri(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(s.withCredentials),a.load(e,function(l){let u;try{u=s.parse(l)}catch(f){if(r!==void 0)r(f);else{console.error(f);return}}u.image!==void 0?o.image=u.image:u.data!==void 0&&(o.image.width=u.width,o.image.height=u.height,o.image.data=u.data),o.wrapS=u.wrapS!==void 0?u.wrapS:Kn,o.wrapT=u.wrapT!==void 0?u.wrapT:Kn,o.magFilter=u.magFilter!==void 0?u.magFilter:Qt,o.minFilter=u.minFilter!==void 0?u.minFilter:Qt,o.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.colorSpace!==void 0&&(o.colorSpace=u.colorSpace),u.flipY!==void 0&&(o.flipY=u.flipY),u.format!==void 0&&(o.format=u.format),u.type!==void 0&&(o.type=u.type),u.mipmaps!==void 0&&(o.mipmaps=u.mipmaps,o.minFilter=ps),u.mipmapCount===1&&(o.minFilter=Qt),u.generateMipmaps!==void 0&&(o.generateMipmaps=u.generateMipmaps),o.needsUpdate=!0,t&&t(o,u)},n,r),o}}class dp extends bi{constructor(e){super(e)}load(e,t,n,r){const s=new qt,o=new kh(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)},n,r),s}}class dl extends Zt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new He(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()),t}}class wI extends dl{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new He(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const Q1=new mt,YT=new H,KT=new H;class cE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Re(512,512),this.map=null,this.mapPass=null,this.matrix=new mt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new sp,this._frameExtents=new Re(1,1),this._viewportCount=1,this._viewports=[new cn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;YT.setFromMatrixPosition(e.matrixWorld),t.position.copy(YT),KT.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(KT),t.updateMatrixWorld(),Q1.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Q1),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Q1)}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.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.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 Yz extends cE{constructor(){super(new oi(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=yf*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(n!==t.fov||r!==t.aspect||s!==t.far)&&(t.fov=n,t.aspect=r,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class fE extends dl{constructor(e,t,n=0,r=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.target=new Zt,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Yz}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 QT=new mt,Td=new H,q1=new H;class Kz extends cE{constructor(){super(new oi(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Re(4,2),this._viewportCount=6,this._viewports=[new cn(2,1,1,1),new cn(0,1,1,1),new cn(3,1,1,1),new cn(1,1,1,1),new cn(3,0,1,1),new cn(1,0,1,1)],this._cubeDirections=[new H(1,0,0),new H(-1,0,0),new H(0,0,1),new H(0,0,-1),new H(0,1,0),new H(0,-1,0)],this._cubeUps=[new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,0,1),new H(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,s=e.distance||n.far;s!==n.far&&(n.far=s,n.updateProjectionMatrix()),Td.setFromMatrixPosition(e.matrixWorld),n.position.copy(Td),q1.copy(n.position),q1.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(q1),n.updateMatrixWorld(),r.makeTranslation(-Td.x,-Td.y,-Td.z),QT.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(QT)}}class dE extends dl{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new Kz}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 Qz extends cE{constructor(){super(new Lu(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class hE extends dl{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Zt.DEFAULT_UP),this.updateMatrix(),this.target=new Zt,this.shadow=new Qz}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class MI extends dl{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class CI extends dl{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,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 TI{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new H)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,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*n),t.addScaledVector(o[4],1.092548*(n*r)),t.addScaledVector(o[5],1.092548*(r*s)),t.addScaledVector(o[6],.315392*(3*s*s-1)),t.addScaledVector(o[7],1.092548*(n*s)),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=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*n),t.addScaledVector(o[4],2*.429043*n*r),t.addScaledVector(o[5],2*.429043*r*s),t.addScaledVector(o[6],.743125*s*s-.247708),t.addScaledVector(o[7],2*.429043*n*s),t.addScaledVector(o[8],.429043*(n*n-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 n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+r*3);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+r*3);return e}static getBasisAt(e,t){const n=e.x,r=e.y,s=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*s,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*s,t[6]=.315392*(3*s*s-1),t[7]=1.092548*n*s,t[8]=.546274*(n*n-r*r)}}class RI extends dl{constructor(e=new TI,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 Iv extends bi{constructor(e){super(e),this.textures={}}load(e,t,n,r){const s=this,o=new Ri(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)}},n,r)}parse(e){const t=this.textures;function n(s){return t[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),t[s]}const r=Iv.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 He().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=n(o.value);break;case"c":r.uniforms[s].value=new He().setHex(o.value);break;case"v2":r.uniforms[s].value=new Re().fromArray(o.value);break;case"v3":r.uniforms[s].value=new H().fromArray(o.value);break;case"v4":r.uniforms[s].value=new cn().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Dt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new mt().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=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(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 Re().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(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=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new Re().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:cI,SpriteMaterial:KS,RawShaderMaterial:fI,ShaderMaterial:ur,PointsMaterial:_v,MeshPhysicalMaterial:Es,MeshStandardMaterial:Uf,MeshPhongMaterial:dI,MeshToonMaterial:hI,MeshNormalMaterial:pI,MeshLambertMaterial:mI,MeshDepthMaterial:JS,MeshDistanceMaterial:jS,MeshBasicMaterial:Xi,MeshMatcapMaterial:gI,LineDashedMaterial:vI,LineBasicMaterial:qi,Material:Qn};return new t[e]}}class ja{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 n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);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 PI 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 bI extends bi{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new Ri(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)}},n,r)}parse(e){const t={},n={};function r(m,v){if(t[v]!==void 0)return t[v];const y=m.interleavedBuffers[v],g=s(m,y.buffer),A=Hc(y.type,g),S=new op(A,y.stride);return S.uuid=y.uuid,t[v]=S,S}function s(m,v){if(n[v]!==void 0)return n[v];const y=m.arrayBuffers[v],g=new Uint32Array(y).buffer;return n[v]=g,g}const o=e.isInstancedBufferGeometry?new PI:new Bt,a=e.data.index;if(a!==void 0){const m=Hc(a.type,a.array);o.setIndex(new $t(m,1))}const l=e.data.attributes;for(const m in l){const v=l[m];let _;if(v.isInterleavedBufferAttribute){const y=r(e.data,v.data);_=new tl(y,v.itemSize,v.offset,v.normalized)}else{const y=Hc(v.type,v.array),g=v.isInstancedBufferAttribute?wu:$t;_=new g(y,v.itemSize,v.normalized)}v.name!==void 0&&(_.name=v.name),v.usage!==void 0&&_.setUsage(v.usage),o.setAttribute(m,_)}const u=e.data.morphAttributes;if(u)for(const m in u){const v=u[m],_=[];for(let y=0,g=v.length;y<g;y++){const A=v[y];let S;if(A.isInterleavedBufferAttribute){const w=r(e.data,A.data);S=new tl(w,A.itemSize,A.offset,A.normalized)}else{const w=Hc(A.type,A.array);S=new $t(w,A.itemSize,A.normalized)}A.name!==void 0&&(S.name=A.name),_.push(S)}o.morphAttributes[m]=_}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const h=e.data.groups||e.data.drawcalls||e.data.offsets;if(h!==void 0)for(let m=0,v=h.length;m!==v;++m){const _=h[m];o.addGroup(_.start,_.count,_.materialIndex)}const p=e.data.boundingSphere;if(p!==void 0){const m=new H;p.center!==void 0&&m.fromArray(p.center),o.boundingSphere=new Ti(m,p.radius)}return e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class qz extends bi{constructor(e){super(e)}load(e,t,n,r){const s=this,o=this.path===""?ja.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new Ri(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){let u=null;try{u=JSON.parse(l)}catch(h){r!==void 0&&r(h),console.error("THREE:ObjectLoader: Can't parse "+e+".",h.message);return}const f=u.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(u,t)},n,r)}async loadAsync(e,t){const n=this,r=this.path===""?ja.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||r;const s=new Ri(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 n.parseAsync(a)}parse(e,t){const n=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(u)}),a=this.parseTextures(e.textures,o),l=this.parseMaterials(e.materials,a),u=this.parseObject(e.object,s,l,a,n),f=this.parseSkeletons(e.skeletons,u);if(this.bindSkeletons(u,f),t!==void 0){let h=!1;for(const p in o)if(o[p].data instanceof HTMLImageElement){h=!0;break}h===!1&&t(u)}return u}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),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),u=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,u),l}parseShapes(e){const t={};if(e!==void 0)for(let n=0,r=e.length;n<r;n++){const s=new fu().fromJSON(e[n]);t[s.uuid]=s}return t}parseSkeletons(e,t){const n={},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 ap().fromJSON(e[s],r);n[a.uuid]=a}return n}parseGeometries(e,t){const n={};if(e!==void 0){const r=new bI;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 jT?a=jT[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),n[l.uuid]=a}}return n}parseMaterials(e,t){const n={},r={};if(e!==void 0){const s=new Iv;s.setTextures(t);for(let o=0,a=e.length;o<a;o++){const l=e[o];n[l.uuid]===void 0&&(n[l.uuid]=s.parse(l)),r[l.uuid]=n[l.uuid]}}return r}parseAnimations(e){const t={};if(e!==void 0)for(let n=0;n<e.length;n++){const r=e[n],s=Af.parse(r);t[s.uuid]=s}return t}parseImages(e,t){const n=this,r={};let s;function o(l){return n.manager.itemStart(l),s.load(l,function(){n.manager.itemEnd(l)},void 0,function(){n.manager.itemError(l),n.manager.itemEnd(l)})}function a(l){if(typeof l=="string"){const u=l,f=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:n.resourcePath+u;return o(f)}else return l.data?{data:Hc(l.type,l.data),width:l.width,height:l.height}:null}if(e!==void 0&&e.length>0){const l=new bv(t);s=new kh(l),s.setCrossOrigin(this.crossOrigin);for(let u=0,f=e.length;u<f;u++){const h=e[u],p=h.url;if(Array.isArray(p)){const m=[];for(let v=0,_=p.length;v<_;v++){const y=p[v],g=a(y);g!==null&&(g instanceof HTMLImageElement?m.push(g):m.push(new mo(g.data,g.width,g.height)))}r[h.uuid]=new $l(m)}else{const m=a(h.url);r[h.uuid]=new $l(m)}}}return r}async parseImagesAsync(e){const t=this,n={};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:Hc(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){r=new kh(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o<a;o++){const l=e[o],u=l.url;if(Array.isArray(u)){const f=[];for(let h=0,p=u.length;h<p;h++){const m=u[h],v=await s(m);v!==null&&(v instanceof HTMLImageElement?f.push(v):f.push(new mo(v.data,v.width,v.height)))}n[l.uuid]=new $l(f)}else{const f=await s(l.url);n[l.uuid]=new $l(f)}}}return n}parseTextures(e,t){function n(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],u=l.data;let f;Array.isArray(u)?(f=new rp,u.length===6&&(f.needsUpdate=!0)):(u&&u.data?f=new mo:f=new qt,u&&(f.needsUpdate=!0)),f.source=l,f.uuid=a.uuid,a.name!==void 0&&(f.name=a.name),a.mapping!==void 0&&(f.mapping=n(a.mapping,Zz)),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=n(a.wrap[0],qT),f.wrapT=n(a.wrap[1],qT)),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=n(a.minFilter,ZT)),a.magFilter!==void 0&&(f.magFilter=n(a.magFilter,ZT)),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,n,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 y=p[v];n[y]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",y),m.push(n[y])}return m}return n[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",p),n[p]}}function u(p){return r[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",p),r[p]}let f,h;switch(e.type){case"Scene":o=new Eu,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new He(e.background):o.background=u(e.background)),e.environment!==void 0&&(o.environment=u(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?o.fog=new gv(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new mv(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 oi(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 Lu(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 MI(e.color,e.intensity);break;case"DirectionalLight":o=new hE(e.color,e.intensity);break;case"PointLight":o=new dE(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new CI(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new fE(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new wI(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=new RI().fromJSON(e);break;case"SkinnedMesh":f=a(e.geometry),h=l(e.material),o=new QS(f,h),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),h=l(e.material),o=new Mn(f,h);break;case"InstancedMesh":f=a(e.geometry),h=l(e.material);const p=e.count,m=e.instanceMatrix,v=e.instanceColor;o=new qS(f,h,p),o.instanceMatrix=new wu(new Float32Array(m.array),16),v!==void 0&&(o.instanceColor=new wu(new Float32Array(v.array),v.itemSize));break;case"BatchedMesh":f=a(e.geometry),h=l(e.material),o=new Zb(e.maxGeometryCount,e.maxVertexCount,e.maxIndexCount,h),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 y=new ji;y.min.fromArray(_.boxMin),y.max.fromArray(_.boxMax);const g=new Ti;return g.radius=_.sphereRadius,g.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:y,sphereInitialized:_.sphereInitialized,sphere:g}}),o._maxGeometryCount=e.maxGeometryCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=u(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=u(e.colorsTexture.uuid));break;case"LOD":o=new qb;break;case"Line":o=new qo(a(e.geometry),l(e.material));break;case"LineLoop":o=new ZS(a(e.geometry),l(e.material));break;case"LineSegments":o=new Hs(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new $S(a(e.geometry),l(e.material));break;case"Sprite":o=new Qb(l(e.material));break;case"Group":o=new lo;break;case"Bone":o=new vv;break;default:o=new Zt}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.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,n,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(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const r=t[n.skeleton];r===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(r,n.bindMatrix)}})}}const Zz={UVMapping:Za,CubeReflectionMapping:_o,CubeRefractionMapping:$a,EquirectangularReflectionMapping:mf,EquirectangularRefractionMapping:Th,CubeUVReflectionMapping:Df},qT={RepeatWrapping:As,ClampToEdgeWrapping:Kn,MirroredRepeatWrapping:gf},ZT={NearestFilter:li,NearestMipmapNearestFilter:av,NearestMipmapLinearFilter:Ql,LinearFilter:Qt,LinearMipmapNearestFilter:ef,LinearMipmapLinearFilter:ps};class II 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,n,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(u=>{t&&t(u),s.manager.itemEnd(e)}).catch(u=>{r&&r(u)});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(u){return u.blob()}).then(function(u){return createImageBitmap(u,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(u){return Wo.add(e,u),t&&t(u),s.manager.itemEnd(e),u}).catch(function(u){r&&r(u),Wo.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Wo.add(e,l),s.manager.itemStart(e)}}let f0;class pE{static getContext(){return f0===void 0&&(f0=new(window.AudioContext||window.webkitAudioContext)),f0}static setContext(e){f0=e}}class $z extends bi{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new Ri(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const u=l.slice(0);pE.getContext().decodeAudioData(u,function(h){t(h)}).catch(a)}catch(u){a(u)}},n,r);function a(l){r?r(l):console.error(l),s.manager.itemError(e)}}}const $T=new mt,e2=new mt,Bl=new mt;class ek{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new oi,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new oi,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,Bl.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(uu*t.fov*.5)/t.zoom;let a,l;e2.elements[12]=-r,$T.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,Bl.elements[0]=2*t.near/(l-a),Bl.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Bl),a=-o*t.aspect-s,l=o*t.aspect-s,Bl.elements[0]=2*t.near/(l-a),Bl.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Bl)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(e2),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply($T)}}class mE{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=t2(),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=t2();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function t2(){return(typeof performance>"u"?Date:performance).now()}const Dl=new H,n2=new Ci,tk=new H,Fl=new H;class nk extends Zt{constructor(){super(),this.type="AudioListener",this.context=pE.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new mE}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,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Dl,n2,tk),Fl.set(0,0,-1).applyQuaternion(n2),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Dl.x,r),t.positionY.linearRampToValueAtTime(Dl.y,r),t.positionZ.linearRampToValueAtTime(Dl.z,r),t.forwardX.linearRampToValueAtTime(Fl.x,r),t.forwardY.linearRampToValueAtTime(Fl.y,r),t.forwardZ.linearRampToValueAtTime(Fl.z,r),t.upX.linearRampToValueAtTime(n.x,r),t.upY.linearRampToValueAtTime(n.y,r),t.upZ.linearRampToValueAtTime(n.z,r)}else t.setPosition(Dl.x,Dl.y,Dl.z),t.setOrientation(Fl.x,Fl.y,Fl.z,n.x,n.y,n.z)}}class BI extends Zt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;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 Ll=new H,i2=new Ci,ik=new H,Nl=new H;class rk extends BI{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,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Ll,i2,ik),Nl.set(0,0,1).applyQuaternion(i2);const t=this.panner;if(t.positionX){const n=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Ll.x,n),t.positionY.linearRampToValueAtTime(Ll.y,n),t.positionZ.linearRampToValueAtTime(Ll.z,n),t.orientationX.linearRampToValueAtTime(Nl.x,n),t.orientationY.linearRampToValueAtTime(Nl.y,n),t.orientationZ.linearRampToValueAtTime(Nl.z,n)}else t.setPosition(Ll.x,Ll.y,Ll.z),t.setOrientation(Nl.x,Nl.y,Nl.z)}}class sk{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class DI{constructor(e,t,n){this.binding=e,this.valueSize=n;let r,s,o;switch(t){case"quaternion":r=this._slerp,s=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":r=this._select,s=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:r=this._lerp,s=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*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 n=this.buffer,r=this.valueSize,s=e*r+r;let o=this.cumulativeWeight;if(o===0){for(let a=0;a!==r;++a)n[s+a]=n[a];o=t}else{o+=t;const a=t/o;this._mixBufferRegion(n,s,0,a,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=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(n,r,l,1-s,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let l=t,u=t+t;l!==u;++l)if(n[l]!==n[l+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let s=n,o=r;s!==o;++s)t[s]=t[r+s%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,s){if(r>=.5)for(let o=0;o!==s;++o)e[t+o]=e[n+o]}_slerp(e,t,n,r){Ci.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,s){const o=this._workIndex*s;Ci.multiplyQuaternionsFlat(e,o,e,t,e,n),Ci.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[n+o]*r}}}const gE="\\[\\]\\.:\\/",ok=new RegExp("["+gE+"]","g"),vE="[^"+gE+"]",ak="[^"+gE.replace("\\.","")+"]",lk=/((?:WC+[\/:])*)/.source.replace("WC",vE),uk=/(WCOD+)?/.source.replace("WCOD",ak),ck=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",vE),fk=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",vE),dk=new RegExp("^"+lk+uk+ck+fk+"$"),hk=["material","materials","bones","map"];class pk{constructor(e,t,n){const r=n||Kt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=n.length;r!==s;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class Kt{constructor(e,t,n){this.path=t,this.parsedPath=n||Kt.parseTrackName(t),this.node=Kt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Kt.Composite(e,t,n):new Kt(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ok,"")}static parseTrackName(e){const t=dk.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=n.nodeName.substring(r+1);hk.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(s){for(let o=0;o<s.length;o++){const a=s[o];if(a.name===t||a.uuid===t)return a;const l=n(a.children);if(l)return l}return null},r=n(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 n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)e[t++]=n[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 n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)n[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,n=t.objectName,r=t.propertyName;let s=t.propertyIndex;if(e||(e=Kt.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let u=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let f=0;f<e.length;f++)if(e[f].name===u){u=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[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(u!==void 0){if(e[u]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[u]}}const o=e[r];if(o===void 0){const u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+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}}Kt.Composite=pk;Kt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Kt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Kt.prototype.GetterByBindingType=[Kt.prototype._getValue_direct,Kt.prototype._getValue_array,Kt.prototype._getValue_arrayElement,Kt.prototype._getValue_toArray];Kt.prototype.SetterByBindingTypeAndVersioning=[[Kt.prototype._setValue_direct,Kt.prototype._setValue_direct_setNeedsUpdate,Kt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Kt.prototype._setValue_array,Kt.prototype._setValue_array_setNeedsUpdate,Kt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Kt.prototype._setValue_arrayElement,Kt.prototype._setValue_arrayElement_setNeedsUpdate,Kt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Kt.prototype._setValue_fromArray,Kt.prototype._setValue_fromArray_setNeedsUpdate,Kt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class mk{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Wr(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,s=this._bindings,o=s.length;let a,l=e.length,u=this.nCachedObjects_;for(let f=0,h=arguments.length;f!==h;++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,y=o;_!==y;++_)s[_].push(new Kt(p,n[_],r[_]))}else if(v<u){a=e[v];const _=--u,y=e[_];t[y.uuid]=v,e[v]=y,t[m]=_,e[_]=p;for(let g=0,A=o;g!==A;++g){const S=s[g],w=S[_];let P=S[v];S[v]=w,P===void 0&&(P=new Kt(p,n[g],r[g])),S[_]=P}}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_=u}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let s=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const l=arguments[o],u=l.uuid,f=t[u];if(f!==void 0&&f>=s){const h=s++,p=e[h];t[p.uuid]=f,e[f]=p,t[u]=h,e[h]=l;for(let m=0,v=r;m!==v;++m){const _=n[m],y=_[h],g=_[f];_[f]=y,_[h]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const u=arguments[a],f=u.uuid,h=t[f];if(h!==void 0)if(delete t[f],h<s){const p=--s,m=e[p],v=--o,_=e[v];t[m.uuid]=h,e[h]=m,t[_.uuid]=p,e[p]=_,e.pop();for(let y=0,g=r;y!==g;++y){const A=n[y],S=A[p],w=A[v];A[h]=S,A[p]=w,A.pop()}}else{const p=--o,m=e[p];p>0&&(t[m.uuid]=h),e[h]=m,e.pop();for(let v=0,_=r;v!==_;++v){const y=n[v];y[h]=y[p],y.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,u=l.length,f=this.nCachedObjects_,h=new Array(u);r=s.length,n[e]=r,o.push(e),a.push(t),s.push(h);for(let p=f,m=l.length;p!==m;++p){const v=l[p];h[p]=new Kt(v,e,t)}return h}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],u=e[a];t[u]=n,o[n]=l,o.pop(),s[n]=s[a],s.pop(),r[n]=r[a],r.pop()}}}class FI{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:ql,endingEnd:ql};for(let u=0;u!==o;++u){const f=s[u].createInterpolant(null);a[u]=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=Ab,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){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,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,u=a.sampleValues;return l[0]=s,l[1]=s+n,u[0]=e/o,u[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*n;l<0||n===0?t=0:(this._startTime=null,t=n*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case LS:for(let f=0,h=l.length;f!==h;++f)l[f].evaluate(o),u[f].accumulateAdditive(a);break;case cv:default:for(let f=0,h=l.length;f!==h;++f)l[f].evaluate(o),u[f].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const r=n.evaluate(e)[0];t*=r,e>n.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 n=this._timeScaleInterpolant;if(n!==null){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,s=this._loopCount;const o=n===Sb;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(n===xb){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const u=e<0;this._setEndings(u,!u,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Zl,r.endingEnd=Zl):(e?r.endingStart=this.zeroSlopeAtStart?Zl:ql:r.endingStart=Ph,t?r.endingEnd=this.zeroSlopeAtEnd?Zl:ql:r.endingEnd=Ph)}_scheduleFading(e,t,n){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]=n,this}}const gk=new Float32Array(1);class vk extends ta{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=n.uuid,u=this._bindingsByRootAndName;let f=u[l];f===void 0&&(f={},u[l]=f);for(let h=0;h!==s;++h){const p=r[h],m=p.name;let v=f[m];if(v!==void 0)++v.referenceCount,o[h]=v;else{if(v=o[h],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const _=t&&t._propertyBindings[h].binding.parsedPath;v=new DI(Kt.create(n,m,_),p.ValueTypeName,p.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),o[h]=v}a[h].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,n)}const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const s=t[n];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const s=t[n];--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,n){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[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const s=e._clip.uuid,o=this._actionsByClip,a=o[s],l=a.knownActions,u=l[l.length-1],f=e._byClipCacheIndex;u._byClipCacheIndex=f,l[f]=u,l.pop(),e._byClipCacheIndex=null;const h=a.actionByRoot,p=(e._localRoot||this._root).uuid;delete h[p],l.length===0&&delete o[s],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const s=t[n];--s.referenceCount===0&&this._removeInactiveBinding(s)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,s=this._bindings;let o=r[t];o===void 0&&(o={},r[t]=o),o[n]=e,e._cacheIndex=s.length,s.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,s=n.path,o=this._bindingsByRootAndName,a=o[r],l=t[t.length-1],u=e._cacheIndex;l._cacheIndex=u,t[u]=l,t.pop(),delete a[s],Object.keys(a).length===0&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return n===void 0&&(n=new aE(new Float32Array(2),new Float32Array(2),1,gk),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,s=t[r];e.__cacheIndex=r,t[r]=e,s.__cacheIndex=n,t[n]=s}clipAction(e,t,n){const r=t||this._root,s=r.uuid;let o=typeof e=="string"?Af.findByName(r,e):e;const a=o!==null?o.uuid:e,l=this._actionsByClip[a];let u=null;if(n===void 0&&(o!==null?n=o.blendMode:n=cv),l!==void 0){const h=l.actionByRoot[s];if(h!==void 0&&h.blendMode===n)return h;u=l.knownActions[0],o===null&&(o=u._clip)}if(o===null)return null;const f=new FI(this,o,t,n);return this._bindAction(f,u),this._addInactiveAction(f,a,s),f}existingAction(e,t){const n=t||this._root,r=n.uuid,s=typeof e=="string"?Af.findByName(n,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 n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let u=0;u!==n;++u)t[u]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)a[u].apply(o);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,s=r[n];if(s!==void 0){const o=s.knownActions;for(let a=0,l=o.length;a!==l;++a){const u=o[a];this._deactivateAction(u);const f=u._cacheIndex,h=t[t.length-1];u._cacheIndex=null,u._byClipCacheIndex=null,h._cacheIndex=f,t[f]=h,t.pop(),this._removeInactiveBindingsForAction(u)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const o in n){const a=n[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 n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class _E{constructor(e){this.value=e}clone(){return new _E(this.value.clone===void 0?this.value:this.value.clone())}}let _k=0;class yk extends ta{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:_k++}),this.name="",this.usage=Dh,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 n=0,r=t.length;n<r;n++){const s=Array.isArray(t[n])?t[n]:[t[n]];for(let o=0;o<s.length;o++)this.uniforms.push(s[o].clone())}return this}clone(){return new this.constructor().copy(this)}}class xk extends op{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class Ak{constructor(e,t,n,r,s){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,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 r2=new mt;class yE{constructor(e,t,n=0,r=1/0){this.ray=new Ff(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new cu,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: Unsupported camera type: "+t.type)}setFromXRController(e){return r2.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(r2),this}intersectObject(e,t=!0,n=[]){return uA(e,this,n,t),n.sort(s2),n}intersectObjects(e,t=!0,n=[]){for(let r=0,s=e.length;r<s;r++)uA(e[r],this,n,t);return n.sort(s2),n}}function s2(i,e){return i.distance-e.distance}function uA(i,e,t,n){let r=!0;if(i.layers.test(e.layers)&&i.raycast(e,t)===!1&&(r=!1),r===!0&&n===!0){const s=i.children;for(let o=0,a=s.length;o<a;o++)uA(s[o],e,t,!0)}}class Sk{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=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,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Vn(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class Ek{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return new this.constructor().copy(this)}}const o2=new Re;class wk{constructor(e=new Re(1/0,1/0),t=new Re(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=o2.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,o2).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 a2=new H,d0=new H;class Mk{constructor(e=new H,t=new H){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){a2.subVectors(e,this.start),d0.subVectors(this.end,this.start);const n=d0.dot(d0);let s=d0.dot(a2)/n;return t&&(s=Vn(s,0,1)),s}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const l2=new H;class Ck extends Zt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=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 u=o/l*Math.PI*2,f=a/l*Math.PI*2;r.push(Math.cos(u),Math.sin(u),1,Math.cos(f),Math.sin(f),1)}n.setAttribute("position",new ht(r,3));const s=new qi({fog:!1,toneMapped:!1});this.cone=new Hs(n,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),l2.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(l2),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const ya=new H,h0=new mt,Z1=new mt;class Tk extends Hs{constructor(e){const t=LI(e),n=new Bt,r=[],s=[],o=new He(0,0,1),a=new He(0,1,0);for(let u=0;u<t.length;u++){const f=t[u];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))}n.setAttribute("position",new ht(r,3)),n.setAttribute("color",new ht(s,3));const l=new qi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,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,n=this.geometry,r=n.getAttribute("position");Z1.copy(this.root.matrixWorld).invert();for(let s=0,o=0;s<t.length;s++){const a=t[s];a.parent&&a.parent.isBone&&(h0.multiplyMatrices(Z1,a.matrixWorld),ya.setFromMatrixPosition(h0),r.setXYZ(o,ya.x,ya.y,ya.z),h0.multiplyMatrices(Z1,a.parent.matrixWorld),ya.setFromMatrixPosition(h0),r.setXYZ(o+1,ya.x,ya.y,ya.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function LI(i){const e=[];i.isBone===!0&&e.push(i);for(let t=0;t<i.children.length;t++)e.push.apply(e,LI(i.children[t]));return e}class Rk extends Mn{constructor(e,t,n){const r=new Cu(t,4,2),s=new Xi({wireframe:!0,fog:!1,toneMapped:!1});super(r,s),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const Pk=new H,u2=new He,c2=new He;class bk extends Zt{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const r=new Of(t);r.rotateY(Math.PI*.5),this.material=new Xi({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 $t(o,3)),this.add(new Mn(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");u2.copy(this.light.color),c2.copy(this.light.groundColor);for(let n=0,r=t.count;n<r;n++){const s=n<r/2?u2:c2;t.setXYZ(n,s.r,s.g,s.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(Pk.setFromMatrixPosition(this.light.matrixWorld).negate())}}class Ik extends Hs{constructor(e=10,t=10,n=4473924,r=8947848){n=new He(n),r=new He(r);const s=t/2,o=e/t,a=e/2,l=[],u=[];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?n:r;_.toArray(u,m),m+=3,_.toArray(u,m),m+=3,_.toArray(u,m),m+=3,_.toArray(u,m),m+=3}const f=new Bt;f.setAttribute("position",new ht(l,3)),f.setAttribute("color",new ht(u,3));const h=new qi({vertexColors:!0,toneMapped:!1});super(f,h),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class Bk extends Hs{constructor(e=10,t=16,n=8,r=64,s=4473924,o=8947848){s=new He(s),o=new He(o);const a=[],l=[];if(t>1)for(let h=0;h<t;h++){const p=h/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 _=h&1?s:o;l.push(_.r,_.g,_.b),l.push(_.r,_.g,_.b)}for(let h=0;h<n;h++){const p=h&1?s:o,m=e-e/n*h;for(let v=0;v<r;v++){let _=v/r*(Math.PI*2),y=Math.sin(_)*m,g=Math.cos(_)*m;a.push(y,0,g),l.push(p.r,p.g,p.b),_=(v+1)/r*(Math.PI*2),y=Math.sin(_)*m,g=Math.cos(_)*m,a.push(y,0,g),l.push(p.r,p.g,p.b)}}const u=new Bt;u.setAttribute("position",new ht(a,3)),u.setAttribute("color",new ht(l,3));const f=new qi({vertexColors:!0,toneMapped:!1});super(u,f),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const f2=new H,p0=new H,d2=new H;class Dk extends Zt{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",t===void 0&&(t=1);let r=new Bt;r.setAttribute("position",new ht([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const s=new qi({fog:!1,toneMapped:!1});this.lightPlane=new qo(r,s),this.add(this.lightPlane),r=new Bt,r.setAttribute("position",new ht([0,0,0,0,0,1],3)),this.targetLine=new qo(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),f2.setFromMatrixPosition(this.light.matrixWorld),p0.setFromMatrixPosition(this.light.target.matrixWorld),d2.subVectors(p0,f2),this.lightPlane.lookAt(p0),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(p0),this.targetLine.scale.z=d2.length()}}const m0=new H,Gn=new ip;class Fk extends Hs{constructor(e){const t=new Bt,n=new qi({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 ht(r,3)),t.setAttribute("color",new ht(s,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const u=new He(16755200),f=new He(16711680),h=new He(43775),p=new He(16777215),m=new He(3355443);this.setColors(u,f,h,p,m)}setColors(e,t,n,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,n.r,n.g,n.b),a.setXYZ(33,n.r,n.g,n.b),a.setXYZ(34,n.r,n.g,n.b),a.setXYZ(35,n.r,n.g,n.b),a.setXYZ(36,n.r,n.g,n.b),a.setXYZ(37,n.r,n.g,n.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,n=1,r=1;Gn.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Jn("c",t,e,Gn,0,0,-1),Jn("t",t,e,Gn,0,0,1),Jn("n1",t,e,Gn,-n,-r,-1),Jn("n2",t,e,Gn,n,-r,-1),Jn("n3",t,e,Gn,-n,r,-1),Jn("n4",t,e,Gn,n,r,-1),Jn("f1",t,e,Gn,-n,-r,1),Jn("f2",t,e,Gn,n,-r,1),Jn("f3",t,e,Gn,-n,r,1),Jn("f4",t,e,Gn,n,r,1),Jn("u1",t,e,Gn,n*.7,r*1.1,-1),Jn("u2",t,e,Gn,-n*.7,r*1.1,-1),Jn("u3",t,e,Gn,0,r*2,-1),Jn("cf1",t,e,Gn,-n,0,1),Jn("cf2",t,e,Gn,n,0,1),Jn("cf3",t,e,Gn,0,-r,1),Jn("cf4",t,e,Gn,0,r,1),Jn("cn1",t,e,Gn,-n,0,-1),Jn("cn2",t,e,Gn,n,0,-1),Jn("cn3",t,e,Gn,0,-r,-1),Jn("cn4",t,e,Gn,0,r,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Jn(i,e,t,n,r,s,o){m0.set(r,s,o).unproject(n);const a=e[i];if(a!==void 0){const l=t.getAttribute("position");for(let u=0,f=a.length;u<f;u++)l.setXYZ(a[u],m0.x,m0.y,m0.z)}}const g0=new ji;class Lk extends Hs{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(8*3),s=new Bt;s.setIndex(new $t(n,1)),s.setAttribute("position",new $t(r,3)),super(s,new qi({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&&g0.setFromObject(this.object),g0.isEmpty())return;const t=g0.min,n=g0.max,r=this.geometry.attributes.position,s=r.array;s[0]=n.x,s[1]=n.y,s[2]=n.z,s[3]=t.x,s[4]=n.y,s[5]=n.z,s[6]=t.x,s[7]=t.y,s[8]=n.z,s[9]=n.x,s[10]=t.y,s[11]=n.z,s[12]=n.x,s[13]=n.y,s[14]=t.z,s[15]=t.x,s[16]=n.y,s[17]=t.z,s[18]=t.x,s[19]=t.y,s[20]=t.z,s[21]=n.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 Nk extends Hs{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),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 $t(n,1)),s.setAttribute("position",new ht(r,3)),super(s,new qi({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 Ok extends qo{constructor(e,t=1,n=16776960){const r=n,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 ht(s,3)),o.computeBoundingSphere(),super(o,new qi({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 ht(a,3)),l.computeBoundingSphere(),this.add(new Mn(l,new Xi({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 h2=new H;let v0,$1;class Uk extends Zt{constructor(e=new H(0,0,1),t=new H(0,0,0),n=1,r=16776960,s=n*.2,o=s*.2){super(),this.type="ArrowHelper",v0===void 0&&(v0=new Bt,v0.setAttribute("position",new ht([0,0,0,0,1,0],3)),$1=new Nu(0,.5,1,5,1),$1.translate(0,-.5,0)),this.position.copy(t),this.line=new qo(v0,new qi({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Mn($1,new Xi({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,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{h2.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(h2,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class zk extends Hs{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new Bt;r.setAttribute("position",new ht(t,3)),r.setAttribute("color",new ht(n,3));const s=new qi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,n){const r=new He,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(n),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class kk{constructor(){this.type="ShapePath",this.color=new He,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Nh,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,s,o){return this.currentPath.bezierCurveTo(e,t,n,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(g){const A=[];for(let S=0,w=g.length;S<w;S++){const P=g[S],T=new fu;T.curves=P.curves,A.push(T)}return A}function n(g,A){const S=A.length;let w=!1;for(let P=S-1,T=0;T<S;P=T++){let I=A[P],D=A[T],C=D.x-I.x,b=D.y-I.y;if(Math.abs(b)>Number.EPSILON){if(b<0&&(I=A[T],C=-C,D=A[P],b=-b),g.y<I.y||g.y>D.y)continue;if(g.y===I.y){if(g.x===I.x)return!0}else{const N=b*(g.x-I.x)-C*(g.y-I.y);if(N===0)return!0;if(N<0)continue;w=!w}}else{if(g.y!==I.y)continue;if(D.x<=g.x&&g.x<=I.x||I.x<=g.x&&g.x<=D.x)return!0}}return w}const r=go.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const u=[];if(s.length===1)return a=s[0],l=new fu,l.curves=a.curves,u.push(l),u;let f=!r(s[0].getPoints());f=e?!f:f;const h=[],p=[];let m=[],v=0,_;p[v]=void 0,m[v]=[];for(let g=0,A=s.length;g<A;g++)a=s[g],_=a.getPoints(),o=r(_),o=e?!o:o,o?(!f&&p[v]&&v++,p[v]={s:new fu,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,A=0;for(let S=0,w=p.length;S<w;S++)h[S]=[];for(let S=0,w=p.length;S<w;S++){const P=m[S];for(let T=0;T<P.length;T++){const I=P[T];let D=!0;for(let C=0;C<p.length;C++)n(I.p,p[C].p)&&(S!==C&&A++,D?(D=!1,h[C].push(I)):g=!0);D&&h[S].push(I)}}A>0&&g===!1&&(m=h)}let y;for(let g=0,A=p.length;g<A;g++){l=p[g].s,u.push(l),y=m[g];for(let S=0,w=y.length;S<w;S++)l.holes.push(y[S].h)}return u}}class Gk extends Tr{constructor(e=1,t=1,n=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:n}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Bf}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Bf);const Hk=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:TS,AddEquation:Pa,AddOperation:sb,AdditiveAnimationBlendMode:LS,AdditiveBlending:pf,AgXToneMapping:cb,AlphaFormat:pb,AlwaysCompare:Db,AlwaysDepth:ZP,AlwaysStencilFunc:eA,AmbientLight:MI,AnimationAction:FI,AnimationClip:Af,AnimationLoader:Jz,AnimationMixer:vk,AnimationObjectGroup:mk,AnimationUtils:Hz,ArcCurve:eI,ArrayCamera:Yb,ArrowHelper:Uk,AttachedBindMode:Cx,Audio:BI,AudioAnalyser:sk,AudioContext:pE,AudioListener:nk,AudioLoader:$z,AxesHelper:zk,BackSide:Mi,BasicDepthPacking:wb,BasicShadowMap:BP,BatchedMesh:Zb,Bone:vv,BooleanKeyframeTrack:Ou,Box2:wk,Box3:ji,Box3Helper:Nk,BoxGeometry:ul,BoxHelper:Lk,BufferAttribute:$t,BufferGeometry:Bt,BufferGeometryLoader:bI,ByteType:RS,Cache:Wo,Camera:ip,CameraHelper:Fk,CanvasTexture:dz,CapsuleGeometry:Av,CatmullRomCurve3:tI,CineonToneMapping:lb,CircleGeometry:Sv,ClampToEdgeWrapping:Kn,Clock:mE,Color:He,ColorKeyframeTrack:lE,ColorManagement:ln,CompressedArrayTexture:cz,CompressedCubeTexture:fz,CompressedTexture:yv,CompressedTextureLoader:jz,ConeGeometry:up,ConstantAlphaFactor:KP,ConstantColorFactor:jP,CubeCamera:kb,CubeReflectionMapping:_o,CubeRefractionMapping:$a,CubeTexture:rp,CubeTextureLoader:EI,CubeUVReflectionMapping:Df,CubicBezierCurve:tE,CubicBezierCurve3:nI,CubicInterpolant:xI,CullFaceBack:Ex,CullFaceFront:IP,CullFaceFrontBack:r4,CullFaceNone:bP,Curve:Vs,CurvePath:rI,CustomBlending:DP,CustomToneMapping:ub,CylinderGeometry:Nu,Cylindrical:Ek,Data3DTexture:kS,DataArrayTexture:dv,DataTexture:mo,DataTextureLoader:uE,DataUtils:eu,DecrementStencilOp:f4,DecrementWrapStencilOp:h4,DefaultLoadingManager:Xc,DepthFormat:lu,DepthStencilFormat:Su,DepthTexture:hv,DetachedBindMode:db,DirectionalLight:hE,DirectionalLightHelper:Dk,DiscreteInterpolant:AI,DisplayP3ColorSpace:fv,DodecahedronGeometry:Ev,DoubleSide:fs,DstAlphaFactor:HP,DstColorFactor:WP,DynamicCopyUsage:T4,DynamicDrawUsage:tA,DynamicReadUsage:w4,EdgesGeometry:sI,EllipseCurve:xv,EqualCompare:Pb,EqualDepth:eb,EqualStencilFunc:v4,EquirectangularReflectionMapping:mf,EquirectangularRefractionMapping:Th,Euler:Yr,EventDispatcher:ta,ExtrudeGeometry:Mv,FileLoader:Ri,Float16BufferAttribute:hO,Float32BufferAttribute:ht,FloatType:Nn,Fog:gv,FogExp2:mv,FramebufferTexture:uz,FrontSide:xs,Frustum:sp,GLBufferAttribute:Ak,GLSL1:P4,GLSL3:nA,GreaterCompare:bb,GreaterDepth:nb,GreaterEqualCompare:Bb,GreaterEqualDepth:tb,GreaterEqualStencilFunc:A4,GreaterStencilFunc:y4,GridHelper:Ik,Group:lo,HalfFloatType:vi,HemisphereLight:wI,HemisphereLightHelper:bk,IcosahedronGeometry:Nf,ImageBitmapLoader:II,ImageLoader:kh,ImageUtils:Nb,IncrementStencilOp:c4,IncrementWrapStencilOp:d4,InstancedBufferAttribute:wu,InstancedBufferGeometry:PI,InstancedInterleavedBuffer:xk,InstancedMesh:qS,Int16BufferAttribute:fO,Int32BufferAttribute:dO,Int8BufferAttribute:lO,IntType:lv,InterleavedBuffer:op,InterleavedBufferAttribute:tl,Interpolant:zf,InterpolateDiscrete:vf,InterpolateLinear:_f,InterpolateSmooth:eg,InvertStencilOp:p4,KeepStencilOp:Vl,KeyframeTrack:Ws,LOD:qb,LatheGeometry:lp,Layers:cu,LessCompare:Rb,LessDepth:$P,LessEqualCompare:OS,LessEqualDepth:Ch,LessEqualStencilFunc:_4,LessStencilFunc:g4,Light:dl,LightProbe:RI,Line:qo,Line3:Mk,LineBasicMaterial:qi,LineCurve:nE,LineCurve3:iI,LineDashedMaterial:vI,LineLoop:ZS,LineSegments:Hs,LinearDisplayP3ColorSpace:np,LinearFilter:Qt,LinearInterpolant:aE,LinearMipMapLinearFilter:Tx,LinearMipMapNearestFilter:a4,LinearMipmapLinearFilter:ps,LinearMipmapNearestFilter:ef,LinearSRGBColorSpace:Ji,LinearToneMapping:ob,LinearTransfer:bh,Loader:bi,LoaderUtils:ja,LoadingManager:bv,LoopOnce:xb,LoopPingPong:Sb,LoopRepeat:Ab,LuminanceAlphaFormat:vb,LuminanceFormat:gb,MOUSE:n4,Material:Qn,MaterialLoader:Iv,MathUtils:Vo,Matrix3:Dt,Matrix4:mt,MaxEquation:OP,Mesh:Mn,MeshBasicMaterial:Xi,MeshDepthMaterial:JS,MeshDistanceMaterial:jS,MeshLambertMaterial:mI,MeshMatcapMaterial:gI,MeshNormalMaterial:pI,MeshPhongMaterial:dI,MeshPhysicalMaterial:Es,MeshStandardMaterial:Uf,MeshToonMaterial:hI,MinEquation:NP,MirroredRepeatWrapping:gf,MixOperation:rb,MultiplyBlending:Mx,MultiplyOperation:tp,NearestFilter:li,NearestMipMapLinearFilter:o4,NearestMipMapNearestFilter:s4,NearestMipmapLinearFilter:Ql,NearestMipmapNearestFilter:av,NeutralToneMapping:fb,NeverCompare:Tb,NeverDepth:qP,NeverStencilFunc:m4,NoBlending:ho,NoColorSpace:zo,NoToneMapping:po,NormalAnimationBlendMode:cv,NormalBlending:Ja,NotEqualCompare:Ib,NotEqualDepth:ib,NotEqualStencilFunc:x4,NumberKeyframeTrack:Tu,Object3D:Zt,ObjectLoader:qz,ObjectSpaceNormalMap:Cb,OctahedronGeometry:Of,OneFactor:zP,OneMinusConstantAlphaFactor:QP,OneMinusConstantColorFactor:YP,OneMinusDstAlphaFactor:VP,OneMinusDstColorFactor:XP,OneMinusSrcAlphaFactor:Ig,OneMinusSrcColorFactor:GP,OrthographicCamera:Lu,P3Primaries:Bh,PCFShadowMap:ov,PCFSoftShadowMap:eh,PMREMGenerator:iA,Path:Nh,PerspectiveCamera:oi,Plane:Ma,PlaneGeometry:cl,PlaneHelper:Ok,PointLight:dE,PointLightHelper:Rk,Points:$S,PointsMaterial:_v,PolarGridHelper:Bk,PolyhedronGeometry:fl,PositionalAudio:rk,PropertyBinding:Kt,PropertyMixer:DI,QuadraticBezierCurve:iE,QuadraticBezierCurve3:rE,Quaternion:Ci,QuaternionKeyframeTrack:Ru,QuaternionLinearInterpolant:SI,RED_GREEN_RGTC2_Format:Zx,RED_RGTC1_Format:yb,REVISION:Bf,RGBADepthPacking:Mb,RGBAFormat:ii,RGBAIntegerFormat:FS,RGBA_ASTC_10x10_Format:Jx,RGBA_ASTC_10x5_Format:Vx,RGBA_ASTC_10x6_Format:Wx,RGBA_ASTC_10x8_Format:Xx,RGBA_ASTC_12x10_Format:jx,RGBA_ASTC_12x12_Format:Yx,RGBA_ASTC_4x4_Format:Lx,RGBA_ASTC_5x4_Format:Nx,RGBA_ASTC_5x5_Format:Ox,RGBA_ASTC_6x5_Format:Ux,RGBA_ASTC_6x6_Format:zx,RGBA_ASTC_8x5_Format:kx,RGBA_ASTC_8x6_Format:Gx,RGBA_ASTC_8x8_Format:Hx,RGBA_BPTC_Format:$0,RGBA_ETC2_EAC_Format:Fx,RGBA_PVRTC_2BPPV1_Format:Ix,RGBA_PVRTC_4BPPV1_Format:bx,RGBA_S3TC_DXT1_Format:Q0,RGBA_S3TC_DXT3_Format:q0,RGBA_S3TC_DXT5_Format:Z0,RGBFormat:mb,RGB_BPTC_SIGNED_Format:Kx,RGB_BPTC_UNSIGNED_Format:Qx,RGB_ETC1_Format:Bx,RGB_ETC2_Format:Dx,RGB_PVRTC_2BPPV1_Format:Px,RGB_PVRTC_4BPPV1_Format:Rx,RGB_S3TC_DXT1_Format:K0,RGFormat:_b,RGIntegerFormat:DS,RawShaderMaterial:fI,Ray:Ff,Raycaster:yE,Rec709Primaries:Ih,RectAreaLight:CI,RedFormat:uv,RedIntegerFormat:BS,ReinhardToneMapping:ab,RenderTarget:Ob,RepeatWrapping:As,ReplaceStencilOp:u4,ReverseSubtractEquation:LP,RingGeometry:Cv,SIGNED_RED_GREEN_RGTC2_Format:$x,SIGNED_RED_RGTC1_Format:qx,SRGBColorSpace:gr,SRGBTransfer:vn,Scene:Eu,ShaderChunk:Nt,ShaderLib:Os,ShaderMaterial:ur,ShadowMaterial:cI,Shape:fu,ShapeGeometry:Tv,ShapePath:kk,ShapeUtils:go,ShortType:PS,Skeleton:ap,SkeletonHelper:Tk,SkinnedMesh:QS,Source:$l,Sphere:Ti,SphereGeometry:Cu,Spherical:Sk,SphericalHarmonics3:TI,SplineCurve:sE,SpotLight:fE,SpotLightHelper:Ck,Sprite:Qb,SpriteMaterial:KS,SrcAlphaFactor:bg,SrcAlphaSaturateFactor:JP,SrcColorFactor:kP,StaticCopyUsage:C4,StaticDrawUsage:Dh,StaticReadUsage:E4,StereoCamera:ek,StreamCopyUsage:R4,StreamDrawUsage:S4,StreamReadUsage:M4,StringKeyframeTrack:Uu,SubtractEquation:FP,SubtractiveBlending:wx,TOUCH:i4,TangentSpaceNormalMap:ll,TetrahedronGeometry:cp,Texture:qt,TextureLoader:dp,TorusGeometry:fp,TorusKnotGeometry:Rv,Triangle:zr,TriangleFanDrawMode:Bg,TriangleStripDrawMode:NS,TrianglesDrawMode:Eb,TubeGeometry:Pv,UVMapping:Za,Uint16BufferAttribute:GS,Uint32BufferAttribute:HS,Uint8BufferAttribute:uO,Uint8ClampedBufferAttribute:cO,Uniform:_E,UniformsGroup:yk,UniformsLib:Ze,UniformsUtils:VS,UnsignedByteType:jr,UnsignedInt248Type:Au,UnsignedInt5999Type:hb,UnsignedIntType:el,UnsignedShort4444Type:bS,UnsignedShort5551Type:IS,UnsignedShortType:Rh,VSMShadowMap:Fs,Vector2:Re,Vector3:H,Vector4:cn,VectorKeyframeTrack:Pu,VideoTexture:$b,WebGL3DRenderTarget:Z4,WebGLArrayRenderTarget:q4,WebGLCoordinateSystem:ao,WebGLCubeRenderTarget:WS,WebGLMultipleRenderTargets:Gk,WebGLRenderTarget:Tr,WebGLRenderer:YS,WebGLUtils:jb,WebGPUCoordinateSystem:Fh,WireframeGeometry:uI,WrapAroundEnding:Ph,ZeroCurvatureEnding:ql,ZeroFactor:UP,ZeroSlopeEnding:Zl,ZeroStencilOp:l4,createCanvasElement:Lb},Symbol.toStringTag,{value:"Module"}));var nu={exports:{}},zu={};/** 3835 * @license React 3836 * react-reconciler-constants.production.min.js 3837 * 3838 * Copyright (c) Facebook, Inc. and its affiliates. 3839 * 3840 * This source code is licensed under the MIT license found in the 3841 * LICENSE file in the root directory of this source tree. 3842 */zu.ConcurrentRoot=1;zu.ContinuousEventPriority=4;zu.DefaultEventPriority=16;zu.DiscreteEventPriority=1;zu.IdleEventPriority=536870912;zu.LegacyRoot=0;(function(i){i.exports=zu})(nu);function Vk(i){let e;const t=new Set,n=(u,f)=>{const h=typeof u=="function"?u(e):u;if(h!==e){const p=e;e=f?h:Object.assign({},e,h),t.forEach(m=>m(e,p))}},r=()=>e,s=(u,f=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=f(e);function m(){const v=f(e);if(!h(p,v)){const _=p;u(p=v,_)}}return t.add(m),()=>t.delete(m)},l={setState:n,getState:r,subscribe:(u,f,h)=>f||h?s(u,f,h):(t.add(u),()=>t.delete(u)),destroy:()=>t.clear()};return e=i(n,r,l),l}const Wk=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),p2=Wk?K.exports.useEffect:K.exports.useLayoutEffect;function NI(i){const e=typeof i=="function"?Vk(i):i,t=(n=e.getState,r=Object.is)=>{const[,s]=K.exports.useReducer(y=>y+1,0),o=e.getState(),a=K.exports.useRef(o),l=K.exports.useRef(n),u=K.exports.useRef(r),f=K.exports.useRef(!1),h=K.exports.useRef();h.current===void 0&&(h.current=n(o));let p,m=!1;(a.current!==o||l.current!==n||u.current!==r||f.current)&&(p=n(o),m=!r(h.current,p)),p2(()=>{m&&(h.current=p),a.current=o,l.current=n,u.current=r,f.current=!1});const v=K.exports.useRef(o);p2(()=>{const y=()=>{try{const A=e.getState(),S=l.current(A);u.current(h.current,S)||(a.current=A,h.current=S,s())}catch{f.current=!0,s()}},g=e.subscribe(y);return e.getState()!==v.current&&y(),g},[]);const _=m?p:h.current;return K.exports.useDebugValue(_),_};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[t,e];return{next(){const r=n.length<=0;return{value:n.shift(),done:r}}}},t}var OI={exports:{}},Ng={exports:{}},UI={};/** 3843 * @license React 3844 * scheduler.production.min.js 3845 * 3846 * Copyright (c) Facebook, Inc. and its affiliates. 3847 * 3848 * This source code is licensed under the MIT license found in the 3849 * LICENSE file in the root directory of this source tree. 3850 */(function(i){function e(k,ne){var te=k.length;k.push(ne);e:for(;0<te;){var ce=te-1>>>1,_e=k[ce];if(0<r(_e,ne))k[ce]=ne,k[te]=_e,te=ce;else break e}}function t(k){return k.length===0?null:k[0]}function n(k){if(k.length===0)return null;var ne=k[0],te=k.pop();if(te!==ne){k[0]=te;e:for(var ce=0,_e=k.length,Fe=_e>>>1;ce<Fe;){var ue=2*(ce+1)-1,Ee=k[ue],Ce=ue+1,De=k[Ce];if(0>r(Ee,te))Ce<_e&&0>r(De,Ee)?(k[ce]=De,k[Ce]=te,ce=Ce):(k[ce]=Ee,k[ue]=te,ce=ue);else if(Ce<_e&&0>r(De,te))k[ce]=De,k[Ce]=te,ce=Ce;else break e}}return ne}function r(k,ne){var te=k.sortIndex-ne.sortIndex;return te!==0?te:k.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;i.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();i.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,h=null,p=3,m=!1,v=!1,_=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(k){for(var ne=t(u);ne!==null;){if(ne.callback===null)n(u);else if(ne.startTime<=k)n(u),ne.sortIndex=ne.expirationTime,e(l,ne);else break;ne=t(u)}}function w(k){if(_=!1,S(k),!v)if(t(l)!==null)v=!0,Q(P);else{var ne=t(u);ne!==null&&pe(w,ne.startTime-k)}}function P(k,ne){v=!1,_&&(_=!1,g(D),D=-1),m=!0;var te=p;try{for(S(ne),h=t(l);h!==null&&(!(h.expirationTime>ne)||k&&!N());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,p=h.priorityLevel;var _e=ce(h.expirationTime<=ne);ne=i.unstable_now(),typeof _e=="function"?h.callback=_e:h===t(l)&&n(l),S(ne)}else n(l);h=t(l)}if(h!==null)var Fe=!0;else{var ue=t(u);ue!==null&&pe(w,ue.startTime-ne),Fe=!1}return Fe}finally{h=null,p=te,m=!1}}var T=!1,I=null,D=-1,C=5,b=-1;function N(){return!(i.unstable_now()-b<C)}function j(){if(I!==null){var k=i.unstable_now();b=k;var ne=!0;try{ne=I(!0,k)}finally{ne?Y():(T=!1,I=null)}}else T=!1}var Y;if(typeof A=="function")Y=function(){A(j)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,re=q.port2;q.port1.onmessage=j,Y=function(){re.postMessage(null)}}else Y=function(){y(j,0)};function Q(k){I=k,T||(T=!0,Y())}function pe(k,ne){D=y(function(){k(i.unstable_now())},ne)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(k){k.callback=null},i.unstable_continueExecution=function(){v||m||(v=!0,Q(P))},i.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<k?Math.floor(1e3/k):5},i.unstable_getCurrentPriorityLevel=function(){return p},i.unstable_getFirstCallbackNode=function(){return t(l)},i.unstable_next=function(k){switch(p){case 1:case 2:case 3:var ne=3;break;default:ne=p}var te=p;p=ne;try{return k()}finally{p=te}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(k,ne){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var te=p;p=k;try{return ne()}finally{p=te}},i.unstable_scheduleCallback=function(k,ne,te){var ce=i.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?ce+te:ce):te=ce,k){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=te+_e,k={id:f++,callback:ne,priorityLevel:k,startTime:te,expirationTime:_e,sortIndex:-1},te>ce?(k.sortIndex=te,e(u,k),t(l)===null&&k===t(u)&&(_?(g(D),D=-1):_=!0,pe(w,te-ce))):(k.sortIndex=_e,e(l,k),v||m||(v=!0,Q(P))),k},i.unstable_shouldYield=N,i.unstable_wrapCallback=function(k){var ne=p;return function(){var te=p;p=ne;try{return k.apply(this,arguments)}finally{p=te}}}})(UI);(function(i){i.exports=UI})(Ng);/** 3851 * @license React 3852 * react-reconciler.production.min.js 3853 * 3854 * Copyright (c) Facebook, Inc. and its affiliates. 3855 * 3856 * This source code is licensed under the MIT license found in the 3857 * LICENSE file in the root directory of this source tree. 3858 */var Xk=function(e){var t={},n=K.exports,r=Ng.exports,s=Object.assign;function o(c){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+c,x=1;x<arguments.length;x++)d+="&args[]="+encodeURIComponent(arguments[x]);return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),h=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"),y=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),P=Symbol.iterator;function T(c){return c===null||typeof c!="object"?null:(c=P&&c[P]||c["@@iterator"],typeof c=="function"?c:null)}function I(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case f:return"Fragment";case u:return"Portal";case p:return"Profiler";case h:return"StrictMode";case y:return"Suspense";case g:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case v:return(c.displayName||"Context")+".Consumer";case m:return(c._context.displayName||"Context")+".Provider";case _:var d=c.render;return c=c.displayName,c||(c=d.displayName||d.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case A:return d=c.displayName||null,d!==null?d:I(c.type)||"Memo";case S:d=c._payload,c=c._init;try{return I(c(d))}catch{}}return null}function D(c){var d=c.type;switch(c.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=d.render,c=c.displayName||c.name||"",d.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return I(d);case 8:return d===h?"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 d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function C(c){var d=c,x=c;if(c.alternate)for(;d.return;)d=d.return;else{c=d;do d=c,(d.flags&4098)!==0&&(x=d.return),c=d.return;while(c)}return d.tag===3?x:null}function b(c){if(C(c)!==c)throw Error(o(188))}function N(c){var d=c.alternate;if(!d){if(d=C(c),d===null)throw Error(o(188));return d!==c?null:c}for(var x=c,E=d;;){var M=x.return;if(M===null)break;var B=M.alternate;if(B===null){if(E=M.return,E!==null){x=E;continue}break}if(M.child===B.child){for(B=M.child;B;){if(B===x)return b(M),c;if(B===E)return b(M),d;B=B.sibling}throw Error(o(188))}if(x.return!==E.return)x=M,E=B;else{for(var X=!1,ie=M.child;ie;){if(ie===x){X=!0,x=M,E=B;break}if(ie===E){X=!0,E=M,x=B;break}ie=ie.sibling}if(!X){for(ie=B.child;ie;){if(ie===x){X=!0,x=B,E=M;break}if(ie===E){X=!0,E=B,x=M;break}ie=ie.sibling}if(!X)throw Error(o(189))}}if(x.alternate!==E)throw Error(o(190))}if(x.tag!==3)throw Error(o(188));return x.stateNode.current===x?c:d}function j(c){return c=N(c),c!==null?Y(c):null}function Y(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var d=Y(c);if(d!==null)return d;c=c.sibling}return null}function q(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){if(c.tag!==4){var d=q(c);if(d!==null)return d}c=c.sibling}return null}var re=Array.isArray,Q=e.getPublicInstance,pe=e.getRootHostContext,k=e.getChildHostContext,ne=e.prepareForCommit,te=e.resetAfterCommit,ce=e.createInstance,_e=e.appendInitialChild,Fe=e.finalizeInitialChildren,ue=e.prepareUpdate,Ee=e.shouldSetTextContent,Ce=e.createTextInstance,De=e.scheduleTimeout,dt=e.cancelTimeout,At=e.noTimeout,it=e.isPrimaryRenderer,Z=e.supportsMutation,Pe=e.supportsPersistence,le=e.supportsHydration,Me=e.getInstanceFromNode,xe=e.preparePortalMount,we=e.getCurrentEventPriority,Oe=e.detachDeletedInstance,Je=e.supportsMicrotasks,ke=e.scheduleMicrotask,G=e.supportsTestSelectors,O=e.findFiberRoot,fe=e.getBoundingRect,Te=e.getTextContent,Se=e.isHiddenSubtree,be=e.matchAccessibilityRole,st=e.setFocusIfFocusable,Le=e.setupIntersectionObserver,Ve=e.appendChild,pt=e.appendChildToContainer,Ne=e.commitTextUpdate,Ke=e.commitMount,xt=e.commitUpdate,tt=e.insertBefore,Ue=e.insertInContainerBefore,_t=e.removeChild,Ct=e.removeChildFromContainer,Mt=e.resetTextContent,ee=e.hideInstance,Qe=e.hideTextInstance,se=e.unhideInstance,Ie=e.unhideTextInstance,je=e.clearContainer,Tt=e.cloneInstance,Wt=e.createContainerChildSet,mn=e.appendChildToContainerChildSet,zn=e.finalizeContainerChildren,en=e.replaceContainerChildren,Zi=e.cloneHiddenInstance,$i=e.cloneHiddenTextInstance,Ms=e.canHydrateInstance,pl=e.canHydrateTextInstance,Hu=e.canHydrateSuspenseInstance,Xs=e.isSuspenseInstancePending,Js=e.isSuspenseInstanceFallback,js=e.registerSuspenseInstanceRetry,Ii=e.getNextHydratableSibling,Ot=e.getFirstHydratableChild,ml=e.getFirstHydratableChildWithinContainer,Hf=e.getFirstHydratableChildWithinSuspenseInstance,L=e.hydrateInstance,z=e.hydrateTextInstance,R=e.hydrateSuspenseInstance,U=e.getNextHydratableInstanceAfterSuspenseInstance,V=e.commitHydratedContainer,W=e.commitHydratedSuspenseInstance,J=e.clearSuspenseBoundary,oe=e.clearSuspenseBoundaryFromContainer,de=e.shouldDeleteUnhydratedTailInstances,me=e.didNotMatchHydratedContainerTextInstance,ge=e.didNotMatchHydratedTextInstance,ye;function qe(c){if(ye===void 0)try{throw Error()}catch(x){var d=x.stack.trim().match(/\n( *(at )?)/);ye=d&&d[1]||""}return` 3859`+ye+c}var Be=!1;function We(c,d){if(!c||Be)return"";Be=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(Xe){var E=Xe}Reflect.construct(c,[],d)}else{try{d.call()}catch(Xe){E=Xe}
vendor: 4,727 bytes, lines 3859-3862
3859c.call(d.prototype)}else{try{throw Error()}catch(Xe){E=Xe}c()}}catch(Xe){if(Xe&&E&&typeof Xe.stack=="string"){for(var M=Xe.stack.split(` 3860`),B=E.stack.split(` 3861`),X=M.length-1,ie=B.length-1;1<=X&&0<=ie&&M[X]!==B[ie];)ie--;for(;1<=X&&0<=ie;X--,ie--)if(M[X]!==B[ie]){if(X!==1||ie!==1)do if(X--,ie--,0>ie||M[X]!==B[ie]){var Ae=` 3862`+M[X].replace(" at new "," at ");return c.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",c.displayName)),Ae}while(1<=X&&0<=ie);break}}}finally{Be=!1,Error.prepareStackTrace=x}return(c=c?c.displayName||c.name:"")?qe(c):""}var rt=Object.prototype.hasOwnProperty,at=[],Rt=-1;function lt(c){return{current:c}}function ze(c){0>Rt||(c.current=at[Rt],at[Rt]=null,Rt--)}function gt(c,d){Rt++,at[Rt]=c.current,c.current=d}var ct={},Gt=lt(ct),Pt=lt(!1),Jt=ct;function qn(c,d){var x=c.type.contextTypes;if(!x)return ct;var E=c.stateNode;if(E&&E.__reactInternalMemoizedUnmaskedChildContext===d)return E.__reactInternalMemoizedMaskedChildContext;var M={},B;for(B in x)M[B]=d[B];return E&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=d,c.__reactInternalMemoizedMaskedChildContext=M),M}function zt(c){return c=c.childContextTypes,c!=null}function gn(){ze(Pt),ze(Gt)}function jt(c,d,x){if(Gt.current!==ct)throw Error(o(168));gt(Gt,d),gt(Pt,x)}function rn(c,d,x){var E=c.stateNode;if(d=d.childContextTypes,typeof E.getChildContext!="function")return x;E=E.getChildContext();for(var M in E)if(!(M in d))throw Error(o(108,D(c)||"Unknown",M));return s({},x,E)}function tn(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||ct,Jt=Gt.current,gt(Gt,c),gt(Pt,Pt.current),!0}function Yt(c,d,x){var E=c.stateNode;if(!E)throw Error(o(169));x?(c=rn(c,d,Jt),E.__reactInternalMemoizedMergedChildContext=c,ze(Pt),ze(Gt),gt(Gt,c)):ze(Pt),gt(Pt,x)}var dn=Math.clz32?Math.clz32:Ys,Ao=Math.log,er=Math.LN2;function Ys(c){return c>>>=0,c===0?32:31-(Ao(c)/er|0)|0}var vp=64,_p=4194304;function Vf(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function yp(c,d){var x=c.pendingLanes;if(x===0)return 0;var E=0,M=c.suspendedLanes,B=c.pingedLanes,X=x&268435455;if(X!==0){var ie=X&~M;ie!==0?E=Vf(ie):(B&=X,B!==0&&(E=Vf(B)))}else X=x&~M,X!==0?E=Vf(X):B!==0&&(E=Vf(B));if(E===0)return 0;if(d!==0&&d!==E&&(d&M)===0&&(M=E&-E,B=d&-d,M>=B||M===16&&(B&4194240)!==0))return d;if((E&4)!==0&&(E|=x&16),d=c.entangledLanes,d!==0)for(c=c.entanglements,d&=E;0<d;)x=31-dn(d),M=1<<x,E|=c[x],d&=~M;return E}function UD(c,d){switch(c){case 1:case 2:case 4:return d+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 d+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 zD(c,d){for(var x=c.suspendedLanes,E=c.pingedLanes,M=c.expirationTimes,B=c.pendingLanes;0<B;){var X=31-dn(B),ie=1<<X,Ae=M[X];Ae===-1?((ie&x)===0||(ie&E)!==0)&&(M[X]=UD(ie,d)):Ae<=d&&(c.expiredLanes|=ie),B&=~ie}}function Uv(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function zv(c){for(var d=[],x=0;31>x;x++)d.push(c);return d}function Wf(c,d,x){c.pendingLanes|=d,d!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,d=31-dn(d),c[d]=x}function kD(c,d){var x=c.pendingLanes&~d;c.pendingLanes=d,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=d,c.mutableReadLanes&=d,c.entangledLanes&=d,d=c.entanglements;var E=c.eventTimes;for(c=c.expirationTimes;0<x;){var M=31-dn(x),B=1<<M;d[M]=0,E[M]=-1,c[M]=-1,x&=~B}}function kv(c,d){var x=c.entangledLanes|=d;for(c=c.entanglements;x;){var E=31-dn(x),M=1<<E;M&d|c[E]&d&&(c[E]|=d),x&=~M}}var sn=0;function XE(c){return c&=-c,1<c?4<c?(c&268435455)!==0?16:536870912:4:1}var Gv=r.unstable_scheduleCallback,JE=r.unstable_cancelCallback,GD=r.unstable_shouldYield,HD=r.unstable_requestPaint,fi=r.unstable_now,Hv=r.unstable_ImmediatePriority,VD=r.unstable_UserBlockingPriority,Vv=r.unstable_NormalPriority,WD=r.unstable_IdlePriority,xp=null,Ks=null;function XD(c){if(Ks&&typeof Ks.onCommitFiberRoot=="function")try{Ks.onCommitFiberRoot(xp,c,void 0,(c.current.flags&128)===128)}catch{}}
vendor: 42,357 bytes, lines 3862-3864
3862function JD(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var Qs=typeof Object.is=="function"?Object.is:JD,So=null,Ap=!1,Wv=!1;function jE(c){So===null?So=[c]:So.push(c)}function jD(c){Ap=!0,jE(c)}function qs(){if(!Wv&&So!==null){Wv=!0;var c=0,d=sn;try{var x=So;for(sn=1;c<x.length;c++){var E=x[c];do E=E(!0);while(E!==null)}So=null,Ap=!1}catch(M){throw So!==null&&(So=So.slice(c+1)),Gv(Hv,qs),M}finally{sn=d,Wv=!1}}return null}var YD=a.ReactCurrentBatchConfig;function Sp(c,d){if(Qs(c,d))return!0;if(typeof c!="object"||c===null||typeof d!="object"||d===null)return!1;var x=Object.keys(c),E=Object.keys(d);if(x.length!==E.length)return!1;for(E=0;E<x.length;E++){var M=x[E];if(!rt.call(d,M)||!Qs(c[M],d[M]))return!1}return!0}function KD(c){switch(c.tag){case 5:return qe(c.type);case 16:return qe("Lazy");case 13:return qe("Suspense");case 19:return qe("SuspenseList");case 0:case 2:case 15:return c=We(c.type,!1),c;case 11:return c=We(c.type.render,!1),c;case 1:return c=We(c.type,!0),c;default:return""}}function Cs(c,d){if(c&&c.defaultProps){d=s({},d),c=c.defaultProps;for(var x in c)d[x]===void 0&&(d[x]=c[x]);return d}return d}var Ep=lt(null),wp=null,Vu=null,Xv=null;function Jv(){Xv=Vu=wp=null}function YE(c,d,x){it?(gt(Ep,d._currentValue),d._currentValue=x):(gt(Ep,d._currentValue2),d._currentValue2=x)}function jv(c){var d=Ep.current;ze(Ep),it?c._currentValue=d:c._currentValue2=d}function Yv(c,d,x){for(;c!==null;){var E=c.alternate;if((c.childLanes&d)!==d?(c.childLanes|=d,E!==null&&(E.childLanes|=d)):E!==null&&(E.childLanes&d)!==d&&(E.childLanes|=d),c===x)break;c=c.return}}function Wu(c,d){wp=c,Xv=Vu=null,c=c.dependencies,c!==null&&c.firstContext!==null&&((c.lanes&d)!==0&&(Ir=!0),c.firstContext=null)}function Zr(c){var d=it?c._currentValue:c._currentValue2;if(Xv!==c)if(c={context:c,memoizedValue:d,next:null},Vu===null){if(wp===null)throw Error(o(308));Vu=c,wp.dependencies={lanes:0,firstContext:c}}else Vu=Vu.next=c;return d}var Zs=null,ia=!1;function Kv(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function KE(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function Eo(c,d){return{eventTime:c,lane:d,tag:0,payload:null,callback:null,next:null}}function ra(c,d){var x=c.updateQueue;x!==null&&(x=x.shared,Zn!==null&&(c.mode&1)!==0&&(kt&2)===0?(c=x.interleaved,c===null?(d.next=d,Zs===null?Zs=[x]:Zs.push(x)):(d.next=c.next,c.next=d),x.interleaved=d):(c=x.pending,c===null?d.next=d:(d.next=c.next,c.next=d),x.pending=d))}function Mp(c,d,x){if(d=d.updateQueue,d!==null&&(d=d.shared,(x&4194240)!==0)){var E=d.lanes;E&=c.pendingLanes,x|=E,d.lanes=x,kv(c,x)}}function QE(c,d){var x=c.updateQueue,E=c.alternate;if(E!==null&&(E=E.updateQueue,x===E)){var M=null,B=null;if(x=x.firstBaseUpdate,x!==null){do{var X={eventTime:x.eventTime,lane:x.lane,tag:x.tag,payload:x.payload,callback:x.callback,next:null};B===null?M=B=X:B=B.next=X,x=x.next}while(x!==null);B===null?M=B=d:B=B.next=d}else M=B=d;x={baseState:E.baseState,firstBaseUpdate:M,lastBaseUpdate:B,shared:E.shared,effects:E.effects},c.updateQueue=x;return}c=x.lastBaseUpdate,c===null?x.firstBaseUpdate=d:c.next=d,x.lastBaseUpdate=d}function Cp(c,d,x,E){var M=c.updateQueue;ia=!1;var B=M.firstBaseUpdate,X=M.lastBaseUpdate,ie=M.shared.pending;if(ie!==null){M.shared.pending=null;var Ae=ie,Xe=Ae.next;Ae.next=null,X===null?B=Xe:X.next=Xe,X=Ae;var ut=c.alternate;ut!==null&&(ut=ut.updateQueue,ie=ut.lastBaseUpdate,ie!==X&&(ie===null?ut.firstBaseUpdate=Xe:ie.next=Xe,ut.lastBaseUpdate=Ae))}if(B!==null){var bt=M.baseState;X=0,ut=Xe=Ae=null,ie=B;do{var St=ie.lane,hn=ie.eventTime;if((E&St)===St){ut!==null&&(ut=ut.next={eventTime:hn,lane:0,tag:ie.tag,payload:ie.payload,callback:ie.callback,next:null});e:{var yt=c,Li=ie;switch(St=d,hn=x,Li.tag){case 1:if(yt=Li.payload,typeof yt=="function"){bt=yt.call(hn,bt,St);break e}bt=yt;break e;case 3:yt.flags=yt.flags&-65537|128;case 0:if(yt=Li.payload,St=typeof yt=="function"?yt.call(hn,bt,St):yt,St==null)break e;bt=s({},bt,St);break e;case 2:ia=!0}}ie.callback!==null&&ie.lane!==0&&(c.flags|=64,St=M.effects,St===null?M.effects=[ie]:St.push(ie))}else hn={eventTime:hn,lane:St,tag:ie.tag,payload:ie.payload,callback:ie.callback,next:null},ut===null?(Xe=ut=hn,Ae=bt):ut=ut.next=hn,X|=St;if(ie=ie.next,ie===null){if(ie=M.shared.pending,ie===null)break;St=ie,ie=St.next,St.next=null,M.lastBaseUpdate=St,M.shared.pending=null}}while(1);if(ut===null&&(Ae=bt),M.baseState=Ae,M.firstBaseUpdate=Xe,M.lastBaseUpdate=ut,d=M.shared.interleaved,d!==null){M=d;do X|=M.lane,M=M.next;while(M!==d)}else B===null&&(M.shared.lanes=0);$u|=X,c.lanes=X,c.memoizedState=bt}}function qE(c,d,x){if(c=d.effects,d.effects=null,c!==null)for(d=0;d<c.length;d++){var E=c[d],M=E.callback;if(M!==null){if(E.callback=null,E=x,typeof M!="function")throw Error(o(191,M));M.call(E)}}}var ZE=new n.Component().refs;function Qv(c,d,x,E){d=c.memoizedState,x=x(E,d),x=x==null?d:s({},d,x),c.memoizedState=x,c.lanes===0&&(c.updateQueue.baseState=x)}var Tp={isMounted:function(c){return(c=c._reactInternals)?C(c)===c:!1},enqueueSetState:function(c,d,x){c=c._reactInternals;var E=nr(),M=aa(c),B=Eo(E,M);B.payload=d,x!=null&&(B.callback=x),ra(c,B),d=is(c,M,E),d!==null&&Mp(d,c,M)},enqueueReplaceState:function(c,d,x){c=c._reactInternals;var E=nr(),M=aa(c),B=Eo(E,M);B.tag=1,B.payload=d,x!=null&&(B.callback=x),ra(c,B),d=is(c,M,E),d!==null&&Mp(d,c,M)},enqueueForceUpdate:function(c,d){c=c._reactInternals;var x=nr(),E=aa(c),M=Eo(x,E);M.tag=2,d!=null&&(M.callback=d),ra(c,M),d=is(c,E,x),d!==null&&Mp(d,c,E)}};function $E(c,d,x,E,M,B,X){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(E,B,X):d.prototype&&d.prototype.isPureReactComponent?!Sp(x,E)||!Sp(M,B):!0}function ew(c,d,x){var E=!1,M=ct,B=d.contextType;return typeof B=="object"&&B!==null?B=Zr(B):(M=zt(d)?Jt:Gt.current,E=d.contextTypes,B=(E=E!=null)?qn(c,M):ct),d=new d(x,B),c.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Tp,c.stateNode=d,d._reactInternals=c,E&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=M,c.__reactInternalMemoizedMaskedChildContext=B),d}function tw(c,d,x,E){c=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(x,E),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(x,E),d.state!==c&&Tp.enqueueReplaceState(d,d.state,null)}function qv(c,d,x,E){var M=c.stateNode;M.props=x,M.state=c.memoizedState,M.refs=ZE,Kv(c);var B=d.contextType;typeof B=="object"&&B!==null?M.context=Zr(B):(B=zt(d)?Jt:Gt.current,M.context=qn(c,B)),M.state=c.memoizedState,B=d.getDerivedStateFromProps,typeof B=="function"&&(Qv(c,d,B,x),M.state=c.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(d=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),d!==M.state&&Tp.enqueueReplaceState(M,M.state,null),Cp(c,x,M,E),M.state=c.memoizedState),typeof M.componentDidMount=="function"&&(c.flags|=4194308)}var Xu=[],Ju=0,Rp=null,Pp=0,$r=[],es=0,gl=null,wo=1,Mo="";function vl(c,d){Xu[Ju++]=Pp,Xu[Ju++]=Rp,Rp=c,Pp=d}function nw(c,d,x){$r[es++]=wo,$r[es++]=Mo,$r[es++]=gl,gl=c;var E=wo;c=Mo;var M=32-dn(E)-1;E&=~(1<<M),x+=1;var B=32-dn(d)+M;if(30<B){var X=M-M%5;B=(E&(1<<X)-1).toString(32),E>>=X,M-=X,wo=1<<32-dn(d)+M|x<<M|E,Mo=B+c}else wo=1<<B|x<<M|E,Mo=c}function Zv(c){c.return!==null&&(vl(c,1),nw(c,1,0))}function $v(c){for(;c===Rp;)Rp=Xu[--Ju],Xu[Ju]=null,Pp=Xu[--Ju],Xu[Ju]=null;for(;c===gl;)gl=$r[--es],$r[es]=null,Mo=$r[--es],$r[es]=null,wo=$r[--es],$r[es]=null}var Pr=null,br=null,Tn=!1,Xf=!1,Ts=null;function iw(c,d){var x=rs(5,null,null,0);x.elementType="DELETED",x.stateNode=d,x.return=c,d=c.deletions,d===null?(c.deletions=[x],c.flags|=16):d.push(x)}function rw(c,d){switch(c.tag){case 5:return d=Ms(d,c.type,c.pendingProps),d!==null?(c.stateNode=d,Pr=c,br=Ot(d),!0):!1;case 6:return d=pl(d,c.pendingProps),d!==null?(c.stateNode=d,Pr=c,br=null,!0):!1;case 13:if(d=Hu(d),d!==null){var x=gl!==null?{id:wo,overflow:Mo}:null;return c.memoizedState={dehydrated:d,treeContext:x,retryLane:1073741824},x=rs(18,null,null,0),x.stateNode=d,x.return=c,c.child=x,Pr=c,br=null,!0}return!1;default:return!1}}function e_(c){return(c.mode&1)!==0&&(c.flags&128)===0}function t_(c){if(Tn){var d=br;if(d){var x=d;if(!rw(c,d)){if(e_(c))throw Error(o(418));d=Ii(x);var E=Pr;d&&rw(c,d)?iw(E,x):(c.flags=c.flags&-4097|2,Tn=!1,Pr=c)}}else{if(e_(c))throw Error(o(418));c.flags=c.flags&-4097|2,Tn=!1,Pr=c}}}function sw(c){for(c=c.return;c!==null&&c.tag!==5&&c.tag!==3&&c.tag!==13;)c=c.return;Pr=c}function Jf(c){if(!le||c!==Pr)return!1;if(!Tn)return sw(c),Tn=!0,!1;if(c.tag!==3&&(c.tag!==5||de(c.type)&&!Ee(c.type,c.memoizedProps))){var d=br;if(d){if(e_(c)){for(c=br;c;)c=Ii(c);throw Error(o(418))}for(;d;)iw(c,d),d=Ii(d)}}if(sw(c),c.tag===13){if(!le)throw Error(o(316));if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));br=U(c)}else br=Pr?Ii(c.stateNode):null;return!0}function ju(){le&&(br=Pr=null,Xf=Tn=!1)}function n_(c){Ts===null?Ts=[c]:Ts.push(c)}function jf(c,d,x){if(c=x.ref,c!==null&&typeof c!="function"&&typeof c!="object"){if(x._owner){if(x=x._owner,x){if(x.tag!==1)throw Error(o(309));var E=x.stateNode}if(!E)throw Error(o(147,c));var M=E,B=""+c;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===B?d.ref:(d=function(X){var ie=M.refs;ie===ZE&&(ie=M.refs={}),X===null?delete ie[B]:ie[B]=X},d._stringRef=B,d)}if(typeof c!="string")throw Error(o(284));if(!x._owner)throw Error(o(290,c))}return c}function bp(c,d){throw c=Object.prototype.toString.call(d),Error(o(31,c==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":c))}function ow(c){var d=c._init;return d(c._payload)}function aw(c){function d(he,ae){if(c){var ve=he.deletions;ve===null?(he.deletions=[ae],he.flags|=16):ve.push(ae)}}function x(he,ae){if(!c)return null;for(;ae!==null;)d(he,ae),ae=ae.sibling;return null}function E(he,ae){for(he=new Map;ae!==null;)ae.key!==null?he.set(ae.key,ae):he.set(ae.index,ae),ae=ae.sibling;return he}function M(he,ae){return he=ua(he,ae),he.index=0,he.sibling=null,he}function B(he,ae,ve){return he.index=ve,c?(ve=he.alternate,ve!==null?(ve=ve.index,ve<ae?(he.flags|=2,ae):ve):(he.flags|=2,ae)):(he.flags|=1048576,ae)}function X(he){return c&&he.alternate===null&&(he.flags|=2),he}function ie(he,ae,ve,et){return ae===null||ae.tag!==6?(ae=z_(ve,he.mode,et),ae.return=he,ae):(ae=M(ae,ve),ae.return=he,ae)}function Ae(he,ae,ve,et){var vt=ve.type;return vt===f?ut(he,ae,ve.props.children,et,ve.key):ae!==null&&(ae.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===S&&ow(vt)===ae.type)?(et=M(ae,ve.props),et.ref=jf(he,ae,ve),et.return=he,et):(et=am(ve.type,ve.key,ve.props,null,he.mode,et),et.ref=jf(he,ae,ve),et.return=he,et)}function Xe(he,ae,ve,et){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==ve.containerInfo||ae.stateNode.implementation!==ve.implementation?(ae=k_(ve,he.mode,et),ae.return=he,ae):(ae=M(ae,ve.children||[]),ae.return=he,ae)}function ut(he,ae,ve,et,vt){return ae===null||ae.tag!==7?(ae=wl(ve,he.mode,et,vt),ae.return=he,ae):(ae=M(ae,ve),ae.return=he,ae)}function bt(he,ae,ve){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return ae=z_(""+ae,he.mode,ve),ae.return=he,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case l:return ve=am(ae.type,ae.key,ae.props,null,he.mode,ve),ve.ref=jf(he,null,ae),ve.return=he,ve;case u:return ae=k_(ae,he.mode,ve),ae.return=he,ae;case S:var et=ae._init;return bt(he,et(ae._payload),ve)}if(re(ae)||T(ae))return ae=wl(ae,he.mode,ve,null),ae.return=he,ae;bp(he,ae)}return null}function St(he,ae,ve,et){var vt=ae!==null?ae.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number")return vt!==null?null:ie(he,ae,""+ve,et);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:return ve.key===vt?Ae(he,ae,ve,et):null;case u:return ve.key===vt?Xe(he,ae,ve,et):null;case S:return vt=ve._init,St(he,ae,vt(ve._payload),et)}if(re(ve)||T(ve))return vt!==null?null:ut(he,ae,ve,et,null);bp(he,ve)}return null}function hn(he,ae,ve,et,vt){if(typeof et=="string"&&et!==""||typeof et=="number")return he=he.get(ve)||null,ie(ae,he,""+et,vt);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case l:return he=he.get(et.key===null?ve:et.key)||null,Ae(ae,he,et,vt);case u:return he=he.get(et.key===null?ve:et.key)||null,Xe(ae,he,et,vt);case S:var Ut=et._init;return hn(he,ae,ve,Ut(et._payload),vt)}if(re(et)||T(et))return he=he.get(ve)||null,ut(ae,he,et,vt,null);bp(ae,et)}return null}function yt(he,ae,ve,et){for(var vt=null,Ut=null,It=ae,on=ae=0,hi=null;It!==null&&on<ve.length;on++){It.index>on?(hi=It,It=null):hi=It.sibling;var an=St(he,It,ve[on],et);if(an===null){It===null&&(It=hi);break}c&&It&&an.alternate===null&&d(he,It),ae=B(an,ae,on),Ut===null?vt=an:Ut.sibling=an,Ut=an,It=hi}if(on===ve.length)return x(he,It),Tn&&vl(he,on),vt;if(It===null){for(;on<ve.length;on++)It=bt(he,ve[on],et),It!==null&&(ae=B(It,ae,on),Ut===null?vt=It:Ut.sibling=It,Ut=It);return Tn&&vl(he,on),vt}for(It=E(he,It);on<ve.length;on++)hi=hn(It,he,on,ve[on],et),hi!==null&&(c&&hi.alternate!==null&&It.delete(hi.key===null?on:hi.key),ae=B(hi,ae,on),Ut===null?vt=hi:Ut.sibling=hi,Ut=hi);return c&&It.forEach(function(ca){return d(he,ca)}),Tn&&vl(he,on),vt}function Li(he,ae,ve,et){var vt=T(ve);if(typeof vt!="function")throw Error(o(150));if(ve=vt.call(ve),ve==null)throw Error(o(151));for(var Ut=vt=null,It=ae,on=ae=0,hi=null,an=ve.next();It!==null&&!an.done;on++,an=ve.next()){It.index>on?(hi=It,It=null):hi=It.sibling;var ca=St(he,It,an.value,et);if(ca===null){It===null&&(It=hi);break}c&&It&&ca.alternate===null&&d(he,It),ae=B(ca,ae,on),Ut===null?vt=ca:Ut.sibling=ca,Ut=ca,It=hi}if(an.done)return x(he,It),Tn&&vl(he,on),vt;if(It===null){for(;!an.done;on++,an=ve.next())an=bt(he,an.value,et),an!==null&&(ae=B(an,ae,on),Ut===null?vt=an:Ut.sibling=an,Ut=an);return Tn&&vl(he,on),vt}for(It=E(he,It);!an.done;on++,an=ve.next())an=hn(It,he,on,an.value,et),an!==null&&(c&&an.alternate!==null&&It.delete(an.key===null?on:an.key),ae=B(an,ae,on),Ut===null?vt=an:Ut.sibling=an,Ut=an);return c&&It.forEach(function(MF){return d(he,MF)}),Tn&&vl(he,on),vt}function ss(he,ae,ve,et){if(typeof ve=="object"&&ve!==null&&ve.type===f&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var vt=ve.key,Ut=ae;Ut!==null;){if(Ut.key===vt){if(vt=ve.type,vt===f){if(Ut.tag===7){x(he,Ut.sibling),ae=M(Ut,ve.props.children),ae.return=he,he=ae;break e}}else if(Ut.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===S&&ow(vt)===Ut.type){x(he,Ut.sibling),ae=M(Ut,ve.props),ae.ref=jf(he,Ut,ve),ae.return=he,he=ae;break e}x(he,Ut);break}else d(he,Ut);Ut=Ut.sibling}ve.type===f?(ae=wl(ve.props.children,he.mode,et,ve.key),ae.return=he,he=ae):(et=am(ve.type,ve.key,ve.props,null,he.mode,et),et.ref=jf(he,ae,ve),et.return=he,he=et)}return X(he);case u:e:{for(Ut=ve.key;ae!==null;){if(ae.key===Ut)if(ae.tag===4&&ae.stateNode.containerInfo===ve.containerInfo&&ae.stateNode.implementation===ve.implementation){x(he,ae.sibling),ae=M(ae,ve.children||[]),ae.return=he,he=ae;break e}else{x(he,ae);break}else d(he,ae);ae=ae.sibling}ae=k_(ve,he.mode,et),ae.return=he,he=ae}return X(he);case S:return Ut=ve._init,ss(he,ae,Ut(ve._payload),et)}if(re(ve))return yt(he,ae,ve,et);if(T(ve))return Li(he,ae,ve,et);bp(he,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,ae!==null&&ae.tag===6?(x(he,ae.sibling),ae=M(ae,ve),ae.return=he,he=ae):(x(he,ae),ae=z_(ve,he.mode,et),ae.return=he,he=ae),X(he)):x(he,ae)}return ss}var Yu=aw(!0),lw=aw(!1),Yf={},ts=lt(Yf),Kf=lt(Yf),Ku=lt(Yf);function $s(c){if(c===Yf)throw Error(o(174));return c}function i_(c,d){gt(Ku,d),gt(Kf,c),gt(ts,Yf),c=pe(d),ze(ts),gt(ts,c)}function Qu(){ze(ts),ze(Kf),ze(Ku)}function uw(c){var d=$s(Ku.current),x=$s(ts.current);d=k(x,c.type,d),x!==d&&(gt(Kf,c),gt(ts,d))}function r_(c){Kf.current===c&&(ze(ts),ze(Kf))}var bn=lt(0);function Ip(c){for(var d=c;d!==null;){if(d.tag===13){var x=d.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||Xs(x)||Js(x)))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var s_=[];function o_(){for(var c=0;c<s_.length;c++){var d=s_[c];it?d._workInProgressVersionPrimary=null:d._workInProgressVersionSecondary=null}s_.length=0}var Bp=a.ReactCurrentDispatcher,ns=a.ReactCurrentBatchConfig,qu=0,kn=null,Bi=null,di=null,Dp=!1,Qf=!1,qf=0,QD=0;function Di(){throw Error(o(321))}function a_(c,d){if(d===null)return!1;for(var x=0;x<d.length&&x<c.length;x++)if(!Qs(c[x],d[x]))return!1;return!0}function l_(c,d,x,E,M,B){if(qu=B,kn=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,Bp.current=c===null||c.memoizedState===null?eF:tF,c=x(E,M),Qf){B=0;do{if(Qf=!1,qf=0,25<=B)throw Error(o(301));B+=1,di=Bi=null,d.updateQueue=null,Bp.current=nF,c=x(E,M)}while(Qf)}if(Bp.current=Up,d=Bi!==null&&Bi.next!==null,qu=0,di=Bi=kn=null,Dp=!1,d)throw Error(o(300));return c}function u_(){var c=qf!==0;return qf=0,c}function Co(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return di===null?kn.memoizedState=di=c:di=di.next=c,di}function eo(){if(Bi===null){var c=kn.alternate;c=c!==null?c.memoizedState:null}else c=Bi.next;var d=di===null?kn.memoizedState:di.next;if(d!==null)di=d,Bi=c;else{if(c===null)throw Error(o(310));Bi=c,c={memoizedState:Bi.memoizedState,baseState:Bi.baseState,baseQueue:Bi.baseQueue,queue:Bi.queue,next:null},di===null?kn.memoizedState=di=c:di=di.next=c}return di}function _l(c,d){return typeof d=="function"?d(c):d}function Fp(c){var d=eo(),x=d.queue;if(x===null)throw Error(o(311));x.lastRenderedReducer=c;var E=Bi,M=E.baseQueue,B=x.pending;if(B!==null){if(M!==null){var X=M.next;M.next=B.next,B.next=X}E.baseQueue=M=B,x.pending=null}if(M!==null){B=M.next,E=E.baseState;var ie=X=null,Ae=null,Xe=B;do{var ut=Xe.lane;if((qu&ut)===ut)Ae!==null&&(Ae=Ae.next={lane:0,action:Xe.action,hasEagerState:Xe.hasEagerState,eagerState:Xe.eagerState,next:null}),E=Xe.hasEagerState?Xe.eagerState:c(E,Xe.action);else{var bt={lane:ut,action:Xe.action,hasEagerState:Xe.hasEagerState,eagerState:Xe.eagerState,next:null};Ae===null?(ie=Ae=bt,X=E):Ae=Ae.next=bt,kn.lanes|=ut,$u|=ut}Xe=Xe.next}while(Xe!==null&&Xe!==B);Ae===null?X=E:Ae.next=ie,Qs(E,d.memoizedState)||(Ir=!0),d.memoizedState=E,d.baseState=X,d.baseQueue=Ae,x.lastRenderedState=E}if(c=x.interleaved,c!==null){M=c;do B=M.lane,kn.lanes|=B,$u|=B,M=M.next;while(M!==c)}else M===null&&(x.lanes=0);return[d.memoizedState,x.dispatch]}function Lp(c){var d=eo(),x=d.queue;if(x===null)throw Error(o(311));x.lastRenderedReducer=c;var E=x.dispatch,M=x.pending,B=d.memoizedState;if(M!==null){x.pending=null;var X=M=M.next;do B=c(B,X.action),X=X.next;while(X!==M);Qs(B,d.memoizedState)||(Ir=!0),d.memoizedState=B,d.baseQueue===null&&(d.baseState=B),x.lastRenderedState=B}return[B,E]}function cw(){}function fw(c,d){var x=kn,E=eo(),M=d(),B=!Qs(E.memoizedState,M);if(B&&(E.memoizedState=M,Ir=!0),E=E.queue,$f(pw.bind(null,x,E,c),[c]),E.getSnapshot!==d||B||di!==null&&di.memoizedState.tag&1){if(x.flags|=2048,Zf(9,hw.bind(null,x,E,M,d),void 0,null),Zn===null)throw Error(o(349));(qu&30)!==0||dw(x,d,M)}return M}function dw(c,d,x){c.flags|=16384,c={getSnapshot:d,value:x},d=kn.updateQueue,d===null?(d={lastEffect:null,stores:null},kn.updateQueue=d,d.stores=[c]):(x=d.stores,x===null?d.stores=[c]:x.push(c))}function hw(c,d,x,E){d.value=x,d.getSnapshot=E,mw(d)&&is(c,1,-1)}function pw(c,d,x){return x(function(){mw(d)&&is(c,1,-1)})}function mw(c){var d=c.getSnapshot;c=c.value;try{var x=d();return!Qs(c,x)}catch{return!0}}function c_(c){var d=Co();return typeof c=="function"&&(c=c()),d.memoizedState=d.baseState=c,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:c},d.queue=c,c=c.dispatch=$D.bind(null,kn,c),[d.memoizedState,c]}function Zf(c,d,x,E){return c={tag:c,create:d,destroy:x,deps:E,next:null},d=kn.updateQueue,d===null?(d={lastEffect:null,stores:null},kn.updateQueue=d,d.lastEffect=c.next=c):(x=d.lastEffect,x===null?d.lastEffect=c.next=c:(E=x.next,x.next=c,c.next=E,d.lastEffect=c)),c}function gw(){return eo().memoizedState}function Np(c,d,x,E){var M=Co();kn.flags|=c,M.memoizedState=Zf(1|d,x,void 0,E===void 0?null:E)}function Op(c,d,x,E){var M=eo();E=E===void 0?null:E;var B=void 0;if(Bi!==null){var X=Bi.memoizedState;if(B=X.destroy,E!==null&&a_(E,X.deps)){M.memoizedState=Zf(d,x,B,E);return}}kn.flags|=c,M.memoizedState=Zf(1|d,x,B,E)}function f_(c,d){return Np(8390656,8,c,d)}function $f(c,d){return Op(2048,8,c,d)}function vw(c,d){return Op(4,2,c,d)}function _w(c,d){return Op(4,4,c,d)}function yw(c,d){if(typeof d=="function")return c=c(),d(c),function(){d(null)};if(d!=null)return c=c(),d.current=c,function(){d.current=null}}function xw(c,d,x){return x=x!=null?x.concat([c]):null,Op(4,4,yw.bind(null,d,c),x)}function d_(){}function Aw(c,d){var x=eo();d=d===void 0?null:d;var E=x.memoizedState;return E!==null&&d!==null&&a_(d,E[1])?E[0]:(x.memoizedState=[c,d],c)}function Sw(c,d){var x=eo();d=d===void 0?null:d;var E=x.memoizedState;return E!==null&&d!==null&&a_(d,E[1])?E[0]:(c=c(),x.memoizedState=[c,d],c)}function qD(c,d){var x=sn;sn=x!==0&&4>x?x:4,c(!0);var E=ns.transition;ns.transition={};try{c(!1),d()}finally{sn=x,ns.transition=E}}function Ew(){return eo().memoizedState}function ZD(c,d,x){var E=aa(c);x={lane:E,action:x,hasEagerState:!1,eagerState:null,next:null},ww(c)?Mw(d,x):(Cw(c,d,x),x=nr(),c=is(c,E,x),c!==null&&Tw(c,d,E))}function $D(c,d,x){var E=aa(c),M={lane:E,action:x,hasEagerState:!1,eagerState:null,next:null};if(ww(c))Mw(d,M);else{Cw(c,d,M);var B=c.alternate;if(c.lanes===0&&(B===null||B.lanes===0)&&(B=d.lastRenderedReducer,B!==null))try{var X=d.lastRenderedState,ie=B(X,x);if(M.hasEagerState=!0,M.eagerState=ie,Qs(ie,X))return}catch{}finally{}x=nr(),c=is(c,E,x),c!==null&&Tw(c,d,E)}}function ww(c){var d=c.alternate;return c===kn||d!==null&&d===kn}function Mw(c,d){Qf=Dp=!0;var x=c.pending;x===null?d.next=d:(d.next=x.next,x.next=d),c.pending=d}function Cw(c,d,x){Zn!==null&&(c.mode&1)!==0&&(kt&2)===0?(c=d.interleaved,c===null?(x.next=x,Zs===null?Zs=[d]:Zs.push(d)):(x.next=c.next,c.next=x),d.interleaved=x):(c=d.pending,c===null?x.next=x:(x.next=c.next,c.next=x),d.pending=x)}function Tw(c,d,x){if((x&4194240)!==0){var E=d.lanes;E&=c.pendingLanes,x|=E,d.lanes=x,kv(c,x)}}var Up={readContext:Zr,useCallback:Di,useContext:Di,useEffect:Di,useImperativeHandle:Di,useInsertionEffect:Di,useLayoutEffect:Di,useMemo:Di,useReducer:Di,useRef:Di,useState:Di,useDebugValue:Di,useDeferredValue:Di,useTransition:Di,useMutableSource:Di,useSyncExternalStore:Di,useId:Di,unstable_isNewReconciler:!1},eF={readContext:Zr,useCallback:function(c,d){return Co().memoizedState=[c,d===void 0?null:d],c},useContext:Zr,useEffect:f_,useImperativeHandle:function(c,d,x){return x=x!=null?x.concat([c]):null,Np(4194308,4,yw.bind(null,d,c),x)},useLayoutEffect:function(c,d){return Np(4194308,4,c,d)},useInsertionEffect:function(c,d){return Np(4,2,c,d)},useMemo:function(c,d){var x=Co();return d=d===void 0?null:d,c=c(),x.memoizedState=[c,d],c},useReducer:function(c,d,x){var E=Co();return d=x!==void 0?x(d):d,E.memoizedState=E.baseState=d,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:d},E.queue=c,c=c.dispatch=ZD.bind(null,kn,c),[E.memoizedState,c]},useRef:function(c){var d=Co();return c={current:c},d.memoizedState=c},useState:c_,useDebugValue:d_,useDeferredValue:function(c){var d=c_(c),x=d[0],E=d[1];return f_(function(){var M=ns.transition;ns.transition={};try{E(c)}finally{ns.transition=M}},[c]),x},useTransition:function(){var c=c_(!1),d=c[0];return c=qD.bind(null,c[1]),Co().memoizedState=c,[d,c]},useMutableSource:function(){},useSyncExternalStore:function(c,d,x){var E=kn,M=Co();if(Tn){if(x===void 0)throw Error(o(407));x=x()}else{if(x=d(),Zn===null)throw Error(o(349));(qu&30)!==0||dw(E,d,x)}M.memoizedState=x;var B={value:x,getSnapshot:d};return M.queue=B,f_(pw.bind(null,E,B,c),[c]),E.flags|=2048,Zf(9,hw.bind(null,E,B,x,d),void 0,null),x},useId:function(){var c=Co(),d=Zn.identifierPrefix;if(Tn){var x=Mo,E=wo;x=(E&~(1<<32-dn(E)-1)).toString(32)+x,d=":"+d+"R"+x,x=qf++,0<x&&(d+="H"+x.toString(32)),d+=":"}else x=QD++,d=":"+d+"r"+x.toString(32)+":";return c.memoizedState=d},unstable_isNewReconciler:!1},tF={readContext:Zr,useCallback:Aw,useContext:Zr,useEffect:$f,useImperativeHandle:xw,useInsertionEffect:vw,useLayoutEffect:_w,useMemo:Sw,useReducer:Fp,useRef:gw,useState:function(){return Fp(_l)},useDebugValue:d_,useDeferredValue:function(c){var d=Fp(_l),x=d[0],E=d[1];return $f(function(){var M=ns.transition;ns.transition={};try{E(c)}finally{ns.transition=M}},[c]),x},useTransition:function(){var c=Fp(_l)[0],d=eo().memoizedState;return[c,d]},useMutableSource:cw,useSyncExternalStore:fw,useId:Ew,unstable_isNewReconciler:!1},nF={readContext:Zr,useCallback:Aw,useContext:Zr,useEffect:$f,useImperativeHandle:xw,useInsertionEffect:vw,useLayoutEffect:_w,useMemo:Sw,useReducer:Lp,useRef:gw,useState:function(){return Lp(_l)},useDebugValue:d_,useDeferredValue:function(c){var d=Lp(_l),x=d[0],E=d[1];return $f(function(){var M=ns.transition;ns.transition={};try{E(c)}finally{ns.transition=M}},[c]),x},useTransition:function(){var c=Lp(_l)[0],d=eo().memoizedState;return[c,d]},useMutableSource:cw,useSyncExternalStore:fw,useId:Ew,unstable_isNewReconciler:!1};function h_(c,d){try{var x="",E=d;do x+=KD(E),E=E.return;while(E);var M=x}catch(B){M=` 3863Error generating stack: `+B.message+` 3864`+B.stack}return{value:c,source:d,stack:M}}function p_(c,d){try{console.error(d.value)}catch(x){setTimeout(function(){throw x})}}var iF=typeof WeakMap=="function"?WeakMap:Map;function Rw(c,d,x){x=Eo(-1,x),x.tag=3,x.payload={element:null};var E=d.value;return x.callback=function(){em||(em=!0,B_=E),p_(c,d)},x}function Pw(c,d,x){x=Eo(-1,x),x.tag=3;var E=c.type.getDerivedStateFromError;if(typeof E=="function"){var M=d.value;x.payload=function(){return E(M)},x.callback=function(){p_(c,d)}}var B=c.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(x.callback=function(){p_(c,d),typeof E!="function"&&(sa===null?sa=new Set([this]):sa.add(this));var X=d.stack;this.componentDidCatch(d.value,{componentStack:X!==null?X:""})}),x}function bw(c,d,x){var E=c.pingCache;if(E===null){E=c.pingCache=new iF;var M=new Set;E.set(d,M)}else M=E.get(d),M===void 0&&(M=new Set,E.set(d,M));M.has(x)||(M.add(x),c=vF.bind(null,c,d,x),d.then(c,c))}function Iw(c){do{var d;if((d=c.tag===13)&&(d=c.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return c;c=c.return}while(c!==null);return null}function Bw(c,d,x,E,M){return(c.mode&1)===0?(c===d?c.flags|=65536:(c.flags|=128,x.flags|=131072,x.flags&=-52805,x.tag===1&&(x.alternate===null?x.tag=17:(d=Eo(-1,1),d.tag=2,ra(x,d))),x.lanes|=1),c):(c.flags|=65536,c.lanes=M,c)}function to(c){c.flags|=4}function Dw(c,d){if(c!==null&&c.child===d.child)return!0;if((d.flags&16)!==0)return!1;for(c=d.child;c!==null;){if((c.flags&12854)!==0||(c.subtreeFlags&12854)!==0)return!1;c=c.sibling}return!0}var ed,td,zp,kp;if(Z)ed=function(c,d){for(var x=d.child;x!==null;){if(x.tag===5||x.tag===6)_e(c,x.stateNode);else if(x.tag!==4&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===d)break;for(;x.sibling===null;){if(x.return===null||x.return===d)return;x=x.return}x.sibling.return=x.return,x=x.sibling}},td=function(){},zp=function(c,d,x,E,M){if(c=c.memoizedProps,c!==E){var B=d.stateNode,X=$s(ts.current);x=ue(B,x,c,E,M,X),(d.updateQueue=x)&&to(d)}},kp=function(c,d,x,E){x!==E&&to(d)};else if(Pe){ed=function(c,d,x,E){for(var M=d.child;M!==null;){if(M.tag===5){var B=M.stateNode;x&&E&&(B=Zi(B,M.type,M.memoizedProps,M)),_e(c,B)}else if(M.tag===6)B=M.stateNode,x&&E&&(B=$i(B,M.memoizedProps,M)),_e(c,B);else if(M.tag!==4){if(M.tag===22&&M.memoizedState!==null)B=M.child,B!==null&&(B.return=M),ed(c,M,!0,!0);else if(M.child!==null){M.child.return=M,M=M.child;continue}}if(M===d)break;for(;M.sibling===null;){if(M.return===null||M.return===d)return;M=M.return}M.sibling.return=M.return,M=M.sibling}};var Fw=function(c,d,x,E){for(var M=d.child;M!==null;){if(M.tag===5){var B=M.stateNode;x&&E&&(B=Zi(B,M.type,M.memoizedProps,M)),mn(c,B)}else if(M.tag===6)B=M.stateNode,x&&E&&(B=$i(B,M.memoizedProps,M)),mn(c,B);else if(M.tag!==4){if(M.tag===22&&M.memoizedState!==null)B=M.child,B!==null&&(B.return=M),Fw(c,M,!0,!0);else if(M.child!==null){M.child.return=M,M=M.child;continue}}if(M===d)break;for(;M.sibling===null;){if(M.return===null||M.return===d)return;M=M.return}M.sibling.return=M.return,M=M.sibling}};td=function(c,d){var x=d.stateNode;if(!Dw(c,d)){c=x.containerInfo;var E=Wt(c);Fw(E,d,!1,!1),x.pendingChildren=E,to(d),zn(c,E)}},zp=function(c,d,x,E,M){var B=c.stateNode,X=c.memoizedProps;if((c=Dw(c,d))&&X===E)d.stateNode=B;else{var ie=d.stateNode,Ae=$s(ts.current),Xe=null;X!==E&&(Xe=ue(ie,x,X,E,M,Ae)),c&&Xe===null?d.stateNode=B:(B=Tt(B,Xe,x,X,E,d,c,ie),Fe(B,x,E,M,Ae)&&to(d),d.stateNode=B,c?to(d):ed(B,d,!1,!1))}},kp=function(c,d,x,E){x!==E?(c=$s(Ku.current),x=$s(ts.current),d.stateNode=Ce(E,c,x,d),to(d)):d.stateNode=c.stateNode}}else td=function(){},zp=function(){},kp=function(){};function nd(c,d){if(!Tn)switch(c.tailMode){case"hidden":d=c.tail;for(var x=null;d!==null;)d.alternate!==null&&(x=d),d=d.sibling;x===null?c.tail=null:x.sibling=null;break;case"collapsed":x=c.tail;for(var E=null;x!==null;)x.alternate!==null&&(E=x),x=x.sibling;E===null?d||c.tail===null?c.tail=null:c.tail.sibling=null:E.sibling=null}}function Fi(c){var d=c.alternate!==null&&c.alternate.child===c.child,x=0,E=0;if(d)for(var M=c.child;M!==null;)x|=M.lanes|M.childLanes,E|=M.subtreeFlags&14680064,E|=M.flags&14680064,M.return=c,M=M.sibling;else for(M=c.child;M!==null;)x|=M.lanes|M.childLanes,E|=M.subtreeFlags,E|=M.flags,M.return=c,M=M.sibling;return c.subtreeFlags|=E,c.childLanes=x,d}function rF(c,d,x){var E=d.pendingProps;switch($v(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fi(d),null;case 1:return zt(d.type)&&gn(),Fi(d),null;case 3:return E=d.stateNode,Qu(),ze(Pt),ze(Gt),o_(),E.pendingContext&&(E.context=E.pendingContext,E.pendingContext=null),(c===null||c.child===null)&&(Jf(d)?to(d):c===null||c.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,Ts!==null&&(L_(Ts),Ts=null))),td(c,d),Fi(d),null;case 5:r_(d),x=$s(Ku.current);var M=d.type;if(c!==null&&d.stateNode!=null)zp(c,d,M,E,x),c.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!E){if(d.stateNode===null)throw Error(o(166));return Fi(d),null}if(c=$s(ts.current),Jf(d)){if(!le)throw Error(o(175));c=L(d.stateNode,d.type,d.memoizedProps,x,c,d,!Xf),d.updateQueue=c,c!==null&&to(d)}else{var B=ce(M,E,x,c,d);ed(B,d,!1,!1),d.stateNode=B,Fe(B,M,E,x,c)&&to(d)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return Fi(d),null;case 6:if(c&&d.stateNode!=null)kp(c,d,c.memoizedProps,E);else{if(typeof E!="string"&&d.stateNode===null)throw Error(o(166));if(c=$s(Ku.current),x=$s(ts.current),Jf(d)){if(!le)throw Error(o(176));if(c=d.stateNode,E=d.memoizedProps,(x=z(c,E,d,!Xf))&&(M=Pr,M!==null))switch(B=(M.mode&1)!==0,M.tag){case 3:me(M.stateNode.containerInfo,c,E,B);break;case 5:ge(M.type,M.memoizedProps,M.stateNode,c,E,B)}x&&to(d)}else d.stateNode=Ce(E,c,x,d)}return Fi(d),null;case 13:if(ze(bn),E=d.memoizedState,Tn&&br!==null&&(d.mode&1)!==0&&(d.flags&128)===0){for(c=br;c;)c=Ii(c);return ju(),d.flags|=98560,d}if(E!==null&&E.dehydrated!==null){if(E=Jf(d),c===null){if(!E)throw Error(o(318));if(!le)throw Error(o(344));if(c=d.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));R(c,d)}else ju(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;return Fi(d),null}return Ts!==null&&(L_(Ts),Ts=null),(d.flags&128)!==0?(d.lanes=x,d):(E=E!==null,x=!1,c===null?Jf(d):x=c.memoizedState!==null,E&&!x&&(d.child.flags|=8192,(d.mode&1)!==0&&(c===null||(bn.current&1)!==0?ri===0&&(ri=3):O_())),d.updateQueue!==null&&(d.flags|=4),Fi(d),null);case 4:return Qu(),td(c,d),c===null&&xe(d.stateNode.containerInfo),Fi(d),null;case 10:return jv(d.type._context),Fi(d),null;case 17:return zt(d.type)&&gn(),Fi(d),null;case 19:if(ze(bn),M=d.memoizedState,M===null)return Fi(d),null;if(E=(d.flags&128)!==0,B=M.rendering,B===null)if(E)nd(M,!1);else{if(ri!==0||c!==null&&(c.flags&128)!==0)for(c=d.child;c!==null;){if(B=Ip(c),B!==null){for(d.flags|=128,nd(M,!1),c=B.updateQueue,c!==null&&(d.updateQueue=c,d.flags|=4),d.subtreeFlags=0,c=x,E=d.child;E!==null;)x=E,M=c,x.flags&=14680066,B=x.alternate,B===null?(x.childLanes=0,x.lanes=M,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=B.childLanes,x.lanes=B.lanes,x.child=B.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=B.memoizedProps,x.memoizedState=B.memoizedState,x.updateQueue=B.updateQueue,x.type=B.type,M=B.dependencies,x.dependencies=M===null?null:{lanes:M.lanes,firstContext:M.firstContext}),E=E.sibling;return gt(bn,bn.current&1|2),d.child}c=c.sibling}M.tail!==null&&fi()>I_&&(d.flags|=128,E=!0,nd(M,!1),d.lanes=4194304)}else{if(!E)if(c=Ip(B),c!==null){if(d.flags|=128,E=!0,c=c.updateQueue,c!==null&&(d.updateQueue=c,d.flags|=4),nd(M,!0),M.tail===null&&M.tailMode==="hidden"&&!B.alternate&&!Tn)return Fi(d),null}else 2*fi()-M.renderingStartTime>I_&&x!==1073741824&&(d.flags|=128,E=!0,nd(M,!1),d.lanes=4194304);M.isBackwards?(B.sibling=d.child,d.child=B):(c=M.last,c!==null?c.sibling=B:d.child=B,M.last=B)}return M.tail!==null?(d=M.tail,M.rendering=d,M.tail=d.sibling,M.renderingStartTime=fi(),d.sibling=null,c=bn.current,gt(bn,E?c&1|2:c&1),d):(Fi(d),null);case 22:case 23:return N_(),E=d.memoizedState!==null,c!==null&&c.memoizedState!==null!==E&&(d.flags|=8192),E&&(d.mode&1)!==0?(Br&1073741824)!==0&&(Fi(d),Z&&d.subtreeFlags&6&&(d.flags|=8192)):Fi(d),null;case 24:return null;case 25:return null}throw Error(o(156,d.tag))}var sF=a.ReactCurrentOwner,Ir=!1;function tr(c,d,x,E){d.child=c===null?lw(d,null,x,E):Yu(d,c.child,x,E)}function Lw(c,d,x,E,M){x=x.render;var B=d.ref;return Wu(d,M),E=l_(c,d,x,E,B,M),x=u_(),c!==null&&!Ir?(d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~M,To(c,d,M)):(Tn&&x&&Zv(d),d.flags|=1,tr(c,d,E,M),d.child)}function Nw(c,d,x,E,M){if(c===null){var B=x.type;return typeof B=="function"&&!U_(B)&&B.defaultProps===void 0&&x.compare===null&&x.defaultProps===void 0?(d.tag=15,d.type=B,Ow(c,d,B,E,M)):(c=am(x.type,null,E,d,d.mode,M),c.ref=d.ref,c.return=d,d.child=c)}if(B=c.child,(c.lanes&M)===0){var X=B.memoizedProps;if(x=x.compare,x=x!==null?x:Sp,x(X,E)&&c.ref===d.ref)return To(c,d,M)}return d.flags|=1,c=ua(B,E),c.ref=d.ref,c.return=d,d.child=c}function Ow(c,d,x,E,M){if(c!==null&&Sp(c.memoizedProps,E)&&c.ref===d.ref)if(Ir=!1,(c.lanes&M)!==0)(c.flags&131072)!==0&&(Ir=!0);else return d.lanes=c.lanes,To(c,d,M);return m_(c,d,x,E,M)}function Uw(c,d,x){var E=d.pendingProps,M=E.children,B=c!==null?c.memoizedState:null;if(E.mode==="hidden")if((d.mode&1)===0)d.memoizedState={baseLanes:0,cachePool:null},gt(Zu,Br),Br|=x;else if((x&1073741824)!==0)d.memoizedState={baseLanes:0,cachePool:null},E=B!==null?B.baseLanes:x,gt(Zu,Br),Br|=E;else return c=B!==null?B.baseLanes|x:x,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:c,cachePool:null},d.updateQueue=null,gt(Zu,Br),Br|=c,null;else B!==null?(E=B.baseLanes|x,d.memoizedState=null):E=x,gt(Zu,Br),Br|=E;return tr(c,d,M,x),d.child}function zw(c,d){var x=d.ref;(c===null&&x!==null||c!==null&&c.ref!==x)&&(d.flags|=512,d.flags|=2097152)}function m_(c,d,x,E,M){var B=zt(x)?Jt:Gt.current;return B=qn(d,B),Wu(d,M),x=l_(c,d,x,E,B,M),E=u_(),c!==null&&!Ir?(d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~M,To(c,d,M)):(Tn&&E&&Zv(d),d.flags|=1,tr(c,d,x,M),d.child)}function kw(c,d,x,E,M){if(zt(x)){var B=!0;tn(d)}else B=!1;if(Wu(d,M),d.stateNode===null)c!==null&&(c.alternate=null,d.alternate=null,d.flags|=2),ew(d,x,E),qv(d,x,E,M),E=!0;else if(c===null){var X=d.stateNode,ie=d.memoizedProps;X.props=ie;var Ae=X.context,Xe=x.contextType;typeof Xe=="object"&&Xe!==null?Xe=Zr(Xe):(Xe=zt(x)?Jt:Gt.current,Xe=qn(d,Xe));var ut=x.getDerivedStateFromProps,bt=typeof ut=="function"||typeof X.getSnapshotBeforeUpdate=="function";bt||typeof X.UNSAFE_componentWillReceiveProps!="function"&&typeof X.componentWillReceiveProps!="function"||(ie!==E||Ae!==Xe)&&tw(d,X,E,Xe),ia=!1;var St=d.memoizedState;X.state=St,Cp(d,E,X,M),Ae=d.memoizedState,ie!==E||St!==Ae||Pt.current||ia?(typeof ut=="function"&&(Qv(d,x,ut,E),Ae=d.memoizedState),(ie=ia||$E(d,x,ie,E,St,Ae,Xe))?(bt||typeof X.UNSAFE_componentWillMount!="function"&&typeof X.componentWillMount!="function"||(typeof X.componentWillMount=="function"&&X.componentWillMount(),typeof X.UNSAFE_componentWillMount=="function"&&X.UNSAFE_componentWillMount()),typeof X.componentDidMount=="function"&&(d.flags|=4194308)):(typeof X.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=E,d.memoizedState=Ae),X.props=E,X.state=Ae,X.context=Xe,E=ie):(typeof X.componentDidMount=="function"&&(d.flags|=4194308),E=!1)}else{X=d.stateNode,KE(c,d),ie=d.memoizedProps,Xe=d.type===d.elementType?ie:Cs(d.type,ie),X.props=Xe,bt=d.pendingProps,St=X.context,Ae=x.contextType,typeof Ae=="object"&&Ae!==null?Ae=Zr(Ae):(Ae=zt(x)?Jt:Gt.current,Ae=qn(d,Ae));var hn=x.getDerivedStateFromProps;(ut=typeof hn=="function"||typeof X.getSnapshotBeforeUpdate=="function")||typeof X.UNSAFE_componentWillReceiveProps!="function"&&typeof X.componentWillReceiveProps!="function"||(ie!==bt||St!==Ae)&&tw(d,X,E,Ae),ia=!1,St=d.memoizedState,X.state=St,Cp(d,E,X,M);var yt=d.memoizedState;ie!==bt||St!==yt||Pt.current||ia?(typeof hn=="function"&&(Qv(d,x,hn,E),yt=d.memoizedState),(Xe=ia||$E(d,x,Xe,E,St,yt,Ae)||!1)?(ut||typeof X.UNSAFE_componentWillUpdate!="function"&&typeof X.componentWillUpdate!="function"||(typeof X.componentWillUpdate=="function"&&X.componentWillUpdate(E,yt,Ae),typeof X.UNSAFE_componentWillUpdate=="function"&&X.UNSAFE_componentWillUpdate(E,yt,Ae)),typeof X.componentDidUpdate=="function"&&(d.flags|=4),typeof X.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof X.componentDidUpdate!="function"||ie===c.memoizedProps&&St===c.memoizedState||(d.flags|=4),typeof X.getSnapshotBeforeUpdate!="function"||ie===c.memoizedProps&&St===c.memoizedState||(d.flags|=1024),d.memoizedProps=E,d.memoizedState=yt),X.props=E,X.state=yt,X.context=Ae,E=Xe):(typeof X.componentDidUpdate!="function"||ie===c.memoizedProps&&St===c.memoizedState||(d.flags|=4),typeof X.getSnapshotBeforeUpdate!="function"||ie===c.memoizedProps&&St===c.memoizedState||(d.flags|=1024),E=!1)}return g_(c,d,x,E,B,M)}function g_(c,d,x,E,M,B){zw(c,d);var X=(d.flags&128)!==0;if(!E&&!X)return M&&Yt(d,x,!1),To(c,d,B);E=d.stateNode,sF.current=d;var ie=X&&typeof x.getDerivedStateFromError!="function"?null:E.render();return d.flags|=1,c!==null&&X?(d.child=Yu(d,c.child,null,B),d.child=Yu(d,null,ie,B)):tr(c,d,ie,B),d.memoizedState=E.state,M&&Yt(d,x,!0),d.child}function Gw(c){var d=c.stateNode;d.pendingContext?jt(c,d.pendingContext,d.pendingContext!==d.context):d.context&&jt(c,d.context,!1),i_(c,d.containerInfo)}function Hw(c,d,x,E,M){return ju(),n_(M),d.flags|=256,tr(c,d,x,E),d.child}var Gp={dehydrated:null,treeContext:null,retryLane:0};function Hp(c){return{baseLanes:c,cachePool:null}}function Vw(c,d,x){var E=d.pendingProps,M=bn.current,B=!1,X=(d.flags&128)!==0,ie;if((ie=X)||(ie=c!==null&&c.memoizedState===null?!1:(M&2)!==0),ie?(B=!0,d.flags&=-129):(c===null||c.memoizedState!==null)&&(M|=1),gt(bn,M&1),c===null)return t_(d),c=d.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?((d.mode&1)===0?d.lanes=1:Js(c)?d.lanes=8:d.lanes=1073741824,null):(M=E.children,c=E.fallback,B?(E=d.mode,B=d.child,M={mode:"hidden",children:M},(E&1)===0&&B!==null?(B.childLanes=0,B.pendingProps=M):B=lm(M,E,0,null),c=wl(c,E,x,null),B.return=d,c.return=d,B.sibling=c,d.child=B,d.child.memoizedState=Hp(x),d.memoizedState=Gp,c):v_(d,M));if(M=c.memoizedState,M!==null){if(ie=M.dehydrated,ie!==null){if(X)return d.flags&256?(d.flags&=-257,Vp(c,d,x,Error(o(422)))):d.memoizedState!==null?(d.child=c.child,d.flags|=128,null):(B=E.fallback,M=d.mode,E=lm({mode:"visible",children:E.children},M,0,null),B=wl(B,M,x,null),B.flags|=2,E.return=d,B.return=d,E.sibling=B,d.child=E,(d.mode&1)!==0&&Yu(d,c.child,null,x),d.child.memoizedState=Hp(x),d.memoizedState=Gp,B);if((d.mode&1)===0)d=Vp(c,d,x,null);else if(Js(ie))d=Vp(c,d,x,Error(o(419)));else if(E=(x&c.childLanes)!==0,Ir||E){if(E=Zn,E!==null){switch(x&-x){case 4:B=2;break;case 16:B=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:B=32;break;case 536870912:B=268435456;break;default:B=0}E=(B&(E.suspendedLanes|x))!==0?0:B,E!==0&&E!==M.retryLane&&(M.retryLane=E,is(c,E,-1))}O_(),d=Vp(c,d,x,Error(o(421)))}else Xs(ie)?(d.flags|=128,d.child=c.child,d=_F.bind(null,c),js(ie,d),d=null):(x=M.treeContext,le&&(br=Hf(ie),Pr=d,Tn=!0,Ts=null,Xf=!1,x!==null&&($r[es++]=wo,$r[es++]=Mo,$r[es++]=gl,wo=x.id,Mo=x.overflow,gl=d)),d=v_(d,d.pendingProps.children),d.flags|=4096);return d}return B?(E=Xw(c,d,E.children,E.fallback,x),B=d.child,M=c.child.memoizedState,B.memoizedState=M===null?Hp(x):{baseLanes:M.baseLanes|x,cachePool:null},B.childLanes=c.childLanes&~x,d.memoizedState=Gp,E):(x=Ww(c,d,E.children,x),d.memoizedState=null,x)}return B?(E=Xw(c,d,E.children,E.fallback,x),B=d.child,M=c.child.memoizedState,B.memoizedState=M===null?Hp(x):{baseLanes:M.baseLanes|x,cachePool:null},B.childLanes=c.childLanes&~x,d.memoizedState=Gp,E):(x=Ww(c,d,E.children,x),d.memoizedState=null,x)}function v_(c,d){return d=lm({mode:"visible",children:d},c.mode,0,null),d.return=c,c.child=d}function Ww(c,d,x,E){var M=c.child;return c=M.sibling,x=ua(M,{mode:"visible",children:x}),(d.mode&1)===0&&(x.lanes=E),x.return=d,x.sibling=null,c!==null&&(E=d.deleti
vendor: 4,182 bytes, line 3864
3864ons,E===null?(d.deletions=[c],d.flags|=16):E.push(c)),d.child=x}function Xw(c,d,x,E,M){var B=d.mode;c=c.child;var X=c.sibling,ie={mode:"hidden",children:x};return(B&1)===0&&d.child!==c?(x=d.child,x.childLanes=0,x.pendingProps=ie,d.deletions=null):(x=ua(c,ie),x.subtreeFlags=c.subtreeFlags&14680064),X!==null?E=ua(X,E):(E=wl(E,B,M,null),E.flags|=2),E.return=d,x.return=d,x.sibling=E,d.child=x,E}function Vp(c,d,x,E){return E!==null&&n_(E),Yu(d,c.child,null,x),c=v_(d,d.pendingProps.children),c.flags|=2,d.memoizedState=null,c}function Jw(c,d,x){c.lanes|=d;var E=c.alternate;E!==null&&(E.lanes|=d),Yv(c.return,d,x)}function __(c,d,x,E,M){var B=c.memoizedState;B===null?c.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:E,tail:x,tailMode:M}:(B.isBackwards=d,B.rendering=null,B.renderingStartTime=0,B.last=E,B.tail=x,B.tailMode=M)}function jw(c,d,x){var E=d.pendingProps,M=E.revealOrder,B=E.tail;if(tr(c,d,E.children,x),E=bn.current,(E&2)!==0)E=E&1|2,d.flags|=128;else{if(c!==null&&(c.flags&128)!==0)e:for(c=d.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&Jw(c,x,d);else if(c.tag===19)Jw(c,x,d);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===d)break e;for(;c.sibling===null;){if(c.return===null||c.return===d)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}E&=1}if(gt(bn,E),(d.mode&1)===0)d.memoizedState=null;else switch(M){case"forwards":for(x=d.child,M=null;x!==null;)c=x.alternate,c!==null&&Ip(c)===null&&(M=x),x=x.sibling;x=M,x===null?(M=d.child,d.child=null):(M=x.sibling,x.sibling=null),__(d,!1,M,x,B);break;case"backwards":for(x=null,M=d.child,d.child=null;M!==null;){if(c=M.alternate,c!==null&&Ip(c)===null){d.child=M;break}c=M.sibling,M.sibling=x,x=M,M=c}__(d,!0,x,null,B);break;case"together":__(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function To(c,d,x){if(c!==null&&(d.dependencies=c.dependencies),$u|=d.lanes,(x&d.childLanes)===0)return null;if(c!==null&&d.child!==c.child)throw Error(o(153));if(d.child!==null){for(c=d.child,x=ua(c,c.pendingProps),d.child=x,x.return=d;c.sibling!==null;)c=c.sibling,x=x.sibling=ua(c,c.pendingProps),x.return=d;x.sibling=null}return d.child}function oF(c,d,x){switch(d.tag){case 3:Gw(d),ju();break;case 5:uw(d);break;case 1:zt(d.type)&&tn(d);break;case 4:i_(d,d.stateNode.containerInfo);break;case 10:YE(d,d.type._context,d.memoizedProps.value);break;case 13:var E=d.memoizedState;if(E!==null)return E.dehydrated!==null?(gt(bn,bn.current&1),d.flags|=128,null):(x&d.child.childLanes)!==0?Vw(c,d,x):(gt(bn,bn.current&1),c=To(c,d,x),c!==null?c.sibling:null);gt(bn,bn.current&1);break;case 19:if(E=(x&d.childLanes)!==0,(c.flags&128)!==0){if(E)return jw(c,d,x);d.flags|=128}var M=d.memoizedState;if(M!==null&&(M.rendering=null,M.tail=null,M.lastEffect=null),gt(bn,bn.current),E)break;return null;case 22:case 23:return d.lanes=0,Uw(c,d,x)}return To(c,d,x)}function aF(c,d){switch($v(d),d.tag){case 1:return zt(d.type)&&gn(),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return Qu(),ze(Pt),ze(Gt),o_(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 5:return r_(d),null;case 13:if(ze(bn),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(o(340));ju()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return ze(bn),null;case 4:return Qu(),null;case 10:return jv(d.type._context),null;case 22:case 23:return N_(),null;case 24:return null;default:return null}}var Wp=!1,yl=!1,lF=typeof WeakSet=="function"?WeakSet:Set,$e=null;function Xp(c,d){var x=c.ref;if(x!==null)if(typeof x=="function")try{x(null)}catch(E){pr(c,d,E)}else x.current=null}function y_(c,d,x){try{x()}catch(E){pr(c,d,E)}}var Yw=!1;function uF(c,d){for(ne(c.containerInfo),$e=d;$e!==null;)if(c=$e,d=c.child,(c.subtreeFlags&1028)!==0&&d!==null)d.return=c,$e=d;else for(;$e!==null;){c=$e;try{var x=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var E=x.memoizedProps,M=x.memoizedState,B=c.stateNode,X=B.getSnapshotBeforeUpdate(c.elementType===c.type?E:Cs(c.type,E),M);B.__reactInternalSnapshotBeforeUpdate=X}break;case 3:Z&&je(c.stateNode.containerInfo);break;
vendor: 14,318 bytes, line 3864
3864case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ie){pr(c,c.return,ie)}if(d=c.sibling,d!==null){d.return=c.return,$e=d;break}$e=c.return}return x=Yw,Yw=!1,x}function xl(c,d,x){var E=d.updateQueue;if(E=E!==null?E.lastEffect:null,E!==null){var M=E=E.next;do{if((M.tag&c)===c){var B=M.destroy;M.destroy=void 0,B!==void 0&&y_(d,x,B)}M=M.next}while(M!==E)}}function id(c,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var x=d=d.next;do{if((x.tag&c)===c){var E=x.create;x.destroy=E()}x=x.next}while(x!==d)}}function x_(c){var d=c.ref;if(d!==null){var x=c.stateNode;switch(c.tag){case 5:c=Q(x);break;default:c=x}typeof d=="function"?d(c):d.current=c}}function Kw(c,d,x){if(Ks&&typeof Ks.onCommitFiberUnmount=="function")try{Ks.onCommitFiberUnmount(xp,d)}catch{}switch(d.tag){case 0:case 11:case 14:case 15:if(c=d.updateQueue,c!==null&&(c=c.lastEffect,c!==null)){var E=c=c.next;do{var M=E,B=M.destroy;M=M.tag,B!==void 0&&((M&2)!==0||(M&4)!==0)&&y_(d,x,B),E=E.next}while(E!==c)}break;case 1:if(Xp(d,x),c=d.stateNode,typeof c.componentWillUnmount=="function")try{c.props=d.memoizedProps,c.state=d.memoizedState,c.componentWillUnmount()}catch(X){pr(d,x,X)}break;case 5:Xp(d,x);break;case 4:Z?tM(c,d,x):Pe&&Pe&&(d=d.stateNode.containerInfo,x=Wt(d),en(d,x))}}function Qw(c,d,x){for(var E=d;;)if(Kw(c,E,x),E.child===null||Z&&E.tag===4){if(E===d)break;for(;E.sibling===null;){if(E.return===null||E.return===d)return;E=E.return}E.sibling.return=E.return,E=E.sibling}else E.child.return=E,E=E.child}function qw(c){var d=c.alternate;d!==null&&(c.alternate=null,qw(d)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(d=c.stateNode,d!==null&&Oe(d)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function Zw(c){return c.tag===5||c.tag===3||c.tag===4}function $w(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||Zw(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function eM(c){if(Z){e:{for(var d=c.return;d!==null;){if(Zw(d))break e;d=d.return}throw Error(o(160))}var x=d;switch(x.tag){case 5:d=x.stateNode,x.flags&32&&(Mt(d),x.flags&=-33),x=$w(c),S_(c,x,d);break;case 3:case 4:d=x.stateNode.containerInfo,x=$w(c),A_(c,x,d);break;default:throw Error(o(161))}}}function A_(c,d,x){var E=c.tag;if(E===5||E===6)c=c.stateNode,d?Ue(x,c,d):pt(x,c);else if(E!==4&&(c=c.child,c!==null))for(A_(c,d,x),c=c.sibling;c!==null;)A_(c,d,x),c=c.sibling}function S_(c,d,x){var E=c.tag;if(E===5||E===6)c=c.stateNode,d?tt(x,c,d):Ve(x,c);else if(E!==4&&(c=c.child,c!==null))for(S_(c,d,x),c=c.sibling;c!==null;)S_(c,d,x),c=c.sibling}function tM(c,d,x){for(var E=d,M=!1,B,X;;){if(!M){M=E.return;e:for(;;){if(M===null)throw Error(o(160));switch(B=M.stateNode,M.tag){case 5:X=!1;break e;case 3:B=B.containerInfo,X=!0;break e;case 4:B=B.containerInfo,X=!0;break e}M=M.return}M=!0}if(E.tag===5||E.tag===6)Qw(c,E,x),X?Ct(B,E.stateNode):_t(B,E.stateNode);else if(E.tag===18)X?oe(B,E.stateNode):J(B,E.stateNode);else if(E.tag===4){if(E.child!==null){B=E.stateNode.containerInfo,X=!0,E.child.return=E,E=E.child;continue}}else if(Kw(c,E,x),E.child!==null){E.child.return=E,E=E.child;continue}if(E===d)break;for(;E.sibling===null;){if(E.return===null||E.return===d)return;E=E.return,E.tag===4&&(M=!1)}E.sibling.return=E.return,E=E.sibling}}function E_(c,d){if(Z){switch(d.tag){case 0:case 11:case 14:case 15:xl(3,d,d.return),id(3,d),xl(5,d,d.return);return;case 1:return;case 5:var x=d.stateNode;if(x!=null){var E=d.memoizedProps;c=c!==null?c.memoizedProps:E;var M=d.type,B=d.updateQueue;d.updateQueue=null,B!==null&&xt(x,B,M,c,E,d)}return;case 6:if(d.stateNode===null)throw Error(o(162));x=d.memoizedProps,Ne(d.stateNode,c!==null?c.memoizedProps:x,x);return;case 3:le&&c!==null&&c.memoizedState.isDehydrated&&V(d.stateNode.containerInfo);return;case 12:return;case 13:Jp(d);return;case 19:Jp(d);return;case 17:return}throw Error(o(163))}switch(d.tag){case 0:case 11:case 14:case 15:xl(3,d,d.return),id(3,d),xl(5,d,d.return);return;case 12:return;case 13:Jp(d);return;case 19:Jp(d);return;case 3:le&&c!==null&&c.memoizedState.isDehydrated&&V(d.stateNode.containerInfo);break;case 22:case 23:return}e:if(Pe){switch(d.tag){case 1:case 5:case 6:break e;case 3:case 4:d=d.stateNode,en(d.containerInfo,d.pendingChildren);break e}throw Error(o(163))}}function Jp(c){var d=c.updateQueue;if(d!==null){c.updateQueue=null;var x=c.stateNode;x===null&&(x=c.stateNode=new lF),d.forEach(function(E){var M=yF.bind(null,c,E);x.has(E)||(x.add(E),E.then(M,M))})}}function cF(c,d){for($e=d;$e!==null;){d=$e;var x=d.deletions;if(x!==null)for(var E=0;E<x.length;E++){var M=x[E];try{var B=c;Z?tM(B,M,d):Qw(B,M,d);var X=M.alternate;X!==null&&(X.return=null),M.return=null}catch(vt){pr(M,d,vt)}}if(x=d.child,(d.subtreeFlags&12854)!==0&&x!==null)x.return=d,$e=x;else for(;$e!==null;){d=$e;try{var ie=d.flags;if(ie&32&&Z&&Mt(d.stateNode),ie&512){var Ae=d.alternate;if(Ae!==null){var Xe=Ae.ref;Xe!==null&&(typeof Xe=="function"?Xe(null):Xe.current=null)}}if(ie&8192)switch(d.tag){case 13:if(d.memoizedState!==null){var ut=d.alternate;(ut===null||ut.memoizedState===null)&&(b_=fi())}break;case 22:var bt=d.memoizedState!==null,St=d.alternate,hn=St!==null&&St.memoizedState!==null;if(x=d,Z){e:if(E=x,M=bt,B=null,Z)for(var yt=E;;){if(yt.tag===5){if(B===null){B=yt;var Li=yt.stateNode;M?ee(Li):se(yt.stateNode,yt.memoizedProps)}}else if(yt.tag===6){if(B===null){var ss=yt.stateNode;M?Qe(ss):Ie(ss,yt.memoizedProps)}}else if((yt.tag!==22&&yt.tag!==23||yt.memoizedState===null||yt===E)&&yt.child!==null){yt.child.return=yt,yt=yt.child;continue}if(yt===E)break;for(;yt.sibling===null;){if(yt.return===null||yt.return===E)break e;B===yt&&(B=null),yt=yt.return}B===yt&&(B=null),yt.sibling.return=yt.return,yt=yt.sibling}}if(bt&&!hn&&(x.mode&1)!==0){$e=x;for(var he=x.child;he!==null;){for(x=$e=he;$e!==null;){E=$e;var ae=E.child;switch(E.tag){case 0:case 11:case 14:case 15:xl(4,E,E.return);break;case 1:Xp(E,E.return);var ve=E.stateNode;if(typeof ve.componentWillUnmount=="function"){var et=E.return;try{ve.props=E.memoizedProps,ve.state=E.memoizedState,ve.componentWillUnmount()}catch(vt){pr(E,et,vt)}}break;case 5:Xp(E,E.return);break;case 22:if(E.memoizedState!==null){rM(x);continue}}ae!==null?(ae.return=E,$e=ae):rM(x)}he=he.sibling}}}switch(ie&4102){case 2:eM(d),d.flags&=-3;break;case 6:eM(d),d.flags&=-3,E_(d.alternate,d);break;case 4096:d.flags&=-4097;break;case 4100:d.flags&=-4097,E_(d.alternate,d);break;case 4:E_(d.alternate,d)}}catch(vt){pr(d,d.return,vt)}if(x=d.sibling,x!==null){x.return=d.return,$e=x;break}$e=d.return}}}function fF(c,d,x){$e=c,nM(c)}function nM(c,d,x){for(var E=(c.mode&1)!==0;$e!==null;){var M=$e,B=M.child;if(M.tag===22&&E){var X=M.memoizedState!==null||Wp;if(!X){var ie=M.alternate,Ae=ie!==null&&ie.memoizedState!==null||yl;ie=Wp;var Xe=yl;if(Wp=X,(yl=Ae)&&!Xe)for($e=M;$e!==null;)X=$e,Ae=X.child,X.tag===22&&X.memoizedState!==null?sM(M):Ae!==null?(Ae.return=X,$e=Ae):sM(M);for(;B!==null;)$e=B,nM(B),B=B.sibling;$e=M,Wp=ie,yl=Xe}iM(c)}else(M.subtreeFlags&8772)!==0&&B!==null?(B.return=M,$e=B):iM(c)}}function iM(c){for(;$e!==null;){var d=$e;if((d.flags&8772)!==0){var x=d.alternate;try{if((d.flags&8772)!==0)switch(d.tag){case 0:case 11:case 15:yl||id(5,d);break;case 1:var E=d.stateNode;if(d.flags&4&&!yl)if(x===null)E.componentDidMount();else{var M=d.elementType===d.type?x.memoizedProps:Cs(d.type,x.memoizedProps);E.componentDidUpdate(M,x.memoizedState,E.__reactInternalSnapshotBeforeUpdate)}var B=d.updateQueue;B!==null&&qE(d,B,E);break;case 3:var X=d.updateQueue;if(X!==null){if(x=null,d.child!==null)switch(d.child.tag){case 5:x=Q(d.child.stateNode);break;case 1:x=d.child.stateNode}qE(d,X,x)}break;case 5:var ie=d.stateNode;x===null&&d.flags&4&&Ke(ie,d.type,d.memoizedProps,d);break;case 6:break;case 4:break;case 12:break;case 13:if(le&&d.memoizedState===null){var Ae=d.alternate;if(Ae!==null){var Xe=Ae.memoizedState;if(Xe!==null){var ut=Xe.dehydrated;ut!==null&&W(ut)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(o(163))}yl||d.flags&512&&x_(d)}catch(bt){pr(d,d.return,bt)}}if(d===c){$e=null;break}if(x=d.sibling,x!==null){x.return=d.return,$e=x;break}$e=d.return}}function rM(c){for(;$e!==null;){var d=$e;if(d===c){$e=null;break}var x=d.sibling;if(x!==null){x.return=d.return,$e=x;break}$e=d.return}}function sM(c){for(;$e!==null;){var d=$e;try{switch(d.tag){case 0:case 11:case 15:var x=d.return;try{id(4,d)}catch(Ae){pr(d,x,Ae)}break;case 1:var E=d.stateNode;if(typeof E.componentDidMount=="function"){var M=d.return;try{E.componentDidMount()}catch(Ae){pr(d,M,Ae)}}var B=d.return;try{x_(d)}catch(Ae){pr(d,B,Ae)}break;case 5:var X=d.return;try{x_(d)}catch(Ae){pr(d,X,Ae)}}}catch(Ae){pr(d,d.return,Ae)}if(d===c){$e=null;break}var ie=d.sibling;if(ie!==null){ie.return=d.return,$e=ie;break}$e=d.return}}var jp=0,Yp=1,Kp=2,Qp=3,qp=4;if(typeof Symbol=="function"&&Symbol.for){var rd=Symbol.for;jp=rd("selector.component"),Yp=rd("selector.has_pseudo_class"),Kp=rd("selector.role"),Qp=rd("selector.test_id"),qp=rd("selector.text")}function w_(c){var d=Me(c);if(d!=null){if(typeof d.memoizedProps["data-testname"]!="string")throw Error(o(364));return d}if(c=O(c),c===null)throw Error(o(362));return c.stateNode.current}function M_(c,d){switch(d.$$typeof){case jp:if(c.type===d.value)return!0;break;case Yp:e:{d=d.value,c=[c,0];for(var x=0;x<c.length;){var E=c[x++],M=c[x++],B=d[M];if(E.tag!==5||!Se(E)){for(;B!=null&&M_(E,B);)M++,B=d[M];if(M===d.length){d=!0;break e}else for(E=E.child;E!==null;)c.push(E,M),E=E.sibling}}d=!1}return d;case Kp:if(c.tag===5&&be(c.stateNode,d.value))return!0;break;case qp:if((c.tag===5||c.tag===6)&&(c=Te(c),c!==null&&0<=c.indexOf(d.value)))return!0;break;case Qp:if(c.tag===5&&(c=c.memoizedProps["data-testname"],typeof c=="string"&&c.toLowerCase()===d.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function C_(c){switch(c.$$typeof){case jp:return"<"+(I(c.value)||"Unknown")+">";case Yp:return":has("+(C_(c)||"")+")";case Kp:return'[role="'+c.value+'"]';case qp:return'"'+c.value+'"';case Qp:return'[data-testname="'+c.value+'"]';default:throw Error(o(365))}}function oM(c,d){var x=[];c=[c,0];for(var E=0;E<c.length;){var M=c[E++],B=c[E++],X=d[B];if(M.tag!==5||!Se(M)){for(;X!=null&&M_(M,X);)B++,X=d[B];if(B===d.length)x.push(M);else for(M=M.child;M!==null;)c.push(M,B),M=M.sibling}}return x}function T_(c,d){if(!G)throw Error(o(363));c=w_(c),c=oM(c,d),d=[],c=Array.from(c);for(var x=0;x<c.length;){var E=c[x++];if(E.tag===5)Se(E)||d.push(E.stateNode);else for(E=E.child;E!==null;)c.push(E),E=E.sibling}return d}var dF=Math.ceil,Zp=a.ReactCurrentDispatcher,R_=a.ReactCurrentOwner,Xn=a.ReactCurrentBatchConfig,kt=0,Zn=null,$n=null,xi=0,Br=0,Zu=lt(0),ri=0,sd=null,$u=0,$p=0,P_=0,od=null,dr=null,b_=0,I_=1/0;function ec(){I_=fi()+500}var em=!1,B_=null,sa=null,tm=!1,oa=null,nm=0,ad=0,D_=null,im=-1,rm=0;function nr(){return(kt&6)!==0?fi():im!==-1?im:im=fi()}function aa(c){return(c.mode&1)===0?1:(kt&2)!==0&&xi!==0?xi&-xi:YD.transition!==null?(rm===0&&(c=vp,vp<<=1,(vp&4194240)===0&&(vp=64),rm=c),rm):(c=sn,c!==0?c:we())}function is(c,d,x){if(50<ad)throw ad=0,D_=null,Error(o(185));var E=sm(c,d);return E===null?null:(Wf(E,d,x),((kt&2)===0||E!==Zn)&&(E===Zn&&((kt&2)===0&&($p|=d),ri===4&&la(E,xi)),hr(E,x),d===1&&kt===0&&(c.mode&1)===0&&(ec(),Ap&&qs())),E)}function sm(c,d){c.lanes|=d;var x=c.alternate;for(x!==null&&(x.lanes|=d),x=c,c=c.return;c!==null;)c.childLanes|=d,x=c.alternate,x!==null&&(x.childLanes|=d),x=c,c=c.return;return x.tag===3?x.stateNode:null}function hr(c,d){var x=c.callbackNode;zD(c,d);var E=yp(c,c===Zn?xi:0);if(E===0)x!==null&&JE(x),c.callbackNode=null,c.callbackPriority=0;else if(d=E&-E,c.callbackPriority!==d){if(x!=null&&JE(x),d===1)c.tag===0?jD(lM.bind(null,c)):jE(lM.bind(null,c)),Je?ke(function(){kt===0&&qs()}):Gv(Hv,qs),x=null;else{switch(XE(E)){case 1:x=Hv;break;case 4:x=VD;break;case 16:x=Vv;break;case 536870912:x=WD;break;default:x=Vv}x=vM(x,aM.bind(null,c))}c.callbackPriority=d,c.callbackNode=x}}function aM(c,d){if(im=-1,rm=0,(kt&6)!==0)throw Error(o(327));var x=c.callbackNode;if(El()&&c.callbackNode!==x)return null;var E=yp(c,c===Zn?xi:0);if(E===0)return null;if((E&30)!==0||(E&c.expiredLanes)!==0||d)d=om(c,E);else{d=E;var M=kt;kt|=2;var B=fM();(Zn!==c||xi!==d)&&(ec(),Al(c,d));do try{mF();break}catch(ie){cM(c,ie)}while(1);Jv(),Zp.current=B,kt=M,$n!==null?d=0:(Zn=null,xi=0,d=ri)}if(d!==0){if(d===2&&(M=Uv(c),M!==0&&(E=M,d=F_(c,M))),d===1)throw x=sd,Al(c,0),la(c,E),hr(c,fi()),x;if(d===6)la(c,E);else{if(M=c.current.alternate,(E&30)===0&&!hF(M)&&(d=om(c,E),d===2&&(B=Uv(c),B!==0&&(E=B,d=F_(c,B))),d===1))throw x=sd,Al(c,0),la(c,E),hr(c,fi()),x;switch(c.finishedWork=M,c.finishedLanes=E,d){case 0:case 1:throw Error(o(345));case 2:Sl(c,dr);break;case 3:if(la(c,E),(E&130023424)===E&&(d=b_+500-fi(),10<d)){if(yp(c,0)!==0)break;if(M=c.suspendedLanes,(M&E)!==E){nr(),c.pingedLanes|=c.suspendedLanes&M;break}c.timeoutHandle=De(Sl.bind(null,c,dr),d);break}Sl(c,dr);break;case 4:if(la(c,E),(E&4194240)===E)break;for(d=c.eventTimes,M=-1;0<E;){var X=31-dn(E);B=1<<X,X=d[X],X>M&&(M=X),E&=~B}if(E=M,E=fi()-E,E=(120>E?120:480>E?480:1080>E?1080:1920>E?1920:3e3>E?3e3:4320>E?4320:1960*dF(E/1960))-E,10<E){c.timeoutHandle=De(Sl.bind(null,c,dr),E);break}Sl(c,dr);break;case 5:Sl(c,dr);break;default:throw Error(o(329))}}}return hr(c,fi()),c.callbackNode===x?aM.bind(null,c):null}function F_(c,d){var x=od;return c.current.memoizedState.isDehydrated&&(Al(c,d).flags|=256),c=om(c,d),c!==2&&(d=dr,dr=x,d!==null&&L_(d)),c}function L_(c){dr===null?dr=c:dr.push.apply(dr,c)}function hF(c){for(var d=c;;){if(d.flags&16384){var x=d.updateQueue;if(x!==null&&(x=x.stores,x!==null))for(var E=0;E<x.length;E++){var M=x[E],B=M.getSnapshot;M=M.value;try{if(!Qs(B(),M))return!1}catch{return!1}}}if(x=d.child,d.subtreeFlags&16384&&x!==null)x.return=d,d=x;else{if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function la(c,d){for(d&=~P_,d&=~$p,c.suspendedLanes|=d,c.pingedLanes&=~d,c=c.expirationTimes;0<d;){var x=31-dn(d),E=1<<x;c[x]=-1,d&=~E}}
vendor: 3,474 bytes, line 3864
3864function lM(c){if((kt&6)!==0)throw Error(o(327));El();var d=yp(c,0);if((d&1)===0)return hr(c,fi()),null;var x=om(c,d);if(c.tag!==0&&x===2){var E=Uv(c);E!==0&&(d=E,x=F_(c,E))}if(x===1)throw x=sd,Al(c,0),la(c,d),hr(c,fi()),x;if(x===6)throw Error(o(345));return c.finishedWork=c.current.alternate,c.finishedLanes=d,Sl(c,dr),hr(c,fi()),null}function uM(c){oa!==null&&oa.tag===0&&(kt&6)===0&&El();var d=kt;kt|=1;var x=Xn.transition,E=sn;try{if(Xn.transition=null,sn=1,c)return c()}finally{sn=E,Xn.transition=x,kt=d,(kt&6)===0&&qs()}}function N_(){Br=Zu.current,ze(Zu)}function Al(c,d){c.finishedWork=null,c.finishedLanes=0;var x=c.timeoutHandle;if(x!==At&&(c.timeoutHandle=At,dt(x)),$n!==null)for(x=$n.return;x!==null;){var E=x;switch($v(E),E.tag){case 1:E=E.type.childContextTypes,E!=null&&gn();break;case 3:Qu(),ze(Pt),ze(Gt),o_();break;case 5:r_(E);break;case 4:Qu();break;case 13:ze(bn);break;case 19:ze(bn);break;case 10:jv(E.type._context);break;case 22:case 23:N_()}x=x.return}if(Zn=c,$n=c=ua(c.current,null),xi=Br=d,ri=0,sd=null,P_=$p=$u=0,dr=od=null,Zs!==null){for(d=0;d<Zs.length;d++)if(x=Zs[d],E=x.interleaved,E!==null){x.interleaved=null;var M=E.next,B=x.pending;if(B!==null){var X=B.next;B.next=M,E.next=X}x.pending=E}Zs=null}return c}function cM(c,d){do{var x=$n;try{if(Jv(),Bp.current=Up,Dp){for(var E=kn.memoizedState;E!==null;){var M=E.queue;M!==null&&(M.pending=null),E=E.next}Dp=!1}if(qu=0,di=Bi=kn=null,Qf=!1,qf=0,R_.current=null,x===null||x.return===null){ri=1,sd=d,$n=null;break}e:{var B=c,X=x.return,ie=x,Ae=d;if(d=xi,ie.flags|=32768,Ae!==null&&typeof Ae=="object"&&typeof Ae.then=="function"){var Xe=Ae,ut=ie,bt=ut.tag;if((ut.mode&1)===0&&(bt===0||bt===11||bt===15)){var St=ut.alternate;St?(ut.updateQueue=St.updateQueue,ut.memoizedState=St.memoizedState,ut.lanes=St.lanes):(ut.updateQueue=null,ut.memoizedState=null)}var hn=Iw(X);if(hn!==null){hn.flags&=-257,Bw(hn,X,ie,B,d),hn.mode&1&&bw(B,Xe,d),d=hn,Ae=Xe;var yt=d.updateQueue;if(yt===null){var Li=new Set;Li.add(Ae),d.updateQueue=Li}else yt.add(Ae);break e}else{if((d&1)===0){bw(B,Xe,d),O_();break e}Ae=Error(o(426))}}else if(Tn&&ie.mode&1){var ss=Iw(X);if(ss!==null){(ss.flags&65536)===0&&(ss.flags|=256),Bw(ss,X,ie,B,d),n_(Ae);break e}}B=Ae,ri!==4&&(ri=2),od===null?od=[B]:od.push(B),Ae=h_(Ae,ie),ie=X;do{switch(ie.tag){case 3:ie.flags|=65536,d&=-d,ie.lanes|=d;var he=Rw(ie,Ae,d);QE(ie,he);break e;case 1:B=Ae;var ae=ie.type,ve=ie.stateNode;if((ie.flags&128)===0&&(typeof ae.getDerivedStateFromError=="function"||ve!==null&&typeof ve.componentDidCatch=="function"&&(sa===null||!sa.has(ve)))){ie.flags|=65536,d&=-d,ie.lanes|=d;var et=Pw(ie,B,d);QE(ie,et);break e}}ie=ie.return}while(ie!==null)}hM(x)}catch(vt){d=vt,$n===x&&x!==null&&($n=x=x.return);continue}break}while(1)}function fM(){var c=Zp.current;return Zp.current=Up,c===null?Up:c}function O_(){(ri===0||ri===3||ri===2)&&(ri=4),Zn===null||($u&268435455)===0&&($p&268435455)===0||la(Zn,xi)}function om(c,d){var x=kt;kt|=2;var E=fM();Zn===c&&xi===d||Al(c,d);do try{pF();break}catch(M){cM(c,M)}while(1);if(Jv(),kt=x,Zp.current=E,$n!==null)throw Error(o(261));return Zn=null,xi=0,ri}function pF(){for(;$n!==null;)dM($n)}function mF(){for(;$n!==null&&!GD();)dM($n)}function dM(c){var d=gM(c.alternate,c,Br);c.memoizedProps=c.pendingProps,d===null?hM(c):$n=d,R_.current=null}function hM(c){var d=c;do{var x=d.alternate;if(c=d.return,(d.flags&32768)===0){if(x=rF(x,d,Br),x!==null){$n=x;return}}else{if(x=aF(x,d),x!==null){x.flags&=32767,$n=x;return}
vendor: 7,926 bytes, line 3864
3864if(c!==null)c.flags|=32768,c.subtreeFlags=0,c.deletions=null;else{ri=6,$n=null;return}}if(d=d.sibling,d!==null){$n=d;return}$n=d=c}while(d!==null);ri===0&&(ri=5)}function Sl(c,d){var x=sn,E=Xn.transition;try{Xn.transition=null,sn=1,gF(c,d,x)}finally{Xn.transition=E,sn=x}return null}function gF(c,d,x){do El();while(oa!==null);if((kt&6)!==0)throw Error(o(327));var E=c.finishedWork,M=c.finishedLanes;if(E===null)return null;if(c.finishedWork=null,c.finishedLanes=0,E===c.current)throw Error(o(177));c.callbackNode=null,c.callbackPriority=0;var B=E.lanes|E.childLanes;if(kD(c,B),c===Zn&&($n=Zn=null,xi=0),(E.subtreeFlags&2064)===0&&(E.flags&2064)===0||tm||(tm=!0,vM(Vv,function(){return El(),null})),B=(E.flags&15990)!==0,(E.subtreeFlags&15990)!==0||B){B=Xn.transition,Xn.transition=null;var X=sn;sn=1;var ie=kt;kt|=4,R_.current=null,uF(c,E),cF(c,E),te(c.containerInfo),c.current=E,fF(E),HD(),kt=ie,sn=X,Xn.transition=B}else c.current=E;if(tm&&(tm=!1,oa=c,nm=M),B=c.pendingLanes,B===0&&(sa=null),XD(E.stateNode),hr(c,fi()),d!==null)for(x=c.onRecoverableError,E=0;E<d.length;E++)x(d[E]);if(em)throw em=!1,c=B_,B_=null,c;return(nm&1)!==0&&c.tag!==0&&El(),B=c.pendingLanes,(B&1)!==0?c===D_?ad++:(ad=0,D_=c):ad=0,qs(),null}function El(){if(oa!==null){var c=XE(nm),d=Xn.transition,x=sn;try{if(Xn.transition=null,sn=16>c?16:c,oa===null)var E=!1;else{if(c=oa,oa=null,nm=0,(kt&6)!==0)throw Error(o(331));var M=kt;for(kt|=4,$e=c.current;$e!==null;){var B=$e,X=B.child;if(($e.flags&16)!==0){var ie=B.deletions;if(ie!==null){for(var Ae=0;Ae<ie.length;Ae++){var Xe=ie[Ae];for($e=Xe;$e!==null;){var ut=$e;switch(ut.tag){case 0:case 11:case 15:xl(8,ut,B)}var bt=ut.child;if(bt!==null)bt.return=ut,$e=bt;else for(;$e!==null;){ut=$e;var St=ut.sibling,hn=ut.return;if(qw(ut),ut===Xe){$e=null;break}if(St!==null){St.return=hn,$e=St;break}$e=hn}}}var yt=B.alternate;if(yt!==null){var Li=yt.child;if(Li!==null){yt.child=null;do{var ss=Li.sibling;Li.sibling=null,Li=ss}while(Li!==null)}}$e=B}}if((B.subtreeFlags&2064)!==0&&X!==null)X.return=B,$e=X;else e:for(;$e!==null;){if(B=$e,(B.flags&2048)!==0)switch(B.tag){case 0:case 11:case 15:xl(9,B,B.return)}var he=B.sibling;if(he!==null){he.return=B.return,$e=he;break e}$e=B.return}}var ae=c.current;for($e=ae;$e!==null;){X=$e;var ve=X.child;if((X.subtreeFlags&2064)!==0&&ve!==null)ve.return=X,$e=ve;else e:for(X=ae;$e!==null;){if(ie=$e,(ie.flags&2048)!==0)try{switch(ie.tag){case 0:case 11:case 15:id(9,ie)}}catch(vt){pr(ie,ie.return,vt)}if(ie===X){$e=null;break e}var et=ie.sibling;if(et!==null){et.return=ie.return,$e=et;break e}$e=ie.return}}if(kt=M,qs(),Ks&&typeof Ks.onPostCommitFiberRoot=="function")try{Ks.onPostCommitFiberRoot(xp,c)}catch{}E=!0}return E}finally{sn=x,Xn.transition=d}}return!1}function pM(c,d,x){d=h_(x,d),d=Rw(c,d,1),ra(c,d),d=nr(),c=sm(c,1),c!==null&&(Wf(c,1,d),hr(c,d))}function pr(c,d,x){if(c.tag===3)pM(c,c,x);else for(;d!==null;){if(d.tag===3){pM(d,c,x);break}else if(d.tag===1){var E=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof E.componentDidCatch=="function"&&(sa===null||!sa.has(E))){c=h_(x,c),c=Pw(d,c,1),ra(d,c),c=nr(),d=sm(d,1),d!==null&&(Wf(d,1,c),hr(d,c));break}}d=d.return}}function vF(c,d,x){var E=c.pingCache;E!==null&&E.delete(d),d=nr(),c.pingedLanes|=c.suspendedLanes&x,Zn===c&&(xi&x)===x&&(ri===4||ri===3&&(xi&130023424)===xi&&500>fi()-b_?Al(c,0):P_|=x),hr(c,d)}function mM(c,d){d===0&&((c.mode&1)===0?d=1:(d=_p,_p<<=1,(_p&130023424)===0&&(_p=4194304)));var x=nr();c=sm(c,d),c!==null&&(Wf(c,d,x),hr(c,x))}function _F(c){var d=c.memoizedState,x=0;d!==null&&(x=d.retryLane),mM(c,x)}function yF(c,d){var x=0;switch(c.tag){case 13:var E=c.stateNode,M=c.memoizedState;M!==null&&(x=M.retryLane);break;case 19:E=c.stateNode;break;default:throw Error(o(314))}E!==null&&E.delete(d),mM(c,x)}var gM;gM=function(c,d,x){if(c!==null)if(c.memoizedProps!==d.pendingProps||Pt.current)Ir=!0;else{if((c.lanes&x)===0&&(d.flags&128)===0)return Ir=!1,oF(c,d,x);Ir=(c.flags&131072)!==0}else Ir=!1,Tn&&(d.flags&1048576)!==0&&nw(d,Pp,d.index);switch(d.lanes=0,d.tag){case 2:var E=d.type;c!==null&&(c.alternate=null,d.alternate=null,d.flags|=2),c=d.pendingProps;var M=qn(d,Gt.current);Wu(d,x),M=l_(null,d,E,c,M,x);var B=u_();return d.flags|=1,typeof M=="object"&&M!==null&&typeof M.render=="function"&&M.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,zt(E)?(B=!0,tn(d)):B=!1,d.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,Kv(d),M.updater=Tp,d.stateNode=M,M._reactInternals=d,qv(d,E,c,x),d=g_(null,d,E,!0,B,x)):(d.tag=0,Tn&&B&&Zv(d),tr(null,d,M,x),d=d.child),d;case 16:E=d.elementType;e:{switch(c!==null&&(c.alternate=null,d.alternate=null,d.flags|=2),c=d.pendingProps,M=E._init,E=M(E._payload),d.type=E,M=d.tag=AF(E),c=Cs(E,c),M){case 0:d=m_(null,d,E,c,x);break e;case 1:d=kw(null,d,E,c,x);break e;case 11:d=Lw(null,d,E,c,x);break e;case 14:d=Nw(null,d,E,Cs(E.type,c),x);break e}throw Error(o(306,E,""))}return d;case 0:return E=d.type,M=d.pendingProps,M=d.elementType===E?M:Cs(E,M),m_(c,d,E,M,x);case 1:return E=d.type,M=d.pendingProps,M=d.elementType===E?M:Cs(E,M),kw(c,d,E,M,x);case 3:e:{if(Gw(d),c===null)throw Error(o(387));E=d.pendingProps,B=d.memoizedState,M=B.element,KE(c,d),Cp(d,E,null,x);var X=d.memoizedState;if(E=X.element,le&&B.isDehydrated)if(B={element:E,isDehydrated:!1,cache:X.cache,transitions:X.transitions},d.updateQueue.baseState=B,d.memoizedState=B,d.flags&256){M=Error(o(423)),d=Hw(c,d,E,x,M);break e}else if(E!==M){M=Error(o(424)),d=Hw(c,d,E,x,M);break e}else for(le&&(br=ml(d.stateNode.containerInfo),Pr=d,Tn=!0,Ts=null,Xf=!1),x=lw(d,null,E,x),d.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling;else{if(ju(),E===M){d=To(c,d,x);break e}tr(c,d,E,x)}d=d.child}return d;case 5:return uw(d),c===null&&t_(d),E=d.type,M=d.pendingProps,B=c!==null?c.memoizedProps:null,X=M.children,Ee(E,M)?X=null:B!==null&&Ee(E,B)&&(d.flags|=32),zw(c,d),tr(c,d,X,x),d.child;case 6:return c===null&&t_(d),null;case 13:return Vw(c,d,x);case 4:return i_(d,d.stateNode.containerInfo),E=d.pendingProps,c===null?d.child=Yu(d,null,E,x):tr(c,d,E,x),d.child;case 11:return E=d.type,M=d.pendingProps,M=d.elementType===E?M:Cs(E,M),Lw(c,d,E,M,x);case 7:return tr(c,d,d.pendingProps,x),d.child;case 8:return tr(c,d,d.pendingProps.children,x),d.child;case 12:return tr(c,d,d.pendingProps.children,x),d.child;case 10:e:{if(E=d.type._context,M=d.pendingProps,B=d.memoizedProps,X=M.value,YE(d,E,X),B!==null)if(Qs(B.value,X)){if(B.children===M.children&&!Pt.current){d=To(c,d,x);break e}}else for(B=d.child,B!==null&&(B.return=d);B!==null;){var ie=B.dependencies;if(ie!==null){X=B.child;for(var Ae=ie.firstContext;Ae!==null;){if(Ae.context===E){if(B.tag===1){Ae=Eo(-1,x&-x),Ae.tag=2;var Xe=B.updateQueue;if(Xe!==null){Xe=Xe.shared;var ut=Xe.pending;ut===null?Ae.next=Ae:(Ae.next=ut.next,ut.next=Ae),Xe.pending=Ae}}B.lanes|=x,Ae=B.alternate,Ae!==null&&(Ae.lanes|=x),Yv(B.return,x,d),ie.lanes|=x;break}Ae=Ae.next}}else if(B.tag===10)X=B.type===d.type?null:B.child;else if(B.tag===18){if(X=B.return,X===null)throw Error(o(341));X.lanes|=x,ie=X.alternate,ie!==null&&(ie.lanes|=x),Yv(X,x,d),X=B.sibling}else X=B.child;if(X!==null)X.return=B;else for(X=B;X!==null;){if(X===d){X=null;break}if(B=X.sibling,B!==null){B.return=X.return,X=B;break}X=X.return}B=X}tr(c,d,M.children,x),d=d.child}return d;case 9:return M=d.type,E=d.pendingProps.children,Wu(d,x),M=Zr(M),E=E(M),d.flags|=1,tr(c,d,E,x),d.child;case 14:return E=d.type,M=Cs(E,d.pendingProps),M=Cs(E.type,M),Nw(c,d,E,M,x);case 15:return Ow(c,d,d.type,d.pendingProps,x);case 17:return E=d.type,M=d.pendingProps,M=d.elementType===E?M:Cs(E,M),c!==null&&(c.alternate=null,d.alternate=null,d.flags|=2),d.tag=1,zt(E)?(c=!0,tn(d)):c=!1,Wu(d,x),ew(d,E,M),qv(d,E,M,x),g_(null,d,E,!0,c,x);case 19:return jw(c,d,x);case 22:return Uw(c,d,x)}throw Error(o(156,d.tag))};function vM(c,d){return Gv(c,d)}function xF(c,d,x,E){this.tag=c,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 37,695 bytes, lines 3864-3876
3864ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=E,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rs(c,d,x,E){return new xF(c,d,x,E)}function U_(c){return c=c.prototype,!(!c||!c.isReactComponent)}function AF(c){if(typeof c=="function")return U_(c)?1:0;if(c!=null){if(c=c.$$typeof,c===_)return 11;if(c===A)return 14}return 2}function ua(c,d){var x=c.alternate;return x===null?(x=rs(c.tag,d,c.key,c.mode),x.elementType=c.elementType,x.type=c.type,x.stateNode=c.stateNode,x.alternate=c,c.alternate=x):(x.pendingProps=d,x.type=c.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=c.flags&14680064,x.childLanes=c.childLanes,x.lanes=c.lanes,x.child=c.child,x.memoizedProps=c.memoizedProps,x.memoizedState=c.memoizedState,x.updateQueue=c.updateQueue,d=c.dependencies,x.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},x.sibling=c.sibling,x.index=c.index,x.ref=c.ref,x}function am(c,d,x,E,M,B){var X=2;if(E=c,typeof c=="function")U_(c)&&(X=1);else if(typeof c=="string")X=5;else e:switch(c){case f:return wl(x.children,M,B,d);case h:X=8,M|=8;break;case p:return c=rs(12,x,d,M|2),c.elementType=p,c.lanes=B,c;case y:return c=rs(13,x,d,M),c.elementType=y,c.lanes=B,c;case g:return c=rs(19,x,d,M),c.elementType=g,c.lanes=B,c;case w:return lm(x,M,B,d);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case m:X=10;break e;case v:X=9;break e;case _:X=11;break e;case A:X=14;break e;case S:X=16,E=null;break e}throw Error(o(130,c==null?c:typeof c,""))}return d=rs(X,x,d,M),d.elementType=c,d.type=E,d.lanes=B,d}function wl(c,d,x,E){return c=rs(7,c,E,d),c.lanes=x,c}function lm(c,d,x,E){return c=rs(22,c,E,d),c.elementType=w,c.lanes=x,c.stateNode={},c}function z_(c,d,x){return c=rs(6,c,null,d),c.lanes=x,c}function k_(c,d,x){return d=rs(4,c.children!==null?c.children:[],c.key,d),d.lanes=x,d.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},d}function SF(c,d,x,E,M){this.tag=d,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=At,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zv(0),this.expirationTimes=zv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zv(0),this.identifierPrefix=E,this.onRecoverableError=M,le&&(this.mutableSourceEagerHydrationData=null)}function _M(c,d,x,E,M,B,X,ie,Ae){return c=new SF(c,d,x,ie,Ae),d===1?(d=1,B===!0&&(d|=8)):d=0,B=rs(3,null,null,d),c.current=B,B.stateNode=c,B.memoizedState={element:E,isDehydrated:x,cache:null,transitions:null},Kv(B),c}function yM(c){if(!c)return ct;c=c._reactInternals;e:{if(C(c)!==c||c.tag!==1)throw Error(o(170));var d=c;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(zt(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(o(171))}if(c.tag===1){var x=c.type;if(zt(x))return rn(c,x,d)}return d}function xM(c){var d=c._reactInternals;if(d===void 0)throw typeof c.render=="function"?Error(o(188)):(c=Object.keys(c).join(","),Error(o(268,c)));return c=j(d),c===null?null:c.stateNode}function AM(c,d){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var x=c.retryLane;c.retryLane=x!==0&&x<d?x:d}}function G_(c,d){AM(c,d),(c=c.alternate)&&AM(c,d)}function EF(c){return c=j(c),c===null?null:c.stateNode}function wF(){return null}return t.attemptContinuousHydration=function(c){if(c.tag===13){var d=nr();is(c,134217728,d),G_(c,134217728)}},t.attemptHydrationAtCurrentPriority=function(c){if(c.tag===13){var d=nr(),x=aa(c);is(c,x,d),G_(c,x)}},t.attemptSynchronousHydration=function(c){switch(c.tag){case 3:var d=c.stateNode;if(d.current.memoizedState.isDehydrated){var x=Vf(d.pendingLanes);x!==0&&(kv(d,x|1),hr(d,fi()),(kt&6)===0&&(ec(),qs()))}break;case 13:var E=nr();uM(function(){return is(c,1,E)}),G_(c,1)}},t.batchedUpdates=function(c,d){var x=kt;kt|=1;try{return c(d)}finally{kt=x,kt===0&&(ec(),Ap&&qs())}},t.createComponentSelector=function(c){return{$$typeof:jp,value:c}},t.createContainer=function(c,d,x,E,M,B,X){return _M(c,d,!1,null,x,E,M,B,X)},t.createHasPseudoClassSelector=function(c){return{$$typeof:Yp,value:c}},t.createHydrationContainer=function(c,d,x,E,M,B,X,ie,Ae){return c=_M(x,E,!0,c,M,B,X,ie,Ae),c.context=yM(null),x=c.current,E=nr(),M=aa(x),B=Eo(E,M),B.callback=d!=null?d:null,ra(x,B),c.current.lanes=M,Wf(c,M,E),hr(c,E),c},t.createPortal=function(c,d,x){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:E==null?null:""+E,children:c,containerInfo:d,implementation:x}},t.createRoleSelector=function(c){return{$$typeof:Kp,value:c}},t.createTestNameSelector=function(c){return{$$typeof:Qp,value:c}},t.createTextSelector=function(c){return{$$typeof:qp,value:c}},t.deferredUpdates=function(c){var d=sn,x=Xn.transition;try{return Xn.transition=null,sn=16,c()}finally{sn=d,Xn.transition=x}},t.discreteUpdates=function(c,d,x,E,M){var B=sn,X=Xn.transition;try{return Xn.transition=null,sn=1,c(d,x,E,M)}finally{sn=B,Xn.transition=X,kt===0&&ec()}},t.findAllNodes=T_,t.findBoundingRects=function(c,d){if(!G)throw Error(o(363));d=T_(c,d),c=[];for(var x=0;x<d.length;x++)c.push(fe(d[x]));for(d=c.length-1;0<d;d--){x=c[d];for(var E=x.x,M=E+x.width,B=x.y,X=B+x.height,ie=d-1;0<=ie;ie--)if(d!==ie){var Ae=c[ie],Xe=Ae.x,ut=Xe+Ae.width,bt=Ae.y,St=bt+Ae.height;if(E>=Xe&&B>=bt&&M<=ut&&X<=St){c.splice(d,1);break}else if(E!==Xe||x.width!==Ae.width||St<B||bt>X){if(!(B!==bt||x.height!==Ae.height||ut<E||Xe>M)){Xe>E&&(Ae.width+=Xe-E,Ae.x=E),ut<M&&(Ae.width=M-Xe),c.splice(d,1);break}}else{bt>B&&(Ae.height+=bt-B,Ae.y=B),St<X&&(Ae.height=X-bt),c.splice(d,1);break}}}return c},t.findHostInstance=xM,t.findHostInstanceWithNoPortals=function(c){return c=N(c),c=c!==null?q(c):null,c===null?null:c.stateNode},t.findHostInstanceWithWarning=function(c){return xM(c)},t.flushControlled=function(c){var d=kt;kt|=1;var x=Xn.transition,E=sn;try{Xn.transition=null,sn=1,c()}finally{sn=E,Xn.transition=x,kt=d,kt===0&&(ec(),qs())}},t.flushPassiveEffects=El,t.flushSync=uM,t.focusWithin=function(c,d){if(!G)throw Error(o(363));for(c=w_(c),d=oM(c,d),d=Array.from(d),c=0;c<d.length;){var x=d[c++];if(!Se(x)){if(x.tag===5&&st(x.stateNode))return!0;for(x=x.child;x!==null;)d.push(x),x=x.sibling}}return!1},t.getCurrentUpdatePriority=function(){return sn},t.getFindAllNodesFailureDescription=function(c,d){if(!G)throw Error(o(363));var x=0,E=[];c=[w_(c),0];for(var M=0;M<c.length;){var B=c[M++],X=c[M++],ie=d[X];if((B.tag!==5||!Se(B))&&(M_(B,ie)&&(E.push(C_(ie)),X++,X>x&&(x=X)),X<d.length))for(B=B.child;B!==null;)c.push(B,X),B=B.sibling}if(x<d.length){for(c=[];x<d.length;x++)c.push(C_(d[x]));return`findAllNodes was able to match part of the selector: 3865 `+(E.join(" > ")+` 3866 3867No matching component was found for: 3868 `)+c.join(" > ")}return null},t.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return Q(c.child.stateNode);default:return c.child.stateNode}},t.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:EF,findFiberByHostInstance:c.findFiberByHostInstance||wF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled||!d.supportsFiber)c=!0;else{try{xp=d.inject(c),Ks=d}catch{}c=!!d.checkDCE}}return c},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(c,d,x,E){if(!G)throw Error(o(363));c=T_(c,d);var M=Le(c,x,E).disconnect;return{disconnect:function(){M()}}},t.registerMutableSourceForHydration=function(c,d){var x=d._getVersion;x=x(d._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[d,x]:c.mutableSourceEagerHydrationData.push(d,x)},t.runWithPriority=function(c,d){var x=sn;try{return sn=c,d()}finally{sn=x}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(c,d,x,E){var M=d.current,B=nr(),X=aa(M);return x=yM(x),d.context===null?d.context=x:d.pendingContext=x,d=Eo(B,X),d.payload={element:c},E=E===void 0?null:E,E!==null&&(d.callback=E),ra(M,d),c=is(M,X,B),c!==null&&Mp(c,M,X),X},t};(function(i){i.exports=Xk})(OI);const Jk=CF(OI.exports),jk=i=>typeof i=="object"&&typeof i.then=="function",iu=[];function zI(i,e,t=(n,r)=>n===r){if(i===e)return!0;if(!i||!e)return!1;const n=i.length;if(e.length!==n)return!1;for(let r=0;r<n;r++)if(!t(i[r],e[r]))return!1;return!0}function kI(i,e=null,t=!1,n={}){e===null&&(e=[i]);for(const s of iu)if(zI(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 n.lifespan&&n.lifespan>0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,n.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:n.equal,remove:()=>{const s=iu.indexOf(r);s!==-1&&iu.splice(s,1)},promise:(jk(i)?i:i(...e)).then(s=>{r.response=s,n.lifespan&&n.lifespan>0&&(r.timeout=setTimeout(r.remove,n.lifespan))}).catch(s=>r.error=s)};if(iu.push(r),!t)throw r.promise}const GI=(i,e,t)=>kI(i,e,!1,t),Yk=(i,e,t)=>void kI(i,e,!0,t),Kk=i=>{if(i===void 0||i.length===0)iu.splice(0,iu.length);else{const e=iu.find(t=>zI(i,t.keys,t.equal));e&&e.remove()}};var Bv={exports:{}},Dv={};/** 3869 * @license React 3870 * react-jsx-runtime.production.min.js 3871 * 3872 * Copyright (c) Facebook, Inc. and its affiliates. 3873 * 3874 * This source code is licensed under the MIT license found in the 3875 * LICENSE file in the root directory of this source tree. 3876 */var Qk=K.exports,qk=Symbol.for("react.element"),Zk=Symbol.for("react.fragment"),$k=Object.prototype.hasOwnProperty,e9=Qk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,t9={key:!0,ref:!0,__self:!0,__source:!0};function HI(i,e,t){var n,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(n in e)$k.call(e,n)&&!t9.hasOwnProperty(n)&&(r[n]=e[n]);if(i&&i.defaultProps)for(n in e=i.defaultProps,e)r[n]===void 0&&(r[n]=e[n]);return{$$typeof:qk,type:i,key:s,ref:o,props:r,_owner:e9.current}}Dv.Fragment=Zk;Dv.jsx=HI;Dv.jsxs=HI;(function(i){i.exports=Dv})(Bv);const F=Bv.exports.jsx,Ye=Bv.exports.jsxs,kf=Bv.exports.Fragment,xE={},xo=i=>void Object.assign(xE,i);function n9(i,e){function t(f,{args:h=[],attach:p,...m},v){let _=`${f[0].toUpperCase()}${f.slice(1)}`,y;if(f==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;y=Tc(g,{type:f,root:v,attach:p,primitive:!0})}else{const g=xE[_];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(h))throw new Error("R3F: The args prop must be an array!");y=Tc(new g(...h),{type:f,root:v,attach:p,memoizedProps:{args:h}})}return y.__r3f.attach===void 0&&(y instanceof Bt?y.__r3f.attach="geometry":y instanceof Qn&&(y.__r3f.attach="material")),_!=="inject"&&ny(y,m),y}function n(f,h){let p=!1;if(h){var m,v;(m=h.__r3f)!=null&&m.attach?ty(f,h,h.__r3f.attach):h.isObject3D&&f.isObject3D&&(f.add(h),p=!0),p||(v=f.__r3f)==null||v.objects.push(h),h.__r3f||Tc(h,{}),h.__r3f.parent=f,fA(h),Rc(h)}}function r(f,h,p){let m=!1;if(h){var v,_;if((v=h.__r3f)!=null&&v.attach)ty(f,h,h.__r3f.attach);else if(h.isObject3D&&f.isObject3D){h.parent=f,h.dispatchEvent({type:"added"}),f.dispatchEvent({type:"childadded",child:h});const y=f.children.filter(A=>A!==h),g=y.indexOf(p);f.children=[...y.slice(0,g),h,...y.slice(g)],m=!0}m||(_=f.__r3f)==null||_.objects.push(h),h.__r3f||Tc(h,{}),h.__r3f.parent=f,fA(h),Rc(h)}}function s(f,h,p=!1){f&&[...f].forEach(m=>o(h,m,p))}function o(f,h,p){if(h){var m,v,_;if(h.__r3f&&(h.__r3f.parent=null),(m=f.__r3f)!=null&&m.objects&&(f.__r3f.objects=f.__r3f.objects.filter(w=>w!==h)),(v=h.__r3f)!=null&&v.attach)y2(f,h,h.__r3f.attach);else if(h.isObject3D&&f.isObject3D){var y;f.remove(h),(y=h.__r3f)!=null&&y.root&&c9(ng(h),h)}const A=(_=h.__r3f)==null?void 0:_.primitive,S=!A&&(p===void 0?h.dispose!==null:p);if(!A){var g;s((g=h.__r3f)==null?void 0:g.objects,h,S),s(h.children,h,S)}if(delete h.__r3f,S&&h.dispose&&h.type!=="Scene"){const w=()=>{try{h.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?Ng.exports.unstable_scheduleCallback(Ng.exports.unstable_IdlePriority,w):w()}Rc(f)}}function a(f,h,p,m){var v;const _=(v=f.__r3f)==null?void 0:v.parent;if(!_)return;const y=t(h,p,f.__r3f.root);if(f.children){for(const g of f.children)g.__r3f&&n(y,g);f.children=f.children.filter(g=>!g.__r3f)}f.__r3f.objects.forEach(g=>n(y,g)),f.__r3f.objects=[],f.__r3f.autoRemovedBeforeAppend||o(_,f),y.parent&&(y.__r3f.autoRemovedBeforeAppend=!0),n(_,y),y.raycast&&y.__r3f.eventCount&&ng(y).getState().internal.interaction.push(y),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=y,g.ref&&(typeof g.ref=="function"?g.ref(y):g.ref.current=y))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:Jk({createInstance:t,removeChild:o,appendChild:n,appendInitialChild:n,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(f,h)=>{if(!h)return;const p=f.getState().scene;!p.__r3f||(p.__r3f.root=f,n(p,h))},removeChildFromContainer:(f,h)=>{!h||o(f.getState().scene,h)},insertInContainerBefore:(f,h,p)=>{if(!h||!p)return;const m=f.getState().scene;!m.__r3f||r(m,h,p)},getRootHostContext:()=>null,getChildHostContext:f=>f,finalizeInitialChildren(f){var h;const p=(h=f==null?void 0:f.__r3f)!=null?h:{};return Boolean(p.handlers)},prepareUpdate(f,h,p,m){var v;if(((v=f==null?void 0:f.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==f)return[!0];{const{args:y=[],children:g,...A}=m,{args:S=[],children:w,...P}=p;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((I,D)=>I!==S[D]))return[!0];const T=KI(f,A,P,!0);return T.changes.length?[!1,T]:null}},commitUpdate(f,[h,p],m,v,_,y){h?a(f,m,_,y):ny(f,p)},commitMount(f,h,p,m){var v;const _=(v=f.__r3f)!=null?v:{};f.raycast&&_.handlers&&_.eventCount&&ng(f).getState().internal.interaction.push(f)},getPublicInstance:f=>f,prepareForCommit:()=>null,preparePortalMount:f=>Tc(f.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(f){var h;const{attach:p,parent:m}=(h=f.__r3f)!=null?h:{};p&&m&&y2(m,f,p),f.isObject3D&&(f.visible=!1),Rc(f)},unhideInstance(f,h){var p;const{attach:m,parent:v}=(p=f.__r3f)!=null?p:{};m&&v&&ty(v,f,m),(f.isObject3D&&h.visible==null||h.visible)&&(f.visible=!0),Rc(f)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():nu.exports.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&_n.fun(performance.now)?performance.now:_n.fun(Date.now)?Date.now:()=>0,scheduleTimeout:_n.fun(setTimeout)?setTimeout:void 0,cancelTimeout:_n.fun(clearTimeout)?clearTimeout:void 0}),applyProps:ny}}var m2,g2;const ey=i=>"colorSpace"in i||"outputColorSpace"in i,VI=()=>{var i;return(i=xE.ColorManagement)!=null?i:null},WI=i=>i&&i.isOrthographicCamera,i9=i=>i&&i.hasOwnProperty("current"),hp=typeof window<"u"&&((m2=window.document)!=null&&m2.createElement||((g2=window.navigator)==null?void 0:g2.product)==="ReactNative")?K.exports.useLayoutEffect:K.exports.useEffect;function XI(i){const e=K.exports.useRef(i);return hp(()=>void(e.current=i),[i]),e}function r9({set:i}){return hp(()=>(i(new Promise(()=>null)),()=>i(!1)),[i]),null}class JI extends K.exports.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}JI.getDerivedStateFromError=()=>({error:!0});const jI="__default",v2=new Map,s9=i=>i&&!!i.memoized&&!!i.changes;function YI(i){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(i)?Math.min(Math.max(i[0],t),i[1]):i}const Rd=i=>{var e;return(e=i.__r3f)==null?void 0:e.root.getState()};function ng(i){let e=i.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const _n={obj:i=>i===Object(i)&&!_n.arr(i)&&typeof i!="function",fun:i=>typeof i=="function",str:i=>typeof i=="string",num:i=>typeof i=="number",boo:i=>typeof i=="boolean",und:i=>i===void 0,arr:i=>Array.isArray(i),equ(i,e,{arrays:t="shallow",objects:n="reference",strict:r=!0}={}){if(typeof i!=typeof e||!!i!=!!e)return!1;if(_n.str(i)||_n.num(i)||_n.boo(i))return i===e;const s=_n.obj(i);if(s&&n==="reference")return i===e;const o=_n.arr(i);if(o&&t==="reference")return i===e;if((o||s)&&i===e)return!0;let a;for(a in i)if(!(a in e))return!1;if(s&&t==="shallow"&&n==="shallow"){for(a in r?e:i)if(!_n.equ(i[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:i)if(i[a]!==e[a])return!1;if(_n.und(a)){if(o&&i.length===0&&e.length===0||s&&Object.keys(i).length===0&&Object.keys(e).length===0)return!0;if(i!==e)return!1}return!0}};function o9(i){const e={nodes:{},materials:{}};return i&&i.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 a9(i){i.dispose&&i.type!=="Scene"&&i.dispose();for(const e in i)e.dispose==null||e.dispose(),delete i[e]}function Tc(i,e){const t=i;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},i}function cA(i,e){let t=i;if(e.includes("-")){const n=e.split("-"),r=n.pop();return t=n.reduce((s,o)=>s[o],i),{target:t,key:r}}else return{target:t,key:e}}const _2=/-\d+$/;function ty(i,e,t){if(_n.str(t)){if(_2.test(t)){const s=t.replace(_2,""),{target:o,key:a}=cA(i,s);Array.isArray(o[a])||(o[a]=[])}const{target:n,key:r}=cA(i,t);e.__r3f.previousAttach=n[r],n[r]=e}else e.__r3f.previousAttach=t(i,e)}function y2(i,e,t){var n,r;if(_n.str(t)){const{target:s,key:o}=cA(i,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(n=e.__r3f)==null||n.previousAttach==null||n.previousAttach(i,e);(r=e.__r3f)==null||delete r.previousAttach}function KI(i,{children:e,key:t,ref:n,...r},{children:s,key:o,ref:a,...l}={},u=!1){const f=i.__r3f,h=Object.entries(r),p=[];if(u){const v=Object.keys(l);for(let _=0;_<v.length;_++)r.hasOwnProperty(v[_])||h.unshift([v[_],jI+"remove"])}h.forEach(([v,_])=>{var y;if((y=i.__r3f)!=null&&y.primitive&&v==="object"||_n.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 A in r){const S=r[A];A.startsWith(`${v}-`)&&p.push([A,S,!1,A.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 l9=typeof process<"u"&&!1;function ny(i,e){var t;const n=i.__r3f,r=n==null?void 0:n.root,s=r==null||r.getState==null?void 0:r.getState(),{memoized:o,changes:a}=s9(e)?e:KI(i,e),l=n==null?void 0:n.eventCount;i.__r3f&&(i.__r3f.memoizedProps=o);for(let f=0;f<a.length;f++){let[h,p,m,v]=a[f];if(ey(i)){const A="srgb",S="srgb-linear";h==="encoding"?(h="colorSpace",p=p===3001?A:S):h==="outputEncoding"&&(h="outputColorSpace",p=p===3001?A:S)}let _=i,y=_[h];if(v.length&&(y=v.reduce((g,A)=>g[A],i),!(y&&y.set))){const[g,...A]=v.reverse();_=A.reverse().reduce((S,w)=>S[w],i),h=g}if(p===jI+"remove")if(_.constructor){let g=v2.get(_.constructor);g||(g=new _.constructor,v2.set(_.constructor,g)),p=g[h]}else p=0;if(m&&n)p?n.handlers[h]=p:delete n.handlers[h],n.eventCount=Object.keys(n.handlers).length;else if(y&&y.set&&(y.copy||y instanceof cu)){if(Array.isArray(p))y.fromArray?y.fromArray(p):y.set(...p);else if(y.copy&&p&&p.constructor&&(l9?y.constructor.name===p.constructor.name:y.constructor===p.constructor))y.copy(p);else if(p!==void 0){const g=y instanceof He;!g&&y.setScalar?y.setScalar(p):y instanceof cu&&p instanceof cu?y.mask=p.mask:y.set(p),!VI()&&s&&!s.linear&&g&&y.convertSRGBToLinear()}}else if(_[h]=p,_[h]instanceof qt&&_[h].format===ii&&_[h].type===jr&&s){const g=_[h];ey(g)&&ey(s.gl)?g.colorSpace=s.gl.outputColorSpace:g.encoding=s.gl.outputEncoding}Rc(i)}if(n&&n.parent&&i.raycast&&l!==n.eventCount){const f=ng(i).getState().internal,h=f.interaction.indexOf(i);h>-1&&f.interaction.splice(h,1),n.eventCount&&f.interaction.push(i)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(t=i.__r3f)!=null&&t.parent&&fA(i),i}function Rc(i){var e,t;const n=(e=i.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();n&&n.internal.frames===0&&n.invalidate()}function fA(i){i.onUpdate==null||i.onUpdate(i)}function QI(i,e){i.manual||(WI(i)?(i.left=e.width/-2,i.right=e.width/2,i.top=e.height/2,i.bottom=e.height/-2):i.aspect=e.width/e.height,i.updateProjectionMatrix(),i.updateMatrixWorld())}function _0(i){return(i.eventObject||i.object).uuid+"/"+i.index+i.instanceId}function u9(){var i;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return nu.exports.DefaultEventPriority;switch((i=e.event)==null?void 0:i.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return nu.exports.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return nu.exports.ContinuousEventPriority;default:return nu.exports.DefaultEventPriority}}function qI(i,e,t,n){const r=t.get(e);r&&(t.delete(e),t.size===0&&(i.delete(n),r.target.releasePointerCapture(n)))}function c9(i,e){const{internal:t}=i.getState();t.interaction=t.interaction.filter(n=>n!==e),t.initialHits=t.initialHits.filter(n=>n!==e),t.hovered.forEach((n,r)=>{(n.eventObject===e||n.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((n,r)=>{qI(t.capturedMap,e,n,r)})}function f9(i){function e(l){const{internal:u}=i.getState(),f=l.offsetX-u.initialClick[0],h=l.offsetY-u.initialClick[1];return Math.round(Math.sqrt(f*f+h*h))}function t(l){return l.filter(u=>["Move","Over","Enter","Out","Leave"].some(f=>{var h;return(h=u.__r3f)==null?void 0:h.handlers["onPointer"+f]}))}function n(l,u){const f=i.getState(),h=new Set,p=[],m=u?u(f.internal.interaction):f.internal.interaction;for(let g=0;g<m.length;g++){const A=Rd(m[g]);A&&(A.raycaster.camera=void 0)}f.previousRoot||f.events.compute==null||f.events.compute(l,f);function v(g){const A=Rd(g);if(!A||!A.events.enabled||A.raycaster.camera===null)return[];if(A.raycaster.camera===void 0){var S;A.events.compute==null||A.events.compute(l,A,(S=A.previousRoot)==null?void 0:S.getState()),A.raycaster.camera===void 0&&(A.raycaster.camera=null)}return A.raycaster.camera?A.raycaster.intersectObject(g,!0):[]}let _=m.flatMap(v).sort((g,A)=>{const S=Rd(g.object),w=Rd(A.object);return!S||!w?g.distance-A.distance:w.events.priority-S.events.priority||g.distance-A.distance}).filter(g=>{const A=_0(g);return h.has(A)?!1:(h.add(A),!0)});f.events.filter&&(_=f.events.filter(_,f));for(const g of _){let A=g.object;for(;A;){var y;(y=A.__r3f)!=null&&y.eventCount&&p.push({...g,eventObject:A}),A=A.parent}}if("pointerId"in l&&f.internal.capturedMap.has(l.pointerId))for(let g of f.internal.capturedMap.get(l.pointerId).values())h.has(_0(g.intersection))||p.push(g.intersection);return p}function r(l,u,f,h){const p=i.getState();if(l.length){const m={stopped:!1};for(const v of l){const _=Rd(v.object)||p,{raycaster:y,pointer:g,camera:A,internal:S}=_,w=new H(g.x,g.y,0).unproject(A),P=b=>{var N,j;return(N=(j=S.capturedMap.get(b))==null?void 0:j.has(v.eventObject))!=null?N:!1},T=b=>{const N={intersection:v,target:u.target};S.capturedMap.has(b)?S.capturedMap.get(b).set(v.eventObject,N):S.capturedMap.set(b,new Map([[v.eventObject,N]])),u.target.setPointerCapture(b)},I=b=>{const N=S.capturedMap.get(b);N&&qI(S.capturedMap,v.eventObject,N,b)};let D={};for(let b in u){let N=u[b];typeof N!="function"&&(D[b]=N)}let C={...v,...D,pointer:g,intersections:l,stopped:m.stopped,delta:f,unprojectedPoint:w,ray:y.ray,camera:A,stopPropagation(){const b="pointerId"in u&&S.capturedMap.get(u.pointerId);if((!b||b.has(v.eventObject))&&(C.stopped=m.stopped=!0,S.hovered.size&&Array.from(S.hovered.values()).find(N=>N.eventObject===v.eventObject))){const N=l.slice(0,l.indexOf(v));s([...N,v])}},target:{hasPointerCapture:P,setPointerCapture:T,releasePointerCapture:I},currentTarget:{hasPointerCapture:P,setPointerCapture:T,releasePointerCapture:I},nativeEvent:u};if(h(C),m.stopped===!0)break}}return l}function s(l){const{internal:u}=i.getState();for(const f of u.hovered.values())if(!l.length||!l.find(h=>h.object===f.object&&h.index===f.index&&h.instanceId===f.instanceId)){const p=f.eventObject.__r3f,m=p==null?void 0:p.handlers;if(u.hovered.delete(_0(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,u){for(let f=0;f<u.length;f++){const h=u[f].__r3f;h==null||h.handlers.onPointerMissed==null||h.handlers.onPointerMissed(l)}}function a(l){switch(l){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return u=>{const{internal:f}=i.getState();"pointerId"in u&&f.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{f.capturedMap.has(u.pointerId)&&(f.capturedMap.delete(u.pointerId),s([]))})}}return function(f){const{onPointerMissed:h,internal:p}=i.getState();p.lastEvent.current=f;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",y=n(f,m?t:void 0),g=v?e(f):0;l==="onPointerDown"&&(p.initialClick=[f.offsetX,f.offsetY],p.initialHits=y.map(S=>S.eventObject)),v&&!y.length&&g<=2&&(o(f,p.interaction),h&&h(f)),m&&s(y);function A(S){const w=S.eventObject,P=w.__r3f,T=P==null?void 0:P.handlers;if(!!(P!=null&&P.eventCount))if(m){if(T.onPointerOver||T.onPointerEnter||T.onPointerOut||T.onPointerLeave){const I=_0(S),D=p.hovered.get(I);D?D.stopped&&S.stopPropagation():(p.hovered.set(I,S),T.onPointerOver==null||T.onPointerOver(S),T.onPointerEnter==null||T.onPointerEnter(S))}T.onPointerMove==null||T.onPointerMove(S)}else{const I=T[l];I?(!v||p.initialHits.includes(w))&&(o(f,p.interaction.filter(D=>!p.initialHits.includes(D))),I(S)):v&&p.initialHits.includes(w)&&o(f,p.interaction.filter(D=>!p.initialHits.includes(D)))}}r(y,f,g,A)}}return{handlePointer:a}}const d9=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],ZI=i=>!!(i!=null&&i.render),AE=K.exports.createContext(null),h9=(i,e)=>{const t=NI((a,l)=>{const u=new H,f=new H,h=new H;function p(g=l().camera,A=f,S=l().size){const{width:w,height:P,top:T,left:I}=S,D=w/P;A instanceof H?h.copy(A):h.set(...A);const C=g.getWorldPosition(u).distanceTo(h);if(WI(g))return{width:w/g.zoom,height:P/g.zoom,top:T,left:I,factor:1,distance:C,aspect:D};{const b=g.fov*Math.PI/180,N=2*Math.tan(b/2)*C,j=N*(w/P);return{width:j,height:N,top:T,left:I,factor:w/j,distance:C,aspect:D}}}let m;const v=g=>a(A=>({performance:{...A.performance,current:g}})),_=new Re;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)=>i(l(),g),advance:(g,A)=>e(g,A,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new mE,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(A=>({...A,events:{...A.events,...g}})),setSize:(g,A,S,w,P)=>{const T=l().camera,I={width:g,height:A,top:w||0,left:P||0,updateStyle:S};a(D=>({size:I,viewport:{...D.viewport,...p(T,f,I)}}))},setDpr:g=>a(A=>{const S=YI(g);return{viewport:{...A.viewport,dpr:S,initialDpr:A.viewport.initialDpr||S}}}),setFrameloop:(g="always")=>{const A=l().clock;A.stop(),A.elapsedTime=0,g!=="never"&&(A.start(),A.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:K.exports.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,A,S)=>{const w=l().internal;return w.priority=w.priority+(A>0?1:0),w.subscribers.push({ref:g,priority:A,store:S}),w.subscribers=w.subscribers.sort((P,T)=>P.priority-T.priority),()=>{const P=l().internal;P!=null&&P.subscribers&&(P.priority=P.priority-(A>0?1:0),P.subscribers=P.subscribers.filter(T=>T.ref!==g))}}}}}),n=t.getState();let r=n.size,s=n.viewport.dpr,o=n.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:u,gl:f,set:h}=t.getState();if(l.width!==r.width||l.height!==r.height||u.dpr!==s){var p;r=l,s=u.dpr,QI(a,l),f.setPixelRatio(u.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,h(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>i(a)),t};let y0,p9=new Set,m9=new Set,g9=new Set;function iy(i,e){if(!!i.size)for(const{callback:t}of i.values())t(e)}function Pd(i,e){switch(i){case"before":return iy(p9,e);case"after":return iy(m9,e);case"tail":return iy(g9,e)}}let ry,sy;function oy(i,e,t){let n=e.clock.getDelta();for(e.frameloop==="never"&&typeof i=="number"&&(n=i-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=i),ry=e.internal.subscribers,y0=0;y0<ry.length;y0++)sy=ry[y0],sy.ref.current(sy.store.getState(),n,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}function v9(i){let e=!1,t=!1,n,r,s;function o(u){r=requestAnimationFrame(o),e=!0,n=0,Pd("before",u),t=!0;for(const h of i.values()){var f;s=h.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((f=s.gl.xr)!=null&&f.isPresenting)&&(n+=oy(u,s))}if(t=!1,Pd("after",u),n===0)return Pd("tail",u),e=!1,cancelAnimationFrame(r)}function a(u,f=1){var h;if(!u)return i.forEach(p=>a(p.store.getState(),f));(h=u.gl.xr)!=null&&h.isPresenting||!u.internal.active||u.frameloop==="never"||(f>1?u.internal.frames=Math.min(60,u.internal.frames+f):t?u.internal.frames=2:u.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(u,f=!0,h,p){if(f&&Pd("before",u),h)oy(u,h,p);else for(const m of i.values())oy(u,m.store.getState());f&&Pd("after",u)}return{loop:o,invalidate:a,advance:l}}function SE(){const i=K.exports.useContext(AE);if(!i)throw new Error("R3F: Hooks can only be used within the Canvas component!");return i}function Cn(i=t=>t,e){return SE()(i,e)}function ws(i,e=0){const t=SE(),n=t.getState().internal.subscribe,r=XI(i);return hp(()=>n(r,e,t),[e,n,t]),null}const x2=new WeakMap;function $I(i,e){return function(t,...n){let r=x2.get(t);return r||(r=new t,x2.set(t,r)),i&&i(r),Promise.all(n.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,o9(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function na(i,e,t,n){const r=Array.isArray(e)?e:[e],s=GI($I(t,n),[i,...r],{equal:_n.equ});return Array.isArray(e)?s:s[0]}na.preload=function(i,e,t){const n=Array.isArray(e)?e:[e];return Yk($I(t),[i,...n])};na.clear=function(i,e){const t=Array.isArray(e)?e:[e];return Kk([i,...t])};const Sf=new Map,{invalidate:A2,advance:S2}=v9(Sf),{reconciler:Gh,applyProps:Ca}=n9(Sf,u9),wc={objects:"shallow",strict:!1},_9=(i,e)=>{const t=typeof i=="function"?i(e):i;return ZI(t)?t:new YS({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...i})};function y9(i,e){const t=typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement;if(e){const{width:n,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:n,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement&&i.parentElement){const{width:n,height:r,top:s,left:o}=i.parentElement.getBoundingClientRect();return{width:n,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas)return{width:i.width,height:i.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function x9(i){const e=Sf.get(i),t=e==null?void 0:e.fiber,n=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=n||h9(A2,S2),o=t||Gh.createContainer(s,nu.exports.ConcurrentRoot,null,!1,null,"",r,null);e||Sf.set(i,{fiber:o,store:s});let a,l=!1,u;return{configure(f={}){let{gl:h,size:p,scene:m,events:v,onCreated:_,shadows:y=!1,linear:g=!1,flat:A=!1,legacy:S=!1,orthographic:w=!1,frameloop:P="always",dpr:T=[1,2],performance:I,raycaster:D,camera:C,onPointerMissed:b}=f,N=s.getState(),j=N.gl;N.gl||N.set({gl:j=_9(h,i)});let Y=N.raycaster;Y||N.set({raycaster:Y=new yE});const{params:q,...re}=D||{};if(_n.equ(re,Y,wc)||Ca(Y,{...re}),_n.equ(q,Y.params,wc)||Ca(Y,{params:{...Y.params,...q}}),!N.camera||N.camera===u&&!_n.equ(u,C,wc)){u=C;const te=C instanceof ip,ce=te?C:w?new Lu(0,0,0,0,.1,1e3):new oi(75,0,.1,1e3);te||(ce.position.z=5,C&&(Ca(ce,C),("aspect"in C||"left"in C||"right"in C||"bottom"in C||"top"in C)&&(ce.manual=!0,ce.updateProjectionMatrix())),!N.camera&&!(C!=null&&C.rotation)&&ce.lookAt(0,0,0)),N.set({camera:ce}),Y.camera=ce}if(!N.scene){let te;m instanceof Eu?te=m:(te=new Eu,m&&Ca(te,m)),N.set({scene:Tc(te)})}if(!N.xr){var Q;const te=(Fe,ue)=>{const Ee=s.getState();Ee.frameloop!=="never"&&S2(Fe,!0,Ee,ue)},ce=()=>{const Fe=s.getState();Fe.gl.xr.enabled=Fe.gl.xr.isPresenting,Fe.gl.xr.setAnimationLoop(Fe.gl.xr.isPresenting?te:null),Fe.gl.xr.isPresenting||A2(Fe)},_e={connect(){const Fe=s.getState().gl;Fe.xr.addEventListener("sessionstart",ce),Fe.xr.addEventListener("sessionend",ce)},disconnect(){const Fe=s.getState().gl;Fe.xr.removeEventListener("sessionstart",ce),Fe.xr.removeEventListener("sessionend",ce)}};typeof((Q=j.xr)==null?void 0:Q.addEventListener)=="function"&&_e.connect(),N.set({xr:_e})}if(j.shadowMap){const te=j.shadowMap.enabled,ce=j.shadowMap.type;if(j.shadowMap.enabled=!!y,_n.boo(y))j.shadowMap.type=eh;else if(_n.str(y)){var pe;const _e={basic:BP,percentage:ov,soft:eh,variance:Fs};j.shadowMap.type=(pe=_e[y])!=null?pe:eh}else _n.obj(y)&&Object.assign(j.shadowMap,y);(te!==j.shadowMap.enabled||ce!==j.shadowMap.type)&&(j.shadowMap.needsUpdate=!0)}const k=VI();k&&("enabled"in k?k.enabled=!S:"legacyMode"in k&&(k.legacyMode=S)),l||Ca(j,{outputEncoding:g?3e3:3001,toneMapping:A?po:TS}),N.legacy!==S&&N.set(()=>({legacy:S})),N.linear!==g&&N.set(()=>({linear:g})),N.flat!==A&&N.set(()=>({flat:A})),h&&!_n.fun(h)&&!ZI(h)&&!_n.equ(h,j,wc)&&Ca(j,h),v&&!N.events.handlers&&N.set({events:v(s)});const ne=y9(i,p);return _n.equ(ne,N.size,wc)||N.setSize(ne.width,ne.height,ne.updateStyle,ne.top,ne.left),T&&N.viewport.dpr!==YI(T)&&N.setDpr(T),N.frameloop!==P&&N.setFrameloop(P),N.onPointerMissed||N.set({onPointerMissed:b}),I&&!_n.equ(I,N.performance,wc)&&N.set(te=>({performance:{...te.performance,...I}})),a=_,l=!0,this},render(f){return l||this.configure(),Gh.updateContainer(F(A9,{store:s,children:f,onCreated:a,rootElement:i}),o,null,()=>{}),s},unmount(){eB(i)}}}function A9({store:i,children:e,onCreated:t,rootElement:n}){return hp(()=>{const r=i.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),i.getState().events.connected||r.events.connect==null||r.events.connect(n)},[]),F(AE.Provider,{value:i,children:e})}function eB(i,e){const t=Sf.get(i),n=t==null?void 0:t.fiber;if(n){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Gh.updateContainer(null,n,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(),a9(r),Sf.delete(i),e&&e(i)}catch{}},500)})}}function tB(i,e,t){return F(S9,{children:i,container:e,state:t},e.uuid)}function S9({state:i={},children:e,container:t}){const{events:n,size:r,...s}=i,o=SE(),[a]=K.exports.useState(()=>new yE),[l]=K.exports.useState(()=>new Re),u=K.exports.useCallback((h,p)=>{const m={...h};Object.keys(h).forEach(_=>{(d9.includes(_)||h[_]!==p[_]&&p[_])&&delete m[_]});let v;if(p&&r){const _=p.camera;v=h.viewport.getCurrentViewport(_,new H,r),_!==h.camera&&QI(_,r)}return{...m,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...h.events,...p==null?void 0:p.events,...n},size:{...h.size,...r},viewport:{...h.viewport,...v},...s}},[i]),[f]=K.exports.useState(()=>{const h=o.getState();return NI((m,v)=>({...h,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...h.events,...n},size:{...h.size,...r}
3876,...s,set:m,get:v,setEvents:_=>m(y=>({...y,events:{...y.events,..._}}))}))});return K.exports.useEffect(()=>{const h=o.subscribe(p=>f.setState(m=>u(p,m)));return()=>{h()}},[u]),K.exports.useEffect(()=>{f.setState(h=>u(o.getState(),h))},[u]),K.exports.useEffect(()=>()=>{f.destroy()},[]),F(kf,{children:Gh.createPortal(F(AE.Provider,{value:f,children:e}),f,null)})}Gh.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:K.exports.version});function dA(i,e,t){var n,r,s,o,a;e==null&&(e=100);function l(){var f=Date.now()-o;f<e&&f>=0?n=setTimeout(l,e-f):(n=null,t||(a=i.apply(s,r),s=r=null))}var u=function(){s=this,r=arguments,o=Date.now();var f=t&&!n;return n||(n=setTimeout(l,e)),f&&(a=i.apply(s,r),s=r=null),a};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(a=i.apply(s,r),s=r=null,clearTimeout(n),n=null)},u}dA.debounce=dA;var E2=dA;function E9(i){let{debounce:e,scroll:t,polyfill:n,offsetSize:r}=i===void 0?{debounce:0,scroll:!1,offsetSize:!1}:i;const s=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=K.exports.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=K.exports.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=e?typeof e=="number"?e:e.scroll:null,f=e?typeof e=="number"?e:e.resize:null,h=K.exports.useRef(!1);K.exports.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[p,m,v]=K.exports.useMemo(()=>{const A=()=>{if(!l.current.element)return;const{left:S,top:w,width:P,height:T,bottom:I,right:D,x:C,y:b}=l.current.element.getBoundingClientRect(),N={left:S,top:w,width:P,height:T,bottom:I,right:D,x:C,y:b};l.current.element instanceof HTMLElement&&r&&(N.height=l.current.element.offsetHeight,N.width=l.current.element.offsetWidth),Object.freeze(N),h.current&&!T9(l.current.lastBounds,N)&&a(l.current.lastBounds=N)};return[A,f?E2(A,f):A,u?E2(A,u):A]},[a,r,u,f]);function _(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(A=>A.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){!l.current.element||(l.current.resizeObserver=new s(v),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(A=>A.addEventListener("scroll",v,{capture:!0,passive:!0})))}const g=A=>{!A||A===l.current.element||(_(),l.current.element=A,l.current.scrollContainers=nB(A),y())};return M9(v,Boolean(t)),w9(m),K.exports.useEffect(()=>{_(),y()},[t,v,m]),K.exports.useEffect(()=>_,[]),[g,o,p]}function w9(i){K.exports.useEffect(()=>{const e=i;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[i])}function M9(i,e){K.exports.useEffect(()=>{if(e){const t=i;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[i,e])}function nB(i){const e=[];if(!i||i===document.body)return e;const{overflow:t,overflowX:n,overflowY:r}=window.getComputedStyle(i);return[t,n,r].some(s=>s==="auto"||s==="scroll")&&e.push(i),[...e,...nB(i.parentElement)]}const C9=["x","y","top","bottom","left","right","width","height"],T9=(i,e)=>C9.every(t=>i[t]===e[t]);var R9=Object.defineProperty,P9=Object.defineProperties,b9=Object.getOwnPropertyDescriptors,w2=Object.getOwnPropertySymbols,I9=Object.prototype.hasOwnProperty,B9=Object.prototype.propertyIsEnumerable,M2=(i,e,t)=>e in i?R9(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,C2=(i,e)=>{for(var t in e||(e={}))I9.call(e,t)&&M2(i,t,e[t]);if(w2)for(var t of w2(e))B9.call(e,t)&&M2(i,t,e[t]);return i},D9=(i,e)=>P9(i,b9(e)),T2,R2;typeof window<"u"&&(((T2=window.document)==null?void 0:T2.createElement)||((R2=window.navigator)==null?void 0:R2.product)==="ReactNative")?K.exports.useLayoutEffect:K.exports.useEffect;function iB(i,e,t){if(!i)return;if(t(i)===!0)return i;let n=e?i.return:i.child;for(;n;){const r=iB(n,e,t);if(r)return r;n=e?null:n.sibling}}function rB(i){try{return Object.defineProperties(i,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return i}}const P2=console.error;console.error=function(){const i=[...arguments].join("");if((i==null?void 0:i.startsWith("Warning:"))&&i.includes("useContext")){console.error=P2;return}return P2.apply(this,arguments)};const EE=rB(K.exports.createContext(null));class sB extends K.exports.Component{render(){return K.exports.createElement(EE.Provider,{value:this._reactInternals},this.props.children)}}function F9(){const i=K.exports.useContext(EE);if(i===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=K.exports.useId();return K.exports.useMemo(()=>{for(const n of[i,i==null?void 0:i.alternate]){if(!n)continue;
3876const r=iB(n,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[i,e])}function L9(){const i=F9(),[e]=K.exports.useState(()=>new Map);e.clear();let t=i;for(;t;){if(t.type&&typeof t.type=="object"){const r=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;r&&r!==EE&&!e.has(r)&&e.set(r,K.exports.useContext(rB(r)))}t=t.return}return e}function N9(){const i=L9();return K.exports.useMemo(()=>Array.from(i.keys()).reduce((e,t)=>n=>K.exports.createElement(e,null,K.exports.createElement(t.Provider,D9(C2({},n),{value:i.get(t)}))),e=>K.exports.createElement(sB,C2({},e))),[i])}const ay={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 O9(i){const{handlePointer:e}=f9(i);return{priority:1,enabled:!0,compute(t,n,r){n.pointer.set(t.offsetX/n.size.width*2-1,-(t.offsetY/n.size.height)*2+1),n.raycaster.setFromCamera(n.pointer,n.camera)},connected:void 0,handlers:Object.keys(ay).reduce((t,n)=>({...t,[n]:e(n)}),{}),update:()=>{var t;const{events:n,internal:r}=i.getState();(t=r.lastEvent)!=null&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var n;const{set:r,events:s}=i.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((n=s.handlers)!=null?n:[]).forEach(([o,a])=>{const[l,u]=ay[o];t.addEventListener(l,a,{passive:u})})},disconnect:()=>{const{set:t,events:n}=i.getState();if(n.connected){var r;Object.entries((r=n.handlers)!=null?r:[]).forEach(([s,o])=>{if(n&&n.connected instanceof HTMLElement){const[a]=ay[s];n.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const U9=K.exports.forwardRef(function({children:e,fallback:t,resize:n,style:r,gl:s,events:o=O9,eventSource:a,eventPrefix:l,shadows:u,linear:f,flat:h,legacy:p,orthographic:m,frameloop:v,dpr:_,performance:y,raycaster:g,camera:A,scene:S,onPointerMissed:w,onCreated:P,...T},I){K.exports.useMemo(()=>xo(Hk),[]);const D=N9(),[C,b]=E9({scroll:!0,debounce:{scroll:50,resize:0},...n}),N=K.exports.useRef(null),j=K.exports.useRef(null);K.exports.useImperativeHandle(I,()=>N.current);const Y=XI(w),[q,re]=K.exports.useState(!1),[Q,pe]=K.exports.useState(!1);if(q)throw q;if(Q)throw Q;const k=K.exports.useRef(null);return hp(()=>{const te=N.current;b.width>0&&b.height>0&&te&&(k.current||(k.current=x9(te)),k.current.configure({gl:s,events:o,shadows:u,linear:f,flat:h,legacy:p,orthographic:m,frameloop:v,dpr:_,performance:y,raycaster:g,camera:A,scene:S,size:b,onPointerMissed:(...ce)=>Y.current==null?void 0:Y.current(...ce),onCreated:ce=>{ce.events.connect==null||ce.events.connect(a?i9(a)?a.current:a:j.current),l&&ce.setEvents({compute:(_e,Fe)=>{const ue=_e[l+"X"],Ee=_e[l+"Y"];Fe.pointer.set(ue/Fe.size.width*2-1,-(Ee/Fe.size.height)*2+1),Fe.raycaster.setFromCamera(Fe.pointer,Fe.camera)}}),P==null||P(ce)}}),k.current.render(F(D,{children:F(JI,{set:pe,children:F(K.exports.Suspense,{fallback:F(r9,{set:re}),children:e})})})))}),K.exports.useEffect(()=>{const te=N.current;if(te)return()=>eB(te)},[]),F("div",{ref:j,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:a?"none":"auto",...r},...T,children:F("div",{ref:C,style:{width:"100%",height:"100%"},children:F("canvas",{ref:N,style:{display:"block"},children:t})})})}),z9=K.exports.forwardRef(function(e,t){return F(sB,{children:F(U9,{...e,ref:t})})});function bu(){return bu=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},bu.apply(null,arguments)}function k9(i){let e;const t=new Set,n=(u,f)=>{const h=typeof u=="function"?u(e):u;if(h!==e){const p=e;e=f?h:Object.assign({},e,h),t.forEach(m=>m(e,p))}},r=()=>e,s=(u,f=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=f(e);function m(){const v=f(e);
vendor: 16,943 bytes, lines 3876-3957
3876if(!h(p,v)){const _=p;u(p=v,_)}}return t.add(m),()=>t.delete(m)},l={setState:n,getState:r,subscribe:(u,f,h)=>f||h?s(u,f,h):(t.add(u),()=>t.delete(u)),destroy:()=>t.clear()};return e=i(n,r,l),l}const G9=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),b2=G9?K.exports.useEffect:K.exports.useLayoutEffect;function H9(i){const e=typeof i=="function"?k9(i):i,t=(n=e.getState,r=Object.is)=>{const[,s]=K.exports.useReducer(y=>y+1,0),o=e.getState(),a=K.exports.useRef(o),l=K.exports.useRef(n),u=K.exports.useRef(r),f=K.exports.useRef(!1),h=K.exports.useRef();h.current===void 0&&(h.current=n(o));let p,m=!1;(a.current!==o||l.current!==n||u.current!==r||f.current)&&(p=n(o),m=!r(h.current,p)),b2(()=>{m&&(h.current=p),a.current=o,l.current=n,u.current=r,f.current=!1});const v=K.exports.useRef(o);b2(()=>{const y=()=>{try{const A=e.getState(),S=l.current(A);u.current(h.current,S)||(a.current=A,h.current=S,s())}catch{f.current=!0,s()}},g=e.subscribe(y);return e.getState()!==v.current&&y(),g},[]);const _=m?p:h.current;return K.exports.useDebugValue(_),_};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[t,e];return{next(){const r=n.length<=0;return{value:n.shift(),done:r}}}},t}let bd=0;const V9=H9(i=>(Xc.onStart=(e,t,n)=>{i({active:!0,item:e,loaded:t,total:n,progress:(t-bd)/(n-bd)*100})},Xc.onLoad=()=>{i({active:!1})},Xc.onError=e=>i(t=>({errors:[...t.errors,e]})),Xc.onProgress=(e,t,n)=>{t===n&&(bd=n),i({active:!0,item:e,loaded:t,total:n,progress:(t-bd)/(n-bd)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function I2(i,e){if(e===Eb)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(e===Bg||e===NS){let t=i.getIndex();if(t===null){const o=[],a=i.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)o.push(l);i.setIndex(o),t=i.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i}const n=t.count-2,r=[];if(t)if(e===Bg)for(let o=1;o<=n;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<n;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!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=i.clone();return s.setIndex(r),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),i}const W9=parseInt(Bf.replace(/\D+/g,""));var ds=Uint8Array,Da=Uint16Array,hA=Uint32Array,oB=new ds([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]),aB=new ds([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]),X9=new ds([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lB=function(i,e){for(var t=new Da(31),n=0;n<31;++n)t[n]=e+=1<<i[n-1];for(var r=new hA(t[30]),n=1;n<30;++n)for(var s=t[n];s<t[n+1];++s)r[s]=s-t[n]<<5|n;return[t,r]},uB=lB(oB,2),cB=uB[0],J9=uB[1];cB[28]=258,J9[258]=28;var j9=lB(aB,0),Y9=j9[0],pA=new Da(32768);for(var Sn=0;Sn<32768;++Sn){var xa=(Sn&43690)>>>1|(Sn&21845)<<1;xa=(xa&52428)>>>2|(xa&13107)<<2,xa=(xa&61680)>>>4|(xa&3855)<<4,pA[Sn]=((xa&65280)>>>8|(xa&255)<<8)>>>1}var rh=function(i,e,t){for(var n=i.length,r=0,s=new Da(e);r<n;++r)++s[i[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<n;++r)if(i[r])for(var u=r<<4|i[r],f=e-i[r],h=o[i[r]-1]++<<f,p=h|(1<<f)-1;h<=p;++h)a[pA[h]>>>l]=u}else for(a=new Da(n),r=0;r<n;++r)i[r]&&(a[r]=pA[o[i[r]-1]++]>>>15-i[r]);return a},pp=new ds(288);for(var Sn=0;Sn<144;++Sn)pp[Sn]=8;for(var Sn=144;Sn<256;++Sn)pp[Sn]=9;for(var Sn=256;Sn<280;++Sn)pp[Sn]=7;for(var Sn=280;Sn<288;++Sn)pp[Sn]=8;var fB=new ds(32);for(var Sn=0;Sn<32;++Sn)fB[Sn]=5;var K9=rh(pp,9,1),Q9=rh(fB,5,1),ly=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},Bs=function(i,e,t){var n=e/8|0;return(i[n]|i[n+1]<<8)>>(e&7)&t},uy=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},q9=function(i){return(i/8|0)+(i&7&&1)},Z9=function(i,e,t){(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length);var n=new(i instanceof Da?Da:i instanceof hA?hA:ds)(t-e);return n.set(i.subarray(e,t)),n},$9=function(i,e,t){var n=i.length;if(!n||t&&!t.l&&n<5)return e||new ds(0);var r=!e||t,s=!t||t.i;t||(t={}),e||(e=new ds(n*3));var o=function(Ce){var De=e.length;if(Ce>De){var dt=new ds(Math.max(De*2,Ce));dt.set(e),e=dt}},a=t.f||0,l=t.p||0,u=t.b||0,f=t.l,h=t.d,p=t.m,m=t.n,v=n*8;do{if(!f){t.f=a=Bs(i,l,1);var _=Bs(i,l+1,3);if(l+=3,_)if(_==1)f=K9,h=Q9,p=9,m=5;else if(_==2){var S=Bs(i,l,31)+257,w=Bs(i,l+10,15)+4,P=S+Bs(i,l+5,31)+1;l+=14;for(var T=new ds(P),I=new ds(19),D=0;D<w;++D)I[X9[D]]=Bs(i,l+D*3,7);l+=w*3;for(var C=ly(I),b=(1<<C)-1,N=rh(I,C,1),D=0;D<P;){var j=N[Bs(i,l,b)];l+=j&15;var y=j>>>4;if(y<16)T[D++]=y;else{var Y=0,q=0;for(y==16?(q=3+Bs(i,l,3),l+=2,Y=T[D-1]):y==17?(q=3+Bs(i,l,7),l+=3):y==18&&(q=11+Bs(i,l,127),l+=7);q--;)T[D++]=Y}}var re=T.subarray(0,S),Q=T.subarray(S);p=ly(re),m=ly(Q),f=rh(re,p,1),h=rh(Q,m,1)}else throw"invalid block type";else{var y=q9(l)+4,g=i[y-4]|i[y-3]<<8,A=y+g;if(A>n){if(s)throw"unexpected EOF";break}r&&o(u+g),e.set(i.subarray(y,A),u),t.b=u+=g,t.p=l=A*8;continue}if(l>v){if(s)throw"unexpected EOF";break}}r&&o(u+131072);for(var pe=(1<<p)-1,k=(1<<m)-1,ne=l;;ne=l){var Y=f[uy(i,l)&pe],te=Y>>>4;if(l+=Y&15,l>v){if(s)throw"unexpected EOF";break}if(!Y)throw"invalid length/literal";if(te<256)e[u++]=te;else if(te==256){ne=l,f=null;break}else{var ce=te-254;if(te>264){var D=te-257,_e=oB[D];ce=Bs(i,l,(1<<_e)-1)+cB[D],l+=_e}var Fe=h[uy(i,l)&k],ue=Fe>>>4;if(!Fe)throw"invalid distance";l+=Fe&15;var Q=Y9[ue];if(ue>3){var _e=aB[ue];Q+=uy(i,l)&(1<<_e)-1,l+=_e}if(l>v){if(s)throw"unexpected EOF";break}r&&o(u+131072);for(var Ee=u+ce;u<Ee;u+=4)e[u]=e[u-Q],e[u+1]=e[u+1-Q],e[u+2]=e[u+2-Q],e[u+3]=e[u+3-Q];u=Ee}}t.l=f,t.p=ne,t.b=u,f&&(a=1,t.m=p,t.d=h,t.n=m)}while(!a);return u==e.length?e:Z9(e,0,u)},eG=new ds(0),tG=function(i){if((i[0]&15)!=8||i[0]>>>4>7||(i[0]<<8|i[1])%31)throw"invalid zlib data";if(i[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function x0(i,e){return $9((tG(i),i.subarray(2,-4)),e)}var nG=typeof TextDecoder<"u"&&new TextDecoder,iG=0;try{nG.decode(eG,{stream:!0}),iG=1}catch{}const rG=i=>i&&i.isCubeTexture;class sG extends Mn{constructor(e,t){var n,r;const s=rG(e),a=((r=s?(n=e.image[0])==null?void 0:n.width:e.image.width)!=null?r:1024)/4,l=Math.floor(Math.log2(a)),u=Math.pow(2,l),f=3*Math.max(u,16*7),h=4*u,p=[s?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/f}`,`#define CUBEUV_TEXEL_HEIGHT ${1/h}`,`#define CUBEUV_MAX_MIP ${l}.0`],m=` 3877 varying vec3 vWorldPosition; 3878 void main() 3879 { 3880 vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) ); 3881 vWorldPosition = worldPosition.xyz; 3882 3883 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 3884 } 3885 `,v=p.join(` 3886`)+` 3887 #define ENVMAP_TYPE_CUBE_UV 3888 varying vec3 vWorldPosition; 3889 uniform float radius; 3890 uniform float height; 3891 uniform float angle; 3892 #ifdef ENVMAP_TYPE_CUBE 3893 uniform samplerCube map; 3894 #else 3895 uniform sampler2D map; 3896 #endif 3897 // From: https://www.shadertoy.com/view/4tsBD7 3898 float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) 3899 { 3900 float d = dot ( rd, n ); 3901 3902 if( d > 0.0 ) { return 1e6; } 3903 3904 vec3 o = ro - c; 3905 float t = - dot( n, o ) / d; 3906 vec3 q = o + rd * t; 3907 3908 return ( dot( q, q ) < r * r ) ? t : 1e6; 3909 } 3910 // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm 3911 float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) 3912 { 3913 vec3 oc = ro - ce; 3914 float b = dot( oc, rd ); 3915 float c = dot( oc, oc ) - ra * ra; 3916 float h = b * b - c; 3917 3918 if( h < 0.0 ) { return -1.0; } 3919 3920 h = sqrt( h ); 3921 3922 return - b + h; 3923 } 3924 vec3 project() 3925 { 3926 vec3 p = normalize( vWorldPosition ); 3927 vec3 camPos = cameraPosition; 3928 camPos.y -= height; 3929 float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius ); 3930 if( intersection > 0.0 ) { 3931 3932 vec3 h = vec3( 0.0, - height, 0.0 ); 3933 float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius ); 3934 p = ( camPos + min( intersection, intersection2 ) * p ) / radius; 3935 } else { 3936 p = vec3( 0.0, 1.0, 0.0 ); 3937 } 3938 return p; 3939 } 3940 #include <common> 3941 #include <cube_uv_reflection_fragment> 3942 void main() 3943 { 3944 vec3 projectedWorldPosition = project(); 3945 3946 #ifdef ENVMAP_TYPE_CUBE 3947 vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb; 3948 #else 3949 vec3 direction = normalize( projectedWorldPosition ); 3950 vec2 uv = equirectUv( direction ); 3951 vec3 outcolor = texture2D( map, uv ).rgb; 3952 #endif 3953 gl_FragColor = vec4( outcolor, 1.0 ); 3954 #include <tonemapping_fragment> 3955 #include <${parseInt(Bf.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}> 3956 } 3957 `,_={map:{value:e},height:{value:(t==null?void 0:t.height)||15},radius:{value:(t==null?void 0:t.radius)||100}},y=new Nf(1,16),g=new ur({uniforms:_,fragmentShader:v,vertexShader:m,side:fs});super(y,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}}function Og(i){if(typeof TextDecoder<"u")return new TextDecoder().decode(i);let e="";for(let t=0,n=i.length;t<n;t++)e+=String.fromCharCode(i[t]);try{return decodeURIComponent(escape(e))}catch{return e}}const ru="srgb",Jo="srgb-linear",B2=3001,oG=3e3;class wE extends bi{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new fG(t)}),this.register(function(t){return new dG(t)}),this.register(function(t){return new AG(t)}),this.register(function(t){return new SG(t)}),this.register(function(t){return new EG(t)}),this.register(function(t){return new pG(t)}),this.register(function(t){return new mG(t)}),this.register(function(t){return new gG(t)}),this.register(function(t){return new vG(t)}),this.register(function(t){return new cG(t)}),this.register(function(t){return new _G(t)}),this.register(function(t){return new hG(t)}),this.register(function(t){return new xG(t)}),this.register(function(t){return new yG(t)}),this.register(function(t){return new lG(t)}),this.register(function(t){return new wG(t)}),this.register(function(t){return new MG(t)})}load(e,t,n,r){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const u=ja.extractUrlBase(e);o=ja.resolveURL(u,this.path)}else o=ja.extractUrlBase(e);this.manager.itemStart(e);const a=function(u){r?r(u):console.error(u),s.manager.itemError(e),s.manager.itemEnd(e)},l=new Ri(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(u){try{s.parse(u,o,function(f){t(f),s.manager.itemEnd(e)},a)}catch(f){a(f)}},n,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,n,r){let s;const o={},a={};if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(Og(new Uint8Array(e.slice(0,4)))===dB){try{o[Ht.KHR_BINARY_GLTF]=new CG(e)}catch(f){r&&r(f);return}s=JSON.parse(o[Ht.KHR_BINARY_GLTF].content)}else s=JSON.parse(Og(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 zG(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const f=this.pluginCallbacks[u](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 u=0;u<s.extensionsUsed.length;++u){const f=s.extensionsUsed[u],h=s.extensionsRequired||[];switch(f){case Ht.KHR_MATERIALS_UNLIT:o[f]=new uG;break;case Ht.KHR_DRACO_MESH_COMPRESSION:o[f]=new TG(s,this.dracoLoader);break;case Ht.KHR_TEXTURE_TRANSFORM:o[f]=new RG;break;case Ht.KHR_MESH_QUANTIZATION:o[f]=new PG;break;default:h.indexOf(f)>=0&&a[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(n,r)}parseAsync(e,t){const n=this;return new Promise(function(r,s){n.parse(e,t,r,s)})}}function aG(){let i={};return{get:function(e){return i[e]},add:function(e,t){i[e]=t},remove:function(e){delete i[e]},removeAll:function(){i={}}}}const Ht={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 lG{constructor(e){this.parser=e,this.name=Ht.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const s=t[n];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,n="light:"+e;let r=t.cache.get(n);if(r)return r;const s=t.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let u;const f=new He(16777215);l.color!==void 0&&f.setRGB(l.color[0],l.color[1],l.color[2],Jo);const h=l.range!==void 0?l.range:0;switch(l.type){case"directional":u=new hE(f),u.target.position.set(0,0,-1),u.add(u.target);break;case"point":u=new dE(f),u.distance=h;break;case"spot":u=new fE(f),u.distance=h,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,u.angle=l.spot.outerConeAngle,u.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,u.target.position.set(0,0,-1),u.add(u.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return u.position.set(0,0,0),u.decay=2,Lo(u,l),l.intensity!==void 0&&(u.intensity=l.intensity),u.name=t.createUniqueName(l.name||"light_"+e),r=Promise.resolve(u),t.cache.add(n,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,s=n.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return n._getNodeRef(t.cache,a,l)})}}class uG{constructor(){this.name=Ht.KHR_MATERIALS_UNLIT}getMaterialType(){return Xi}extendParams(e,t,n){const r=[];e.color=new He(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;
vendor: 9,531 bytes, line 3957
3957e.color.setRGB(o[0],o[1],o[2],Jo),e.opacity=o[3]}s.baseColorTexture!==void 0&&r.push(n.assignTexture(e,"map",s.baseColorTexture,ru))}return Promise.all(r)}}class cG{constructor(e){this.parser=e,this.name=Ht.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 fG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.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(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Re(a,a)}return Promise.all(s)}}class dG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_DISPERSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}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 hG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.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(n.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(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class pG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new He(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(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,ru)),o.sheenRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class mG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.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(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class gG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.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(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return t.attenuationColor=new He().setRGB(a[0],a[1],a[2],Jo),Promise.all(s)}}class vG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}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 _G{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.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(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return t.specularColor=new He().setRGB(a[0],a[1],a[2],Jo),o.specularColorTexture!==void 0&&s.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,ru)),Promise.all(s)}}class yG{constructor(e){this.parser=e,this.name=Ht.EXT_MATERIALS_BUMP}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.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(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class xG{constructor(e){this.parser=e,this.name=Ht.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Es}extendMaterialParams(e,t){const n=this.parser,r=n.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(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class AG{constructor(e){this.parser=e,this.name=Ht.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const s=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class SG{constructor(e){this.parser=e,this.name=Ht.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.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=n.textureLoader;if(a.uri){const u=n.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return n.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 n.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 EG{constructor(e){this.parser=e,this.name=Ht.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.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=n.textureLoader;if(a.uri){const u=n.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return n.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 n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
3957FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class wG{constructor(e){this.name=Ht.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const r=n.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,u=r.byteLength||0,f=r.count,h=r.byteStride,p=new Uint8Array(a,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(f,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(f*h);return o.decodeGltfBuffer(new Uint8Array(m),f,h,p,r.mode,r.filter),m})})}else return null}}class MG{constructor(e){this.name=Ht.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const r=t.meshes[n.mesh];for(const u of r.primitives)if(u.mode!==ls.TRIANGLES&&u.mode!==ls.TRIANGLE_STRIP&&u.mode!==ls.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=n.extensions[this.name].attributes,a=[],l={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(f=>(l[u]=f,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const f=u.pop(),h=f.isGroup?f.children:[f],p=u[0].count,m=[];for(const v of h){const _=new mt,y=new H,g=new Ci,A=new H(1,1,1),S=new qS(v.geometry,v.material,p);for(let w=0;w<p;w++)l.TRANSLATION&&y.fromBufferAttribute(l.TRANSLATION,w),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,w),l.SCALE&&A.fromBufferAttribute(l.SCALE,w),S.setMatrixAt(w,_.compose(y,g,A));for(const w in l)if(w==="_COLOR_0"){const P=l[w];S.instanceColor=new wu(P.array,P.itemSize,P.normalized)}else w!=="TRANSLATION"&&w!=="ROTATION"&&w!=="SCALE"&&v.geometry.setAttribute(w,l[w]);Zt.prototype.copy.call(S,v),this.parser.assignFinalMaterial(S),m.push(S)}return f.isGroup?(f.clear(),f.add(...m),f):m[0]}))}}const dB="glTF",Id=12,D2={JSON:1313821514,BIN:5130562};class CG{constructor(e){this.name=Ht.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,Id);if(this.header={magic:Og(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==dB)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-Id,r=new DataView(e,Id);let s=0;for(;s<n;){const o=r.getUint32(s,!0);s+=4;const a=r.getUint32(s,!0);if(s+=4,a===D2.JSON){const l=new Uint8Array(e,Id+s,o);this.content=Og(l)}else if(a===D2.BIN){const l=Id+s;this.body=e.slice(l,l+o)}s+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class TG{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Ht.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},u={};for(const f in o){const h=mA[f]||f.toLowerCase();a[h]=o[f]}for(const f in e.attributes){const h=mA[f]||f.toLowerCase();if(o[f]!==void 0){const p=n.accessors[e.attributes[f]],m=nf[p.componentType];u[h]=m.name,l[h]=p.normalized===!0}}return t.getDependency("bufferView",s).then(function(f){return new Promise(function(h,p){r.decodeDracoFile(f,function(m){for(const v in m.attributes){const _=m.attributes[v],y=l[v];y!==void 0&&(_.normalized=y)}h(m)},a,u,Jo,p)})})}}class RG{constructor(){this.name=Ht.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 PG{constructor(){this.name=Ht.KHR_MESH_QUANTIZATION}}class hB extends zf{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)t[o]=n[s+o];return t}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=a*2,u=a*3,f=r-t,h=(n-t)/f,p=h*h,m=p*h,v=e*u,_=v-u,y=-2*m+3*p,g=m-p,A=1-y,S=g-p+h;for(let w=0;w!==a;w++){const P=o[_+w+a],T=o[_+w+l]*f,I=o[v+w+a],D=o[v+w]*f;s[w]=A*P+S*T+y*I+g*D}return s}}
vendor: 56,185 bytes, lines 3957-3962
3957const bG=new Ci;class IG extends hB{interpolate_(e,t,n,r){const s=super.interpolate_(e,t,n,r);return bG.fromArray(s).normalize().toArray(s),s}}const ls={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},nf={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},F2={9728:li,9729:Qt,9984:av,9985:ef,9986:Ql,9987:ps},L2={33071:Kn,33648:gf,10497:As},cy={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},mA={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...W9>=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"},Aa={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},BG={CUBICSPLINE:void 0,LINEAR:_f,STEP:vf},fy={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function DG(i){return i.DefaultMaterial===void 0&&(i.DefaultMaterial=new Uf({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:xs})),i.DefaultMaterial}function Ol(i,e,t){for(const n in t.extensions)i[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function Lo(i,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(i.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function FG(i,e,t){let n=!1,r=!1,s=!1;for(let u=0,f=e.length;u<f;u++){const h=e[u];if(h.POSITION!==void 0&&(n=!0),h.NORMAL!==void 0&&(r=!0),h.COLOR_0!==void 0&&(s=!0),n&&r&&s)break}if(!n&&!r&&!s)return Promise.resolve(i);const o=[],a=[],l=[];for(let u=0,f=e.length;u<f;u++){const h=e[u];if(n){const p=h.POSITION!==void 0?t.getDependency("accessor",h.POSITION):i.attributes.position;o.push(p)}if(r){const p=h.NORMAL!==void 0?t.getDependency("accessor",h.NORMAL):i.attributes.normal;a.push(p)}if(s){const p=h.COLOR_0!==void 0?t.getDependency("accessor",h.COLOR_0):i.attributes.color;l.push(p)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(u){const f=u[0],h=u[1],p=u[2];return n&&(i.morphAttributes.position=f),r&&(i.morphAttributes.normal=h),s&&(i.morphAttributes.color=p),i.morphTargetsRelative=!0,i})}function LG(i,e){if(i.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)i.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(i.morphTargetInfluences.length===t.length){i.morphTargetDictionary={};for(let n=0,r=t.length;n<r;n++)i.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function NG(i){let e;const t=i.extensions&&i.extensions[Ht.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+dy(t.attributes):e=i.indices+":"+dy(i.attributes)+":"+i.mode,i.targets!==void 0)for(let n=0,r=i.targets.length;n<r;n++)e+=":"+dy(i.targets[n]);return e}function dy(i){let e="";const t=Object.keys(i).sort();for(let n=0,r=t.length;n<r;n++)e+=t[n]+":"+i[t[n]]+";";return e}function gA(i){switch(i){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 OG(i){return i.search(/\.jpe?g($|\?)/i)>0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const UG=new mt;class zG{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new aG,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(n=/^((?!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"||n||r&&s<98?this.textureLoader=new dp(this.options.manager):this.textureLoader=new II(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ri(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.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:n,userData:{}};return Ol(s,a,r),Lo(a,r),Promise.all(n._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||[],n=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&&(n[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,n){if(e.refs[t]<=1)return n;const r=n.clone(),s=(o,a)=>{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[u,f]of o.children.entries())s(f,a.children[u])};return s(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s&&n.push(s)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);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(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(s,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Ht.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){n.load(ja.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(n){const r=t.byteLength||0,s=t.byteOffset||0;return n.slice(s,s+r)})}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=cy[r.type],a=nf[r.componentType],l=r.normalized===!0,u=new a(r.count*o);return Promise.resolve(new $t(u,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=cy[r.type],u=nf[r.componentType],f=u.BYTES_PER_ELEMENT,h=f*l,p=r.byteOffset||0,m=r.bufferView!==void 0?n.bufferViews[r.bufferView].byteStride:void 0,v=r.normalized===!0;let _,y;if(m&&m!==h){const g=Math.floor(p/m),A="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let S=t.cache.get(A);S||(_=new u(a,g*m,r.count*m/f),S=new op(_,m/f),t.cache.add(A,S)),y=new tl(S,l,p%m/f,v)}else a===null?_=new u(r.count*l):_=new u(a,p,r.count*l),y=new $t(_,l,v);if(r.sparse!==void 0){const g=cy.SCALAR,A=nf[r.sparse.indices.componentType],S=r.sparse.indices.byteOffset||0,w=r.sparse.values.byteOffset||0,P=new A(o[1],S,r.sparse.count*g),T=new u(o[2],w,r.sparse.count*l);a!==null&&(y=new $t(y.array.slice(),y.itemSize,y.normalized));for(let I=0,D=P.length;I<D;I++){const C=P[I];if(y.setX(C,T[I*l]),l>=2&&y.setY(C,T[I*l+1]),l>=3&&y.setZ(C,T[I*l+2]),l>=4&&y.setW(C,T[I*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return y})}loadTexture(e){const t=this.json,n=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=n.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,n){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,n).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=F2[p.magFilter]||Qt,f.minFilter=F2[p.minFilter]||ps,f.wrapS=L2[p.wrapS]||As,f.wrapT=L2[p.wrapT]||As,r.associations.set(f,{textures:e}),f}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const n=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=n.getDependency("bufferView",o.bufferView).then(function(h){u=!0;const p=new Blob([h],{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(h){return new Promise(function(p,m){let v=p;t.isImageBitmapLoader===!0&&(v=function(_){const y=new qt(_);y.needsUpdate=!0,p(y)}),t.load(ja.resolveURL(h,s.path),v,void 0,m)})}).then(function(h){return u===!0&&a.revokeObjectURL(l),Lo(h,o),h.userData.mimeType=o.mimeType||OG(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[e]=f,f}assignTexture(e,t,n,r){const s=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),s.extensions[Ht.KHR_TEXTURE_TRANSFORM]){const a=n.extensions!==void 0?n.extensions[Ht.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Ht.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&(typeof r=="number"&&(r=r===B2?ru:Jo),"colorSpace"in o?o.colorSpace=r:o.encoding=r===ru?B2:oG),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let n=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:"+n.uuid;let l=this.cache.get(a);l||(l=new _v,Qn.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,l.sizeAttenuation=!1,this.cache.add(a,l)),n=l}else if(e.isLine){const a="LineBasicMaterial:"+n.uuid;let l=this.cache.get(a);l||(l=new qi,Qn.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,this.cache.add(a,l)),n=l}if(r||s||o){let a="ClonedMaterial:"+n.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=n.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(n))),n=l}e.material=n}getMaterialType(){return Uf}loadMaterial(e){const t=this,n=this.json,r=this.extensions,s=n.materials[e];let o;const a={},l=s.extensions||{},u=[];if(l[Ht.KHR_MATERIALS_UNLIT]){const h=r[Ht.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),u.push(h.extendParams(a,s,t))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new He(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],Jo),a.opacity=p[3]}h.baseColorTexture!==void 0&&u.push(t.assignTexture(a,"map",h.baseColorTexture,ru)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),u.push(t.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=fs);const f=s.alphaMode||fy.OPAQUE;if(f===fy.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,f===fy.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==Xi&&(u.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new Re(1,1),s.normalTexture.scale!==void 0)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(s.occlusionTexture!==void 0&&o!==Xi&&(u.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==Xi){const h=s.emissiveFactor;a.emissive=new He().setRGB(h[0],h[1],h[2],Jo)}return s.emissiveTexture!==void 0&&o!==Xi&&u.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,ru)),Promise.all(u).then(function(){const h=new o(a);return s.name&&(h.name=s.name),Lo(h,s),t.associations.set(h,{materials:e}),s.extensions&&Ol(r,h,s),h})}createUniqueName(e){const t=Kt.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function s(a){return n[Ht.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return N2(l,a,t)})}const o=[];for(let a=0,l=e.length;a<l;a++){const u=e[a],f=NG(u),h=r[f];if(h)o.push(h.promise);else{let p;u.extensions&&u.extensions[Ht.KHR_DRACO_MESH_COMPRESSION]?p=s(u):p=N2(new Bt,u,t),r[f]={primitive:u,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,r=this.extensions,s=n.meshes[e],o=s.primitives,a=[];for(let l=0,u=o.length;l<u;l++){const f=o[l].material===void 0?DG(this.cache):this.getDependency("material",o[l].material);a.push(f)}return a.push(t.loadGeometries(o)),Promise.all(a).then(function(l){const u=l.slice(0,l.length-1),f=l[l.length-1],h=[];for(let m=0,v=f.length;m<v;m++){const _=f[m],y=o[m];let g;const A=u[m];if(y.mode===ls.TRIANGLES||y.mode===ls.TRIANGLE_STRIP||y.mode===ls.TRIANGLE_FAN||y.mode===void 0)g=s.isSkinnedMesh===!0?new QS(_,A):new Mn(_,A),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),y.mode===ls.TRIANGLE_STRIP?g.geometry=I2(g.geometry,NS):y.mode===ls.TRIANGLE_FAN&&(g.geometry=I2(g.geometry,Bg));else if(y.mode===ls.LINES)g=new Hs(_,A);else if(y.mode===ls.LINE_STRIP)g=new qo(_,A);else if(y.mode===ls.LINE_LOOP)g=new ZS(_,A);else if(y.mode===ls.POINTS)g=new $S(_,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);Object.keys(g.geometry.morphAttributes).length>0&&LG(g,s),g.name=t.createUniqueName(s.name||"mesh_"+e),Lo(g,s),y.extensions&&Ol(r,g,y),t.assignFinalMaterial(g),h.push(g)}for(let m=0,v=h.length;m<v;m++)t.associations.set(h[m],{meshes:e,primitives:m});if(h.length===1)return s.extensions&&Ol(r,h[0],s),h[0];const p=new lo;s.extensions&&Ol(r,p,s),t.associations.set(p,{meshes:e});for(let m=0,v=h.length;m<v;m++)p.add(h[m]);return p})}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new oi(Vo.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):n.type==="orthographic"&&(t=new Lu(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Lo(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let r=0,s=t.joints.length;r<s;r++)n.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(r){const s=r.pop(),o=r,a=[],l=[];for(let u=0,f=o.length;u<f;u++){const h=o[u];if(h){a.push(h);const p=new mt;s!==null&&p.fromArray(s.array,u*16),l.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[u])}return new ap(a,l)})}loadAnimation(e){const t=this.json,n=this,r=t.animations[e],s=r.name?r.name:"animation_"+e,o=[],a=[],l=[],u=[],f=[];for(let h=0,p=r.channels.length;h<p;h++){const m=r.channels[h],v=r.samplers[m.sampler],_=m.target,y=_.node,g=r.parameters!==void 0?r.parameters[v.input]:v.input,A=r.parameters!==void 0?r.parameters[v.output]:v.output;_.node!==void 0&&(o.push(this.getDependency("node",y)),a.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",A)),u.push(v),f.push(_))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(u),Promise.all(f)]).then(function(h){const p=h[0],m=h[1],v=h[2],_=h[3],y=h[4],g=[];for(let A=0,S=p.length;A<S;A++){const w=p[A],P=m[A],T=v[A],I=_[A],D=y[A];if(w===void 0)continue;w.updateMatrix&&w.updateMatrix();const C=n._createAnimationTracks(w,P,T,I,D);if(C)for(let b=0;b<C.length;b++)g.push(C[b])}return new Af(s,void 0,g)})}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return r.mesh===void 0?null:n.getDependency("mesh",r.mesh).then(function(s){const o=n._getNodeRef(n.meshCache,r.mesh,s);return r.weights!==void 0&&o.traverse(function(a){if(!!a.isMesh)for(let l=0,u=r.weights.length;l<u;l++)a.morphTargetInfluences[l]=r.weights[l]}),o})}loadNode(e){const t=this.json,n=this,r=t.nodes[e],s=n._loadNodeShallow(e),o=[],a=r.children||[];for(let u=0,f=a.length;u<f;u++)o.push(n.getDependency("node",a[u]));const l=r.skin===void 0?Promise.resolve(null):n.getDependency("skin",r.skin);return Promise.all([s,Promise.all(o),l]).then(function(u){const f=u[0],h=u[1],p=u[2];p!==null&&f.traverse(function(m){!m.isSkinnedMesh||m.bind(p,UG)});for(let m=0,v=h.length;m<v;m++)f.add(h[m]);return f})}_loadNodeShallow(e){const t=this.json,n=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(u){return u.createNodeMesh&&u.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(r.getDependency("camera",s.camera).then(function(u){return r._getNodeRef(r.cameraCache,s.camera,u)})),r._invokeAll(function(u){return u.createNodeAttachment&&u.createNodeAttachment(e)}).forEach(function(u){a.push(u)}),this.nodeCache[e]=Promise.all(a).then(function(u){let f;if(s.isBone===!0?f=new vv:u.length>1?f=new lo:u.length===1?f=u[0]:f=new Zt,f!==u[0])for(let h=0,p=u.length;h<p;h++)f.add(u[h]);if(s.name&&(f.userData.name=s.name,f.name=o),Lo(f,s),s.extensions&&Ol(n,f,s),s.matrix!==void 0){const h=new mt;h.fromArray(s.matrix),f.applyMatrix4(h)}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,n=this.json.scenes[e],r=this,s=new lo;n.name&&(s.name=r.createUniqueName(n.name)),Lo(s,n),n.extensions&&Ol(t,s,n);const o=n.nodes||[],a=[];for(let l=0,u=o.length;l<u;l++)a.push(r.getDependency("node",o[l]));return Promise.all(a).then(function(l){for(let f=0,h=l.length;f<h;f++)s.add(l[f]);const u=f=>{const h=new Map;for(const[p,m]of r.associations)(p instanceof Qn||p instanceof qt)&&h.set(p,m);return f.traverse(p=>{const m=r.associations.get(p);m!=null&&h.set(p,m)}),h};return r.associations=u(s),s})}_createAnimationTracks(e,t,n,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];Aa[s.path]===Aa.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let u;switch(Aa[s.path]){case Aa.weights:u=Tu;break;case Aa.rotation:u=Ru;break;case Aa.position:case Aa.scale:u=Pu;break;default:switch(n.itemSize){case 1:u=Tu;break;case 2:case 3:default:u=Pu;break}break}const f=r.interpolation!==void 0?BG[r.interpolation]:_f,h=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p<m;p++){const v=new u(l[p]+"."+Aa[s.path],t.array,h,f);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(v),o.push(v)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=gA(t.constructor),r=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)r[s]=t[s]*n;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const r=this instanceof Ru?IG:hB;return new r(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function kG(i,e,t){const n=e.attributes,r=new ji;if(n.POSITION!==void 0){const a=t.json.accessors[n.POSITION],l=a.min,u=a.max;if(l!==void 0&&u!==void 0){if(r.set(new H(l[0],l[1],l[2]),new H(u[0],u[1],u[2])),a.normalized){const f=gA(nf[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 H,l=new H;for(let u=0,f=s.length;u<f;u++){const h=s[u];if(h.POSITION!==void 0){const p=t.json.accessors[h.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 _=gA(nf[p.componentType]);l.multiplyScalar(_)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(a)}i.boundingBox=r;const o=new Ti;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,i.boundingSphere=o}function N2(i,e,t){const n=e.attributes,r=[];function s(o,a){return t.getDependency("accessor",o).then(function(l){i.setAttribute(a,l)})}for(const o in n){const a=mA[o]||o.toLowerCase();a in i.attributes||r.push(s(n[o],a))}if(e.indices!==void 0&&!i.index){const o=t.getDependency("accessor",e.indices).then(function(a){i.setIndex(a)});r.push(o)}return Lo(i,e),kG(i,e,t),Promise.all(r).then(function(){return e.targets!==void 0?FG(i,e.targets,t):i})}class GG extends uE{constructor(e){super(e),this.type=vi}parse(e){const o=function(D,C){switch(D){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(C||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(C||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(C||""));default:case 4:throw new Error("THREE.RGBELoader: Memory Error: "+(C||""))}},f=` 3958`,h=function(D,C,b){C=C||1024;let j=D.pos,Y=-1,q=0,re="",Q=String.fromCharCode.apply(null,new Uint16Array(D.subarray(j,j+128)));for(;0>(Y=Q.indexOf(f))&&q<C&&j<D.byteLength;)re+=Q,q+=Q.length,j+=128,Q+=String.fromCharCode.apply(null,new Uint16Array(D.subarray(j,j+128)));return-1<Y?(b!==!1&&(D.pos+=q+Y+1),re+Q.slice(0,Y)):!1},p=function(D){const C=/^#\?(\S+)/,b=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,N=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,j=/^\s*FORMAT=(\S+)\s*$/,Y=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,q={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let re,Q;for((D.pos>=D.byteLength||!(re=h(D)))&&o(1,"no header found"),(Q=re.match(C))||o(3,"bad initial token"),q.valid|=1,q.programtype=Q[1],q.string+=re+` 3959`;re=h(D),re!==!1;){if(q.string+=re+` 3960`,re.charAt(0)==="#"){q.comments+=re+` 3961`;continue}if((Q=re.match(b))&&(q.gamma=parseFloat(Q[1])),(Q=re.match(N))&&(q.exposure=parseFloat(Q[1])),(Q=re.match(j))&&(q.valid|=2,q.format=Q[1]),(Q=re.match(Y))&&(q.valid|=4,q.height=parseInt(Q[1],10),q.width=parseInt(Q[2],10)),q.valid&2&&q.valid&4)break}return q.valid&2||o(3,"missing format specifier"),q.valid&4||o(3,"missing image size specifier"),q},m=function(D,C,b){const N=C;if(N<8||N>32767||D[0]!==2||D[1]!==2||D[2]&128)return new Uint8Array(D);N!==(D[2]<<8|D[3])&&o(3,"wrong scanline width");const j=new Uint8Array(4*C*b);j.length||o(4,"unable to allocate buffer space");let Y=0,q=0;const re=4*N,Q=new Uint8Array(4),pe=new Uint8Array(re);let k=b;for(;k>0&&q<D.byteLength;){q+4>D.byteLength&&o(1),Q[0]=D[q++],Q[1]=D[q++],Q[2]=D[q++],Q[3]=D[q++],(Q[0]!=2||Q[1]!=2||(Q[2]<<8|Q[3])!=N)&&o(3,"bad rgbe scanline format");let ne=0,te;for(;ne<re&&q<D.byteLength;){te=D[q++];const _e=te>128;if(_e&&(te-=128),(te===0||ne+te>re)&&o(3,"bad scanline data"),_e){const Fe=D[q++];for(let ue=0;ue<te;ue++)pe[ne++]=Fe}else pe.set(D.subarray(q,q+te),ne),ne+=te,q+=te}const ce=N;for(let _e=0;_e<ce;_e++){let Fe=0;j[Y]=pe[_e+Fe],Fe+=N,j[Y+1]=pe[_e+Fe],Fe+=N,j[Y+2]=pe[_e+Fe],Fe+=N,j[Y+3]=pe[_e+Fe],Y+=4}k--}return j},v=function(D,C,b,N){const j=D[C+3],Y=Math.pow(2,j-128)/255;b[N+0]=D[C+0]*Y,b[N+1]=D[C+1]*Y,b[N+2]=D[C+2]*Y,b[N+3]=1},_=function(D,C,b,N){const j=D[C+3],Y=Math.pow(2,j-128)/255;b[N+0]=eu.toHalfFloat(Math.min(D[C+0]*Y,65504)),b[N+1]=eu.toHalfFloat(Math.min(D[C+1]*Y,65504)),b[N+2]=eu.toHalfFloat(Math.min(D[C+2]*Y,65504)),b[N+3]=eu.toHalfFloat(1)},y=new Uint8Array(e);y.pos=0;const g=p(y),A=g.width,S=g.height,w=m(y.subarray(y.pos),A,S);let P,T,I;switch(this.type){case Nn:I=w.length/4;const D=new Float32Array(I*4);for(let b=0;b<I;b++)v(w,b*4,D,b*4);P=D,T=Nn;break;case vi:I=w.length/4;const C=new Uint16Array(I*4);for(let b=0;b<I;b++)_(w,b*4,C,b*4);P=C,T=vi;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:A,height:S,data:P,header:g.string,gamma:g.gamma,exposure:g.exposure,type:T}}setDataType(e){return this.type=e,this}load(e,t,n,r){function s(o,a){switch(o.type){case Nn:case vi:"colorSpace"in o?o.colorSpace="srgb-linear":o.encoding=3e3,o.minFilter=Qt,o.magFilter=Qt,o.generateMipmaps=!1,o.flipY=!0;break}t&&t(o,a)}return super.load(e,s,n,r)}}const Bd="colorSpace"in new qt;class HG extends uE{constructor(e){super(e),this.type=vi}parse(e){const C=Math.pow(2.7182818,2.2);function b(L,z){for(var R=0,U=0;U<65536;++U)(U==0||L[U>>3]&1<<(U&7))&&(z[R++]=U);for(var V=R-1;R<65536;)z[R++]=0;return V}function N(L){for(var z=0;z<16384;z++)L[z]={},L[z].len=0,L[z].lit=0,L[z].p=null}const j={l:0,c:0,lc:0};function Y(L,z,R,U,V){for(;R<L;)z=z<<8|_t(U,V),R+=8;R-=L,j.l=z>>R&(1<<L)-1,j.c=z,j.lc=R}const q=new Array(59);function re(L){for(var z=0;z<=58;++z)q[z]=0;for(var z=0;z<65537;++z)q[L[z]]+=1;for(var R=0,z=58;z>0;--z){var U=R+q[z]>>1;q[z]=R,R=U}for(var z=0;z<65537;++z){var V=L[z];V>0&&(L[z]=V|q[V]++<<6)}}function Q(L,z,R,U,V,W,J){for(var oe=R,de=0,me=0;V<=W;V++){if(oe.value-R.value>U)return!1;Y(6,de,me,L,oe);var ge=j.l;if(de=j.c,me=j.lc,J[V]=ge,ge==63){if(oe.value-R.value>U)throw"Something wrong with hufUnpackEncTable";Y(8,de,me,L,oe);var ye=j.l+6;if(de=j.c,me=j.lc,V+ye>W+1)throw"Something wrong with hufUnpackEncTable";for(;ye--;)J[V++]=0;V--}else if(ge>=59){var ye=ge-59+2;if(V+ye>W+1)throw"Something wrong with hufUnpackEncTable";for(;ye--;)J[V++]=0;V--}}re(J)}function pe(L){return L&63}function k(L){return L>>6}function ne(L,z,R,U){for(;z<=R;z++){var V=k(L[z]),W=pe(L[z]);if(V>>W)throw"Invalid table entry";if(W>14){var J=U[V>>W-14];if(J.len)throw"Invalid table entry";if(J.lit++,J.p){var oe=J.p;J.p=new Array(J.lit);for(var de=0;de<J.lit-1;++de)J.p[de]=oe[de]}else J.p=new Array(1);J.p[J.lit-1]=z}else if(W)for(var me=0,de=1<<14-W;de>0;de--){var J=U[(V<<14-W)+me];if(J.len||J.p)throw"Invalid table entry";J.len=W,J.lit=z,me++}}return!0}const te={c:0,lc:0};function ce(L,z,R,U){L=L<<8|_t(R,U),z+=8,te.c=L,te.lc=z}const _e={c:0,lc:0};function Fe(L,z,R,U,V,W,J,oe,de,me){if(L==z){U<8&&(ce(R,U,V,J),R=te.c,U=te.lc),U-=8;var ge=R>>U,ge=new Uint8Array([ge])[0];if(de.value+ge>me)return!1;for(var ye=oe[de.value-1];ge-- >0;)oe[de.value++]=ye}else if(de.value<me)oe[de.value++]=L;else return!1;_e.c=R,_e.lc=U}function ue(L){return L&65535}function Ee(L){var z=ue(L);return z>32767?z-65536:z}const Ce={a:0,b:0};function De(L,z){var R=Ee(L),U=Ee(z),V=U,W=R+(V&1)+(V>>1),J=W,oe=W-V;Ce.a=J,Ce.b=oe}function dt(L,z){var R=ue(L),U=ue(z),V=R-(U>>1)&65535,W=U+V-32768&65535;Ce.a=W,Ce.b=V}function At(L,z,R,U,V,W,J){for(var oe=J<16384,de=R>V?V:R,me=1,ge;me<=de;)me<<=1;for(me>>=1,ge=me,me>>=1;me>=1;){for(var ye=0,qe=ye+W*(V-ge),Be=W*me,We=W*ge,rt=U*me,at=U*ge,Rt,lt,ze,gt;ye<=qe;ye+=We){for(var ct=ye,Gt=ye+U*(R-ge);ct<=Gt;ct+=at){var Pt=ct+rt,Jt=ct+Be,qn=Jt+rt;oe?(De(L[ct+z],L[Jt+z]),Rt=Ce.a,ze=Ce.b,De(L[Pt+z],L[qn+z]),lt=Ce.a,gt=Ce.b,De(Rt,lt),L[ct+z]=Ce.a,L[Pt+z]=Ce.b,De(ze,gt),L[Jt+z]=Ce.a,L[qn+z]=Ce.b):(dt(L[ct+z],L[Jt+z]),Rt=Ce.a,ze=Ce.b,dt(L[Pt+z],L[qn+z]),lt=Ce.a,gt=Ce.b,dt(Rt,lt),L[ct+z]=Ce.a,L[Pt+z]=Ce.b,dt(ze,gt),L[Jt+z]=Ce.a,L[qn+z]=Ce.b)}if(R&me){var Jt=ct+Be;oe?De(L[ct+z],L[Jt+z]):dt(L[ct+z],L[Jt+z]),Rt=Ce.a,L[Jt+z]=Ce.b,L[ct+z]=Rt}}if(V&me)for(var ct=ye,Gt=ye+U*(R-ge);ct<=Gt;ct+=at){var Pt=ct+rt;oe?De(L[ct+z],L[Pt+z]):dt(L[ct+z],L[Pt+z]),Rt=Ce.a,L[Pt+z]=Ce.b,L[ct+z]=Rt}ge=me,me>>=1}return ye}function it(L,z,R,U,V,W,J,oe,de,me){for(var ge=0,ye=0,qe=oe,Be=Math.trunc(V.value+(W+7)/8);V.value<Be;)for(ce(ge,ye,R,V),ge=te.c,ye=te.lc;ye>=14;){var We=ge>>ye-14&16383,rt=z[We];if(rt.len)ye-=rt.len,Fe(rt.lit,J,ge,ye,R,U,V,de,me,qe),ge=_e.c,ye=_e.lc;else{if(!rt.p)throw"hufDecode issues";var at;for(at=0;at<rt.lit;at++){for(var Rt=pe(L[rt.p[at]]);ye<Rt&&V.value<Be;)ce(ge,ye,R,V),ge=te.c,ye=te.lc;if(ye>=Rt&&k(L[rt.p[at]])==(ge>>ye-Rt&(1<<Rt)-1)){ye-=Rt,Fe(rt.p[at],J,ge,ye,R,U,V,de,me,qe),ge=_e.c,ye=_e.lc;break}}if(at==rt.lit)throw"hufDecode issues"}}var lt=8-W&7;for(ge>>=lt,ye-=lt;ye>0;){var rt=z[ge<<14-ye&16383];if(rt.len)ye-=rt.len,Fe(rt.lit,J,ge,ye,R,U,V,de,me,qe),ge=_e.c,ye=_e.lc;else throw"hufDecode issues"}return!0}function Z(L,z,R,U,V,W){var J={value:0},oe=R.value,de=Ue(z,R),me=Ue(z,R);R.value+=4;var ge=Ue(z,R);if(R.value+=4,de<0||de>=65537||me<0||me>=65537)throw"Something wrong with HUF_ENCSIZE";var ye=new Array(65537),qe=new Array(16384);N(qe);var Be=U-(R.value-oe);if(Q(L,z,R,Be,de,me,ye),ge>8*(U-(R.value-oe)))throw"Something wrong with hufUncompress";ne(ye,de,me,qe),it(ye,qe,L,z,R,ge,me,W,V,J)}function Pe(L,z,R){for(var U=0;U<R;++U)z[U]=L[z[U]]}function le(L){for(var z=1;z<L.length;z++){var R=L[z-1]+L[z]-128;L[z]=R}}function Me(L,z){for(var R=0,U=Math.floor((L.length+1)/2),V=0,W=L.length-1;!(V>W||(z[V++]=L[R++],V>W));)z[V++]=L[U++]}function xe(L){for(var z=L.byteLength,R=new Array,U=0,V=new DataView(L);z>0;){var W=V.getInt8(U++);if(W<0){var J=-W;z-=J+1;for(var oe=0;oe<J;oe++)R.push(V.getUint8(U++))}else{var J=W;z-=2;for(var de=V.getUint8(U++),oe=0;oe<J+1;oe++)R.push(de)}}return R}function we(L,z,R,U,V,W){var Pt=new DataView(W.buffer),J=R[L.idx[0]].width,oe=R[L.idx[0]].height,de=3,me=Math.floor(J/8),ge=Math.ceil(J/8),ye=Math.ceil(oe/8),qe=J-(ge-1)*8,Be=oe-(ye-1)*8,We={value:0},rt=new Array(de),at=new Array(de),Rt=new Array(de),lt=new Array(de),ze=new Array(de);for(let jt=0;jt<de;++jt)ze[jt]=z[L.idx[jt]],rt[jt]=jt<1?0:rt[jt-1]+ge*ye,at[jt]=new Float32Array(64),Rt[jt]=new Uint16Array(64),lt[jt]=new Uint16Array(ge*64);for(let jt=0;jt<ye;++jt){var gt=8;jt==ye-1&&(gt=Be);var ct=8;for(let tn=0;tn<ge;++tn){tn==ge-1&&(ct=qe);for(let Yt=0;Yt<de;++Yt)Rt[Yt].fill(0),Rt[Yt][0]=V[rt[Yt]++],Oe(We,U,Rt[Yt]),Je(Rt[Yt],at[Yt]),ke(at[Yt]);G(at);for(let Yt=0;Yt<de;++Yt)O(at[Yt],lt[Yt],tn*64)}let rn=0;for(let tn=0;tn<de;++tn){const Yt=R[L.idx[tn]].type;for(let dn=8*jt;dn<8*jt+gt;++dn){rn=ze[tn][dn];for(let Ao=0;Ao<me;++Ao){const er=Ao*64+(dn&7)*8;Pt.setUint16(rn+0*2*Yt,lt[tn][er+0],!0),Pt.setUint16(rn+1*2*Yt,lt[tn][er+1],!0),Pt.setUint16(rn+2*2*Yt,lt[tn][er+2],!0),Pt.setUint16(rn+3*2*Yt,lt[tn][er+3],!0),Pt.setUint16(rn+4*2*Yt,lt[tn][er+4],!0),Pt.setUint16(rn+5*2*Yt,lt[tn][er+5],!0),Pt.setUint16(rn+6*2*Yt,lt[tn][er+6],!0),Pt.setUint16(rn+7*2*Yt,lt[tn][er+7],!0),rn+=8*2*Yt}}if(me!=ge)for(let dn=8*jt;dn<8*jt+gt;++dn){const Ao=ze[tn][dn]+8*me*2*Yt,er=me*64+(dn&7)*8;for(let Ys=0;Ys<ct;++Ys)Pt.setUint16(Ao+Ys*2*Yt,lt[tn][er+Ys],!0)}}}for(var Gt=new Uint16Array(J),Pt=new DataView(W.buffer),Jt=0;Jt<de;++Jt){R[L.idx[Jt]].decoded=!0;var qn=R[L.idx[Jt]].type;if(R[Jt].type==2)for(var zt=0;zt<oe;++zt){const jt=ze[Jt][zt];for(var gn=0;gn<J;++gn)Gt[gn]=Pt.getUint16(jt+gn*2*qn,!0);for(var gn=0;gn<J;++gn)Pt.setFloat32(jt+gn*2*qn,se(Gt[gn]),!0)}}}function Oe(L,z,R){for(var U,V=1;V<64;)U=z[L.value],U==65280?V=64:U>>8==255?V+=U&255:(R[V]=U,V++),L.value++}function Je(L,z){z[0]=se(L[0]),z[1]=se(L[1]),z[2]=se(L[5]),z[3]=se(L[6]),z[4]=se(L[14]),z[5]=se(L[15]),z[6]=se(L[27]),z[7]=se(L[28]),z[8]=se(L[2]),z[9]=se(L[4]),z[10]=se(L[7]),z[11]=se(L[13]),z[12]=se(L[16]),z[13]=se(L[26]),z[14]=se(L[29]),z[15]=se(L[42]),z[16]=se(L[3]),z[17]=se(L[8]),z[18]=se(L[12]),z[19]=se(L[17]),z[20]=se(L[25]),z[21]=se(L[30]),z[22]=se(L[41]),z[23]=se(L[43]),z[24]=se(L[9]),z[25]=se(L[11]),z[26]=se(L[18]),z[27]=se(L[24]),z[28]=se(L[31]),z[29]=se(L[40]),z[30]=se(L[44]),z[31]=se(L[53]),z[32]=se(L[10]),z[33]=se(L[19]),z[34]=se(L[23]),z[35]=se(L[32]),z[36]=se(L[39]),z[37]=se(L[45]),z[38]=se(L[52]),z[39]=se(L[54]),z[40]=se(L[20]),z[41]=se(L[22]),z[42]=se(L[33]),z[43]=se(L[38]),z[44]=se(L[46]),z[45]=se(L[51]),z[46]=se(L[55]),z[47]=se(L[60]),z[48]=se(L[21]),z[49]=se(L[34]),z[50]=se(L[37]),z[51]=se(L[47]),z[52]=se(L[50]),z[53]=se(L[56]),z[54]=se(L[59]),z[55]=se(L[61]),z[56]=se(L[35]),z[57]=se(L[36]),z[58]=se(L[48]),z[59]=se(L[49]),z[60]=se(L[57]),z[61]=se(L[58]),z[62]=se(L[62]),z[63]=se(L[63])}function ke(L){const z=.5*Math.cos(.7853975),R=.5*Math.cos(3.14159/16),U=.5*Math.cos(3.14159/8),V=.5*Math.cos(3*3.14159/16),W=.5*Math.cos(5*3.14159/16),J=.5*Math.cos(3*3.14159/8),oe=.5*Math.cos(7*3.14159/16);for(var de=new Array(4),me=new Array(4),ge=new Array(4),ye=new Array(4),qe=0;qe<8;++qe){var Be=qe*8;de[0]=U*L[Be+2],de[1]=J*L[Be+2],de[2]=U*L[Be+6],de[3]=J*L[Be+6],me[0]=R*L[Be+1]+V*L[Be+3]+W*L[Be+5]+oe*L[Be+7],me[1]=V*L[Be+1]-oe*L[Be+3]-R*L[Be+5]-W*L[Be+7],me[2]=W*L[Be+1]-R*L[Be+3]+oe*L[Be+5]+V*L[Be+7],me[3]=oe*L[Be+1]-W*L[Be+3]+V*L[Be+5]-R*L[Be+7],ge[0]=z*(L[Be+0]+L[Be+4]),ge[3]=z*(L[Be+0]-L[Be+4]),ge[1]=de[0]+de[3],ge[2]=de[1]-de[2],ye[0]=ge[0]+ge[1],ye[1]=ge[3]+ge[2],ye[2]=ge[3]-ge[2],ye[3]=ge[0]-ge[1],L[Be+0]=ye[0]+me[0],L[Be+1]=ye[1]+me[1],L[Be+2]=ye[2]+me[2],L[Be+3]=ye[3]+me[3],L[Be+4]=ye[3]-me[3],L[Be+5]=ye[2]-me[2],L[Be+6]=ye[1]-me[1],L[Be+7]=ye[0]-me[0]}for(var We=0;We<8;++We)de[0]=U*L[16+We],de[1]=J*L[16+We],de[2]=U*L[48+We],de[3]=J*L[48+We],me[0]=R*L[8+We]+V*L[24+We]+W*L[40+We]+oe*L[56+We],me[1]=V*L[8+We]-oe*L[24+We]-R*L[40+We]-W*L[56+We],me[2]=W*L[8+We]-R*L[24+We]+oe*L[40+We]+V*L[56+We],me[3]=oe*L[8+We]-W*L[24+We]+V*L[40+We]-R*L[56+We],ge[0]=z*(L[We]+L[32+We]),ge[3]=z*(L[We]-L[32+We]),ge[1]=de[0]+de[3],ge[2]=de[1]-de[2],ye[0]=ge[0]+ge[1],ye[1]=ge[3]+ge[2],ye[2]=ge[3]-ge[2],ye[3]=ge[0]-ge[1],L[0+We]=ye[0]+me[0],L[8+We]=ye[1]+me[1],L[16+We]=ye[2]+me[2],L[24+We]=ye[3]+me[3],L[32+We]=ye[3]-me[3],L[40+We]=ye[2]-me[2],L[48+We]=ye[1]-me[1],L[56+We]=ye[0]-me[0]}function G(L){for(var z=0;z<64;++z){var R=L[0][z],U=L[1][z],V=L[2][z];L[0][z]=R+1.5747*V,L[1][z]=R-.1873*U-.4682*V,L[2][z]=R+1.8556*U}}function O(L,z,R){for(var U=0;U<64;++U)z[R+U]=eu.toHalfFloat(fe(L[U]))}function fe(L){return L<=1?Math.sign(L)*Math.pow(Math.abs(L),2.2):Math.sign(L)*Math.pow(C,Math.abs(L)-1)}function Te(L){return new DataView(L.array.buffer,L.offset.value,L.size)}function Se(L){var z=L.viewer.buffer.slice(L.offset.value,L.offset.value+L.size),R=new Uint8Array(xe(z)),U=new Uint8Array(R.length);return le(R),Me(R,U),new DataView(U.buffer)}function be(L){var z=L.array.slice(L.offset.value,L.offset.value+L.size),R=x0(z),U=new Uint8Array(R.length);return le(R),Me(R,U),new DataView(U.buffer)}function st(L){for(var z=L.viewer,R={value:L.offset.value},U=new Uint16Array(L.width*L.scanlineBlockSize*(L.channels*L.type)),V=new Uint8Array(8192),W=0,J=new Array(L.channels),oe=0;oe<L.channels;oe++)J[oe]={},J[oe].start=W,J[oe].end=J[oe].start,J[oe].nx=L.width,J[oe].ny=L.lines,J[oe].size=L.type,W+=J[oe].nx*J[oe].ny*J[oe].size;var de=Ie(z,R),me=Ie(z,R);if(me>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(de<=me)for(var oe=0;oe<me-de+1;oe++)V[oe+de]=Ct(z,R);var ge=new Uint16Array(65536),ye=b(V,ge),qe=Ue(z,R);Z(L.array,z,R,qe,U,W);for(var oe=0;oe<L.channels;++oe)for(var Be=J[oe],We=0;We<J[oe].size;++We)At(U,Be.start+We,Be.nx,Be.size,Be.ny,Be.nx*Be.size,ye);Pe(ge,U,W);for(var rt=0,at=new Uint8Array(U.buffer.byteLength),Rt=0;Rt<L.lines;Rt++)for(var lt=0;lt<L.channels;lt++){var Be=J[lt],ze=Be.nx*Be.size,gt=new Uint8Array(U.buffer,Be.end*2,ze*2);at.set(gt,rt),rt+=ze*2,Be.end+=ze}return new DataView(at.buffer)}function Le(L){var z=L.array.slice(L.offset.value,L.offset.value+L.size),R=x0(z);const U=L.lines*L.channels*L.width,V=L.type==1?new Uint16Array(U):new Uint32Array(U);let W=0,J=0;const oe=new Array(4);for(let de=0;de<L.lines;de++)for(let me=0;me<L.channels;me++){let ge=0;switch(L.type){case 1:oe[0]=W,oe[1]=oe[0]+L.width,W=oe[1]+L.width;for(let ye=0;ye<L.width;++ye){const qe=R[oe[0]++]<<8|R[oe[1]++];ge+=qe,V[J]=ge,J++}break;case 2:oe[0]=W,oe[1]=oe[0]+L.width,oe[2]=oe[1]+L.width,W=oe[2]+L.width;for(let ye=0;ye<L.width;++ye){const qe=R[oe[0]++]<<24|R[oe[1]++]<<16|R[oe[2]++]<<8;ge+=qe,V[J]=ge,J++}break}}return new DataView(V.buffer)}function Ve(L){var z=L.viewer,R={value:L.offset.value},U=new Uint8Array(L.width*L.lines*(L.channels*L.type*2)),V={version:Mt(z,R),unknownUncompressedSize:Mt(z,R),unknownCompressedSize:Mt(z,R),acCompressedSize:Mt(z,R),dcCompressedSize:Mt(z,R),rleCompressedSize:Mt(z,R),rleUncompressedSize:Mt(z,R),rleRawSize:Mt(z,R),totalAcUncompressedCount:Mt(z,R),totalDcUncompressedCount:Mt(z,R),acCompression:Mt(z,R)};if(V.version<2)throw"EXRLoader.parse: "+Ii.compression+" version "+V.version+" is unsupported";for(var W=new Array,J=Ie(z,R)-2;J>0;){var oe=pt(z.buffer,R),de=Ct(z,R),me=de>>2&3,ge=(de>>4)-1,ye=new Int8Array([ge])[0],qe=Ct(z,R);W.push({name:oe,index:ye,type:qe,compression:me}),J-=oe.length+3}for(var Be=Ii.channels,We=new Array(L.channels),rt=0;rt<L.channels;++rt){var at=We[rt]={},Rt=Be[rt];at.name=Rt.name,at.compression=0,at.decoded=!1,at.type=Rt.pixelType,at.pLinear=Rt.pLinear,at.width=L.width,at.height=L.lines}for(var lt={idx:new Array(3)},ze=0;ze<L.channels;++ze)for(var at=We[ze],rt=0;rt<W.length;++rt){var gt=W[rt];at.name==gt.name&&(at.compression=gt.compression,gt.index>=0&&(lt.idx[gt.index]=ze),at.offset=ze)}if(V.acCompressedSize>0)switch(V.acCompression){case 0:var Pt=new Uint16Array(V.totalAcUncompressedCount);Z(L.array,z,R,V.acCompressedSize,Pt,V.totalAcUncompressedCount);break;case 1:var ct=L.array.slice(R.value,R.value+V.totalAcUncompressedCount),Gt=x0(ct),Pt=new Uint16Array(Gt.buffer);R.value+=V.totalAcUncompressedCount;break}if(V.dcCompressedSize>0){var Jt={array:L.array,offset:R,size:V.dcCompressedSize},qn=new Uint16Array(be(Jt).buffer);R.value+=V.dcCompressedSize}if(V.rleRawSize>0){var ct=L.array.slice(R.value,R.value+V.rleCompressedSize),Gt=x0(ct),zt=xe(Gt.buffer);R.value+=V.rleCompressedSize}for(var gn=0,jt=new Array(We.length),rt=0;rt<jt.length;++rt)jt[rt]=new Array;for(var rn=0;rn<L.lines;++rn)for(var tn=0;tn<We.length;++tn)jt[tn].push(gn),gn+=We[tn].width*L.type*2;we(lt,jt,We,Pt,qn,U);for(var rt=0;rt<We.length;++rt){var at=We[rt];if(!at.decoded)switch(at.compression){case 2:for(var Yt=0,dn=0,rn=0;rn<L.lines;++rn){for(var Ao=jt[rt][Yt],er=0;er<at.width;++er){for(var Ys=0;Ys<2*at.type;++Ys)U[Ao++]=zt[dn+Ys*at.width*at.height];dn++}Yt++}break;case 1:default:throw"EXRLoader.parse: unsupported channel compression"}}return new DataView(U.buffer)}function pt(L,z){for(var R=new Uint8Array(L),U=0;R[z.value+U]!=0;)U+=1;var V=new TextDecoder().decode(R.slice(z.value,z.value+U));return z.value=z.value+U+1,V}function Ne(L,z,R){var U=new TextDecoder().decode(new Uint8Array(L).slice(z.value,z.value+R));return z.value=z.value+R,U}function Ke(L,z){var R=tt(L,z),U=Ue(L,z);return[R,U]}function xt(L,z){var R=Ue(L,z),U=Ue(L,z);return[R,U]}function tt(L,z){var R=L.getInt32(z.value,!0);return z.value=z.value+4,R}function Ue(L,z){var R=L.getUint32(z.value,!0);return z.value=z.value+4,R}function _t(L,z){var R=L[z.value];return z.value=z.value+1,R}function Ct(L,z){var R=L.getUint8(z.value);return z.value=z.value+1,R}const Mt=function(L,z){let R;return"getBigInt64"in DataView.prototype?R=Number(L.getBigInt64(z.value,!0)):R=L.getUint32(z.value+4,!0)+Number(L.getUint32(z.value,!0)<<32),z.value+=8,R};function ee(L,z){var R=L.getFloat32(z.value,!0);return z.value+=4,R}function Qe(L,z){return eu.toHalfFloat(ee(L,z))}function se(L){var z=(L&31744)>>10,R=L&1023;return(L>>15?-1:1)*(z?z===31?R?NaN:1/0:Math.pow(2,z-15)*(1+R/1024):6103515625e-14*(R/1024))}function Ie(L,z){var R=L.getUint16(z.value,!0);return z.value+=2,R}function je(L,z){return se(Ie(L,z))}function Tt(L,z,R,U){for(var V=R.value,W=[];R.value<V+U-1;){var J=pt(z,R),oe=tt(L,R),de=Ct(L,R);R.value+=3;var me=tt(L,R),ge=tt(L,R);W.push({name:J,pixelType:oe,pLinear:de,xSampling:me,ySampling:ge})}return R.value+=1,W}function Wt(L,z){var R=ee(L,z),U=ee(L,z),V=ee(L,z),W=ee(L,z),J=ee(L,z),oe=ee(L,z),de=ee(L,z),me=ee(L,z);return{redX:R,redY:U,greenX:V,greenY:W,blueX:J,blueY:oe,whiteX:de,whiteY:me}}function mn(L,z){var R=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],U=Ct(L,z);return R[U]}function zn(L,z){var R=Ue(L,z),U=Ue(L,z),V=Ue(L,z),W=Ue(L,z);return{xMin:R,yMin:U,xMax:V,yMax:W}}function en(L,z){var R=["INCREASING_Y"],U=Ct(L,z);return R[U]}function Zi(L,z){var R=ee(L,z),U=ee(L,z);return[R,U]}function $i(L,z){var R=ee(L,z),U=ee(L,z),V=ee(L,z);return[R,U,V]}function Ms(L,z,R,U,V){if(U==="string"||U==="stringvector"||U==="iccProfile")return Ne(z,R,V);if(U==="chlist")return Tt(L,z,R,V);if(U==="chromaticities")return Wt(L,R);if(U==="compression")return mn(L,R);if(U==="box2i")return zn(L,R);if(U==="lineOrder")return en(L,R);if(U==="float")return ee(L,R);if(U==="v2f")return Zi(L,R);if(U==="v3f")return $i(L,R);if(U==="int")return tt(L,R);if(U==="rational")return Ke(L,R);if(U==="timecode")return xt(L,R);if(U==="preview")return R.value+=V,"skipped";R.value+=V}function pl(L,z,R){const U={};if(L.getUint32(0,!0)!=20000630)throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";U.version=L.getUint8(4);const V=L.getUint8(5);U.spec={singleTile:!!(V&2),longName:!!(V&4),deepFormat:!!(V&8),multiPart:!!(V&16)},R.value=8;for(var W=!0;W;){var J=pt(z,R);if(J==0)W=!1;else{var oe=pt(z,R),de=Ue(L,R),me=Ms(L,z,R,oe,de);me===void 0?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${oe}'.`):U[J]=me}}if((V&-5)!=0)throw console.error("EXRHeader:",U),"THREE.EXRLoader: provided file is currently unsupported.";return U}function Hu(L,z,R,U,V){const W={size:0,viewer:z,array:R,offset:U,width:L.dataWindow.xMax-L.dataWindow.xMin+1,height:L.dataWindow.yMax-L.dataWindow.yMin+1,channels:L.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:L.channels[0].pixelType,uncompress:null,getter:null,format:null,[Bd?"colorSpace":"encoding"]:null};switch(L.compression){case"NO_COMPRESSION":W.lines=1,W.uncompress=Te;break;case"RLE_COMPRESSION":W.lines=1,W.uncompress=Se;break;case"ZIPS_COMPRESSION":W.lines=1,W.uncompress=be;break;case"ZIP_COMPRESSION":W.lines=16,W.uncompress=be;break;case"PIZ_COMPRESSION":W.lines=32,W.uncompress=st;break;case"PXR24_COMPRESSION":W.lines=16,W.uncompress=Le;break;case"DWAA_COMPRESSION":W.lines=32,W.uncompress=Ve;break;case"DWAB_COMPRESSION":W.lines=256,W.uncompress=Ve;break;default:throw"EXRLoader.parse: "+L.compression+" is unsupported"}if(W.scanlineBlockSize=W.lines,W.type==1)switch(V){case Nn:W.getter=je,W.inputSize=2;break;case vi:W.getter=Ie,W.inputSize=2;break}else if(W.type==2)switch(V){case Nn:W.getter=ee,W.inputSize=4;break;case vi:W.getter=Qe,W.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+W.type+" for "+L.compression+".";W.blockCount=(L.dataWindow.yMax+1)/W.scanlineBlockSize;for(var J=0;J<W.blockCount;J++)Mt(z,U);W.outputChannels=W.channels==3?4:W.channels;const oe=W.width*W.height*W.outputChannels;switch(V){case Nn:W.byteArray=new Float32Array(oe),W.channels<W.outputChannels&&W.byteArray.fill(1,0,oe);break;case vi:W.byteArray=new Uint16Array(oe),W.channels<W.outputChannels&&W.byteArray.fill(15360,0,oe);break;default:console.error("THREE.EXRLoader: unsupported type: ",V);break}return W.bytesPerLine=W.width*W.inputSize*W.channels,W.outputChannels==4?W.format=ii:W.format=uv,Bd?W.colorSpace="srgb-linear":W.encoding=3e3,W}const Xs=new DataView(e),Js=new Uint8Array(e),js={value:0},Ii=pl(Xs,e,js),Ot=Hu(Ii,Xs,Js,js,this.type),ml={value:0},Hf={R:0,G:1,B:2,A:3,Y:0};for(let L=0;L<Ot.height/Ot.scanlineBlockSize;L++){const z=Ue(Xs,js);Ot.size=Ue(Xs,js),Ot.lines=z+Ot.scanlineBlockSize>Ot.height?Ot.height-z:Ot.scanlineBlockSize;const U=Ot.size<Ot.lines*Ot.bytesPerLine?Ot.uncompress(Ot):Te(Ot);js.value+=Ot.size;for(let V=0;V<Ot.scanlineBlockSize;V++){const W=V+L*Ot.scanlineBlockSize;if(W>=Ot.height)break;for(let J=0;J<Ot.channels;J++){const oe=Hf[Ii.channels[J].name];for(let de=0;de<Ot.width;de++){ml.value=(V*(Ot.channels*Ot.width)+J*Ot.width+de)*Ot.inputSize;const me=(Ot.height-1-W)*(Ot.width*Ot.outputChannels)+de*Ot.outputChannels+oe;Ot.byteArray[me]=Ot.getter(U,ml)}}}}return{header:Ii,width:Ot.width,height:Ot.height,data:Ot.byteArray,format:Ot.format,[Bd?"colorSpace":"encoding"]:Ot[Bd?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,t,n,r){function s(o,a){Bd?o.colorSpace=a.colorSpace:o.encoding=a.encoding,o.minFilter=Qt,o.magFilter=Qt,o.generateMipmaps=!1,o.flipY=!1,t&&t(o,a)}return super.load(e,s,n,r)}}const hy=new WeakMap;class VG 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,n,r){const s=new Ri(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)},n,r)}decodeDracoFile(e,t,n,r){const s={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const l in t.attributeTypes){const u=t.attributeTypes[l];u.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[l]=u.name)}const n=JSON.stringify(t);if(hy.has(e)){const l=hy.get(e);if(l.key===n)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((u,f)=>{r._callbacks[s]={resolve:u,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)}),hy.set(e,{key:n,promise:a}),a}_createGeometry(e){const t=new Bt;e.index&&t.setIndex(new $t(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],s=r.name,o=r.array,a=r.itemSize;t.setAttribute(s,new $t(o,a))}return t}_loadLibrary(e,t){const n=new Ri(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((r,s)=>{n.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(n=>{const r=n[0];e||(this.decoderConfig.wasmBinary=n[1]);const s=WG.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` 3962`);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 n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})}_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 WG(){let i,e;onmessage=function(o){const a=o.data;switch(a.type){case"init":i=a.decoderConfig,e=new Promise(function(f){i.onModuleLoaded=function(h){f({draco:h})},DracoDecoderModule(i)});break;case"decode":const l=a.buffer,u=a.taskConfig;e.then(f=>{const h=f.draco,p=new h.Decoder,m=new h.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const v=t(h,p,m,u),_=v.attributes.map(y=>y.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{h.destroy(m),h.destroy(p)}});break}};function t(o,a,l,u){const f=u.attributeIDs,h=u.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 y in f){const g=self[h[y]];let A,S;if(u.useUniqueIDs)S=f[y],A=a.GetAttributeByUniqueId(p,S);else{if(S=a.GetAttributeId(p,o[f[y]]),S===-1)continue;A=a.GetAttribute(p,S)}_.attributes.push(r(o,a,p,y,g,A))}return v===o.TRIANGULAR_MESH&&(_.index=n(o,a,p)),o.destroy(p),_}function n(o,a,l){const f=l.num_faces()*3,h=f*4,p=o._malloc(h);a.GetTrianglesUInt32Array(l,h,p);const m=new Uint32Array(o.HEAPF32.buffer,p,f).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,u,f,h){const p=h.num_components(),v=l.num_points()*p,_=v*f.BYTES_PER_ELEMENT,y=s(o,f),g=o._malloc(_);a.GetAttributeDataArrayForAllPoints(l,h,y,_,g);const A=new f(o.HEAPF32.buffer,g,v).slice();return o._free(g),{name:u,array:A,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 A0;const py=()=>{if(A0)return A0;const i="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9
3962LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",e="B9h9z9tFB
3962BBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMG
3962XAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let r=i;WebAssembly.validate(t)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(h=>{s=h.instance,s.exports.__wasm_call_ctors()});function a(h){const p=new Uint8Array(h.length);for(let v=0;v<h.length;
3962++v){const _=h.charCodeAt(v);p[v]=_>96?_-71:_>64?_-65:_>47?_+4:_>46?63:62}let m=0;for(let v=0;v<h.length;++v)p[m++]=p[v]<60?n[p[v]]:(p[v]-60)*64+p[++v];return p.buffer.slice(0,m)}function l(h,p,m,v,_,y){const g=s.exports.sbrk,A=m+3&-4,S=g(A*v),w=g(_.length),P=new Uint8Array(s.exports.memory.buffer);P.set(_,w);const T=h(S,m,v,w,_.length);if(T===0&&y&&y(S,A,v),p.set(P.subarray(S,S+m*v)),g(S-g(0)),T!==0)throw new Error(`Malformed buffer data: ${T}`)}const u={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 A0={ready:o,supported:!0,decodeVertexBuffer(h,p,m,v,_){l(s.exports.meshopt_decodeVertexBuffer,h,p,m,v,s.exports[u[_]])},decodeIndexBuffer(h,p,m,v){l(s.exports.meshopt_decodeIndexBuffer,h,p,m,v)},decodeIndexSequence(h,p,m,v){l(s.exports.meshopt_decodeIndexSequence,h,p,m,v)},decodeGltfBuffer(h,p,m,v,_,y){l(s.exports[f[_]],h,p,m,v,s.exports[u[y]])}},A0};function ku(i,e,t,n){const r=class extends ur{constructor(o={}){const a=Object.entries(i);super({uniforms:a.reduce((l,[u,f])=>{const h=VS.clone({[u]:{value:f}});return{...l,...h}},{}),vertexShader:e,fragmentShader:t}),this.key="",a.forEach(([l])=>Object.defineProperty(this,l,{get:()=>this.uniforms[l].value,set:u=>this.uniforms[l].value=u})),Object.assign(this,o),n&&n(this)}};return r.key=Vo.generateUUID(),r}const my=i=>i===Object(i)&&!Array.isArray(i)&&typeof i!="function";function nl(i,e){const t=Cn(s=>s.gl),n=na(dp,my(i)?Object.values(i):i);return K.exports.useLayoutEffect(()=>{e==null||e(n)},[e]),K.exports.useEffect(()=>{if("initTexture"in t){let s=[];Array.isArray(n)?s=n:n instanceof qt?s=[n]:my(n)&&(s=Object.values(n)),s.forEach(o=>{o instanceof qt&&t.initTexture(o)})}},[t,n]),K.exports.useMemo(()=>{if(my(i)){const s={};let o=0;for(const a in i)s[a]=n[o++];return s}else return n},[i,n])}nl.preload=i=>na.preload(dp,i);nl.clear=i=>na.clear(dp,i);let S0=null,pB="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function mB(i,e,t){return n=>{t&&t(n),i&&(S0||(S0=new VG),S0.setDecoderPath(typeof i=="string"?i:pB),n.setDRACOLoader(S0)),e&&n.setMeshoptDecoder(typeof py=="function"?py():py)}}function Gs(i,e=!0,t=!0,n){return na(wE,i,mB(e,t,n))}Gs.preload=(i,e=!0,t=!0,n)=>na.preload(wE,i,mB(e,t,n));Gs.clear=i=>na.clear(wE,i);Gs.setDecoderPath=i=>{pB=i};function Hh(i,e,t){const n=Cn(p=>p.size),r=Cn(p=>p.viewport),s=typeof i=="number"?i:n.width*r.dpr,o=typeof e=="number"?e:n.height*r.dpr,a=(typeof i=="number"?t:i)||{},{samples:l=0,depth:u,...f}=a,h=K.exports.useMemo(()=>{const p=new Tr(s,o,{minFilter:Qt,magFilter:Qt,type:vi,...f});return u&&(p.depthTexture=new hv(s,o,Nn)),p.samples=l,p},[]);return K.exports.useLayoutEffect(()=>{h.setSize(s,o),l&&(h.samples=l)},[l,h,s,o]),K.exports.useEffect(()=>()=>h.dispose(),[]),h}const XG=i=>typeof i=="function",gB=K.exports.forwardRef(({envMap:i,resolution:e=256,frames:t=1/0,makeDefault:n,children:r,...s},o)=>{const a=Cn(({set:y})=>y),l=Cn(({camera:y})=>y),u=Cn(({size:y})=>y),f=K.exports.useRef(null);K.exports.useImperativeHandle(o,()=>f.current,[]);const h=K.exports.useRef(null),p=Hh(e);K.exports.useLayoutEffect(()=>{s.manual||(f.current.aspect=u.width/u.height)},[u,s]),K.exports.useLayoutEffect(()=>{f.current.updateProjectionMatrix()});let m=0,v=null;const _=XG(r);return ws(y=>{_&&(t===1/0||m<t)&&(h.current.visible=!1,y.gl.setRenderTarget(p),v=y.scene.background,i&&(y.scene.background=i),y.gl.render(y.scene,f.current),y.scene.background=v,y.gl.setRenderTarget(null),h.current.visible=!0,m++)}),K.exports.useLayoutEffect(()=>{if(n){const y=l;return a(()=>({camera:f.current})),()=>a(()=>({camera:y}))}},[f,n,a]),K.exports.createElement(K.exports.Fragment,null,K.exports.createElement("perspectiveCamera",bu({ref:f},s),!_&&r),K.exports.createElement("group",{ref:h},_&&r(p.texture)))});
3962function JG({defaultScene:i,defaultCamera:e,renderPriority:t=1}){const{gl:n,scene:r,camera:s}=Cn();let o;return ws(()=>{o=n.autoClear,t===1&&(n.autoClear=!0,n.render(i,e)),n.autoClear=!1,n.clearDepth(),n.render(r,s),n.autoClear=o},t),K.exports.createElement("group",{onPointerOver:()=>null})}function vB({children:i,renderPriority:e=1}){const{scene:t,camera:n}=Cn(),[r]=K.exports.useState(()=>new Eu);return K.exports.createElement(K.exports.Fragment,null,tB(K.exports.createElement(K.exports.Fragment,null,i,K.exports.createElement(JG,{defaultScene:t,defaultCamera:n,renderPriority:e})),r,{events:{priority:e+1}}))}const jG="modulepreload",YG=function(i){return"/"+i},O2={},KG=function(e,t,n){if(!t||t.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map(s=>{if(s=YG(s),s in O2)return;O2[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let f=r.length-1;f>=0;f--){const h=r[f];if(h.href===s&&(!o||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":jG,o||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),o)return new Promise((f,h)=>{u.addEventListener("load",f),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())};var U2,z2;const QG=typeof window<"u"&&typeof((U2=window.document)==null?void 0:U2.createElement)=="function"&&typeof((z2=window.navigator)==null?void 0:z2.userAgent)=="string";let E0=null;async function qG(i,e){if(QG&&i.pathname.endsWith(".m3u8")){var t;if((t=E0)!==null&&t!==void 0||(E0=await KG(()=>import("./hls.4c9452a3.js").then(n=>n.h),[])),E0.default.isSupported())return new E0.default({...e})}return null}function ZG(i,e){const{unsuspend:t,start:n,crossOrigin:r,muted:s,loop:o,hls:a,...l}={unsuspend:"loadedmetadata",crossOrigin:"Anonymous",muted:!0,loop:!0,start:!0,playsInline:!0,hls:{},...e},u=new URL(typeof i=="string"?i:"",window.location.href),f=K.exports.useRef(null),h=K.exports.useRef(null),p=Cn(v=>v.gl),m=GI(()=>new Promise(async(v,_)=>{const y=Object.assign(document.createElement("video"),{src:typeof i=="string"&&i||void 0,srcObject:i instanceof MediaStream&&i||void 0,crossOrigin:r,loop:o,muted:s,...l});if(h.current=y,typeof i=="string"){const A=f.current=await qG(u,a);A?(A.attachMedia(y),A.on("hlsMediaAttached",()=>{A.loadSource(i)})):y.src=i}else i instanceof MediaStream&&(y.srcObject=i);const g=new $b(y);"colorSpace"in g?g.colorSpace=p.outputColorSpace:g.encoding=p.outputEncoding,y.addEventListener(t,()=>v(g))}),[i]);return K.exports.useEffect(()=>(n&&m.image.play(),()=>{f.current&&(f.current.destroy(),f.current=null)}),[m,n]),m}var Pc={exports:{}},$G="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",eH=$G,tH=eH;function _B(){}function yB(){}yB.resetWarningCache=_B;var nH=function(){function i(n,r,s,o,a,l){if(l!==tH){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}i.isRequired=i;function e(){return i}var t={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:e,element:i,elementType:i,instanceOf:e,node:i,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:yB,resetWarningCache:_B};return t.PropTypes=t,t};Pc.exports=nH();Pc.exports.func.isRequired,Pc.exports.arrayOf(Pc.exports.oneOfType([Pc.exports.element,Pc.exports.func])).isRequired;const k2=(i,e)=>{"updateRanges"in i?i.updateRanges[0]=e:i.updateRange=e},iH=3e3,rH=3001;function sH(i){return typeof i=="function"}const G2=new mt,H2=new mt,w0=[],Dd=new Mn;class oH extends lo{constructor(){super(),this.color=new He("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return(e=this.instance.current)==null?void 0:e.geometry}raycast(e,t){const n=this.instance.current;if(!n||!n.geometry||!n.material)return;Dd.geometry=n.geometry;const r=n.matrixWorld,s=n.userData.instances.indexOf(this.instanceKey);if(!(s===-1||s>n.count)){n.getMatrixAt(s,G2),H2.multiplyMatrices(r,G2),Dd.matrixWorld=H2,n.material instanceof Qn?Dd.material.side=n.material.side:Dd.material.side=n.material[0].side,Dd.raycast(e,w0);for(let o=0,a=w0.length;o<a;o++){const l=w0[o];l.instanceId=s,l.object=this,t.push(l)}w0.length=0}}}const xB=K.exports.createContext(null),V2=new mt,W2=new mt,aH=new mt,X2=new H,J2=new Ci,j2=new H,AB=K.exports.forwardRef(({context:i,children:e,...t},n)=>{K.exports.useMemo(()=>xo({PositionMesh:oH}),[]);const r=K.exports.useRef();K.exports.useImperativeHandle(n,()=>r.current,[]);const{subscribe:s,getParent:o}=K.exports.useContext(i||xB);return K.exports.useLayoutEffect(()=>s(r),[]),K.exports.createElement("positionMesh",bu({instance:o(),instanceKey:r,ref:r},t),e)}),lH=K.exports.forwardRef(({children:i,range:e,limit:t=1e3,frames:n=1/0,...r},s)=>{const[{context:o,instance:a}]=K.exports.useState(()=>{const y=K.exports.createContext(null);return{context:y,instance:K.exports.forwardRef((g,A)=>K.exports.createElement(AB,bu({context:y},g,{ref:A})))}}),l=K.exports.useRef(null);K.exports.useImperativeHandle(s,()=>l.current,[]);const[u,f]=K.exports.useState([]),[[h,p]]=K.exports.useState(()=>{const y=new Float32Array(t*16);for(let g=0;g<t;g++)aH.identity().toArray(y,g*16);return[y,new Float32Array([...new Array(t*3)].map(()=>1))]});K.exports.useEffect(()=>{l.current.instanceMatrix.needsUpdate=!0});let m=0,v=0;ws(()=>
3962{if(n===1/0||m<n){l.current.updateMatrix(),l.current.updateMatrixWorld(),V2.copy(l.current.matrixWorld).invert(),v=Math.min(t,e!==void 0?e:t,u.length),l.current.count=v,k2(l.current.instanceMatrix,{offset:0,count:v*16}),k2(l.current.instanceColor,{offset:0,count:v*3});for(let y=0;y<u.length;y++){const g=u[y].current;g.matrixWorld.decompose(X2,J2,j2),W2.compose(X2,J2,j2).premultiply(V2),W2.toArray(h,y*16),l.current.instanceMatrix.needsUpdate=!0,g.color.toArray(p,y*3),l.current.instanceColor.needsUpdate=!0}m++}});const _=K.exports.useMemo(()=>({getParent:()=>l,subscribe:y=>(f(g=>[...g,y]),()=>f(g=>g.filter(A=>A.current!==y.current)))}),[]);return K.exports.createElement("instancedMesh",bu({userData:{instances:u},matrixAutoUpdate:!1,ref:l,args:[null,null,0],raycast:()=>null},r),K.exports.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:h.length/16,array:h,itemSize:16,usage:tA}),K.exports.createElement("instancedBufferAttribute",{attach:"instanceColor",count:p.length/3,array:p,itemSize:3,usage:tA}),sH(i)?K.exports.createElement(o.Provider,{value:_},i(a)):K.exports.createElement(xB.Provider,{value:_},i))}),SB=K.exports.forwardRef(({children:i,enabled:e=!0,speed:t=1,rotationIntensity:n=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=K.exports.useRef(null);K.exports.useImperativeHandle(a,()=>l.current,[]);const u=K.exports.useRef(Math.random()*1e4);return ws(f=>{var h,p;if(!e||t===0)return;const m=u.current+f.clock.getElapsedTime();l.current.rotation.x=Math.cos(m/4*t)/8*n,l.current.rotation.y=Math.sin(m/4*t)/8*n,l.current.rotation.z=Math.sin(m/4*t)/20*n;let v=Math.sin(m/4*t)/10;v=Vo.mapLinear(v,-.1,.1,(h=s==null?void 0:s[0])!==null&&h!==void 0?h:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=v*r,l.current.updateMatrix()}),K.exports.createElement("group",o,K.exports.createElement("group",{ref:l,matrixAutoUpdate:!1},i))}),EB=(i,e,t)=>{let n;switch(i){case jr:n=new Uint8ClampedArray(e*t*4);break;case vi:n=new Uint16Array(e*t*4);break;case el:n=new Uint32Array(e*t*4);break;case RS:n=new Int8Array(e*t*4);break;case PS:n=new Int16Array(e*t*4);break;case lv:n=new Int32Array(e*t*4);break;case Nn:n=new Float32Array(e*t*4);break;default:throw new Error("Unsupported data type")}return n};let M0;const uH=(i,e,t,n)=>{if(M0!==void 0)return M0;const r=new Tr(1,1,n);e.setRenderTarget(r);const s=new Mn(new cl,new Xi({color:16777215}));e.render(s,t),e.setRenderTarget(null);const o=EB(i,r.width,r.height);return e.readRenderTargetPixels(r,0,0,r.width,r.height,o),r.dispose(),s.geometry.dispose(),s.material.dispose(),M0=o[0]!==0,M0};class ME{constructor(e){var t,n,r,s,o,a,l,u,f,h,p,m,v,_,y,g;this._rendererIsDisposable=!1,this._supportsReadPixels=!0,this.render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(S){throw this._renderer.setRenderTarget(null),S}this._renderer.setRenderTarget(null)},this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace
vendor: 6,977 bytes, lines 3962-3995
3962=e.colorSpace;const A={format:ii,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:((t=e.renderTargetOptions)===null||t===void 0?void 0:t.anisotropy)!==void 0?(n=e.renderTargetOptions)===null||n===void 0?void 0:n.anisotropy:1,generateMipmaps:((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:Qt,minFilter:((l=e.renderTargetOptions)===null||l===void 0?void 0:l.minFilter)!==void 0?(u=e.renderTargetOptions)===null||u===void 0?void 0:u.minFilter:Qt,samples:((f=e.renderTargetOptions)===null||f===void 0?void 0:f.samples)!==void 0?(h=e.renderTargetOptions)===null||h===void 0?void 0:h.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:Kn,wrapT:((v=e.renderTargetOptions)===null||v===void 0?void 0:v.wrapT)!==void 0?(_=e.renderTargetOptions)===null||_===void 0?void 0:_.wrapT:Kn};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=ME.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new Eu,this._camera=new Lu,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(),!uH(this._type,this._renderer,this._camera,A)){let S;switch(this._type){case vi:S=this._renderer.extensions.has("EXT_color_buffer_float")?Nn:void 0;break}S!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${Nn}`),this._type=S):(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 Mn(new cl,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new Tr(this.width,this.height,A),this._renderTarget.texture.mapping=((y=e.renderTargetOptions)===null||y===void 0?void 0:y.mapping)!==void 0?(g=e.renderTargetOptions)===null||g===void 0?void 0:g.mapping:Za}static instantiateRenderer(){const e=new YS;return e.setSize(128,128),e}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=EB(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 mo(this.toArray(),this.width,this.height,ii,this._type,(e==null?void 0:e.mapping)||Za,(e==null?void 0:e.wrapS)||Kn,(e==null?void 0:e.wrapT)||Kn,(e==null?void 0:e.magFilter)||Qt,(e==null?void 0:e.minFilter)||Qt,(e==null?void 0:e.anisotropy)||1,Ji);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 ur&&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 cH=` 3963varying vec2 vUv; 3964 3965void main() { 3966 vUv = uv; 3967 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 3968} 3969`,fH=` 3970// min half float value 3971#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 ) 3972// max half float value 3973#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 ) 3974 3975uniform sampler2D sdr; 3976uniform sampler2D gainMap; 3977uniform vec3 gamma; 3978uniform vec3 offsetHdr; 3979uniform vec3 offsetSdr; 3980uniform vec3 gainMapMin; 3981uniform vec3 gainMapMax; 3982uniform float weightFactor; 3983 3984varying vec2 vUv; 3985 3986void main() { 3987 vec3 rgb = texture2D( sdr, vUv ).rgb; 3988 vec3 recovery = texture2D( gainMap, vUv ).rgb; 3989 vec3 logRecovery = pow( recovery, gamma ); 3990 vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery; 3991 vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr; 3992 vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor )); 3993 gl_FragColor = vec4( clampedHdrColor , 1.0 ); 3994} 3995`;class dH extends ur{constructor({gamma:e,offsetHdr:t,offsetSdr:n,gainMapMin:r,gainMapMax:s,maxDisplayBoost:o,hdrCapacityMin:a,hdrCapacityMax:l,sdr:u,gainMap:f}){super({name:"GainMapDecoderMaterial",vertexShader:cH,fragmentShader:fH,uniforms:{sdr:{value:u},gainMap:{value:f},gamma:{value:new H(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new H().fromArray(t)},offsetSdr:{value:new H().fromArray(n)},gainMapMin:{value:new H().fromArray(r)},gainMapMax:{value:new H().fromArray(s)},weightFactor:{value:(Math.log2(o)-a)/(l-a)}},blending:ho,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,388 bytes, line 3995
3995class wB extends Error{}class MB extends Error{}const Fd=(i,e,t)=>{var n;let r;const s=(n=i.attributes.getNamedItem(e))===null||n===void 0?void 0:n.nodeValue;if(s)r=s;else{const o=i.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},hH=i=>{var e,t;let n;typeof TextDecoder<"u"?n=new TextDecoder().decode(i):n=i.toString();let r=n.indexOf("<x:xmpmeta");const s=new DOMParser;for(;r!==-1;){const o=n.indexOf("x:xmpmeta>",r);n.slice(r,o+10);const a=n.slice(r,o+10);try{const u=s.parseFromString(a,"text/xml").getElementsByTagName("rdf:Description")[0],f=Fd(u,"hdrgm:GainMapMin","0"),h=Fd(u,"hdrgm:GainMapMax"),p=Fd(u,"hdrgm:Gamma","1"),m=Fd(u,"hdrgm:OffsetSDR","0.015625"),v=Fd(u,"hdrgm:OffsetHDR","0.015625");let _=(e=u.attributes.getNamedItem("hdrgm:HDRCapacityMin"))===null||e===void 0?void 0:e.nodeValue;_||(_="0");const y=(t=u.attributes.getNamedItem("hdrgm:HDRCapacityMax"))===null||t===void 0?void 0:t.nodeValue;if(!y)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(h)?h.map(g=>parseFloat(g)):[parseFloat(h),parseFloat(h),parseFloat(h)],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(y)}}catch{}r=n.indexOf("<x:xmpmeta",o)}};class pH{constructor(e){this.options={debug:e&&e.debug!==void 0?e.debug:!1,extractFII:e&&e.extractFII!==void 0?e.extractFII:!0,extractNonFII:e&&e.extractNonFII!==void 0?e.extractNonFII:!0}}extract(e){return new Promise((t,n)=>{const r=this.options.debug,s=new DataView(e.buffer);if(s.getUint16(0)!==65496){n(new Error("Not a valid jpeg"));return}const o=s.byteLength;let a=2,l=0,u;for(;a<o;){if(++l>250){n(new Error(`Found no marker after ${l} loops \u{1F635}`));return}if(s.getUint8(a)!==255){n(new Error(`Not a valid marker at offset 0x${a.toString(16)}, found: 0x${s.getUint8(a).toString(16)}`));return}if(u=s.getUint8(a+1),r&&console.log(`Marker: ${u.toString(16)}`),u===226){r&&console.log("Found APP2 marker (0xffe2)");const f=a+4;if(s.getUint32(f)===1297106432){const h=f+4;let p;if(s.getUint16(h)===18761)p=!1;else if(s.getUint16(h)===19789)p=!0;else{n(new Error("No valid endianness marker found in TIFF header"));return}if(s.getUint16(h+2,!p)!==42){n(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const m=s.getUint32(h+4,!p);if(m<8){n(new Error("Not valid TIFF data! (First offset less than 8)"));return}const v=h+m,_=s.getUint16(v,!p),y=v+2;let g=0;for(let P=y;P<y+12*_;P+=12)s.getUint16(P,!p)===45057&&(g=s.getUint32(P+8,!p));const A=4,S=v+2+_*12+A,w=[];for(let P=S;P<S+g*16;P+=16){const T={MPType:s.getUint32(P,!p),size:s.getUint32(P+4,!p),dataOffset:s.getUint32(P+8,!p),dependantImages:s.getUint32(P+12,!p),start:-1,end:-1,isFII:!1};T.dataOffset?(T.start=h+T.dataOffset,T.isFII=!1):(T.start=0,T.isFII=!0),T.end=T.start+T.size,w.push(T)}if(this.options.extractNonFII&&w.length){const P=new Blob([s]),T=[];for(const I of w){if(I.isFII&&!this.options.extractFII)continue;const D=P.slice(I.start,I.end+1,"image/jpeg");T.push(D)}t(T)}}}a+=2+s.getUint16(a+2)}})}}const mH=async i=>{const e=hH(i);if(!e)throw new MB("Gain map XMP metadata not found");const n=await new pH({extractFII:!0,extractNonFII:!0}).extract(i);if(n.length!==2)throw new wB("Gain map recovery image not found");return{sdr:new Uint8Array(await n[0].arrayBuffer()),gainMap:new Uint8Array(await n[1].arrayBuffer()),metadata:e}},Y2=i=>new Promise((e,t)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=r=>{t(r)},n.src=URL.createObjectURL(i)});class CB extends bi{constructor(e,t){super(t),e&&(this._renderer=e),this._internalLoadingManager=new bv}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
3995der 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 dH({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 ME({width:16,height:16,type:vi,colorSpace:Ji,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async render(e,t,n,r){const s=r?new Blob([r],{type:"image/jpeg"}):void 0,o=new Blob([n],{type:"image/jpeg"});let a,l,u=!1;if(typeof createImageBitmap>"u"){const p=await Promise.all([s?Y2(s):Promise.resolve(void 0),Y2(o)]);l=p[0],a=p[1],u=!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),Za,Kn,Kn,Qt,Tx,ii,jr,1,Ji);f.flipY=u,f.needsUpdate=!0;const h=new qt(a,Za,Kn,Kn,Qt,Tx,ii,jr,1,gr);h.flipY=u,h.needsUpdate=!0,e.width=a.width,e.height=a.height,e.material.gainMap=f,e.material.sdr=h,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 gH extends CB{load([e,t,n],r,s,o){const a=this.prepareQuadRenderer();let l,u,f;const h=async()=>{if(l&&u&&f){try{await this.render(a,f,l,u)}catch(C){this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(n),typeof o=="function"&&o(C),a.disposeOnDemandRenderer();return}typeof r=="function"&&r(a),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(n),a.disposeOnDemandRenderer()}};let p=!0,m=0,v=0,_=!0,y=0,g=0,A=!0,S=0,w=0;const P=()=>{if(typeof s=="function"){const C=m+y+S,b=v+g+w,N=p&&_&&A;s(new ProgressEvent("progress",{lengthComputable:N,loaded:b,total:C}))}};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(n);const T=new Ri(this._internalLoadingManager);T.setResponseType("arraybuffer"),T.setRequestHeader(this.requestHeader),T.setPath(this.path),T.setWithCredentials(this.withCredentials),T.load(e,async C=>{if(typeof C=="string")throw new Error("Invalid sdr buffer");l=C,await h()},C=>{p=C.lengthComputable,v=C.loaded,m=C.total,P()},C=>{this.manager.itemError(e),typeof o=="function"&&o(C)});const I=new Ri(this._internalLoadingManager);I.setResponseType("arraybuffer"),I.setRequestHeader(this.requestHeader),I.setPath(this.path),I.setWithCredentials(this.withCredentials),I.load(t,async C=>{if(typeof C=="string")throw new Error("Invalid gainmap buffer");u=C,await h()},C=>{_=C.lengthComputable,g=C.loaded,y=C.total,P()},C=>{this.manager.itemError(t),typeof o=="function"&&o(C)});const D=new Ri(this._internalLoadingManager);return D.setRequestHeader(this.requestHeader),D.setPath(this.path),D.setWithCredentials(this.withCredentials),D.load(n,async C=>{if(typeof C!="string")throw new Error("Invalid metadata string");f=JSON.parse(C),await h()},C=>{A=C.lengthComputable,w=C.loaded,S=C.total,P()},C=>{this.manager.itemError(n),typeof o=="function"&&o(C)}),a}}class vH extends CB{load(e,t,n,r){const s=this.prepareQuadRenderer(),o=new Ri(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 u,f,h;try{const p=await mH(l);u=p.sdr,f=p.gainMap,h=p.metadata}catch(p){if(p instanceof MB||p instanceof wB)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),h={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},u=l;else throw p}try{await this.render(s,h,u,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()},n,a=>{this.manager.itemError(e),typeof r=="function"&&r(a)}),s}}const gy={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"},_H="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",C0=i=>Array.isArray(i);function TB({files:i=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:e="",preset:t=void 0,encoding:n=void 0,extensions:r}={}){var s;let o=null,a=!1,l;if(t){if(!(t in gy))throw new Error("Preset must be one of: "+Object.keys(gy).join(", "));i=gy[t],e=_H}const u=C0(i)&&i.length===6,f=C0(i)&&i.length===3&&i.some(y=>y.endsWith("json")),h=C0(i)?i[0]:i;if(a=C0(i),l=u?"cube":f?"webp":h.startsWith("data:application/exr")?"exr":h.startsWith("data:application/hdr")?"hdr":h.startsWith("data:image/jpeg")?"jpg":(s=h.split(".").pop())==null||(s=s.split("?"))==null||(s=s.shift())==null?void 0:s.toLowerCase(),o=l==="cube"?EI:l==="hdr"?GG:l==="exr"?HG:l==="jpg"||l==="jpeg"?vH:l==="webp"?gH:null,!o)throw new Error("useEnvironment: Unrecognized file extension: "+i);const p=Cn(y=>y.gl),m=na(o,a?[i]:i,y=>{(l==="webp"||l==="jpg"||l==="jpeg")&&y.setRenderer(p),y.setPath==null||y.setPath(e),r&&r(y)});let v=a?m[0]:m;if(l==="jpg"||l==="jpeg"||l==="webp"){var _;v=(_=v.renderTarget)==null?void 0:_.texture}
3995return v.mapping=u?_o:mf,"colorSpace"in v?v.colorSpace=(n!=null?n:u)?"srgb":"srgb-linear":v.encoding=(n!=null?n:u)?rH:iH,v}const yH=i=>i.current&&i.current.isScene,xH=i=>yH(i)?i.current:i;function CE(i,e,t,n,r={}){var s,o,a,l,u;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=xH(e||t),h=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=(u=f.environmentRotation)==null||u.clone==null?void 0:u.clone())!==null&&l!==void 0?l:[0,0,0]};return i!=="only"&&(f.environment=n),i&&(f.background=n),Ca(f,r),()=>{i!=="only"&&(f.environment=p),i&&(f.background=h),Ca(f,m)}}function TE({scene:i,background:e=!1,map:t,...n}){const r=Cn(s=>s.scene);return K.exports.useLayoutEffect(()=>{if(t)return CE(e,i,r,t,n)}),null}function RB({background:i=!1,scene:e,blur:t,backgroundBlurriness:n,backgroundIntensity:r,backgroundRotation:s,environmentIntensity:o,environmentRotation:a,...l}){const u=TB(l),f=Cn(h=>h.scene);return K.exports.useLayoutEffect(()=>CE(i,e,f,u,{blur:t,backgroundBlurriness:n,backgroundIntensity:r,backgroundRotation:s,environmentIntensity:o,environmentRotation:a})),null}function AH({children:i,near:e=1,far:t=1e3,resolution:n=256,frames:r=1,map:s,background:o=!1,blur:a,backgroundBlurriness:l,backgroundIntensity:u,backgroundRotation:f,environmentIntensity:h,environmentRotation:p,scene:m,files:v,path:_,preset:y=void 0,extensions:g}){const A=Cn(D=>D.gl),S=Cn(D=>D.scene),w=K.exports.useRef(null),[P]=K.exports.useState(()=>new Eu),T=K.exports.useMemo(()=>{const D=new WS(n);return D.texture.type=vi,D},[n]);K.exports.useLayoutEffect(()=>(r===1&&w.current.update(A,P),CE(o,m,S,T.texture,{blur:a,backgroundBlurriness:l,backgroundIntensity:u,backgroundRotation:f,environmentIntensity:h,environmentRotation:p})),[i,P,T.texture,m,S,o,r,A]);let I=1;return ws(()=>{(r===1/0||I<r)&&(w.current.update(A,P),I++)}),K.exports.createElement(K.exports.Fragment,null,tB(K.exports.createElement(K.exports.Fragment,null,i,K.exports.createElement("cubeCamera",{ref:w,args:[e,t,T]}),v||y?K.exports.createElement(RB,{background:!0,files:v,preset:y,path:_,extensions:g}):s?K.exports.createElement(TE,{background:!0,map:s,extensions:g}):null),P))}function SH(i){var e,t,n,r;const s=TB(i),o=i.map||s;K.exports.useMemo(()=>xo({GroundProjectedEnvImpl:sG}),[]);const a=K.exports.useMemo(()=>[o],[o]),l=(e=i.ground)==null?void 0:e.height,u=(t=i.ground)==null?void 0:t.radius,f=(n=(r=i.ground)==null?void 0:r.scale)!==null&&n!==void 0?n:1e3;return K.exports.createElement(K.exports.Fragment,null,K.exports.createElement(TE,bu({},i,{map:o})),K.exports.createElement("groundProjectedEnvImpl",{args:a,scale:f,height:l,radius:u}))}function EH(i){return i.ground?K.exports.createElement(SH,i):i.map?K.exports.createElement(TE,i):i.children?K.exports.createElement(AH,i):K.exports.createElement(RB,i)}function No(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function PB(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}/*! 3996 * GSAP 3.12.5 3997 * https://gsap.com 3998 * 3999 * @license Copyright 2008-2024, GreenSock. All rights reserved. 4000 * Subject to the terms at https://gsap.com/standard-license or for 4001 * Club GSAP members, the agreement issued with that membership. 4002 * @author: Jack Doyle, [email protected] 4003*/var Xr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Ef={duration:.5,overwrite:!1,delay:0},RE,Yi,Pn,ms=1e8,yn=1/ms,vA=Math.PI*2,wH=vA/4,MH=0,bB=Math.sqrt,CH=Math.cos,TH=Math.sin,yi=function(e){return typeof e=="string"},Wn=function(e){return typeof e=="function"},Zo=function(e){return typeof e=="number"},PE=function(e){return typeof e>"u"},yo=function(e){return typeof e=="object"},Er=function(e){return e!==!1},bE=function(){return typeof window<"u"},T0=function(e){return Wn(e)||yi(e)},IB=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Ki=Array.isArray,_A=/(?:-?\.?\d|\.)+/gi,BB=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Jc=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,vy=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,DB=/[+-]=-?[.\d]+/,FB=/[^,'"\[\]\s]+/gi,RH=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Dn,ro,yA,IE,Kr={},Ug={},LB,NB=function(e){return(Ug=Iu(e,Kr))&&Rr},BE=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Vh=function(e,t){return!t&&console.warn(e)},OB=function(e,t){return e&&(Kr[e]=t)&&Ug&&(Ug[e]=t)||Kr},Wh=function(){return 0},PH={suppressEvents:!0,isStart:!0,kill:!1},ig={suppressEvents:!0,kill:!1},bH={suppressEvents:!0},DE={},Ya=[],xA={},UB,Ur={},_y={},K2=30,rg=[],FE="",LE=function(e){var t=e[0],n,r;if(yo(t)||Wn(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=rg.length;r--&&!rg[r].targetTest(t););n=rg[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new lD(e[r],n)))||e.splice(r,1);return e},du=function(e){return e._gsap||LE(gs(e))[0]._gsap},zB=function(e,t,n){return(n=e[t])&&Wn(n)?e[t]():PE(n)&&e.getAttribute&&e.getAttribute(t)||n}
vendor: 45,156 bytes, line 4003
4003,wr=function(e,t){return(e=e.split(",")).forEach(t)||e},jn=function(e){return Math.round(e*1e5)/1e5||0},gi=function(e){return Math.round(e*1e7)/1e7||0},rf=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n==="+"?e+r:n==="-"?e-r:n==="*"?e*r:e/r},IH=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},zg=function(){var e=Ya.length,t=Ya.slice(0),n,r;for(xA={},Ya.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},kB=function(e,t,n,r){Ya.length&&!Yi&&zg(),e.render(t,n,r||Yi&&t<0&&(e._initted||e._startAt)),Ya.length&&!Yi&&zg()},GB=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(FB).length<2?t:yi(e)?e.trim():e},HB=function(e){return e},Ss=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},BH=function(e){return function(t,n){for(var r in n)r in t||r==="duration"&&e||r==="ease"||(t[r]=n[r])}},Iu=function(e,t){for(var n in t)e[n]=t[n];return e},Q2=function i(e,t){for(var n in t)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(e[n]=yo(t[n])?i(e[n]||(e[n]={}),t[n]):t[n]);return e},kg=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},sh=function(e){var t=e.parent||Dn,n=e.keyframes?BH(Ki(e.keyframes)):Ss;if(Er(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},DH=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},VB=function(e,t,n,r,s){n===void 0&&(n="_first"),r===void 0&&(r="_last");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[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},Fv=function(e,t,n,r){n===void 0&&(n="_first"),r===void 0&&(r="_last");var s=t._prev,o=t._next;s?s._next=o:e[n]===t&&(e[n]=o),o?o._prev=s:e[r]===t&&(e[r]=s),t._next=t._prev=t.parent=null},il=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},hu=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},FH=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},AA=function(e,t,n,r){return e._startAt&&(Yi?e._startAt.revert(ig):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},LH=function i(e){return!e||e._ts&&i(e.parent)},q2=function(e){return e._repeat?wf(e._tTime,e=e.duration()+e._rDelay)*e:0},wf=function(e,t){var n=Math.floor(e/=t);return e&&n===e?n-1:n},Gg=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Lv=function(e){return e._end=gi(e._start+(e._tDur/Math.abs(e._ts||e._rts||yn)||0))},Nv=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=gi(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Lv(e),n._dirty||hu(n,e)),e},WB=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=Gg(e.rawTime(),t),(!t._dur||mp(0,t.totalDuration(),n)-t._tTime>yn)&&t.render(n,!0)),hu(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-yn}},oo=function(e,t,n,r){return t.parent&&il(t),t._start=gi((Zo(n)?n:n||e!==Dn?as(e,n,t):e._time)+t._delay),t._end=gi(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),VB(e,t,"_first","_last",e._sort?"_start":0),SA(t)||(e._recent=t),r||WB(e,t),e._ts<0&&Nv(e,e._tTime),e},XB=function(e,t){return(Kr.ScrollTrigger||BE("scrollTrigger",t))&&Kr.ScrollTrigger.create(t,e)},JB=function(e,t,n,r,s){if(OE(e,t,s),!e._initted)return 1;if(!n&&e._pt&&!Yi&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&UB!==kr.frame)return Ya.push(e),e._lazy=[s,r],1},NH=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},SA=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},OH=function(e,t,n,r){var s=e.ratio,o=t<0||!t&&(!e._start&&NH(e)&&!(!e._initted&&SA(e))||(e._ts<0||e._dp._ts<0)&&!SA(e))?0:1,a=e._rDelay,l=0,u,f,h;if(a&&e._repeat&&(l=mp(0,e._tDur,t),f=wf(l,a),e._yoyo&&f&1&&(o=1-o),f!==wf(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==s||Yi||r||e._zTime===yn||!t&&e._zTime){if(!e._initted&&JB(e,t,r,n,l))return;for(h=e._zTime,e._zTime=t||(n?yn:0),n||(n=t&&!h),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&AA(e,t,n,!0),e._onUpdate&&!n&&Hr(e,"onUpdate"),l&&e._repeat&&!n&&e.parent&&Hr(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&il(e,1),!n&&!Yi&&(Hr(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},UH=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data==="isPause"&&r._start<t)return r;r=r._prev}},Mf=function(e,t,n,r){var s=e._repeat,o=gi(t)||0,a=e._tTime/e._tDur;return a&&!r&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s<0?1e10:gi(o*(s+1)+e._rDelay*s):o,a>0&&!r&&Nv(e,e._tTime=e._tDur*a),e.parent&&Lv(e),n||hu(e.parent,e),e},Z2=function(e){return e instanceof ar?hu(e):Mf(e,e._dur)},zH={_start:0,endTime:Wh,totalDuration:Wh},as=function i(e,t,n){var r=e.labels,s=e._recent||zH,o=e.duration()>=ms?s.endTime(!1):e._dur,a,l,u;return yi(t)&&(isNaN(t)||t in r)?(l=t.charAt(0),u=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)*(u?(a<0?s:n).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),u&&n&&(l=l/100*(Ki(n)?n[0]:n).totalDuration()),a>1?i(e,t.substr(0,a-1),n)+l:o+l)):t==null?o:+t},oh=function(e,t,n){var r=Zo(t[1]),s=(r?2:1)+(e<2?0:1),o=t[s],a,l;if(r&&(o.duration=t[1]),o.parent=n,e){for(a=o,l=n;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Er(l.vars.inherit)&&l.parent;o.immediateRender=Er(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[s-1]}return new ti(t[0],o,t[s+1])},hl=function(e,t){return e||e===0?t(e):t},mp=function(e,t,n){return n<e?e:n>t?t:n},Wi=function(e,t){return!yi(e)||!(t=RH.exec(e))?"":t[1]},kH=function(e,t,n){return hl(n,function(r){return mp(e,t,r)})},EA=[].slice,jB=function(e,t){return e&&yo(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&yo(e[0]))&&!e.nodeType&&e!==ro},GH=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(r){var s;return yi(r)&&!t||jB(r,1)?(s=n).push.apply(s,gs(r)):n.push(r)})||n},gs=function(e,t,n){return Pn&&!t&&Pn.selector?Pn.selector(e):yi(e)&&!n&&(yA||!Cf())?EA.call((t||IE).querySelectorAll(e),0):Ki(e)?GH(e,n):jB(e)?EA.call(e,0):e?[e]:[]},wA=function(e){return e=gs(e)[0]||Vh("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return gs(t,n.querySelectorAll?n:n===e?Vh("Invalid scope")||IE.createElement("div"):e)}},YB=function(e){return e.sort(function(){return .5-Math.random()})},KB=function(e){if(Wn(e))return e;var t=yo(e)?e:{each:e},n=pu(t.ease),r=t.from||0,s=parseFloat(t.base)||0,o={},a=r>0&&r<1,l=isNaN(r)||a,u=t.axis,f=r,h=r;return yi(r)?f=h={center:.5,edges:.5,end:1}[r]||0:!a&&l&&(f=r[0],h=r[1]),function(p,m,v){var _=(v||t).length,y=o[_],g,A,S,w,P,T,I,D,C;if(!y){if(C=t.grid==="auto"?0:(t.grid||[1,ms])[1],!C){for(I=-ms;I<(I=v[C++].getBoundingClientRect().left)&&C<_;);C<_&&C--}for(y=o[_]=[],g=l?Math.min(C,_)*f-.5:r%C,A=C===ms?0:l?_*h/C-.5:r/C|0,I=0,D=ms,T=0;T<_;T++)S=T%C-g,w=A-(T/C|0),y[T]=P=u?Math.abs(u==="y"?w:S):bB(S*S+w*w),P>I&&(I=P),P<D&&(D=P);r==="random"&&YB(y),y.max=I-D,y.min=D,y.v=_=(parseFloat(t.amount)||parseFloat(t.each)*(C>_?_-1:u?u==="y"?_/C:C:Math.max(C,_/C))||0)*(r==="edges"?-1:1),y.b=_<0?s-_:s,y.u=Wi(t.amount||t.each)||0,n=n&&_<0?sD(n):n}return _=(y[p]-y.min)/y.max||0,gi(y.b+(n?n(_):_)*y.v)+y.u}},MA=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var r=gi(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(Zo(n)?0:Wi(n))}},QB=function(e,t){var n=Ki(e),r,s;return!n&&yo(e)&&(r=n=e.radius||ms,e.values?(e=gs(e.values),(s=!Zo(e[0]))&&(r*=r)):e=MA(e.increment)),hl(t,n?Wn(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),u=ms,f=0,h=e.length,p,m;h--;)s?(p=e[h].x-a,m=e[h].y-l,p=p*p+m*m):p=Math.abs(e[h]-a),p<u&&(u=p,f=h);return f=!r||u<=r?e[f]:o,s||f===o||Zo(o)?f:f+Wi(o)}:MA(e))},qB=function(e,t,n,r){return hl(Ki(e)?!t:n===!0?!!(n=0):!r,function(){return Ki(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},HH=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduce(function(s,o){return o(s)},r)}},VH=function(e,t){return function(n){return e(parseFloat(n))+(t||Wi(n))}},WH=function(e,t,n){return $B(e,t,0,1,n)},ZB=function(e,t,n){return hl(n,function(r){return e[~~t(r)]})},XH=function i(e,t,n){var r=t-e;return Ki(e)?ZB(e,i(0,e.length),t):hl(n,function(s){return(r+(s-e)%r)%r+e})},JH=function i(e,t,n){var r=t-e,s=r*2;return Ki(e)?ZB(e,i(0,e.length-1),t):hl(n,function(o){return o=(s+(o-e)%s)%s||0,e+(o>r?s-o:o)})},Xh=function(e){for(var t=0,n="",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?FB:_A),n+=e.substr(t,r-t)+qB(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),t=o+1;return n+e.substr(t,e.length-t)},$B=function(e,t,n,r,s){var o=t-e,a=r-n;return hl(s,function(l){return n+((l-e)/o*a||0)})},jH=function i(e,t,n,r){var s=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!s){var o=yi(e),a={},l,u,f,h,p;if(n===!0&&(r=1)&&(n=null),o)e={p:e},t={p:t};else if(Ki(e)&&!Ki(t)){for(f=[],h=e.length,p=h-2,u=1;u<h;u++)f.push(i(e[u-1],e[u]));h--,s=function(v){v*=h;var _=Math.min(p,~~v);return f[_](v-_)},n=t}else r||(e=Iu(Ki(e)?[]:{},e));if(!f){for(l in t)NE.call(a,e,l,"get",t[l]);s=function(v){return kE(v,a)||(o?e.p:e)}}}return hl(n,s)},$2=function(e,t,n){var r=e.labels,s=ms,o,a,l;for(o in r)a=r[o]-t,a<0==!!n&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},Hr=function(e,t,n){var r=e.vars,s=r[t],o=Pn,a=e._ctx,l,u,f;if(!!s)return l=r[t+"Params"],u=r.callbackScope||e,n&&Ya.length&&zg(),a&&(Pn=a),f=l?s.apply(u,l):s.call(u),Pn=o,f},Vd=function(e){return il(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Yi),e.progress()<1&&Hr(e,"onInterrupt"),e},jc,eD=[],tD=function(e){if(!!e)if(e=!e.name&&e.default||e,bE()||e.headless){var t=e.name,n=Wn(e),r=t&&!n&&e.init?function(){this._props=[]}:e,s={init:Wh,render:kE,add:NE,kill:u7,modifier:l7,rawVars:0},o={targetTest:0,get:0,getSetter:zE,aliases:{},register:0};if(Cf(),e!==r){if(Ur[t])return;Ss(r,Ss(kg(e,s),o)),Iu(r.prototype,Iu(s,kg(e,o))),Ur[r.prop=t]=r,e.targetTest&&(rg.push(r),DE[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}OB(t,r),e.register&&e.register(Rr,r,Mr)}else eD.push(e)},pn=255,Wd={aqua:[0,pn,pn],lime:[0,pn,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,pn],navy:[0,0,128],white:[pn,pn,pn],olive:[128,128,0],yellow:[pn,pn,0],orange:[pn,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[pn,0,0],pink:[pn,192,203],cyan:[0,pn,pn],transparent:[pn,pn,pn,0]},yy=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*pn+.5|0},nD=function(e,t,n){var r=e?Zo(e)?[e>>16,e>>8&pn,e&pn]:0:Wd.black,s,o,a,l,u,f,h,p,m,v;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Wd[e])r=Wd[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&pn,r&pn,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&pn,e&pn]}else if(e.substr(0,3)==="hsl"){if(r=v=e.match(_A),!t)l=+r[0]%360/360,u=+r[1]/100,f=+r[2]/100,o=f<=.5?f*(u+1):f+u-f*u,s=f*2-o,r.length>3&&(r[3]*=1),r[0]=yy(l+1/3,s,o),r[1]=yy(l,s,o),r[2]=yy(l-1/3,s,o);else if(~e.indexOf("="))return r=e.match(BB),n&&r.length<4&&(r[3]=1),r}else r=e.match(_A)||Wd.transparent;r=r.map(Number)}return t&&!v&&(s=r[0]/pn,o=r[1]/pn,a=r[2]/pn,h=Math.max(s,o,a),p=Math.min(s,o,a),f=(h+p)/2,h===p?l=u=0:(m=h-p,u=f>.5?m/(2-h-p):m/(h+p),l=h===s?(o-a)/m+(o<a?6:0):h===o?(a-s)/m+2:(s-o)/m+4,l*=60),r[0]=~~(l+.5),r[1]=~~(u*100+.5),r[2]=~~(f*100+.5)),n&&r.length<4&&(r[3]=1),r},iD=function(e){var t=[],n=[],r=-1;return e.split(Ka).forEach(function(s){var o=s.match(Jc)||[];t.push.apply(t,o),n.push(r+=o.length+1)}),t.c=n,t},e3=function(e,t,n){var r="",s=(e+r).match(Ka),o=t?"hsla(":"rgba(",a=0,l,u,f,h;if(!s)return e;if(s=s.map(function(p){return(p=nD(p,t,1))&&o+(t?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),n&&(f=iD(e),l=n.c,l.join(r)!==f.c.join(r)))for(u=e.replace(Ka,"1").split(Jc),h=u.length-1;a<h;a++)r+=u[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(f.length?f:s.length?s:n).shift());if(!u)for(u=e.split(Ka),h=u.length-1;a<h;a++)r+=u[a]+s[a];return r+u[h]},Ka=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Wd)i+="|"+e+"\\b";return new RegExp(i+")","gi")}(),YH=/hsl[a]?\(/,rD=function(e){var t=e.join(" "),n;if(Ka.lastIndex=0,Ka.test(t))return n=YH.test(t),e[1]=e3(e[1],n),e[0]=e3(e[0],n,iD(e[1])),!0},Jh,kr=function(){var i=Date.now,e=500,t=33,n=i(),r=n,s=1e3/240,o=s,a=[],l,u,f,h,p,m,v=function _(y){var g=i()-r,A=y===!0,S,w,P,T;if((g>e||g<0)&&(n+=g-t),r+=g,P=r-n,S=P-o,(S>0||A)&&(T=++h.frame,p=P-h.time*1e3,h.time=P=P/1e3,o+=S+(S>=s?4:s-S),w=1),A||(l=u(_)),w)for(m=0;m<a.length;m++)a[m](P,p,T,y)};return h={time:0,frame:0,tick:function(){v(!0)},deltaRatio:function(y){return p/(1e3/(y||60))},wake:function(){LB&&(!yA&&bE()&&(ro=yA=window,IE=ro.document||{},Kr.gsap=Rr,(ro.gsapVersions||(ro.gsapVersions=[])).push(Rr.version),NB(Ug||ro.GreenSockGlobals||!ro.gsap&&ro||{}),eD.forEach(tD)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&h.sleep(),u=f||function(y){return setTimeout(y,o-h.time*1e3+1|0)},Jh=1,v(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(l),Jh=0,u=Wh},lagSmoothing:function(y,g){e=y||1/0,t=Math.min(g||33,e)},fps:function(y){s=1e3/(y||240),o=h.time*1e3+s},add:function(y,g,A){var S=g?function(w,P,T,I){y(w,P,T,I),h.remove(S)}:y;return h.remove(y),a[A?"unshift":"push"](S),Cf(),S},remove:function(y,g){~(g=a.indexOf(y))&&a.splice(g,1)&&m>=g&&m--},_listeners:a},h}(),Cf=function(){return!Jh&&kr.wake()},Xt={},KH=/^[\d.\-M][\d.\-,\s]/,QH=/["']/g,qH=function(e){for(var t={},n=e.substr(1,e.length-3).split(":"),r=n[0],s=1,o=n.length,a,l,u;s<o;s++)l=n[s],a=s!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),t[r]=isNaN(u)?u.replace(QH,"").trim():+u,r=l.substr(a+1).trim();return t},ZH=function(e){var t=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",t);return e.substring(t,~r&&r<n?e.indexOf(")",n+1):n)},$H=function(e){var t=(e+"").split("("),n=Xt[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf("{")?[qH(t[1])]:ZH(e).split(",").map(GB)):Xt._CE&&KH.test(e)?Xt._CE("",e):n},sD=function(e){return function(t){return 1-e(1-t)}},oD=function i(e,t){for(var n=e._first,r;n;)n instanceof ar?i(n,t):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==t&&(n.timeline?i(n.timeline,t):(r=n._ease,n._ease=n._yEase,n._yEase=r,n._yoyo=t)),n=n._next},pu=function(e,t){return e&&(Wn(e)?e:Xt[e]||$H(e))||t},Gu=function(e,t,n,r){n===void 0&&(n=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:n,easeInOut:r},o;return wr(e,function(a){Xt[a]=Kr[a]=s,Xt[o=a.toLowerCase()]=n;for(var l in s)Xt[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Xt[a+"."+l]=s[l]}),s},aD=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},xy=function i(e,t,n){var r=t>=1?t:1,s=(n||(e?.3:.45))/(t<1?t:1),o=s/vA*(Math.asin(1/r)||0),a=function(f){return f===1?1:r*Math.pow(2,-10*f)*TH((f-o)*s)+1},l=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:aD(a);return s=vA/s,l.config=function(u,f){return i(e,u,f)},l},Ay=function i(e,t){t===void 0&&(t=1.70158);var n=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?n:e==="in"?function(s){return 1-n(1-s)}:aD(n);return r.config=function(s){return i(e,s)},r};wr("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;Gu(i+",Power"+(t-1),e?function(n){return Math.pow(n,t)}:function(n){return n},function(n){return 1-Math.pow(1-n,t)},function(n){return n<.5?Math.pow(n*2,t)/2:1-Math.pow((1-n)*2,t)/2})});Xt.Linear.easeNone=Xt.none=Xt.Linear.easeIn;Gu("Elastic",xy("in"),xy("out"),xy());(function(i,e){var t=1/e,n=2*t,r=2.5*t,s=function(a){return a<t?i*a*a:a<n?i*Math.pow(a-1.5/e,2)+.75:a<r?i*(a-=2.25/e)*a+.9375:i*Math.pow(a-2.625/e,2)+.984375};Gu("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);Gu("Expo",function(i){return i?Math.pow(2,10*(i-1)):0});Gu("Circ",function(i){return-(bB(1-i*i)-1)});Gu("Sine",function(i){return i===1?1:-CH(i*wH)+1});Gu("Back",Ay("in"),Ay("out"),Ay());Xt.SteppedEase=Xt.steps=Kr.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+(t?0:1),s=t?1:0,o=1-yn;return function(a){return((r*mp(0,o,a)|0)+s)*n}}};Ef.ease=Xt["quad.out"];wr("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return FE+=i+","+i+"Params,"});var lD=function(e,t){this.id=MH++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:zB,this.set=t?t.getSetter:zE},jh=function(){function i(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,Mf(this,+t.duration,1,1),this.data=t.data,Pn&&(this._ctx=Pn,Pn.data.push(this)),Jh||kr.wake()}var e=i.prototype;return e.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},e.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},e.totalDuration=function(n){return arguments.length?(this._dirty=0,Mf(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(n,r){if(Cf(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(Nv(this,n),!s._dp||s.parent||WB(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&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&oo(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===yn||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),kB(this,n,r)),this},e.time=function(n,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+q2(this))%(this._dur+this._rDelay)||(n?this._dur:0),r):this._time},e.totalProgress=function(n,r){return arguments.length?this.totalTime(this.totalDuration()*n,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(n,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+q2(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(n,r){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*s,r):this._repeat?wf(this._tTime,s)+1:1},e.timeScale=function(n,r){if(!arguments.length)return this._rts===-yn?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?Gg(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-yn?0:this._rts,this.totalTime(mp(-Math.abs(this._delay),this._tDur,s),r!==!1),Lv(this),FH(this)},e.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Cf(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==yn&&(this._tTime-=yn)))),this):this._ps},e.startTime=function(n){if(arguments.length){this._start=n;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&oo(r,this,n-this._delay),this}return this._start},e.endTime=function(n){return this._start+(Er(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(n){var r=this.parent||this._dp;return r?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Gg(r.rawTime(n),this):this._tTime:this._tTime},e.revert=function(n){n===void 0&&(n=bH);var r=Yi;return Yi=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),Yi=r,this},e.globalTime=function(n){for(var r=this,s=arguments.length?n:r.rawTime();r;)s=r._start+s/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(n):s},e.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,Z2(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(n){if(arguments.length){var r=this._time;return this._rDelay=n,Z2(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},e.seek=function(n,r){return this.totalTime(as(this,n),Er(r))},e.restart=function(n,r){return this.play().totalTime(n?-this._delay:0,Er(r))},e.play=function(n,r){return n!=null&&this.seek(n,r),this.reversed(!1).paused(!1)},e.reverse=function(n,r){return n!=null&&this.seek(n||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(n,r){return n!=null&&this.seek(n,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-yn:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-yn,this},e.isActive=function(){var n=this.parent||this._dp,r=this._start,s;return!!(!n||this._ts&&this._initted&&n.isActive()&&(s=n.rawTime(!0))>=r&&s<this.endTime(!0)-yn)},e.eventCallback=function(n,r,s){var o=this.vars;return arguments.length>1?(r?(o[n]=r,s&&(o[n+"Params"]=s),n==="onUpdate"&&(this._onUpdate=r)):delete o[n],this):o[n]},e.then=function(n){var r=this;return new Promise(function(s){var o=Wn(n)?n:HB,a=function(){var u=r.then;r.then=null,Wn(o)&&(o=o(r))&&(o.then||o===r)&&(r.then=u),s(o),r.then=u};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},e.kill=function(){Vd(this)},i}();Ss(jh.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:-yn,_prom:0,_ps:!1,_rts:1});var ar=function(i){PB(e,i);function e(n,r){var s;return n===void 0&&(n={}),s=i.call(this,n)||this,s.labels={},s.smoothChildTiming=!!n.smoothChildTiming,s.autoRemoveChildren=!!n.autoRemoveChildren,s._sort=Er(n.sortChildren),Dn&&oo(n.parent||Dn,No(s),r),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&XB(No(s),n.scrollTrigger),s}var t=e.prototype;return t.to=function(r,s,o){return oh(0,arguments,this),this},t.from=function(r,s,o){return oh(1,arguments,this),this},t.fromTo=function(r,s,o,a){return oh(2,arguments,this),this},t.set=function(r,s,o){return s.duration=0,s.parent=this,sh(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new ti(r,s,as(this,o),1),this},t.call=function(r,s,o){return oo(this,ti.delayedCall(0,r,s),o)},t.staggerTo=function(r,s,o,a,l,u,f){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=f,o.parent=this,new ti(r,o,as(this,l)),this},t.staggerFrom=function(r,s,o,a,l,u,f){return o.runBackwards=1,sh(o).immediateRender=Er(o.immediateRender),this.staggerTo(r,s,o,a,l,u,f)},t.staggerFromTo=function(r,s,o,a,l,u,f,h){return a.startAt=o,sh(a).immediateRender=Er(a.immediateRender),this.staggerTo(r,s,a,l,u,f,h)},t.render=function(r,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,f=r<=0?0:gi(r),h=this._zTime<0!=r<0&&(this._initted||!u),p,m,v,_,y,g,A,S,w,P,T,I;if(this!==Dn&&f>l&&r>=0&&(f=l),f!==this._tTime||o||h){if(a!==this._time&&u&&(f+=this._time-a,r+=this._time-a),p=f,w=this._start,S=this._ts,g=!S,h&&(u||(a=this._zTime),(r||!s)&&(this._zTime=r)),this._repeat){if(T=this._yoyo,y=u+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(y*100+r,s,o);if(p=gi(f%y),f===l?(_=this._repeat,p=u):(_=~~(f/y),_&&_===f/y&&(p=u,_--),p>u&&(p=u)),P=wf(this._tTime,y),!a&&this._tTime&&P!==_&&this._tTime-P*y-this._dur<=0&&(P=_),T&&_&1&&(p=u-p,I=1),_!==P&&!this._lock){var D=T&&P&1,C=D===(T&&_&1);if(_<P&&(D=!D),a=D?0:f%u?u:f,this._lock=1,this.render(a||(I?0:gi(_*y)),s,!u)._lock=0,this._tTime=f,!s&&this.parent&&Hr(this,"onRepeat"),this.vars.repeatRefresh&&!I&&(this.invalidate()._lock=1),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,C&&(this._lock=2,a=D?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!I&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;oD(this,I)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(A=UH(this,gi(a),gi(p)),A&&(f-=p-(p=A._start))),this._tTime=f,this._time=p,this._act=!S,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,a=0),!a&&p&&!s&&!_&&(Hr(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&&A!==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){A=0,v&&(f+=this._zTime=-yn);break}}m=v}else{m=this._last;for(var b=r<0?r:p;m;){if(v=m._prev,(m._act||b<=m._end)&&m._ts&&A!==m){if(m.parent!==this)return this.render(r,s,o);if(m.render(m._ts>0?(b-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(b-m._start)*m._ts,s,o||Yi&&(m._initted||m._startAt)),p!==this._time||!this._ts&&!g){A=0,v&&(f+=this._zTime=b?-yn:yn);break}}m=v}}if(A&&!s&&(this.pause(),A.render(p>=a?0:-yn)._zTime=p>=a?1:-1,this._ts))return this._start=w,Lv(this),this.render(r,s,o);this._onUpdate&&!s&&Hr(this,"onUpdate",!0),(f===l&&this._tTime>=this.totalDuration()||!f&&a)&&(w===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((r||!u)&&(f===l&&this._ts>0||!f&&this._ts<0)&&il(this,1),!s&&!(r<0&&!a)&&(f||a||!l)&&(Hr(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(Zo(s)||(s=as(this,s,r)),!(r instanceof jh)){if(Ki(r))return r.forEach(function(a){return o.add(a,s)}),this;if(yi(r))return this.addLabel(r,s);if(Wn(r))r=ti.delayedCall(0,r);else return this}return this!==r?oo(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=-ms);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof ti?s&&l.push(u):(o&&l.push(u),r&&l.push.apply(l,u.getChildren(!0,s,o)))),u=u._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 yi(r)?this.removeLabel(r):Wn(r)?this.killTweensOf(r):(Fv(this,r),r===this._recent&&(this._recent=this._last),hu(this))},t.totalTime=function(r,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=gi(kr.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),i.prototype.totalTime.call(this,r,s),this._forcing=0,this):this._tTime},t.addLabel=function(r,s){return this.labels[r]=as(this,s),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,s,o){var a=ti.delayedCall(0,s||Wh,o);return a.data="isPause",this._hasPause=1,oo(this,a,as(this,r))},t.removePause=function(r){var s=this._first;for(r=as(this,r);s;)s._start===r&&s.data==="isPause"&&il(s),s=s._next},t.killTweensOf=function(r,s,o){for(var a=this.getTweensOf(r,o),l=a.length;l--;)Fa!==a[l]&&a[l].kill(r,s);return this},t.getTweensOf=function(r,s){for(var o=[],a=gs(r),l=this._first,u=Zo(s),f;l;)l instanceof ti?IH(l._targets,a)&&(u?(!Fa||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=as(o,r),l=s,u=l.startAt,f=l.onStart,h=l.onStartParams,p=l.immediateRender,m,v=ti.to(o,Ss({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||yn,onStart:function(){if(o.pause(),!m){var y=s.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());v._dur!==y&&Mf(v,y,0,1).render(v._time,!0,!0),m=1}f&&f.apply(v,h||[])}},s));return p?v.render(0):v},t.tweenFromTo=function(r,s,o){return this.tweenTo(s,Ss({startAt:{time:as(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),$2(this,as(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),$2(this,as(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+yn)},t.shiftChildren=function(r,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,u;a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(s)for(u in l)l[u]>=o&&(l[u]+=r);return hu(this)},t.invalidate=function(r){var s=this._first;for(this._lock=0;s;)s.invalidate(r),s=s._next;return i.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={}),hu(this)},t.totalDuration=function(r){var s=0,o=this,a=o._last,l=ms,u,f,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(h=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),f=a._start,f>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,oo(o,a,f-a._delay,1)._lock=0):l=f,f<0&&a._ts&&(s-=f,(!h&&!o._dp||h&&h.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=u;Mf(o,o===Dn&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(Dn._ts&&(kB(Dn,Gg(r,Dn)),UB=kr.frame),kr.frame>=K2){K2+=Xr.autoSleep||120;var s=Dn._first;if((!s||!s._ts)&&Xr.autoSleep&&kr._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||kr.sleep()}}},e}(jh);Ss(ar.prototype,{_lock:0,_hasPause:0,_forcing:0});var e7=function(e,t,n,r,s,o,a){var l=new Mr(this._pt,e,t,0,1,pD,null,s),u=0,f=0,h,p,m,v,_,y,g,A;for(l.b=n,l.e=r,n+="",r+="",(g=~r.indexOf("random("))&&(r=Xh(r)),o&&(A=[n,r],o(A,e,t),n=A[0],r=A[1]),p=n.match(vy)||[];h=vy.exec(r);)v=h[0],_=r.substring(u,h.index),m?m=(m+1)%5:_.substr(-5)==="rgba("&&(m=1),v!==p[f++]&&(y=parseFloat(p[f-1])||0,l._pt={_next:l._pt,p:_||f===1?_:",",s:y,c:v.charAt(1)==="="?rf(y,v)-y:parseFloat(v)-y,m:m&&m<4?Math.round:0},u=vy.lastIndex);return l.c=u<r.length?r.substring(u,r.length):"",l.fp=a,(DB.test(r)||g)&&(l.e=0),this._pt=l,l},NE=function(e,t,n,r,s,o,a,l,u,f){Wn(r)&&(r=r(s||0,e,o));var h=e[t],p=n!=="get"?n:Wn(h)?u?e[t.indexOf("set")||!Wn(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():h,m=Wn(h)?u?s7:dD:UE,v;if(yi(r)&&(~r.indexOf("random(")&&(r=Xh(r)),r.charAt(1)==="="&&(v=rf(p,r)+(Wi(p)||0),(v||v===0)&&(r=v))),!f||p!==r||CA)return!isNaN(p*r)&&r!==""?(v=new Mr(this._pt,e,t,+p||0,r-(p||0),typeof h=="boolean"?a7:hD,0,m),u&&(v.fp=u),a&&v.modifier(a,this,e),this._pt=v):(!h&&!(t in e)&&BE(t,r),e7.call(this,e,t,p,r,m,l||Xr.stringFilter,u))},t7=function(e,t,n,r,s){if(Wn(e)&&(e=ah(e,s,t,n,r)),!yo(e)||e.style&&e.nodeType||Ki(e)||IB(e))return yi(e)?ah(e,s,t,n,r):e;var o={},a;for(a in e)o[a]=ah(e[a],s,t,n,r);return o},uD=function(e,t,n,r,s,o){var a,l,u,f;if(Ur[e]&&(a=new Ur[e]).init(s,a.rawVars?t[e]:t7(t[e],r,s,o,n),n,r,o)!==!1&&(n._pt=l=new Mr(n._pt,s,e,0,1,a.render,a,0,a.priority),n!==jc))for(u=n._ptLookup[n._targets.indexOf(s)],f=a._props.length;f--;)u[a._props[f]]=l;return a},Fa,CA,OE=function i(e,t,n){var r=e.vars,s=r.ease,o=r.startAt,a=r.immediateRender,l=r.lazy,u=r.onUpdate,f=r.runBackwards,h=r.yoyoEase,p=r.keyframes,m=r.autoRevert,v=e._dur,_=e._startAt,y=e._targets,g=e.parent,A=g&&g.data==="nested"?g.vars.targets:y,S=e._overwrite==="auto"&&!RE,w=e.timeline,P,T,I,D,C,b,N,j,Y,q,re,Q,pe;if(w&&(!p||!s)&&(s="none"),e._ease=pu(s,Ef.ease),e._yEase=h?sD(pu(h===!0?s:h,Ef.ease)):0,h&&e._yoyo&&!e._repeat&&(h=e._yEase,e._yEase=e._ease,e._ease=h),e._from=!w&&!!r.runBackwards,!w||p&&!r.stagger){if(j=y[0]?du(y[0]).harness:0,Q=j&&r[j.prop],P=kg(r,DE),_&&(_._zTime<0&&_.progress(1),t<0&&f&&a&&!m?_.render(-1,!0):_.revert(f&&v?ig:PH),_._lazy=0),o){if(il(e._startAt=ti.set(y,Ss({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!_&&Er(l),startAt:null,delay:0,onUpdate:u&&function(){return Hr(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Yi||!a&&!m)&&e._startAt.revert(ig),a&&v&&t<=0&&n<=0){t&&(e._zTime=t);return}}else if(f&&v&&!_){if(t&&(a=!1),I=Ss({overwrite:!1,data:"isFromStart",lazy:a&&!_&&Er(l),immediateRender:a,stagger:0,parent:g},P),Q&&(I[j.prop]=Q),il(e._startAt=ti.set(y,I)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Yi?e._startAt.revert(ig):e._startAt.render(-1,!0)),e._zTime=t,!a)i(e._startAt,yn,yn);else if(!t)return}for(e._pt=e._ptCache=0,l=v&&Er(l)||l&&!v,T=0;T<y.length;T++){if(C=y[T],N=C._gsap||LE(y)[T]._gsap,e._ptLookup[T]=q={},xA[N.id]&&Ya.length&&zg(),re=A===y?T:A.indexOf(C),j&&(Y=new j).init(C,Q||P,e,re,A)!==!1&&(e._pt=D=new Mr(e._pt,C,Y.name,0,1,Y.render,Y,0,Y.priority),Y._props.forEach(function(k){q[k]=D}),Y.priority&&(b=1)),!j||Q)for(I in P)Ur[I]&&(Y=uD(I,P,e,re,C,A))?Y.priority&&(b=1):q[I]=D=NE.call(e,C,I,"get",P[I],re,A,0,r.stringFilter);e._op&&e._op[T]&&e.kill(C,e._op[T]),S&&e._pt&&(Fa=e,Dn.killTweensOf(C,q,e.globalTime(t)),pe=!e.parent,Fa=0),e._pt&&l&&(xA[N.id]=1)}b&&mD(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!pe,p&&t<=0&&w.render(ms,!0,!0)},n7=function(e,t,n,r,s,o,a,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],f,h,p,m;if(!u)for(u=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 CA=1,e.vars[t]="+=0",OE(e,a),CA=0,l?Vh(t+" not eligible for reset"):1;u.push(f)}for(m=u.length;m--;)h=u[m],f=h._pt||h,f.s=(r||r===0)&&!s?r:f.s+(r||0)+o*f.c,f.c=n-f.s,h.e&&(h.e=jn(n)+Wi(h.e)),h.b&&(h.b=f.s+Wi(h.b))},i7=function(e,t){var n=e[0]?du(e[0]).harness:0,r=n&&n.aliases,s,o,a,l;if(!r)return t;s=Iu({},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},r7=function(e,t,n,r){var s=t.ease||r||"power1.inOut",o,a;if(Ki(t))a=n[e]||(n[e]=[]),t.forEach(function(l,u){return a.push({t:u/(t.length-1)*100,v:l,e:s})});else for(o in t)a=n[o]||(n[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:s})},ah=function(e,t,n,r,s){return Wn(e)?e.call(t,n,r,s):yi(e)&&~e.indexOf("random(")?Xh(e):e},cD=FE+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",fD={};wr(cD+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return fD[i]=1});var ti=function(i){PB(e,i);function e(n,r,s,o){var a;typeof r=="number"&&(s.duration=r,r=s,s=null),a=i.call(this,o?r:sh(r))||this;var l=a.vars,u=l.duration,f=l.delay,h=l.immediateRender,p=l.stagger,m=l.overwrite,v=l.keyframes,_=l.defaults,y=l.scrollTrigger,g=l.yoyoEase,A=r.parent||Dn,S=(Ki(n)||IB(n)?Zo(n[0]):"length"in r)?[n]:gs(n),w,P,T,I,D,C,b,N;if(a._targets=S.length?LE(S):Vh("GSAP target "+n+" not found. https://gsap.com",!Xr.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=m,v||p||T0(u)||T0(f)){if(r=a.vars,w=a.timeline=new ar({data:"nested",defaults:_||{},targets:A&&A.data==="nested"?A.vars.targets:S}),w.kill(),w.parent=w._dp=No(a),w._start=0,p||T0(u)||T0(f)){if(I=S.length,b=p&&KB(p),yo(p))for(D in p)~cD.indexOf(D)&&(N||(N={}),N[D]=p[D]);for(P=0;P<I;P++)T=kg(r,fD),T.stagger=0,g&&(T.yoyoEase=g),N&&Iu(T,N),C=S[P],T.duration=+ah(u,No(a),P,C,S),T.delay=(+ah(f,No(a),P,C,S)||0)-a._delay,!p&&I===1&&T.delay&&(a._delay=f=T.delay,a._start+=f,T.delay=0),w.to(C,T,b?b(P,C,S):0),w._ease=Xt.none;w.duration()?u=f=0:a.timeline=0}else if(v){sh(Ss(w.vars.defaults,{ease:"none"})),w._ease=pu(v.ease||r.ease||"none");var j=0,Y,q,re;if(Ki(v))v.forEach(function(Q){return w.to(S,Q,">")}),w.duration();else{T={};for(D in v)D==="ease"||D==="easeEach"||r7(D,v[D],T,v.easeEach);for(D in T)for(Y=T[D].sort(function(Q,pe){return Q.t-pe.t}),j=0,P=0;P<Y.length;P++)q=Y[P],re={ease:q.e,duration:(q.t-(P?Y[P-1].t:0))/100*u},re[D]=q.v,w.to(S,re,j),j+=re.duration;w.duration()<u&&w.to({},{duration:u-w.duration()})}}u||a.duration(u=w.duration())}else a.timeline=0;return m===!0&&!RE&&(Fa=No(a),Dn.killTweensOf(S),Fa=0),oo(A,No(a),s),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(h||!u&&!v&&a._start===gi(A._time)&&Er(h)&&LH(No(a))&&A.data!=="nested")&&(a._tTime=-yn,a.render(Math.max(0,-f)||0)),y&&XB(No(a),y),a}var t=e.prototype;return t.render=function(r,s,o){var a=this._time,l=this._tDur,u=this._dur,f=r<0,h=r>l-yn&&!f?l:r<yn?0:r,p,m,v,_,y,g,A,S,w;if(!u)OH(this,r,s,o);else if(h!==this._tTime||!r||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==f){if(p=h,S=this.timeline,this._repeat){if(_=u+this._rDelay,this._repeat<-1&&f)return this.totalTime(_*100+r,s,o);if(p=gi(h%_),h===l?(v=this._repeat,p=u):(v=~~(h/_),v&&v===gi(h/_)&&(p=u,v--),p>u&&(p=u)),g=this._yoyo&&v&1,g&&(w=this._yEase,p=u-p),y=wf(this._tTime,_),p===a&&!o&&this._initted&&v===y)return this._tTime=h,this;v!==y&&(S&&this._yEase&&oD(S,g),this.vars.repeatRefresh&&!g&&!this._lock&&this._time!==_&&this._initted&&(this._lock=o=1,this.render(gi(_*v),!0).invalidate()._lock=0))}if(!this._initted){if(JB(this,f?r:p,o,s,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&v!==y))return this;if(u!==this._dur)return this.render(r,s,o)}if(this._tTime=h,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=A=(w||this._ease)(p/u),this._from&&(this.ratio=A=1-A),p&&!a&&!s&&!v&&(Hr(this,"onStart"),this._tTime!==h))return this;for(m=this._pt;m;)m.r(A,m.d),m=m._next;S&&S.render(r<0?r:S._dur*S._ease(p/this._dur),s,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!s&&(f&&AA(this,r,s,o),Hr(this,"onUpdate")),this._repeat&&v!==y&&this.vars.onRepeat&&!s&&this.parent&&Hr(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(f&&!this._onUpdate&&AA(this,r,!0,!0),(r||!u)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&il(this,1),!s&&!(f&&!a)&&(h||a||g)&&(Hr(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<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),i.prototype.invalidate.call(this,r)},t.resetTo=function(r,s,o,a,l){Jh||kr.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||OE(this,u),f=this._ease(u/this._dur),n7(this,r,s,o,a,f,u,l)?this.resetTo(r,s,o,a,1):(Nv(this,0),this.parent||VB(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?Vd(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,s,Fa&&Fa.vars.overwrite!==!0)._first||Vd(this),this.parent&&o!==this.timeline.totalDuration()&&Mf(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=r?gs(r):a,u=this._ptLookup,f=this._pt,h,p,m,v,_,y,g;if((!s||s==="all")&&DH(a,l))return s==="all"&&(this._pt=0),Vd(this);for(h=this._op=this._op||[],s!=="all"&&(yi(s)&&(_={},wr(s,function(A){return _[A]=1}),s=_),s=i7(a,s)),g=a.length;g--;)if(~l.indexOf(a[g])){p=u[g],s==="all"?(h[g]=s,v=p,m={}):(m=h[g]=h[g]||{},v=s);for(_ in v)y=p&&p[_],y&&((!("kill"in y.d)||y.d.kill(_)===!0)&&Fv(this,y,"_pt"),delete p[_]),m!=="all"&&(m[_]=1)}return this._initted&&!this._pt&&f&&Vd(this),this},e.to=function(r,s){return new e(r,s,arguments[2])},e.from=function(r,s){return oh(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 oh(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 Dn.killTweensOf(r,s,o)},e}(jh);Ss(ti.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});wr("staggerTo,staggerFrom,staggerFromTo",function(i){ti[i]=function(){var e=new ar,t=EA.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var UE=function(e,t,n){return e[t]=n},dD=function(e,t,n){return e[t](n)},s7=function(e,t,n,r){return e[t](r.fp,n)},o7=function(e,t,n){return e.setAttribute(t,n)},zE=function(e,t){return Wn(e[t])?dD:PE(e[t])&&e.setAttribute?o7:UE},hD=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},a7=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},pD=function(e,t){var n=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},kE=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},l7=function(e,t,n,r){for(var s=this._pt,o;s;)o=s._next,s.p===r&&s.modifier(e,t,n),s=o},u7=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Fv(this,t,"_pt"):t.dep||(n=1),t=r;return!n},c7=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},mD=function(e){for(var t=e._pt,n,r,s,o;t;){for(n=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=n}e._pt=s},Mr=function(){function i(t,n,r,s,o,a,l,u,f){this.t=n,this.s=s,this.c=o,this.p=r,this.r=a||hD,this.d=l||this,this.set=u||UE,this.pr=f||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(n,r,s){this.mSet=this.mSet||this.set,this.set=c7,this.m=n,this.mt=s,this.tween=r},i}();wr(FE+"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(i){return DE[i]=1});Kr.TweenMax=Kr.TweenLite=ti;Kr.TimelineLite=Kr.TimelineMax=ar;Dn=new ar({sortChildren:!1,defaults:Ef,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Xr.stringFilter=rD;var mu=[],sg={},f7=[],t3=0,d7=0,Sy=function(e){return(sg[e]||f7).map(function(t){return t()})},TA=function(){var e=Date.now(),t=[];e-t3>2&&(Sy("matchMediaInit"),mu.forEach(function(n){var r=n.queries,s=n.conditions,o,a,l,u;for(a in r)o=ro.matchMedia(r[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,u=1);u&&(n.revert(),l&&t.push(n))}),Sy("matchMediaRevert"),t.forEach(function(n){return n.onMatch(n,function(r){return n.add(null,r)})}),t3=e,Sy("matchMedia"))},gD=function(){function i(t,n){this.selector=n&&wA(n),this.data=[],this._r=[],this.isReverted=!1,this.id=d7++,t&&this.add(t)}var e=i.prototype;return e.add=function(n,r,s){Wn(n)&&(s=r,r=n,n=Wn);var o=this,a=function(){var u=Pn,f=o.selector,h;return u&&u!==o&&u.data.push(o),s&&(o.selector=wA(s)),Pn=o,h=r.apply(o,arguments),Wn(h)&&o._r.push(h),Pn=u,o.selector=f,o.isReverted=!1,h};return o.last=a,n===Wn?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},e.ignore=function(n){var r=Pn;Pn=null,n(this),Pn=r},e.getTweens=function(){var n=[];return this.data.forEach(function(r){return r instanceof i?n.push.apply(n,r.getTweens()):r instanceof ti&&!(r.parent&&r.parent.data==="nested")&&n.push(r)}),n},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(n,r){var s=this;if(n?function(){for(var a=s.getTweens(),l=s.data.length,u;l--;)u=s.data[l],u.data==="isFlip"&&(u.revert(),u.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,h){return h.g-f.g||-1/0}).forEach(function(f){return f.t.revert(n)}),l=s.data.length;l--;)u=s.data[l],u instanceof ar?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof ti)&&u.revert&&u.revert(n);s._r.forEach(function(f){return f(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=mu.length;o--;)mu[o].id===this.id&&mu.splice(o,1)},e.revert=function(n){this.kill(n||{})},i}(),h7=function(){function i(t){this.contexts=[],this.scope=t,Pn&&Pn.data.push(this)}var e=i.prototype;return e.add=function(n,r,s){yo(n)||(n={matches:n});var o=new gD(0,s||this.scope),a=o.conditions={},l,u,f;Pn&&!o.selector&&(o.selector=Pn.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=n;for(u in n)u==="all"?f=1:(l=ro.matchMedia(n[u]),l&&(mu.indexOf(o)<0&&mu.push(o),(a[u]=l.matches)&&(f=1),l.addListener?l.addListener(TA):l.addEventListener("change",TA)));return f&&r(o,function(h){return o.add(null,h)}),this},e.revert=function(n){this.kill(n||{})}
vendor: 5,375 bytes, lines 4003-4011
4003,e.kill=function(n){this.contexts.forEach(function(r){return r.kill(n,!0)})},i}(),Hg={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(function(r){return tD(r)})},timeline:function(e){return new ar(e)},getTweensOf:function(e,t){return Dn.getTweensOf(e,t)},getProperty:function(e,t,n,r){yi(e)&&(e=gs(e)[0]);var s=du(e||{}).get,o=n?HB:GB;return n==="native"&&(n=""),e&&(t?o((Ur[t]&&Ur[t].get||s)(e,t,n,r)):function(a,l,u){return o((Ur[a]&&Ur[a].get||s)(e,a,l,u))})},quickSetter:function(e,t,n){if(e=gs(e),e.length>1){var r=e.map(function(f){return Rr.quickSetter(f,t,n)}),s=r.length;return function(f){for(var h=s;h--;)r[h](f)}}e=e[0]||{};var o=Ur[t],a=du(e),l=a.harness&&(a.harness.aliases||{})[t]||t,u=o?function(f){var h=new o;jc._pt=0,h.init(e,n?f+n:f,jc,0,[e]),h.render(1,h),jc._pt&&kE(1,jc)}:a.set(e,l);return o?u:function(f){return u(e,l,n?f+n:f,a,1)}},quickTo:function(e,t,n){var r,s=Rr.to(e,Iu((r={},r[t]="+=0.1",r.paused=!0,r),n||{})),o=function(l,u,f){return s.resetTo(t,l,u,f)};return o.tween=s,o},isTweening:function(e){return Dn.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=pu(e.ease,Ef.ease)),Q2(Ef,e||{})},config:function(e){return Q2(Xr,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,s=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!Ur[a]&&!Kr[a]&&Vh(t+" effect requires "+a+" plugin.")}),_y[t]=function(a,l,u){return n(gs(a),Ss(l||{},s),u)},o&&(ar.prototype[t]=function(a,l,u){return this.add(_y[t](a,yo(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){Xt[e]=pu(t)},parseEase:function(e,t){return arguments.length?pu(e,t):Xt},getById:function(e){return Dn.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new ar(e),r,s;for(n.smoothChildTiming=Er(e.smoothChildTiming),Dn.remove(n),n._dp=0,n._time=n._tTime=Dn._time,r=Dn._first;r;)s=r._next,(t||!(!r._dur&&r instanceof ti&&r.vars.onComplete===r._targets[0]))&&oo(n,r,r._start-r._delay),r=s;return oo(Dn,n,0),n},context:function(e,t){return e?new gD(e,t):Pn},matchMedia:function(e){return new h7(e)},matchMediaRefresh:function(){return mu.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||TA()},addEventListener:function(e,t){var n=sg[e]||(sg[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=sg[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:XH,wrapYoyo:JH,distribute:KB,random:qB,snap:QB,normalize:WH,getUnit:Wi,clamp:kH,splitColor:nD,toArray:gs,selector:wA,mapRange:$B,pipe:HH,unitize:VH,interpolate:jH,shuffle:YB},install:NB,effects:_y,ticker:kr,updateRoot:ar.updateRoot,plugins:Ur,globalTimeline:Dn,core:{PropTween:Mr,globals:OB,Tween:ti,Timeline:ar,Animation:jh,getCache:du,_removeLinkedListItem:Fv,reverting:function(){return Yi},context:function(e){return e&&Pn&&(Pn.data.push(e),e._ctx=Pn),Pn},suppressOverwrites:function(e){return RE=e}}};wr("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return Hg[i]=ti[i]});kr.add(ar.updateRoot);jc=Hg.to({},{duration:0});var p7=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},m7=function(e,t){var n=e._targets,r,s,o;for(r in t)for(s=n.length;s--;)o=e._ptLookup[s][r],o&&(o=o.d)&&(o._pt&&(o=p7(o,r)),o&&o.modifier&&o.modifier(t[r],e,n[s],r))},Ey=function(e,t){return{name:e,rawVars:1,init:function(r,s,o){o._onInit=function(a){var l,u;if(yi(s)&&(l={},wr(s,function(f){return l[f]=1}),s=l),t){l={};for(u in s)l[u]=t(s[u]);s=l}m7(a,s)}}}},Rr=Hg.registerPlugin({name:"attr",init:function(e,t,n,r,s){var o,a,l;this.tween=n;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 n=t._pt;n;)Yi?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},Ey("roundProps",MA),Ey("modifiers"),Ey("snap",QB))||Hg;ti.version=ar.version=Rr.version="3.12.5";LB=1;bE()&&Cf();Xt.Power0;Xt.Power1;Xt.Power2;Xt.Power3;Xt.Power4;Xt.Linear;Xt.Quad;Xt.Cubic;Xt.Quart;Xt.Quint;Xt.Strong;Xt.Elastic;Xt.Back;Xt.SteppedEase;Xt.Bounce;Xt.Sine;Xt.Expo;Xt.Circ;/*! 4004 * CSSPlugin 3.12.5 4005 * https://gsap.com 4006 * 4007 * Copyright 2008-2024, GreenSock. All rights reserved. 4008 * Subject to the terms at https://gsap.com/standard-license or for 4009 * Club GSAP members, the agreement issued with that membership. 4010 * @author: Jack Doyle, [email protected] 4011*/var n3,La,sf,GE,su,i3,HE,g7=function(){return typeof window<"u"},$o={},Xl=180/Math.PI,of=Math.PI/180,Mc=Math.atan2,r3=1e8,VE=/([A-Z])/g,v7=/(left|right|width|margin|padding|x)/i,_7=/[\s,\(]\S/,uo={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},RA=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},y7=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)},x7=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)},A7=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},vD=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_D=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},S7=function(e,t,n){return e.style[t]=n},E7=function(e,t,n){return e.style.setProperty(t,n)},w7=function(e,t,n){return e._gsap[t]=n},M7=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n}
vendor: 4,658 bytes, line 4011
4011,C7=function(e,t,n,r,s){var o=e._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},T7=function(e,t,n,r,s){var o=e._gsap;o[t]=n,o.renderTransform(s,o)},Ln="transform",Cr=Ln+"Origin",R7=function i(e,t){var n=this,r=this.target,s=r.style,o=r._gsap;if(e in $o&&s){if(this.tfm=this.tfm||{},e!=="transform")e=uo[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return n.tfm[a]=Uo(r,a)}):this.tfm[e]=o.x?o[e]:Uo(r,e),e===Cr&&(this.tfm.zOrigin=o.zOrigin);else return uo.transform.split(",").forEach(function(a){return i.call(n,a,t)});if(this.props.indexOf(Ln)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Cr,t,"")),e=Ln}(s||t)&&this.props.push(e,t,s[e])},yD=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},P7=function(){var e=this.props,t=this.target,n=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]?n[e[s]]=e[s+2]:n.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(VE,"-$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=HE(),(!s||!s.isStart)&&!n[Ln]&&(yD(n),r.zOrigin&&n[Cr]&&(n[Cr]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}},xD=function(e,t){var n={target:e,props:[],revert:P7,save:R7};return e._gsap||Rr.core.getCache(e),t&&t.split(",").forEach(function(r){return n.save(r)}),n},AD,PA=function(e,t){var n=La.createElementNS?La.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):La.createElement(e);return n&&n.style?n:La.createElement(e)},vo=function i(e,t,n){var r=getComputedStyle(e);return r[t]||r.getPropertyValue(t.replace(VE,"-$1").toLowerCase())||r.getPropertyValue(t)||!n&&i(e,Tf(t)||t,1)||""},s3="O,Moz,ms,Ms,Webkit".split(","),Tf=function(e,t,n){var r=t||su,s=r.style,o=5;if(e in s&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(s3[o]+e in s););return o<0?null:(o===3?"ms":o>=0?s3[o]:"")+e},bA=function(){g7()&&window.document&&(n3=window,La=n3.document,sf=La.documentElement,su=PA("div")||{style:{}},PA("div"),Ln=Tf(Ln),Cr=Ln+"Origin",su.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",AD=!!Tf("perspective"),HE=Rr.core.reverting,GE=1)},wy=function i(e){var t=PA("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,r=this.nextSibling,s=this.style.cssText,o;if(sf.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=i}catch{}else this._gsapBBox&&(o=this._gsapBBox());return n&&(r?n.insertBefore(this,r):n.appendChild(this)),sf.removeChild(t),this.style.cssText=s,o},o3=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},SD=function(e){var t;try{t=e.getBBox()}catch{t=wy.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===wy||(t=wy.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+o3(e,["x","cx","x1"])||0,y:+o3(e,["y","cy","y1"])||0,width:0,height:0}:t},ED=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&SD(e))},Bu=function(e,t){if(t){var n=e.style,r;t in $o&&t!==Cr&&(t=Ln),n.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),n.removeProperty(r==="--"?t:t.replace(VE,"-$1").toLowerCase())):n.removeAttribute(t)}},Na=function(e,t,n,r,s,o){var a=new Mr(e._pt,t,n,0,1,o?_D:vD);return e._pt=a,a.b=r,a.e=s,e._props.push(n),a},a3={deg:1,rad:1,turn:1},b7={grid:1,flex:1},rl=function i(e,t,n,r){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=su.style,l=v7.test(t),u=e.tagName.toLowerCase()==="svg",f=(u?"client":"offset")+(l?"Width":"Height"),h=100,p=r==="px",m=r==="%",v,_,y,g;if(r===o||!s||a3[r]||a3[o])return s;if(o!=="px"&&!p&&(s=i(e,t,n,"px")),g=e.getCTM&&ED(e),(m||o==="%")&&($o[t]||~t.indexOf("adius")))return v=g?e.getBBox()[l?"width":"height"]:e[f],jn(m?s/v*h:s/100*v);if(a[l?"width":"height"]=h+(p?o:r),_=~t.indexOf("adius")||r==="em"&&e.appendChild&&!u?e:e.parentNode,g&&(_=(e.ownerSVGElement||{}).parentNode),(!_||_===La||!_.appendChild)&&(_=La.body),y=_._gsap,y&&m&&y.width&&l&&y.time===kr.time&&!y.uncache)return jn(s/y.width*h);if(m&&(t==="height"||t==="width")){var A=e.style[t];e.style[t]=h+r,v=e[f],A?e.style[t]=A:Bu(e,t)}else(m||o==="%")&&!b7[vo(_,"display")]&&(a.position=vo(e,"position")),_===e&&(a.position="static"),_.appendChild(su),v=su[f],_.removeChild(su),a.position="absolute";return l&&m&&(y=du(_),y.time=kr.time,y.width=_[f]),jn(p?v*s/h:v&&s?h/v*s:0)},Uo=function(e,t,n,r){var s;return GE||bA(),t in uo&&t!=="transform"&&(t=uo[t],~t.indexOf(",")&&(t=t.
vendor: 12,228 bytes, line 4011
4011split(",")[0])),$o[t]&&t!=="transform"?(s=Kh(e,r),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:Wg(vo(e,Cr))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||r||~(s+"").indexOf("calc("))&&(s=Vg[t]&&Vg[t](e,t,n)||vo(e,t)||zB(e,t)||(t==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?rl(e,t,s,n)+n:s},I7=function(e,t,n,r){if(!n||n==="none"){var s=Tf(t,e,1),o=s&&vo(e,s,1);o&&o!==n?(t=s,n=o):t==="borderColor"&&(n=vo(e,"borderTopColor"))}var a=new Mr(this._pt,e.style,t,0,1,pD),l=0,u=0,f,h,p,m,v,_,y,g,A,S,w,P;if(a.b=n,a.e=r,n+="",r+="",r==="auto"&&(_=e.style[t],e.style[t]=r,r=vo(e,t)||r,_?e.style[t]=_:Bu(e,t)),f=[n,r],rD(f),n=f[0],r=f[1],p=n.match(Jc)||[],P=r.match(Jc)||[],P.length){for(;h=Jc.exec(r);)y=h[0],A=r.substring(l,h.index),v?v=(v+1)%5:(A.substr(-5)==="rgba("||A.substr(-5)==="hsla(")&&(v=1),y!==(_=p[u++]||"")&&(m=parseFloat(_)||0,w=_.substr((m+"").length),y.charAt(1)==="="&&(y=rf(m,y)+w),g=parseFloat(y),S=y.substr((g+"").length),l=Jc.lastIndex-S.length,S||(S=S||Xr.units[t]||w,l===r.length&&(r+=S,a.e+=S)),w!==S&&(m=rl(e,t,_,S)||0),a._pt={_next:a._pt,p:A||u===1?A:",",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"?_D:vD;return DB.test(r)&&(a.e=0),this._pt=a,a},l3={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},B7=function(e){var t=e.split(" "),n=t[0],r=t[1]||"50%";return(n==="top"||n==="bottom"||r==="left"||r==="right")&&(e=n,n=r,r=e),t[0]=l3[n]||n,t[1]=l3[r]||r,t.join(" ")},D7=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,s=t.u,o=n._gsap,a,l,u;if(s==="all"||s===!0)r.cssText="",l=1;else for(s=s.split(","),u=s.length;--u>-1;)a=s[u],$o[a]&&(l=1,a=a==="transformOrigin"?Cr:Ln),Bu(n,a);l&&(Bu(n,Ln),o&&(o.svg&&n.removeAttribute("transform"),Kh(n,1),o.uncache=1,yD(r)))}},Vg={clearProps:function(e,t,n,r,s){if(s.data!=="isFromStart"){var o=e._pt=new Mr(e._pt,t,n,0,0,D7);return o.u=r,o.pr=-10,o.tween=s,e._props.push(n),1}}},Yh=[1,0,0,1,0,0],wD={},MD=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},u3=function(e){var t=vo(e,Ln);return MD(t)?Yh:t.substr(7).match(BB).map(jn)},WE=function(e,t){var n=e._gsap||du(e),r=e.style,s=u3(e),o,a,l,u;return n.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"?Yh:s):(s===Yh&&!e.offsetParent&&e!==sf&&!n.svg&&(l=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(u=1,a=e.nextElementSibling,sf.appendChild(e)),s=u3(e),l?r.display=l:Bu(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):sf.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},IA=function(e,t,n,r,s,o){var a=e._gsap,l=s||WE(e,!0),u=a.xOrigin||0,f=a.yOrigin||0,h=a.xOffset||0,p=a.yOffset||0,m=l[0],v=l[1],_=l[2],y=l[3],g=l[4],A=l[5],S=t.split(" "),w=parseFloat(S[0])||0,P=parseFloat(S[1])||0,T,I,D,C;n?l!==Yh&&(I=m*y-v*_)&&(D=w*(y/I)+P*(-_/I)+(_*A-y*g)/I,C=w*(-v/I)+P*(m/I)-(m*A-v*g)/I,w=D,P=C):(T=SD(e),w=T.x+(~S[0].indexOf("%")?w/100*T.width:w),P=T.y+(~(S[1]||S[0]).indexOf("%")?P/100*T.height:P)),r||r!==!1&&a.smooth?(g=w-u,A=P-f,a.xOffset=h+(g*m+A*_)-g,a.yOffset=p+(g*v+A*y)-A):a.xOffset=a.yOffset=0,a.xOrigin=w,a.yOrigin=P,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!n,e.style[Cr]="0px 0px",o&&(Na(o,a,"xOrigin",u,w),Na(o,a,"yOrigin",f,P),Na(o,a,"xOffset",h,a.xOffset),Na(o,a,"yOffset",p,a.yOffset)),e.setAttribute("data-svg-origin",w+" "+P)},Kh=function(e,t){var n=e._gsap||new lD(e);if("x"in n&&!t&&!n.uncache)return n;var r=e.style,s=n.scaleX<0,o="px",a="deg",l=getComputedStyle(e),u=vo(e,Cr)||"0",f,h,p,m,v,_,y,g,A,S,w,P,T,I,D,C,b,N,j,Y,q,re,Q,pe,k,ne,te,ce,_e,Fe,ue,Ee;return f=h=p=_=y=g=A=S=w=0,m=v=1,n.svg=!!(e.getCTM&&ED(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(r[Ln]=(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[Ln]!=="none"?l[Ln]:"")),r.scale=r.rotate=r.translate="none"),I=WE(e,n.svg),n.svg&&(n.uncache?(k=e.getBBox(),u=n.xOrigin-k.x+"px "+(n.yOrigin-k.y)+"px",pe=""):pe=!t&&e.getAttribute("data-svg-origin"),IA(e,pe||u,!!pe||n.originIsAbsolute,n.smooth!==!1,I)),P=n.xOrigin||0,T=n.yOrigin||0,I!==Yh&&(N=I[0],j=I[1],Y=I[2],q=I[3],f=re=I[4],h=Q=I[5],I.length===6?(m=Math.sqrt(N*N+j*j),v=Math.sqrt(q*q+Y*Y),_=N||j?Mc(j,N)*Xl:0,A=Y||q?Mc(Y,q)*Xl+_:0,A&&(v*=Math.abs(Math.cos(A*of))),n.svg&&(f-=P-(P*N+T*Y),h-=T-(P*j+T*q))):(Ee=I[6],Fe=I[7],te=I[8],ce=I[9],_e=I[10],ue=I[11],f=I[12],h=I[13],p=I[14],D=Mc(Ee,_e),y=D*Xl,D&&(C=Math.cos(-D),b=Math.sin(-D),pe=re*C+te*b,k=Q*C+ce*b,ne=Ee*C+_e*b,te=re*-b+te*C,ce=Q*-b+ce*C,_e=Ee*-b+_e*C,ue=Fe*-b+ue*C,re=pe,Q=k,Ee=ne),D=Mc(-Y,_e),g=D*Xl,D&&(C=Math.cos(-D),b=Math.sin(-D),pe=N*C-te*b,k=j*C-ce*b,ne=Y*C-_e*b,ue=q*b+ue*C,N=pe,j=k,Y=ne),D=Mc(j,N),_=D*Xl,D&&(C=Math.cos(D),b=Math.sin(D),pe=N*C+j*b,k=re*C+Q*b,j=j*C-N*b,Q=Q*C-re*b,N=pe,re=k),y&&Math.abs(y)+Math.abs(_)>359.9&&(y=_=0,g=180-g),m=jn(Math.sqrt(N*N+j*j+Y*Y)),v=jn(Math.sqrt(Q*Q+Ee*Ee)),D=Mc(re,Q),A=Math.abs(D)>2e-4?D*Xl:0,w=ue?1/(ue<0?-ue:ue):0),n.svg&&(pe=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!MD(vo(e,Ln)),pe&&e.setAttribute("transform",pe))),Math.abs(A)>90&&Math.abs(A)<270&&(s?(m*=-1,A+=_<=0?180:-180,_+=_<=0?180:-180):(v*=-1,A+=A<=0?180:-180)),t=t||n.uncache,n.x=f-((n.xPercent=f&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-f)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+o,n.y=h-((n.yPercent=h&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+o,n.z=p+o,n.scaleX=jn(m),n.scaleY=jn(v),n.rotation=jn(_)+a,n.rotationX=jn(y)+a,n.rotationY=jn(g)+a,n.skewX=A+a,n.skewY=S+a,n.transformPerspective=w+o,(n.zOrigin=parseFloat(u.split(" ")[2])||!t&&n.zOrigin||0)&&(r[Cr]=Wg(u)),n.xOffset=n.yOffset=0,n.force3D=Xr.force3D,n.renderTransform=n.svg?L7:AD?CD:F7,n.uncache=0,n},Wg=function(e){return(e=e.split(" "))[0]+" "+e[1]},My=function(e,t,n){var r=Wi(t);return jn(parseFloat(t)+parseFloat(rl(e,"x",n+"px",r)))+r},F7=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,CD(e,t)},Ul="0deg",Ld="0px",zl=") ",CD=function(e,t){var n=t||this,r=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.z,u=n.rotation,f=n.rotationY,h=n.rotationX,p=n.skewX,m=n.skewY,v=n.scaleX,_=n.scaleY,y=n.transformPerspective,g=n.force3D,A=n.target,S=n.zOrigin,w="",P=g==="auto"&&e&&e!==1||g===!0;if(S&&(h!==Ul||f!==Ul)){var T=parseFloat(f)*of,I=Math.sin(T),D=Math.cos(T),C;T=parseFloat(h)*of,C=Math.cos(T),o=My(A,o,I*C*-S),a=My(A,a,-Math.sin(T)*-S),l=My(A,l,D*C*-S+S)}y!==Ld&&(w+="perspective("+y+zl),(r||s)&&(w+="translate("+r+"%, "+s+"%) "),(P||o!==Ld||a!==Ld||l!==Ld)&&(w+=l!==Ld||P?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+zl),u!==Ul&&(w+="rotate("+u+zl),f!==Ul&&(w+="rotateY("+f+zl),h!==Ul&&(w+="rotateX("+h+zl),(p!==Ul||m!==Ul)&&(w+="skew("+p+", "+m+zl),(v!==1||_!==1)&&(w+="scale("+v+", "+_+zl),A.style[Ln]=w||"translate(0, 0)"},L7=function(e,t){var n=t||this,r=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.rotation,u=n.skewX,f=n.skewY,h=n.scaleX,p=n.scaleY,m=n.target,v=n.xOrigin,_=n.yOrigin,y=n.xOffset,g=n.yOffset,A=n.forceCSS,S=parseFloat(o),w=parseFloat(a),P,T,I,D,C;l=parseFloat(l),u=parseFloat(u),f=parseFloat(f),f&&(f=parseFloat(f),u+=f,l+=f),l||u?(l*=of,u*=of,P=Math.cos(l)*h,T=Math.sin(l)*h,I=Math.sin(l-u)*-p,D=Math.cos(l-u)*p,u&&(f*=of,C=Math.tan(u-f),C=Math.sqrt(1+C*C),I*=C,D*=C,f&&(C=Math.tan(f),C=Math.sqrt(1+C*C),P*=C,T*=C)),P=jn(P),T=jn(T),I=jn(I),D=jn(D)):(P=h,D=p,T=I=0),(S&&!~(o+"").indexOf("px")||w&&!~(a+"").indexOf("px"))&&(S=rl(m,"x",o,"px"),w=rl(m,"y",a,"px")),(v||_||y||g)&&(S=jn(S+v-(v*P+_*I)+y),w=jn(w+_-(v*T+_*D)+g)),(r||s)&&(C=m.getBBox(),S=jn(S+r/100*C.width),w=jn(w+s/100*C.height)),C="matrix("+P+","+T+","+I+","+D+","+S+","+w+")",m.setAttribute("transform",C),A&&(m.style[Ln]=C)},N7=function(e,t,n,r,s){var o=360,a=yi(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Xl:1),u=l-r,f=r+u+"deg",h,p;return a&&(h=s.split("_")[1],h==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),h==="cw"&&u<0?u=(u+o*r3)%o-~~(u/o)*o:h==="ccw"&&u>0&&(u=(u-o*r3)%o-~~(u/o)*o)),e._pt=p=new Mr(e._pt,t,n,r,u,y7),p.e=f,p.u="deg",e._props.push(n),p},c3=function(e,t){for(var n in t)e[n]=t[n];return e},O7=function(e,t,n){var r=c3({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,u,f,h,p,m,v;r.svg?(u=n.getAttribute("transform"),n.setAttribute("transform",""),o[Ln]=t,a=Kh(n,1),Bu(n,Ln),n.setAttribute("transform",u)):(u=getComputedStyle(n)[Ln],o[Ln]=t,a=Kh(n,1),o[Ln]=u);for(l in $o)u=r[l],f=a[l],u!==f&&s.indexOf(l)<0&&(m=Wi(u),v=Wi(f),h=m!==v?rl(n,l,u,v):parseFloat(u),p=parseFloat(f),e._pt=new Mr(e._pt,a,l,h,p-h,RA),e._pt.u=v||0,e._props.push(l));c3(a,r)};wr("padding,margin,Width,Radius",function(i,e){var t="Top",n="Right",r="Bottom",s="Left",o=(e<3?[t,n,r,s]:[t+s,t+n,r+n,r+s]).map(function(a){return e<2?i+a:"border"+a+i});Vg[e>1?"border"+i:i]=function(a,l,u,f,h){var p,m;if(arguments.length<4)return p=o.map(function(v){return Uo(a,v,u)}),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,h)}});var TD={name:"css",register:bA,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,s){var o=this._props,a=e.style,l=n.vars.startAt,u,f,h,p,m,v,_,y,g,A,S,w,P,T,I,D;GE||bA(),this.styles=this.styles||xD(e),D=this.styles.props,this.tween=n;for(_ in t)if(_!=="autoRound"&&(f=t[_],!(Ur[_]&&uD(_,t,n,r,e,s)))){if(m=typeof f,v=Vg[_],m==="function"&&(f=f.call(n,r,e,s),m=typeof f),m==="string"&&~f.indexOf("random(")&&(f=Xh(f)),v)v(this,e,_,f,n)&&(I=1);else if(_.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(_)+"").trim(),f+="",Ka.lastIndex=0,Ka.test(u)||(y=Wi(u),g=Wi(f)),g?y!==g&&(u=rl(e,_,u,g)+g):y&&(f+=y),this.add(a,"setProperty",u,f,r,s,0,0,_),o.push(_),D.push(_,0,a[_]);else if(m!=="undefined"){if(l&&_ in l?(u=typeof l[_]=="function"?l[_].call(n,r,e,s):l[_],yi(u)&&~u.indexOf("random(")&&(u=Xh(u)),Wi(u+"")||u==="auto"||(u+=Xr.units[_]||Wi(Uo(e,_))||""),(u+"").charAt(1)==="="&&(u=Uo(e,_))):u=Uo(e,_),p=parseFloat(u),A=m==="string"&&f.charAt(1)==="="&&f.substr(0,2),A&&(f=f.substr(2)),h=parseFloat(f),_ in uo&&(_==="autoAlpha"&&(p===1&&Uo(e,"visibility")==="hidden"&&h&&(p=0),D.push("visibility",0,a.visibility),Na(this,a,"visibility",p?"inherit":"hidden",h?"inherit":"hidden",!h)),_!=="scale"&&_!=="transform"&&(_=uo[_],~_.indexOf(",")&&(_=_.split(",")[0]))),S=_ in $o,S){if(this.styles.save(_),w||(P=e._gsap,P.renderTransform&&!t.parseTransform||Kh(e,t.parseTransform),T=t.smoothOrigin!==!1&&P.smooth,w=this._pt=new Mr(this._pt,a,Ln,0,1,P.renderTransform,P,0,-1),w.dep=1),_==="scale")this._pt=new Mr(this._pt,P,"scaleY",P.scaleY,(A?rf(P.scaleY,A+h):h)-P.scaleY||0,RA),this._pt.u=0,o.push("scaleY",_),_+="X";else if(_==="transformOrigin"){D.push(Cr,0,a[Cr]),f=B7(f),P.svg?IA(e,f,0,T,0,this):(g=parseFloat(f.split(" ")[2])||0,g!==P.zOrigin&&Na(this,P,"zOrigin",P.zOrigin,g),Na(this,a,_,Wg(u),Wg(f)));continue}else if(_==="svgOrigin"){IA(e,f,1,T,0,this);continue}else if(_ in wD){N7(this,P,_,p,A?rf(p,A+f):f);continue}else if(_==="smoothOrigin"){Na(this,P,"smooth",P.smooth,f);continue}else if(_==="force3D"){P[_]=f;continue}else if(_==="transform"){O7(this,f,e);continue}}else _ in a||(_=Tf(_)||_);if(S||(h||h===0)&&(p||p===0)&&!_7.test(f)&&_ in a)y=(u+"").substr((p+"").length),h||(h=0),g=Wi(f)||(_ in Xr.units?Xr.units[_]:y),y!==g&&(p=rl(e,_,u,g)),this._pt=new Mr(this._pt,S?P:a,_,p,(A?rf(p,A+h):h)-p,!S&&(g==="px"||_==="zIndex")&&t.autoRound!==!1?A7:RA),this._pt.u=g||0,y!==g&&g!=="%"&&(this._pt.b=u,this._pt.r=x7);else if(_ in a)I7.call(this,e,_,u,A?A+f:f);else if(_ in e)this.add(e,_,u||e[_],A?A+f:f,r,s);else if(_!=="parseTransform"){BE(_,f);continue}S||(_ in a?D.push(_,0,a[_]):D.push(_,1,u||e[_])),o.push(_)}}I&&mD(this)},render:function(e,t){if(t.tween._time||!HE())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:Uo,aliases:uo,getSetter:function(e,t,n){var r=uo[t];return r&&r.indexOf(",")<0&&(t=r),t in $o&&t!==Cr&&(e._gsap.x||Uo(e,"x"))?n&&i3===n?t==="scale"?M7:w7:(i3=n||{})&&(t==="scale"?C7:T7):e.style&&!PE(e.style[t])?S7:~t.indexOf("-")?
4011E7:zE(e,t)},core:{_removeProperty:Bu,_getMatrix:WE}};Rr.utils.checkPrefix=Tf;Rr.core.getStyleSaver=xD;(function(i,e,t,n){var r=wr(i+","+e+","+t,function(s){$o[s]=1});wr(e,function(s){Xr.units[s]="deg",wD[s]=1}),uo[r[13]]=i+","+e,wr(n,function(s){var o=s.split(":");uo[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");wr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){Xr.units[i]="px"});Rr.registerPlugin(TD);var Gf=Rr.registerPlugin(TD)||Rr;Gf.core.Tween;/*! 4012 * @gsap/react 2.1.1 4013 * https://gsap.com 4014 * 4015 * Copyright 2008-2024, GreenSock. All rights reserved. 4016 * Subject to the terms at https://gsap.com/standard-license or for 4017 * Club GSAP members, the agreement issued with that membership. 4018 * @author: Jack Doyle, [email protected] 4019*/let f3=typeof window<"u"?K.exports.useLayoutEffect:K.exports.useEffect,d3=i=>i&&!Array.isArray(i)&&typeof i=="object",R0=[],U7={},RD=Gf;const Ov=(i,e=R0)=>{let t=U7;d3(i)?(t=i,i=null,e="dependencies"in t?t.dependencies:R0):d3(e)&&(t=e,e="dependencies"in t?t.dependencies:R0),i&&typeof i!="function"&&console.warn("First parameter must be a function or config object");const{scope:n,revertOnUpdate:r}=t,s=K.exports.useRef(!1),o=K.exports.useRef(RD.context(()=>{},n)),a=K.exports.useRef(u=>o.current.add(null,u)),l=e&&e.length&&!r;return f3(()=>{if(i&&o.current.add(i,n),!l||!s.current)return()=>o.current.revert()},e),l&&f3(()=>(s.current=!0,()=>o.current.revert()),R0),{context:o.current,contextSafe:a.current}};Ov.register=i=>{RD=i};Ov.headless=!0;var Si=[];for(var Cy=0;Cy<256;++Cy)Si.push((Cy+256).toString(16).slice(1));function z7(i,e=0){return(Si[i[e+0]]+Si[i[e+1]]+Si[i[e+2]]+Si[i[e+3]]+"-"+Si[i[e+4]]+Si[i[e+5]]+"-"+Si[i[e+6]]+Si[i[e+7]]+"-"+Si[i[e+8]]+Si[i[e+9]]+"-"+Si[i[e+10]]+Si[i[e+11]]+Si[i[e+12]]+Si[i[e+13]]+Si[i[e+14]]+Si[i[e+15]]).toLowerCase()}var P0,k7=new Uint8Array(16);function G7(){if(!P0&&(P0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!P0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P0(k7)}var H7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const h3={randomUUID:H7};function PD(i,e,t){if(h3.randomUUID&&!e&&!i)return h3.randomUUID();i=i||{};var n=i.random||(i.rng||G7)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(var r=0;r<16;++r)e[t+r]=n[r];return e}return z7(n)}/*! 4020 * paths 3.12.5 4021 * https://gsap.com 4022 * 4023 * Copyright 2008-2024, GreenSock. All rights reserved. 4024 * Subject to the terms at https://gsap.com/standard-license or for 4025 * Club GSAP members, the agreement issued with that membership. 4026 * @author: Jack Doyle, [email protected] 4027*/var V7=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,W7=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,X7=Math.PI/180,b0=Math.sin,I0=Math.cos,lh=Math.abs,Nd=Math.sqrt,J7=function(e){return typeof e=="number"},p3=1e5,Sa=function(e){return Math.round(e*p3)/p3||0};function j7(i,e,t,n,r,s,o){for(var a=i.length,l,u,f,h,p;--a>-1;)for(l=i[a],u=l.length,f=0;f<u;f+=2)h=l[f],p=l[f+1],l[f]=h*e+p*n+s,l[f+1]=h*t+p*r+o;return i._dirty=1,i}function Y7(i,e,t,n,r,s,o,a,l){if(!(i===a&&e===l)){t=lh(t),n=lh(n);var u=r%360*X7,f=I0(u),h=b0(u),p=Math.PI,m=p*2,v=(i-a)/2,_=(e-l)/2,y=f*v+h*_,g=-h*v+f*_,A=y*y,S=g*g,w=A/(t*t)+S/(n*n);w>1&&(t=Nd(w)*t,n=Nd(w)*n);var P=t*t,T=n*n,I=(P*T-P*S-T*A)/(P*S+T*A);I<0&&(I=0);var D=(s===o?-1:1)*Nd(I),C=D*(t*g/n),b=D*-(n*y/t),N=(i+a)/2,j=(e+l)/2,Y=N+(f*C-h*b),q=j+(h*C+f*b),re=(y-C)/t,Q=(g-b)/n,pe=(-y-C)/t,k=(-g-b)/n,ne=re*re+Q*Q,te=(Q<0?-1:1)*Math.acos(re/Nd(ne)),ce=(re*k-Q*pe<0?-1:1)*Math.acos((re*pe+Q*k)/Nd(ne*(pe*pe+k*k)));isNaN(ce)&&(ce=p),!o&&ce>0?ce-=m:o&&ce<0&&(ce+=m),te%=m,ce%=m;var _e=Math.ceil(lh(ce)/(m/4)),Fe=[],ue=ce/_e,Ee=4/3*b0(ue/2)/(1+I0(ue/2)),Ce=f*t,De=h*t,dt=h*-n,At=f*n,it;for(it=0;it<_e;it++)r=te+it*ue,y=I0(r),g=b0(r),re=I0(r+=ue),Q=b0(r),Fe.push(y-Ee*g,g+Ee*y,re+Ee*Q,Q-Ee*re,re,Q);for(it=0;it<Fe.length;it+=2)y=Fe[it],g=Fe[it+1],Fe[it]=y*Ce+g*dt+Y,Fe[it+1]=y*De+g*At+q;return Fe[it-2]=a,Fe[it-1]=l,Fe}}function K7(i){var e=(i+"").replace(W7,function(C){var b=+C;return b<1e-4&&b>-1e-4?0:b}).match(V7)||[],t=[],n=0,r=0,s=2/3,o=e.length,a=0,l="ERROR: malformed path: "+i,u,f,h,p,m,v,_,y,g,A,S,w,P,T,I,D=function(b,N,j,Y){A=(j-b)/3,S=(Y-N)/3,_.push(b+A,N+S,j-A,Y-S,j,Y)};if(!i||!isNaN(e[0])||isNaN(e[1]))return console.log(l),t;for(u=0;
4027u<o;u++)if(P=m,isNaN(e[u])?(m=e[u].toUpperCase(),v=m!==e[u]):u--,h=+e[u+1],p=+e[u+2],v&&(h+=n,p+=r),u||(y=h,g=p),m==="M")_&&(_.length<8?t.length-=1:a+=_.length),n=y=h,r=g=p,_=[h,p],t.push(_),u+=2,m="L";else if(m==="C")_||(_=[0,0]),v||(n=r=0),_.push(h,p,n+e[u+3]*1,r+e[u+4]*1,n+=e[u+5]*1,r+=e[u+6]*1),u+=6;else if(m==="S")A=n,S=r,(P==="C"||P==="S")&&(A+=n-_[_.length-4],S+=r-_[_.length-3]),v||(n=r=0),_.push(A,S,h,p,n+=e[u+3]*1,r+=e[u+4]*1),u+=4;else if(m==="Q")A=n+(h-n)*s,S=r+(p-r)*s,v||(n=r=0),n+=e[u+3]*1,r+=e[u+4]*1,_.push(A,S,n+(h-n)*s,r+(p-r)*s,n,r),u+=4;else if(m==="T")A=n-_[_.length-4],S=r-_[_.length-3],_.push(n+A,r+S,h+(n+A*1.5-h)*s,p+(r+S*1.5-p)*s,n=h,r=p),u+=2;else if(m==="H")D(n,r,n=h,r),u+=1;else if(m==="V")D(n,r,n,r=h+(v?r-n:0)),u+=1;else if(m==="L"||m==="Z")m==="Z"&&(h=y,p=g,_.closed=!0),(m==="L"||lh(n-h)>.5||lh(r-p)>.5)&&(D(n,r,h,p),m==="L"&&(u+=2)),n=h,r=p;else if(m==="A"){if(T=e[u+4],I=e[u+5],A=e[u+6],S=e[u+7],f=7,T.length>1&&(T.length<3?(S=A,A=I,f--):(S=I,A=T.substr(2),f-=2),I=T.charAt(1),T=T.charAt(0)),w=Y7(n,r,+e[u+1],+e[u+2],+e[u+3],+T,+I,(v?n:0)+A*1,(v?r:0)+S*1),u+=f,w)for(f=0;f<w.length;f++)_.push(w[f]);n=_[_.length-2],r=_[_.length-1]}else console.log(l);return u=_.length,u<6?(t.pop(),u=0):_[0]===_[u-2]&&_[1]===_[u-1]&&(_.closed=!0),t.totalPoints=a+u,t}function Q7(i){J7(i[0])&&(i=[i]);var e="",t=i.length,n,r,s,o;for(r=0;r<t;r++){for(o=i[r],e+="M"+Sa(o[0])+","+Sa(o[1])+" C",n=o.length,s=2;s<n;s++)e+=Sa(o[s++])+","+Sa(o[s++])+" "+Sa(o[s++])+","+Sa(o[s++])+" "+Sa(o[s++])+","+Sa(o[s])+" ";o.closed&&(e+="z")}return e}/*! 4028 * CustomEase 3.12.5 4029 * https://gsap.com 4030 * 4031 * @license Copyright 2008-2024, GreenSock. All rights reserved. 4032 * Subject to the terms at https://gsap.com/standard-license or for 4033 * Club GSAP members, the agreement issued with that membership. 4034 * @author: Jack Doyle, [email protected] 4035*/var _r,bD,ID=function(){return _r||typeof window<"u"&&(_r=window.gsap)&&_r.registerPlugin&&_r},m3=function(){_r=ID(),_r?(_r.registerEase("_CE",gp.create),bD=1):console.warn("Please gsap.registerPlugin(CustomEase)")},q7=1e20,B0=function(e){return~~(e*1e3+(e<0?-.5:.5))/1e3},Z7=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,$7=/[cLlsSaAhHvVtTqQ]/g,eV=function(e){var t=e.length,n=q7,r;for(r=1;r<t;r+=6)+e[r]<n&&(n=+e[r]);return n},tV=function(e,t,n){!n&&n!==0&&(n=Math.max(+e[e.length-1],+e[1]));var r=+e[0]*-1,s=-n,o=e.length,a=1/(+e[o-2]+r),l=-t||(Math.abs(+e[o-1]-+e[1])<.01*(+e[o-2]-+e[0])?eV(e)+s:+e[o-1]+s),u;for(l?l=1/l:l=-a,u=0;u<o;u+=2)e[u]=(+e[u]+r)*a,e[u+1]=(+e[u+1]+s)*l},nV=function i(e,t,n,r,s,o,a,l,u,f,h){var p=(e+n)/2,m=(t+r)/2,v=(n+s)/2,_=(r+o)/2,y=(s+a)/2,g=(o+l)/2,A=(p+v)/2,S=(m+_)/2,w=(v+y)/2,P=(_+g)/2,T=(A+w)/2,I=(S+P)/2,D=a-e,C=l-t,b=Math.abs((n-a)*C-(r-l)*D),N=Math.abs((s-a)*C-(o-l)*D),j;return f||(f=[{x:e,y:t},{x:a,y:l}],h=1),f.splice(h||f.length-1,0,{x:T,y:I}),(b+N)*(b+N)>u*(D*D+C*C)&&(j=f.length,i(e,t,p,m,A,S,T,I,u,f,h),i(T,I,w,P,y,g,a,l,u,f,h+1+(f.length-j))),f},gp=function(){function i(t,n,r){bD||m3(),this.id=t,this.setData(n,r)}var e=i.prototype;return e.setData=function(n,r){r=r||{},n=n||"0,0,1,1";var s=n.match(Z7),o=1,a=[],l=[],u=r.precision||1,f=u<=1,h,p,m,v,_,y,g,A,S;if(this.data=n,($7.test(n)||~n.indexOf("M")&&n.indexOf("C")<0)&&(s=K7(n)[0]),h=s.length,h===4)s.unshift(0,0),s.push(1,1),h=8;else if((h-2)%6)throw"Invalid CustomEase";for((+s[0]!=0||+s[h-2]!=1)&&tV(s,r.height,r.originY),this.segment=s,v=2;v<h;v+=6)p={x:+s[v-2],y:+s[v-1]},m={x:+s[v+4],y:+s[v+5]},a.push(p,m),nV(p.x,p.y,+s[v],+s[v+1],+s[v+2],+s[v+3],m.x,m.y,1/(u*2e5),a,a.length-1);for(h=a.length,v=0;v<h;v++)g=a[v],A=a[v-1]||g,(g.x>A.x||A.y!==g.y&&A.x===g.x||g===A)&&g.x<=1?(A.cx=g.x-A.x,A.cy=g.y-A.y,A.n=g,A.nx=g.x,f&&v>1&&Math.abs(A.cy/A.cx-a[v-2].cy/a[v-2].cx)>2&&(f=0),A.cx<o&&(A.cx?o=A.cx:(A.cx=.001,v===h-1&&(A.x-=.001,o=Math.min(o,.001),f=0)))):(a.splice(v--,1),h--);if(h=1/o+1|0,_=1/h,y=0,g=a[0],f){for(v=0;v<h;v++)S=v*_,g.nx<S&&(g=a[++y]),p=g.y+(S-g.x)/g.cx*g.cy,l[v]={x:S,cx:_,y:p,cy:0,nx:9},v&&(l[v-1].cy=p-l[v-1].y);l[h-1].cy=a[a.length-1].y-p}else{for(v=0;v<h;v++)g.nx<v*_&&(g=a[++y]),l[v]=g;y<a.length-1&&(l[v-1]=a[a.length-2])}return this.ease=function(w){var P=l[w*h|0]||l[h-1];return P.nx<w&&(P=P.n),P.y+(w-P.x)/P.cx*P.cy},this.ease.custom=this,this.id&&_r&&_r.registerEase(this.id,this.ease),this},e.getSVGData=function(n){return i.getSVGData(this,n)},i.create=function(n,r,s){return new i(n,r,s).ease},i.register=function(n){_r=n,m3()},i.get=function(n){return _r.parseEase(n)},i.getSVGData=function(n,r){r=r||{};var s=r.width||100,o=r.height||100,a=r.x||0,l=(r.y||0)+o,u=_r.utils.toArray(r.path)[0],f,h,p,m,v,_,y,g,A,S;if(r.invert&&(o=-o,l=0),typeof n=="string"&&(n=_r.parseEase(n)),n.custom&&(n=n.custom),n instanceof i)f=Q7(j7([n.segment],s,0,0,-o,a,l));else{for(f=[a,l],y=Math.max(5,(r.precision||1)*200),m=1/y,y+=2,g
4035=5/y,A=B0(a+m*s),S=B0(l+n(m)*-o),h=(S-l)/(A-a),p=2;p<y;p++)v=B0(a+p*m*s),_=B0(l+n(p*m)*-o),(Math.abs((_-S)/(v-A)-h)>g||p===y-1)&&(f.push(A,S),h=(_-S)/(v-A)),A=v,S=_;f="M"+f.join(",")}return u&&u.setAttribute("d",f),f},i}();ID()&&_r.registerPlugin(gp);gp.version="3.12.5";function ba(){return window.innerWidth<768&&window.innerHeight>window.innerWidth}function Ty(i,e,t){return[g3(i[0],e[0],t),g3(i[1],e[1],t)]}function g3(i,e,t){const n=parseInt(i.slice(1,3),16),r=parseInt(i.slice(3,5),16),s=parseInt(i.slice(5,7),16),o=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),l=parseInt(e.slice(5,7),16),u=o-n,f=a-r,h=l-s,p=Math.floor(n+u*t),m=Math.floor(r+f*t),v=Math.floor(s+h*t);return`#${p.toString(16).padStart(2,"0")}${m.toString(16).padStart(2,"0")}${v.toString(16).padStart(2,"0")}`}function En(i,e,t,n=!1){let r=(i-e)/(t-e);return n&&(i<e&&(r=0),i>t&&(r=1)),r}function Ry(i,e,t){const n=t-e>=0?-1:1,r=Math.min(e,t),s=Math.max(e,t);return{in:i>=r&&i<=s,direction:n}}function wt(i,e=!1){if(!window.__sideIndicators){const t=document.body.clientHeight-document.documentElement.clientHeight,n=document.querySelectorAll(".stage-indicator"),r={};n.forEach(s=>{const o=s.offsetTop,a=s.innerText.split(",");for(let l=0;l<a.length;l++)r[a[l]]=o/t}),window.__sideIndicators=r}return e?window.__sideIndicators[i]*(document.body.clientHeight-document.documentElement.clientHeight):window.__sideIndicators[i]}window.addEventListener("resize",()=>{window.__sideIndicators=null,document.querySelectorAll(".stage-indicator").forEach(e=>{e.style.display="block"})});function D0(i){window.dispatchEvent(new CustomEvent("changeScene",{detail:{scene:i}})),window.__currentScene=i,i==="mainScene"?(Hi("exploreRoom",{play:!0,visible:!0}),Hi("exploreProject",{play:!0,visible:!0}),Hi("exploreRobot",{play:!0,visible:!0}),Hi("pointsSea",{play:!0,visible:!0}),Hi("geometryBackground",{play:!0,visible:!0}),Hi("logo",{play:!0,visible:!0}),Hi("aboutUsScene",{play:!1,visible:!1})):i==="aboutUs"&&(Hi("exploreRoom",{play:!1,visible:!1}),Hi("exploreProject",{play:!1,visible:!1}),Hi("exploreRobot",{play:!1,visible:!1}),Hi("pointsSea",{play:!1,visible:!1}),Hi("geometryBackground",{play:!1,visible:!1}),Hi("logo",{play:!1,visible:!1}),Hi("aboutUsScene",{play:!0,visible:!0}))}function Hi(i,e){window.__componentStatus[i]={...window.__componentStatus[i],...e};const t=window.__componentStatus[i].el;t&&e.visible===!1&&(t.visible=!1),t&&e.visible===!0&&(t.visible=!0)}function BA(i=!1){const e=window.__sceneOverlayGrad;if(!e||!e.material){window.setTimeout(()=>{BA(i)},500);return}const t=e.material;Gf.to(t.uniforms.uProgress,{value:i?1:1e-4,duration:.5,easing:gp.create("custom","0.860, 0.000, 0.070, 1.000")});const n=document.querySelector(".App");i?(n.classList.add("onWhiteBg"),n.classList.add("theEnd")):(n.classList.remove("onWhiteBg"),n.classList.remove("theEnd"));const r=new CustomEvent("showTheEndUI",{detail:{show:i}});window.dispatchEvent(r)}var BD=`varying vec3 worldNormal;\r 4036 varying vec3 eyeVector;\r 4037 \r 4038 void main() {\r 4039 vec4 worldPos = modelMatrix * vec4(position, 1.0);\r 4040 vec4 mvPosition = viewMatrix * worldPos;\r 4041 \r 4042 gl_Position = projectionMatrix * mvPosition;\r 4043 \r 4044 4045 worldNormal = normalize(modelMatrix * vec4(normal, 0.0)).xyz;\r 4046 eyeVector = normalize(worldPos.xyz - cameraPosition);\r 4047 }`,DD=`uniform float uIorR;\r 4048 uniform float uIorY;\r 4049 uniform float uIorG;\r 4050 uniform float uIorC;\r 4051 uniform float uIorB;\r 4052 uniform float uIorP;\r 4053 \r 4054 uniform float uSaturation;\r 4055 uniform float uChromaticAberration;\r 4056 uniform float uRefractPower;\r 4057 uniform float uFresnelPower;\r 4058 uniform float uShininess;\r 4059 uniform float uDiffuseness;\r 4060 uniform vec3 uLight;\r 4061 uniform float uOpacity;\r 4062 uniform vec2 winResolution;\r 4063 uniform sampler2D uTexture;\r 4064 \r 4065 varying vec3 worldNormal;\r 4066 varying vec3 eyeVector;\r 4067 \r 4068 vec3 sat(vec3 rgb, float adjustment) {\r 4069 const vec3 W = vec3(0.2125, 0.7154, 0.0721);\r 4070 vec3 intensity = vec3(dot(rgb, W));\r 4071 return mix(intensity, rgb, adjustment);\r 4072 }\r 4073 \r 4074 float fresnel(vec3 eyeVector, vec3 worldNormal, float power) {\r 4075 float fresnelFactor = abs(dot(eyeVector, worldNormal));\r 4076 float inversefresnelFactor = 1.0 - fresnelFactor;\r 4077 \r 4078 return pow(inversefresnelFactor, power);\r 4079 }\r 4080 \r 4081 float specular(vec3 light, float shininess, float diffuseness) {\r 4082 vec3 normal = worldNormal;\r 4083 vec3 lightVector = normalize(-light);\r 4084 vec3 halfVector = normalize(eyeVector + lightVector);\r 4085 \r
4086 float NdotL = dot(normal, lightVector);\r 4087 float NdotH = dot(normal, halfVector);\r 4088 float kDiffuse = max(0.0, NdotL);\r 4089 float NdotH2 = NdotH * NdotH;\r 4090 \r 4091 float kSpecular = pow(NdotH2, shininess);\r 4092 return kSpecular + kDiffuse * diffuseness;\r 4093 }\r 4094 \r 4095 const int LOOP = 16;\r 4096 \r 4097 void main() {\r 4098 float iorRatioRed = 1.0/uIorR;\r 4099 float iorRatioGreen = 1.0/uIorG;\r 4100 float iorRatioBlue = 1.0/uIorB;\r 4101 \r 4102 vec2 uv = gl_FragCoord.xy / winResolution.xy;\r 4103 vec3 normal = worldNormal;\r 4104 vec3 color = vec3(0.0);\r 4105 \r 4106 vec3 refractVecR = refract(eyeVector, normal,(1.0/uIorR));\r 4107 vec3 refractVecY = refract(eyeVector, normal, (1.0/uIorY));\r 4108 vec3 refractVecG = refract(eyeVector, normal, (1.0/uIorG));\r 4109 vec3 refractVecC = refract(eyeVector, normal, (1.0/uIorC));\r 4110 vec3 refractVecB = refract(eyeVector, normal, (1.0/uIorB));\r 4111 vec3 refractVecP = refract(eyeVector, normal, (1.0/uIorP)); 4112 4113 for ( int i = 0; i < LOOP; i ++ ) {\r 4114 float slide = float(i) / float(LOOP) * 0.1;\r 4115 float r = texture2D(uTexture, uv + refractVecR.xy * (uRefractPower + slide * 1.0) * uChromaticAberration).x * 0.5;\r 4116 \r 4117 float y = (texture2D(uTexture, uv + refractVecY.xy * (uRefractPower + slide * 1.0) * uChromaticAberration).x * 2.0 +\r 4118 texture2D(uTexture, uv + refractVecY.xy * (uRefractPower + slide * 1.0) * uChromaticAberration).y * 2.0 -\r 4119 texture2D(uTexture, uv + refractVecY.xy * (uRefractPower + slide * 1.0) * uChromaticAberration).z) / 6.0;\r 4120 \r 4121 float g = texture2D(uTexture, uv + refractVecG.xy * (uRefractPower + slide * 2.0) * uChromaticAberration).y * 0.5;\r 4122 \r 4123 float c = (texture2D(uTexture, uv + refractVecC.xy * (uRefractPower + slide * 2.5) * uChromaticAberration).y * 2.0 +\r 4124 texture2D(uTexture, uv + refractVecC.xy * (uRefractPower + slide * 2.5) * uChromaticAberration).z * 2.0 -\r 4125 texture2D(uTexture, uv + refractVecC.xy * (uRefractPower + slide * 2.5) * uChromaticAberration).x) / 6.0;\r 4126 \r 4127 float b = texture2D(uTexture, uv + refractVecB.xy * (uRefractPower + slide * 3.0) * uChromaticAberration).z * 0.5;\r 4128 \r 4129 float p = (texture2D(uTexture, uv + refractVecP.xy * (uRefractPower + slide * 1.0) * uChromaticAberration).z * 2.0 +\r 4130 texture2D(uTexture, uv + refractVecP.xy * (uRefractPower + slide * 1.0) * uChromaticAberration).x * 2.0 -\r 4131 texture2D(uTexture, uv + refractVecP.xy * (uRefractPower + slide * 1.0) * uChromaticAberration).y) / 6.0;\r 4132 \r 4133 float R = r + (2.0*p + 2.0*y - c)/3.0;\r 4134 float G = g + (2.0*y + 2.0*c - p)/3.0;\r 4135 float B = b + (2.0*c + 2.0*p - y)/3.0;\r 4136 \r 4137 color.r += R;\r 4138 color.g += G;\r 4139 color.b += B;\r 4140 \r 4141 color = sat(color, uSaturation);\r 4142 }\r 4143 \r 4144 4145 color /= float( LOOP );\r 4146 \r 4147 4148 float specularLight = specular(uLight, uShininess, uDiffuseness);\r 4149 color += specularLight;\r 4150 \r 4151 4152 float f = fresnel(eyeVector, normal, uFresnelPower);\r 4153 color.rgb += f * vec3(1.0);\r 4154 \r 4155 gl_FragColor = vec4(color, uOpacity);\r 4156 }`;Gf.registerPlugin(gp);const iV=BD,rV=DD;function sV({initProgress:i}){const{viewPort:e}=Cn();function t(v){const _=v?v.detail.progress:0,y=En(_,0,wt("logo-stage1-end")),g=En(_,wt("logo-stage2-start"),wt("logo-stage2-end"));if(En(_,wt("title-project-start"),wt("title-project-end"))>0?Hi("logo",{play:!1,visible:!1}):Hi("logo",{play:!0,visible:!0}),y>=0&&y<=1){l.progress(y*.5);return}if(g>0){l.progress(.5+g*.5);return}if(y>1&&g<=0){l.progress(.5);return}}K.exports.useEffect(()=>(window.__componentStatus.logo.el=a.current,t({detail:{progress:i}}),window.addEventListener("websiteProgress",t),()=>{window.removeEventListener("websiteProgress",t)}),[]);const{nodes:n,materials:r}=Gs("/model/logo.glb"),s=ba()?1.7:2,o=K.exports.useRef(null),a=K.exports.useRef(),l=K.exports.useMemo(()=>Gf.timeline({paused:!0}),[]);Ov(()=>{const v={color:"#ffffff",opacity:1};l.add("logoAnimWithScroll").to(o.current.rotation,{y:Math.PI*2,duration:1,repeat:0,ease:"power2.inout"},"logoAnimWithScroll").to(o.current.position,{y:-7.65,duration:1,repeat:0,ease:"power3.out",onUpdate:()=>{h.current.position.y=o.current.position.y}}
4156,"logoAnimWithScroll").to(v,{opacity:0,duration:1,repeat:0,ease:"power4.in",onUpdate:()=>{p.current.opacity=v.opacity,p.needsUpdate=!0}},"logoAnimWithScroll").add("logoAnimWithScroll2").to(o.current.position,{z:35,y:-13,duration:1,repeat:0,onComplete:()=>{}},"logoAnimWithScroll2")},[]),Gs.preload("/model/logo.glb");const u=Hh(),f=Hh(),h=K.exports.useRef(),p=K.exports.useRef(new Xi({color:16777215,transparent:!0,opacity:1})),m=K.exports.useMemo(()=>({uTexture:{value:null},uIorR:{value:1.15},uIorY:{value:1.16},uIorG:{value:1.18},uIorC:{value:1.22},uIorB:{value:1.22},uIorP:{value:1.22},uRefractPower:{value:.2},uChromaticAberration:{value:.5},uSaturation:{value:1.03},uShininess:{value:12},uDiffuseness:{value:.2},uFresnelPower:{value:15},uOpacity:{value:1},uLight:{value:new H(-1,1,1)},winResolution:{value:new Re(window.innerWidth,window.innerHeight).multiplyScalar(Math.min(window.devicePixelRatio,2))}}),[e]);return ws(v=>{if(!window.__componentStatus.logo.play)return;const{gl:_,scene:y,camera:g}=v;h.current.rotation.z+=.003,o.current.visible=!1,h.current.visible=!0,_.setRenderTarget(f),_.render(y,g),o.current.material.uniforms.uTexture.value=f.texture,o.current.material.side=Mi,o.current.visible=!0,h.current.visible=!1,_.setRenderTarget(u),_.render(y,g),o.current.material.uniforms.uTexture.value=u.texture,o.current.material.side=xs,_.setRenderTarget(null)}),Ye("group",{ref:a,children:[F("mesh",{ref:o,castShadow:!0,receiveShadow:!0,geometry:n.logo_bottom.geometry,name:"mainLogo",scale:s,position:[0,0,20],children:F("shaderMaterial",{vertexShader:iV,fragmentShader:rV,uniforms:m},PD())}),Ye("group",{ref:h,visible:!0,position:[0,0,20],scale:1,children:[F("mesh",{position:[-4,-3,-4],material:p.current,children:F("planeGeometry",{args:[3,3]})}),F("mesh",{position:[4,-3,-4],material:p.current,children:F("circleGeometry",{args:[2,6]})}),F("mesh",{position:[-5,3,-4],material:p.current,children:F("circleGeometry",{args:[3,16]})}),F("mesh",{position:[5,3,-4],material:p.current,children:F("icosahedronGeometry",{args:[2,16]})})]})]})}var oV=`#ifndef FNC_MOD289 4157#define FNC_MOD289 4158 4159float mod289(const in float x) { return x - floor(x * (1. / 289.)) * 289.; } 4160vec2 mod289(const in vec2 x) { return x - floor(x * (1. / 289.)) * 289.; } 4161vec3 mod289(const in vec3 x) { return x - floor(x * (1. / 289.)) * 289.; } 4162vec4 mod289(const in vec4 x) { return x - floor(x * (1. / 289.)) * 289.; } 4163 4164#endif 4165#ifndef FNC_MOD289 4166#define FNC_MOD289 4167 4168float mod289(const in float x) { return x - floor(x * (1. / 289.)) * 289.; } 4169vec2 mod289(const in vec2 x) { return x - floor(x * (1. / 289.)) * 289.; } 4170vec3 mod289(const in vec3 x) { return x - floor(x * (1. / 289.)) * 289.; } 4171vec4 mod289(const in vec4 x) { return x - floor(x * (1. / 289.)) * 289.; } 4172 4173#endif 4174 4175#ifndef FNC_PERMUTE 4176#define FNC_PERMUTE 4177 4178float permute(const in float v) { return mod289(((v * 34.0) + 1.0) * v); } 4179vec2 permute(const in vec2 v) { return mod289(((v * 34.0) + 1.0) * v); } 4180vec3 permute(const in vec3 v) { return mod289(((v * 34.0) + 1.0) * v); } 4181vec4 permute(const in vec4 v) { return mod289(((v * 34.0) + 1.0) * v); } 4182 4183#endif 4184#ifndef FNC_TAYLORINVSQRT 4185#define FNC_TAYLORINVSQRT 4186float taylorInvSqrt(in float r) { return 1.79284291400159 - 0.85373472095314 * r; } 4187vec2 taylorInvSqrt(in vec2 r) { return 1.79284291400159 - 0.85373472095314 * r; } 4188vec3 taylorInvSqrt(in vec3 r) { return 1.79284291400159 - 0.85373472095314 * r; } 4189vec4 taylorInvSqrt(in vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; } 4190#endif 4191#ifndef FNC_QUINTIC 4192#define FNC_QUINTIC 4193 4194float quintic(const in float v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 4195vec2 quintic(const in vec2 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 4196vec3 quintic(const in vec3 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 4197vec4 quintic(const in vec4 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 4198 4199#endif 4200 4201#ifndef FNC_CNOISE 4202#define FNC_CNOISE 4203 4204float cnoise(in vec2 P) { 4205 vec4 Pi = floor(P.xyxy) + vec4(0.0, 0.0, 1.0, 1.0); 4206 vec4 Pf = fract(P.xyxy) - vec4(0.0, 0.0, 1.0, 1.0); 4207 Pi = mod289(Pi); 4208 vec4 ix = Pi.xzxz; 4209 vec4 iy = Pi.yyww; 4210 vec4 fx = Pf.xzxz; 4211 vec4 fy = Pf.yyww; 4212 4213 vec4 i = permute(permute(ix) + iy); 4214 4215 vec4 gx = fract(i * (1.0 / 41.0)) * 2.0 - 1.0 ; 4216 vec4 gy = abs(gx) - 0.5 ; 4217 vec4 tx = floor(gx + 0.5); 4218 gx = gx - tx; 4219 4220 vec2 g00 = vec2(gx.x,gy.x); 4221 vec2 g10 = vec2(gx.y,gy.y); 4222 vec2 g01 = vec2(gx.z,gy.z); 4223 vec2 g11 = vec2(gx.w,gy.w); 4224 4225 vec4 norm = taylorInvSqrt(vec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); 4226 g00 *= norm.x; 4227 g01 *= norm.y; 4228 g10 *= norm.z; 4229 g11 *= norm.w; 4230 4231 float n00 = dot(g00, vec2(fx.x, fy.x)); 4232 float n10 = dot(g10, vec2(fx.y, fy.y)); 4233 float n01 = dot(g01, vec2(fx.z, fy.z)); 4234 float n11 = dot(g11, vec2(fx.w, fy.w)); 4235 4236 vec2 fade_xy = quintic(Pf.xy); 4237 vec2 n_x = mix(vec2(n00, n01), vec2(n10, n11), fade_xy.x); 4238 float n_xy = mix(n_x.x, n_x.y, fade_xy.y); 4239 return 2.3 * n_xy; 4240} 4241 4242float cnoise(in vec3 P) { 4243 vec3 Pi0 = floor(P); 4244 vec3 Pi1 = Pi0 + vec3(1.0); 4245 Pi0 = mod289(Pi0); 4246 Pi1 = mod289(Pi1); 4247 vec3 Pf0 = fract(P); 4248 vec3 Pf1 = Pf0 - vec3(1.0); 4249 vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); 4250 vec4 iy = vec4(Pi0.yy, Pi1.yy); 4251 vec4 iz0 = Pi0.zzzz; 4252 vec4 iz1 = Pi1.zzzz; 4253 4254 vec4 ixy = permute(permute(ix) + iy); 4255 vec4 ixy0 = permute(ixy + iz0); 4256 vec4 ixy1 = permute(ixy + iz1); 4257 4258 vec4 gx0 = ixy0 * (1.0 / 7.0); 4259 vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5; 4260 gx0 = fract(gx0); 4261 vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0); 4262 vec4 sz0 = step(gz0, vec4(0.0)); 4263 gx0 -= sz0 * (step(0.0, gx0) - 0.5); 4264 gy0 -= sz0 * (step(0.0, gy0) - 0.5); 4265 4266 vec4 gx1 = ixy1 * (1.0 / 7.0); 4267 vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5; 4268 gx1 = fract(gx1); 4269 vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1); 4270 vec4 sz1 = step(gz1, vec4(0.0)); 4271 gx1 -= sz1 * (step(0.0, gx1) - 0.5); 4272 gy1 -= sz1 * (step(0.0, gy1) - 0.5); 4273 4274 vec3 g000 = vec3(gx0.x,gy0.x,gz0.x); 4275 vec3 g100 = vec3(gx0.y,gy0.y,gz0.y); 4276 vec3 g010 = vec3(gx0.z,gy0.z,gz0.z); 4277 vec3 g110 = vec3(gx0.w,gy0.w,gz0.w); 4278 vec3 g001 = vec3(gx1.x,gy1.x,gz1.x); 4279 vec3 g101 = vec3(gx1.y,gy1.y,gz1.y); 4280 vec3 g011 = vec3(gx1.z,gy1.z,gz1.z); 4281 vec3 g111 = vec3(gx1.w,gy1.w,gz1.w); 4282 4283 vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); 4284 g000 *= norm0.x; 4285 g010 *= norm0.y; 4286 g100 *= norm0.z; 4287 g110 *= norm0.w; 4288 vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); 4289 g001 *= norm1.x; 4290 g011 *= norm1.y; 4291 g101 *= norm1.z; 4292 g111 *= norm1.w; 4293 4294 float n000 = dot(g000, Pf0); 4295 float n100 = dot(g100, vec3(Pf1.x, Pf0.yz)); 4296 float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z)); 4297 float n110 = dot(g110, vec3(Pf1.xy, Pf0.z)); 4298 float n001 = dot(g001, vec3(Pf0.xy, Pf1.z)); 4299 float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z)); 4300 float n011 = dot(g011, vec3(Pf0.x, Pf1.yz)); 4301 float n111 = dot(g111, Pf1); 4302 4303 vec3 fade_xyz = quintic(Pf0); 4304 vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z); 4305 vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y); 4306 float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); 4307 return 2.2 * n_xyz; 4308} 4309 4310float cnoise(in vec4 P) { 4311 vec4 Pi0 = floor(P); 4312 vec4 Pi1 = Pi0 + 1.0; 4313 Pi0 = mod289(Pi0); 4314 Pi1 = mod289(Pi1); 4315 vec4 Pf0 = fract(P); 4316 vec4 Pf1 = Pf0 - 1.0; 4317 vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); 4318 vec4 iy = vec4(Pi0.yy, Pi1.yy); 4319 vec4 iz0 = vec4(Pi0.zzzz); 4320 vec4 iz1 = vec4(Pi1.zzzz); 4321 vec4 iw0 = vec4(Pi0.wwww); 4322 vec4 iw1 = vec4(Pi1.wwww); 4323 4324 vec4 ixy = permute(permute(ix) + iy); 4325 vec4 ixy0 = permute(ixy + iz0); 4326 vec4 ixy1 = permute(ixy + iz1); 4327 vec4 ixy00 = permute(ixy0 + iw0); 4328 vec4 ixy01 = permute(ixy0 + iw1); 4329 vec4 ixy10 = permute(ixy1 + iw0); 4330 vec4 ixy11 = permute(ixy1 + iw1); 4331 4332 vec4 gx00 = ixy00 * (1.0 / 7.0); 4333 vec4 gy00 = floor(gx00) * (1.0 / 7.0); 4334 vec4 gz00 = floor(gy00) * (1.0 / 6.0); 4335 gx00 = fract(gx00) - 0.5; 4336 gy00 = fract(gy00) - 0.5; 4337 gz00 = fract(gz00) - 0.5; 4338 vec4 gw00 = vec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); 4339 vec4 sw00 = step(gw00, vec4(0.0)); 4340 gx00 -= sw00 * (step(0.0, gx00) - 0.5); 4341 gy00 -= sw00 * (step(0.0, gy00) - 0.5); 4342 4343 vec4 gx01 = ixy01 * (1.0 / 7.0); 4344 vec4 gy01 = floor(gx01) * (1.0 / 7.0); 4345 vec4 gz01 = floor(gy01) * (1.0 / 6.0); 4346 gx01 = fract(gx01) - 0.5; 4347 gy01 = fract(gy01) - 0.5; 4348 gz01 = fract(gz01) - 0.5; 4349 vec4 gw01 = vec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); 4350 vec4 sw01 = step(gw01, vec4(0.0)); 4351 gx01 -= sw01 * (step(0.0, gx01) - 0.5); 4352 gy01 -= sw01 * (step(0.0, gy01) - 0.5); 4353 4354 vec4 gx10 = ixy10 * (1.0 / 7.0); 4355 vec4 gy10 = floor(gx10) * (1.0 / 7.0); 4356 vec4 gz10 = floor(gy10) * (1.0 / 6.0); 4357 gx10 = fract(gx10) - 0.5; 4358 gy10 = fract(gy10) - 0.5; 4359 gz10 = fract(gz10) - 0.5; 4360 vec4 gw10 = vec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); 4361 vec4 sw10 = step(gw10, vec4(0.0)); 4362 gx10 -= sw10 * (step(0.0, gx10) - 0.5); 4363 gy10 -= sw10 * (step(0.0, gy10) - 0.5); 4364 4365 vec4 gx11 = ixy11 * (1.0 / 7.0); 4366 vec4 gy11 = floor(gx11) * (1.0 / 7.0); 4367 vec4 gz11 = floor(gy11) * (1.0 / 6.0); 4368 gx11 = fract(gx11) - 0.5; 4369 gy11 = fract(gy11) - 0.5; 4370 gz11 = fract(gz11) - 0.5; 4371 vec4 gw11 = vec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); 4372 vec4 sw11 = step(gw11, vec4(0.0)); 4373 gx11 -= sw11 * (step(0.0, gx11) - 0.5); 4374 gy11 -= sw11 * (step(0.0, gy11) - 0.5); 4375 4376 vec4 g0000 = vec4(gx00.x,gy00.x,gz00.x,gw00.x); 4377 vec4 g1000 = vec4(gx00.y,gy00.y,gz00.y,gw00.y); 4378 vec4 g0100 = vec4(gx00.z,gy00.z,gz00.z,gw00.z); 4379 vec4 g1100 = vec4(gx00.w,gy00.w,gz00.w,gw00.w); 4380 vec4 g0010 = vec4(gx10.x,gy10.x,gz10.x,gw10.x); 4381 vec4 g1010 = vec4(gx10.y,gy10.y,gz10.y,gw10.y); 4382 vec4 g0110 = vec4(gx10.z,gy10.z,gz10.z,gw10.z); 4383 vec4 g1110 = vec4(gx10.w,gy10.w,gz10.w,gw10.w); 4384 vec4 g0001 = vec4(gx01.x,gy01.x,gz01.x,gw01.x); 4385 vec4 g1001 = vec4(gx01.y,gy01.y,gz01.y,gw01.y); 4386 vec4 g0101 = vec4(gx01.z,gy01.z,gz01.z,gw01.z); 4387 vec4 g1101 = vec4(gx01.w,gy01.w,gz01.w,gw01.w); 4388 vec4 g0011 = vec4(gx11.x,gy11.x,gz11.x,gw11.x); 4389 vec4 g1011 = vec4(gx11.y,gy11.y,gz11.y,gw11.y); 4390 vec4 g0111 = vec4(gx11.z,gy11.z,gz11.z,gw11.z); 4391 vec4 g1111 = vec4(gx11.w,gy11.w,gz11.w,gw11.w); 4392 4393 vec4 norm00 = taylorInvSqrt(vec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); 4394 g0000 *= norm00.x; 4395 g0100 *= norm00.y; 4396 g1000 *= norm00.z; 4397 g1100 *= norm00.w; 4398 4399 vec4 norm01 = taylorInvSqrt(vec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); 4400 g0001 *= norm01.x; 4401 g0101 *= norm01.y; 4402 g1001 *= norm01.z; 4403 g1101 *= norm01.w; 4404 4405 vec4 norm10 = taylorInvSqrt(vec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); 4406 g0010 *= norm10.x; 4407 g0110 *= norm10.y; 4408 g1010 *= norm10.z; 4409 g1110 *= norm10.w; 4410 4411 vec4 norm11 = taylorInvSqrt(vec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); 4412 g0011 *= norm11.x; 4413 g0111 *= norm11.y; 4414 g1011 *= norm11.z; 4415 g1111 *= norm11.w; 4416 4417 float n0000 = dot(g0000, Pf0); 4418 float n1000 = dot(g1000, vec4(Pf1.x, Pf0.yzw)); 4419 float n0100 = dot(g0100, vec4(Pf0.x, Pf1.y, Pf0.zw)); 4420 float n1100 = dot(g1100, vec4(Pf1.xy, Pf0.zw)); 4421 float n0010 = dot(g0010, vec4(Pf0.xy, Pf1.z, Pf0.w)); 4422 float n1010 = dot(g1010, vec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); 4423 float n0110 = dot(g0110, vec4(Pf0.x, Pf1.yz, Pf0.w)); 4424 float n1110 = dot(g1110, vec4(Pf1.xyz, Pf0.w)); 4425 float n0001 = dot(g0001, vec4(Pf0.xyz, Pf1.w)); 4426 float n1001 = dot(g1001, vec4(Pf1.x, Pf0.yz, Pf1.w)); 4427 float n0101 = dot(g0101, vec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); 4428 float n1101 = dot(g1101, vec4(Pf1.xy, Pf0.z, Pf1.w));
4429 float n0011 = dot(g0011, vec4(Pf0.xy, Pf1.zw)); 4430 float n1011 = dot(g1011, vec4(Pf1.x, Pf0.y, Pf1.zw)); 4431 float n0111 = dot(g0111, vec4(Pf0.x, Pf1.yzw)); 4432 float n1111 = dot(g1111, Pf1); 4433 4434 vec4 fade_xyzw = quintic(Pf0); 4435 vec4 n_0w = mix(vec4(n0000, n1000, n0100, n1100), vec4(n0001, n1001, n0101, n1101), fade_xyzw.w); 4436 vec4 n_1w = mix(vec4(n0010, n1010, n0110, n1110), vec4(n0011, n1011, n0111, n1111), fade_xyzw.w); 4437 vec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); 4438 vec2 n_yzw = mix(n_zw.xy, n_zw.zw, fade_xyzw.y); 4439 float n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); 4440 return 2.2 * n_xyzw; 4441} 4442#endif\r 4443 uniform float time;\r 4444 uniform vec3 startColor;\r 4445 uniform vec3 endColor;\r 4446 uniform float lineOffset;\r 4447 uniform float lineOpacity;\r 4448 uniform float stage;\r 4449 uniform sampler2D uNoise;\r 4450 varying vec2 vUv;\r 4451 \r 4452 float gradientNoise(vec2 uv)\r 4453 {\r 4454 return fract(52.9829189 * fract(dot(uv, vec2(0.06711056, 0.00583715))));\r 4455 }\r 4456 const float widthFactor = 0.9; 4457 4458vec3 calcSine(vec2 uv, float speed, float frequency, float amplitude, float shift, float offset, vec3 color, float width, float exponent, bool dir)\r 4459 {\r 4460 float angle = time * speed * frequency * -1.0 + (shift + uv.x) * 2.0;\r 4461 \r 4462 float y = sin(angle) * amplitude + offset;\r 4463 float clampY = clamp(0.0, y, y);\r 4464 float diffY = y - uv.y;\r 4465 \r 4466 float dsqr = distance(y, uv.y);\r 4467 float scale = 1.0;\r 4468 \r 4469 if(dir && diffY > 0.0)\r 4470 {\r 4471 dsqr = dsqr * 4.0;\r 4472 }\r 4473 else if(!dir && diffY < 0.0)\r 4474 {\r 4475 dsqr = dsqr * 4.0;\r 4476 }\r 4477 \r 4478 scale = pow(smoothstep(width * widthFactor, 0.0, dsqr), exponent);\r 4479 \r 4480 return min(color * scale, color);\r 4481 }\r 4482mat2 Rot(float a)\r 4483 {\r 4484 float s = sin(a);\r 4485 float c = cos(a);\r 4486 return mat2(c, -s, s, c);\r 4487 }\r 4488 vec2 hash( vec2 p )\r 4489 {\r 4490 p = vec2( dot(p,vec2(2127.1,81.17)), dot(p,vec2(1269.5,283.37)) );\r 4491 return fract(sin(p)*43758.5453);\r 4492 } 4493 4494 float noise( vec2 p )\r 4495 {\r 4496 vec2 i = floor( p );\r 4497 vec2 f = fract( p );\r 4498 \r 4499 vec2 u = f*f*(3.0-2.0*f); 4500 4501 float n = mix( mix( dot( -1.0+2.0*hash( i + vec2(0.0,0.0) ), f - vec2(0.0,0.0) ), \r 4502 dot( -1.0+2.0*hash( i + vec2(1.0,0.0) ), f - vec2(1.0,0.0) ), u.x),\r 4503 mix( dot( -1.0+2.0*hash( i + vec2(0.0,1.0) ), f - vec2(0.0,1.0) ), \r 4504 dot( -1.0+2.0*hash( i + vec2(1.0,1.0) ), f - vec2(1.0,1.0) ), u.x), u.y);\r 4505 return 0.5 + 0.5*n;\r 4506 }\r 4507 void main() {\r 4508 if(stage == 0.0){\r 4509 4510 vec3 color = mix(startColor, endColor, sqrt((vUv.x * vUv.x)+((1.0 - vUv.y) * (1.0 - vUv.y))));\r 4511 color += (1.0 / 255.0) * gradientNoise(gl_FragCoord.xy) - (0.5 / 255.0);\r 4512 4513 vec3 lineColor = vec3(0.0);\r 4514 \r 4515 lineColor += calcSine(vUv, 0.2, 0.20, 0.2, 0.0, lineOffset*1.0, vec3(0.3, 0.3, 0.3), 0.1, 15.0,false);\r 4516 lineColor += calcSine(vUv, 0.4, 0.40, 0.15, 0.0,lineOffset*0.9, vec3(0.3, 0.3, 0.3), 0.1, 17.0,false);\r 4517 lineColor += calcSine(vUv, 0.3, 0.60, 0.15, 0.0, lineOffset*0.92, vec3(0.3, 0.3, 0.3), 0.05, 23.0,false); 4518 4519 lineColor += calcSine(vUv, 0.1, 0.26, 0.07, 0.0, lineOffset*0.95, vec3(0.3, 0.3, 0.3), 0.1, 17.0,true);\r 4520 lineColor += calcSine(vUv, 0.3, 0.36, 0.07, 0.0, lineOffset*0.93, vec3(0.3, 0.3, 0.3), 0.1, 17.0,true);\r 4521 lineColor += calcSine(vUv, 0.5, 0.46, 0.07, 0.0, lineOffset*0.98, vec3(0.3, 0.3, 0.3), 0.05, 23.0,true);\r 4522 lineColor += calcSine(vUv, 0.2, 0.58, 0.05, 0.0, lineOffset*0.99, vec3(0.3, 0.3, 0.3), 0.2, 15.0,true);\r 4523 lineColor*=vUv.x;\r 4524 lineColor*=lineOpacity;\r 4525 color = color+lineColor/2.0;\r 4526 gl_FragColor = vec4(color, 1.0);\r 4527 \r 4528 }\r 4529 else{ 4530 4531 float ratio = 16.0 / 9.0;\r 4532 vec2 tuv = vUv;\r 4533 tuv -= .5; 4534 4535 4536 float degree = noise(vec2(time*.1, tuv.x*tuv.y)); 4537 4538 tuv.y *= 1./ratio;\r 4539 tuv *= Rot(radians((degree-.5)*720.+180.));\r 4540 tuv.y *= ratio; 4541 4542 \r 4543 4544 float frequency = 5.;\r 4545 float amplitude = 20.;\r 4546 float speed = time * 2.;\r 4547 tuv.x += sin(tuv.y*frequency+speed)/amplitude;\r 4548 tuv.y += sin(tuv.x*frequency*1.5+speed)/(amplitude*.5);\r 4549 \r 4550 \r 4551 4552 vec3 colorYellow = vec3(.957, .804, .823);\r 4553 vec3 colorDeepBlue = vec3(.392, .684, .933);\r 4554 vec3 layer1 = mix(colorYellow, colorDeepBlue, smoothstep(-.3, .2, (tuv*Rot(radians(-5.))).x));\r 4555 \r 4556 vec3 colorRed = vec3(.0, .910, .9);\r 4557 vec3 colorBlue = vec3(0.750, .71, .953);\r
4558 vec3 layer2 = mix(colorRed, colorBlue, smoothstep(-.3, .2, (tuv*Rot(radians(-5.))).x));\r 4559 \r 4560 vec3 finalComp = mix(layer1, layer2, smoothstep(.5, -.3, tuv.y));\r 4561 finalComp*=1.0;\r 4562 vec3 col = finalComp;\r 4563 \r 4564 gl_FragColor = vec4(finalComp,1.0);\r 4565 } 4566 4567 }`;const FD=ku({time:0,lineOffset:-.2,startColor:new He(1,0,0),endColor:new He(0,0,1),lineOpacity:1,stage:0,uNoise:null},` 4568 varying vec2 vUv; 4569 void main() { 4570 vUv = uv; 4571 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 4572 } 4573 `,oV),Gi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];function Rf(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Gi[i&255]+Gi[i>>8&255]+Gi[i>>16&255]+Gi[i>>24&255]+"-"+Gi[e&255]+Gi[e>>8&255]+"-"+Gi[e>>16&15|64]+Gi[e>>24&255]+"-"+Gi[t&63|128]+Gi[t>>8&255]+"-"+Gi[t>>16&255]+Gi[t>>24&255]+Gi[n&255]+Gi[n>>8&255]+Gi[n>>16&255]+Gi[n>>24&255]).toLowerCase()}xo({BackgroundMainMaterial:FD});function aV({initProgress:i}){const e=Cn(f=>f.viewport),t=Cn(f=>f.camera),n=["#16111e","#43505a"],r=["#848b96","#ead5cb"],s=["#f7f7ff","#c7c7e8"],o=["#fffef4","#ffd4bc"],a=K.exports.useRef();function l(f){const h=f?f.detail.progress:0;let p=En(h,wt("background-stage1-start"),wt("background-stage1-end"),!0),m=En(h,wt("background-stage2-start"),wt("background-stage2-end"),!0),v=En(h,wt("background-stage3-start"),wt("background-stage3-end"),!0),_=En(h,wt("camera-stage3-end"),wt("title-aboutus-end"));if(a.current.material instanceof FD){const y=Ty(n,r,p);if(a.current.material.uniforms.endColor.value=new He(y[1]),a.current.material.uniforms.lineOffset.value=-.2+p*.4,a.current.material.uniforms.startColor.value=new He(y[0]),m>0){const g=Ty(r,s,m);a.current.material.uniforms.endColor.value=new He(g[1]),a.current.material.uniforms.startColor.value=new He(g[0]),a.current.material.uniforms.lineOffset.value=-.2+p*.4+m*1,a.current.material.uniforms.lineOpacity.value=1-m}if(v>0){const g=Ty(s,o,v);a.current.material.uniforms.endColor.value=new He(g[1]),a.current.material.uniforms.startColor.value=new He(g[0])}_>0?a.current.material.uniforms.stage.value=1:a.current.material.uniforms.stage.value=0}}K.exports.useEffect(()=>(window.__componentStatus.backgroundMain.el=a.current,l({detail:{progress:i}}),window.addEventListener("websiteProgress",l),()=>{window.removeEventListener("websiteProgress",l)}),[i]);const u=e.width/e.height;return K.exports.useEffect(()=>{const f=t.fov*Math.PI/180,h=30*Math.tan(f/2)*2,p=h*t.aspect,m=h;a.current.scale.set(p,m,1)},[u]),ws(({clock:f})=>{a.current.position.y=t.position.y,a.current.material.uniforms.time.value=f.getElapsedTime()}),nl("/images/noise.png",f=>{f.wrapS=As,f.wrapT=As,f.colorSpace=Ji,a.current.material.uniforms.uNoise.value=f}),Ye("mesh",{ref:a,position:[0,0,0],children:[F("planeGeometry",{args:[1,1]}),F("backgroundMainMaterial",{})]})}function lV({initProgress:i}){function t(m){}K.exports.useEffect(()=>(window.addEventListener("websiteProgress",t),()=>{window.removeEventListener("websiteProgress",t)}),[]);const n=new Uf({transparent:!0,roughness:.15,metalness:1}),r=[{geometry:new cp(2)},{geometry:new Nu(.8,.8,2,32)},{geometry:new up(1.1,1.7,32)},{geometry:new Cu(1.5,32,32)},{geometry:new Nf(2)},{geometry:new fp(1.1,.35,16,32)},{geometry:new Of(2)},{geometry:new Cu(1.5,32,32)},{geometry:new ul(2.5,2.5,2.5)}],s=10,o=K.exports.useMemo(()=>Array.from({length:s},()=>r[Math.floor(Math.random()*r.length)]),[]),a=K.exports.useRef(),l=Cn(m=>m.camera),u=Cn(m=>m.gl);function f(m,v){const _=new H;m.localToWorld(_),_.project(v);const y=Math.round((_.x+1)*u.domElement.offsetWidth/2),g=Math.round((1-_.y)*u.domElement.offsetHeight/2);return{x:y,y:g}}ws(()=>
4573{!window.__componentStatus.geometryBackground.play||a.current.children.forEach(m=>{m.traverse(v=>{v.isMesh&&(f(v,l).y/window.innerHeight,v.rotation.x+=Math.sin(v.position.x)/50,v.rotation.y+=.01)})})});let h=14,p=[.1,.5];return ba()&&(h=3,p=[.05,.3]),K.exports.useEffect(()=>{window.__componentStatus.geometryBackground.el=a.current},[]),F("group",{ref:a,position:[0,-26,0],children:o.map((m,v)=>F(SB,{children:F("mesh",{scale:Vo.randFloat(p[0],p[1]),position:[Vo.randFloat(-h,h),Vo.randFloat(-40,0),Vo.randFloat(10,20)],geometry:m.geometry,material:n.clone()})},v))})}function uV({initProgress:i}){const{scene:e,camera:t}=Cn(),n=Cn();K.exports.useEffect(()=>{n.events.connect(window)},[]);const r=e.getObjectByName("mainLogo");function s(o){const a=e.getObjectByName("mainLogo"),l=o?o.detail.progress:0,u=En(l,wt("camera-stage1-start"),wt("camera-stage1-end"),!0);let f=En(l,wt("camera-stage2-start"),wt("camera-stage2-end"));const h=En(l,wt("camera-stage3-start"),wt("camera-stage3-end")),p=En(l,wt("camera-stage3-end"),1);if(f<0){t.position.y=a.position.y-11+(11+4.35)*u,D0("mainScene");return}if(f>0&&f<=1){f=Vo.clamp(f,0,1);const m=-120,v=-7.65+4.35,_=m*.04,y=m*.96;f<.96?t.position.y=v+f*m:t.position.y=v+y+_*Math.cos(Math.PI/2*(1-f)/.04),D0("mainScene")}if(h>0&&h<1&&(t.position.y=-120-7.65+4.35,t.position.z=30-5*(Math.sin(h*Math.PI/2+Math.PI*3/2)+1),D0("mainScene")),p>0){D0("aboutUs"),t.position.z=25;const m=-63,v=-123.3,_=m*.04,y=m*.96;p<.96?t.position.y=v+p*m:t.position.y=v+y+_*Math.cos(Math.PI/2*(1-p)/.04),p>.98?window.__theEnd||(window.__theEnd=!0,BA(!0)):window.__theEnd&&(window.__theEnd=!1,BA(!1))}}K.exports.useEffect(()=>(window.addEventListener("websiteProgress",s),()=>{window.removeEventListener("websiteProgress",s)}),[]),K.exports.useEffect(()=>{s({detail:{progress:i}})},[r])}var cV=`uniform sampler2D uTexture;\r 4574 uniform float uNbLines;\r 4575 uniform float uNbColumns;\r 4576 4577 varying vec3 vPosition;\r 4578 varying float vIsSurface;\r 4579 4580#ifndef RANDOM_SCALE 4581#ifdef RANDOM_HIGHER_RANGE 4582#define RANDOM_SCALE vec4(.1031, .1030, .0973, .1099) 4583#else 4584#define RANDOM_SCALE vec4(443.897, 441.423, .0973, .1099) 4585#endif 4586#endif 4587 4588#ifndef FNC_RANDOM 4589#define FNC_RANDOM 4590float random(in float x) { 4591#ifdef RANDOM_SINLESS 4592 x = fract(x * RANDOM_SCALE.x); 4593 x *= x + 33.33; 4594 x *= x + x; 4595 return fract(x); 4596#else 4597 return fract(sin(x) * 43758.5453); 4598#endif 4599} 4600 4601float random(in vec2 st) { 4602#ifdef RANDOM_SINLESS 4603 vec3 p3 = fract(vec3(st.xyx) * RANDOM_SCALE.xyz); 4604 p3 += dot(p3, p3.yzx + 33.33); 4605 return fract((p3.x + p3.y) * p3.z); 4606#else 4607 return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453); 4608#endif 4609} 4610 4611float random(in vec3 pos) { 4612#ifdef RANDOM_SINLESS 4613 pos = fract(pos * RANDOM_SCALE.xyz); 4614 pos += dot(pos, pos.zyx + 31.32); 4615 return fract((pos.x + pos.y) * pos.z); 4616#else 4617 return fract(sin(dot(pos.xyz, vec3(70.9898, 78.233, 32.4355))) * 43758.5453123); 4618#endif 4619} 4620 4621float random(in vec4 pos) { 4622#ifdef RANDOM_SINLESS 4623 pos = fract(pos * RANDOM_SCALE); 4624 pos += dot(pos, pos.wzxy + 33.33); 4625 return fract((pos.x + pos.y) * (pos.z + pos.w)); 4626#else 4627 float dot_product = dot(pos, vec4(12.9898,78.233,45.164,94.673)); 4628 return fract(sin(dot_product) * 43758.5453); 4629#endif 4630} 4631 4632vec2 random2(float p) { 4633 vec3 p3 = fract(vec3(p) * RANDOM_SCALE.xyz); 4634 p3 += dot(p3, p3.yzx + 19.19); 4635 return fract((p3.xx + p3.yz) * p3.zy); 4636} 4637 4638vec2 random2(vec2 p) { 4639 vec3 p3 = fract(p.xyx * RANDOM_SCALE.xyz); 4640 p3 += dot(p3, p3.yzx + 19.19); 4641 return fract((p3.xx + p3.yz) * p3.zy); 4642} 4643 4644vec2 random2(vec3 p3) { 4645 p3 = fract(p3 * RANDOM_SCALE.xyz); 4646 p3 += dot(p3, p3.yzx + 19.19); 4647 return fract((p3.xx + p3.yz) * p3.zy); 4648} 4649 4650vec3 random3(float p) { 4651 vec3 p3 = fract(vec3(p) * RANDOM_SCALE.xyz); 4652 p3 += dot(p3, p3.yzx + 19.19); 4653 return fract((p3.xxy + p3.yzz) * p3.zyx); 4654} 4655 4656vec3 random3(vec2 p) { 4657 vec3 p3 = fract(vec3(p.xyx) * RANDOM_SCALE.xyz); 4658 p3 += dot(p3, p3.yxz + 19.19); 4659 return fract((p3.xxy + p3.yzz) * p3.zyx); 4660} 4661 4662vec3 random3(vec3 p) { 4663 p = fract(p * RANDOM_SCALE.xyz); 4664 p += dot(p, p.yxz + 19.19); 4665 return fract((p.xxy + p.yzz) * p.zyx); 4666} 4667 4668vec4 random4(float p) { 4669 vec4 p4 = fract(p * RANDOM_SCALE); 4670 p4 += dot(p4, p4.wzxy + 19.19); 4671 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 4672} 4673 4674vec4 random4(vec2 p) { 4675 vec4 p4 = fract(p.xyxy * RANDOM_SCALE); 4676 p4 += dot(p4, p4.wzxy + 19.19); 4677 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 4678} 4679 4680vec4 random4(vec3 p) { 4681 vec4 p4 = fract(p.xyzx * RANDOM_SCALE); 4682 p4 += dot(p4, p4.wzxy + 19.19); 4683 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 4684} 4685 4686vec4 random4(vec4 p4) { 4687 p4 = fract(p4 * RANDOM_SCALE); 4688 p4 += dot(p4, p4.wzxy + 19.19); 4689 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 4690} 4691#endif\r 4692#ifndef QTR_PI 4693#define QTR_PI 0.78539816339 4694#endif 4695#ifndef HALF_PI 4696#define HALF_PI 1.5707963267948966192313216916398 4697#endif 4698#ifndef PI 4699#define PI 3.1415926535897932384626433832795 4700#endif 4701#ifndef TWO_PI 4702#define TWO_PI 6.2831853071795864769252867665590 4703#endif 4704#ifndef TAU 4705#define TAU 6.2831853071795864769252867665590 4706#endif 4707#ifndef INV_PI 4708#define INV_PI 0.31830988618379067153776752674503 4709#endif 4710#ifndef INV_SQRT_TAU 4711#define INV_SQRT_TAU 0.39894228040143267793994605993439 4712#endif 4713#ifndef SQRT_HALF_PI 4714#define SQRT_HALF_PI 1.25331413732 4715#endif 4716#ifndef PHI 4717#define PHI 1.618033988749894848204586834 4718#endif 4719#ifndef EPSILON 4720#define EPSILON 0.0000001 4721#endif 4722#ifndef GOLDEN_RATIO 4723#define GOLDEN_RATIO 1.6180339887 4724#endif 4725#ifndef GOLDEN_RATIO_CONJUGATE 4726#define GOLDEN_RATIO_CONJUGATE 0.61803398875 4727#endif 4728#ifndef GOLDEN_ANGLE 4729#define GOLDEN_ANGLE 2.39996323 4730#endif 4731 4732#ifndef FNC_BACKIN 4733#define FNC_BACKIN 4734float backIn(in float t) { return pow(t, 3.) - t * sin(t * PI); } 4735#endif 4736#ifndef QTR_PI 4737#define QTR_PI 0.78539816339 4738#endif 4739#ifndef HALF_PI 4740#define HALF_PI 1.5707963267948966192313216916398 4741#endif 4742#ifndef PI 4743#define PI 3.1415926535897932384626433832795 4744#endif 4745#ifndef TWO_PI 4746#define TWO_PI 6.2831853071795864769252867665590 4747#endif 4748#ifndef TAU 4749#define TAU 6.2831853071795864769252867665590 4750#endif 4751#ifndef INV_PI 4752#define INV_PI 0.31830988618379067153776752674503 4753#endif 4754#ifndef INV_SQRT_TAU 4755#define INV_SQRT_TAU 0.39894228040143267793994605993439 4756#endif 4757#ifndef SQRT_HALF_PI 4758#define SQRT_HALF_PI 1.25331413732 4759#endif 4760#ifndef PHI 4761#define PHI 1.618033988749894848204586834 4762#endif 4763#ifndef EPSILON 4764#define EPSILON 0.0000001 4765#endif 4766#ifndef GOLDEN_RATIO 4767#define GOLDEN_RATIO 1.6180339887 4768#endif 4769#ifndef GOLDEN_RATIO_CONJUGATE 4770#define GOLDEN_RATIO_CONJUGATE 0.61803398875 4771#endif 4772#ifndef GOLDEN_ANGLE 4773#define GOLDEN_ANGLE 2.39996323 4774#endif 4775 4776#ifndef FNC_BACKIN 4777#define FNC_BACKIN 4778float backIn(in float t) { return pow(t, 3.) - t * sin(t * PI); } 4779#endif 4780 4781#ifndef FNC_BACKOUT 4782#define FNC_BACKOUT 4783float backOut(in float t) { return 1. - backIn(1. - t); } 4784#endif 4785#ifndef QTR_PI 4786#define QTR_PI 0.78539816339 4787#endif 4788#ifndef HALF_PI 4789#define HALF_PI 1.5707963267948966192313216916398 4790#endif 4791#ifndef PI 4792#define PI 3.1415926535897932384626433832795 4793#endif 4794#ifndef TWO_PI 4795#define TWO_PI 6.2831853071795864769252867665590 4796#endif 4797#ifndef TAU 4798#define TAU 6.2831853071795864769252867665590 4799#endif 4800#ifndef INV_PI 4801#define INV_PI 0.31830988618379067153776752674503 4802#endif 4803#ifndef INV_SQRT_TAU 4804#define INV_SQRT_TAU 0.39894228040143267793994605993439 4805#endif 4806#ifndef SQRT_HALF_PI 4807#define SQRT_HALF_PI 1.25331413732 4808#endif 4809#ifndef PHI 4810#define PHI 1.618033988749894848204586834 4811#endif 4812#ifndef EPSILON 4813#define EPSILON 0.0000001 4814#endif 4815#ifndef GOLDEN_RATIO 4816#define GOLDEN_RATIO 1.6180339887 4817#endif 4818#ifndef GOLDEN_RATIO_CONJUGATE 4819#define GOLDEN_RATIO_CONJUGATE 0.61803398875 4820#endif 4821#ifndef GOLDEN_ANGLE 4822#define GOLDEN_ANGLE 2.39996323 4823#endif 4824 4825#ifndef FNC_BACKIN 4826#define FNC_BACKIN 4827float backIn(in float t) { return pow(t, 3.) - t * sin(t * PI); } 4828#endif 4829 4830#ifndef FNC_BACKINOUT 4831#define FNC_BACKINOUT 4832float backInOut(in float t) { 4833 float f = t < .5 4834 ? 2.0 * t 4835 : 1.0 - (2.0 * t - 1.0); 4836 4837 float g = backIn(f); 4838 4839 return t < 0.5 4840 ? 0.5 * g 4841 : 0.5 * (1.0 - g) + 0.5; 4842} 4843#endif 4844#ifndef QTR_PI 4845#define QTR_PI 0.78539816339 4846#endif 4847#ifndef HALF_PI 4848#define HALF_PI 1.5707963267948966192313216916398 4849#endif 4850#ifndef PI 4851#define PI 3.1415926535897932384626433832795 4852#endif 4853#ifndef TWO_PI 4854#define TWO_PI 6.2831853071795864769252867665590 4855#endif 4856#ifndef TAU 4857#define TAU 6.2831853071795864769252867665590 4858#endif 4859#ifndef INV_PI 4860#define INV_PI 0.31830988618379067153776752674503 4861#endif 4862#ifndef INV_SQRT_TAU 4863#define INV_SQRT_TAU 0.39894228040143267793994605993439 4864#endif 4865#ifndef SQRT_HALF_PI 4866#define SQRT_HALF_PI 1.25331413732 4867#endif 4868#ifndef PHI 4869#define PHI 1.618033988749894848204586834 4870#endif 4871#ifndef EPSILON 4872#define EPSILON 0.0000001 4873#endif 4874#ifndef GOLDEN_RATIO 4875#define GOLDEN_RATIO 1.6180339887 4876#endif 4877#ifndef GOLDEN_RATIO_CONJUGATE 4878#define GOLDEN_RATIO_CONJUGATE 0.61803398875 4879#endif 4880#ifndef GOLDEN_ANGLE 4881#define GOLDEN_ANGLE 2.39996323 4882#endif 4883 4884#ifndef QTR_PI 4885#define QTR_PI 0.78539816339 4886#endif 4887#ifndef HALF_PI 4888#define HALF_PI 1.5707963267948966192313216916398 4889#endif 4890#ifndef PI 4891#define PI 3.1415926535897932384626433832795 4892#endif 4893#ifndef TWO_PI 4894#define TWO_PI 6.2831853071795864769252867665590 4895#endif 4896#ifndef TAU 4897#define TAU 6.2831853071795864769252867665590 4898#endif 4899#ifndef INV_PI 4900#define INV_PI 0.31830988618379067153776752674503 4901#endif 4902#ifndef INV_SQRT_TAU 4903#define INV_SQRT_TAU 0.39894228040143267793994605993439 4904#endif 4905#ifndef SQRT_HALF_PI 4906#define SQRT_HALF_PI 1.25331413732 4907#endif 4908#ifndef PHI 4909#define PHI 1.618033988749894848204586834 4910#endif 4911#ifndef EPSILON 4912#define EPSILON 0.0000001 4913#endif 4914#ifndef GOLDEN_RATIO 4915#define GOLDEN_RATIO 1.6180339887 4916#endif 4917#ifndef GOLDEN_RATIO_CONJUGATE 4918#define GOLDEN_RATIO_CONJUGATE 0.61803398875 4919#endif 4920#ifndef GOLDEN_ANGLE 4921#define GOLDEN_ANGLE 2.39996323 4922#endif 4923 4924#ifndef FNC_BOUNCEOUT 4925#define FNC_BOUNCEOUT 4926float bounceOut(in float t) { 4927 const float a = 4.0 / 11.0; 4928 const float b = 8.0 / 11.0; 4929 const float c = 9.0 / 10.0; 4930 4931 const float ca = 4356.0 / 361.0; 4932 const float cb = 35442.0 / 1805.0; 4933 const float cc = 16061.0 / 1805.0; 4934 4935 float t2 = t * t; 4936 4937 return t < a 4938 ? 7.5625 * t2 4939 : t < b 4940 ? 9.075 * t2 - 9.9 * t + 3.4 4941 : t < c 4942 ? ca * t2 - cb * t + cc 4943 : 10.8 * t * t - 20.52 * t + 10.72; 4944} 4945#endif 4946#ifndef QTR_PI 4947#define QTR_PI 0.78539816339 4948#endif 4949#ifndef HALF_PI 4950#define HALF_PI 1.5707963267948966192313216916398 4951#endif 4952#ifndef PI 4953#define PI 3.1415926535897932384626433832795 4954#endif 4955#ifndef TWO_PI 4956#define TWO_PI 6.2831853071795864769252867665590 4957#endif 4958#ifndef TAU 4959#define TAU 6.2831853071795864769252867665590 4960#endif 4961#ifndef INV_PI 4962#define INV_PI 0.31830988618379067153776752674503 4963#endif 4964#ifndef INV_SQRT_TAU 4965#define INV_SQRT_TAU 0.39894228040143267793994605993439 4966#endif 4967#ifndef SQRT_HALF_PI 4968#define SQRT_HALF_PI 1.25331413732 4969#endif 4970#ifndef PHI 4971#define PHI 1.618033988749894848204586834 4972#endif 4973#ifndef EPSILON 4974#define EPSILON 0.0000001 4975#endif 4976#ifndef GOLDEN_RATIO 4977#define GOLDEN_RATIO 1.6180339887 4978#endif 4979#ifndef GOLDEN_RATIO_CONJUGATE 4980#define GOLDEN_RATIO_CONJUGATE 0.61803398875 4981#endif 4982#ifndef GOLDEN_ANGLE 4983#define GOLDEN_ANGLE 2.39996323 4984#endif 4985 4986#ifndef FNC_BOUNCEOUT 4987#define FNC_BOUNCEOUT 4988float bounceOut(in float t) { 4989 const float a = 4.0 / 11.0; 4990 const float b = 8.0 / 11.0; 4991 const float c = 9.0 / 10.0; 4992 4993 const float ca = 4356.0 / 361.0; 4994 const float cb = 35442.0 / 1805.0; 4995 const float cc = 16061.0 / 1805.0; 4996 4997 float t2 = t * t; 4998 4999 return t < a 5000 ? 7.5625 * t2 5001 : t < b 5002 ? 9.075 * t2 - 9.9 * t + 3.4 5003 : t < c 5004 ? ca * t2 - cb * t + cc 5005 : 10.8 * t * t - 20.52 * t + 10.72; 5006} 5007#endif 5008 5009#ifndef FNC_BOUNCEIN 5010#define FNC_BOUNCEIN 5011float bounceIn(in float t) { return 1.0 - bounceOut(1.0 - t); } 5012#endif 5013#ifndef QTR_PI 5014#define QTR_PI 0.78539816339 5015#endif 5016#ifndef HALF_PI 5017#define HALF_PI 1.5707963267948966192313216916398 5018#endif 5019#ifndef PI 5020#define PI 3.1415926535897932384626433832795 5021#endif 5022#ifndef TWO_PI 5023#define TWO_PI 6.2831853071795864769252867665590 5024#endif 5025#ifndef TAU 5026#define TAU 6.2831853071795864769252867665590 5027#endif 5028#ifndef INV_PI 5029#define INV_PI 0.31830988618379067153776752674503 5030#endif 5031#ifndef INV_SQRT_TAU 5032#define INV_SQRT_TAU 0.39894228040143267793994605993439 5033#endif 5034#ifndef SQRT_HALF_PI 5035#define SQRT_HALF_PI 1.25331413732 5036#endif 5037#ifndef PHI 5038#define PHI 1.618033988749894848204586834 5039#endif 5040#ifndef EPSILON 5041#define EPSILON 0.0000001 5042#endif 5043#ifndef GOLDEN_RATIO 5044#define GOLDEN_RATIO 1.6180339887 5045#endif 5046#ifndef GOLDEN_RATIO_CONJUGATE 5047#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5048#endif 5049#ifndef GOLDEN_ANGLE 5050#define GOLDEN_ANGLE 2.39996323 5051#endif 5052 5053#ifndef FNC_BOUNCEOUT 5054#define FNC_BOUNCEOUT 5055float bounceOut(in float t) { 5056 const float a = 4.0 / 11.0; 5057 const float b = 8.0 / 11.0; 5058 const float c = 9.0 / 10.0; 5059 5060 const float ca = 4356.0 / 361.0; 5061 const float cb = 35442.0 / 1805.0; 5062 const float cc = 16061.0 / 1805.0; 5063 5064 float t2 = t * t; 5065 5066 return t < a 5067 ? 7.5625 * t2 5068 : t < b 5069 ? 9.075 * t2 - 9.9 * t + 3.4 5070 : t < c 5071 ? ca * t2 - cb * t + cc 5072 : 10.8 * t * t - 20.52 * t + 10.72; 5073} 5074#endif 5075 5076#ifndef FNC_BOUNCEINOUT 5077#define FNC_BOUNCEINOUT 5078float bounceInOut(in float t) { 5079 return t < 0.5 5080 ? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0)) 5081 : 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5; 5082} 5083#endif 5084#ifndef FNC_CIRCULARIN 5085#define FNC_CIRCULARIN 5086float circularIn(in float t) { return 1.0 - sqrt(1.0 - t * t); } 5087#endif 5088#ifndef FNC_CIRCULAROUT 5089#define FNC_CIRCULAROUT 5090float circularOut(in float t) { return sqrt((2.0 - t) * t); } 5091#endif 5092#ifndef FNC_CIRCULARINOUT 5093#define FNC_CIRCULARINOUT 5094float circularInOut(in float t) { 5095 return t < 0.5 5096 ? 0.5 * (1.0 - sqrt(1.0 - 4.0 * t * t)) 5097 : 0.5 * (sqrt((3.0 - 2.0 * t) * (2.0 * t - 1.0)) + 1.0); 5098} 5099#endif 5100#ifndef FNC_CUBICIN 5101#define FNC_CUBICIN 5102float cubicIn(in float t) { return t * t * t; } 5103#endif 5104#ifndef FNC_CUBICOUT 5105#define FNC_CUBICOUT 5106float cubicOut(in float t) { 5107 float f = t - 1.0; 5108 return f * f * f + 1.0; 5109} 5110#endif 5111#ifndef FNC_CUBICINOUT 5112#define FNC_CUBICINOUT 5113float cubicInOut(in float t) { 5114 return t < 0.5 5115 ? 4.0 * t * t * t 5116 : 0.5 * pow(2.0 * t - 2.0, 3.0) + 1.0; 5117} 5118#endif 5119#ifndef QTR_PI 5120#define QTR_PI 0.78539816339 5121#endif 5122#ifndef HALF_PI 5123#define HALF_PI 1.5707963267948966192313216916398 5124#endif 5125#ifndef PI 5126#define PI 3.1415926535897932384626433832795 5127#endif 5128#ifndef TWO_PI 5129#define TWO_PI 6.2831853071795864769252867665590 5130#endif 5131#ifndef TAU 5132#define TAU 6.2831853071795864769252867665590 5133#endif 5134#ifndef INV_PI 5135#define INV_PI 0.31830988618379067153776752674503 5136#endif 5137#ifndef INV_SQRT_TAU 5138#define INV_SQRT_TAU 0.39894228040143267793994605993439 5139#endif 5140#ifndef SQRT_HALF_PI 5141#define SQRT_HALF_PI 1.25331413732 5142#endif 5143#ifndef PHI 5144#define PHI 1.618033988749894848204586834 5145#endif 5146#ifndef EPSILON 5147#define EPSILON 0.0000001 5148#endif 5149#ifndef GOLDEN_RATIO 5150#define GOLDEN_RATIO 1.6180339887 5151#endif 5152#ifndef GOLDEN_RATIO_CONJUGATE 5153#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5154#endif 5155#ifndef GOLDEN_ANGLE 5156#define GOLDEN_ANGLE 2.39996323 5157#endif 5158 5159#ifndef FNC_ELASTICIN 5160#define FNC_ELASTICIN 5161float elasticIn(in float t) { return sin(13.0 * t * HALF_PI) * pow(2.0, 10.
51610 * (t - 1.0)); } 5162#endif 5163#ifndef QTR_PI 5164#define QTR_PI 0.78539816339 5165#endif 5166#ifndef HALF_PI 5167#define HALF_PI 1.5707963267948966192313216916398 5168#endif 5169#ifndef PI 5170#define PI 3.1415926535897932384626433832795 5171#endif 5172#ifndef TWO_PI 5173#define TWO_PI 6.2831853071795864769252867665590 5174#endif 5175#ifndef TAU 5176#define TAU 6.2831853071795864769252867665590 5177#endif 5178#ifndef INV_PI 5179#define INV_PI 0.31830988618379067153776752674503 5180#endif 5181#ifndef INV_SQRT_TAU 5182#define INV_SQRT_TAU 0.39894228040143267793994605993439 5183#endif 5184#ifndef SQRT_HALF_PI 5185#define SQRT_HALF_PI 1.25331413732 5186#endif 5187#ifndef PHI 5188#define PHI 1.618033988749894848204586834 5189#endif 5190#ifndef EPSILON 5191#define EPSILON 0.0000001 5192#endif 5193#ifndef GOLDEN_RATIO 5194#define GOLDEN_RATIO 1.6180339887 5195#endif 5196#ifndef GOLDEN_RATIO_CONJUGATE 5197#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5198#endif 5199#ifndef GOLDEN_ANGLE 5200#define GOLDEN_ANGLE 2.39996323 5201#endif 5202 5203#ifndef FNC_ELASTICOUT 5204#define FNC_ELASTICOUT 5205float elasticOut(in float t) { return sin(-13.0 * (t + 1.0) * HALF_PI) * pow(2.0, -10.0 * t) + 1.0; } 5206#endif 5207#ifndef QTR_PI 5208#define QTR_PI 0.78539816339 5209#endif 5210#ifndef HALF_PI 5211#define HALF_PI 1.5707963267948966192313216916398 5212#endif 5213#ifndef PI 5214#define PI 3.1415926535897932384626433832795 5215#endif 5216#ifndef TWO_PI 5217#define TWO_PI 6.2831853071795864769252867665590 5218#endif 5219#ifndef TAU 5220#define TAU 6.2831853071795864769252867665590 5221#endif 5222#ifndef INV_PI 5223#define INV_PI 0.31830988618379067153776752674503 5224#endif 5225#ifndef INV_SQRT_TAU 5226#define INV_SQRT_TAU 0.39894228040143267793994605993439 5227#endif 5228#ifndef SQRT_HALF_PI 5229#define SQRT_HALF_PI 1.25331413732 5230#endif 5231#ifndef PHI 5232#define PHI 1.618033988749894848204586834 5233#endif 5234#ifndef EPSILON 5235#define EPSILON 0.0000001 5236#endif 5237#ifndef GOLDEN_RATIO 5238#define GOLDEN_RATIO 1.6180339887 5239#endif 5240#ifndef GOLDEN_RATIO_CONJUGATE 5241#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5242#endif 5243#ifndef GOLDEN_ANGLE 5244#define GOLDEN_ANGLE 2.39996323 5245#endif 5246 5247#ifndef FNC_ELASTICINOUT 5248#define FNC_ELASTICINOUT 5249float elasticInOut(in float t) { 5250 return t < 0.5 5251 ? 0.5 * sin(+13.0 * HALF_PI * 2.0 * t) * pow(2.0, 10.0 * (2.0 * t - 1.0)) 5252 : 0.5 * sin(-13.0 * HALF_PI * ((2.0 * t - 1.0) + 1.0)) * pow(2.0, -10.0 * (2.0 * t - 1.0)) + 1.0; 5253} 5254#endif 5255#ifndef FNC_EXPONENTIALIN 5256#define FNC_EXPONENTIALIN 5257float exponentialIn(in float t) { return t == 0.0 ? t : pow(2.0, 10.0 * (t - 1.0)); } 5258#endif 5259#ifndef FNC_EXPONENTIALOUT 5260#define FNC_EXPONENTIALOUT 5261float exponentialOut(in float t) { return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t); } 5262#endif 5263#ifndef FNC_EXPONENTIALINOUT 5264#define FNC_EXPONENTIALINOUT 5265float exponentialInOut(in float t) { 5266 return t == 0.0 || t == 1.0 5267 ? t 5268 : t < 0.5 5269 ? +0.5 * pow(2.0, (20.0 * t) - 10.0) 5270 : -0.5 * pow(2.0, 10.0 - (t * 20.0)) + 1.0; 5271} 5272#endif 5273#ifndef FNC_LINEARIN 5274#define FNC_LINEARIN 5275float linearIn(in float t) { return t; } 5276#endif 5277#ifndef FNC_LINEAROUT 5278#define FNC_LINEAROUT 5279float linearOut(in float t) { return t; } 5280#endif 5281#ifndef FNC_LINEARINOUT 5282#define FNC_LINEARINOUT 5283float linearInOut(in float t) { return t; } 5284#endif 5285#ifndef FNC_QUADRATICIN 5286#define FNC_QUADRATICIN 5287float quadraticIn(in float t) { return t * t; } 5288#endif 5289#ifndef FNC_QUADRATICOUT 5290#define FNC_QUADRATICOUT 5291float quadraticOut(in float t) { return -t * (t - 2.0); } 5292#endif 5293#ifndef FNC_QUADRATICINOUT 5294#define FNC_QUADRATICINOUT 5295float quadraticInOut(in float t) { 5296 float p = 2.0 * t * t; 5297 return t < 0.5 ? p : -p + (4.0 * t) - 1.0; 5298} 5299#endif 5300#ifndef FNC_QUARTICIN 5301#define FNC_QUARTICIN 5302float quarticIn(in float t) { return pow(t, 4.0); } 5303#endif 5304#ifndef FNC_QUARTICOUT 5305#define FNC_QUARTICOUT 5306float quarticOut(in float t) { 5307 float it = t - 1.0; 5308 return it * it * it * (1.0 - t) + 1.0; 5309} 5310#endif 5311#ifndef FNC_QUARTICINOUT 5312#define FNC_QUARTICINOUT 5313float quarticInOut(in float t) { 5314 return t < 0.5 5315 ? +8.0 * pow(t, 4.0) 5316 : -8.0 * pow(t - 1.0, 4.0) + 1.0; 5317} 5318#endif 5319#ifndef FNC_QUINTICIN 5320#define FNC_QUINTICIN 5321float quinticIn(in float t) { return pow(t, 5.0); } 5322#endif 5323#ifndef FNC_QUINTICOUT 5324#define FNC_QUINTICOUT 5325float quinticOut(in float t) { return 1.0 - (pow(t - 1.0, 5.0)); } 5326#endif 5327#ifndef FNC_QUINTICINOUT 5328#define FNC_QUINTICINOUT 5329float quinticInOut(in float t) { 5330 return t < 0.5 5331 ? +16.0 * pow(t, 5.0) 5332 : -0.5 * pow(2.0 * t - 2.0, 5.0) + 1.0; 5333} 5334#endif 5335#ifndef QTR_PI 5336#define QTR_PI 0.78539816339 5337#endif 5338#ifndef HALF_PI 5339#define HALF_PI 1.5707963267948966192313216916398 5340#endif 5341#ifndef PI 5342#define PI 3.1415926535897932384626433832795 5343#endif 5344#ifndef TWO_PI 5345#define TWO_PI 6.2831853071795864769252867665590 5346#endif 5347#ifndef TAU 5348#define TAU 6.2831853071795864769252867665590 5349#endif 5350#ifndef INV_PI 5351#define INV_PI 0.31830988618379067153776752674503 5352#endif 5353#ifndef INV_SQRT_TAU 5354#define INV_SQRT_TAU 0.39894228040143267793994605993439 5355#endif 5356#ifndef SQRT_HALF_PI 5357#define SQRT_HALF_PI 1.25331413732 5358#endif 5359#ifndef PHI 5360#define PHI 1.618033988749894848204586834 5361#endif 5362#ifndef EPSILON 5363#define EPSILON 0.0000001 5364#endif 5365#ifndef GOLDEN_RATIO 5366#define GOLDEN_RATIO 1.6180339887 5367#endif 5368#ifndef GOLDEN_RATIO_CONJUGATE 5369#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5370#endif 5371#ifndef GOLDEN_ANGLE 5372#define GOLDEN_ANGLE 2.39996323 5373#endif 5374 5375#ifndef QTR_PI 5376#define QTR_PI 0.78539816339 5377#endif 5378#ifndef HALF_PI 5379#define HALF_PI 1.5707963267948966192313216916398 5380#endif 5381#ifndef PI 5382#define PI 3.1415926535897932384626433832795 5383#endif 5384#ifndef TWO_PI 5385#define TWO_PI 6.2831853071795864769252867665590 5386#endif 5387#ifndef TAU 5388#define TAU 6.2831853071795864769252867665590 5389#endif 5390#ifndef INV_PI 5391#define INV_PI 0.31830988618379067153776752674503 5392#endif 5393#ifndef INV_SQRT_TAU 5394#define INV_SQRT_TAU 0.39894228040143267793994605993439 5395#endif 5396#ifndef SQRT_HALF_PI 5397#define SQRT_HALF_PI 1.25331413732 5398#endif 5399#ifndef PHI 5400#define PHI 1.618033988749894848204586834 5401#endif 5402#ifndef EPSILON 5403#define EPSILON 0.0000001 5404#endif 5405#ifndef GOLDEN_RATIO 5406#define GOLDEN_RATIO 1.6180339887 5407#endif 5408#ifndef GOLDEN_RATIO_CONJUGATE 5409#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5410#endif 5411#ifndef GOLDEN_ANGLE 5412#define GOLDEN_ANGLE 2.39996323 5413#endif 5414 5415#ifndef FNC_SINEIN 5416#define FNC_SINEIN 5417float sineIn(in float t) { return sin((t - 1.0) * HALF_PI) + 1.0; } 5418#endif 5419#ifndef QTR_PI 5420#define QTR_PI 0.78539816339 5421#endif 5422#ifndef HALF_PI 5423#define HALF_PI 1.5707963267948966192313216916398 5424#endif 5425#ifndef PI 5426#define PI 3.1415926535897932384626433832795 5427#endif 5428#ifndef TWO_PI 5429#define TWO_PI 6.2831853071795864769252867665590 5430#endif 5431#ifndef TAU 5432#define TAU 6.2831853071795864769252867665590 5433#endif 5434#ifndef INV_PI 5435#define INV_PI 0.31830988618379067153776752674503 5436#endif 5437#ifndef INV_SQRT_TAU 5438#define INV_SQRT_TAU 0.39894228040143267793994605993439 5439#endif 5440#ifndef SQRT_HALF_PI 5441#define SQRT_HALF_PI 1.25331413732 5442#endif 5443#ifndef PHI 5444#define PHI 1.618033988749894848204586834 5445#endif 5446#ifndef EPSILON 5447#define EPSILON 0.0000001 5448#endif 5449#ifndef GOLDEN_RATIO 5450#define GOLDEN_RATIO 1.6180339887 5451#endif 5452#ifndef GOLDEN_RATIO_CONJUGATE 5453#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5454#endif 5455#ifndef GOLDEN_ANGLE 5456#define GOLDEN_ANGLE 2.39996323 5457#endif 5458 5459#ifndef FNC_SINEOUT 5460#define FNC_SINEOUT 5461float sineOut(in float t) { return sin(t * HALF_PI); } 5462#endif 5463#ifndef QTR_PI 5464#define QTR_PI 0.78539816339 5465#endif 5466#ifndef HALF_PI 5467#define HALF_PI 1.5707963267948966192313216916398 5468#endif 5469#ifndef PI 5470#define PI 3.1415926535897932384626433832795 5471#endif 5472#ifndef TWO_PI 5473#define TWO_PI 6.2831853071795864769252867665590 5474#endif 5475#ifndef TAU 5476#define TAU 6.2831853071795864769252867665590 5477#endif 5478#ifndef INV_PI 5479#define INV_PI 0.31830988618379067153776752674503 5480#endif 5481#ifndef INV_SQRT_TAU 5482#define INV_SQRT_TAU 0.39894228040143267793994605993439 5483#endif 5484#ifndef SQRT_HALF_PI 5485#define SQRT_HALF_PI 1.25331413732 5486#endif 5487#ifndef PHI 5488#define PHI 1.618033988749894848204586834 5489#endif 5490#ifndef EPSILON 5491#define EPSILON 0.0000001 5492#endif 5493#ifndef GOLDEN_RATIO 5494#define GOLDEN_RATIO 1.6180339887 5495#endif 5496#ifndef GOLDEN_RATIO_CONJUGATE 5497#define GOLDEN_RATIO_CONJUGATE 0.61803398875 5498#endif 5499#ifndef GOLDEN_ANGLE 5500#define GOLDEN_ANGLE 2.39996323 5501#endif 5502 5503#ifndef FNC_SINEINOUT 5504#define FNC_SINEINOUT 5505float sineInOut(in float t) { return -0.5 * (cos(PI * t) - 1.0); } 5506#endif 5507 5508float circle(vec2 uv, float border){\r 5509 float radius = 0.5;\r 5510 float dist = radius - distance(uv, vec2(0.5));\r 5511 float t = smoothstep(0.0, border, dist);\r 5512 return t;\r 5513 } 5514 5515void main() {\r 5516vec2 uv = gl_PointCoord;\r 5517uv.y*=-1.;\r 5518uv /= vec2(uNbLines,uNbColumns); 5519 5520float texOffsetU = vPosition.x / uNbLines;\r 5521float texOffsetV = vPosition.y / uNbColumns;\r 5522uv+=vec2(texOffsetU,texOffsetV);\r 5523uv+=vec2(0.5); 5524 5525gl_FragColor = texture2D(uTexture,uv);\r 5526 5527float pointOpacity = (vIsSurface*clamp(random(texOffsetU) \r 5528 * random(texOffsetV),0.0,1.0) + 0.5*(1.0-vIsSurface)) \r 5529 * circle(gl_PointCoord, 0.2); 5530 5531gl_FragColor.a = pointOpacity;\r 5532}`,fV=`uniform float uPointSize;\r 5533 5534 uniform float uTime;\r 5535 5536 uniform float uNbLines;\r 5537 5538 uniform float uNbColumns;\r 5539 5540 varying vec3 vPosition;\r 5541 5542 varying float vIsSurface; 5543 5544 #ifndef RANDOM_SCALE 5545#ifdef RANDOM_HIGHER_RANGE 5546#define RANDOM_SCALE vec4(.1031, .1030, .0973, .1099) 5547#else 5548#define RANDOM_SCALE vec4(443.897, 441.423, .0973, .1099) 5549#endif 5550#endif 5551 5552#ifndef FNC_RANDOM 5553#define FNC_RANDOM 5554float random(in float x) { 5555#ifdef RANDOM_SINLESS 5556 x = fract(x * RANDOM_SCALE.x); 5557 x *= x + 33.33; 5558 x *= x + x; 5559 return fract(x); 5560#else 5561 return fract(sin(x) * 43758.5453); 5562#endif 5563} 5564 5565float random(in vec2 st) { 5566#ifdef RANDOM_SINLESS 5567 vec3 p3 = fract(vec3(st.xyx) * RANDOM_SCALE.xyz); 5568 p3 += dot(p3, p3.yzx + 33.33); 5569 return fract((p3.x + p3.y) * p3.z); 5570#else 5571 return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453); 5572#endif 5573} 5574 5575float random(in vec3 pos) { 5576#ifdef RANDOM_SINLESS 5577 pos = fract(pos * RANDOM_SCALE.xyz); 5578 pos += dot(pos, pos.zyx + 31.32); 5579 return fract((pos.x + pos.y) * pos.z); 5580#else 5581 return fract(sin(dot(pos.xyz, vec3(70.9898, 78.233, 32.4355))) * 43758.5453123); 5582#endif 5583} 5584 5585float random(in vec4 pos) { 5586#ifdef RANDOM_SINLESS 5587 pos = fract(pos * RANDOM_SCALE); 5588 pos += dot(pos, pos.wzxy + 33.33); 5589 return fract((pos.x + pos.y) * (pos.z + pos.w)); 5590#else 5591 float dot_product = dot(pos, vec4(12.9898,78.233,45.164,94.673)); 5592 return fract(sin(dot_product) * 43758.5453); 5593#endif 5594} 5595 5596vec2 random2(float p) { 5597 vec3 p3 = fract(vec3(p) * RANDOM_SCALE.xyz); 5598 p3 += dot(p3, p3.yzx + 19.19); 5599 return fract((p3.xx + p3.yz) * p3.zy); 5600} 5601 5602vec2 random2(vec2 p) { 5603 vec3 p3 = fract(p.xyx * RANDOM_SCALE.xyz); 5604 p3 += dot(p3, p3.yzx + 19.19); 5605 return fract((p3.xx + p3.yz) * p3.zy); 5606} 5607 5608vec2 random2(vec3 p3) { 5609 p3 = fract(p3 * RANDOM_SCALE.xyz); 5610 p3 += dot(p3, p3.yzx + 19.19); 5611 return fract((p3.xx + p3.yz) * p3.zy); 5612} 5613 5614vec3 random3(float p) { 5615 vec3 p3 = fract(vec3(p) * RANDOM_SCALE.xyz); 5616 p3 += dot(p3, p3.yzx + 19.19); 5617 return fract((p3.xxy + p3.yzz) * p3.zyx); 5618} 5619 5620vec3 random3(vec2 p) { 5621 vec3 p3 = fract(vec3(p.xyx) * RANDOM_SCALE.xyz); 5622 p3 += dot(p3, p3.yxz + 19.19); 5623 return fract((p3.xxy + p3.yzz) * p3.zyx); 5624} 5625 5626vec3 random3(vec3 p) { 5627 p = fract(p * RANDOM_SCALE.xyz); 5628 p += dot(p, p.yxz + 19.19); 5629 return fract((p.xxy + p.yzz) * p.zyx); 5630} 5631 5632vec4 random4(float p) { 5633 vec4 p4 = fract(p * RANDOM_SCALE); 5634 p4 += dot(p4, p4.wzxy + 19.19); 5635 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 5636} 5637 5638vec4 random4(vec2 p) { 5639 vec4 p4 = fract(p.xyxy * RANDOM_SCALE); 5640 p4 += dot(p4, p4.wzxy + 19.19); 5641 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 5642} 5643 5644vec4 random4(vec3 p) { 5645 vec4 p4 = fract(p.xyzx * RANDOM_SCALE); 5646 p4 += dot(p4, p4.wzxy + 19.19); 5647 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 5648} 5649 5650vec4 random4(vec4 p4) { 5651 p4 = fract(p4 * RANDOM_SCALE); 5652 p4 += dot(p4, p4.wzxy + 19.19); 5653 return fract((p4.xxyz + p4.yzzw) * p4.zywx); 5654} 5655#endif 5656 5657 \r 5658 void main() { 5659 5660 5661 vec3 positionTransformed = position; \r 5662 positionTransformed.xy = random2(positionTransformed.xy) *vec2(uNbLines,uNbColumns);\r 5663 \r 5664 positionTransformed.x-=uNbLines/2.;\r 5665 positionTransformed = vec3(positionTransformed.x * 4.,(sin(positionTransformed.x/30. + uTime*0.5)+sin(positionTransformed.y/30. + uTime*0.78))*10. - 50.,(positionTransformed.y - uNbColumns/2.)*4.); 5666 5667 5668 vec2 random = random2(position.xyz);\r 5669 vIsSurface = 1.;\r 5670 if(random.x < 0.3){\r 5671 positionTransformed.y -= 800. * random.y;\r 5672 positionTransformed.z -= 100.;\r 5673 vIsSurface = 0.;\r 5674 }\r 5675 5676 5677 5678 vec4 modelPosition = modelMatrix * vec4(positionTransformed, 1.0);\r 5679 vec4 viewPosition = viewMatrix * modelPosition;\r 5680 \r 5681 vec4 projectedPosition = projectionMatrix * viewPosition;\r 5682 \r 5683 gl_Position = projectedPosition;\r 5684 5685 5686 gl_PointSize = uPointSize * (1.0 / - viewPosition.z);\r 5687 \r 5688 vPosition = position; 5689 5690 }`;const v3=120,_3=75;function dV({initProgress:i}){const e=K.exports.useRef(),t=-25;let n=[];const{clock:r}=Cn();nl("/images/seaPointsTexture.jpg",o=>
5690{e.current.geometry.center(),o.colorSpace="srgb",e.current.material.uTexture=o}),ws(()=>{!window.__componentStatus.pointsSea.play||(e.current.material.uTime=r.elapsedTime)});const s=K.exports.useMemo(()=>{for(let o=0;o<v3;o++)for(let a=0;a<_3;a++){const l=o,u=a,f=0*Math.random();n.push(l,u,f)}return new Float32Array(n)});return K.exports.useEffect(()=>{window.__componentStatus.pointsSea.el=e.current},[]),Ye("points",{ref:e,scale:.1,position:[0,t,15],frustumCulled:!1,children:[F("bufferGeometry",{attach:"geometry",children:F("bufferAttribute",{attach:"attributes-position",count:s.length/3,array:s,itemSize:3})}),F("pointsSeaMaterial",{uPointSize:200,uNbLines:v3,uNbColumns:_3,transparent:!0,depthWrite:!1,depthTest:!1,uProgress:0,blending:pf},Rf())]})}const hV=ku({uPointSize:1,uTexture:null,uNbLines:1,uNbColumns:1,uTime:null,uProgress:0},fV,cV);xo({PointsSeaMaterial:hV});var pV=`uniform float uTime;\r 5691varying vec2 vUv; 5692 5693void main() {\r 5694 vUv = uv;\r 5695 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\r 5696}`,mV=`uniform sampler2D uTexture;\r 5697uniform sampler2D uTextureNext;\r 5698uniform sampler2D uNoise;\r 5699varying vec2 vUv;\r 5700uniform float uTime;\r 5701uniform vec2 uResolution;\r 5702uniform bool uFlipY;\r 5703uniform float uChangeTime;\r 5704float ramp(float y, float start, float end)\r 5705{\r 5706 float inside = step(start,y) - step(end,y);\r 5707 float fact = (y-start)/(end-start)*inside;\r 5708 return (1.-fact) * inside;\r 5709 \r 5710} 5711 5712float stripes(vec2 uv)\r 5713{\r 5714 float noi = 1.0;\r 5715 return ramp(mod(uv.y*1. + uTime/2.,2.),0.1,0.6);\r 5716} 5717 5718float noise(vec2 p)\r 5719{\r 5720 float s = texture2D(uNoise,vec2(1.,2.*cos(uTime))*uTime*8. + p*1.2).x;\r 5721 s *= s;\r 5722 return s;\r 5723}\r 5724 5725void main() {\r 5726 vec2 uvCorrect = vUv;\r 5727 vec4 color = vec4(0.3);\r 5728 if(uFlipY)\r 5729 {\r 5730 uvCorrect.y = 1.0 - vUv.y;\r 5731 }\r 5732 float vigAmt = 3.+.3*sin(uTime + 5.*cos(uTime*5.)); 5733 5734 float changeTimeToNow = uTime - uChangeTime;\r 5735 float changeProgress = clamp(0.,1.,changeTimeToNow / 0.3) ;\r 5736 5737 vec2 uvNext = uvCorrect;\r 5738 uvNext.xy = ((uvNext.xy -0.5) * (1.0-changeProgress)*0.1) + uvNext.xy;\r 5739 \r 5740 color = texture2D(uTexture, uvNext); 5741 5742 color-=(noise(vUv*1.5)+0.33) * (1.0-changeProgress); 5743 5744 float stripe = stripes(vUv);\r 5745 stripe *=stripe;\r 5746 color.rgb += vec3(stripe*.5,stripe*.15,stripe*.023);\r 5747 float vignette = (1.2-vigAmt*(uvCorrect.y-.5)*(uvCorrect.y-.5))*(1.2-vigAmt*(uvCorrect.x-.5)*(uvCorrect.x-.5)); 5748 5749 color += noise(vUv*2.)/8.;\r 5750 color.rgb *= vignette;\r 5751 color *= 0.93+0.07*sin((vUv.y+uTime*0.03)*600.0);\r 5752 5753 \r 5754 \r 5755 gl_FragColor = vec4(color.rgb,1.0); 5756 5757 \r 5758}`,gV=`uniform float uTime;\r 5759varying vec2 vUv; 5760 5761void main() {\r 5762 vUv = uv;\r 5763 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\r 5764}`,vV=`uniform sampler2D uTexture;\r 5765uniform sampler2D uNoise;\r 5766varying vec2 vUv;\r 5767uniform float uTime;\r 5768uniform vec2 uResolution;\r 5769uniform bool uFlipY;\r 5770uniform float uChangeTime;\r 5771uniform float uIndex;\r 5772uniform float uTotalTitles;\r 5773uniform float uTotalProjects; 5774 5775float rand(vec2 p)\r 5776{\r 5777 float t = floor(uTime * 20.) / 10.;\r 5778 return fract(sin(dot(p, vec2(t * 12.9898, t * 78.233))) * 43758.5453);\r 5779} 5780 5781float noise(vec2 uv, float blockiness)\r 5782{ \r 5783 vec2 lv = fract(uv);\r 5784 vec2 id = floor(uv);\r 5785 \r 5786 float n1 = rand(id);\r 5787 float n2 = rand(id+vec2(1,0));\r 5788 float n3 = rand(id+vec2(0,1));\r 5789 float n4 = rand(id+vec2(1,1));\r 5790 \r 5791 vec2 u = smoothstep(0.0, 1.0 + blockiness, lv); 5792 5793 return mix(mix(n1, n2, u.x), mix(n3, n4, u.x), u.y);\r 5794}\r 5795float fbm(vec2 uv, int count, float blockiness, float complexity)\r 5796{\r 5797 float val = 0.0;\r 5798 float amp = 0.5;\r 5799 \r 5800 while(count != 0)\r 5801 {\r 5802 val += amp * noise(uv, blockiness);\r 5803 amp *= 0.5;\r 5804 uv *= complexity; \r 5805 count--;\r 5806 }\r 5807 \r 5808 return val;\r 5809} 5810 5811void main() {\r 5812 vec2 correctedUV = vUv;\r 5813 if(uFlipY){\r 5814 5815 5816 }\r 5817 correctedUV.x = 1.0-correctedUV.x;\r 5818 5819 float uvPerTitle = 1.0/uTotalTitles; \r 5820 vec2 transformedUV = correctedUV;\r 5821 transformedUV.y = transformedUV.y* uvPerTitle + uIndex * uvPerTitle;\r 5822 \r 5823 vec4 color = texture2D(uTexture, 1.0-transformedUV); 5824 5825 color.a*=.85;\r 5826 color*= vec4(correctedUV.x,0.,correctedUV.y,1.0);\r 5827 gl_FragColor = color; 5828 5829 \r 5830 5831 \r 5832}`;class _V{constructor(e,t,n){this.projects=t,this.videoTexture=e,this.uuid=Rf(),this.setProject(0),this.clipChangeFunc=n,this.videoTexture.image.ontimeupdate=()=>this.videoTimeUpdate(this.videoTexture.image)}videoTimeUpdate(e){e.currentTime>this.currentProject.t1&&(e.currentTime=this.currentProject.t0)}next(){let e=this.projects.indexOf(this.currentProject);e=(e+1)%this.projects.length,this.setProject(e)}prev(){let e=this.projects.indexOf(this.currentProject);e=(e-1+this.projects.length)%this.projects.length,this.setProject(e)}setProject(e){this.currentProject=this.projects[e],this.videoTexture.image.currentTime=this.currentProject.t0,this.clipChangeFunc&&this.clipChangeFunc(this)}}function yV(i){const e=K.exports.useRef(),t=K.exports.useRef(),n=K.exports.useRef(),{nodes:r,materials:s}=Gs("/model/robotExp2.glb"),{clock:o}=Cn();nl("/images/noise.png",g=>
5832{g.wrapS=As,g.wrapT=As,g.colorSpace=Ji,e.current.uniforms.uNoise.value=g});const a=ZG("/explore/robot.mp4",{muted:!0,loop:!0,autoPlay:!0,preload:"auto"});nl("/explore/exploreProjectTitle.png",g=>{g.colorSpace=Ji,t.current.uniforms.uTexture.value=g,t.current.uniforms.uTotalTitles.value=6,t.current.uniforms.uTotalProjects=i.projectConfig.length});function l(g){e.current.uniforms.uChangeTime.value=o.elapsedTime,g.currentProject&&(t.current.uniforms.uIndex.value=i.projectConfig.indexOf(g.currentProject))}function u(){if(f.currentProject){const g=new CustomEvent("detailModalOpen",{detail:f.currentProject});window.dispatchEvent(g)}}const f=K.exports.useMemo(()=>new _V(a,i.projectConfig,l),[i.projectConfig],[]);ws(()=>{!window.__componentStatus.exploreRobot.play||(e.current.uniforms.uTime.value=o.elapsedTime,a.needsUpdate=!0,e.current.uniforms.uTexture.value=a)}),K.exports.useEffect(()=>(window.__componentStatus.exploreRobot.el=n.current,a.colorSpace=Ji,e.current.uniforms.uTexture.value=a,a.image.oncanplay=()=>{a.image.play()},s.arrowLeft.transparent=!0,s.arrowLeft.opacity=.6,s.arrowLeft.color=new He(0),s.arrowRight.transparent=!0,s.arrowRight.opacity=.6,s.arrowRight.color=new He(0),n.current.traverse(g=>{g.isMesh&&(g.frustumCulled=!1,g.onAfterRender=function(){window.setTimeout(()=>{g.frustumCulled=!0},2e3),g.onAfterRender=function(){}})}),window.addEventListener("touchstart",()=>{a.image.paused&&a.image.play()}),window.addEventListener("touchmove",()=>{a.image.paused&&a.image.play()}),()=>{}),[]);const h=new He(16777215),p=new He(0);function m(g,A="in"){A==="in"?(g.object.material.opacity=1,g.object.material.emissive=p,document.body.style.cursor="pointer"):(g.object.material.opacity=.6,g.object.material.emissive=h,document.body.style.cursor="default")}function v(g,A="in"){A==="in"?document.body.style.cursor="pointer":document.body.style.cursor="default"}let _;function y(g){const A=g?g.detail.progress:0;if(_=En(A,wt("explore-robot-come"),wt("explore-robot-go")),_>0&&_<1){const S=n.current;S.rotation.x=.3*_}}return K.exports.useEffect(()=>(window.addEventListener("websiteProgress",y),()=>{window.removeEventListener("websiteProgress",y)}),[]),Ye("group",{...i,dispose:null,ref:n,children:[F("mesh",{name:"screen",castShadow:!0,receiveShadow:!0,geometry:r.screen.geometry,onPointerEnter:g=>{v(g,"in")},onPointerOut:g=>{v(g,"out")},onClick:()=>u(),children:F("exploreProjectMaterial",{ref:e,uResolution:new Re(16,10),uFlipY:!0},Rf())}),F("mesh",{name:"lightLeft",castShadow:!0,receiveShadow:!0,geometry:r.lightLeft.geometry,material:s.light,rotation:[Math.PI/2,-.183,0],scale:[.373,.123,.247]}),F("mesh",{name:"lightRight",castShadow:!0,receiveShadow:!0,geometry:r.lightRight.geometry,material:s.light,rotation:[-Math.PI/2,-.177,-Math.PI],scale:[.373,.123,.247]}),F("mesh",{onClick:()=>{f.next()},onPointerEnter:g=>{m(g,"in")},onPointerOut:g=>{m(g,"out")},name:"arrowRight",castShadow:!0,receiveShadow:!0,geometry:r.arrowRight.geometry,material:s.arrowRight,rotation:[Math.PI/2,-.183,0],scale:[.078,.037,.074]}),F("mesh",{onClick:()=>{f.prev()},onPointerEnter:g=>{m(g,"in")},onPointerOut:g=>{m(g,"out")},name:"arrowLeft",castShadow:!0,receiveShadow:!0,geometry:r.arrowLeft.geometry,material:s.arrowLeft,rotation:[-Math.PI/2,-.177,-Math.PI],scale:[.078,.037,.074]}),F("mesh",{castShadow:!0,receiveShadow:!0,geometry:r.textContainer.geometry,rotation:[.046,0,-.005],onClick:()=>u(),children:F("exploreTextMaterial",{ref:t,transparent:!0,uResolution:new Re(160,100),uFlipY:!0},Rf())}),F("mesh",{name:"Cube100",castShadow:!0,receiveShadow:!0,geometry:r.Cube100.geometry,material:s.Org}),F("mesh",{name:"Cube100_1",castShadow:!0,receiveShadow:!0,geometry:r.Cube100_1.geometry,material:s.Metal}),F("mesh",{name:"Cube100_2",castShadow:!0,receiveShadow:!0,geometry:r.Cube100_2.geometry,material:s.Barrel}),F("mesh",{name:"Cube100_3",castShadow:!0,receiveShadow:!0,geometry:r.Cube100_3.geometry,material:s.Plastik}),F("mesh",{name:"Cube100_4",castShadow:!0,receiveShadow:!0,geometry:r.Cube100_4.geometry,material:s["Metal.silver"]}),F("mesh",{name:"Cube100_5",castShadow:!0,receiveShadow:!0,geometry:r.Cube100_5.geometry,material:s["Plastik.gray"]})]})}Gs.preload("/model/robotExp2.glb");const xV=ku({uTexture:null,uTime:null,uResolution:null,uFlipY:!1,uNoise:null,uChangeTime:0},pV,mV);xo({ExploreProjectMaterial:xV});const AV=ku({uTexture:null,uTotalTitles:1,uTotalProjects:1,uIndex:0,uTime:null,uResolution:null,uFlipY:!1,uNoise:null,uChangeTime:0},gV,vV);xo({ExploreTextMaterial:AV});var SV=`varying vec2 vUv;\r 5833 void main() {\r
5834 vec4 modelPosition = modelMatrix * vec4(position, 1.0);\r 5835 vec4 viewPosition = viewMatrix * modelPosition;\r 5836 vec4 projectionPosition = projectionMatrix * viewPosition;\r 5837 gl_Position = projectionPosition;\r 5838 vUv = uv;\r 5839 }`,EV=`#ifndef FNC_MOD289 5840#define FNC_MOD289 5841 5842float mod289(const in float x) { return x - floor(x * (1. / 289.)) * 289.; } 5843vec2 mod289(const in vec2 x) { return x - floor(x * (1. / 289.)) * 289.; } 5844vec3 mod289(const in vec3 x) { return x - floor(x * (1. / 289.)) * 289.; } 5845vec4 mod289(const in vec4 x) { return x - floor(x * (1. / 289.)) * 289.; } 5846 5847#endif 5848#ifndef FNC_MOD289 5849#define FNC_MOD289 5850 5851float mod289(const in float x) { return x - floor(x * (1. / 289.)) * 289.; } 5852vec2 mod289(const in vec2 x) { return x - floor(x * (1. / 289.)) * 289.; } 5853vec3 mod289(const in vec3 x) { return x - floor(x * (1. / 289.)) * 289.; } 5854vec4 mod289(const in vec4 x) { return x - floor(x * (1. / 289.)) * 289.; } 5855 5856#endif 5857 5858#ifndef FNC_PERMUTE 5859#define FNC_PERMUTE 5860 5861float permute(const in float v) { return mod289(((v * 34.0) + 1.0) * v); } 5862vec2 permute(const in vec2 v) { return mod289(((v * 34.0) + 1.0) * v); } 5863vec3 permute(const in vec3 v) { return mod289(((v * 34.0) + 1.0) * v); } 5864vec4 permute(const in vec4 v) { return mod289(((v * 34.0) + 1.0) * v); } 5865 5866#endif 5867#ifndef FNC_TAYLORINVSQRT 5868#define FNC_TAYLORINVSQRT 5869float taylorInvSqrt(in float r) { return 1.79284291400159 - 0.85373472095314 * r; } 5870vec2 taylorInvSqrt(in vec2 r) { return 1.79284291400159 - 0.85373472095314 * r; } 5871vec3 taylorInvSqrt(in vec3 r) { return 1.79284291400159 - 0.85373472095314 * r; } 5872vec4 taylorInvSqrt(in vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; } 5873#endif 5874#ifndef FNC_QUINTIC 5875#define FNC_QUINTIC 5876 5877float quintic(const in float v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 5878vec2 quintic(const in vec2 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 5879vec3 quintic(const in vec3 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 5880vec4 quintic(const in vec4 v) { return v*v*v*(v*(v*6.0-15.0)+10.0); } 5881 5882#endif 5883 5884#ifndef FNC_CNOISE 5885#define FNC_CNOISE 5886 5887float cnoise(in vec2 P) { 5888 vec4 Pi = floor(P.xyxy) + vec4(0.0, 0.0, 1.0, 1.0); 5889 vec4 Pf = fract(P.xyxy) - vec4(0.0, 0.0, 1.0, 1.0); 5890 Pi = mod289(Pi); 5891 vec4 ix = Pi.xzxz; 5892 vec4 iy = Pi.yyww; 5893 vec4 fx = Pf.xzxz; 5894 vec4 fy = Pf.yyww; 5895 5896 vec4 i = permute(permute(ix) + iy); 5897 5898 vec4 gx = fract(i * (1.0 / 41.0)) * 2.0 - 1.0 ; 5899 vec4 gy = abs(gx) - 0.5 ; 5900 vec4 tx = floor(gx + 0.5); 5901 gx = gx - tx; 5902 5903 vec2 g00 = vec2(gx.x,gy.x); 5904 vec2 g10 = vec2(gx.y,gy.y); 5905 vec2 g01 = vec2(gx.z,gy.z); 5906 vec2 g11 = vec2(gx.w,gy.w); 5907 5908 vec4 norm = taylorInvSqrt(vec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); 5909 g00 *= norm.x; 5910 g01 *= norm.y; 5911 g10 *= norm.z; 5912 g11 *= norm.w; 5913 5914 float n00 = dot(g00, vec2(fx.x, fy.x)); 5915 float n10 = dot(g10, vec2(fx.y, fy.y)); 5916 float n01 = dot(g01, vec2(fx.z, fy.z)); 5917 float n11 = dot(g11, vec2(fx.w, fy.w)); 5918 5919 vec2 fade_xy = quintic(Pf.xy); 5920 vec2 n_x = mix(vec2(n00, n01), vec2(n10, n11), fade_xy.x); 5921 float n_xy = mix(n_x.x, n_x.y, fade_xy.y); 5922 return 2.3 * n_xy; 5923} 5924 5925float cnoise(in vec3 P) { 5926 vec3 Pi0 = floor(P); 5927 vec3 Pi1 = Pi0 + vec3(1.0); 5928 Pi0 = mod289(Pi0); 5929 Pi1 = mod289(Pi1); 5930 vec3 Pf0 = fract(P); 5931 vec3 Pf1 = Pf0 - vec3(1.0); 5932 vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); 5933 vec4 iy = vec4(Pi0.yy, Pi1.yy); 5934 vec4 iz0 = Pi0.zzzz; 5935 vec4 iz1 = Pi1.zzzz; 5936 5937 vec4 ixy = permute(permute(ix) + iy); 5938 vec4 ixy0 = permute(ixy + iz0); 5939 vec4 ixy1 = permute(ixy + iz1); 5940 5941 vec4 gx0 = ixy0 * (1.0 / 7.0); 5942 vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5; 5943 gx0 = fract(gx0); 5944 vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0); 5945 vec4 sz0 = step(gz0, vec4(0.0)); 5946 gx0 -= sz0 * (step(0.0, gx0) - 0.5); 5947 gy0 -= sz0 * (step(0.0, gy0) - 0.5); 5948 5949 vec4 gx1 = ixy1 * (1.0 / 7.0); 5950 vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5; 5951 gx1 = fract(gx1); 5952 vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1); 5953 vec4 sz1 = step(gz1, vec4(0.0)); 5954 gx1 -= sz1 * (step(0.0, gx1) - 0.5); 5955 gy1 -= sz1 * (step(0.0, gy1) - 0.5); 5956 5957 vec3 g000 = vec3(gx0.x,gy0.x,gz0.x); 5958 vec3 g100 = vec3(gx0.y,gy0.y,gz0.y); 5959 vec3 g010 = vec3(gx0.z,gy0.z,gz0.z); 5960 vec3 g110 = vec3(gx0.w,gy0.w,gz0.w); 5961 vec3 g001 = vec3(gx1.x,gy1.x,gz1.x); 5962 vec3 g101 = vec3(gx1.y,gy1.y,gz1.y); 5963 vec3 g011 = vec3(gx1.z,gy1.z,gz1.z); 5964 vec3 g111 = vec3(gx1.w,gy1.w,gz1.w); 5965 5966 vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); 5967 g000 *= norm0.x; 5968 g010 *= norm0.y; 5969 g100 *= norm0.z; 5970 g110 *= norm0.w; 5971 vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); 5972 g001 *= norm1.x; 5973 g011 *= norm1.y; 5974 g101 *= norm1.z; 5975 g111 *= norm1.w; 5976 5977 float n000 = dot(g000, Pf0); 5978 float n100 = dot(g100, vec3(Pf1.x, Pf0.yz)); 5979 float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z)); 5980 float n110 = dot(g110, vec3(Pf1.xy, Pf0.z)); 5981 float n001 = dot(g001, vec3(Pf0.xy, Pf1.z)); 5982 float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z)); 5983 float n011 = dot(g011, vec3(Pf0.x, Pf1.yz)); 5984 float n111 = dot(g111, Pf1); 5985 5986 vec3 fade_xyz = quintic(Pf0); 5987 vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z); 5988 vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y); 5989 float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); 5990 return 2.2 * n_xyz; 5991} 5992 5993float cnoise(in vec4 P) { 5994 vec4 Pi0 = floor(P); 5995 vec4 Pi1 = Pi0 + 1.0; 5996 Pi0 = mod289(Pi0); 5997 Pi1 = mod289(Pi1); 5998 vec4 Pf0 = fract(P); 5999 vec4 Pf1 = Pf0 - 1.0; 6000 vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); 6001 vec4 iy = vec4(Pi0.yy, Pi1.yy); 6002 vec4 iz0 = vec4(Pi0.zzzz); 6003 vec4 iz1 = vec4(Pi1.zzzz); 6004 vec4 iw0 = vec4(Pi0.wwww); 6005 vec4 iw1 = vec4(Pi1.wwww); 6006 6007 vec4 ixy = permute(permute(ix) + iy); 6008 vec4 ixy0 = permute(ixy + iz0); 6009 vec4 ixy1 = permute(ixy + iz1); 6010 vec4 ixy00 = permute(ixy0 + iw0); 6011 vec4 ixy01 = permute(ixy0 + iw1); 6012 vec4 ixy10 = permute(ixy1 + iw0); 6013 vec4 ixy11 = permute(ixy1 + iw1); 6014 6015 vec4 gx00 = ixy00 * (1.0 / 7.0); 6016 vec4 gy00 = floor(gx00) * (1.0 / 7.0); 6017 vec4 gz00 = floor(gy00) * (1.0 / 6.0); 6018 gx00 = fract(gx00) - 0.5; 6019 gy00 = fract(gy00) - 0.5; 6020 gz00 = fract(gz00) - 0.5; 6021 vec4 gw00 = vec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); 6022 vec4 sw00 = step(gw00, vec4(0.0)); 6023 gx00 -= sw00 * (step(0.0, gx00) - 0.5); 6024 gy00 -= sw00 * (step(0.0, gy00) - 0.5); 6025 6026 vec4 gx01 = ixy01 * (1.0 / 7.0); 6027 vec4 gy01 = floor(gx01) * (1.0 / 7.0); 6028 vec4 gz01 = floor(gy01) * (1.0 / 6.0); 6029 gx01 = fract(gx01) - 0.5; 6030 gy01 = fract(gy01) - 0.5; 6031 gz01 = fract(gz01) - 0.5; 6032 vec4 gw01 = vec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); 6033 vec4 sw01 = step(gw01, vec4(0.0)); 6034 gx01 -= sw01 * (step(0.0, gx01) - 0.5); 6035 gy01 -= sw01 * (step(0.0, gy01) - 0.5); 6036 6037 vec4 gx10 = ixy10 * (1.0 / 7.0); 6038 vec4 gy10 = floor(gx10) * (1.0 / 7.0); 6039 vec4 gz10 = floor(gy10) * (1.0 / 6.0); 6040 gx10 = fract(gx10) - 0.5; 6041 gy10 = fract(gy10) - 0.5; 6042 gz10 = fract(gz10) - 0.5; 6043 vec4 gw10 = vec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); 6044 vec4 sw10 = step(gw10, vec4(0.0)); 6045 gx10 -= sw10 * (step(0.0, gx10) - 0.5); 6046 gy10 -= sw10 * (step(0.0, gy10) - 0.5); 6047 6048 vec4 gx11 = ixy11 * (1.0 / 7.0); 6049 vec4 gy11 = floor(gx11) * (1.0 / 7.0); 6050 vec4 gz11 = floor(gy11) * (1.0 / 6.0); 6051 gx11 = fract(gx11) - 0.5; 6052 gy11 = fract(gy11) - 0.5; 6053 gz11 = fract(gz11) - 0.5; 6054 vec4 gw11 = vec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); 6055 vec4 sw11 = step(gw11, vec4(0.0)); 6056 gx11 -= sw11 * (step(0.0, gx11) - 0.5); 6057 gy11 -= sw11 * (step(0.0, gy11) - 0.5); 6058 6059 vec4 g0000 = vec4(gx00.x,gy00.x,gz00.x,gw00.x); 6060 vec4 g1000 = vec4(gx00.y,gy00.y,gz00.y,gw00.y); 6061 vec4 g0100 = vec4(gx00.z,gy00.z,gz00.z,gw00.z); 6062 vec4 g1100 = vec4(gx00.w,gy00.w,gz00.w,gw00.w); 6063 vec4 g0010 = vec4(gx10.x,gy10.x,gz10.x,gw10.x); 6064 vec4 g1010 = vec4(gx10.y,gy10.y,gz10.y,gw10.y); 6065 vec4 g0110 = vec4(gx10.z,gy10.z,gz10.z,gw10.z); 6066 vec4 g1110 = vec4(gx10.w,gy10.w,gz10.w,gw10.w); 6067 vec4 g0001 = vec4(gx01.x,gy01.x,gz01.x,gw01.x); 6068 vec4 g1001 = vec4(gx01.y,gy01.y,gz01.y,gw01.y); 6069 vec4 g0101 = vec4(gx01.z,gy01.z,gz01.z,gw01.z); 6070 vec4 g1101 = vec4(gx01.w,gy01.w,gz01.w,gw01.w); 6071 vec4 g0011 = vec4(gx11.x,gy11.x,gz11.x,gw11.x); 6072 vec4 g1011 = vec4(gx11.y,gy11.y,gz11.y,gw11.y); 6073 vec4 g0111 = vec4(gx11.z,gy11.z,gz11.z,gw11.z); 6074 vec4 g1111 = vec4(gx11.w,gy11.w,gz11.w,gw11.w); 6075 6076 vec4 norm00 = taylorInvSqrt(vec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); 6077 g0000 *= norm00.x; 6078 g0100 *= norm00.y; 6079 g1000 *= norm00.z; 6080 g1100 *= norm00.w; 6081 6082 vec4 norm01 = taylorInvSqrt(vec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); 6083 g0001 *= norm01.x; 6084 g0101 *= norm01.y; 6085 g1001 *= norm01.z; 6086 g1101 *= norm01.w; 6087 6088 vec4 norm10 = taylorInvSqrt(vec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); 6089 g0010 *= norm10.x; 6090 g0110 *= norm10.y; 6091 g1010 *= norm10.z; 6092 g1110 *= norm10.w; 6093 6094 vec4 norm11 = taylorInvSqrt(vec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); 6095 g0011 *= norm11.x; 6096 g0111 *= norm11.y; 6097 g1011 *= norm11.z; 6098 g1111 *= norm11.w; 6099 6100 float n0000 = dot(g0000, Pf0); 6101 float n1000 = dot(g1000, vec4(Pf1.x, Pf0.yzw)); 6102 float n0100 = dot(g0100, vec4(Pf0.x, Pf1.y, Pf0.zw)); 6103 float n1100 = dot(g1100, vec4(Pf1.xy, Pf0.zw)); 6104 float n0010 = dot(g0010, vec4(Pf0.xy, Pf1.z, Pf0.w)); 6105 float n1010 = dot(g1010, vec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); 6106 float n0110 = dot(g0110, vec4(Pf0.x, Pf1.yz, Pf0.w)); 6107 float n1110 = dot(g1110, vec4(Pf1.xyz, Pf0.w)); 6108 float n0001 = dot(g0001, vec4(Pf0.xyz, Pf1.w)); 6109 float n1001 = dot(g1001, vec4(Pf1.x, Pf0.yz, Pf1.w)); 6110 float n0101 = dot(g0101, vec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); 6111 float n1101 = dot(g1101, vec4(Pf1.xy, Pf0.z, Pf1.w));
6112 float n0011 = dot(g0011, vec4(Pf0.xy, Pf1.zw)); 6113 float n1011 = dot(g1011, vec4(Pf1.x, Pf0.y, Pf1.zw)); 6114 float n0111 = dot(g0111, vec4(Pf0.x, Pf1.yzw)); 6115 float n1111 = dot(g1111, Pf1); 6116 6117 vec4 fade_xyzw = quintic(Pf0); 6118 vec4 n_0w = mix(vec4(n0000, n1000, n0100, n1100), vec4(n0001, n1001, n0101, n1101), fade_xyzw.w); 6119 vec4 n_1w = mix(vec4(n0010, n1010, n0110, n1110), vec4(n0011, n1011, n0111, n1111), fade_xyzw.w); 6120 vec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); 6121 vec2 n_yzw = mix(n_zw.xy, n_zw.zw, fade_xyzw.y); 6122 float n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); 6123 return 2.2 * n_xyzw; 6124} 6125#endif\r 6126 uniform float uTime;\r 6127 uniform vec3 uColorStart;\r 6128 uniform vec3 uColorEnd;\r 6129 varying vec2 vUv;\r 6130 void main() {\r 6131 vec2 displacedUv = vUv + cnoise(vec3(vUv * 7.0, uTime * 0.1));\r 6132 float strength = cnoise(vec3(displacedUv * 5.0, uTime * 0.2));\r 6133 float outerGlow = distance(vUv, vec2(0.5)) * 4.0 - 1.4;\r 6134 strength += outerGlow;\r 6135 strength += step(-0.2, strength) * 0.8;\r 6136 strength = clamp(strength, 0.0, 1.0);\r 6137 vec3 color = mix(uColorStart, uColorEnd, strength);\r 6138 gl_FragColor = vec4(color, 1.0); 6139 6140 }`;const wV=ku({uTime:0,uColorStart:new He("aqua"),uColorEnd:new He("white")},SV,EV);xo({PortalMaterial:wV});function MV({initProgress:i,position:e}){const t=K.exports.useRef(),n=K.exports.useRef();Cn();function r(a){const l=a?a.detail.progress:0,u=En(l,wt("stair-section-start"),wt("stair-section-end"),!0),f=En(l,wt("camera-stage3-start"),wt("camera-stage3-end"),!1),h=Math.PI*2*.04,p=Math.PI*2*.96,m=window.__sceneOverlay,v=t.current.getObjectByName("door");u<.96?t.current.rotation.y=Math.PI*2*u:t.current.rotation.y=p+h*Math.cos(Math.PI/2*(1-u)/.04),f>=0&&f<=1&&(v.rotation.y=-Math.PI*f),f>=.5&&m&&(m.material.opacity=(f-.5)*2),f<.5&&m&&(m.material.opacity=0),f>=1.2&&f<2.2&&m&&(m.material.opacity=1-(f-1.2)),f>2.2&&m&&m.material.opacity>0&&(m.material.opacity=0)}K.exports.useEffect(()=>(window.__componentStatus.exploreRoom.el=t.current,r({detail:{progress:i}}),window.addEventListener("websiteProgress",r),()=>{window.removeEventListener("websiteProgress",r)}),[]),ws(({clock:a})=>{!window.__componentStatus.exploreRoom.play||(n.current.uniforms.uTime.value=a.elapsedTime)});const{nodes:s,materials:o}=Gs("/model/sceneExplore2.glb");return F(kf,{children:Ye("group",{position:e,scale:[1,1,1],rotation:[0,-0,0],dispose:null,ref:t,children:[F("mesh",{name:"doorFrame",castShadow:!0,receiveShadow:!0,geometry:s.doorFrame.geometry,material:o.door,position:[-.009,.091,-.006],rotation:[Math.PI,0,Math.PI],scale:.741}),F("mesh",{name:"door",castShadow:!0,receiveShadow:!0,geometry:s.door.geometry,material:o.door,position:[-.649,1.7,.085]}),F("mesh",{castShadow:!0,receiveShadow:!0,geometry:s.protal.geometry,material:s.protal.material,position:[-.006,1.707,0],children:F("portalMaterial",{ref:n},Rf())}),F("mesh",{name:"stair",castShadow:!0,receiveShadow:!0,geometry:s.stair.geometry,material:o.walls,rotation:[Math.PI/2,-Math.PI/2,0],scale:[.114,.215,.163]}),F("mesh",{name:"Text",castShadow:!0,receiveShadow:!0,geometry:s.Text.geometry,material:o["Material.001"],position:[-8.889,.544,-13.57],rotation:[Math.PI/2,0,0],scale:7.979}),F("mesh",{name:"Ground",castShadow:!0,receiveShadow:!0,geometry:s.Ground.geometry,material:o.ground})]})})}var CV=`uniform float uTime;\r 6141varying vec2 vUv; 6142 6143void main() {\r 6144 vUv = uv;\r 6145 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\r 6146}`,TV=`uniform sampler2D uTexture;\r 6147varying vec2 vUv;\r 6148uniform float uTime;\r 6149uniform vec2 uResolution;\r 6150uniform bool uFlipY;\r 6151float rand(vec2 p)\r 6152{\r 6153 float t = floor(uTime * 20.) / 10.;\r 6154 return fract(sin(dot(p, vec2(t * 12.9898, t * 78.233))) * 43758.5453);\r 6155} 6156 6157float noise(vec2 uv, float blockiness)\r 6158{ \r 6159 vec2 lv = fract(uv);\r 6160 vec2 id = floor(uv);\r 6161 \r 6162 float n1 = rand(id);\r 6163 float n2 = rand(id+vec2(1,0));\r 6164 float n3 = rand(id+vec2(0,1));\r 6165 float n4 = rand(id+vec2(1,1));\r 6166 \r 6167 vec2 u = smoothstep(0.0, 1.0 + blockiness, lv); 6168 6169 return mix(mix(n1, n2, u.x), mix(n3, n4, u.x), u.y);\r 6170}\r 6171float fbm(vec2 uv, int count, float blockiness, float complexity)\r 6172{\r 6173 float val = 0.0;\r 6174 float amp = 0.5;\r 6175 \r 6176 while(count != 0)\r 6177 {\r 6178 val += amp * noise(uv, blockiness);\r 6179 amp *= 0.5;\r 6180 uv *= complexity; \r 6181 count--;\r 6182 }\r 6183 \r 6184 return val;\r 6185}\r 6186const float glitchAmplitude = 0.2; 6187const float glitchNarrowness = 0.8;\r 6188const float glitchBlockiness = 3.0;\r 6189const float glitchMinimizer = 10.0; 6190 6191void main() {\r 6192 vec2 uvCorrect = vUv;\r 6193 if(uFlipY)\r 6194 {\r 6195 uvCorrect.y = 1.0 - vUv.y;\r 6196 }\r 6197 float aspect = uResolution.x / uResolution.y;\r 6198 vec2 a = vec2(uvCorrect.x * aspect , uvCorrect.y);\r 6199 vec2 uv2 = vec2(a.x / uResolution.x, exp(a.y));\r 6200 \r 6201 \r 6202 float shift = glitchAmplitude * pow(fbm(uv2, 4, glitchBlockiness, glitchNarrowness), glitchMinimizer);\r 6203 \r 6204 float colR = texture2D(uTexture, vec2(uvCorrect.x + shift, uvCorrect.y)).r * (1. - shift);\r 6205 float colG = texture2D(uTexture, vec2(uvCorrect.x - shift, uvCorrect.y)).g * (1. - shift);\r 6206 float colB = texture2D(uTexture, vec2(uvCorrect.x - shift, uvCorrect.y)).b * (1. - shift);\r 6207 gl_FragColor = vec4(colR, colG, colB, 1.);\r 6208 \r 6209 6210 6211 \r 6212}`;const RV=ku({uTexture:null,uTime:null,uResolution:null},CV,TV);xo({ExploreProjectMaterial2:RV});const PV=[{title:"\u5927\u5510GANG",type:"AI\u89C6\u9891",t0:0,t1:4.9,videoSrc:"/explore/datanggang.mp4",tools:["SD","Mj","Rw","\u5373\u68A6","Df","\u9192\u56FE"],desc:"\u6839\u636E\u7F51\u7EDC\u70ED\u95E8\u6B4C\u66F2\u300A\u5927\u5510Gang\u300B\u521B\u4F5C\u7684MV\u52A8\u753B\uFF0C\u8BBE\u8BA1\u91C7\u7528\u590D\u53E4\u7C98\u571F\u753B\u98CE\uFF0C\u529B\u6C42\u628A\u7ECF\u5178\u4EBA\u7269\u8DA3\u5473\u5316\u8868\u73B0\uFF0C\u914D\u5408\u8282\u594F\u660E\u5FEB\u7684\u66F2\u98CE\u5C55\u73B0\u4E86\u8F7B\u677E\u6B22\u4E50\u7684\u6C1B\u56F4\u611F\uFF0C\u6574\u4F53\u5236\u4F5C\u4F7F\u7528AI\u5DE5\u5177\u4E3A\u540E\u671F\u5904\u7406\uFF0C\u628A\u4F20\u7EDF\u7684\u897F\u6E38\u8BB0\u6545\u4E8B\u4E0E\u73B0\u4EE3\u7684AI\u6280\u672F\u7ED3\u5408\u3002"},{title:"\u5927\u6691",type:"AI\u89C6\u9891",t0:10.2,t1:14.8,videoSrc:"/explore/dashu.mp4",tools:["SD","Rw","Mj"],desc:"\u5927\u6691\u65F6\u8282\uFF0C\u5C0F\u8305\u5E26\u4F60\u4F53\u9A8C\u6E05\u51C9\u3002"}
6212,{title:"\u7B54\u6848",type:"AI\u89C6\u9891",t0:5.5,t1:9.8,videoSrc:"/explore/daan.mp4",tools:["SD","Mj","Rw"],desc:"\u4EBA\u751F\u7F13\u7F13\uFF0C\u81EA\u6709\u7B54\u6848\u3002\u300A\u7B54\u6848\u300B\u662F\u4E00\u4E2A\u7531AI\u6280\u672F\u5236\u4F5C\u7684\u5FAE\u7535\u5F71\u98CE\u683C\u77ED\u7247\uFF0C\u91C7\u7528\u72EC\u767D\u7684\u65B9\u5F0F\u8BB2\u8FF0\u4E3B\u4EBA\u516C\uFF0C\u4E00\u4E2A30+\u7684\u72EC\u7ACB\u5973\u6027\u9762\u5BF9\u751F\u6D3B\u56F0\u5883\u6240\u7ECF\u5386\u7684\u5947\u5E7B\u5883\u9047\u3002\u901A\u8FC7AI\u6280\u672F\u5B9E\u73B0\u63D2\u753B\u3001\u6444\u5F71\u7B49\u591A\u79CD\u753B\u9762\u98CE\u683C\u7684\u5448\u73B0\u3002"},{title:"\u675C\u752B",type:"AI\u89C6\u9891",t0:15.1,t1:19.7,videoSrc:"/explore/dufu.mp4",tools:["SD","Mj","Rw","\u5373\u68A6","Topaz"],desc:"\u4EE5\u8BD7\u5723\u675C\u752B\u665A\u5E74\u7684\u53E3\u543B\uFF0C\u56DE\u5FC6\u8BB2\u8FF0\u81EA\u5DF1\u7684\u4E00\u751F\u3002\u4ECE\u5E7C\u5E74\u4F18\u6E25\u7684\u6210\u957F\u73AF\u5883\uFF0C\u5230\u9752\u5E74\u88D8\u9A6C\u8F7B\u72C2\u7684\u5FEB\u610F\u65F6\u5149\uFF0C\u4ECE\u4E2D\u5E74\u591A\u6B21\u88AB\u8D2C\u98A0\u7C38\u6D41\u79BB\u7684\u65E0\u5948\u3001\u5230\u6700\u540E\u665A\u5E74\u9605\u5C3D\u4EBA\u95F4\u6CA7\u6851\uFF0C\u7EC8\u5F97\u4E00\u4EFD\u8D85\u7136\u7269\u5916\u7684\u6DE1\u7136\u3002\u662F\u4EBA\u751F\u98CE\u96E8\u517C\u7A0B\u7684\u81EA\u767D\uFF0C\u4E5F\u662F\u5176\u7ECF\u5178\u8BD7\u4F5C\u521B\u4F5C\u80CC\u666F\u7684\u518D\u73B0\u3002"},{title:"\u6728\u5170\u884C",type:"AI\u89C6\u9891",t0:20.1,t1:24.7,videoSrc:"/explore/mulanxing.mp4",tools:["Mj","SD","Rw"],desc:"\u6728\u5170\u884C\u662F\u4E00\u9996\u53E4\u4EE3\u8BD7\u6B4C\uFF0C\u8BB2\u8FF0\u4E86\u6728\u5170\u66FF\u7236\u4ECE\u519B\u7684\u6545\u4E8B\u3002\u5229\u7528AI\u6280\u672F\uFF0C\u91CD\u73B0\u53E4\u4EE3\u5973\u82F1\u96C4\u7684\u4E8B\u8FF9\u3002"},{title:"\u5317\u4EAC\u5317\u4EAC",type:"AI\u89C6\u9891",t0:25.1,t1:29.6,videoSrc:"/explore/beijingbeijing.mp4",tools:["Mj","SD","Rw"],desc:"\u7531AI\u6280\u672F\u4F5C\u8BCD\u4F5C\u66F2\u62CD\u6444\u751F\u6210\u7684mv\uFF0C\u878D\u5408\u4E86\u5317\u4EAC\u7684\u98CE\u571F\u4EBA\u60C5\u4E0E\u57CE\u5E02\u98CE\u8C8C\u3002\u5C55\u73B0\u4E86\u4E1C\u57CE\u7684\u53E4\u97F5\u3001\u897F\u57CE\u7684\u7EA2\u5899\u3001\u671D\u9633\u7684\u6D3B\u529B\u4E0E\u6D77\u6DC0\u7684\u5B66\u672F\u6C14\u606F\u7B49\u3002\u6BCF\u4E2A\u533A\u540D\u4EE5AI\u5B57\u4F53\u4E0E\u72EC\u7279\u98CE\u666F\u4EA4\u7EC7\u7684\u65B9\u5F0F\u5448\u73B0\uFF0C\u5E26\u4F60\u9886\u7565\u4EAC\u57CE\u7684\u65E0\u9650\u9B45\u529B\u3002"}];function bV({initProgress:i,assetsNodes:e}){const s=2.1666666666666665,o=K.exports.useRef(),a=K.exports.useRef();function l(p){const m=p?p.detail.progress:0;let v=En(m,wt("stair-section-start"),wt("stair-section-end"));a.current.position.y=-100+v*40,o.current.rotation.y=Math.PI*v}K.exports.useEffect(()=>
6212(l({detail:{progress:i}}),window.addEventListener("websiteProgress",l),()=>{window.removeEventListener("websiteProgress",l)}),[]);let u=[4,-100,12],f=[0,-.5,0],h=[8.5,8.5,8.5];return ba()&&(u=[0,-100,12],f=[0,0,0],h=[7,7,7]),Ye(kf,{children:[F(SB,{speed:1,rotationIntensity:.01,floatIntensity:.3,floatingRange:[.1,.1],children:F(K.exports.Suspense,{children:F(yV,{scale:h,position:u,rotation:f,projectConfig:PV})})}),F("group",{ref:a,position:[0,-90,10],children:Ye("group",{ref:o,children:[F("primitive",{object:e.VR_Headset,position:[-5,-6,-2],scale:[2,2,2],rotation:[0,.6,0],children:F("meshStandardMaterial",{color:16711680,roughness:.25,metalness:1,transparent:!0,opacity:.6})}),Ye(lH,{frustumCulled:!1,children:[F("boxGeometry",{args:[6,.175,2]}),F("meshStandardMaterial",{roughness:1,transparent:!0,opacity:.3,color:15878996}),Array.from({length:30-4}).map((p,m)=>F(AB,{position:[7*Math.cos(.5*m),-m*s,7*Math.sin(.5*m)],rotation:[0,Math.PI*7/4*m/(30-1),0],scale:[1-m/(30-4),1,1-m/30]},m))]})]})}),F(K.exports.Suspense,{fallback:null,children:F(MV,{position:[0,-126,23],initProgress:i})})]})}function IV(){const i=K.exports.useRef(),e=K.exports.useRef();return K.exports.useEffect(()=>{window.__sceneOverlay=e.current},[]),Ye(vB,{children:[F(gB,{makeDefault:!0,ref:i,position:[0,0,1]}),Ye("mesh",{name:"sceneOverlay",position:[0,0,.9],ref:e,children:[F("planeGeometry",{args:[1,1],blending:pf}),F("meshBasicMaterial",{color:16777215,transparent:!0,opacity:0,toneMapped:!1,blending:pf})]})]})}function BV(){const{nodes:i,materials:e}=Gs("/model/flowerTree.glb"),t=K.exports.useRef(),n=K.exports.useRef(),r=K.exports.useRef(),s=K.exports.useRef(),o=K.exports.useRef(),a=K.exports.useRef(),l=K.exports.useRef(),u=Hh(),f=Hh(),h=K.exports.useMemo(()=>({uTexture:{value:null},uIorR:{value:1.15},uIorY:{value:1.16},uIorG:{value:1.18},uIorC:{value:1.22},uIorB:{value:1.22},uIorP:{value:1.22},uRefractPower:{value:.2},uChromaticAberration:{value:.2},uSaturation:{value:1.03},uShininess:{value:20},uDiffuseness:{value:.2},uFresnelPower:{value:8},uOpacity:{value:1},uLight:{value:new H(-1,1,1)},winResolution:{value:new Re(window.innerWidth,window.innerHeight).multiplyScalar(Math.min(window.devicePixelRatio,2))}}),[]);nl(["/images/aboutus/1.jpg","/images/aboutus/2.jpg","/images/aboutus/3.jpg","/images/aboutus/4.jpg","/images/aboutus/5.jpg","/images/aboutus/6.jpg"],m=>{m.forEach((v,_)=>{v.flipY=!1,v.colorSpace=gr;const y=new Xi({map:v,color:16777215,transparent:!0,opacity:1,toneMapped:!1});switch(_){case 0:n.current.material=y;break;case 1:r.current.material=y;break;case 2:s.current.material=y;break;case 3:o.current.material=y;break;case 4:a.current.material=y;break;case 5:l.current.material=y;break}y.needsUpdate=!0})});const p=K.exports.useRef();return K.exports.useEffect(()=>{window.__componentStatus.aboutUsScene.el=p.current,p.current.traverse(v=>{v.isMesh&&(v.frustumCulled=!1,v.onAfterRender=function(){window.setTimeout(()=>{v.frustumCulled=!0},2e3),v.onAfterRender=function(){}})});const m=new CustomEvent("loadDone",{detail:{loadDone:!0}});window.dispatchEvent(m)},[]),ws(m=>{if(!window.__componentStatus.aboutUsScene.play)return;const{gl:v,scene:_,camera:y}=m;t.current.visible=!1,v.setRenderTarget(f),v.render(_,y),t.current.material.uniforms.uTexture.value=f.texture,t.current.material.side=Mi,t.current.visible=!0,v.setRenderTarget(u),v.render(_,y),t.current.material.uniforms.uTexture.value=u.texture,t.current.material.side=xs,v.setRenderTarget(null)}),F("group",{ref:p,children:F(K.exports.Suspense,{children:F("group",{dispose:null,position:[0,-116,10],scale:8,children:Ye("mesh",{name:"0",castShadow:!0,receiveShadow:!0,geometry:i[0].geometry,material:e["tree-all"],children:[F("mesh",{name:"Plane",ref:n,visible:!ba(),castShadow:!0,receiveShadow:!0,geometry:i.Plane.geometry,material:i.Plane.material,position:[.019,-4.168,-.067]}),F("mesh",{name:"Plane001",ref:r,visible:!1,castShadow:!0,receiveShadow:!0,geometry:i.Plane001.geometry,material:i.Plane001.material,position:[.019,-4.168,-.067]}),F("mesh",{name:"Plane003",ref:s,visible:!ba(),castShadow:!0,receiveShadow:!0,geometry:i.Plane003.geometry,material:i.Plane003.material,position:[.019,-4.168,-.067]}),F("mesh",{name:"Plane005",ref:o,visible:!ba(),castShadow:!0,receiveShadow:!0,geometry:i.Plane005.geometry,material:i.Plane005.material,position:[.019,-3.9,-.067],scale:[1,1.1,1]}),F("mesh",{name:"Plane006",ref:a,visible:!ba(),castShadow:!0,receiveShadow:!0,geometry:i.Plane006.geometry,material:i.Plane006.material,position:[.019,-4.168,-.067]}),F("mesh",{name:"Plane007",ref:l,visible:!ba(),castShadow:!0,receiveShadow:!0,geometry:i.Plane007.geometry,material:i.Plane007.material,position:[.019,-4.168,-.067]}),F("mesh",{name:"ring",castShadow:!0,receiveShadow:!0,ref:t,geometry:i.ring.geometry,material:e.ring,position:[.019,-4.168,-.067],children:F("shaderMaterial",{vertexShader:BD,fragmentShader:DD,uniforms:h},PD())})]})})})})}Gs.preload("/model/flowerTree.glb");var DV=`uniform float uTime;\r 6213varying vec2 vUv;\r 6214varying vec2 uvTexture;\r 6215uniform vec2 canvasSize;\r 6216uniform vec2 textureSize;\r 6217void main() {\r 6218 vUv = uvTexture = uv;\r 6219 float canvasRatio = canvasSize.x / canvasSize.y;\r 6220 float textureRatio = textureSize.x / textureSize.y; 6221 6222 float uvScale = textureRatio / canvasRatio;\r 6223 float offsetX = 1.0 - 1.0 / uvScale;\r 6224 uvTexture.x = uvTexture.x / uvScale;\r 6225 6226 6227 6228 \r 6229 uvTexture.x += offsetX;\r 6230 \r 6231 6232 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\r 6233}`,FV=`varying vec2 vUv;\r 6234varying vec2 uvTexture;\r 6235varying vec4 vPosition; 6236 6237uniform float uProgress;\r 6238uniform sampler2D uTexture; 6239 6240void main() {\r 6241 float opacity = 1.0; 6242 6243 6244 opacity = smoothstep(uProgress,0.0,vUv.y)+uProgress;\r 6245 6246 vec4 _texture = texture2D(uTexture, uvTexture);\r 6247 if(_texture.r+ _texture.g+_texture.b <= 0.3){\r 6248 _texture.r = _texture.g = _texture.b = 1.0;\r 6249 }\r 6250 else{\r 6251 _texture.rgb = vec3(0.97);\r 6252 }\r 6253 \r 6254 gl_FragColor = vec4(_texture.xyz,opacity);\r 6255}`;function LV(){const{viewport:i}=Cn(),e=i.width/i.height;K.exports.useEffect(()=>{const r=t.current.fov*Math.PI/180,s=30*Math.tan(r/2)*2,o=s*t.current.aspect,a=s;n.current.scale.set(o,a,1),n.current.material.uniforms.canvasSize.value=[i.width,i.height]},[e]);const t=K.exports.useRef(),n=K.exports.useRef();return K.exports.useEffect(()=>{window.__sceneOverlayGrad=n.current},[]),nl("./images/bg-contact.jpg",r=>{n.current.material.uniforms.uProgress.value=1e-4,n.current.material.uniforms.uTexture.value=r,n.current.material.uniforms.textureSize.value=[r.image.width,r.image.height]}
6255),Ye(vB,{renderPriority:2,children:[F(gB,{makeDefault:!0,ref:t,position:[0,0,30]}),Ye("mesh",{name:"sceneOverlay",position:[0,0,0],ref:n,children:[F("planeGeometry",{args:[1,1]}),F("gradMaterial",{transparent:!0,uProgress:0,blending:Ja},Rf())]})]})}const NV=ku({uProgress:0,uTexture:null,canvasSize:[window.innerWidth,window.innerHeight],textureSize:[1,1]},DV,FV);xo({GradMaterial:NV});window.__componentStatus||(window.__componentStatus={logo:{el:null,play:!0,visible:!0},backgroundMain:{el:null,play:!0,visible:!0},geometryBackground:{el:null,play:!0,visible:!0},pointsSea:{el:null,play:!0,visible:!0},exploreRobot:{el:null,play:!0,visible:!0},exploreProject:{el:null,play:!0,visible:!0},exploreRoom:{el:null,play:!0,visible:!0},aboutUsScene:{el:null,play:!1,visible:!1}});function OV({initProgressFunc:i}){console.log("%cRERENDER WEBSITE3D","color:orange");const e=i(),[t,n]=K.exports.useState(!0),[r,s]=K.exports.useState(!0),{nodes:o,materials:a}=Gs("/model/assets.glb");return Ye(K.exports.Suspense,{fallback:null,children:[F(uV,{initProgress:e}),r&&F(aV,{initProgress:e}),t&&F(sV,{initProgress:e}),F(lV,{initProgress:e}),F(dV,{initProgress:e}),F(bV,{initProgress:e,assetsNodes:o,assetsMaterials:a}),F(BV,{initProgress:e}),F(EH,{path:"/images/",files:"potsdamer_platz_1k.hdr",backgroundBlurriness:1}),F(IV,{}),F(LV,{})]})}const UV="_hide_szaey_12",zV="_dark_szaey_16",kV="_hint_szaey_19",GV="_opacityChange_szaey_1",HV="_round_szaey_63",VV="_dash_szaey_70",WV="_arrow_szaey_93",Ai={"scroll-hint-container":"_scroll-hint-container_szaey_1",hide:UV,dark:zV,hint:kV,opacityChange:GV,"icon-arrow":"_icon-arrow_szaey_54",round:HV,"dashArray-circle":"_dashArray-circle_szaey_70",dash:VV,arrow:WV};function XV({initProgressFunc:i}){const e=K.exports.useRef(null);function t(n){const r=n?n.detail.progress:0,s=wt("title-project-end"),o=Ry(s,n.detail.lastScrollPct,r);o.in&&(o.direction==-1?e.current.classList.add(Ai.hide):(e.current.classList.remove(Ai.hide),e.current.classList.remove(Ai.dark)));const a=wt("pointsea-background-end"),l=Ry(a,n.detail.lastScrollPct,r);l.in&&(l.direction==-1?(e.current.classList.remove(Ai.hide),e.current.classList.add(Ai.dark)):(e.current.classList.add(Ai.hide),e.current.classList.remove(Ai.dark)));const u=wt("camera-stage3-start"),f=Ry(u,n.detail.lastScrollPct,r);f.in&&(f.direction==-1?(e.current.classList.add(Ai.hide),e.current.classList.remove(Ai.dark)):(e.current.classList.remove(Ai.hide),e.current.classList.add(Ai.dark)))}return K.exports.useEffect(()=>(t({detail:{progress:i()}}),window.addEventListener("websiteProgress",t),()=>{window.removeEventListener("websiteProgress",t)}),[]),Ye("div",{className:Ai["scroll-hint-container"],ref:e,children:[Ye("div",{"data-split-scroll-hint":!0,className:Ai.hint,children:[F("span",{children:"\u5411"}),F("span",{children:"\u4E0B"}),F("span",{children:"\u6EDA"}),F("span",{children:"\u52A8"})]}),Ye("div",{className:Ai["icon-arrow"],children:[Ye("svg",{className:Ai.round,viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg",children:[F("path",{d:"M 15 15 m -13, 0 a 13,13 0 1,1 26,0 a 13,13 0 1,1 -26,0",fill:"none",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),F("path",{className:Ai["dashArray-circle"],d:"M 15 15 m -13, 0 a 13,13 0 1,1 26,0 a 13,13 0 1,1 -26,0",fill:"none",strokeWidth:"1"})]}),Ye("svg",{className:Ai.arrow,width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[F("line",{x1:"4",y1:"-2.18558e-08",x2:"4",y2:"12",stroke:"white"}),F("path",{fill:"none",d:"M7 9.04785L4 12.0002L1 9.04785",stroke:"white"})]})]})]})}const JV="_active_bwicw_20",jV="_logo_bwicw_53",Lr={"abs-center":"_abs-center_bwicw_1",active:JV,logo:jV};function YV({initProgressFunc:i}){const e=K.exports.useRef();function t(n){const r=n?n.detail.progress:0,s=document.querySelector('div[data-anim-gsap="0"]');document.querySelector('div[data-anim-gsap="1"]');const o=document.querySelector('div[data-anim-gsap="2"]'),a=document.querySelector('div[data-anim-gsap="3"]'),l=document.querySelector('div[data-anim-gsap="4"]'),u=En(r,-.001,wt("intro-1-start"),!0),f=En(r,wt("intro-1-start"),wt("intro-2-start"),!0),h=En(r,wt("intro-2-start"),wt("intro-3-start"),!0),p=En(r,wt("intro-3-start"),wt("intro-4-start"),!0),m=En(r,wt("intro-4-start"),wt("intro-end"),!0);u>0&&u<1?s.classList.add(Lr.active):s.classList.remove(Lr.active),f>0&&h<1?o.classList.add(Lr.active):o.classList.remove(Lr.active),p>0&&p<1?a.classList.add(Lr.active):a.classList.remove(Lr.active),m>0&&m<1?l.classList.add(Lr.active):l.classList.remove(Lr.active)}return K.exports.useEffect(()=>{const n=i();
6255return t({detail:{progress:n}}),window.addEventListener("websiteProgress",t),()=>{window.removeEventListener("websiteProgress",t)}},[]),Ye("div",{ref:e,children:[F("div",{"data-anim-gsap":"0",className:Lr["abs-center"],children:F("div",{className:Lr.logo})}),F("div",{"data-anim-gsap":"2",className:Lr["abs-center"],children:F("div",{children:"\u5341\u4F59\u5E74\u79EF\u6DC0 \u4E24\u5927\u4E1A\u52A1\u7EBF"})}),F("div",{"data-anim-gsap":"3",className:Lr["abs-center"],children:"\u540D\u5FC5\u6709\u5B9E \u4E8B\u5FC5\u6709\u529F"}),F("div",{"data-anim-gsap":"4",className:Lr["abs-center"],children:F("div",{children:"\u6728\u9C7C\u4E92\u52A8"})})]})}const KV="_container_10wax_1",nt={container:KV,"client-logo":"_client-logo_10wax_9"},QV=()=>Ye("div",{className:nt.container,children:[" ",F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/1.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/2.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/3.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/4.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/5.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/6.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/7.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/8.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/9.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/10.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/11.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/12.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/13.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/14.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/15.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/16.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/17.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/18.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/19.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/20.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/21.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/22.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/23.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/24.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/25.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/26.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/27.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/28.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/29.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/30.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/31.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/32.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/33.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/34.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/35.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/36.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/37.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/38.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/39.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/40.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/41.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/42.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/43.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/44.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/45.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/46.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/47.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/48.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/49.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/50.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/51.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/52.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/53.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/54.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/55.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/56.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/57.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/58.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/59.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/60.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/61.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/62.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/63.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/64.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/65.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/66.png",alt:"client-logo"})}),F("div",{className:nt["client-logo"],children:F("img",{src:"/images/clientlogo/67.png",alt:"client-logo"})})]}),qV="_active_nsn77_24",ZV="_clients_nsn77_47",$V="_explore_nsn77_52",eW="_projects_nsn77_119",tW="_aboutus_nsn77_131",ft={"
6255section-title-container":"_section-title-container_nsn77_1",active:qV,"title-svg":"_title-svg_nsn77_27",clients:ZV,explore:$V,"title-split-line":"_title-split-line_nsn77_75","title-cn":"_title-cn_nsn77_101",projects:eW,aboutus:tW,"section-desc":"_section-desc_nsn77_155"};var LD={exports:{}};/** 6256 * SVGInject - Version 1.2.3 6257 * A tiny, intuitive, robust, caching solution for injecting SVG files inline into the DOM. 6258 * 6259 * https://github.com/iconfu/svg-inject 6260 * 6261 * Copyright (c) 2018 INCORS, the creators of iconfu.com 6262 * @license MIT License - https://github.com/iconfu/svg-inject/blob/master/LICENSE 6263 */(function(i){(function(e,t){var n="createElement",r="getElementsByTagName",s="length",o="style",a="title",l="undefined",u="setAttribute",f="getAttribute",h=null,p="__svgInject",m="--inject-",v=new RegExp(m+"\\d+","g"),_="LOAD_FAIL",y="SVG_NOT_SUPPORTED",g="SVG_INVALID",A=["src","alt","onload","onerror"],S=t[n]("a"),w=typeof SVGRect!=l,P={useCache:!0,copyAttributes:!0,makeIdsUnique:!0},T={clipPath:["clip-path"],"color-profile":h,cursor:h,filter:h,linearGradient:["fill","stroke"],marker:["marker","marker-end","marker-mid","marker-start"],mask:h,pattern:["fill","stroke"],radialGradient:["fill","stroke"]},I=1,D=2,C=1,b,N;function j(le){return N=N||new DOMParser,N.parseFromString(le,"text/xml")}function Y(le){return b=b||new XMLSerializer,b.serializeToString(le)}function q(le){return S.href=le,S.href}function re(le,Me,xe){if(le){var we=new XMLHttpRequest;we.onreadystatechange=function(){if(we.readyState==4){var Oe=we.status;Oe==200?Me(we.responseXML,we.responseText.trim()):(Oe>=400||Oe==0)&&xe()}},we.open("GET",le,!0),we.send()}}function Q(le,Me){for(var xe,we,Oe,Je=le.attributes,ke=0;ke<Je[s];ke++)if(xe=Je[ke],we=xe.name,A.indexOf(we)==-1)if(Oe=xe.value,we==a){var G,O=Me.firstElementChild;O&&O.localName.toLowerCase()==a?G=O:(G=t[n+"NS"]("http://www.w3.org/2000/svg",a),Me.insertBefore(G,O)),G.textContent=Oe}else Me[u](we,Oe)}function pe(le,Me){var xe=m+C++,we=/url\("?#([a-zA-Z][\w:.-]*)"?\)/g,Oe=le.querySelectorAll("[id]"),Je,ke=Me?[]:h,G,O={},fe=[],Te=!1,Se,be;if(Oe[s]){for(Se=0;Se<Oe[s];Se++)G=Oe[Se].localName,G in T&&(O[G]=1);for(G in O)(T[G]||[G]).forEach(function(Ke){fe.indexOf(Ke)<0&&fe.push(Ke)});fe[s]&&fe.push(o);var st=le[r]("*"),Le=le,Ve,pt,Ne;for(Se=-1;Le!=h;){if(Le.localName==o)pt=Le.textContent,Ne=pt&&pt.replace(we,function(Ke,xt){return ke&&(ke[xt]=1),"url(#"+xt+xe+")"}),Ne!==pt&&(Le.textContent=Ne);else if(Le.hasAttributes()){for(be=0;be<fe[s];be++)Ve=fe[be],pt=Le[f](Ve),Ne=pt&&pt.replace(we,function(Ke,xt){return ke&&(ke[xt]=1),"url(#"+xt+xe+")"}),Ne!==pt&&Le[u](Ve,Ne);["xlink:href","href"].forEach(function(Ke){var xt=Le[f](Ke);/^\s*#/.test(xt)&&(xt=xt.trim(),Le[u](Ke,xt+xe),ke&&(ke[xt.substring(1)]=1))})}Le=st[++Se]}for(Se=0;Se<Oe[s];Se++)Je=Oe[Se],(!ke||ke[Je.id])&&(Je.id+=xe,Te=!0)}return Te}function k(le){return le.replace(v,m+C++)}function ne(le,Me,xe,we){if(Me){Me[u]("data-inject-url",xe);var Oe=le.parentNode;if(Oe){we.copyAttributes&&Q(le,Me);var Je=we.beforeInject,ke=Je&&Je(le,Me)||Me;Oe.replaceChild(ke,le),le[p]=I,Fe(le);var G=we.afterInject;G&&G(le,ke)}}else Ce(le,we)}function te(){for(var le={},Me=arguments,xe=0;xe<Me[s];xe++){var we=Me[xe];for(var Oe in we)we.hasOwnProperty(Oe)&&(le[Oe]=we[Oe])}return le}function ce(le){var Me=t[r]("head")[0];if(Me){var xe=t[n](o);xe.type="text/css",xe.appendChild(t.createTextNode(le)),Me.appendChild(xe)}}function _e(le,Me){if(Me){var xe;try{xe=j(le)}catch{return h}return xe[r]("parsererror")[s]?h:xe.documentElement}else{var we=t.createElement("div");return we.innerHTML=le,we.firstElementChild}}function Fe(le){le.removeAttribute("onload")}function ue(le){console.error("SVGInject: "+le)}function Ee(le,Me,xe){le[p]=D,xe.onFail?xe.onFail(le,Me):ue(Me)}function Ce(le,Me){Fe(le),Ee(le,g,Me)}function De(le,Me){Fe(le),Ee(le,y,Me)}function dt(le,Me){Ee(le,_,Me)}function At(le){le.onload=h,le.onerror=h}function it(le){ue("no img element")}function Z(le,Me){var xe=te(P,Me),we={};w&&ce('img[onload^="'+le+'("]{visibility:hidden;}');function Oe(ke,G){G=te(xe,G);var O=function(fe){var Te=function(){var Ve=G.onAllFinish;Ve&&Ve(),fe&&fe()};if(ke&&typeof ke[s]!=l){var Se=0,be=ke[s];if(be==0)Te();else for(var st=function(){++Se==be&&Te()},Le=0;Le<be;Le++)Je(ke[Le],G,st)}else Je(ke,G,Te)};return typeof Promise==l?O():new Promise(O)}function Je(ke,G,O){if(ke){var fe=ke[p];if(fe)Array.isArray(fe)?fe.push(O):O();else{if(At(ke),!w){De(ke,G),O();return}var Te=G.beforeLoad,Se=Te&&Te(ke)||ke[f]("src");if(!Se){Se===""&&dt(ke,G),O();return}var be=[];ke[p]=be;var st=function(){O(),be.forEach(function(tt){tt()})},Le=q(Se),Ve=G.useCache,pt=G.makeIdsUnique,Ne=function(tt){Ve&&(we[Le].forEach(function(Ue){Ue(tt)}),we[Le]=tt)};if(Ve){var Ke=we[Le],xt=function(tt){if(tt===_)dt(ke,G);else if(tt===g)Ce(ke,G);else{var Ue=tt[0],_t=tt[1],Ct=tt[2],Mt;pt&&(Ue===h?(Mt=_e(_t,!1),Ue=pe(Mt,!1),tt[0]=Ue,tt[2]=Ue&&Y(Mt)):Ue&&(_t=k(Ct))),Mt=Mt||_e(_t,!1),ne(ke,Mt,Le,G)}st()};if(typeof Ke!=l){Ke.isCallbackQueue?Ke.push(xt):xt(Ke);return}else{var Ke=[];Ke.isCallbackQueue=!0,we[Le]=Ke}}re(Le,function(tt,Ue){var _t=tt instanceof Document?tt.documentElement:_e(Ue,!0),Ct=G.afterLoad;if(Ct){var Mt=Ct(_t,Ue)||_t;if(Mt){var ee=typeof Mt=="string";Ue=ee?Mt:Y(_t),_t=ee?_e(Mt,!0):Mt}}if(_t instanceof SVGElement){var Qe=h;if(pt&&(Qe=pe(_t,!1)),Ve){var se=Qe&&Y(_t);Ne([Qe,Ue,se])}ne(ke,_t,Le,G)}else Ce(ke,G),Ne(g);st()},function(){dt(ke,G),Ne(_),st()})}}else it()}return Oe.setOptions=function(ke){xe=te(xe,ke)},Oe.create=Z,Oe.err=function(ke,G){ke?ke[p]!=D&&(At(ke),w?(Fe(ke),dt(ke,xe)):De(ke,xe),G&&(Fe(ke),ke.src=G)):it()},e[le]=Oe,Oe}var Pe=Z("SVGInject");i.exports=Pe})(window,document)})(LD);const F0=LD.exports;function L0({title:i,initProgressFunc:e}){let t=[{title:"projects",timeout:[]},{title:"clients",timeout:[]},{title:"explore",timeout:[]},{title:"aboutus",timeout:[]}];function n(r){const s=r?r.detail.progress:0,o=document.querySelector("[title-for='projects']"),a=document.querySelector("[title-for='clients']"),l=d
6263ocument.querySelector("[title-for='explore']"),u=document.querySelector("[title-for='aboutus']"),f=!0;let h=En(s,wt("title-project-start"),wt("title-project-end")),p=t.find(y=>y.title==="projects");N0(o,h,p,f);let m=En(s,wt("title-client-start"),wt("title-client-end"));p=t.find(y=>y.title==="clients"),N0(a,m,p,f);let v=En(s,wt("title-explore-start"),wt("title-explore-end"));p=t.find(y=>y.title==="explore"),N0(l,v,p,f);let _=En(s,wt("title-aboutus-start"),wt("title-aboutus-end"));p=t.find(y=>y.title==="aboutus"),N0(u,_,p,f)}switch(K.exports.useEffect(()=>{if(!window.__titleProgressMonitor)return window.__titleProgressMonitor=1,n({detail:{progress:e()}}),window.addEventListener("websiteProgress",n),()=>{window.removeEventListener("websiteProgress",n)}},[]),i.toLowerCase()){case"projects":return Ye("div",{"title-for":"projects",className:ft["section-title-container"],children:[F("div",{className:ft["title-svg"]+" "+ft.projects,children:F("img",{src:"/images/title/title-projects-en.svg",onLoad:r=>{F0(r.target)}})}),F("div",{className:ft["title-split-line"],children:F("img",{src:"/images/title/title-split-line.png"})}),Ye("div",{className:ft["title-cn"]+" "+ft.projects,children:[F("span",{children:"\u9879"}),F("span",{children:"\u76EE"}),F("span",{children:"\u4F5C"}),F("span",{children:"\u54C1"})]}),F("div",{className:ft["section-desc"],children:"\u4EE5\u5BA2\u6237\u5229\u76CA\u4E3A\u5BFC\u5411\uFF0C\u4EE5\u524D\u6CBF\u6280\u672F\u4E3A\u9A71\u52A8\u529B\uFF0C\u6211\u4EEC\u63D0\u4F9B\u4E86\u5168\u65B9\u4F4D\u7684\u8F6F\u4EF6\u7814\u53D1\u4E0E\u521B\u610F\u8BBE\u8BA1\u670D\u52A1\u3002\u5305\u542B\u4EA7\u54C1\u7B56\u5212\u3001\u8F6F\u4EF6\u7CFB\u7EDF\u5F00\u53D1\u4E0E\u8FD0\u7EF4\u3001\u521B\u610F\u8BBE\u8BA1\u3001\u89C6\u9891\u62CD\u6444\u5236\u4F5C\u7B49\u6570\u767E\u4E2A\u4E0D\u540C\u4E1A\u52A1\u7EBF\u4F5C\u54C1\u3002"})]});case"clients":return Ye("div",{"title-for":"clients",className:ft["section-title-container"],children:[F("div",{className:ft["title-svg"]+" "+ft.clients,children:F("img",{src:"/images/title/title-clients-en.svg",onLoad:r=>{F0(r.target)}})}),F("div",{className:ft["title-split-line"],children:F("img",{src:"/images/title/title-split-line.png"})}),Ye("div",{className:ft["title-cn"]+" "+ft.clients,children:[F("span",{children:"\u91CD"}),F("span",{children:"\u8981"}),F("span",{children:"\u5BA2"}),F("span",{children:"\u6237"})]}),F("div",{className:ft["section-desc"]+" "+ft.clients,children:"\u6211\u4EEC\u6709\u5E78\u670D\u52A1\u8FC7\u6570\u5341\u5BB6\u6765\u81EA\u653F\u5E9C\u3001\u4E8B\u4E1A\u5355\u4F4D\u3001\u91D1\u878D\u3001\u6559\u80B2\u3001\u5FEB\u6D88\u3001\u7535\u5546\u7B49\u5404\u884C\u4E1A\u3001\u56FD\u5185\u5916\u5BA2\u6237\uFF0C\u5F97\u5230\u4E86\u5BA2\u6237\u7684\u9AD8\u5EA6\u8BA4\u53EF\u4E0E\u4FE1\u8D56\u3002"})]});case"explore":return Ye("div",{"title-for":"explore",className:ft["section-title-container"],children:[F("div",{className:ft["title-svg"]+" "+ft.explore,children:F("img",{src:"/images/title/title-explore-en.svg",onLoad:r=>{F0(r.target)}})}),F("div",{className:ft["title-split-line"],children:F("img",{src:"/images/title/title-split-line.png"})}),Ye("div",{className:ft["title-cn"]+" "+ft.explore,children:[F("span",{children:"\u4E1A"}),F("span",{children:"\u52A1"}),F("span",{children:"\u63A2"}),F("span",{children:"\u7D22"})]}),F("div",{className:ft["section-desc"],children:"\u6211\u4EEC\u4E0D\u65AD\u63A2\u7D22\u65B0\u6280\u672F\u3001\u65B0\u65B9\u6CD5\uFF0C\u6C38\u8FDC\u4FDD\u6301\u597D\u5947\u5FC3\u4E0E\u79EF\u6781\u6027\uFF0C\u6301\u7EED\u63A8\u52A8\u5B9E\u9A8C\u7C7B\u9879\u76EE\u843D\u5730\uFF0C\u5728\u6280\u672F\u3001\u8BBE\u8BA1\u4E0A\u4E3A\u5BA2\u6237\u63D0\u4F9B\u65E0\u9650\u53EF\u80FD\u3002"})]});case"aboutus":return Ye("div",{"title-for":"aboutus",className:ft["section-title-container"],children:[F("div",{className:ft["title-svg"]+" "+ft.aboutus,children:F("img",{src:"/images/title/title-aboutus-en.svg",onLoad:r=>{F0(r.target)}})}),F("div",{className:ft["title-split-line"],children:F("img",{src:"/images/title/title-split-line.png"})}),Ye("div",{className:ft["title-cn"]+" "+ft.aboutus,children:[F("span",{children:"\u5173"}),F("span",{children:"\u4E8E"}),F("span",{children:"\u6211"}),F("span",{children:"\u4EEC"})]})]});default:return}}function N0(i,e,t,n=!1){var r,s,o,a,l,u,f,h,p,m,v,_,y,g,A,S,w;if(e>=-.02&&e<1)i.classList.add(ft.active),i.setAttribute("triggered",1),(r=i.querySelector("svg path[step='1']"))==null||r.classList.add(ft.active),t.timeout.find(P=>P.name==="path2")||t.timeout.push({name:"path2",value:window.setTimeout(()=>{var P;(P=i.querySelector("svg path[step='2']"))==null||P.classList.add(ft.active)},300)}),t.timeout.find(P=>P.name==="path3")||t.timeout.push({name:"path3",value:window.setTimeout(()=>{var P;(P=i.querySelector("svg path[step='3']"))==null||P.classList.add(ft.active)},100)}),t.timeout.find(P=>P.name==="widgets")||t.timeout.push({name:"widgets",value:window.setTimeout(()=>{var P,T;(P=i.querySelector("svg circle"))==null||P.classList.add(ft.active),(T=i.querySelector("svg line"))==null||T.classList.add(ft.active)},1500)}),t.timeout.find(P=>P.name==="splitLine")||t.timeout.push({name:"splitLine",value:window.setTimeout(()=>{var P,T,I;(P=i.querySelector("."+ft["title-split-line"]))==null||P.classList.add(ft.active),(T=i.querySelector("."+ft["title-cn"]))==null||T.classList.add(ft.active),(I=i.querySelector("."+ft["section-desc"]))==null||I.classList.add(ft.active)},2050)});else{if(t.timeout.forEach(P=>{window.clearTimeout(P.value)}),t.timeout=[],i.classList.remove(ft.active),n&&i.getAttribute("triggered")==1){(s=i.querySelector("svg path[step='1']"))==null||s.classList.add(ft.active),(o=i.querySelector("svg path[step='2']"))==null||o.classList.add(ft.active),(a=i.querySelector("svg path[step='3']"))==null||a.classList.add(ft.active),(l=i.querySelector("svg circle"))==null||l.classList.add(ft.active),(u=i.querySelector("svg line"))==null||u.classList.add(ft.active),(f=i.querySelector("."+ft["title-cn"]))==null||f.classList.add(ft.active),(h=i.querySelector("."+ft["section-desc"]))==null||h.classList.add(ft.active),(p=i.querySelector("."+ft["title-split-line"]))==null||p.classList.add(ft.active);return}(m=i.querySelector("svg path[step='1']"))==null||m.classList.remove(ft.active),(v=i.querySelector("svg path[step='2']"))==null||v.classList.remove(ft.active),(_=i.querySelector("svg path[step='3']"))==null||_.classList.remove(ft.active),(y=i.querySelector("svg circle"))==null||y.classList.remove(ft.active),(g=i.querySelector("svg line"))==null||g.classList.remove(ft.active),(A=i.querySelector("."+ft["title-cn"]))==null||A.classList.remove(ft.active),(S=i.querySelector("."+ft["section-desc"]))==null||S.classList.remove(ft.active),(w=i.querySelector("."+ft["title-split-line"]))==null||w.classList.remove(ft.active)}}const nW="_container_vpbow_1",iW="_active_vpbow_28",rW="_project_vpbow_34",sW="_seq_vpbow_46",oW="_title_vpbow_116",aW="_client_vpbow_126",lW="_tag_vpbow_133",uW="_category_vpbow_340",cW="_index_vpbow_358",Et={container:nW,active:iW,"project-list":"_project-list_vpbow_34",project:rW,seq:sW,"asset-line":"_asset-line_vpbow_46","project-info":"_project-info_vpbow_46","cover-container":"_cover-container_vpbow_50","cover-image-thumb":"_cover-image-thumb_vpbow_50","full-cover":"_full-cover_vpbow_53","project-info-overlay":"_project-info-overlay_vpbow_57","project-info-title":"_project-info-title_vpbow_61","project-page":"_project-page_vpbow_65",title:oW,client:aW,"tag-list":"_tag-list_vpbow_133",tag:lW,"cover-with-mask":"_cover-with-mask_vpbow_156","cover-image-mobile":"_cover-image-mobile_vpbow_169","cover-mask":"_cover-mask_vpbow_188","project-info-type":"_project-info-type_vpbow_274","title-white":"_title-white_vpbow_303","title-blue":"_title-blue_vpbow_307","title-red":"_title-red_vpbow_314","project-info-client":"_project-info-client_vpbow_321","list-info-container":"_list-info-container_vpbow_330","progress-outer":"_progress-outer_vpbow_330","progress-inner":"_progress-inner_vpbow_335","category-info-bar":"_category-info-bar_vpbow_340",category:uW,index:cW,"cur-page":"_cur-page_vpbow_369"},fW="_bar_9smxj_22",dW="_sub_9smxj_69",hW="_line_9smxj_72",pW="_chinese_9smxj_95",mW="_english_9smxj_109",gW="_desc_9smxj_125",vW="_active_9smxj_172",Lt={"project-page":"_project-page_9smxj_2","cover-image":"_cover-image_9smxj_15",bar:fW,"image-container":"_image-container_9smxj_31","video-container":"_video-container_9smxj_41","project-info-list":"_project-info-list_9smxj_54","info-row":"_info-row_9smxj_58",sub:dW,line:hW,chinese:pW,english:mW,desc:gW,"ext-links":"_ext-links_9smxj_146",active:vW,"desc-row":"_desc-row_9smxj_193"},y3={"btn-container":"_btn-container_ytm9u_1","btn-close":"_btn-close_ytm9u_60"};function ND({state:i,setState:e,position:t="fixed"}){return Ye("div",{"data-role":"btn-menu",className:y3["btn-container"]+" "+(i?y3["btn-close"]:""),onClick:()=>e(!i),style:{position:t},children:[F("div",{}),F("div",{}),F("div",{})]})}const _W="_active_ios7t_15",yW="_top_ios7t_18",xW="_logo_ios7t_56",AW="_main_ios7t_62",SW="_copyright_ios7t_69",Cc={"frame-container":"_frame-container_ios7t_1",active:_W,"frame-page":"_frame-page_ios7t_18",top:yW,logo:xW,main:AW,copyright:SW};function OD({state:i,zIndex:e,children:t,locomotiveScroll:n}){return K.exports.useEffect(()=>{n!=null&&n.current&&(i?n.current.stop():n.current.start())},[i]),F("div",{className:Cc["frame-container"]+" "+(i?Cc.active:""),style:{zIndex:e||1},"data-lenis-prevent":!0,children:Ye("div",{className:Cc["frame-page"],children:[F("div",{className:Cc.top,children:F("div",{className:Cc.logo})}),F("div",{className:Cc.main,children:t})]})})}function EW({locomotiveScroll:i}){const[e,t]=K.exports.useState(!1),n={title:"TITLE",client:"CLIENT",year:"0000",type:"TYPE",desc:"DESC",tools:["TOOL1","TOOL2"]},[r,s]=K.exports.useState(n);K.exports.useEffect(()=>(window.addEventListener("detailModalOpen",l),()=>{window.removeEventListener("detailModalOpen",l)}),[]);const[o,a]=K.exports.useState(null);K.exports.useEffect(()=>{e?o&&window.clearTimeout(o):a(window.setTimeout(()=>{s(n)},800))},[e]);function l(u){s(u.detail),t(!0)}return Ye(OD,{state:e,zIndex:2,locomotiveScroll:i,children:[F(ND,{state:e,setState:t,position:"absolute"}),Ye("div",{className:Lt["project-page"]+" "+(e?Lt.active:""),children:[Ye("div",{className:Lt["cover-image"],children:[F("div",{className:Lt.bar}),F("div",{className:Lt.bar}),F("div",{className:Lt.bar}),r.fullCover&&F("div",{className:Lt["image-container"],style:{backgroundImage:`url(${r.fullCover})`}}),r.videoSrc&&F("div",{className:Lt["video-container"],children:F("video",{src:r.videoSrc,controls:!0,onCanPlay:u=>{u.target.play()}})})]}),Ye("div",{className:Lt["project-info-list"],children:[Ye("div",{className:Lt["info-row"],children:[F("div",{className:Lt.chinese,children:F("span",{children:F("strong",{children:r.title})})}),F("div",{className:Lt.english,children:F("span",{style:{transitionDelay:"0.25s"}})}),F("div",{className:Lt.line,style:{transitionDelay:"0.3s"}})]}),r.client&&Ye("div",{className:Lt["info-row"]+" "+Lt.sub,children:[F("div",{className:Lt.chinese,children:F("span",{children:"\u5BA2\u6237"})}),F("div",{className:Lt.english,children:F("span",{style:{transitionDelay:"0.4s"},children:r.client})}),F("div",{className:Lt.line,style:{transitionDelay:"0.35s"}})]}),r.year&&Ye("div",{className:Lt["info-row"]+" "+Lt.sub,children:[F("div",{className:Lt.chinese,children:F("span",{children:"\u6267\u884C\u5E74\u4EFD"})}),F("div",{className:Lt.english,children:F("span",{style:{transitionDelay:"0.45s"},children:r.year})}),F("div",{className:Lt.line,style:{transitionDelay:"0.45s"}}
6263)]}),r.type&&Ye("div",{className:Lt["info-row"]+" "+Lt.sub,children:[F("div",{className:Lt.chinese,children:F("span",{children:"\u7C7B\u578B"})}),F("div",{className:Lt.english,children:F("span",{style:{transitionDelay:"0.5s"},children:r.type})}),F("div",{className:Lt.line,style:{transitionDelay:"0.55s"}})]}),r.tools&&Ye("div",{className:Lt["info-row"]+" "+Lt.sub,children:[F("div",{className:Lt.chinese,children:F("span",{children:"\u5236\u4F5C\u5DE5\u5177"})}),F("div",{className:Lt.english,children:F("span",{style:{transitionDelay:"0.55s"},children:r.tools.map((u,f)=>{const h=u;let p;switch(h){case"Mj":p="MidJourney";break;case"SD":p="Stable Diffusion";break;case"Rw":p="Runway";break;case"Df":p="DreamFace";break;default:p=h}return Ye("span",{title:p,children:[f>0?",":"",h]},f)})})}),F("div",{className:Lt.line,style:{transitionDelay:"0.60s"}})]}),r.desc&&Ye(kf,{children:[Ye("div",{className:Lt["info-row"],children:[F("div",{className:Lt.chinese,children:F("span",{children:"\u9879\u76EE\u7B80\u4ECB"})}),F("div",{className:Lt.english}),F("div",{className:Lt.line,style:{transitionDelay:"0.65s"}})]}),F("div",{className:Lt["info-row"]+" "+Lt["desc-row"],children:Ye("div",{className:Lt.desc,children:[" ",r.desc]})}),F("div",{className:Lt["ext-links"],children:r.links&&r.links.map((u,f)=>Ye("a",{href:u,target:"_blank",rel:"noreferrer",children:["Link ",f+1]},f))})]})]})]})]})}const kl=[{page:1,title:"Software Development / \u8F6F\u4EF6\u5F00\u53D1",projects:[{id:1,title:"\u65B0\u534E\u7F51\u5BA2\u6237\u7AEF",client:"\u65B0\u534E\u7F51",year:"2018",type:"APP",tags:["IOS","Android"],cover:"/images/project/list/1.jpg",fullCover:"/images/project/list/1-big.jpg",desc:"\u65B0\u534E\u7F51\u5B98\u65B9\u5BA2\u6237\u7AEF\uFF0C\u627F\u8F7D\u4E86\u65B0\u95FB\u5A92\u4F53\u3001\u77E5\u8BC6\u4ED8\u8D39\u3001\u76F4\u64AD\u7B49\u5168\u65B9\u4F4D\u5168\u5A92\u4F53\u5185\u5BB9\u3002",links:["http://www.news.cn/"]},{id:2,title:"\u79D1\u521B\u7B51\u68A6\u7CFB\u5217\u7F51\u7AD9",client:"\u4E2D\u56FD\u79D1\u534F",year:"2022",type:"\u79D1\u6559\u95E8\u6237",tags:["PC","\u79FB\u52A8\u7AEF","\u540E\u53F0"],cover:"/images/project/list/2.jpg",fullCover:"/images/project/list/2-big.jpg",desc:"\u5168\u56FD\u9752\u5C11\u5E74\u79D1\u6280\u521B\u65B0\u670D\u52A1\u5E73\u53F0\u662F\u4E2D\u56FD\u79D1\u534F\u9752\u5C11\u5E74\u79D1\u6280\u4E2D\u5FC3\u6253\u9020\u7684\u56FD\u5BB6\u7EA7\u9752\u5C11\u5E74\u79D1\u6280\u521B\u65B0\u6559\u80B2\u670D\u52A1\u5E73\u53F0\u3002\u5305\u542B\u79D1\u521B\u7B51\u68A6\u4E3B\u7F51\u7AD9\u548C\u82E5\u5E72\u6D3B\u52A8\u7F51\u7AD9\u3002",links:["http://www.cyscc.org/"]},{id:3,title:"\u5D16\u5DDE\u6E7E\u5BA2\u6237\u7AEF",client:"\u5D16\u5DDE\u6E7E\u79D1\u6280\u56ED\u533A",year:"2020",type:"APP",tags:["IOS","Android"],cover:"/images/project/list/3.jpg",fullCover:"/images/project/list/3-big.jpg",desc:"\u5D16\u5DDE\u6E7E\u79D1\u6280\u56ED\u533A\u5B98\u65B9\u5BA2\u6237\u7AEF\uFF0C\u63D0\u4F9B\u56ED\u533A\u4FE1\u606F\u3001\u670D\u52A1\u3001\u6D3B\u52A8\u7B49\u3002"},{id:4,title:"\u65B0\u534E\u9CB8\u821F\u6570\u5B57\u7ECF\u6D4E\u4E2D\u53F0",client:"\u65B0\u534E\u793E",year:"2023",type:"\u5E73\u53F0",tags:["\u540E\u53F0","\u5F00\u53D1"],cover:"/images/project/list/4.jpg",fullCover:"/images/project/list/4-big.jpg",desc:"\u65B0\u534E\u793E\u5168\u5A92\u4F53\u6570\u5B57\u7ECF\u6D4E\u4E2D\u53F0\uFF0C\u4E3A\u65B0\u534E\u793E\u53CA\u5176\u5408\u4F5C\u4F19\u4F34\u63D0\u4F9B\u5168\u5A92\u4F53\u6570\u5B57\u5316\u670D\u52A1\u3002"},{id:5,title:"\u535A\u7269\u9986\u65E5\u62A5\u5BA2\u6237\u7AEF",client:"\u4E2D\u535A\u7F51",year:"2024",type:"APP",tags:["IOS","Android","\u7F51\u7AD9"],cover:"/images/project/list/5.jpg",fullCover:"/images/project/list/5-big.jpg",desc:"\u535A\u7269\u9986\u4FE1\u606F\u7EFC\u5408\u6027\u5E73\u53F0\uFF0C\u56FD\u5185\u5916\u6570\u5343\u4E2A\u5404\u7C7B\u535A\u7269\u9986\u7684\u5165\u53E3\u95E8\u6237\u3002"}]},{page:2,title:"Interactive Apps / \u4E92\u52A8\u5E94\u7528",projects:[{id:1,title:"2024\u5C0F\u7C73\u5F71\u50CF\u8282",client:"\u5C0F\u7C73",year:"2024",type:"\u865A\u62DF\u5C55\u9986",tags:["XR","3D","\u591A\u7EC8\u7AEF"],cover:"/images/project/list/6.jpg",fullCover:"/images/project/list/6-big.jpg",desc:"\u5C0F\u7C73\u5F71\u50CF\u8282\u865A\u62DF\u5C55\u9986\uFF0C\u5C55\u793A\u4E862024\u5E74\u5165\u56F4\u4F18\u79C0\u5956\u7684\u5C0F\u7C73\u624B\u673A\u6444\u5F71\u4F5C\u54C1\u3002",links:["https://my-h5news.app.xinhuanet.com/pub/xiaomivmuseum/"]},{id:2,title:"\u4E00\u53F6\u4E7E\u5764",client:"\u65B0\u534E\u793E",type:"\u5FAE\u7F51\u7AD9",tags:["\u5E73\u9762"],cover:"/images/project/list/7.jpg",fullCover:"/images/project/list/7-big.jpg",desc:"\u300A\u8336\u9053\xB7\u4E00\u53F6\u4E7E\u5764\u300B\u5927\u578B\u97F3\u4E50\u53F2\u8BD7\u5267\u76EE\u6F14\u51FA\u5FAE\u7F51\u7AD9\u3002"},{id:3,title:"\u90AE\u50A8\u7F8E\u672F\u9986",client:"\u90AE\u50A8\u94F6\u884C",type:"\u4E92\u52A8\u89C6\u9891",tags:["\u63D2\u753B","\u89C6\u9891"],cover:"/images/project/list/8.jpg",fullCover:"/images/project/list/8-big.jpg",desc:"\u4E16\u754C\u540D\u753B\u91CC\u7684\u4EBA\u7269\u6D3B\u8FC7\u6765\uFF0C\u7528\u8DA3\u5473\u914D\u97F3\u4ECB\u7ECD\u90AE\u50A8\u94F6\u884C\u4FE1\u8D37\u4EA7\u54C1\u3002"},{id:4,title:"\u542C!\u5730\u7403\u7684\u58F0\u97F3",client:"\u6D66\u53D1\u94F6\u884C",type:"\u4E92\u52A8H5",tags:["\u63D2\u753B","\u4E92\u52A8"],cover:"/images/project/list/9.jpg",fullCover:"/images/project/list/9-big.jpg",desc:"\u6D66\u53D1\u94F6\u884C\u7EFF\u8272\u91D1\u878D\u3001ESG\u5BA3\u4F20H5\uFF0C\u7528\u63D2\u753B\u3001\u58F0\u97F3\u5F62\u5F0F\u5C55\u793A\u5730\u7403\u7684\u58F0\u97F3\u3002"},{id:5,title:"\u751F\u547D\u65E9\u671F\u5927\u8111\u6559\u80B2",client:"\u98DE\u9E64\u5976\u7C89",type:"\u7535\u5B50\u4E66",tags:["\u5E73\u9762","\u7535\u5B50\u4E66"],cover:"/images/project/list/10.jpg",fullCover:"/images/project/list/10-big.jpg",desc:"\u79D1\u666E\u5F62\u5F0F\u4ECB\u7ECD\u751F\u547D\u65E9\u671F1000\u5929\u5927\u8111\u53D1\u80B2\u60C5\u51B5\u7684H5\u7535\u5B50\u4E66\u3002"}]},{page:3,title:"Creative Design / \u521B\u610F\u8BBE\u8BA1",projects:[{id:1,title:"\u4F60\u597D\u54C8\u5C14\u6EE8",client:"\u65B0\u534E\u7F51",type:"\u957F\u56FE\u6D77\u62A5",tags:["\u63D2\u753B"],cover:"/images/project/list/11.jpg",fullCover:"/images/project/list/11-big.jpg",desc:"2021\u4E2D\u56FD\u4F01\u4E1A\u5BB6\u592A\u9633\u5C9B\u5E74\u4F1A\u5728\u54C8\u5C14\u6EE8\u5E02\u592A\u9633\u5C9B\u4E0A\u542F\u5E55\uFF0C\u7528\u63D2\u753BH5\u7684\u5F62\u5F0F\u5C55\u73B0\u54C8\u5C14\u6EE8\u56DB\u5927\u4EA7\u4E1A\u2014\u2014\u533B\u7597\u517B\u751F\u3001\u9AD8\u65B0\u79D1\u6280\u3001\u7EFF\u8272\u519C\u4E1A\u3001\u52A0\u5DE5\u4E1A\uFF0C\u5168\u65B9\u4F4D\u5C55\u793A\u54C8\u5C14\u6EE8\u7684\u7279\u8272\u3002"},{id:2,title:"\u51AC\u81F3\u8D4F\u6885",client:"\u8D35\u5DDE\u8305\u53F0",type:"\u624B\u7ED8\u6D77\u62A5",tags:["\u56FD\u98CE"],cover:"/images/project/list/12.jpg",fullCover:"/images/project/list/12-big.jpg",desc:"\u51AC\u81F3\u65F6\u8282\uFF0C\u6885\u82B1\u4E0D\u60E7\u4E25\u5BD2\uFF0C\u8FCE\u96EA\u7EFD\u653E\u3002\u7528\u63D2\u753B\u5F62\u5F0F\u91CD\u73B0\u53E4\u4EBA\u8D4F\u6885\u996E\u9152\u4F5C\u8BD7\uFF0C\u4EAB\u53D7\u51AC\u65E5\u65F6\u5149\u7684\u573A\u666F\u3002"},{id:3,title:"\u51B0\u96EA\u9AD8\u94C1",client:"\u5EB7\u5E08\u5085",type:"\u5FAE\u7F51\u7AD9",tags:["\u6D3B\u52A8","\u63D2\u753B","SVG"],cover:"/images/project/list/13.jpg",fullCover:"/images/project/list/13-big.jpg",desc:"\u63D2\u753B\u5F62\u5F0F\u8BB0\u5F55\u5EB7\u5E08\u5085\u52A9\u529B\u51B0\u96EA\u6D3B\u52A8\u3002\u4ECE\u5E73\u660C\u9762\u9986\u521D\u7ED3\u7F18\uFF0C\u5230\u51AC\u5965\u5B9A\u5236\u81B3\u98DF\u6DF1\u5408\u4F5C\uFF0C\u5171\u5E86\u4E2D\u56FD\u51AC\u5965\u76DB\u4E8B\uFF0C\u5F15\u9886\u5168\u6C11\u51B0\u96EA\u70ED\u6F6E\u3002\u6BCF\u4E00\u5E55\u7CBE\u5F69\u51DD\u805A\u4E8E\u8FD9\u8F86\u51B0\u96EA\u4E3B\u9898\u9AD8\u94C1\u5217\u8F66\u4E0A\u3002"},{id:4,title:"\u5988\u542C\u8BF4",client:"\u4E92\u8054\u7F51\u8F9F\u8C23\u5E73\u53F0",type:"\u6F2B\u753B",tags:["\u6F2B\u753B"],cover:"/images/project/list/4.jpg",fullCover:"/images/project/list/14-big.jpg",desc:'\u5F53\u5988\u5988\u751F\u6D3B\u4E2D\u5076\u9047\u5947\u8469\u8C23\u8A00\uFF0C"\u5988\u542C\u8BF4..."\u4E0D\u518D\u6210\u4E3A\u70E6\u607C\uFF0C\u6211\u4EEC\u5316\u8EAB\u4E3A\u5BB6\u5EAD\u79D1\u666E\u5C0F\u80FD\u624B\uFF0C\u7528\u8BD9\u8C10\u5BF9\u8BDD\u4E0E\u751F\u52A8\u753B\u9762\uFF0C\u51FB\u7834\u8C23\u8A00\u8FF7\u96FE\uFF0C\u8BA9\u7231\u4E0E\u77E5\u8BC6\u540C\u884C\uFF0C\u7B11\u5BF9\u65E5\u5E38\u5C0F\u786E\u5E78\u3002'},{id:5,title:"\u4E16\u754C\u725B\u5976\u65E5",client:"\u4F0A\u5229",type:"\u6D3B\u52A8\u4E3B\u89C6\u89C9",tags:["\u4E3B\u89C6\u89C9"],cover:"/images/project/list/15.jpg",fullCover:"/images/project/list/15-big.jpg",desc:"\u516D\u4E00\u201D\u4E0D\u53EA\u5C5E\u4E8E\u5B69\u5B50\u4EEC\uFF0C\u5B83\u7684\u53E6\u4E00\u4E2A\u72EC\u7279\u6807\u7B7E\u53EB\u201C\u4E16\u754C\u725B\u5976\u65E5\u201D\u3002\u4E3A\u4E86\u8FCE\u63A5\u8FD9\u4E2A\u5976\u91CC\u5976\u6C14\u7684\u8282\u65E5\uFF0C\u4E2D\u56FD\u4E73\u5236\u54C1\u5DE5\u4E1A\u534F\u4F1A\u3001\u4F0A\u5229\u96C6\u56E2\u5F00\u5C55\u4E86\u4E00\u7CFB\u5217\u65B0\u610F\u6EE1\u6EE1\u7684\u4E16\u754C\u725B\u5976\u65E5\u4E3B\u9898\u6D3B\u52A8\u3002"}]}];function wW({initProgressFunc:i,locomotiveScroll:e}){const t=K.exports.useRef(null);function n(l=!1,u){const f=document.querySelector(`.${Et["project-page"]}.${Et.active}`);if(l){t.current.classList.add(Et.active);const h=u.fullCover;f.querySelectorAll(`.${Et["full-cover"]}`).forEach((_,y)=>_.style.backgroundImage=`url(${h})`);const m=t.current.querySelector(`.${Et["project-info-overlay"]}`);m.querySelector(`.${Et["project-info-type"]} div`).innerText=u.type;const v=m.querySelectorAll(`.${Et["project-info-title"]} div`);v[0].innerText=v[1].innerText=v[2].innerText=u.title}else t.current.classList.remove(Et.active)}function r(l){const u=new CustomEvent("detailModalOpen",{detail:l});window.dispatchEvent(u)}let s=-1;function o(l){const u=l?l.detail.progress:0,f=wt("project-section-start"),h=wt("project-section-end"),p=En(u,f,h),m=Math.min(1,Math.max(0,p));let v;m>=0&&m<=1&&(document.querySelector(`.${Et["progress-inner"]}`).style.width=`${m*100}%`),p<0?v=-1:p<.3333?v=0:p<.6666?v=1:p<1?v=2:v=-1,v!=s&&(document.querySelector(`.${Et.container}`).classList.add(Et.active),n(!1),kl[v]?a(kl[v]):(document.querySelector(`.${Et.container}`).classList.remove(Et.active),document.querySelectorAll(`.${Et["project-page"]}`).forEach(y=>y.classList.remove(Et.active)))),s=v}function a(l){const u=document.querySelector(`.${Et.category} div:nth-child(1)`).offsetHeight,f=document.querySelector(`.${Et.index} div:nth-child(1)`).offsetHeight;document.querySelector(`.${Et.category} div:nth-child(1)`).style.marginTop=-(l.page-1)*u+"px",document.querySelector(`.${Et.index} div:nth-child(1)`).style.marginTop=-(l.page-1)*f+"px",document.querySelectorAll(`.${Et["project-page"]}`).forEach((p,m)=>{m==l.page-1?p.classList.add(Et.active):p.classList.remove(Et.active)})}return K.exports.useEffect(()=>(o({detail:{progress:i()}}),window.addEventListener("websiteProgress",o),()=>{window.removeEventListener("websiteProgress",o)}),[]),Ye(kf,{children:[F(EW,{locomotiveScroll:e}),Ye("div",{className:Et.container,children:[Ye("div",{className:Et["project-list"],ref:t,children:[kl.map((l,u)=>F("div",{className:Et["project-page"],children:kl[u].projects.map((f,h)=>Ye("div",{className:Et.project,style:{},children:[Ye("div",{className:Et.seq,children:["0",f.id]}),Ye("div",{className:Et["project-info"],children:[F("div",{className:Et.title,children:f.title}),F("div",{className:Et.client,children:f.client}),F("div",{className:Et["tag-list"],children:f.tags.map((p,m)=>F("div",{className:Et.tag,children:p},m))})]}),F("div",{className:Et["cover-container"],onPointerEnter:()=>n(!0,f),onPointerLeave:()=>n(!1,f),onClick:()=>r(f),children:Ye("div",{className:Et["cover-with-mask"],children:[F("img",{className:Et["cover-image-thumb"],src:f.cover,alt:f.title}),F("img",{className:Et["cover-image-mobile"],src:f.fullCover,alt:f.title}),F("div",{className:Et["full-cover"],style:{backgroundImage:"url("+f.fullCover+")",transitionDelay:h/15+"s"}}),F("div",{className:Et["cover-mask"]})]})}),F("div",{className:Et["asset-line"]})]},f.id))},u)),Ye("div",{className:Et["project-info-overlay"],children:[F("div",{className:Et["project-info-type"],children:F("div",{})}),Ye("div",{className:Et["project-info-title"],children:[F("div",{className:Et["title-white"]}),F("div",{className:Et["title-red"]}),F("div",{className:Et["title-blue"]})]})]})]}),Ye("div",{className:Et["list-info-container"],children:[F("div",{className:Et["progress-outer"],children:F("div",{className:Et["progress-inner"],style:{width:`${.1*100}%`}})}),Ye("div",{className:Et["category-info-bar"],children:[F("div",{className:Et.category,children:kl.map((l,u)=>F("div",{children:l.title},u))}),Ye("div",{className:Et.index,children:[F("span",{className:Et["cur-page"],children:kl.map((l,u)=>Ye("div",{children:["0",l.page]},u))}),F("span",{children:" / "}),Ye("span",{children:["0",kl.length]})]})]})]})]})]})}const MW="_bar_1rghk_17",CW="_text_1rghk_24",TW="_line_1rghk_52",RW="_chinese_1rghk_95",PW="_english_1rghk_117",bW="_active_1rghk_133",IW="_copyright_1rghk_136",un={"menu-page":"_menu-page_1rghk_1","cover-image":"_cover-image_1rghk_10",bar:MW,text:CW,"menu-list":"_menu-list_1rghk_36","menu-item":"_menu-item_1rghk_40",line:TW,chinese:RW,english:PW,active:bW,copyright:
6263IW};function BW({locomotiveScroll:i}){const[e,t]=K.exports.useState(!1);function n(s){const o=wt(s,!0);window.scrollTo({left:0,top:o,behavior:"smooth"}),t(!1)}function r(s,o=!1){document.querySelector("."+un.text).innerText=s}return F(kf,{children:Ye(OD,{state:e,locomotiveScroll:i,children:[F(ND,{state:e,setState:t}),Ye("div",{className:un["menu-page"]+" "+(e?un.active:""),children:[Ye("div",{className:un["cover-image"],children:[F("div",{className:un.bar}),F("div",{className:un.bar}),F("div",{className:un.bar}),F("div",{className:un.text})]}),Ye("div",{className:un["menu-list"],children:[Ye("div",{className:un["menu-item"],onClick:()=>n("camera-stage1-end"),onPointerEnter:()=>r("HOME",!0),onPointerLeave:()=>r(""),children:[F("div",{className:un.chinese,children:F("span",{children:"\u9996\u9875"})}),F("div",{className:un.english,children:F("span",{style:{transitionDelay:"0.25s"},children:"HOME"})}),F("div",{className:un.line,style:{transitionDelay:"0.3s"}})]}),Ye("div",{className:un["menu-item"],onClick:()=>n("title-project-start"),onPointerEnter:()=>r("PROJECTS",!0),onPointerLeave:()=>r(""),children:[F("div",{className:un.chinese,children:F("span",{children:"\u9879\u76EE"})}),F("div",{className:un.english,children:F("span",{style:{transitionDelay:"0.4s"},children:"PROJECTS"})}),F("div",{className:un.line,style:{transitionDelay:"0.35s"}})]}),Ye("div",{className:un["menu-item"],onClick:()=>n("title-client-start"),onPointerEnter:()=>r("CLIENTS",!0),onPointerLeave:()=>r(""),children:[F("div",{className:un.chinese,children:F("span",{children:"\u5BA2\u6237"})}),F("div",{className:un.english,children:F("span",{style:{transitionDelay:"0.45s"},children:"CLIENTS"})}),F("div",{className:un.line,style:{transitionDelay:"0.45s"}})]}),Ye("div",{className:un["menu-item"],onClick:()=>n("title-explore-start"),onPointerEnter:()=>r("EXPLORE",!0),onPointerLeave:()=>r(""),children:[F("div",{className:un.chinese,children:F("span",{children:"\u63A2\u7D22"})}),F("div",{className:un.english,children:F("span",{style:{transitionDelay:"0.5s"},children:"EXPLORE"})}),F("div",{className:un.line,style:{transitionDelay:"0.55s"}})]}),Ye("div",{className:un["menu-item"],onClick:()=>n("title-aboutus-start"),onPointerEnter:()=>r("ABOUTUS",!0),onPointerLeave:()=>r(""),children:[F("div",{className:un.chinese,children:F("span",{children:"\u5173\u4E8E\u6211\u4EEC"})}),F("div",{className:un.english,children:F("span",{style:{transitionDelay:"0.55s"},children:"ABOUT US"})}),F("div",{className:un.line,style:{transitionDelay:"0.65s"}})]}),F("div",{className:un.copyright,children:"Copyright \xA9 2010-2024 \u6728\u9C7C\u4E92\u52A8"})]})]})]})})}const DW="_container_1eun7_1",FW="_block_1eun7_22",LW="_active_1eun7_186",NW="_contact_1eun7_198",OW="_copyright_1eun7_198",Nr={container:DW,"title-container":"_title-container_1eun7_13",block:FW,"block-inner":"_block-inner_1eun7_43",active:LW,contact:NW,copyright:OW,"contact-title":"_contact-title_1eun7_214","contact-row":"_contact-row_1eun7_220"};function UW(){const[i,e]=K.exports.useState(!1),t=new Date().getFullYear(),n=K.exports.useRef(null),r=s=>{const o=s.detail.show;e(o),o?n.current.style.display="block":n.current.style.display="none"};return K.exports.useEffect(()=>(window.addEventListener("showTheEndUI",r),()=>{window.removeEventListener("showTheEndUI",r)}),[]),Ye("div",{ref:n,className:Nr.container+" "+(i?Nr.active:""),children:[F("div",{className:Nr["title-container"],children:Array.from({length:21},(s,o)=>F("div",{className:Nr.block,children:F("div",{className:Nr["block-inner"]})},o))}),Ye("div",{className:Nr.contact,children:[Ye("div",{className:Nr["contact-content"],children:[F("div",{className:Nr["contact-title"],children:"\u5730\u5740\uFF1A"}),"\u5317\u4EAC\u5E02\u6D77\u6DC0\u533A\u4E2D\u5173\u6751\u5927\u88579\u53F7\u5357\u697C6\u5C42"]}),Ye("div",{className:Nr["contact-content"],children:[F("div",{className:Nr["contact-title"],children:"\u90AE\u7BB1\uFF1A"}),"[email protected]"]}),Ye("div",{className:Nr["contact-content"],children:[" ",F("div",{className:Nr["contact-title"],children:"\u7535\u8BDD\uFF1A"}),"15710068691"]})]}),Ye("div",{className:Nr.copyright,children:[Ye("div",{children:["Copyright \xA9 2010 ~ ",t," \u5317\u4EAC\u6728\u9C7C\u4E92\u52A8\u7F51\u7EDC\u79D1\u6280\u6709\u9650\u516C\u53F8"]}),F("div",{children:F("a",{href:"https://beian.miit.gov.cn/",children:"\u4EACICP\u590716045684\u53F7"})})]})]})}function zW({totalCount:i=50}){const{progress:e,loaded:t,total:n}=V9();n>i&&(i=n);const r=new CustomEvent("loading",{detail:{progress:e,loaded:t,totalCount:i}});window.dispatchEvent(r)}Gf.registerPlugin(Ov);function kW(){const i=K.exports.useRef(null),e=K.exports.useRef(null),t=K.exports.useRef(null);let n=0;function r({scroll:o,limit:a,velocity:l,direction:u,progress:f}){const h=new CustomEvent("websiteProgress",{detail:{progress:f,lastScrollPct:n/a,scroll:o,limit:a,velocity:l,direction:u}});window.dispatchEvent(h),n=o}K.exports.useEffect(()=>{const o=new $N({el:i.current,smooth:!0,autoStart:!1,scrollCallback:r});e.current=o;function a(){o.start()}return window.addEventListener("loadDone",a),()=>{window.removeEventListener("loadDone",a)}},[]);function s(){if(!e.current){const o=document.documentElement,a=document.body,l="scrollTop",u="scrollHeight";return(o[l]||a[l])/((o[u]||a[u])-o.clientHeight)}return e.current.lenisInstance.progress}return console.warn("app"),Ye("div",{className:"App",children:[F(zW,{totalCount:28}),F("div",{id:"globalOverlay"}),Ye("main",{"data-scroll-enable-touch-speed":!0,"data-scroll-event-progress":"progressEvent",ref:i,children:[F("div",{className:"background3d",children:F(z9,{camera:{position:[0,0,30],far:1e6,near:.1,fov:50}
6263,dpr:[1,2],children:F(OV,{initProgressFunc:s})})}),F("div",{className:In["page-section"]+" "+In["section-intro"]}),F("div",{className:In["page-section"]+" "+In["section-projects"]}),F("div",{className:In["page-section"]+" "+In["section-clients"],children:F(QV,{initProgressFunc:s})}),F("div",{className:In["page-section"]+" "+In["section-explore"],children:F("div",{className:In["explore-text"],"data-scroll-speed":"0.01",children:"\u6211\u4EEC\u811A\u8E0F\u5B9E\u5730\uFF0C\u4F46\u4ECE\u672A\u505C\u6B62\u4EF0\u671B\u661F\u7A7A\u3002 \u6280\u672F\u5728\u9AD8\u901F\u53D1\u5C55\uFF0C\u6211\u4EEC\u4E0D\u65AD\u5C1D\u8BD5\u65B0\u6280\u672F\u3001\u65B0\u8BBE\u8BA1\u7406\u5FF5\u843D\u5730\uFF0C\u529B\u4E89\u4E3A\u5BA2\u6237\u5E26\u6765\u5168\u65B0\u7684\u4F53\u9A8C\u3002"})}),Ye("div",{"data-scroll-container":!0,className:In["page-section"]+" "+In["section-aboutUs"],children:[F("div",{className:In["ending-text"]+" "+In["t-1"],"data-scroll-speed":"0.005",children:"\u5317\u4EAC\u6728\u9C7C\u4E92\u52A8\u7F51\u7EDC\u79D1\u6280\u6709\u9650\u516C\u53F8\u6210\u7ACB\u4E8E2010\u5E74\uFF0C\u529E\u516C\u5730\u70B9\u4F4D\u4E8E\u4E2D\u5173\u6751\u5927\u88579\u53F7\u3002\u516C\u53F8\u957F\u671F\u4E13\u6CE8\u4E8E\u79FB\u52A8\u4E92\u8054\u7F51\u4EA7\u54C1\u53CA\u5A92\u4F53\u4F20\u64AD\u9886\u57DF\u7684\u6280\u672F\u5B9E\u8DF5\u4E0E\u7814\u7A76\uFF0C\u59CB\u7EC8\u575A\u6301\u4EA7\u54C1\u3001\u6280\u672F\u3001\u8BBE\u8BA1\u521B\u65B0\u7406\u5FF5\u3002"}),F("div",{className:In["ending-photo"],children:F("img",{src:"images/aboutus/1.jpg"})}),F("div",{className:In["ending-text"]+" "+In["t-2"],"data-scroll-speed":"0.005",children:"\u516C\u53F8\u575A\u6301\u4EE5\u5BA2\u6237\u9700\u6C42\u4E3A\u7ED3\u679C\u5BFC\u5411\uFF0C\u4EE5\u524D\u6CBF\u6280\u672F\u4E3A\u9A71\u52A8\u529B\uFF0C\u63D0\u4F9B\u5168\u65B9\u4F4D\u7684\u5F00\u53D1\u4E0E\u8BBE\u8BA1\u670D\u52A1\u3002\u4E1A\u52A1\u6D89\u53CA\u4EA7\u54C1\u7B56\u5212\u3001\u7CFB\u7EDF\u5F00\u53D1\u3001\u7CFB\u7EDF\u8FD0\u7EF4\u3001\u5E73\u9762\u8BBE\u8BA1\u3001\u624B\u7ED8\u63D2\u753B\u30013D\u8BBE\u8BA1\u3001\u89C6\u9891\u62CD\u6444\u5236\u4F5C\u7B49\u5168\u6D41\u7A0B\u670D\u52A1\u3002"}),F("div",{className:In["ending-photo"],children:F("img",{src:"images/aboutus/3.jpg"})}),F("div",{className:In["ending-text"]+" "+In["t-3"],"data-scroll-speed":"0.005",children:"\u901A\u8FC7\u591A\u5E74\u79EF\u6DC0\uFF0C\u4F01\u4E1A\u6587\u5316\u5E73\u7B49\u591A\u5143\uFF0C\u56E2\u961F\u7A33\u5B9A\u3001\u5458\u5DE5\u5173\u7CFB\u878D\u6D3D\u3002\u5982\u679C\u60A8\u7684\u80FD\u529B\u51FA\u4F17\u4E14\u70ED\u7231\u751F\u6D3B\uFF0C\u6B22\u8FCE\u901A\u8FC7\u4E0B\u65B9\u8054\u7CFB\u65B9\u5F0F\u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002"}),F("div",{className:In["ending-photo"],children:F("img",{src:"images/aboutus/2.jpg"})}),F("div",{className:In["ending-photo"],children:F("img",{src:"images/aboutus/4.jpg"})}),F("div",{className:"stage-indicator",style:{bottom:"0vh"},children:"page-end"})]}),F("div",{className:"stage-indicator",style:{top:"0"},children:"intro-start,background-stage1-start,logo-stage1-start,camera-stage1-start"}),F("div",{className:"stage-indicator",style:{top:"50vh"},children:"intro-1-start"}),F("div",{className:"stage-indicator",style:{top:"150vh"},children:"intro-2-start"}),F("div",{className:"stage-indicator",style:{top:"280vh"},children:"intro-3-start"}),F("div",{className:"stage-indicator",style:{top:"400vh"},children:"intro-4-start"}),F("div",{className:"stage-indicator",style:{top:"419vh"},children:"background-stage1-end,logo-stage1-end,camera-stage1-end"}),F("div",{className:"stage-indicator",id:"sceneIntro",style:{to
6263p:"459vh"},children:"geom-background-start,pointsea-background-start"}),F("div",{className:"stage-indicator",style:{top:"487.5vh"},children:"intro-end,background-stage2-start,logo-stage2-start,camera-stage2-start"}),F("div",{className:"stage-indicator",style:{top:"600vh"},children:"title-project-start"}),F("div",{className:"stage-indicator",style:{top:"733vh"},children:"logo-stage2-end"}),F("div",{className:"stage-indicator",style:{top:"783vh"},children:"background-stage2-end"}),F("div",{className:"stage-indicator",style:{top:"850vh"},children:"title-project-end,project-section-start"}),F("div",{className:"stage-indicator",style:{top:"1110vh"},children:"project-section-end"}),F("div",{className:"stage-indicator",style:{top:"1140vh"},children:"title-client-start"}),F("div",{className:"stage-indicator",style:{top:"1240vh"},children:"title-client-end"}),F("div",{className:"stage-indicator",style:{top:"1300vh"},children:"stair-section-start"}),F("div",{className:"stage-indicator",style:{top:"1360vh"},children:"background-stage3-start"}),F("div",{className:"stage-indicator",style:{top:"1433vh"},children:"title-explore-start,geom-background-end"}),F("div",{className:"stage-indicator",style:{top:"1533vh"},children:"title-explore-end,background-stage3-end,explore-robot-come"}),F("div",{className:"stage-indicator",style:{top:"1800vh"},children:"explore-robot-go"}),F("div",{className:"stage-indicator",style:{top:"1850vh"},children:"pointsea-background-end"}),F("div",{className:"stage-indicator",style:{top:"1900vh"},children:"stair-section-end,camera-stage2-end"}),F("div",{className:"stage-indicator",style:{top:"1930vh"},children:"camera-stage3-start"}),F("div",{className:"stage-indicator",style:{top:"2030vh"},children:"camera-stage3-end"}),F("div",{className:"stage-indicator",style:{top:"2130vh"},children:"title-aboutus-start"}),F("div",{className:"stage-indicator",style:{top:"2230vh"},children:"title-aboutus-end"})]}),F("div",{ref:t,className:In.foreground,children:Ye("div",{className:In["content-width"],children:[F(YV,{initProgressFunc:s}),F(wW,{initProgressFunc:s,locomotiveScroll:e}),F(BW,{locomotiveScroll:e}),F(XV,{initProgressFunc:s}),F(L0,{title:"projects",initProgressFunc:s}),F(L0,{title:"clients",initProgressFunc:s}),F(L0,{title:"explore",initProgressFunc:s}),F(L0,{title:"aboutus",initProgressFunc:s}),F(UW,{initProgressFunc:s})]})})]})}function GW(){const[i,e]=K.exports.useState(!1);return K.exports.useEffect(()=>(window.addEventListener("readyToInit",()=>{e(!0)}),()=>{window.removeEventListener("readyToInit",()=>{e(!1)})}),[]),console.log("appLoadReady",i),i?F(kW,{}):F("div",{children:"Loading..."})}Py.createRoot(document.getElementById("canvasRoot")).render(F(GW,{}));const HW="";function VW(i){$.html5Loader({baseCDN:HW,filesToLoad:"file.json",onBeforeLoad:function(){},onComplete:function(){window.setTimeout(()=>{e(()=>{document.querySelector(".loading-percent").innerHTML=document.querySelector(".loading-percent-2").innerHTML="\u521D\u59CB\u5316\u4E2D\uFF0C\u8BF7\u7A0D\u5019",window.setTimeout(()=>{const n=new CustomEvent("readyToInit",{detail:{readyToInit:!0}});window.dispatchEvent(n)},1e3)})},1e3)},onUpdate:function(n){document.querySelector(".loading-bar-inner").style.width=`${n}%`,document.querySelector(".loading-percent").innerHTML=document.querySelector(".loading-percent-2").innerHTML="\u6570\u636E\u8BFB\u53D6\u4E2D "+n+"%"}});function e(n){document.querySelector(".bg-half.top").style.transitionDuration=`${.45}s`,document.querySelector(".bg-half.bottom").style.transitionDuration=`${.45}s`,document.querySelector(".bg-half.top").classList.add("close"),document.querySelector(".bg-half.bottom").classList.add("close"),window.setTimeout(()=>{n&&n(),document.querySelector(".bg-half.top").classList.remove("close"),document.querySelector(".bg-half.bottom").classList.remove("close")},.45*1200)}function t(n){n.detail.loadDone&&(window.setTimeout(()=>{document.querySelector(".bg-half.top").classList.add("close"),document.querySelector(".bg-half.bottom").classList.add("close"),document.querySelector(".copyright").style.opacity=0},1e3),window.setTimeout(()=>{document.querySelector("#loading").classList.add("load-done"),document.querySelector("#root").classList.add("ready"),document.querySelector("#loading").classList.add("all-ready"),window.setTimeout(()=>{document.querySelector("#loading").remove()},1e3)},1800))}window.addEventListener("loadDone",t),window.addEventListener("loading",function(n){})}VW();export{WW as c,CF as g};
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.