PageSourceSearch

https://arnavsingh0.github.io/assets/index-10f860f6.js

js arnavsingh0.github.io collected 2026-10-03 08:39:20 UTC 1,520,907 bytes, 4,015 lines download raw bytes

vendor: 5,238 bytes, lines 1-9
1function EU(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function J1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var aL={exports:{}},K1={},lL={exports:{}},Wt={};/**
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 Wp=Symbol.for("react.element"),TU=Symbol.for("react.portal"),bU=Symbol.for("react.fragment"),CU=Symbol.for("react.strict_mode"),RU=Symbol.for("react.profiler"),PU=Symbol.for("react.provider"),BU=Symbol.for("react.context"),LU=Symbol.for("react.forward_ref"),IU=Symbol.for("react.suspense"),NU=Symbol.for("react.memo"),DU=Symbol.for("react.lazy"),Jb=Symbol.iterator;function FU(t){return t===null||typeof t!="object"?null:(t=Jb&&t[Jb]||t["@@iterator"],typeof t=="function"?t:null)}var cL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uL=Object.assign,fL={};function th(t,e,n){this.props=t,this.context=e,this.refs=fL,this.updater=n||cL}th.prototype.isReactComponent={};th.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};th.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function hL(){}hL.prototype=th.prototype;function sM(t,e,n){this.props=t,this.context=e,this.refs=fL,this.updater=n||cL}var oM=sM.prototype=new hL;oM.constructor=sM;uL(oM,th.prototype);oM.isPureReactComponent=!0;var Kb=Array.isArray,dL=Object.prototype.hasOwnProperty,aM={current:null},pL={key:!0,ref:!0,__self:!0,__source:!0};function mL(t,e,n){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)dL.call(e,i)&&!pL.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(t&&t.defaultProps)for(i in a=t.defaultProps,a)r[i]===void 0&&(r[i]=a[i]);return{$$typeof:Wp,type:t,key:s,ref:o,props:r,_owner:aM.current}}function OU(t,e){return{$$typeof:Wp,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function lM(t){return typeof t=="object"&&t!==null&&t.$$typeof===Wp}function UU(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Yb=/\/+/g;function u_(t,e){return typeof t=="object"&&t!==null&&t.key!=null?UU(""+t.key):e.toString(36)}function Gg(t,e,n,i,r){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Wp:case TU:o=!0}}if(o)return o=t,r=r(o),t=i===""?"."+u_(o,0):i,Kb(r)?(n="",t!=null&&(n=t.replace(Yb,"$&/")+"/"),Gg(r,e,n,"",function(c){return c})):r!=null&&(lM(r)&&(r=OU(r,n+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(Yb,"$&/")+"/")+t)),e.push(r)),1;if(o=0,i=i===""?".":i+":",Kb(t))for(var a=0;a<t.length;a++){s=t[a];var l=i+u_(s,a);o+=Gg(s,e,n,l,r)}else if(l=FU(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=i+u_(s,a++),o+=Gg(s,e,n,l,r);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function v0(t,e,n){if(t==null)return t;var i=[],r=0;return Gg(t,i,"","",function(s){return e.call(n,s,r++)}),i}function kU(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var pr={current:null},Vg={transition:null},zU={ReactCurrentDispatcher:pr,ReactCurrentBatchConfig:Vg,ReactCurrentOwner:aM};function gL(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 7,755 bytes, lines 9-25
9Wt.Children={map:v0,forEach:function(t,e,n){v0(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return v0(t,function(){e++}),e},toArray:function(t){return v0(t,function(e){return e})||[]},only:function(t){if(!lM(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Wt.Component=th;Wt.Fragment=bU;Wt.Profiler=RU;Wt.PureComponent=sM;Wt.StrictMode=CU;Wt.Suspense=IU;Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zU;Wt.act=gL;Wt.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=uL({},t.props),r=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=aM.current),e.key!==void 0&&(r=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)dL.call(e,l)&&!pL.hasOwnProperty(l)&&(i[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];i.children=a}return{$$typeof:Wp,type:t.type,key:r,ref:s,props:i,_owner:o}};Wt.createContext=function(t){return t={$$typeof:BU,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:PU,_context:t},t.Consumer=t};Wt.createElement=mL;Wt.createFactory=function(t){var e=mL.bind(null,t);return e.type=t,e};Wt.createRef=function(){return{current:null}};Wt.forwardRef=function(t){return{$$typeof:LU,render:t}};Wt.isValidElement=lM;Wt.lazy=function(t){return{$$typeof:DU,_payload:{_status:-1,_result:t},_init:kU}};Wt.memo=function(t,e){return{$$typeof:NU,type:t,compare:e===void 0?null:e}};Wt.startTransition=function(t){var e=Vg.transition;Vg.transition={};try{t()}finally{Vg.transition=e}};Wt.unstable_act=gL;Wt.useCallback=function(t,e){return pr.current.useCallback(t,e)};Wt.useContext=function(t){return pr.current.useContext(t)};Wt.useDebugValue=function(){};Wt.useDeferredValue=function(t){return pr.current.useDeferredValue(t)};Wt.useEffect=function(t,e){return pr.current.useEffect(t,e)};Wt.useId=function(){return pr.current.useId()};Wt.useImperativeHandle=function(t,e,n){return pr.current.useImperativeHandle(t,e,n)};Wt.useInsertionEffect=function(t,e){return pr.current.useInsertionEffect(t,e)};Wt.useLayoutEffect=function(t,e){return pr.current.useLayoutEffect(t,e)};Wt.useMemo=function(t,e){return pr.current.useMemo(t,e)};Wt.useReducer=function(t,e,n){return pr.current.useReducer(t,e,n)};Wt.useRef=function(t){return pr.current.useRef(t)};Wt.useState=function(t){return pr.current.useState(t)};Wt.useSyncExternalStore=function(t,e,n){return pr.current.useSyncExternalStore(t,e,n)};Wt.useTransition=function(){return pr.current.useTransition()};Wt.version="18.3.1";lL.exports=Wt;var I=lL.exports;const zt=J1(I),HU=EU({__proto__:null,default:zt},[I]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var GU=I,VU=Symbol.for("react.element"),jU=Symbol.for("react.fragment"),WU=Object.prototype.hasOwnProperty,XU=GU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,JU={key:!0,ref:!0,__self:!0,__source:!0};function vL(t,e,n){var i,r={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(i in e)WU.call(e,i)&&!JU.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:VU,type:t,key:s,ref:o,props:r,_owner:XU.current}}K1.Fragment=jU;K1.jsx=vL;K1.jsxs=vL;aL.exports=K1;var T=aL.exports,lS={},yL={exports:{}},Zr={},xL={exports:{}},_L={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e(O,H){var W=O.length;O.push(H);e:for(;0<W;){var j=W-1>>>1,Z=O[j];if(0<r(Z,H))O[j]=H,O[W]=Z,W=j;else break e}}function n(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var H=O[0],W=O.pop();if(W!==H){O[0]=W;e:for(var j=0,Z=O.length,re=Z>>>1;j<re;){var ue=2*(j+1)-1,ve=O[ue],Re=ue+1,Le=O[Re];if(0>r(ve,W))Re<Z&&0>r(Le,ve)?(O[j]=Le,O[Re]=W,j=Re):(O[j]=ve,O[ue]=W,j=ue);else if(Re<Z&&0>r(Le,W))O[j]=Le,O[Re]=W,j=Re;else break e}}return H}function r(O,H){var W=O.sortIndex-H.sortIndex;return W!==0?W:O.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,p=3,m=!1,v=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(O){for(var H=n(c);H!==null;){if(H.callback===null)i(c);else if(H.startTime<=O)i(c),H.sortIndex=H.expirationTime,e(l,H);else break;H=n(c)}}function M(O){if(w=!1,y(O),!v)if(n(l)!==null)v=!0,z(E);else{var H=n(c);H!==null&&Y(M,H.startTime-O)}}function E(O,H){v=!1,w&&(w=!1,g(N),N=-1),m=!0;var W=p;try{for(y(H),f=n(l);f!==null&&(!(f.expirationTime>H)||O&&!k());){var j=f.callback;if(typeof j=="function"){f.callback=null,p=f.priorityLevel;var Z=j(f.expirationTime<=H);H=t.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(l)&&i(l),y(H)}else i(l);f=n(l)}if(f!==null)var re=!0;else{var ue=n(c);ue!==null&&Y(M,ue.startTime-H),re=!1}return re}finally{f=null,p=W,m=!1}}var C=!1,P=null,N=-1,R=5,L=-1;function k(){return!(t.unstable_now()-L<R)}function $(){if(P!==null){var O=t.unstable_now();L=O;var H=!0;try{H=P(!0,O)}finally{H?ee():(C=!1,P=null)}}else C=!1}var ee;if(typeof _=="function")ee=function(){_($)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,U=D.port2;D.port1.onmessage=$,ee=function(){U.postMessage(null)}}else ee=function(){x($,0)};function z(O){P=O,C||(C=!0,ee())}function Y(O,H){N=x(function(){O(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(O){O.callback=null},t.unstable_continueExecution=function(){v||m||(v=!0,z(E))},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(O){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var W=p;p=H;try{return O()}finally{p=W}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(O,H){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var W=p;p=O;try{return H()}finally{p=W}},t.unstable_scheduleCallback=function(O,H,W){var j=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?j+W:j):W=j,O){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=W+Z,O={id:u++,callback:H,priorityLevel:O,startTime:W,expirationTime:Z,sortIndex:-1},W>j?(O.sortIndex=W,e(c,O),n(l)===null&&O===n(c)&&(w?(g(N),N=-1):w=!0,Y(M,W-j))):(O.sortIndex=Z,e(l,O),v||m||(v=!0,z(E))),O},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(O){var H=
vendor: 4,331 bytes, lines 25-33
25p;return function(){var W=p;p=H;try{return O.apply(this,arguments)}finally{p=W}}}})(_L);xL.exports=_L;var KU=xL.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var YU=I,Yr=KU;function Be(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var SL=new Set,Jd={};function Yc(t,e){Nf(t,e),Nf(t+"Capture",e)}function Nf(t,e){for(Jd[t]=e,t=0;t<e.length;t++)SL.add(e[t])}var ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cS=Object.prototype.hasOwnProperty,QU=/^[: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]*$/,Qb={},Zb={};function ZU(t){return cS.call(Zb,t)?!0:cS.call(Qb,t)?!1:QU.test(t)?Zb[t]=!0:(Qb[t]=!0,!1)}function qU(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function $U(t,e,n,i){if(e===null||typeof e>"u"||qU(t,e,n,i))return!0;if(i)return!1;if(n!==null)switch(n.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 mr(t,e,n,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Bi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Bi[t]=new mr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Bi[e]=new mr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Bi[t]=new mr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Bi[t]=new mr(t,2,!1,t,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(t){Bi[t]=new mr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Bi[t]=new mr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Bi[t]=new mr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Bi[t]=new mr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Bi[t]=new mr(t,5,!1,t.toLowerCase(),null,!1,!1)});var cM=/[\-:]([a-z])/g;function uM(t){return t[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
33-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(t){var e=t.replace(cM,uM);Bi[e]=new mr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(cM,uM);Bi[e]=new mr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(cM,uM);Bi[e]=new mr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Bi[t]=new mr(t,1,!1,t.toLowerCase(),null,!1,!1)});Bi.xlinkHref=new mr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Bi[t]=new mr(t,1,!1,t.toLowerCase(),null,!0,!0)});function fM(t,e,n,i){var r=Bi.hasOwnProperty(e)?Bi[e]:null;(r!==null?r.type!==0:i||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&($U(e,n,r,i)&&(n=null),i||r===null?ZU(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):r.mustUseProperty?t[r.propertyName]=n===null?r.type===3?!1:"":n:(e=r.attributeName,i=r.attributeNamespace,n===null?t.removeAttribute(e):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}var wa=YU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,y0=Symbol.for("react.element"),Yu=Symbol.for("react.portal"),Qu=Symbol.for("react.fragment"),hM=Symbol.for("react.strict_mode"),uS=Symbol.for("react.profiler"),wL=Symbol.for("react.provider"),AL=Symbol.for("react.context"),dM=Symbol.for("react.forward_ref"),fS=Symbol.for("react.suspense"),hS=Symbol.for("react.suspense_list"),pM=Symbol.for("react.memo"),ja=Symbol.for("react.lazy"),ML=Symbol.for("react.offscreen"),qb=Symbol.iterator;function Dh(t){return t===null||typeof t!="object"?null:(t=qb&&t[qb]||t["@@iterator"],typeof t=="function"?t:null)}var Dn=Object.assign,f_;function ld(t){if(f_===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);f_=e&&e[1]||""}return`
34`+f_+t}var h_=!1;function d_(t,e){if(!t||h_)return"";h_=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var i=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){i=c}t.call(e.prototype)}else{try{throw Error()}catch(c){i=c}t()}}catch(c){if(c&&i&&typeof c.stack=="string"){for(var r=c.stack.split(`
35`),s=i.stack.split(`
36`),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||r[o]!==s[a]){var l=`
37`+r[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{h_=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ld(t):""}function ek(t){switch(t.tag){case 5:return ld(t.type);case 16:return ld("Lazy");case 13:return ld("Suspense");case 19:return ld("SuspenseList");case 0:case 2:case 15:return t=d_(t.type,!1),t;case 11:return t=d_(t.type.render,!1),t;case 1:return t=d_(t.type,!0),t;default:return""}}function dS(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Qu:return"Fragment";case Yu:return"Portal";case uS:return"Profiler";case hM:return"StrictMode";case fS:return"Suspense";case hS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case AL:return(t.displayName||"Context")+".Consumer";case wL:return(t._context.displayName||"Context")+".Provider";case dM:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case pM:return e=t.displayName||null,e!==null?e:dS(t.type)||"Memo";case ja:e=t._payload,t=t._init;try{return dS(t(e))}catch{}}return null}function tk(t){var e=t.type;switch(t.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 t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return dS(e);case 8:return e===hM?"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 pl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function EL(t){var e=t.type;
vendor: 14,336 bytes, line 37
37return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function nk(t){var e=EL(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function x0(t){t._valueTracker||(t._valueTracker=nk(t))}function TL(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=EL(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function Av(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function pS(t,e){var n=e.checked;return Dn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function $b(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=pl(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function bL(t,e){e=e.checked,e!=null&&fM(t,"checked",e,!1)}function mS(t,e){bL(t,e);var n=pl(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?gS(t,e.type,n):e.hasOwnProperty("defaultValue")&&gS(t,e.type,pl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function eC(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function gS(t,e,n){(e!=="number"||Av(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var cd=Array.isArray;function _f(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&i&&(t[n].defaultSelected=!0)}else{for(n=""+pl(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,i&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function vS(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Be(91));return Dn({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function tC(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(Be(92));if(cd(n)){if(1<n.length)throw Error(Be(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:pl(n)}}function CL(t,e){var n=pl(e.value),i=pl(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),i!=null&&(t.defaultValue=""+i)}function nC(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function RL(t){switch(t){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 yS(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?RL(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var _0,PL=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,i,r){MSApp.execUnsafeLocalFunction(function(){return t(e,n,i,r)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(_0=_0||document.createElement("div"),_0.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=_0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Kd(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ad={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},ik=["Webkit","ms","Moz","O"];Object.keys(Ad).forEach(function(t){ik.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ad[e]=Ad[t]})});function BL(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ad.hasOwnProperty(t)&&Ad[t]?(""+e).trim():e+"px"}function LL(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=BL(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var rk=Dn({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 xS(t,e){if(e){if(rk[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Be(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Be(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Be(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Be(62))}}function _S(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 SS=null;function mM(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var wS=null,Sf=null,wf=null;function iC(t){if(t=Kp(t)){if(typeof wS!="function")throw Error(Be(280));var e=t.stateNode;e&&(e=$1(e),wS(t.stateNode,t.type,e))}}function IL(t){Sf?wf?wf.push(t):wf=[t]:Sf=t}function NL(){if(Sf){var t=Sf,e=wf;if(wf=Sf=null,iC(t),e)for(t=0;t<e.length;t++)iC(e[t])}}function DL(t,e){return t(e)}function FL(){}var p_=!1;function OL(t,e,n){if(p_)return t(e,n);p_=!0;try{return DL(t,e,n)}finally{p_=!1,(Sf!==null||wf!==null)&&(FL(),NL())}}function Yd(t,e){var n=t.stateNode;if(n===null)return null;var i=$1(n);if(i===null)return null;n=i[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(Be(231,e,typeof n));return n}var AS=!1;if(ha)try{var Fh={};Object.defineProperty(Fh,"passive",{get:function(){AS=!0}}),window.addEventListener("test",Fh,Fh),window.removeEventListener("test",Fh,Fh)}catch{AS=!1}function sk(t,e,n,i,r,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var Md=!1,Mv=null,Ev=!1,MS=null,ok={onError:function(t){Md=!0,Mv=t}};function ak(t,e,n,i,r,s,o,a,l){Md=!1,Mv=null,sk.apply(ok,arguments)}function lk(t,e,n,i,r,s,o,a,l){if(ak.apply(this,arguments),Md){if(Md){var c=Mv;Md=!1,Mv=null}else throw Error(Be(198));Ev||(Ev=!0,MS=c)}}function Qc(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function UL(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function rC(t){if(Qc(t)!==t)throw Error(Be(188))}function ck(t){var e=t.alternate;if(!e){if(e=Qc(t),e===null)throw Error(Be(188));return e!==t?null:t}for(var n=t,i=e;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(i=r.return,i!==null){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return rC(r),t;if(s===i)return rC(r),e;s=s.sibling}throw Error(Be(188))}if(n.return!==i.return)n=r,i=s;else{for(var o=!1,a=r.child;a;){if(a===n){o=!0,n=r,i=s;break}if(a===i){o=!0,i=r,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,i=r;break}if(a===i){o=!0,i=s,n=r;break}a=a.sibling}if(!o)throw Error(Be(189))}}if(n.alternate!==i)throw Error(Be(190))}if(n.tag!==3)throw Error(Be(188));return n.stateNode.current===n?t:e}function kL(t){return t=ck(t),t!==null?zL(t):null}function zL(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=zL(t);if(e!==null)return e;t=t.sibling}return null}var HL=Yr.unstable_scheduleCallback,sC=Yr.unstable_cancelCallback,uk=Yr.unstable_shouldYield,fk=Yr.unstable_requestPaint,Jn=Yr.unstable_now,hk=Yr.unstable_getCurrentPriorityLevel,gM=Yr.unstable_ImmediatePriority,GL=Yr.unstable_UserBlockingPriority,Tv=Yr.unstable_NormalPriority,dk=Yr.unstable_LowPriority,VL=Yr.unstable_IdlePriority,Y1=null,Ao=null;function pk(t){if(Ao&&typeof Ao.onCommitFiberRoot=="function")try{Ao.onCommitFiberRoot(Y1,t,void 0,(t.current.flags&128)===128)}catch{}}var Ws=Math.clz32?Math.clz32:vk,mk=Math.log,gk=Math.LN2;function vk(t){return t>>>=0,t===0?32:31-(mk(t)/gk|0)|0}var S0=64,w0=4194304;function ud(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function bv(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~r;a!==0?i=ud(a):(s&=o,s!==0&&(i=ud(s)))}else o=n&~r,o!==0?i=ud(o):s!==0&&(i=ud(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0<e;)n=31-Ws(e),r=1<<n,i|=t[n],e&=~r;return i}function yk(t,e){switch(t){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 xk(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Ws(s),a=1<<o,l=r[o];l===-1?(!(a&n)||a&i)&&(r[o]=yk(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function ES(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function jL(){var t=S0;return S0<<=1,!(S0&4194240)&&(S0=64),t}function m_(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Xp(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ws(e),t[e]=n}function _k(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0<n;){var r=31-Ws(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}function vM(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-Ws(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var un=0;function WL(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var XL,yM,JL,KL,YL,TS=!1,A0=[],nl=null,il=null,rl=null,Qd=new Map,Zd=new Map,Ka=[],Sk="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 oC(t,e){switch(t){case"focusin":case"focusout":nl=null;break;case"dragenter":case"dragleave":il=null;break;case"mouseover":case"mouseout":rl=null;break;case"pointerover":case"pointerout":Qd.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zd.delete(e.pointerId)}}function Oh(t,e,n,i,r,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},e!==null&&(e=Kp(e),e!==null&&yM(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function wk(t,e,n,i,r){switch(e){case"focusin":return nl=Oh(nl,t,e,n,i,r),!0;case"dragenter":return il=Oh(il,t,e,n,i,r),!0;case"mouseover":return rl=Oh(rl,t,e,n,i,r),!0;case"pointerover":var s=r.pointerId;return Qd.set(s,Oh(Qd.get(s)||null,t,e,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,Zd.set(s,Oh(Zd.get(s)||null,t,e,n,i,r)),!0}return!1}function QL(t){var e=cc(t.target);if(e!==null){var n=Qc(e);if(n!==null){if(e=n.tag,e===13){if(e=UL(n),e!==null){t.blockedOn=e,YL(t.priority,function(){JL(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function jg(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=bS(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);SS=i,n.target.dispatchEvent(i),SS=null}else return e=Kp(n),e!==null&&yM(e),t.blockedOn=n,!1;e.shift()}return!0}function aC(t,e,n){jg(t)&&n.delete(e)}function Ak(){TS=!1,nl!==null&&jg(nl)&&(nl=null),il!==null&&jg(il)&&(il=null),rl!==null&&jg(rl)&&(rl=null),Qd.forEach(aC),Zd.forEac
vendor: 5,798 bytes, line 37
37h(aC)}function Uh(t,e){t.blockedOn===e&&(t.blockedOn=null,TS||(TS=!0,Yr.unstable_scheduleCallback(Yr.unstable_NormalPriority,Ak)))}function qd(t){function e(r){return Uh(r,t)}if(0<A0.length){Uh(A0[0],t);for(var n=1;n<A0.length;n++){var i=A0[n];i.blockedOn===t&&(i.blockedOn=null)}}for(nl!==null&&Uh(nl,t),il!==null&&Uh(il,t),rl!==null&&Uh(rl,t),Qd.forEach(e),Zd.forEach(e),n=0;n<Ka.length;n++)i=Ka[n],i.blockedOn===t&&(i.blockedOn=null);for(;0<Ka.length&&(n=Ka[0],n.blockedOn===null);)QL(n),n.blockedOn===null&&Ka.shift()}var Af=wa.ReactCurrentBatchConfig,Cv=!0;function Mk(t,e,n,i){var r=un,s=Af.transition;Af.transition=null;try{un=1,xM(t,e,n,i)}finally{un=r,Af.transition=s}}function Ek(t,e,n,i){var r=un,s=Af.transition;Af.transition=null;try{un=4,xM(t,e,n,i)}finally{un=r,Af.transition=s}}function xM(t,e,n,i){if(Cv){var r=bS(t,e,n,i);if(r===null)E_(t,e,i,Rv,n),oC(t,i);else if(wk(r,t,e,n,i))i.stopPropagation();else if(oC(t,i),e&4&&-1<Sk.indexOf(t)){for(;r!==null;){var s=Kp(r);if(s!==null&&XL(s),s=bS(t,e,n,i),s===null&&E_(t,e,i,Rv,n),s===r)break;r=s}r!==null&&i.stopPropagation()}else E_(t,e,i,null,n)}}var Rv=null;function bS(t,e,n,i){if(Rv=null,t=mM(i),t=cc(t),t!==null)if(e=Qc(t),e===null)t=null;else if(n=e.tag,n===13){if(t=UL(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Rv=t,null}function ZL(t){switch(t){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(hk()){case gM:return 1;case GL:return 4;case Tv:case dk:return 16;case VL:return 536870912;default:return 16}default:return 16}}var Za=null,_M=null,Wg=null;function qL(){if(Wg)return Wg;var t,e=_M,n=e.length,i,r="value"in Za?Za.value:Za.textContent,s=r.length;for(t=0;t<n&&e[t]===r[t];t++);var o=n-t;for(i=1;i<=o&&e[n-i]===r[s-i];i++);return Wg=r.slice(t,1<i?1-i:void 0)}function Xg(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function M0(){return!0}function lC(){return!1}function qr(t){function e(n,i,r,s,o){this._reactName=n,this._targetInst=r,this.type=i,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?M0:lC,this.isPropagationStopped=lC,this}return Dn(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=M0)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=M0)},persist:function(){},isPersistent:M0}),e}var nh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},SM=qr(nh),Jp=Dn({},nh,{view:0,detail:0}),Tk=qr(Jp),g_,v_,kh,Q1=Dn({},Jp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wM,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==kh&&(kh&&t.type==="mousemove"?(g_=t.screenX-kh.screenX,v_=t.screenY-kh.screenY):v_=g_=0,kh=t),g_)},movementY:function(t){return"movementY"in t?t.movementY:v_}}),cC=qr(Q1),bk=Dn({},Q1,{dataTransfer:0}),Ck=qr(bk),Rk=Dn({},Jp,{relatedTarget:0}),y_=qr(Rk),Pk=Dn({},nh,{animationName:0,elapsedTime:0,pseudoElement:0}),Bk=qr(Pk),Lk=Dn({},nh,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ik=qr(Lk),Nk=Dn({},nh,{data:0}),uC=qr(Nk),Dk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fk={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"},Ok={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uk(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Ok[t])?!!e[t]:!1}function wM(){return Uk}var kk=Dn({},Jp,{key:function(t){if(t.key){var e=Dk[t.key]||t.key;if(e!=="Unidentified")return e}
vendor: 5,634 bytes, line 37
37return t.type==="keypress"?(t=Xg(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Fk[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wM,charCode:function(t){return t.type==="keypress"?Xg(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Xg(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),zk=qr(kk),Hk=Dn({},Q1,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fC=qr(Hk),Gk=Dn({},Jp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wM}),Vk=qr(Gk),jk=Dn({},nh,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wk=qr(jk),Xk=Dn({},Q1,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Jk=qr(Xk),Kk=[9,13,27,32],AM=ha&&"CompositionEvent"in window,Ed=null;ha&&"documentMode"in document&&(Ed=document.documentMode);var Yk=ha&&"TextEvent"in window&&!Ed,$L=ha&&(!AM||Ed&&8<Ed&&11>=Ed),hC=String.fromCharCode(32),dC=!1;function eI(t,e){switch(t){case"keyup":return Kk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tI(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Zu=!1;function Qk(t,e){switch(t){case"compositionend":return tI(e);case"keypress":return e.which!==32?null:(dC=!0,hC);case"textInput":return t=e.data,t===hC&&dC?null:t;default:return null}}function Zk(t,e){if(Zu)return t==="compositionend"||!AM&&eI(t,e)?(t=qL(),Wg=_M=Za=null,Zu=!1,t):null;switch(t){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 $L&&e.locale!=="ko"?null:e.data;default:return null}}var qk={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 pC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!qk[t.type]:e==="textarea"}function nI(t,e,n,i){IL(i),e=Pv(e,"onChange"),0<e.length&&(n=new SM("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var Td=null,$d=null;function $k(t){dI(t,0)}function Z1(t){var e=ef(t);if(TL(e))return t}function e7(t,e){if(t==="change")return e}var iI=!1;if(ha){var x_;if(ha){var __="oninput"in document;if(!__){var mC=document.createElement("div");mC.setAttribute("oninput","return;"),__=typeof mC.oninput=="function"}x_=__}else x_=!1;iI=x_&&(!document.documentMode||9<document.documentMode)}function gC(){Td&&(Td.detachEvent("onpropertychange",rI),$d=Td=null)}function rI(t){if(t.propertyName==="value"&&Z1($d)){var e=[];nI(e,$d,t,mM(t)),OL($k,e)}}function t7(t,e,n){t==="focusin"?(gC(),Td=e,$d=n,Td.attachEvent("onpropertychange",rI)):t==="focusout"&&gC()}function n7(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Z1($d)}function i7(t,e){if(t==="click")return Z1(e)}function r7(t,e){if(t==="input"||t==="change")return Z1(e)}function s7(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ys=typeof Object.is=="function"?Object.is:s7;function ep(t,e){if(Ys(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!cS.call(e,r)||!Ys(t[r],e[r]))return!1}return!0}function vC(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function yC(t,e){var n=vC(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vC(n)}}function sI(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?sI(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function oI(){for(var t=window,e=Av();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Av(t.document)}return e}function MM(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function o7(t){var e=oI(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&sI(n.ownerDocument.documentElement,n)){if(i!==null&&MM(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=yC(n,s);var o=yC(n,i);r&&o&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}
vendor: 4,915 bytes, line 37
37var a7=ha&&"documentMode"in document&&11>=document.documentMode,qu=null,CS=null,bd=null,RS=!1;function xC(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;RS||qu==null||qu!==Av(i)||(i=qu,"selectionStart"in i&&MM(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),bd&&ep(bd,i)||(bd=i,i=Pv(CS,"onSelect"),0<i.length&&(e=new SM("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=qu)))}function E0(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var $u={animationend:E0("Animation","AnimationEnd"),animationiteration:E0("Animation","AnimationIteration"),animationstart:E0("Animation","AnimationStart"),transitionend:E0("Transition","TransitionEnd")},S_={},aI={};ha&&(aI=document.createElement("div").style,"AnimationEvent"in window||(delete $u.animationend.animation,delete $u.animationiteration.animation,delete $u.animationstart.animation),"TransitionEvent"in window||delete $u.transitionend.transition);function q1(t){if(S_[t])return S_[t];if(!$u[t])return t;var e=$u[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in aI)return S_[t]=e[n];return t}var lI=q1("animationend"),cI=q1("animationiteration"),uI=q1("animationstart"),fI=q1("transitionend"),hI=new Map,_C="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 Al(t,e){hI.set(t,e),Yc(e,[t])}for(var w_=0;w_<_C.length;w_++){var A_=_C[w_],l7=A_.toLowerCase(),c7=A_[0].toUpperCase()+A_.slice(1);Al(l7,"on"+c7)}Al(lI,"onAnimationEnd");Al(cI,"onAnimationIteration");Al(uI,"onAnimationStart");Al("dblclick","onDoubleClick");Al("focusin","onFocus");Al("focusout","onBlur");Al(fI,"onTransitionEnd");Nf("onMouseEnter",["mouseout","mouseover"]);Nf("onMouseLeave",["mouseout","mouseover"]);Nf("onPointerEnter",["pointerout","pointerover"]);Nf("onPointerLeave",["pointerout","pointerover"]);Yc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Yc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Yc("onBeforeInput",["compositionend","keypress","textInput","paste"]);Yc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Yc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Yc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fd="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(" "),u7=new Set("cancel close invalid load scroll toggle".split(" ").concat(fd));function SC(t,e,n){var i=t.type||"unknown-event";t.currentTarget=n,lk(i,e,void 0,t),t.currentTarget=null}function dI(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],r=i.event;i=i.listeners;e:{var s=void 0;if(e)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break e;SC(r,a,c),s=l}else for(o=0;o<i.length;o++){if(a=i[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break e;SC(r,a,c),s=l}}}if(Ev)throw t=MS,Ev=!1,MS=null,t}function wn(t,e){var n=e[NS];n===void 0&&(n=e[NS]=new Set);var i=t+"__bubble";n.has(i)||(pI(e,t,2,!1),n.add(i))}function M_(t,e,n){var i=0;e&&(i|=4),pI(n,t,i,e)}var T0="_reactListening"+Math.random().toString(36).slice(2);function tp(t){if(!t[T0]){t[T0]=!0,SL.forEach(function(n){n!=="selectionchange"&&(u7.has(n)||M_(n,!1,t),M_(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[T0]||(e[T0]=!0,M_("selectionchange",!1,e))}}function pI(t,e,n,i){switch(ZL(e)){case 1:var r=Mk;break;case 4:r=Ek;break;default:r=xM}n=r.bind(null,e,n,t),r=void 0,!AS||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),i?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function E_(t,e,n,i,r){var s=i;if(!(e&1)&&!(e&2)&&i!==null)e:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var a=i.stateNode.containerInfo;
vendor: 5,317 bytes, lines 37-38
37if(a===r||a.nodeType===8&&a.parentNode===r)break;if(o===4)for(o=i.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===r||l.nodeType===8&&l.parentNode===r))return;o=o.return}for(;a!==null;){if(o=cc(a),o===null)return;if(l=o.tag,l===5||l===6){i=s=o;continue e}a=a.parentNode}}i=i.return}OL(function(){var c=s,u=mM(n),f=[];e:{var p=hI.get(t);if(p!==void 0){var m=SM,v=t;switch(t){case"keypress":if(Xg(n)===0)break e;case"keydown":case"keyup":m=zk;break;case"focusin":v="focus",m=y_;break;case"focusout":v="blur",m=y_;break;case"beforeblur":case"afterblur":m=y_;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=cC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Ck;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Vk;break;case lI:case cI:case uI:m=Bk;break;case fI:m=Wk;break;case"scroll":m=Tk;break;case"wheel":m=Jk;break;case"copy":case"cut":case"paste":m=Ik;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=fC}var w=(e&4)!==0,x=!w&&t==="scroll",g=w?p!==null?p+"Capture":null:p;w=[];for(var _=c,y;_!==null;){y=_;var M=y.stateNode;if(y.tag===5&&M!==null&&(y=M,g!==null&&(M=Yd(_,g),M!=null&&w.push(np(_,M,y)))),x)break;_=_.return}0<w.length&&(p=new m(p,v,null,n,u),f.push({event:p,listeners:w}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",m=t==="mouseout"||t==="pointerout",p&&n!==SS&&(v=n.relatedTarget||n.fromElement)&&(cc(v)||v[da]))break e;if((m||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=c,v=v?cc(v):null,v!==null&&(x=Qc(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=c),m!==v)){if(w=cC,M="onMouseLeave",g="onMouseEnter",_="mouse",(t==="pointerout"||t==="pointerover")&&(w=fC,M="onPointerLeave",g="onPointerEnter",_="pointer"),x=m==null?p:ef(m),y=v==null?p:ef(v),p=new w(M,_+"leave",m,n,u),p.target=x,p.relatedTarget=y,M=null,cc(u)===c&&(w=new w(g,_+"enter",v,n,u),w.target=y,w.relatedTarget=x,M=w),x=M,m&&v)t:{for(w=m,g=v,_=0,y=w;y;y=yu(y))_++;for(y=0,M=g;M;M=yu(M))y++;for(;0<_-y;)w=yu(w),_--;for(;0<y-_;)g=yu(g),y--;for(;_--;){if(w===g||g!==null&&w===g.alternate)break t;w=yu(w),g=yu(g)}w=null}else w=null;m!==null&&wC(f,p,m,w,!1),v!==null&&x!==null&&wC(f,x,v,w,!0)}}e:{if(p=c?ef(c):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var E=e7;else if(pC(p))if(iI)E=r7;else{E=n7;var C=t7}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=i7);if(E&&(E=E(t,c))){nI(f,E,n,u);break e}C&&C(t,p,c),t==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&gS(p,"number",p.value)}switch(C=c?ef(c):window,t){case"focusin":(pC(C)||C.contentEditable==="true")&&(qu=C,CS=c,bd=null);break;case"focusout":bd=CS=qu=null;break;case"mousedown":RS=!0;break;case"contextmenu":case"mouseup":case"dragend":RS=!1,xC(f,n,u);break;case"selectionchange":if(a7)break;case"keydown":case"keyup":xC(f,n,u)}var P;if(AM)e:{switch(t){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Zu?eI(t,n)&&(N="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&($L&&n.locale!=="ko"&&(Zu||N!=="onCompositionStart"?N==="onCompositionEnd"&&Zu&&(P=qL()):(Za=u,_M="value"in Za?Za.value:Za.textContent,Zu=!0)),C=Pv(c,N),0<C.length&&(N=new uC(N,t,null,n,u),f.push({event:N,listeners:C}),P?N.data=P:(P=tI(n),P!==null&&(N.data=P)))),(P=Yk?Qk(t,n):Zk(t,n))&&(c=Pv(c,"onBeforeInput"),0<c.length&&(u=new uC("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=P))}dI(f,e)})}function np(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Pv(t,e){for(var n=e+"Capture",i=[];t!==null;){var r=t,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=Yd(t,n),s!=null&&i.unshift(np(t,s,r)),s=Yd(t,e),s!=null&&i.push(np(t,s,r))),t=t.return}return i}function yu(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function wC(t,e,n,i,r){for(var s=e._reactName,o=[];n!==null&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===i)break;a.tag===5&&c!==null&&(a=c,r?(l=Yd(n,s),l!=null&&o.unshift(np(n,l,a))):r||(l=Yd(n,s),l!=null&&o.push(np(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var f7=/\r\n?/g,h7=/\u0000|\uFFFD/g;function AC(t){return(typeof t=="string"?t:""+t).replace(f7,`
38`).replace(h7,"")}function b0(t,e,n){if(e=AC(e),AC(t)!==e&&n)throw Error(Be(425))}function Bv(){}var PS=null,BS=null;function LS(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var IS=typeof setTimeout=="function"?setTimeout:void 0,d7=typeof clearTimeout=="function"?clearTimeout:void 0,MC=typeof Promise=="function"?Promise:void 0,p7=typeof queueMicrotask=="function"?queueMicrotask:typeof MC<"u"?function(t){return MC.resolve(null).then(t).cat
vendor: 4,832 bytes, line 38
38ch(m7)}:IS;function m7(t){setTimeout(function(){throw t})}function T_(t,e){var n=e,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(i===0){t.removeChild(r),qd(e);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);qd(e)}function sl(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function EC(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var ih=Math.random().toString(36).slice(2),vo="__reactFiber$"+ih,ip="__reactProps$"+ih,da="__reactContainer$"+ih,NS="__reactEvents$"+ih,g7="__reactListeners$"+ih,v7="__reactHandles$"+ih;function cc(t){var e=t[vo];if(e)return e;for(var n=t.parentNode;n;){if(e=n[da]||n[vo]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=EC(t);t!==null;){if(n=t[vo])return n;t=EC(t)}return e}t=n,n=t.parentNode}return null}function Kp(t){return t=t[vo]||t[da],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ef(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Be(33))}function $1(t){return t[ip]||null}var DS=[],tf=-1;function Ml(t){return{current:t}}function An(t){0>tf||(t.current=DS[tf],DS[tf]=null,tf--)}function _n(t,e){tf++,DS[tf]=t.current,t.current=e}var ml={},Ki=Ml(ml),br=Ml(!1),Pc=ml;function Df(t,e){var n=t.type.contextTypes;if(!n)return ml;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=e[s];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function Cr(t){return t=t.childContextTypes,t!=null}function Lv(){An(br),An(Ki)}function TC(t,e,n){if(Ki.current!==ml)throw Error(Be(168));_n(Ki,e),_n(br,n)}function mI(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Be(108,tk(t)||"Unknown",r));return Dn({},n,i)}function Iv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ml,Pc=Ki.current,_n(Ki,t),_n(br,br.current),!0}function bC(t,e,n){var i=t.stateNode;if(!i)throw Error(Be(169));n?(t=mI(t,e,Pc),i.__reactInternalMemoizedMergedChildContext=t,An(br),An(Ki),_n(Ki,t)):An(br),_n(br,n)}var ea=null,ey=!1,b_=!1;function gI(t){ea===null?ea=[t]:ea.push(t)}function y7(t){ey=!0,gI(t)}function El(){if(!b_&&ea!==null){b_=!0;var t=0,e=un;try{var n=ea;for(un=1;t<n.length;t++){var i=n[t];do i=i(!0);while(i!==null)}ea=null,ey=!1}catch(r){throw ea!==null&&(ea=ea.slice(t+1)),HL(gM,El),r}finally{un=e,b_=!1}}return null}var nf=[],rf=0,Nv=null,Dv=0,fs=[],hs=0,Bc=null,sa=1,oa="";function ec(t,e){nf[rf++]=Dv,nf[rf++]=Nv,Nv=t,Dv=e}function vI(t,e,n){fs[hs++]=sa,fs[hs++]=oa,fs[hs++]=Bc,Bc=t;var i=sa;t=oa;var r=32-Ws(i)-1;i&=~(1<<r),n+=1;var s=32-Ws(e)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,sa=1<<32-Ws(e)+r|n<<r|i,oa=s+t}else sa=1<<s|n<<r|i,oa=t}function EM(t){t.return!==null&&(ec(t,1),vI(t,1,0))}function TM(t){for(;t===Nv;)Nv=nf[--rf],nf[rf]=null,Dv=nf[--rf],nf[rf]=null;for(;t===Bc;)Bc=fs[--hs],fs[hs]=null,oa=fs[--hs],fs[hs]=null,sa=fs[--hs],fs[hs]=null}var Xr=null,Vr=null,Tn=!1,ks=null;function yI(t,e){var n=ds(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function CC(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Xr=t,Vr=sl(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Xr=t,Vr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Bc!==null?{id:sa,overflow:oa}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ds(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Xr=t,Vr=null,!0):!1;default:return!1}}function FS(t){return(t.mode&1)!==0&&(t.flags&128)===0}function OS(t){if(Tn){var e=Vr;if(e){var n=e;if(!CC(t,e)){if(FS(t))throw Error(Be(418));e=sl(n.nextSibling);var i=Xr;e&&CC(t,e)?yI(i,n):(t.flags=t.flags&-4097|2,Tn=!1,Xr=t)}}else{if(FS(t))throw Error(Be(418));t.flags=t.flags&-4097|2,Tn=!1,Xr=t}}}function RC(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Xr=t}function C0(t){if(t!==Xr)return!1;if(!Tn)return RC(t),Tn=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!LS(t.type,t.memoizedProps)),e&&(e=Vr)){if(FS(t))throw xI(),Error(Be(418));for(;e;)yI(t,e),e=sl(e.nextSibling)}if(RC(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Be(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 1,661 bytes, line 38
38){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Vr=sl(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Vr=null}}else Vr=Xr?sl(t.stateNode.nextSibling):null;return!0}function xI(){for(var t=Vr;t;)t=sl(t.nextSibling)}function Ff(){Vr=Xr=null,Tn=!1}function bM(t){ks===null?ks=[t]:ks.push(t)}var x7=wa.ReactCurrentBatchConfig;function zh(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Be(309));var i=n.stateNode}if(!i)throw Error(Be(147,t));var r=i,s=""+t;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 t!="string")throw Error(Be(284));if(!n._owner)throw Error(Be(290,t))}return t}function R0(t,e){throw t=Object.prototype.toString.call(e),Error(Be(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function PC(t){var e=t._init;return e(t._payload)}function _I(t){function e(g,_){if(t){var y=g.deletions;y===null?(g.deletions=[_],g.flags|=16):y.push(_)}}function n(g,_){if(!t)return null;for(;_!==null;)e(g,_),_=_.sibling;return null}function i(g,_){for(g=new Map;_!==null;)_.key!==null?g.set(_.key,_):g.set(_.index,_),_=_.sibling;return g}function r(g,_){return g=cl(g,_),g.index=0,g.sibling=null,g}function s(g,_,y){return g.index=y,t?(y=g.alternate,y!==null?(y=y.index,y<_?(g.flags|=2,_):y):(g.flags|=2,_)):(g.flags|=1048576,_)}function o(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,_,y,M){return _===null||_.tag!==6?(_=N_(y,g.mode,M),_.return=g,_):(_=r(_,y),_.return=g,_)}
vendor: 2,579 bytes, line 38
38function l(g,_,y,M){var E=y.type;return E===Qu?u(g,_,y.props.children,M,y.key):_!==null&&(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ja&&PC(E)===_.type)?(M=r(_,y.props),M.ref=zh(g,_,y),M.return=g,M):(M=$g(y.type,y.key,y.props,null,g.mode,M),M.ref=zh(g,_,y),M.return=g,M)}function c(g,_,y,M){return _===null||_.tag!==4||_.stateNode.containerInfo!==y.containerInfo||_.stateNode.implementation!==y.implementation?(_=D_(y,g.mode,M),_.return=g,_):(_=r(_,y.children||[]),_.return=g,_)}function u(g,_,y,M,E){return _===null||_.tag!==7?(_=Sc(y,g.mode,M,E),_.return=g,_):(_=r(_,y),_.return=g,_)}function f(g,_,y){if(typeof _=="string"&&_!==""||typeof _=="number")return _=N_(""+_,g.mode,y),_.return=g,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case y0:return y=$g(_.type,_.key,_.props,null,g.mode,y),y.ref=zh(g,null,_),y.return=g,y;case Yu:return _=D_(_,g.mode,y),_.return=g,_;case ja:var M=_._init;return f(g,M(_._payload),y)}if(cd(_)||Dh(_))return _=Sc(_,g.mode,y,null),_.return=g,_;R0(g,_)}return null}function p(g,_,y,M){var E=_!==null?_.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:a(g,_,""+y,M);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case y0:return y.key===E?l(g,_,y,M):null;case Yu:return y.key===E?c(g,_,y,M):null;case ja:return E=y._init,p(g,_,E(y._payload),M)}if(cd(y)||Dh(y))return E!==null?null:u(g,_,y,M,null);R0(g,y)}return null}function m(g,_,y,M,E){if(typeof M=="string"&&M!==""||typeof M=="number")return g=g.get(y)||null,a(_,g,""+M,E);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case y0:return g=g.get(M.key===null?y:M.key)||null,l(_,g,M,E);case Yu:return g=g.get(M.key===null?y:M.key)||null,c(_,g,M,E);case ja:var C=M._init;return m(g,_,y,C(M._payload),E)}if(cd(M)||Dh(M))return g=g.get(y)||null,u(_,g,M,E,null);R0(_,M)}return null}function v(g,_,y,M){for(var E=null,C=null,P=_,N=_=0,R=null;P!==null&&N<y.length;N++){P.index>N?(R=P,P=null):R=P.sibling;var L=p(g,P,y[N],M);if(L===null){P===null&&(P=R);break}t&&P&&L.alternate===null&&e(g,P),_=s(L,_,N),C===null?E=L:C.sibling=L,C=L,P=R}if(N===y.length)return n(g,P),Tn&&ec(g,N),E;if(P===null){for(;N<y.length;N++)P=f(g,y[N],M),P!==null&&(_=s(P,_,N),C===null?E=P:C.sibling=P,C=P);return Tn&&ec(g,N),E}for(P=i(g,P);N<y.length;N++)R=m(P,g,N,y[N],M),R!==null&&(t&&R.alternate!==null&&P.delete(R.key===null?N:R.key),_=s(R,_,N),C===null?E=R:C.sibling=R,C=R);return t&&P.forEach(function(k){return e(g,k)}),Tn&&ec(g,N),E}function w(g,_,y,M){var E=Dh(y);if(typeof E!="function")throw Error(Be(150));if(y=E.call(y),y==null)throw Error(Be(151));
vendor: 6,048 bytes, line 38
38for(var C=E=null,P=_,N=_=0,R=null,L=y.next();P!==null&&!L.done;N++,L=y.next()){P.index>N?(R=P,P=null):R=P.sibling;var k=p(g,P,L.value,M);if(k===null){P===null&&(P=R);break}t&&P&&k.alternate===null&&e(g,P),_=s(k,_,N),C===null?E=k:C.sibling=k,C=k,P=R}if(L.done)return n(g,P),Tn&&ec(g,N),E;if(P===null){for(;!L.done;N++,L=y.next())L=f(g,L.value,M),L!==null&&(_=s(L,_,N),C===null?E=L:C.sibling=L,C=L);return Tn&&ec(g,N),E}for(P=i(g,P);!L.done;N++,L=y.next())L=m(P,g,N,L.value,M),L!==null&&(t&&L.alternate!==null&&P.delete(L.key===null?N:L.key),_=s(L,_,N),C===null?E=L:C.sibling=L,C=L);return t&&P.forEach(function($){return e(g,$)}),Tn&&ec(g,N),E}function x(g,_,y,M){if(typeof y=="object"&&y!==null&&y.type===Qu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case y0:e:{for(var E=y.key,C=_;C!==null;){if(C.key===E){if(E=y.type,E===Qu){if(C.tag===7){n(g,C.sibling),_=r(C,y.props.children),_.return=g,g=_;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ja&&PC(E)===C.type){n(g,C.sibling),_=r(C,y.props),_.ref=zh(g,C,y),_.return=g,g=_;break e}n(g,C);break}else e(g,C);C=C.sibling}y.type===Qu?(_=Sc(y.props.children,g.mode,M,y.key),_.return=g,g=_):(M=$g(y.type,y.key,y.props,null,g.mode,M),M.ref=zh(g,_,y),M.return=g,g=M)}return o(g);case Yu:e:{for(C=y.key;_!==null;){if(_.key===C)if(_.tag===4&&_.stateNode.containerInfo===y.containerInfo&&_.stateNode.implementation===y.implementation){n(g,_.sibling),_=r(_,y.children||[]),_.return=g,g=_;break e}else{n(g,_);break}else e(g,_);_=_.sibling}_=D_(y,g.mode,M),_.return=g,g=_}return o(g);case ja:return C=y._init,x(g,_,C(y._payload),M)}if(cd(y))return v(g,_,y,M);if(Dh(y))return w(g,_,y,M);R0(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,_!==null&&_.tag===6?(n(g,_.sibling),_=r(_,y),_.return=g,g=_):(n(g,_),_=N_(y,g.mode,M),_.return=g,g=_),o(g)):n(g,_)}return x}var Of=_I(!0),SI=_I(!1),Fv=Ml(null),Ov=null,sf=null,CM=null;function RM(){CM=sf=Ov=null}function PM(t){var e=Fv.current;An(Fv),t._currentValue=e}function US(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Mf(t,e){Ov=t,CM=sf=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Tr=!0),t.firstContext=null)}function _s(t){var e=t._currentValue;if(CM!==t)if(t={context:t,memoizedValue:e,next:null},sf===null){if(Ov===null)throw Error(Be(308));sf=t,Ov.dependencies={lanes:0,firstContext:t}}else sf=sf.next=t;return e}var uc=null;function BM(t){uc===null?uc=[t]:uc.push(t)}function wI(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,BM(e)):(n.next=r.next,r.next=n),e.interleaved=n,pa(t,i)}function pa(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Wa=!1;function LM(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function AI(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ca(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ol(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,$t&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,pa(t,n)}return r=i.interleaved,r===null?(e.next=e,BM(i)):(e.next=r.next,r.next=e),i.interleaved=e,pa(t,n)}function Jg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,vM(t,n)}}function BC(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?r=s=e:s=s.next=e}else r=s=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Uv(t,e,n,i){var r=t.updateQueue;Wa=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=r.baseState;o=0,u=c=l=null,a=s;do{var p=a.lane,m=a.eventTime;if((i&p)===p){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,w=a;switch(p=e,m=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(m,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,p=typeof v=="function"?v.call(m,f,p):v,p==null)break e;f=Dn({},f,p);break e;case 2:Wa=!0}}a.callback!==null&&a.lane!==0&&(t.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},u===null?(c=u=m,l=f):u=u.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(u===null&&(l=f),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,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);Ic|=o,t.lanes=o,t.memoizedState=f}}function LC(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var i=t[e],r=i.callback;if(r!==null){if(i.callback=null,i=n,typeof r!="function")throw Error(Be(191,r));r.call(i)}}}var Yp={},Mo=Ml(Yp),rp=Ml(Yp),sp=Ml(Yp);function fc(t){if(t===Yp)throw Error(Be(174));return t}function IM(t,e){switch(_n(sp,e),_n(rp,t),_n(Mo,Yp),t=e.nodeType,t){case 9:case 11:e=(e
vendor: 6,854 bytes, line 38
38=e.documentElement)?e.namespaceURI:yS(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=yS(e,t)}An(Mo),_n(Mo,e)}function Uf(){An(Mo),An(rp),An(sp)}function MI(t){fc(sp.current);var e=fc(Mo.current),n=yS(e,t.type);e!==n&&(_n(rp,t),_n(Mo,n))}function NM(t){rp.current===t&&(An(Mo),An(rp))}var Pn=Ml(0);function kv(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var C_=[];function DM(){for(var t=0;t<C_.length;t++)C_[t]._workInProgressVersionPrimary=null;C_.length=0}var Kg=wa.ReactCurrentDispatcher,R_=wa.ReactCurrentBatchConfig,Lc=0,Nn=null,ai=null,xi=null,zv=!1,Cd=!1,op=0,_7=0;function ki(){throw Error(Be(321))}function FM(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Ys(t[n],e[n]))return!1;return!0}function OM(t,e,n,i,r,s){if(Lc=s,Nn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Kg.current=t===null||t.memoizedState===null?M7:E7,t=n(i,r),Cd){s=0;do{if(Cd=!1,op=0,25<=s)throw Error(Be(301));s+=1,xi=ai=null,e.updateQueue=null,Kg.current=T7,t=n(i,r)}while(Cd)}if(Kg.current=Hv,e=ai!==null&&ai.next!==null,Lc=0,xi=ai=Nn=null,zv=!1,e)throw Error(Be(300));return t}function UM(){var t=op!==0;return op=0,t}function mo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xi===null?Nn.memoizedState=xi=t:xi=xi.next=t,xi}function Ss(){if(ai===null){var t=Nn.alternate;t=t!==null?t.memoizedState:null}else t=ai.next;var e=xi===null?Nn.memoizedState:xi.next;if(e!==null)xi=e,ai=t;else{if(t===null)throw Error(Be(310));ai=t,t={memoizedState:ai.memoizedState,baseState:ai.baseState,baseQueue:ai.baseQueue,queue:ai.queue,next:null},xi===null?Nn.memoizedState=xi=t:xi=xi.next=t}return xi}function ap(t,e){return typeof e=="function"?e(t):e}function P_(t){var e=Ss(),n=e.queue;if(n===null)throw Error(Be(311));n.lastRenderedReducer=t;var i=ai,r=i.baseQueue,s=n.pending;if(s!==null){if(r!==null){var o=r.next;r.next=s.next,s.next=o}i.baseQueue=r=s,n.pending=null}if(r!==null){s=r.next,i=i.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if((Lc&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:t(i,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=i):l=l.next=f,Nn.lanes|=u,Ic|=u}c=c.next}while(c!==null&&c!==s);l===null?o=i:l.next=a,Ys(i,e.memoizedState)||(Tr=!0),e.memoizedState=i,e.baseState=o,e.baseQueue=l,n.lastRenderedState=i}if(t=n.interleaved,t!==null){r=t;do s=r.lane,Nn.lanes|=s,Ic|=s,r=r.next;while(r!==t)}else r===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function B_(t){var e=Ss(),n=e.queue;if(n===null)throw Error(Be(311));n.lastRenderedReducer=t;var i=n.dispatch,r=n.pending,s=e.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do s=t(s,o.action),o=o.next;while(o!==r);Ys(s,e.memoizedState)||(Tr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,i]}function EI(){}function TI(t,e){var n=Nn,i=Ss(),r=e(),s=!Ys(i.memoizedState,r);if(s&&(i.memoizedState=r,Tr=!0),i=i.queue,kM(RI.bind(null,n,i,t),[t]),i.getSnapshot!==e||s||xi!==null&&xi.memoizedState.tag&1){if(n.flags|=2048,lp(9,CI.bind(null,n,i,r,e),void 0,null),_i===null)throw Error(Be(349));Lc&30||bI(n,e,r)}return r}function bI(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Nn.updateQueue,e===null?(e={lastEffect:null,stores:null},Nn.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function CI(t,e,n,i){e.value=n,e.getSnapshot=i,PI(e)&&BI(t)}function RI(t,e,n){return n(function(){PI(e)&&BI(t)})}function PI(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Ys(t,n)}catch{return!0}}function BI(t){var e=pa(t,1);e!==null&&Xs(e,t,1,-1)}function IC(t){var e=mo();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ap,lastRenderedState:t},e.queue=t,t=t.dispatch=A7.bind(null,Nn,t),[e.memoizedState,t]}function lp(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},e=Nn.updateQueue,e===null?(e={lastEffect:null,stores:null},Nn.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t)),t}function LI(){return Ss().memoizedState}function Yg(t,e,n,i){var r=mo();Nn.flags|=t,r.memoizedState=lp(1|e,n,void 0,i===void 0?null:i)}function ty(t,e,n,i){var r=Ss();i=i===void 0?null:i;var s=void 0;if(ai!==null){var o=ai.memoizedState;if(s=o.destroy,i!==null&&FM(i,o.deps)){r.memoizedState=lp(e,n,s,i);return}}Nn.flags|=t,r.memoizedState=lp(1|e,n,s,i)}function NC(t,e){return Yg(8390656,8,t,e)}function kM(t,e){return ty(2048,8,t,e)}function II(t,e){return ty(4,2,t,e)}function NI(t,e){return ty(4,4,t,e)}function DI(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function FI(t,e,n){return n=n!=null?n.concat([t]):null,ty(4,4,DI.bind(null,e,t),n)}function zM(){}function OI(t,e){var n=Ss();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&FM(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function UI(t,e){var n=Ss();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&FM(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function kI(t,e,n){return Lc&21?(Ys(n,e)||(n=jL(),Nn.lanes|=n,Ic|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Tr=!0),t.memoizedState=n)}function S7(t,e){var n=un;un=n!==0&&4>n?n:4,t(!0);var i=R_.transition;R_.transition={};try{t(!1),e()}finally{un=n,R_.transition=i}}function zI(){return Ss().memoizedState}function w7(t,e,n){var i=ll(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},HI(t))GI(e,n);else if(n=wI(t,e,n,i),n!==null){var r=ur();Xs(n,t,i,r),VI(n,e,i)}}function A7(t,e,n){var i=ll(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(HI(t))GI(e,r);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,Ys(a,o)){var l=e.interleaved;l===null?(r.next=r,BM(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=wI(t,e,r,i),n!==null&&(r=ur(),Xs(n,t,i,r),VI(n,e,i))}}function HI(t){var e=t.alternate;return t===Nn||e!==null&&e===Nn}function GI(t,e){Cd=zv=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function VI(t,e,n){if(n&4194240){var i=e.lanes;
vendor: 8,472 bytes, lines 38-40
38i&=t.pendingLanes,n|=i,e.lanes=n,vM(t,n)}}var Hv={readContext:_s,useCallback:ki,useContext:ki,useEffect:ki,useImperativeHandle:ki,useInsertionEffect:ki,useLayoutEffect:ki,useMemo:ki,useReducer:ki,useRef:ki,useState:ki,useDebugValue:ki,useDeferredValue:ki,useTransition:ki,useMutableSource:ki,useSyncExternalStore:ki,useId:ki,unstable_isNewReconciler:!1},M7={readContext:_s,useCallback:function(t,e){return mo().memoizedState=[t,e===void 0?null:e],t},useContext:_s,useEffect:NC,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Yg(4194308,4,DI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Yg(4194308,4,t,e)},useInsertionEffect:function(t,e){return Yg(4,2,t,e)},useMemo:function(t,e){var n=mo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=mo();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=w7.bind(null,Nn,t),[i.memoizedState,t]},useRef:function(t){var e=mo();return t={current:t},e.memoizedState=t},useState:IC,useDebugValue:zM,useDeferredValue:function(t){return mo().memoizedState=t},useTransition:function(){var t=IC(!1),e=t[0];return t=S7.bind(null,t[1]),mo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=Nn,r=mo();if(Tn){if(n===void 0)throw Error(Be(407));n=n()}else{if(n=e(),_i===null)throw Error(Be(349));Lc&30||bI(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,NC(RI.bind(null,i,s,t),[t]),i.flags|=2048,lp(9,CI.bind(null,i,s,n,e),void 0,null),n},useId:function(){var t=mo(),e=_i.identifierPrefix;if(Tn){var n=oa,i=sa;n=(i&~(1<<32-Ws(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=op++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=_7++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},E7={readContext:_s,useCallback:OI,useContext:_s,useEffect:kM,useImperativeHandle:FI,useInsertionEffect:II,useLayoutEffect:NI,useMemo:UI,useReducer:P_,useRef:LI,useState:function(){return P_(ap)},useDebugValue:zM,useDeferredValue:function(t){var e=Ss();return kI(e,ai.memoizedState,t)},useTransition:function(){var t=P_(ap)[0],e=Ss().memoizedState;return[t,e]},useMutableSource:EI,useSyncExternalStore:TI,useId:zI,unstable_isNewReconciler:!1},T7={readContext:_s,useCallback:OI,useContext:_s,useEffect:kM,useImperativeHandle:FI,useInsertionEffect:II,useLayoutEffect:NI,useMemo:UI,useReducer:B_,useRef:LI,useState:function(){return B_(ap)},useDebugValue:zM,useDeferredValue:function(t){var e=Ss();return ai===null?e.memoizedState=t:kI(e,ai.memoizedState,t)},useTransition:function(){var t=B_(ap)[0],e=Ss().memoizedState;return[t,e]},useMutableSource:EI,useSyncExternalStore:TI,useId:zI,unstable_isNewReconciler:!1};function Fs(t,e){if(t&&t.defaultProps){e=Dn({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function kS(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:Dn({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var ny={isMounted:function(t){return(t=t._reactInternals)?Qc(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=ur(),r=ll(t),s=ca(i,r);s.payload=e,n!=null&&(s.callback=n),e=ol(t,s,r),e!==null&&(Xs(e,t,r,i),Jg(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=ur(),r=ll(t),s=ca(i,r);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=ol(t,s,r),e!==null&&(Xs(e,t,r,i),Jg(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=ur(),i=ll(t),r=ca(n,i);r.tag=2,e!=null&&(r.callback=e),e=ol(t,r,i),e!==null&&(Xs(e,t,i,n),Jg(e,t,i))}};function DC(t,e,n,i,r,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,s,o):e.prototype&&e.prototype.isPureReactComponent?!ep(n,i)||!ep(r,s):!0}function jI(t,e,n){var i=!1,r=ml,s=e.contextType;return typeof s=="object"&&s!==null?s=_s(s):(r=Cr(e)?Pc:Ki.current,i=e.contextTypes,s=(i=i!=null)?Df(t,r):ml),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=ny,t.stateNode=e,e._reactInternals=t,i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function FC(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&ny.enqueueReplaceState(e,e.state,null)}function zS(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},LM(t);var s=e.contextType;typeof s=="object"&&s!==null?r.context=_s(s):(s=Cr(e)?Pc:Ki.current,r.context=Df(t,s)),r.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(kS(t,e,s,n),r.state=t.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&&ny.enqueueReplaceState(r,r.state,null),Uv(t,n,r,i),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308)}function kf(t,e){try{var n="",i=e;do n+=ek(i),i=i.return;while(i);var r=n}catch(s){r=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:t,source:e,stack:r,digest:null}}function L_(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function HS(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var b7=typeof WeakMap=="function"?WeakMap:Map;function WI(t,e,n){n=ca(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){Vv||(Vv=!0,ZS=i),HS(t,e)},n}function XI(t,e,n){n=ca(-1,n),n.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){HS(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){HS(t,e),typeof i!="function"&&(al===null?al=new Set([this]):al.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function OC(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new b7;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=H7.bind(null,t,e,n),e.then(t,t))}function UC(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function kC(t,e,n,i,r){return t.mode&1?(t.flags|=65536,t.lanes=r,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ca(-1,1),e.tag=2,ol(n,e,1))),n.lanes|=1),t)}var C7=wa.ReactCurrentOwner,Tr=!1;function ir(t,e,n,i){e.child=t===null?SI(e,null,n,i):Of(e,t.child,n,i)}function zC(t,e,n,i,r){n=n.render;var s=e.ref;return Mf(e,r),i=OM(t,e,n,i,s,r),n=UM(),t!==null&&!Tr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,ma(t,e,r)):(Tn&&n&&EM(e),e.flags|=1,ir(t,e,i,r),e.child)}function HC(t,e,n,i,r){if(t===null){var s=n.type;return typeof s=="function"&&!KM(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,JI(t,e,s,i,r)):(t=$g(n.type,null,i,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&r)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ep,n(o,i)&&t.ref===e.ref)return ma(t,e,r)}return e.flags|=1,t=cl(s,i),t.ref=e.ref,t.return=e,e.child=t}function JI(t,e,n,i,r){if(t!==null){var s=t.memoizedProps;if(ep(s,i)&&t.ref===e.ref)if(Tr=!1,e.pendingProps=i=s,(t.lanes&r)!==0)t.flags&131072&&(Tr=!0);else return e.lanes=t.lanes,ma(t,e,r)}return GS(t,e,n,i,r)}function KI(t,e,n){var i=e.pendingProps,r=i.children,s=t!==null?t.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},_n(af,kr),kr|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,_n(af,kr),kr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:n,_n(af,kr),kr|=i}else s!==null?(i=s.baseLanes|n,e.memoizedState=null):i=n,_n(af,kr),kr|=i;return ir(t,e,r,n),e.child}function YI(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 8,024 bytes, line 40
40function GS(t,e,n,i,r){var s=Cr(n)?Pc:Ki.current;return s=Df(e,s),Mf(e,r),n=OM(t,e,n,i,s,r),i=UM(),t!==null&&!Tr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,ma(t,e,r)):(Tn&&i&&EM(e),e.flags|=1,ir(t,e,n,r),e.child)}function GC(t,e,n,i,r){if(Cr(n)){var s=!0;Iv(e)}else s=!1;if(Mf(e,r),e.stateNode===null)Qg(t,e),jI(e,n,i),zS(e,n,i,r),i=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=_s(c):(c=Cr(n)?Pc:Ki.current,c=Df(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==c)&&FC(e,o,i,c),Wa=!1;var p=e.memoizedState;o.state=p,Uv(e,i,o,r),l=e.memoizedState,a!==i||p!==l||br.current||Wa?(typeof u=="function"&&(kS(e,n,u,i),l=e.memoizedState),(a=Wa||DC(e,n,a,i,p,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,AI(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Fs(e.type,a),o.props=c,f=e.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=_s(l):(l=Cr(n)?Pc:Ki.current,l=Df(e,l));var m=n.getDerivedStateFromProps;(u=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||p!==l)&&FC(e,o,i,l),Wa=!1,p=e.memoizedState,o.state=p,Uv(e,i,o,r);var v=e.memoizedState;a!==f||p!==v||br.current||Wa?(typeof m=="function"&&(kS(e,n,m,i),v=e.memoizedState),(c=Wa||DC(e,n,c,i,p,v,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=v),o.props=i,o.state=v,o.context=l,i=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),i=!1)}return VS(t,e,n,i,s,r)}function VS(t,e,n,i,r,s){YI(t,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&bC(e,n,!1),ma(t,e,s);i=e.stateNode,C7.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&o?(e.child=Of(e,t.child,null,s),e.child=Of(e,null,a,s)):ir(t,e,a,s),e.memoizedState=i.state,r&&bC(e,n,!0),e.child}function QI(t){var e=t.stateNode;e.pendingContext?TC(t,e.pendingContext,e.pendingContext!==e.context):e.context&&TC(t,e.context,!1),IM(t,e.containerInfo)}function VC(t,e,n,i,r){return Ff(),bM(r),e.flags|=256,ir(t,e,n,i),e.child}var jS={dehydrated:null,treeContext:null,retryLane:0};function WS(t){return{baseLanes:t,cachePool:null,transitions:null}}function ZI(t,e,n){var i=e.pendingProps,r=Pn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(r|=1),_n(Pn,r&1),t===null)return OS(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,t=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=sy(o,i,0,null),t=Sc(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=WS(n),e.memoizedState=jS,t):HM(e,o));if(r=t.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return R7(t,e,o,i,a,r,n);if(s){s=i.fallback,o=e.mode,r=t.child,a=r.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=l,e.deletions=null):(i=cl(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=cl(a,s):(s=Sc(s,o,n,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=t.child.memoizedState,o=o===null?WS(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=jS,i}return s=t.child,t=s.sibling,i=cl(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=n),i.return=e,i.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function HM(t,e){return e=sy({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function P0(t,e,n,i){return i!==null&&bM(i),Of(e,t.child,null,n),t=HM(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function R7(t,e,n,i,r,s,o){if(n)return e.flags&256?(e.flags&=-257,i=L_(Error(Be(422))),P0(t,e,o,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=sy({mode:"visible",children:i.children},r,0,null),s=Sc(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Of(e,t.child,null,o),e.child.memoizedState=WS(o),e.memoizedState=jS,s);if(!(e.mode&1))return P0(t,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(Be(419)),i=L_(s,i,void 0),P0(t,e,o,i)}if(a=(o&t.childLanes)!==0,Tr||a){if(i=_i,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,pa(t,r),Xs(i,t,r,-1))}return JM(),i=L_(Error(Be(421))),P0(t,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=G7.bind(null,t),r._reactRetry=e,null):(t=s.treeContext,Vr=sl(r.nextSibling),Xr=e,Tn=!0,ks=null,t!==null&&(fs[hs++]=sa,fs[hs++]=oa,fs[hs++]=Bc,sa=t.id,oa=t.overflow,Bc=e),e=HM(e,i.children),e.flags|=4096,e)}function jC(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),US(t.return,e,n)}function I_(t,e,n,i,r){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function qI(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(ir(t,e,i.children,n),i=Pn.current,i&2)i=i&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&jC(t,n,e);else if(t.tag===19)jC(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(_n(Pn,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&kv(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),I_(e,!1,r,n,s);break;case"backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&kv(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}I_(e,!0,n,null,s);break;case"together":I_(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Qg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 4,905 bytes, line 40
40function ma(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ic|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Be(153));if(e.child!==null){for(t=e.child,n=cl(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=cl(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function P7(t,e,n){switch(e.tag){case 3:QI(e),Ff();break;case 5:MI(e);break;case 1:Cr(e.type)&&Iv(e);break;case 4:IM(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;_n(Fv,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(_n(Pn,Pn.current&1),e.flags|=128,null):n&e.child.childLanes?ZI(t,e,n):(_n(Pn,Pn.current&1),t=ma(t,e,n),t!==null?t.sibling:null);_n(Pn,Pn.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return qI(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),_n(Pn,Pn.current),i)break;return null;case 22:case 23:return e.lanes=0,KI(t,e,n)}return ma(t,e,n)}var $I,XS,eN,tN;$I=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};XS=function(){};eN=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,fc(Mo.current);var s=null;switch(n){case"input":r=pS(t,r),i=pS(t,i),s=[];break;case"select":r=Dn({},r,{value:void 0}),i=Dn({},i,{value:void 0}),s=[];break;case"textarea":r=vS(t,r),i=vS(t,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=Bv)}xS(n,i);var o;n=null;for(c in r)if(!i.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var a=r[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Jd.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in i){var l=i[c];if(a=r!=null?r[c]:void 0,i.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Jd.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&wn("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};tN=function(t,e,n,i){n!==i&&(e.flags|=4)};function Hh(t,e){if(!Tn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function zi(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function B7(t,e,n){var i=e.pendingProps;switch(TM(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zi(e),null;case 1:return Cr(e.type)&&Lv(),zi(e),null;case 3:return i=e.stateNode,Uf(),An(br),An(Ki),DM(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(C0(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,ks!==null&&(ew(ks),ks=null))),XS(t,e),zi(e),null;case 5:NM(e);var r=fc(sp.current);if(n=e.type,t!==null&&e.stateNode!=null)eN(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(Be(166));return zi(e),null}if(t=fc(Mo.current),C0(e)){i=e.stateNode,n=e.type;var s=e.memoizedProps;switch(i[vo]=e,i[ip]=s,t=(e.mode&1)!==0,n){case"dialog":wn("cancel",i),wn("close",i);break;case"iframe":case"object":case"embed":wn("load",i);break;case"video":case"audio":for(r=0;r<fd.length;r++)wn(fd[r],i);break;case"source":wn("error",i);break;case"img":case"image":case"link":wn("error",i),wn("load",i);break;case"details":wn("toggle",i);break;case"input":$b(i,s),wn("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},wn("invalid",i);break;case"textarea":tC(i,s),wn("invalid",i)}xS(n,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];
vendor: 15,670 bytes, line 40
40o==="children"?typeof a=="string"?i.textContent!==a&&(s.suppressHydrationWarning!==!0&&b0(i.textContent,a,t),r=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&b0(i.textContent,a,t),r=["children",""+a]):Jd.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&wn("scroll",i)}switch(n){case"input":x0(i),eC(i,s,!0);break;case"textarea":x0(i),nC(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=Bv)}i=r,e.updateQueue=i,i!==null&&(e.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=RL(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=o.createElement(n,{is:i.is}):(t=o.createElement(n),n==="select"&&(o=t,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):t=o.createElementNS(t,n),t[vo]=e,t[ip]=i,$I(t,e,!1,!1),e.stateNode=t;e:{switch(o=_S(n,i),n){case"dialog":wn("cancel",t),wn("close",t),r=i;break;case"iframe":case"object":case"embed":wn("load",t),r=i;break;case"video":case"audio":for(r=0;r<fd.length;r++)wn(fd[r],t);r=i;break;case"source":wn("error",t),r=i;break;case"img":case"image":case"link":wn("error",t),wn("load",t),r=i;break;case"details":wn("toggle",t),r=i;break;case"input":$b(t,i),r=pS(t,i),wn("invalid",t);break;case"option":r=i;break;case"select":t._wrapperState={wasMultiple:!!i.multiple},r=Dn({},i,{value:void 0}),wn("invalid",t);break;case"textarea":tC(t,i),r=vS(t,i),wn("invalid",t);break;default:r=i}xS(n,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?LL(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&PL(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Kd(t,l):typeof l=="number"&&Kd(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Jd.hasOwnProperty(s)?l!=null&&s==="onScroll"&&wn("scroll",t):l!=null&&fM(t,s,l,o))}switch(n){case"input":x0(t),eC(t,i,!1);break;case"textarea":x0(t),nC(t);break;case"option":i.value!=null&&t.setAttribute("value",""+pl(i.value));break;case"select":t.multiple=!!i.multiple,s=i.value,s!=null?_f(t,!!i.multiple,s,!1):i.defaultValue!=null&&_f(t,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(t.onclick=Bv)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return zi(e),null;case 6:if(t&&e.stateNode!=null)tN(t,e,t.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(Be(166));if(n=fc(sp.current),fc(Mo.current),C0(e)){if(i=e.stateNode,n=e.memoizedProps,i[vo]=e,(s=i.nodeValue!==n)&&(t=Xr,t!==null))switch(t.tag){case 3:b0(i.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&b0(i.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[vo]=e,e.stateNode=i}return zi(e),null;case 13:if(An(Pn),i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Tn&&Vr!==null&&e.mode&1&&!(e.flags&128))xI(),Ff(),e.flags|=98560,s=!1;else if(s=C0(e),i!==null&&i.dehydrated!==null){if(t===null){if(!s)throw Error(Be(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Be(317));s[vo]=e}else Ff(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;zi(e),s=!1}else ks!==null&&(ew(ks),ks=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(i=i!==null,i!==(t!==null&&t.memoizedState!==null)&&i&&(e.child.flags|=8192,e.mode&1&&(t===null||Pn.current&1?li===0&&(li=3):JM())),e.updateQueue!==null&&(e.flags|=4),zi(e),null);case 4:return Uf(),XS(t,e),t===null&&tp(e.stateNode.containerInfo),zi(e),null;case 10:return PM(e.type._context),zi(e),null;case 17:return Cr(e.type)&&Lv(),zi(e),null;case 19:if(An(Pn),s=e.memoizedState,s===null)return zi(e),null;if(i=(e.flags&128)!==0,o=s.rendering,o===null)if(i)Hh(s,!1);else{if(li!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=kv(t),o!==null){for(e.flags|=128,Hh(s,!1),i=o.updateQueue,i!==null&&(e.updateQueue=i,e.flags|=4),e.subtreeFlags=0,i=n,n=e.child;n!==null;)s=n,t=i,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,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,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return _n(Pn,Pn.current&1|2),e.child}t=t.sibling}s.tail!==null&&Jn()>zf&&(e.flags|=128,i=!0,Hh(s,!1),e.lanes=4194304)}else{if(!i)if(t=kv(o),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Hh(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Tn)return zi(e),null}else 2*Jn()-s.renderingStartTime>zf&&n!==1073741824&&(e.flags|=128,i=!0,Hh(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Jn(),e.sibling=null,n=Pn.current,_n(Pn,i?n&1|2:n&1),e):(zi(e),null);case 22:case 23:return XM(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?kr&1073741824&&(zi(e),e.subtreeFlags&6&&(e.flags|=8192)):zi(e),null;case 24:return null;case 25:return null}throw Error(Be(156,e.tag))}function L7(t,e){switch(TM(e),e.tag){case 1:return Cr(e.type)&&Lv(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Uf(),An(br),An(Ki),DM(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return NM(e),null;case 13:if(An(Pn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Be(340));Ff()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return An(Pn),null;case 4:return Uf(),null;case 10:return PM(e.type._context),null;case 22:case 23:return XM(),null;case 24:return null;default:return null}}var B0=!1,Vi=!1,I7=typeof WeakSet=="function"?WeakSet:Set,nt=null;function of(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Gn(t,e,i)}else n.current=null}function JS(t,e,n){try{n()}catch(i){Gn(t,e,i)}}var WC=!1;function N7(t,e){if(PS=Cv,t=oI(),MM(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,f=t,p=null;t:for(;;){for(var m;f!==n||r!==0&&f.nodeType!==3||(a=o+r),f!==s||i!==0&&f.nodeType!==3||(l=o+i),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===t)break t;if(p===n&&++c===r&&(a=o),p===s&&++u===i&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(BS={focusedElem:t,selectionRange:n},Cv=!1,nt=e;nt!==null;)if(e=nt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,nt=t;else for(;nt!==null;){e=nt;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,x=v.memoizedState,g=e.stateNode,_=g.getSnapshotBeforeUpdate(e.elementType===e.type?w:Fs(e.type,w),x);g.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Be(163))}}catch(M){Gn(e,e.return,M)}if(t=e.sibling,t!==null){t.return=e.return,nt=t;break}nt=e.return}return v=WC,WC=!1,v}function Rd(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,s!==void 0&&JS(e,n,s)}r=r.next}while(r!==i)}}function iy(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function KS(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function nN(t){var e=t.alternate;e!==null&&(t.alternate=null,nN(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[vo],delete e[ip],delete e[NS],delete e[g7],delete e[v7])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function iN(t){return t.tag===5||t.tag===3||t.tag===4}function XC(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||iN(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function YS(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Bv));else if(i!==4&&(t=t.child,t!==null))for(YS(t,e,n),t=t.sibling;t!==null;)YS(t,e,n),t=t.sibling}function QS(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(QS(t,e,n),t=t.sibling;t!==null;)QS(t,e,n),t=t.sibling}var Ei=null,Us=!1;function Ia(t,e,n){for(n=n.child;n!==null;)rN(t,e,n),n=n.sibling}function rN(t,e,n){if(Ao&&typeof Ao.onCommitFiberUnmount=="function")try{Ao.onCommitFiberUnmount(Y1,n)}catch{}switch(n.tag){case 5:Vi||of(n,e);case 6:var i=Ei,r=Us;Ei=null,Ia(t,e,n),Ei=i,Us=r,Ei!==null&&(Us?(t=Ei,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ei.removeChild(n.stateNode));break;case 18:Ei!==null&&(Us?(t=Ei,n=n.stateNode,t.nodeType===8?T_(t.parentNode,n):t.nodeType===1&&T_(t,n),qd(t)):T_(Ei,n.stateNode));break;case 4:i=Ei,r=Us,Ei=n.stateNode.containerInfo,Us=!0,Ia(t,e,n),Ei=i,Us=r;break;case 0:case 11:case 14:case 15:if(!Vi&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&JS(n,e,o),r=r.next}while(r!==i)}Ia(t,e,n);break;case 1:if(!Vi&&(of(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){Gn(n,e,a)}Ia(t,e,n);break;case 21:Ia(t,e,n);break;case 22:n.mode&1?(Vi=(i=Vi)||n.memoizedState!==null,Ia(t,e,n),Vi=i):Ia(t,e,n);break;default:Ia(t,e,n)}}function JC(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new I7),e.forEach(function(i){var r=V7.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function Bs(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ei=a.stateNode,Us=!1;break e;case 3:Ei=a.stateNode.containerInfo,Us=!0;break e;case 4:Ei=a.stateNode.containerInfo,Us=!0;break e}a=a.return}if(Ei===null)throw Error(Be(160));rN(s,o,r),Ei=null,Us=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(c){Gn(r,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)sN(e,t),e=e.sibling}function sN(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Bs(e,t),po(t),i&4){try{Rd(3,t,t.return),iy(3,t)}catch(w){Gn(t,t.return,w)}try{Rd(5,t,t.return)}catch(w){Gn(t,t.return,w)}}break;case 1:Bs(e,t),po(t),i&512&&n!==null&&of(n,n.return);break;case 5:if(Bs(e,t),po(t),i&512&&n!==null&&of(n,n.return),t.flags&32){var r=t.stateNode;try{Kd(r,"")}catch(w){Gn(t,t.return,w)}}if(i&4&&(r=t.stateNode,r!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&bL(r,s),_S(a,o);var c=_S(a,s);for(o=0;o<l.length;o+=2){var u=l[o],f=l[o+1];u==="style"?LL(r,f):u==="dangerouslySetInnerHTML"?PL(r,f):u==="children"?Kd(r,f):fM(r,u,f,c)}switch(a){case"input":mS(r,s);break;case"textarea":CL(r,s);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?_f(r,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?_f(r,!!s.multiple,s.defaultValue,!0):_f(r,!!s.multiple,s.multiple?[]:"",!1))}r[ip]=s}catch(w){Gn(t,t.return,w)}}break;case 6:if(Bs(e,t),po(t),i&4){if(t.stateNode===null)throw Error(Be(162));r=t.stateNode,s=t.memoizedProps;try{r.nodeValue=s}catch(w){Gn(t,t.return,w)}}break;case 3:if(Bs(e,t),po(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{qd(e.containerInfo)}catch(w){Gn(t,t.return,w)}break;case 4:Bs(e,t),po(t);break;case 13:Bs(e,t),po(t),r=t.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(jM=Jn())),i&4&&JC(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Vi=(c=Vi)||u,Bs(e,t),Vi=c):Bs(e,t),po(t),i&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(nt=t,u=t.child;u!==null;){for(f=nt=u;nt!==null;){switch(p=nt,m=p.child,p.tag){case 0:case 11:case 14:case 15:Rd(4,p,p.return);break;case 1:of(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){i=p,n=p.return;try{e=i,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(w){Gn(i,n,w)}}break;case 5:of(p,p.return);break;case 22:if(p.memoizedState!==null){YC(f);continue}}m!==null?(m.return=p,nt=m):YC(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{r=f.stateNode,c?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=BL("display",o))}catch(w){Gn(t,t.return,w)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(w){Gn(t,t.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Bs(e,t),po(t),i&4&&JC(t);break;case 21:break;default:Bs(e,t),po(t)}}function po(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(iN(n)){var i=n;break e}n=n.return}throw Error(Be(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(Kd(r,""),i.flags&=-33);var s=XC(t);QS(t,s,r);break;case 3:case 4:var o=i.stateNode.containerInfo,a=XC(t);YS(t,a,o);break;default:throw Error(Be(161))}}catch(l){Gn(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function D7(t,e,n){nt=t,oN(t)}function oN(t,e,n){for(var i=(t.mode&1)!==0;nt!==null;){var r=nt,s=r.child;if(r.tag===22&&i){var o=r.memoizedState!==null||B0;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||Vi;a=B0;var c=Vi;if(B0=o,(Vi=l)&&!c)for(nt=r;nt!==null;)o=nt,l=o.child,o.tag===22&&o.memoizedState!==null?QC(r):l!==null?(l.return=o,nt=l):QC(r);for(;s!==null;)nt=s,oN(s),s=s.sibling;nt=r,B0=a,Vi=c}KC(t)}else r.subtreeFlags&8772&&s!==null?(s.return=r,nt=s):KC(t)}}function KC(t){for(;nt!==null;){var e=nt;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Vi||iy(5,e);break;case 1:var i=e.stateNode;
vendor: 12,242 bytes, line 40
40if(e.flags&4&&!Vi)if(n===null)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:Fs(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&LC(e,s,i);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}LC(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&qd(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Be(163))}Vi||e.flags&512&&KS(e)}catch(p){Gn(e,e.return,p)}}if(e===t){nt=null;break}if(n=e.sibling,n!==null){n.return=e.return,nt=n;break}nt=e.return}}function YC(t){for(;nt!==null;){var e=nt;if(e===t){nt=null;break}var n=e.sibling;if(n!==null){n.return=e.return,nt=n;break}nt=e.return}}function QC(t){for(;nt!==null;){var e=nt;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{iy(4,e)}catch(l){Gn(e,n,l)}break;case 1:var i=e.stateNode;if(typeof i.componentDidMount=="function"){var r=e.return;try{i.componentDidMount()}catch(l){Gn(e,r,l)}}var s=e.return;try{KS(e)}catch(l){Gn(e,s,l)}break;case 5:var o=e.return;try{KS(e)}catch(l){Gn(e,o,l)}}}catch(l){Gn(e,e.return,l)}if(e===t){nt=null;break}var a=e.sibling;if(a!==null){a.return=e.return,nt=a;break}nt=e.return}}var F7=Math.ceil,Gv=wa.ReactCurrentDispatcher,GM=wa.ReactCurrentOwner,gs=wa.ReactCurrentBatchConfig,$t=0,_i=null,ti=null,Ri=0,kr=0,af=Ml(0),li=0,cp=null,Ic=0,ry=0,VM=0,Pd=null,Sr=null,jM=0,zf=1/0,qo=null,Vv=!1,ZS=null,al=null,L0=!1,qa=null,jv=0,Bd=0,qS=null,Zg=-1,qg=0;function ur(){return $t&6?Jn():Zg!==-1?Zg:Zg=Jn()}function ll(t){return t.mode&1?$t&2&&Ri!==0?Ri&-Ri:x7.transition!==null?(qg===0&&(qg=jL()),qg):(t=un,t!==0||(t=window.event,t=t===void 0?16:ZL(t.type)),t):1}function Xs(t,e,n,i){if(50<Bd)throw Bd=0,qS=null,Error(Be(185));Xp(t,n,i),(!($t&2)||t!==_i)&&(t===_i&&(!($t&2)&&(ry|=n),li===4&&Ya(t,Ri)),Rr(t,i),n===1&&$t===0&&!(e.mode&1)&&(zf=Jn()+500,ey&&El()))}function Rr(t,e){var n=t.callbackNode;xk(t,e);var i=bv(t,t===_i?Ri:0);if(i===0)n!==null&&sC(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(n!=null&&sC(n),e===1)t.tag===0?y7(ZC.bind(null,t)):gI(ZC.bind(null,t)),p7(function(){!($t&6)&&El()}),n=null;else{switch(WL(i)){case 1:n=gM;break;case 4:n=GL;break;case 16:n=Tv;break;case 536870912:n=VL;break;default:n=Tv}n=pN(n,aN.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function aN(t,e){if(Zg=-1,qg=0,$t&6)throw Error(Be(327));var n=t.callbackNode;if(Ef()&&t.callbackNode!==n)return null;var i=bv(t,t===_i?Ri:0);if(i===0)return null;if(i&30||i&t.expiredLanes||e)e=Wv(t,i);else{e=i;var r=$t;$t|=2;var s=cN();(_i!==t||Ri!==e)&&(qo=null,zf=Jn()+500,_c(t,e));do try{k7();break}catch(a){lN(t,a)}while(1);RM(),Gv.current=s,$t=r,ti!==null?e=0:(_i=null,Ri=0,e=li)}if(e!==0){if(e===2&&(r=ES(t),r!==0&&(i=r,e=$S(t,r))),e===1)throw n=cp,_c(t,0),Ya(t,i),Rr(t,Jn()),n;if(e===6)Ya(t,i);else{if(r=t.current.alternate,!(i&30)&&!O7(r)&&(e=Wv(t,i),e===2&&(s=ES(t),s!==0&&(i=s,e=$S(t,s))),e===1))throw n=cp,_c(t,0),Ya(t,i),Rr(t,Jn()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(Be(345));case 2:tc(t,Sr,qo);break;case 3:if(Ya(t,i),(i&130023424)===i&&(e=jM+500-Jn(),10<e)){if(bv(t,0)!==0)break;if(r=t.suspendedLanes,(r&i)!==i){ur(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=IS(tc.bind(null,t,Sr,qo),e);break}tc(t,Sr,qo);break;case 4:if(Ya(t,i),(i&4194240)===i)break;for(e=t.eventTimes,r=-1;0<i;){var o=31-Ws(i);s=1<<o,o=e[o],o>r&&(r=o),i&=~s}if(i=r,i=Jn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*F7(i/1960))-i,10<i){t.timeoutHandle=IS(tc.bind(null,t,Sr,qo),i);break}tc(t,Sr,qo);break;case 5:tc(t,Sr,qo);break;default:throw Error(Be(329))}}}return Rr(t,Jn()),t.callbackNode===n?aN.bind(null,t):null}function $S(t,e){var n=Pd;return t.current.memoizedState.isDehydrated&&(_c(t,e).flags|=256),t=Wv(t,e),t!==2&&(e=Sr,Sr=n,e!==null&&ew(e)),t}function ew(t){Sr===null?Sr=t:Sr.push.apply(Sr,t)}function O7(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!Ys(s(),r))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ya(t,e){for(e&=~VM,e&=~ry,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Ws(e),i=1<<n;t[n]=-1,e&=~i}}function ZC(t){if($t&6)throw Error(Be(327));Ef();var e=bv(t,0);if(!(e&1))return Rr(t,Jn()),null;var n=Wv(t,e);if(t.tag!==0&&n===2){var i=ES(t);i!==0&&(e=i,n=$S(t,i))}if(n===1)throw n=cp,_c(t,0),Ya(t,e),Rr(t,Jn()),n;if(n===6)throw Error(Be(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,tc(t,Sr,qo),Rr(t,Jn()),null}function WM(t,e){var n=$t;$t|=1;try{return t(e)}finally{$t=n,$t===0&&(zf=Jn()+500,ey&&El())}}function Nc(t){qa!==null&&qa.tag===0&&!($t&6)&&Ef();var e=$t;$t|=1;var n=gs.transition,i=un;try{if(gs.transition=null,un=1,t)return t()}finally{un=i,gs.transition=n,$t=e,!($t&6)&&El()}}function XM(){kr=af.current,An(af)}function _c(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,d7(n)),ti!==null)for(n=ti.return;n!==null;){var i=n;switch(TM(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Lv();break;case 3:Uf(),An(br),An(Ki),DM();break;case 5:NM(i);break;case 4:Uf();break;case 13:An(Pn);break;case 19:An(Pn);break;case 10:PM(i.type._context);break;case 22:case 23:XM()}n=n.return}if(_i=t,ti=t=cl(t.current,null),Ri=kr=e,li=0,cp=null,VM=ry=Ic=0,Sr=Pd=null,uc!==null){for(e=0;e<uc.length;e++)if(n=uc[e],i=n.interleaved,i!==null){n.interleaved=null;var r=i.next,s=n.pending;if(s!==null){var o=s.next;s.next=r,i.next=o}n.pending=i}uc=null}return t}function lN(t,e){do{var n=ti;try{if(RM(),Kg.current=Hv,zv){for(var i=Nn.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}zv=!1}if(Lc=0,xi=ai=Nn=null,Cd=!1,op=0,GM.current=null,n===null||n.return===null){li=1,cp=e,ti=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=Ri,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=UC(o);if(m!==null){m.flags&=-257,kC(m,o,a,s,e),m.mode&1&&OC(s,c,e),e=m,l=c;var v=e.updateQueue;if(v===null){var w=new Set;w.add(l),e.updateQueue=w}else v.add(l);break e}else{if(!(e&1)){OC(s,c,e),JM();break e}l=Error(Be(426))}}else if(Tn&&a.mode&1){var x=UC(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),kC(x,o,a,s,e),bM(kf(l,a));break e}}s=l=kf(l,a),li!==4&&(li=2),Pd===null?Pd=[s]:Pd.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var g=WI(s,l,e);BC(s,g);break e;case 1:a=l;var _=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof _.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(al===null||!al.has(y)))){s.flags|=65536,e&=-e,s.lanes|=e;var M=XI(s,a,e);BC(s,M);break e}}s=s.return}while(s!==null)}fN(n)}catch(E){e=E,ti===n&&n!==null&&(ti=n=n.return);continue}break}while(1)}function cN(){var t=Gv.current;return Gv.current=Hv,t===null?Hv:t}function JM(){(li===0||li===3||li===2)&&(li=4),_i===null||!(Ic&268435455)&&!(ry&268435455)||Ya(_i,Ri)}function Wv(t,e){var n=$t;$t|=2;var i=cN();(_i!==t||Ri!==e)&&(qo=null,_c(t,e));do try{U7();break}catch(r){lN(t,r)}while(1);if(RM(),$t=n,Gv.current=i,ti!==null)throw Error(Be(261));return _i=null,Ri=0,li}function U7(){for(;ti!==null;)uN(ti)}function k7(){for(;ti!==null&&!uk();)uN(ti)}function uN(t){var e=dN(t.alternate,t,kr);t.memoizedProps=t.pendingProps,e===null?fN(t):ti=e,GM.current=null}function fN(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=L7(n,e),n!==null){n.flags&=32767,ti=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{li=6,ti=null;return}}else if(n=B7(n,e,kr),n!==null){ti=n;return}if(e=e.sibling,e!==null){ti=e;return}ti=e=t}while(e!==null);li===0&&(li=5)}function tc(t,e,n){var i=un,r=gs.transition;try{gs.transition=null,un=1,z7(t,e,n,i)}finally{gs.transition=r,un=i}return null}function z7(t,e,n,i){do Ef();while(qa!==null);if($t&6)throw Error(Be(327));n=t.finishedWork;var r=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(Be(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(_k(t,s),t===_i&&(ti=_i=null,Ri=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||L0||(L0=!0,pN(Tv,function(){return Ef(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=gs.transition,gs.transition=null;var o=un;un=1;var a=$t;$t|=4,GM.current=null,N7(t,n),sN(n,t),o7(BS),Cv=!!PS,BS=PS=null,t.current=n,D7(n),fk(),$t=a,un=o,gs.transition=s}else t.current=n;if(L0&&(L0=!1,qa=t,jv=r),s=t.pendingLanes,s===0&&(al=null),pk(n.stateNode),Rr(t,Jn()),e!==null)for(i=t.onRecoverableError,n=0;n<e.length;n++)r=e[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Vv)throw Vv=!1,t=ZS,ZS=null,t;return jv&1&&t.tag!==0&&Ef(),s=t.pendingLanes,s&1?t===qS?Bd++:(Bd=0,qS=t):Bd=0,El(),null}function Ef(){if(qa!==null){var t=WL(jv),e=gs.transition,n=un;try{if(gs.transition=null,un=16>t?16:t,qa===null)var i=!1;else{if(t=qa,qa=null,jv=0,$t&6)throw Error(Be(331));var r=$t;for($t|=4,nt=t.current;nt!==null;){var s=nt,o=s.child;if(nt.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(nt=c;nt!==null;){var u=nt;switch(u.tag){case 0:case 11:case 15:Rd(8,u,s)}var f=u.child;if(f!==null)f.return=u,nt=f;else for(;nt!==null;){u=nt;var p=u.sibling,m=u.return;if(nN(u),u===c){nt=null;break}if(p!==null){p.return=m,nt=p;break}nt=m}}}var v=s.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}nt=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,nt=o;else e:for(;nt!==null;){if(s=nt,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Rd(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,nt=g;break e}nt=s.return}}var _=t.current;for(nt=_;nt!==null;){o=nt;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,nt=y;else e:for(o=_;nt!==null;){if(a=nt,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:iy(9,a)}}catch(E){Gn(a,a.return,E)}if(a===o){nt=null;break e}var M=a.sibling;if(M!==null){M.return=a.return,nt=M;break e}nt=a.return}}if($t=r,El(),Ao&&typeof Ao.onPostCommitFiberRoot=="function")try{Ao.onPostCommitFiberRoot(Y1,t)}catch{}i=!0}return i}finally{un=n,gs.transition=e}}return!1}function qC(t,e,n){e=kf(n,e),e=WI(t,e,1),t=ol(t,e,1),e=ur(),t!==null&&(Xp(t,1,e),Rr(t,e))}function Gn(t,e,n){if(t.tag===3)qC(t,t,n);else for(;e!==null;){if(e.tag===3){qC(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(al===null||!al.has(i))){t=kf(n,t),t=XI(e,t,1),e=ol(e,t,1),t=ur(),e!==null&&(Xp(e,1,t),Rr(e,t));break}}e=e.return}}function H7(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),e=ur(),t.pingedLanes|=t.suspendedLanes&n,_i===t&&(Ri&n)===n&&(li===4||li===3&&(Ri&130023424)===Ri&&500>Jn()-jM?_c(t,0):VM|=n),Rr(t,e)}function hN(t,e){e===0&&(t.mode&1?(e=w0,w0<<=1,!(w0&130023424)&&(w0=4194304)):e=1);var n=ur();t=pa(t,e),t!==null&&(Xp(t,e,n),Rr(t,n))}function G7(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),hN(t,n)}function V7(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(Be(314))}i!==null&&i.delete(e),hN(t,n)}var dN;dN=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||br.current)Tr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Tr=!1,P7(t,e,n);Tr=!!(t.flags&131072)}
vendor: 4,617 bytes, line 40
40else Tr=!1,Tn&&e.flags&1048576&&vI(e,Dv,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Qg(t,e),t=e.pendingProps;var r=Df(e,Ki.current);Mf(e,n),r=OM(null,e,i,t,r,n);var s=UM();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,Cr(i)?(s=!0,Iv(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,LM(e),r.updater=ny,e.stateNode=r,r._reactInternals=e,zS(e,i,t,n),e=VS(null,e,i,!0,s,n)):(e.tag=0,Tn&&s&&EM(e),ir(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(Qg(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=W7(i),t=Fs(i,t),r){case 0:e=GS(null,e,i,t,n);break e;case 1:e=GC(null,e,i,t,n);break e;case 11:e=zC(null,e,i,t,n);break e;case 14:e=HC(null,e,i,Fs(i.type,t),n);break e}throw Error(Be(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Fs(i,r),GS(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Fs(i,r),GC(t,e,i,r,n);case 3:e:{if(QI(e),t===null)throw Error(Be(387));i=e.pendingProps,s=e.memoizedState,r=s.element,AI(t,e),Uv(e,i,null,n);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=kf(Error(Be(423)),e),e=VC(t,e,i,n,r);break e}else if(i!==r){r=kf(Error(Be(424)),e),e=VC(t,e,i,n,r);break e}else for(Vr=sl(e.stateNode.containerInfo.firstChild),Xr=e,Tn=!0,ks=null,n=SI(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ff(),i===r){e=ma(t,e,n);break e}ir(t,e,i,n)}e=e.child}return e;case 5:return MI(e),t===null&&OS(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,o=r.children,LS(i,r)?o=null:s!==null&&LS(i,s)&&(e.flags|=32),YI(t,e),ir(t,e,o,n),e.child;case 6:return t===null&&OS(e),null;case 13:return ZI(t,e,n);case 4:return IM(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Of(e,null,i,n):ir(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Fs(i,r),zC(t,e,i,r,n);case 7:return ir(t,e,e.pendingProps,n),e.child;case 8:return ir(t,e,e.pendingProps.children,n),e.child;case 12:return ir(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,_n(Fv,i._currentValue),i._currentValue=o,s!==null)if(Ys(s.value,o)){if(s.children===r.children&&!br.current){e=ma(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=ca(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),US(s.return,n,e),a.lanes|=n;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(Be(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),US(o,n,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}ir(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Mf(e,n),r=_s(r),i=i(r),e.flags|=1,ir(t,e,i,n),e.child;case 14:return i=e.type,r=Fs(i,e.pendingProps),r=Fs(i.type,r),HC(t,e,i,r,n);case 15:return JI(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Fs(i,r),Qg(t,e),e.tag=1,Cr(i)?(t=!0,Iv(e)):t=!1,Mf(e,n),jI(e,i,r),zS(e,i,r,n),VS(null,e,i,!0,t,n);case 19:return qI(t,e,n);case 22:return KI(t,e,n)}throw Error(Be(156,e.tag))};function pN(t,e){return HL(t,e)}function j7(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ds(t,e,n,i){return new j7(t,e,n,i)}function KM(t){return t=t.prototype,!(!t||!t.isReactComponent)}function W7(t){if(typeof t=="function")return KM(t)?1:0;if(t!=null){if(t=t.$$typeof,t===dM)return 11;if(t===pM)return 14}return 2}function cl(t,e){var n=t.alternate;return n===null?(n=ds(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 9,585 bytes, line 40
40ons=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function $g(t,e,n,i,r,s){var o=2;if(i=t,typeof t=="function")KM(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Qu:return Sc(n.children,r,s,e);case hM:o=8,r|=8;break;case uS:return t=ds(12,n,e,r|2),t.elementType=uS,t.lanes=s,t;case fS:return t=ds(13,n,e,r),t.elementType=fS,t.lanes=s,t;case hS:return t=ds(19,n,e,r),t.elementType=hS,t.lanes=s,t;case ML:return sy(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case wL:o=10;break e;case AL:o=9;break e;case dM:o=11;break e;case pM:o=14;break e;case ja:o=16,i=null;break e}throw Error(Be(130,t==null?t:typeof t,""))}return e=ds(o,n,e,r),e.elementType=t,e.type=i,e.lanes=s,e}function Sc(t,e,n,i){return t=ds(7,t,i,e),t.lanes=n,t}function sy(t,e,n,i){return t=ds(22,t,i,e),t.elementType=ML,t.lanes=n,t.stateNode={isHidden:!1},t}function N_(t,e,n){return t=ds(6,t,null,e),t.lanes=n,t}function D_(t,e,n){return e=ds(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function X7(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=m_(0),this.expirationTimes=m_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=m_(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function YM(t,e,n,i,r,s,o,a,l){return t=new X7(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=ds(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},LM(s),t}function J7(t,e,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yu,key:i==null?null:""+i,children:t,containerInfo:e,implementation:n}}function mN(t){if(!t)return ml;t=t._reactInternals;e:{if(Qc(t)!==t||t.tag!==1)throw Error(Be(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Cr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Be(171))}if(t.tag===1){var n=t.type;if(Cr(n))return mI(t,n,e)}return e}function gN(t,e,n,i,r,s,o,a,l){return t=YM(n,i,!0,t,r,s,o,a,l),t.context=mN(null),n=t.current,i=ur(),r=ll(n),s=ca(i,r),s.callback=e??null,ol(n,s,r),t.current.lanes=r,Xp(t,r,i),Rr(t,i),t}function oy(t,e,n,i){var r=e.current,s=ur(),o=ll(r);return n=mN(n),e.context===null?e.context=n:e.pendingContext=n,e=ca(s,o),e.payload={element:t},i=i===void 0?null:i,i!==null&&(e.callback=i),t=ol(r,e,o),t!==null&&(Xs(t,r,o,s),Jg(t,r,o)),o}function Xv(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function $C(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function QM(t,e){$C(t,e),(t=t.alternate)&&$C(t,e)}function K7(){return null}var vN=typeof reportError=="function"?reportError:function(t){console.error(t)};function ZM(t){this._internalRoot=t}ay.prototype.render=ZM.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Be(409));oy(t,e,null,null)};ay.prototype.unmount=ZM.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Nc(function(){oy(null,t,null,null)}),e[da]=null}};function ay(t){this._internalRoot=t}ay.prototype.unstable_scheduleHydration=function(t){if(t){var e=KL();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ka.length&&e!==0&&e<Ka[n].priority;n++);Ka.splice(n,0,t),n===0&&QL(t)}};function qM(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ly(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function eR(){}function Y7(t,e,n,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var c=Xv(o);s.call(c)}}var o=gN(e,i,t,0,null,!1,!1,"",eR);return t._reactRootContainer=o,t[da]=o.current,tp(t.nodeType===8?t.parentNode:t),Nc(),o}for(;r=t.lastChild;)t.removeChild(r);if(typeof i=="function"){var a=i;i=function(){var c=Xv(l);a.call(c)}}var l=YM(t,0,!1,null,null,!1,!1,"",eR);return t._reactRootContainer=l,t[da]=l.current,tp(t.nodeType===8?t.parentNode:t),Nc(function(){oy(e,l,n,i)}),l}function cy(t,e,n,i,r){var s=n._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var a=r;r=function(){var l=Xv(o);a.call(l)}}oy(e,o,t,r)}else o=Y7(n,e,t,r,i);return Xv(o)}XL=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ud(e.pendingLanes);n!==0&&(vM(e,n|1),Rr(e,Jn()),!($t&6)&&(zf=Jn()+500,El()))}break;case 13:Nc(function(){var i=pa(t,1);if(i!==null){var r=ur();Xs(i,t,1,r)}}),QM(t,1)}};yM=function(t){if(t.tag===13){var e=pa(t,134217728);if(e!==null){var n=ur();Xs(e,t,134217728,n)}QM(t,134217728)}};JL=function(t){if(t.tag===13){var e=ll(t),n=pa(t,e);if(n!==null){var i=ur();Xs(n,t,e,i)}QM(t,e)}};KL=function(){return un};YL=function(t,e){var n=un;try{return un=t,e()}finally{un=n}};wS=function(t,e,n){switch(e){case"input":if(mS(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var r=$1(i);if(!r)throw Error(Be(90));TL(i),mS(i,r)}}}break;case"textarea":CL(t,n);break;case"select":e=n.value,e!=null&&_f(t,!!n.multiple,e,!1)}};DL=WM;FL=Nc;var Q7={usingClientEntryPoint:!1,Events:[Kp,ef,$1,IL,NL,WM]},Gh={findFiberByHostInstance:cc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Z7={bundleType:Gh.bundleType,version:Gh.version,rendererPackageName:Gh.rendererPackageName,rendererConfig:Gh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=kL(t),t===null?null:t.stateNode},findFiberByHostInstance:Gh.findFiberByHostInstance||K7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var I0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!I0.isDisabled&&I0.supportsFiber)try{Y1=I0.inject(Z7),Ao=I0}catch{}}Zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q7;Zr.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qM(e))throw Error(Be(200));return J7(t,e,null,n)};Zr.createRoot=function(t,e){if(!qM(t))throw Error(Be(299));var n=!1,i="",r=vN;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=YM(t,1,!1,null,null,n,!1,i,r),t[da]=e.current,tp(t.nodeType===8?t.parentNode:t),new ZM(e)};Zr.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Be(188)):(t=Object.keys(t).join(","),Error(Be(268,t)));return t=kL(e),t=t===null?null:t.stateNode,t};Zr.flushSync=function(t){return Nc(t)};Zr.hydrate=function(t,e,n){if(!ly(e))throw Error(Be(200));return cy(null,t,e,!0,n)};Zr.hydrateRoot=function(t,e,n){if(!qM(t))throw Error(Be(405));var i=n!=null&&n.hydratedSources||null,r=!1,s="",o=vN;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=gN(e,null,t,1,n??null,r,!1,s,o),t[da]=e.current,tp(t),i)for(t=0;t<i.length;t++)n=i[t],r=n._getVersion,r=r(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,r]:e.mutableSourceEagerHydrationData.push(n,r);return new ay(e)};Zr.render=function(t,e,n){if(!ly(e))throw Error(Be(200));return cy(null,t,e,!1,n)};Zr.unmountComponentAtNode=function(t){if(!ly(t))throw Error(Be(40));return t._reactRootContainer?(Nc(function(){cy(null,null,t,!1,function(){t._reactRootContainer=null,t[da]=null})}),!0):!1};Zr.unstable_batchedUpdates=WM;Zr.unstable_renderSubtreeIntoContainer=function(t,e,n,i){if(!ly(n))throw Error(Be(200));if(t==null||t._reactInternals===void 0)throw Error(Be(38));return cy(t,e,n,!1,i)};Zr.version="18.3.1-next-f1338f8080-20240426";function yN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yN)}catch(t){console.error(t)}}yN(),yL.exports=Zr;var q7=yL.exports,xN,tR=q7;xN=lS.createRoot=tR.createRoot,lS.hydrateRoot=tR.hydrateRoot;const $7="modulepreload",ez=function(t){return"/"+t},nR={},_N=function(e,n,i){if(!n||n.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=ez(s),s in nR)return;nR[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!i)for(let u=r.length-1;u>=0;u--){const f=r[u];
40if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":$7,o||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),o)return new Promise((u,f)=>{c.addEventListener("load",u),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};/**
41 * @remix-run/router v1.23.2
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function up(){return up=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},up.apply(this,arguments)}var $a;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})($a||($a={}));const iR="popstate";function tz(t){t===void 0&&(t={});function e(i,r){let{pathname:s,search:o,hash:a}=i.location;return tw("",{pathname:s,search:o,hash:a},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:Jv(r)}return iz(e,n,null,t)}function ni(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function $M(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function nz(){return Math.random().toString(36).substr(2,8)}function rR(t,e){return{usr:t.state,key:t.key,idx:e}}function tw(t,e,n,i){return n===void 0&&(n=null),up({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?rh(e):e,{state:n,key:e&&e.key||i||nz()})}function Jv(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function rh(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function iz(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=$a.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(up({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=$a.Pop;let x=u(),g=x==null?null:x-c;c=x,l&&l({action:a,location:w.location,delta:g})}function p(x,g){a=$a.Push;let _=tw(w.location,x,g);n&&n(_,x),c=u()+1;let y=rR(_,c),M=w.createHref(_);try{o.pushState(y,"",M)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;r.location.assign(M)}s&&l&&l({action:a,location:w.location,delta:1})}function m(x,g){a=$a.Replace;let _=tw(w.location,x,g);n&&n(_,x),c=u();let y=rR(_,c),M=w.createHref(_);o.replaceState(y,"",M),s&&l&&l({action:a,location:w.location,delta:0})}function v(x){let g=r.location.origin!=="null"?r.location.origin:r.location.href,_=typeof x=="string"?x:Jv(x);return _=_.replace(/ $/,"%20"),ni(g,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,g)}let w={get action(){return a},get location(){return t(r,o)}
vendor: 9,841 bytes, lines 49-58
49,listen(x){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(iR,f),l=x,()=>{r.removeEventListener(iR,f),l=null}},createHref(x){return e(r,x)},createURL:v,encodeLocation(x){let g=v(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:m,go(x){return o.go(x)}};return w}var sR;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(sR||(sR={}));function rz(t,e,n){return n===void 0&&(n="/"),sz(t,e,n,!1)}function sz(t,e,n,i){let r=typeof e=="string"?rh(e):e,s=eE(r.pathname||"/",n);if(s==null)return null;let o=SN(t);oz(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=vz(s);a=mz(o[l],c,i)}return a}function SN(t,e,n,i){e===void 0&&(e=[]),n===void 0&&(n=[]),i===void 0&&(i="");let r=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(ni(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let c=ul([i,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(ni(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),SN(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:dz(c,s.index),routesMeta:u})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of wN(s.path))r(s,o,l)}),e}function wN(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=wN(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function oz(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:pz(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const az=/^:[\w-]+$/,lz=3,cz=2,uz=1,fz=10,hz=-2,oR=t=>t==="*";function dz(t,e){let n=t.split("/"),i=n.length;return n.some(oR)&&(i+=hz),e&&(i+=cz),n.filter(r=>!oR(r)).reduce((r,s)=>r+(az.test(s)?lz:s===""?uz:fz),i)}function pz(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function mz(t,e,n){n===void 0&&(n=!1);let{routesMeta:i}=t,r={},s="/",o=[];for(let a=0;a<i.length;++a){let l=i[a],c=a===i.length-1,u=s==="/"?e:e.slice(s.length)||"/",f=aR({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!f&&c&&n&&!i[i.length-1].route.index&&(f=aR({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(r,f.params),o.push({params:r,pathname:ul([s,f.pathname]),pathnameBase:wz(ul([s,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(s=ul([s,f.pathnameBase]))}return o}function aR(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=gz(t.path,t.caseSensitive,t.end),r=e.match(n);if(!r)return null;let s=r[0],o=s.replace(/(.)\/+$/,"$1"),a=r.slice(1);return{params:i.reduce((c,u,f)=>{let{paramName:p,isOptional:m}=u;if(p==="*"){let w=a[f]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const v=a[f];return m&&!v?c[p]=void 0:c[p]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function gz(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),$M(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function vz(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return $M(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function eE(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}const yz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xz=t=>yz.test(t);function _z(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?rh(t):t,s;if(n)if(xz(n))s=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),$M(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?s=lR(n.substring(1),"/"):s=lR(n,e)}else s=e;return{pathname:s,search:Az(i),hash:Mz(r)}}function lR(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function F_(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Sz(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function AN(t,e){let n=Sz(t);return e?n.map((i,r)=>r===n.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function MN(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=rh(t):(r=up({},t),ni(!r.pathname||!r.pathname.includes("?"),F_("?","pathname","search",r)),ni(!r.pathname||!r.pathname.includes("#"),F_("#","pathname","hash",r)),ni(!r.search||!r.search.includes("#"),F_("#","search","hash",r)));let s=t===""||r.pathname==="",o=s?"/":r.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!i&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;r.pathname=p.join("/")}a=f>=0?e[f]:"/"}let l=_z(r,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const ul=t=>t.join("/").replace(/\/\/+/g,"/"),wz=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Az=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Mz=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Ez(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const EN=["post","put","patch","delete"];new Set(EN);const Tz=["get",...EN];new Set(Tz);/**
50 * React Router v6.30.3
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function fp(){return fp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fp.apply(this,arguments)}const tE=I.createContext(null),bz=I.createContext(null),Zc=I.createContext(null),uy=I.createContext(null),qc=I.createContext({outlet:null,matches:[],isDataRoute:!1}),TN=I.createContext(null);function Cz(t,e){let{relative:n}=e===void 0?{}:e;Qp()||ni(!1);let{basename:i,navigator:r}=I.useContext(Zc),{hash:s,pathname:o,search:a}=CN(t,{relative:n}),l=o;return i!=="/"&&(l=o==="/"?i:ul([i,o])),r.createHref({pathname:l,search:a,hash:s})}function Qp(){return I.useContext(uy)!=null}function fy(){return Qp()||ni(!1),I.useContext(uy).location}function bN(t){I.useContext(Zc).static||I.useLayoutEffect(t)}function Rz(){let{isDataRoute:t}=I.useContext(qc);return t?Gz():Pz()}function Pz(){Qp()||ni(!1);let t=I.useContext(tE),{basename:e,future:n,navigator:i}=I.useContext(Zc),{matches:r}=I.useContext(qc),{pathname:s}=fy(),o=JSON.stringify(AN(r,n.v7_relativeSplatPath)),a=I.useRef(!1);return bN(()=>{a.current=!0}),I.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){i.go(c);return}let f=MN(c,JSON.parse(o),s,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:ul([e,f.pathname])),(u.replace?i.replace:i.push)(f,u.state,u)},[e,i,o,s,t])}function CN(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=I.useContext(Zc),{matches:r}=I.useContext(qc),{pathname:s}=fy(),o=JSON.stringify(AN(r,i.v7_relativeSplatPath));return I.useMemo(()=>MN(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function Bz(t,e){return Lz(t,e)}function Lz(t,e,n,i){Qp()||ni(!1);let{navigator:r}=I.useContext(Zc),{matches:s}=I.useContext(qc),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=fy(),u;if(e){var f;let x=typeof e=="string"?rh(e):e;l==="/"||(f=x.pathname)!=null&&f.startsWith(l)||ni(!1),u=x}else u=c;let p=u.pathname||"/",m=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=rz(t,{pathname:m}),w=Oz(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:ul([l,r.encodeLocation?r.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:ul([l,r.encodeLocation?r.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,i);return e&&w?I.createElement(uy.Provider,{value:{location:fp({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:$a.Pop}},w):w}function Iz(){let t=Hz(),e=Ez(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application 
58Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},e),n?I.createElement("pre",{style:r},n):null,s)}const Nz=I.createElement(Iz,null);class Dz extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?I.createElement(qc.Provider,{value:this.props.routeContext},I.createElement(TN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fz(t){let{routeContext:e,match:n,children:i}=t,r=I.useContext(tE);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(qc.Provider,{value:e},i)}function Oz(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=i)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(r=n)==null?void 0:r.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||ni(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&i&&i.v7_partialHydration)for(let u=0;u<o.length;u++){let f=o[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=u),f.route.id){let{loaderData:p,errors:m}=n,v=f.route.loader&&p[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||v){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,f,p)=>{let m,v=!1,w=null,x=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||Nz,l&&(c<0&&p===0?(Vz("route-fallback",!1),v=!0,x=null):c===p&&(v=!0,x=f.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,p+1)),_=()=>{let y;return m?y=w:v?y=x:f.route.Component?y=I.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=u,I.createElement(Fz,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:y})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?I.createElement(Dz,{location:n.location,revalidation:n.revalidation,component:w,error:m,children:_(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):_()},null)}var RN=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(RN||{}),Kv=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Kv||{});function Uz(t){let e=I.useContext(tE);return e||ni(!1),e}function kz(t){let e=I.useContext(bz);return e||ni(!1),e}function zz(t){let e=I.useContext(qc);return e||ni(!1),e}function PN(t){let e=zz(),n=e.matches[e.matches.length-1];return n.route.id||ni(!1),n.route.id}function Hz(){var t;let e=I.useContext(TN),n=kz(Kv.UseRouteError),i=PN(Kv.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function Gz(){let{router:t}=Uz(RN.UseNavigateStable),e=PN(Kv.UseNavigateStable),n=I.useRef(!1);return bN(()=>{n.current=!0}),I.useCallback(function(r,s){s===void 0&&(s={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,fp({fromRouteId:e},s)))},[t,e])}const cR={};function Vz(t,e,n){!e&&!cR[t]&&(cR[t]=!0)}function jz(t,e){t==null||t.v7_startTransition,(t==null?void 0:t.v7_relativeSplatPath)===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function ev(t){ni(!1)}function Wz(t){let{basename:e="/",children:n=null,location:i,navigationType:r=$a.Pop,navigator:s,static:o=!1,future:a}=t;Qp()&&ni(!1);let l=e.replace(/^\/*/,"/"),c=I.useMemo(()=>({basename:l,navigator:s,static:o,future:fp({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof i=="string"&&(i=rh(i));
58let{pathname:u="/",search:f="",hash:p="",state:m=null,key:v="default"}=i,w=I.useMemo(()=>{let x=eE(u,l);return x==null?null:{location:{pathname:x,search:f,hash:p,state:m,key:v},navigationType:r}},[l,u,f,p,m,v,r]);return w==null?null:I.createElement(Zc.Provider,{value:c},I.createElement(uy.Provider,{children:n,value:w}))}function Xz(t){let{children:e,location:n}=t;return Bz(nw(e),n)}new Promise(()=>{});function nw(t,e){e===void 0&&(e=[]);let n=[];return I.Children.forEach(t,(i,r)=>{if(!I.isValidElement(i))return;let s=[...e,r];if(i.type===I.Fragment){n.push.apply(n,nw(i.props.children,s));return}i.type!==ev&&ni(!1),!i.props.index||!i.props.children||ni(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=nw(i.props.children,s)),n.push(o)}),n}/**
59 * React Router DOM v6.30.3
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function iw(){return iw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},iw.apply(this,arguments)}function Jz(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,s;for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Kz(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Yz(t,e){return t.button===0&&(!e||e==="_self")&&!Kz(t)}const Qz=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Zz="6";try{window.__reactRouterVersion=Zz}catch{}const qz="startTransition",uR=HU[qz];function $z(t){let{basename:e,children:n,future:i,window:r}=t,s=I.useRef();s.current==null&&(s.current=tz({window:r,v5Compat:!0}));let o=s.current,[a,l]=I.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},u=I.useCallback(f=>{c&&uR?uR(()=>l(f)):l(f)},[l,c]);return I.useLayoutEffect(()=>o.listen(u),[o,u]),I.useEffect(()=>jz(i),[i]),I.createElement(Wz,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:i})}const eH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tH=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hf=I.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,p=Jz(e,Qz),{basename:m}=I.useContext(Zc),v,w=!1;if(typeof c=="string"&&tH.test(c)&&(v=c,eH))try{let y=new URL(window.location.href),M=c.startsWith("//")?new URL(y.protocol+c):new URL(c),E=eE(M.pathname,m);M.origin===y.origin&&E!=null?c=E+M.search+M.hash:w=!0}catch{}let x=Cz(c,{relative:r}),g=nH(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:r,viewTransition:f});function _(y){i&&i(y),y.defaultPrevented||g(y)}return I.createElement("a",iw({},p,{href:v||x,onClick:w||s?i:_,ref:n,target:l}))});var fR;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(fR||(fR={}));var hR;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(hR||(hR={}));function nH(t,e){let{target:n,replace:i,state:r,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=Rz(),c=fy(),u=CN(t,{relative:o});return I.useCallback(f=>{if(Yz(f,n)){f.preventDefault();let p=i!==void 0?i:Jv(c)===Jv(u);l(t,{replace:p,state:r,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,u,i,r,n,t,s,o,a])}const iH=({type:t,text:e})=>T.jsx("div",{className:"absolute top-10 left-0 right-0 flex justify-center items-center",children:T.jsxs("div",{className:`p-2 ${t==="danger"?"bg-red-800":"bg-blue-800"}
67 items-center text-indigo-100 leading-none lg:rounded-full flex lg:inline-flex`,role:"alert",children:[T.jsx("p",{className:`flex rounded-full ${t==="danger"?"bg-red-500":"bg-blue-500"} uppercase px-2 py-1 text-xs font-semibold mr-3`,children:t==="danger"?"Failed":"Success"}),T.jsx("p",{className:"mr-2 text-left",children:e})]})});function ga(){return ga=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ga.apply(null,arguments)}/**
68 * @license
69 * Copyright 2010-2023 Three.js Authors
70 * SPDX-License-Identifier: MIT
71 */const Tl="157",nc={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},ic={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},BN=0,rw=1,LN=2,rH=3,IN=0,hy=1,Ld=2,Os=3,Qs=0,ci=1,ji=2,sH=2,Pi=0,wc=1,Yv=2,sw=3,ow=4,NN=5,ac=100,DN=101,FN=102,aw=103,lw=104,ON=200,UN=201,kN=202,zN=203,nE=204,iE=205,HN=206,GN=207,VN=208,jN=209,WN=210,rE=0,dy=1,Qv=2,hp=3,dp=4,sE=5,oE=6,py=7,Zp=0,XN=1,JN=2,Js=0,KN=1,YN=2,QN=3,aE=4,ZN=5,my=300,va=301,gl=302,pp=303,mp=304,sh=306,vl=1e3,Ci=1001,Gf=1002,fn=1003,gp=1004,oH=1004,Tf=1005,aH=1005,gn=1006,gy=1007,lH=1007,Po=1008,cH=1008,Si=1009,qN=1010,$N=1011,vy=1012,lE=1013,So=1014,Vs=1015,Dc=1016,cE=1017,uE=1018,ua=1020,eD=1021,Mr=1023,tD=1024,nD=1025,fl=1026,yl=1027,iD=1028,fE=1029,rD=1030,hE=1031,dE=1033,tv=33776,nv=33777,iv=33778,rv=33779,cw=35840,uw=35841,fw=35842,hw=35843,sD=36196,dw=37492,pw=37496,mw=37808,gw=37809,vw=37810,yw=37811,xw=37812,_w=37813,Sw=37814,ww=37815,Aw=37816,Mw=37817,Ew=37818,Tw=37819,bw=37820,Cw=37821,sv=36492,Rw=36494,Pw=36495,oD=36283,Bw=36284,Lw=36285,Iw=36286,aD=2200,lD=2201,cD=2202,Vf=2300,Fc=2301,ov=2302,hc=2400,dc=2401,vp=2402,yy=2500,pE=2501,uD=0,mE=1,Zv=2,gE=3e3,hl=3001,Zs=3200,xy=3201,bl=0,fD=1,ar="",jt="srgb",ws="srgb-linear",_y="display-p3",qp="display-p3-linear",yp="linear",vn="srgb",xp="rec709",_p="p3",uH=0,av=7680,fH=7681,hH=7682,dH=7683,pH=34055,mH=34056,gH=5386,vH=512,yH=513,xH=514,_H=515,SH=516,wH=517,AH=518,hD=519,dD=512,pD=513,mD=514,gD=515,vD=516,yD=517,xD=518,_D=519,Sp=35044,Ac=35048,MH=35040,EH=35045,TH=35049,bH=35041,CH=35046,RH=35050,PH=35042,BH="100",Nw="300 es",qv=1035,wo=2e3,wp=2001;let As=class{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}};const Hi=["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 dR=1234567;const Mc=Math.PI/180,jf=180/Math.PI;function Jr(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Hi[t&255]+Hi[t>>8&255]+Hi[t>>16&255]+Hi[t>>24&255]+"-"+Hi[e&255]+Hi[e>>8&255]+"-"+Hi[e>>16&15|64]+Hi[e>>24&255]+"-"+Hi[n&63|128]+Hi[n>>8&255]+"-"+Hi[n>>16&255]+Hi[n>>24&255]+Hi[i&255]+Hi[i>>8&255]+Hi[i>>16&255]+Hi[i>>24&255]).toLowerCase()}function Vn(t,e,n){return Math.max(e,Math.min(n,t))}function vE(t,e){return(t%e+e)%e}function LH(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)}function IH(t,e,n){return t!==e?(n-t)/(e-t):0}function Id(t,e,n){return(1-n)*t+n*e}function NH(t,e,n,i){return Id(t,e,1-Math.exp(-n*i))}function DH(t,e=1){return e-Math.abs(vE(t,e*2)-e)}function FH(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function OH(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function UH(t,e){return t+Math.floor(Math.random()*(e-t+1))}function kH(t,e){return t+Math.random()*(e-t)}
vendor: 28,173 bytes, line 71
71function zH(t){return t*(.5-Math.random())}function HH(t){t!==void 0&&(dR=t);let e=dR+=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 GH(t){return t*Mc}function VH(t){return t*jf}function Dw(t){return(t&t-1)===0&&t!==0}function SD(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function $v(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function jH(t,e,n,i,r){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((e+i)/2),u=o((e+i)/2),f=s((e-i)/2),p=o((e-i)/2),m=s((i-e)/2),v=o((i-e)/2);switch(r){case"XYX":t.set(a*u,l*f,l*p,a*c);break;case"YZY":t.set(l*p,a*u,l*f,a*c);break;case"ZXZ":t.set(l*f,l*p,a*u,a*c);break;case"XZX":t.set(a*u,l*v,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*v,a*c);break;case"ZYZ":t.set(l*v,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Er(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function It(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const Ec={DEG2RAD:Mc,RAD2DEG:jf,generateUUID:Jr,clamp:Vn,euclideanModulo:vE,mapLinear:LH,inverseLerp:IH,lerp:Id,damp:NH,pingpong:DH,smoothstep:FH,smootherstep:OH,randInt:UH,randFloat:kH,randFloatSpread:zH,seededRandom:HH,degToRad:GH,radToDeg:VH,isPowerOfTwo:Dw,ceilPowerOfTwo:SD,floorPowerOfTwo:$v,setQuaternionFromProperEuler:jH,normalize:It,denormalize:Er};class le{constructor(e=0,n=0){le.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.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 n=this.x,i=this.y,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6],this.y=r[1]*n+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Vn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),r=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ft{constructor(e,n,i,r,s,o,a,l,c){Ft.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,o,a,l,c)}set(e,n,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=n,u[4]=s,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],f=i[7],p=i[2],m=i[5],v=i[8],w=r[0],x=r[3],g=r[6],_=r[1],y=r[4],M=r[7],E=r[2],C=r[5],P=r[8];return s[0]=o*w+a*_+l*E,s[3]=o*x+a*y+l*C,s[6]=o*g+a*M+l*P,s[1]=c*w+u*_+f*E,s[4]=c*x+u*y+f*C,s[7]=c*g+u*M+f*P,s[2]=p*w+m*_+v*E,s[5]=p*x+m*y+v*C,s[8]=p*g+m*M+v*P,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-i*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,p=a*l-u*s,m=c*s-o*l,v=n*f+i*p+r*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const w=1/v;return e[0]=f*w,e[1]=(r*c-u*i)*w,e[2]=(a*i-r*o)*w,e[3]=p*w,e[4]=(u*n-r*l)*w,e[5]=(r*s-a*n)*w,e[6]=m*w,e[7]=(i*l-c*n)*w,e[8]=(o*n-i*s)*w,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(O_.makeScale(e,n)),this}rotate(e){return this.premultiply(O_.makeRotation(-e)),this}translate(e,n){return this.premultiply(O_.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<9;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const O_=new Ft;function wD(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const WH={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function lf(t,e){return new WH[t](e)}function Ap(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function AD(){const t=Ap("canvas");return t.style.display="block",t}const pR={};function Nd(t){t in pR||(pR[t]=!0,console.warn(t))}const mR=new Ft().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),gR=new Ft().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),N0={[ws]:{transfer:yp,primaries:xp,toReference:t=>t,fromReference:t=>t},[jt]:{transfer:vn,primaries:xp,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[qp]:{transfer:yp,primaries:_p,toReference:t=>t.applyMatrix3(gR),fromReference:t=>t.applyMatrix3(mR)},[_y]:{transfer:vn,primaries:_p,toReference:t=>t.convertSRGBToLinear().applyMatrix3(gR),fromReference:t=>t.applyMatrix3(mR).convertLinearToSRGB()}},XH=new Set([ws,qp]),cn={enabled:!0,_workingColorSpace:ws,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!XH.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const i=N0[e].toReference,r=N0[n].fromReference;return r(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return N0[t].primaries},getTransfer:function(t){return t===ar?yp:N0[t].transfer}};function bf(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function U_(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let xu;class yE{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{xu===void 0&&(xu=Ap("canvas")),xu.width=e.width,xu.height=e.height;const i=xu.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=xu}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.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 n=Ap("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=bf(s[o]/255)*255;return i.putImageData(r,0,0),n}else if(e.data){const n=e.data.slice(0);for(let i=0;i<n.length;i++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[i]=Math.floor(bf(n[i]/255)*255):n[i]=bf(n[i]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let JH=0;class pc{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:JH++}),this.uuid=Jr(),this.data=e,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let o=0,a=r.length;o<a;o++)r[o].isDataTexture?s.push(k_(r[o].image)):s.push(k_(r[o]))}else s=k_(r);i.url=s}return n||(e.images[this.uuid]=i),i}}function k_(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?yE.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let KH=0;class Mn extends As{constructor(e=Mn.DEFAULT_IMAGE,n=Mn.DEFAULT_MAPPING,i=Ci,r=Ci,s=gn,o=Po,a=Mr,l=Si,c=Mn.DEFAULT_ANISOTROPY,u=ar){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:KH++}),this.uuid=Jr(),this.name="",this.source=new pc(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new le(0,0),this.repeat=new le(1,1),this.center=new le(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ft,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof u=="string"?this.colorSpace=u:(Nd("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=u===hl?jt:ar),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}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 n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==my)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case vl:e.x=e.x-Math.floor(e.x);break;case Ci: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 vl:e.y=e.y-Math.floor(e.y);break;case Ci: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)}get encoding(){return Nd("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===jt?hl:gE}set encoding(e){Nd("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===hl?jt:ar}}Mn.DEFAULT_IMAGE=null;Mn.DEFAULT_MAPPING=my;Mn.DEFAULT_ANISOTROPY=1;class on{constructor(e=0,n=0,i=0,r=1){on.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,r){return this.x=e,this.y=n,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.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 n=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*n+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*n+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*n+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,r,s;const l=e.elements,c=l[0],u=l[4],f=l[8],p=l[1],m=l[5],v=l[9],w=l[2],x=l[6],g=l[10];if(Math.abs(u-p)<.01&&Math.abs(f-w)<.01&&Math.abs(v-x)<.01){if(Math.abs(u+p)<.1&&Math.abs(f+w)<.1&&Math.abs(v+x)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const y=(c+1)/2,M=(m+1)/2,E=(g+1)/2,C=(u+p)/4,P=(f+w)/4,N=(v+x)/4;return y>M&&y>E?y<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(y),r=C/i,s=P/i):M>E?M<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(M),i=C/r,s=N/r):E<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(E),i=P/s,r=N/s),this.set(i,r,s,n),this}let _=Math.sqrt((x-v)*(x-v)+(f-w)*(f-w)+(p-u)*(p-u));return Math.abs(_)<.001&&(_=1),this.x=(x-v)/_,this.y=(f-w)/_,this.z=(p-u)/_,this.w=Math.acos((c+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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),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 MD extends As{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new on(0,0,e,n),this.scissorTest=!1,this.viewport=new on(0,0,e,n);const r={width:e,height:n,depth:1};i.encoding!==void 0&&(Nd("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===hl?jt:ar),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:gn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new Mn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,n,i=1){(this.width!==e||this.height!==n||this.depth!==i)&&(this.width=e,this.height=n,this.depth=i,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new pc(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Fn extends MD{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class Sy extends Mn{constructor(e=null,n=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=fn,this.minFilter=fn,this.wrapR=Ci,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class YH extends Fn{constructor(e=1,n=1,i=1){super(e,n),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Sy(null,e,n,i),this.texture.isRenderTargetTexture=!0}}class xE extends Mn{constructor(e=null,n=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=fn,this.minFilter=fn,this.wrapR=Ci,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class QH extends Fn{constructor(e=1,n=1,i=1){super(e,n),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new xE(null,e,n,i),this.texture.isRenderTargetTexture=!0}}class ZH extends Fn{constructor(e=1,n=1,i=1,r={}){super(e,n,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o<i;o++)this.texture[o]=s.clone(),this.texture[o].isRenderTargetTexture=!0}setSize(e,n,i=1){if(this.width!==e||this.height!==n||this.depth!==i){this.width=e,this.height=n,this.depth=i;for(let r=0,s=this.texture.length;r<s;r++)this.texture[r].image.width=e,this.texture[r].image.height=n,this.texture[r].image.depth=i;this.dispose()}this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}copy(e){this.dispose(),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.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let n=0,i=e.texture.length;n<i;n++)this.texture[n]=e.texture[n].clone(),this.texture[n].isRenderTargetTexture=!0;return this}}class wi{constructor(e=0,n=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=i,this._w=r}static slerpFlat(e,n,i,r,s,o,a){let l=i[r+0],c=i[r+1],u=i[r+2],f=i[r+3];const p=s[o+0],m=s[o+1],v=s[o+2],w=s[o+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f;return}if(a===1){e[n+0]=p,e[n+1]=m,e[n+2]=v,e[n+3]=w;return}if(f!==w||l!==p||c!==m||u!==v){let x=1-a;const g=l*p+c*m+u*v+f*w,_=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){const E=Math.sqrt(y),C=Math.atan2(E,g*_);x=Math.sin(x*C)/E,a=Math.sin(a*C)/E}const M=a*_;if(l=l*x+p*M,c=c*x+m*M,u=u*x+v*M,f=f*x+w*M,x===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=E,c*=E,u*=E,f*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],f=s[o],p=s[o+1],m=s[o+2],v=s[o+3];return e[n]=a*v+u*f+l*m-c*p,e[n+1]=l*v+u*p+c*f-a*m,e[n+2]=c*v+u*m+a*p-l*f,e[n+3]=u*v-a*f-l*p-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,i,r){return this._x=e,this._y=n,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),f=a(s/2),p=l(i/2),m=l(r/2),v=l(s/2);switch(o){case"XYZ":this._x=p*u*f+c*m*v,this._y=c*m*f-p*u*v,this._z=c*u*v+p*m*f,this._w=c*u*f-p*m*v;break;case"YXZ":this._x=p*u*f+c*m*v,this._y=c*m*f-p*u*v,this._z=c*u*v-p*m*f,this._w=c*u*f+p*m*v;break;case"ZXY":this._x=p*u*f-c*m*v,this._y=c*m*f+p*u*v,this._z=c*u*v+p*m*f,this._w=c*u*f-p*m*v;break;case"ZYX":this._x=p*u*f-c*m*v,this._y=c*m*f+p*u*v,this._z=c*u*v-p*m*f,this._w=c*u*f+p*m*v;break;case"YZX":this._x=p*u*f+c*m*v,this._y=c*m*f+p*u*v,this._z=c*u*v-p*m*f,this._w=c*u*f-p*m*v;break;case"XZY":this._x=p*u*f-c*m*v,this._y=c*m*f-p*u*v,this._z=c*u*v+p*m*f,this._w=c*u*f+p*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],r=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],p=i+a+f;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-r)*m}else if(i>
vendor: 10,247 bytes, line 71
71a&&i>f){const m=2*Math.sqrt(1+i-a-f);this._w=(u-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-i-f);this._w=(s-c)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-i-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vn(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,n/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,r=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*i+n*this._x,this._y=m*r+n*this._y,this._z=m*s+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,p=Math.sin(n*u)/c;return this._w=o*f+this._w*p,this._x=i*f+this._x*p,this._y=r*f+this._y*p,this._z=s*f+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=Math.random(),n=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(n*Math.cos(r),i*Math.sin(s),i*Math.cos(s),n*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class G{constructor(e=0,n=0,i=0){G.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.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,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(vR.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(vR.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6]*r,this.y=s[1]*n+s[4]*i+s[7]*r,this.z=s[2]*n+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*n+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*n+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*n+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*n+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=l*n+o*r-a*i,u=l*i+a*n-s*r,f=l*r+s*i-o*n,p=-s*n-o*i-a*r;return this.x=c*l+p*-s+u*-a-f*-o,this.y=u*l+p*-o+f*-s-c*-a,this.z=f*l+p*-a+c*-o-u*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[4]*i+s[8]*r,this.y=s[1]*n+s[5]*i+s[9]*r,this.z=s[2]*n+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,r=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return z_.copy(this).projectOnVector(e),this.sub(z_)}reflect(e){return this.sub(z_.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Vn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return n*n+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const r=Math.sin(n)*e;return this.x=r*Math.sin(i),this.y=Math.cos(n)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=r,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*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,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(n),this.y=i*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const z_=new G,vR=new wi;class eo{constructor(e=new G(1/0,1/0,1/0),n=new G(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n+=3)this.expandByPoint(Xo.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,i=e.count;n<i;n++)this.expandByPoint(Xo.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;
vendor: 4,318 bytes, line 71
71n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=Xo.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}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,n=!1){if(e.updateWorldMatrix(!1,!1),e.boundingBox!==void 0)e.boundingBox===null&&e.computeBoundingBox(),_u.copy(e.boundingBox),_u.applyMatrix4(e.matrixWorld),this.union(_u);else{const r=e.geometry;if(r!==void 0)if(n&&r.attributes!==void 0&&r.attributes.position!==void 0){const s=r.attributes.position;for(let o=0,a=s.count;o<a;o++)Xo.fromBufferAttribute(s,o).applyMatrix4(e.matrixWorld),this.expandByPoint(Xo)}else r.boundingBox===null&&r.computeBoundingBox(),_u.copy(r.boundingBox),_u.applyMatrix4(e.matrixWorld),this.union(_u)}const i=e.children;for(let r=0,s=i.length;r<s;r++)this.expandByObject(i[r],n);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,n){return n.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,Xo),Xo.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Vh),D0.subVectors(this.max,Vh),Su.subVectors(e.a,Vh),wu.subVectors(e.b,Vh),Au.subVectors(e.c,Vh),Na.subVectors(wu,Su),Da.subVectors(Au,wu),zl.subVectors(Su,Au);let n=[0,-Na.z,Na.y,0,-Da.z,Da.y,0,-zl.z,zl.y,Na.z,0,-Na.x,Da.z,0,-Da.x,zl.z,0,-zl.x,-Na.y,Na.x,0,-Da.y,Da.x,0,-zl.y,zl.x,0];return!H_(n,Su,wu,Au,D0)||(n=[1,0,0,0,1,0,0,0,1],!H_(n,Su,wu,Au,D0))?!1:(F0.crossVectors(Na,Da),n=[F0.x,F0.y,F0.z],H_(n,Su,wu,Au,D0))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Xo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Xo).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:(Wo[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Wo[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Wo[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Wo[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Wo[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Wo[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Wo[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Wo[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Wo),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 Wo=[new G,new G,new G,new G,new G,new G,new G,new G],Xo=new G,_u=new eo,Su=new G,wu=new G,Au=new G,Na=new G,Da=new G,zl=ne
vendor: 4,235 bytes, line 71
71w G,Vh=new G,D0=new G,F0=new G,Hl=new G;function H_(t,e,n,i,r){for(let s=0,o=t.length-3;s<=o;s+=3){Hl.fromArray(t,s);const a=r.x*Math.abs(Hl.x)+r.y*Math.abs(Hl.y)+r.z*Math.abs(Hl.z),l=e.dot(Hl),c=n.dot(Hl),u=i.dot(Hl);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const qH=new eo,jh=new G,G_=new G;let Ms=class{constructor(e=new G,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):qH.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const n=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,n){const i=this.center.distanceToSquared(e);return n.copy(e),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}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;jh.subVectors(e,this.center);const n=jh.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),r=(i-this.radius)*.5;this.center.addScaledVector(jh,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(G_.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(jh.copy(e.center).add(G_)),this.expandByPoint(jh.copy(e.center).sub(G_))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};const Jo=new G,V_=new G,O0=new G,Fa=new G,j_=new G,U0=new G,W_=new G;class $c{constructor(e=new G,n=new G(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.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,Jo)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Jo.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Jo.copy(this.origin).addScaledVector(this.direction,n),Jo.distanceToSquared(e))}distanceSqToSegment(e,n,i,r){V_.copy(e).add(n).multiplyScalar(.5),O0.copy(n).sub(e).normalize(),Fa.copy(this.origin).sub(V_);const s=e.distanceTo(n)*.5,o=-this.direction.dot(O0),a=Fa.dot(this.direction),l=-Fa.dot(O0),c=Fa.lengthSq(),u=Math.abs(1-o*o);let f,p,m,v;if(u>0)if(f=o*l-a,p=o*a-l,v=s*u,f>=0)if(p>=-v)if(p<=v){const w=1/u;f*=w,p*=w,m=f*(f+o*p+2*a)+p*(o*f+p+2*l)+c}else p=s,f=Math.max(0,-(o*p+a)),m=-f*f+p*(p+2*l)+c;else p=-s,f=Math.max(0,-(o*p+a)),m=-f*f+p*(p+2*l)+c;else p<=-v?(f=Math.max(0,-(-o*s+a)),p=f>0?-s:Math.min(Math.max(-s,-l),s),m=-f*f+p*(p+2*l)+c):p<=v?(f=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+c):(f=Math.max(0,-(o*s+a)),p=f>0?s:Math.min(Math.max(-s,-l),s),m=-f*f+p*(p+2*l)+c);else p=o>0?-s:s,f=Math.max(0,-(o*p+a)),m=-f*f+p*(p+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),r&&r.copy(V_).addScaledVector(O0,p),m}intersectSphere(e,n){Jo.subVectors(e.center,this.origin);const i=Jo.dot(this.direction),r=Jo.dot(Jo)-i*i,s=e.radius*e.radiu
vendor: 11,578 bytes, line 71
71s;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,p=this.origin;return c>=0?(i=(e.min.x-p.x)*c,r=(e.max.x-p.x)*c):(i=(e.max.x-p.x)*c,r=(e.min.x-p.x)*c),u>=0?(s=(e.min.y-p.y)*u,o=(e.max.y-p.y)*u):(s=(e.max.y-p.y)*u,o=(e.min.y-p.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),f>=0?(a=(e.min.z-p.z)*f,l=(e.max.z-p.z)*f):(a=(e.max.z-p.z)*f,l=(e.min.z-p.z)*f),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,n)}intersectsBox(e){return this.intersectBox(e,Jo)!==null}intersectTriangle(e,n,i,r,s){j_.subVectors(n,e),U0.subVectors(i,e),W_.crossVectors(j_,U0);let o=this.direction.dot(W_),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Fa.subVectors(this.origin,e);const l=a*this.direction.dot(U0.crossVectors(Fa,U0));if(l<0)return null;const c=a*this.direction.dot(j_.cross(Fa));if(c<0||l+c>o)return null;const u=-a*Fa.dot(W_);return u<0?null:this.at(u/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 Et{constructor(e,n,i,r,s,o,a,l,c,u,f,p,m,v,w,x){Et.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,n,i,r,s,o,a,l,c,u,f,p,m,v,w,x)}set(e,n,i,r,s,o,a,l,c,u,f,p,m,v,w,x){const g=this.elements;return g[0]=e,g[4]=n,g[8]=i,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=p,g[3]=m,g[7]=v,g[11]=w,g[15]=x,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Et().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,r=1/Mu.setFromMatrixColumn(e,0).length(),s=1/Mu.setFromMatrixColumn(e,1).length(),o=1/Mu.setFromMatrixColumn(e,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*s,n[5]=i[5]*s,n[6]=i[6]*s,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const p=o*u,m=o*f,v=a*u,w=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+v*c,n[5]=p-w*c,n[9]=-a*l,n[2]=w-p*c,n[6]=v+m*c,n[10]=o*l}else if(e.order==="YXZ"){const p=l*u,m=l*f,v=c*u,w=c*f;n[0]=p+w*a,n[4]=v*a-m,n[8]=o*c,n[1]=o*f,n[5]=o*u,n[9]=-a,n[2]=m*a-v,n[6]=w+p*a,n[10]=o*l}else if(e.order==="ZXY"){const p=l*u,m=l*f,v=c*u,w=c*f;n[0]=p-w*a,n[4]=-o*f,n[8]=v+m*a,n[1]=m+v*a,n[5]=o*u,n[9]=w-p*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const p=o*u,m=o*f,v=a*u,w=a*f;n[0]=l*u,n[4]=v*c-m,n[8]=p*c+w,n[1]=l*f,n[5]=w*c+p,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*c,v=a*l,w=a*c;n[0]=l*u,n[4]=w-p*f,n[8]=v*f+m,n[1]=f,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+v,n[10]=p-w*f}else if(e.order==="XZY"){const p=o*l,m=o*c,v=a*l,w=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=p*f+w,n[5]=o*u,n[9]=m*f-v,n[2]=v*f-m,n[6]=a*u,n[10]=w*f+p}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose($H,e,eG)}lookAt(e,n,i){const r=this.elements;return Or.subVectors(e,n),Or.lengthSq()===0&&(Or.z=1),Or.normalize(),Oa.crossVectors(i,Or),Oa.lengthSq()===0&&(Math.abs(i.z)===1?Or.x+=1e-4:Or.z+=1e-4,Or.normalize(),Oa.crossVectors(i,Or)),Oa.normalize(),k0.crossVectors(Or,Oa),r[0]=Oa.x,r[4]=k0.x,r[8]=Or.x,r[1]=Oa.y,r[5]=k0.y,r[9]=Or.y,r[2]=Oa.z,r[6]=k0.z,r[10]=Or.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],f=i[5],p=i[9],m=i[13],v=i[2],w=i[6],x=i[10],g=i[14],_=i[3],y=i[7],M=i[11],E=i[15],C=r[0],P=r[4],N=r[8],R=r[12],L=r[1],k=r[5],$=r[9],ee=r[13],D=r[2],U=r[6],z=r[10],Y=r[14],O=r[3],H=r[7],W=r[11],j=r[15];return s[0]=o*C+a*L+l*D+c*O,s[4]=o*P+a*k+l*U+c*H,s[8]=o*N+a*$+l*z+c*W,s[12]=o*R+a*ee+l*Y+c*j,s[1]=u*C+f*L+p*D+m*O,s[5]=u*P+f*k+p*U+m*H,s[9]=u*N+f*$+p*z+m*W,s[13]=u*R+f*ee+p*Y+m*j,s[2]=v*C+w*L+x*D+g*O,s[6]=v*P+w*k+x*U+g*H,s[10]=v*N+w*$+x*z+g*W,s[14]=v*R+w*ee+x*Y+g*j,s[3]=_*C+y*L+M*D+E*O,s[7]=_*P+y*k+M*U+E*H,s[11]=_*N+y*$+M*z+E*W,s[15]=_*R+y*ee+M*Y+E*j,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],p=e[10],m=e[14],v=e[3],w=e[7],x=e[11],g=e[15];return v*(+s*l*f-r*c*f-s*a*p+i*c*p+r*a*m-i*l*m)+w*(+n*l*m-n*c*p+s*o*p-r*o*m+r*c*u-s*l*u)+x*(+n*c*f-n*a*m-s*o*f+i*o*m+s*a*u-i*c*u)+g*(-r*a*u-n*l*f+n*a*p+r*o*f-i*o*p+i*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=n,r[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],p=e[10],m=e[11],v=e[12],w=e[13],x=e[14],g=e[15],_=f*x*c-w*p*c+w*l*m-a*x*m-f*l*g+a*p*g,y=v*p*c-u*x*c-v*l*m+o*x*m+u*l*g-o*p*g,M=u*w*c-v*f*c+v*a*m-o*w*m-u*a*g+o*f*g,E=v*f*l-u*w*l-v*a*p+o*w*p+u*a*x-o*f*x,C=n*_+i*y+r*M+s*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/C;return e[0]=_*P,e[1]=(w*p*s-f*x*s-w*r*m+i*x*m+f*r*g-i*p*g)*P,e[2]=(a*x*s-w*l*s+w*r*c-i*x*c-a*r*g+i*l*g)*P,e[3]=(f*l*s-a*p*s-f*r*c+i*p*c+a*r*m-i*l*m)*P,e[4]=y*P,e[5]=(u*x*s-v*p*s+v*r*m-n*x*m-u*r*g+n*p*g)*P,e[6]=(v*l*s-o*x*s-v*r*c+n*x*c+o*r*g-n*l*g)*P,e[7]=(o*p*s-u*l*s+u*r*c-n*p*c-o*r*m+n*l*m)*P,e[8]=M*P,e[9]=(v*f*s-u*w*s-v*i*m+n*w*m+u*i*g-n*f*g)*P,e[10]=(o*w*s-v*a*s+v*i*c-n*w*c-o*i*g+n*a*g)*P,e[11]=(u*a*s-o*f*s-u*i*c+n*f*c+o*i*m-n*a*m)*P,e[12]=E*P,e[13]=(u*w*r-v*f*r+v*i*p-n*w*p-u*i*x+n*f*x)*P,e[14]=(v*a*r-o*w*r-v*i*l+n*w*l+o*i*x-n*a*x)*P,e[15]=(o*f*r-u*a*r+u*i*l-n*f*l-o*i*p+n*a*p)*P,this}scale(e){const n=this.elements,i=e.x,r=e.y,s=e.z;return n[0]*=i,n[4]*=r,n[8]*=s,n[1]*=i,n[5]*=r,n[9]*=s,n[2]*=i,n[6]*=r,n[10]*=s,n[3]*=i,n[7]*=r,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,r))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),r=Math.sin(n),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,n,r,1,0,0,0,0,1),this}compose(e,n,i){const r=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,u=o+o,f=a+a,p=s*c,m=s*u,v=s*f,w=o*u,x=o*f,g=a*f,_=l*c,y=l*u,M=l*f,E=i.x,C=i.y,P=i.z;return r[0]=(1-(w+g))*E,r[1]=(m+M)*E,r[2]=(v-y)*E,r[3]=0,r[4]=(m-M)*C,r[5]=(1-(p+g))*C,r[6]=(x+_)*C,r[7]=0,r[8]=(v+y)*P,r[9]=(x-_)*P,r[10]=(1-(p+w))*P,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,n,i){const r=this.elements;let s=Mu.set(r[0],r[1],r[2]).length();const o=Mu.set(r[4],r[5],r[6]).length(),a=Mu.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],Ls.copy(this);const c=1/s,u=1/o,f=1/a;return Ls.elements[0]*=c,Ls.elements[1]*=c,Ls.elements[2]*=c,Ls.elements[4]*=u,Ls.elements[5]*=u,Ls.elements[6]*=u,Ls.elements[8]*=f,Ls.elements[9]*=f,Ls.elements[10]*=f,n.setFromRotationMatrix(Ls),i.x=s,i.y=o,i.z=a,this}makePerspective(e,n,i,r,s,o,a=wo){const l=this.elements,c=2*s/(n-e),u=2*s/(i-r),f=(n+e)/(n-e),p=(i+r)/(i-r);let m,v;if(a===wo)m=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===wp)m=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,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,n,i,r,s,o,a=wo){const l=this.elements,c=1/(n-e),u=1/(i-r),f=1/(o-s),p=(n+e)*c,m=(i+r)*u;let v,w;if(a===wo)v=(o+s)*f,w=-2*f;else if(a===wp)v=s*f,w=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-p,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=w,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<16;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const Mu=new G,Ls=new Et,$H=new G(0,0,0),eG=new G(1,1,1),Oa=new G,k0=new G,Or=new G,yR=new Et,xR=new wi;class $p{constructor(e=0,n=0,i=0,r=$p.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,r=this._order){return this._x=e,this._y=n,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],u=r[9],f=r[2],p=r[6],m=r[10];switch(n){case"XYZ":this._y=Math.asin(Vn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,c
vendor: 7,179 bytes, line 71
71),this._z=0);break;case"YXZ":this._x=Math.asin(-Vn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Vn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Vn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Vn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,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,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return yR.makeRotationFromQuaternion(e),this.setFromRotationMatrix(yR,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return xR.setFromEuler(this),this.setFromQuaternion(xR,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+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}}$p.DEFAULT_ORDER="XYZ";class Tc{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 tG=0;const _R=new G,Eu=new wi,Ko=new Et,z0=new G,Wh=new G,nG=new G,iG=new wi,SR=new G(1,0,0),wR=new G(0,1,0),AR=new G(0,0,1),rG={type:"added"},sG={type:"removed"};class Kt extends As{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:tG++}),this.uuid=Jr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Kt.DEFAULT_UP.clone();const e=new G,n=new $p,i=new wi,r=new G(1,1,1);function s(){i.setFromEuler(n,!1)}function o(){n.setFromQuaternion(i,void 0,!1)}n._onChange(s),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Et},normalMatrix:{value:new Ft}}),this.matrix=new Et,this.matrixWorld=new Et,this.matrixAutoUpdate=Kt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=Kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.layers=new Tc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}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,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return Eu.setFromAxisAngle(e,n),this.quaternion.multiply(Eu),this}rotateOnWorldAxis(e,n){return Eu.setFromAxisAngle(e,n),this.quaternion.premultiply(Eu),this}rotateX(e){return this.rotateOnAxis(SR,e)}rotateY(e){return this.rotateOnAxis(wR,e)}rotateZ(e){return this.rotateOnAxis(AR,e)}translateOnAxis(e,n){return _R.copy(e).applyQuaternion(this.quaternion),this.position.add(_R.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(SR,e)}translateY(e){return this.translateOnAxis(wR,e)}translateZ(e){return this.translateOnAxis(AR,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Ko.copy(this.matrixWorld).invert())}lookAt(e,n,i){e.isVector3?z0.copy(e):z0.set(e,n,i);const r=this.parent;this.updateWorldMatrix(!0,!1),Wh.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ko.lookAt(Wh,z0,this.up):Ko.lookAt(z0,Wh,this.up),this.quaternion.setFromRotationMatrix(Ko),r&&(Ko.extractRotation(r.matrixWorld),Eu.setFromRotationMatrix(Ko),this.quaternion.premultiply(Eu.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);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.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(rG)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(sG)),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),Ko.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Ko.multiply(e.parent.matrixWorld)),e.applyMatrix4(Ko),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,n);if(o!==void 0)return o}}getObjectsByProperty(e,n){let i=[];this[e]===n&&i.push(this);for(let r=0,s=this.children.length;r<s;r++){const o=this.children[r].getObjectsByProperty(e,n);o.length>0&&(i=i.concat(o))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Wh,e,nG),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Wh,iG,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null&&(e(n),n.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
vendor: 35,905 bytes, line 71
71):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let i=0,r=n.length;i<r;i++){const s=n[i];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,n){const i=this.parent;if(e===!0&&i!==null&&i.matrixWorldAutoUpdate===!0&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),n===!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 n=e===void 0||typeof e=="string",i={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON()));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){const f=l[c];s(e.shapes,f)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(e.materials,this.material[l]));r.material=a}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];r.animations.push(s(e.animations,l))}}if(n){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),u=o(e.images),f=o(e.shapes),p=o(e.skeletons),m=o(e.animations),v=o(e.nodes);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),p.length>0&&(i.skeletons=p),m.length>0&&(i.animations=m),v.length>0&&(i.nodes=v)}return i.object=r,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}Kt.DEFAULT_UP=new G(0,1,0);Kt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Kt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Is=new G,Yo=new G,X_=new G,Qo=new G,Tu=new G,bu=new G,MR=new G,J_=new G,K_=new G,Y_=new G;let H0=!1;class wr{constructor(e=new G,n=new G,i=new G){this.a=e,this.b=n,this.c=i}static getNormal(e,n,i,r){r.subVectors(i,n),Is.subVectors(e,n),r.cross(Is);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,n,i,r,s){Is.subVectors(r,n),Yo.subVectors(i,n),X_.subVectors(e,n);const o=Is.dot(Is),a=Is.dot(Yo),l=Is.dot(X_),c=Yo.dot(Yo),u=Yo.dot(X_),f=o*c-a*a;if(f===0)return s.set(-2,-1,-1);const p=1/f,m=(c*l-a*u)*p,v=(o*u-a*l)*p;return s.set(1-m-v,v,m)}static containsPoint(e,n,i,r){return this.getBarycoord(e,n,i,r,Qo),Qo.x>=0&&Qo.y>=0&&Qo.x+Qo.y<=1}static getUV(e,n,i,r,s,o,a,l){return H0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),H0=!0),this.getInterpolation(e,n,i,r,s,o,a,l)}static getInterpolation(e,n,i,r,s,o,a,l){return this.getBarycoord(e,n,i,r,Qo),l.setScalar(0),l.addScaledVector(s,Qo.x),l.addScaledVector(o,Qo.y),l.addScaledVector(a,Qo.z),l}static isFrontFacing(e,n,i,r){return Is.subVectors(i,n),Yo.subVectors(e,n),Is.cross(Yo).dot(r)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,r){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,n,i,r){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Is.subVectors(this.c,this.b),Yo.subVectors(this.a,this.b),Is.cross(Yo).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return wr.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return wr.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,i,r,s){return H0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),H0=!0),wr.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}getInterpolation(e,n,i,r,s){return wr.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}containsPoint(e){return wr.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return wr.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,r=this.b,s=this.c;let o,a;Tu.subVectors(r,i),bu.subVectors(s,i),J_.subVectors(e,i);const l=Tu.dot(J_),c=bu.dot(J_);if(l<=0&&c<=0)return n.copy(i);K_.subVectors(e,r);const u=Tu.dot(K_),f=bu.dot(K_);if(u>=0&&f<=u)return n.copy(r);const p=l*f-u*c;if(p<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(i).addScaledVector(Tu,o);Y_.subVectors(e,s);const m=Tu.dot(Y_),v=bu.dot(Y_);if(v>=0&&m<=v)return n.copy(s);const w=m*c-l*v;if(w<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(i).addScaledVector(bu,a);const x=u*v-m*f;if(x<=0&&f-u>=0&&m-v>=0)return MR.subVectors(s,r),a=(f-u)/(f-u+(m-v)),n.copy(r).addScaledVector(MR,a);const g=1/(x+w+p);return o=w*g,a=p*g,n.copy(i).addScaledVector(Tu,o).addScaledVector(bu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let oG=0;class Kn extends As{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:oG++}),this.uuid=Jr(),this.name="",this.type="Material",this.blending=wc,this.side=Qs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=nE,this.blendDst=iE,this.blendEquation=ac,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=hp,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=hD,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=av,this.stencilZFail=av,this.stencilZPass=av,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 n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const r=this[n];if(r===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==wc&&(i.blending=this.blending),this.side!==Qs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let i=null;if(n!==null){const r=n.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=n[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.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++}}const ED={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},Ua={h:0,s:0,l:0},G0={h:0,s:0,l:0};function Q_(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}let He=class{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=jt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,cn.toWorkingColorSpace(this,n),this}setRGB(e,n,i,r=cn.workingColorSpace){return this.r=e,this.g=n,this.b=i,cn.toWorkingColorSpace(this,r),this}setHSL(e,n,i,r=cn.workingColorSpace){if(e=vE(e,1),n=Vn(n,0,1),i=Vn(i,0,1),n===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+n):i+n-i*n,o=2*i-s;this.r=Q_(o,s,e+1/3),this.g=Q_(o,s,e),this.b=Q_(o,s,e-1/3)}return cn.toWorkingColorSpace(this,r),this}setStyle(e,n=jt){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);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,n);if(o===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=jt){const i=ED[e.toLowerCase()];return i!==void 0?this.setHex(i,n):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=bf(e.r),this.g=bf(e.g),this.b=bf(e.b),this}copyLinearToSRGB(e){return this.r=U_(e.r),this.g=U_(e.g),this.b=U_(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jt){return cn.fromWorkingColorSpace(Gi.copy(this),e),Math.round(Vn(Gi.r*255,0,255))*65536+Math.round(Vn(Gi.g*255,0,255))*256+Math.round(Vn(Gi.b*255,0,255))}getHexString(e=jt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=cn.workingColorSpace){cn.fromWorkingColorSpace(Gi.copy(this),n);const i=Gi.r,r=Gi.g,s=Gi.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case i:l=(r-s)/f+(r<s?6:0);break;case r:l=(s-i)/f+2;break;case s:l=(i-r)/f+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,n=cn.workingColorSpace){return cn.fromWorkingColorSpace(Gi.copy(this),n),e.r=Gi.r,e.g=Gi.g,e.b=Gi.b,e}getStyle(e=jt){cn.fromWorkingColorSpace(Gi.copy(this),e);const n=Gi.r,i=Gi.g,r=Gi.b;return e!==jt?`color(${e} ${n.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,n,i){return this.getHSL(Ua),this.setHSL(Ua.h+e,Ua.s+n,Ua.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.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,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,i){return this.r=e.r+(n.r-e.r)*i,this.g=e.g+(n.g-e.g)*i,this.b=e.b+(n.b-e.b)*i,this}lerpHSL(e,n){this.getHSL(Ua),e.getHSL(G0);const i=Id(Ua.h,G0.h,n),r=Id(Ua.s,G0.s,n),s=Id(Ua.l,G0.l,n);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*n+s[3]*i+s[6]*r,this.g=s[1]*n+s[4]*i+s[7]*r,this.b=s[2]*n+s[5]*i+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}};const Gi=new He;He.NAMES=ED;class jr extends Kn{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.combine=Zp,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.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 ia=aG();function aG(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),i=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,r[l]=24,r[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,r[l]=-c-1,r[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,r[l]=13,r[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,s[l]=c|u}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:n,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function _r(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Vn(t,-65504,65504),ia.floatView[0]=t;const e=ia.uint32View[0],n=e>>23&511;return ia.baseTable[n]+((e&8388607)>>ia.shiftTable[n])}function hd(t){const e=t>>10;return ia.uint32View[0]=ia.mantissaTable[ia.offsetTable[e]+(t&1023)]+ia.exponentTable[e],ia.floatView[0]}const lG={toHalfFloat:_r,fromHalfFloat:hd},$n=new G,V0=new le;class Zt{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=Sp,this.updateRange={offset:0,count:-1},this.gpuType=Vs,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}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,n,i){e*=this.itemSize,i*=n.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=n.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,i=this.count;n<i;n++)V0.fromBufferAttribute(this,n),V0.applyMatrix3(e),this.setXY(n,V0.x,V0.y);else if(this.itemSize===3)for(let n=0,i=this.count;n<i;n++)$n.fromBufferAttribute(this,n),$n.applyMatrix3(e),this.setXYZ(n,$n.x,$n.y,$n.z);return this}applyMatrix4(e){for(let n=0,i=this.count;n<i;n++)$n.fromBufferAttribute(this,n),$n.applyMatrix4(e),this.setXYZ(n,$n.x,$n.y,$n.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)$n.fromBufferAttribute(this,n),$n.applyNormalMatrix(e),this.setXYZ(n,$n.x,$n.y,$n.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)$n.fromBufferAttribute(this,n),$n.transformDirection(e),this.setXYZ(n,$n.x,$n.y,$n.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let i=this.array[e*this.itemSize+n];return this.normalized&&(i=Er(i,this.array)),i}setComponent(e,n,i){return this.normalized&&(i=It(i,this.array)),this.array[e*this.itemSize+n]=i,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=Er(n,this.array)),n}setX(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=Er(n,this.array)),n}setY(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized&&(n=Er(n,this.array)),n}setZ(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized&&(n=Er(n,this.array)),n}setW(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=It(n,this.array),i=It(i,this.array)),this.array[e+0]=n,this.array[e+1]=i,this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=It(n,this.array),i=It(i,this.array),r=It(r,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=It(n,this.array),i=It(i,this.array),r=It(r,this.array),s=It(s,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Sp&&(e.usage=this.usage),(this.updateRange.offset!==0||this.updateRange.count!==-1)&&(e.updateRange=this.updateRange),e}}class cG extends Zt{constructor(e,n,i){super(new Int8Array(e),n,i)}}class uG extends Zt{constructor(e,n,i){super(new Uint8Array(e),n,i)}}class fG extends Zt{constructor(e,n,i){super(new Uint8ClampedArray(e),n,i)}}class hG extends Zt{constructor(e,n,i){super(new Int16Array(e),n,i)}}class _E extends Zt{constructor(e,n,i){super(new Uint16Array(e),n,i)}}class dG extends Zt{constructor(e,n,i){super(new Int32Array(e),n,i)}}class SE extends Zt{constructor(e,n,i){super(new Uint32Array(e),n,i)}}class pG extends Zt{constructor(e,n,i){super(new Uint16Array(e),n,i),this.isFloat16BufferAttribute=!0}getX(e){let n=hd(this.array[e*this.itemSize]);return this.normalized&&(n=Er(n,this.array)),n}setX(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize]=_r(n),this}getY(e){let n=hd(this.array[e*this.itemSize+1]);return this.normalized&&(n=Er(n,this.array)),n}setY(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize+1]=_r(n),this}getZ(e){let n=hd(this.array[e*this.itemSize+2]);return this.normalized&&(n=Er(n,this.array)),n}setZ(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize+2]=_r(n),this}getW(e){let n=hd(this.array[e*this.itemSize+3]);return this.normalized&&(n=Er(n,this.array)),n}setW(e,n){return this.normalized&&(n=It(n,this.array)),this.array[e*this.itemSize+3]=_r(n),this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=It(n,this.array),i=It(i,this.array)),this.array[e+0]=_r(n),this.array[e+1]=_r(i),this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=It(n,this.array),i=It(i,this.array),r=It(r,this.array)),this.array[e+0]=_r(n),this.array[e+1]=_r(i),this.array[e+2]=_r(r),this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=It(n,this.array),i=It(i,this.array),r=It(r,this.array),s=It(s,this.array)),this.array[e+0]=_r(n),this.array[e+1]=_r(i),this.array[e+2]=_r(r),this.array[e+3]=_r(s),this}}class lt extends Zt{constructor(e,n,i){super(new Float32Array(e),n,i)}}class mG extends Zt{constructor(e,n,i){super(new Float64Array(e),n,i)}}let gG=0;const ls=new Et,Z_=new Kt,Cu=new G,Ur=new eo,Xh=new eo,yi=new G;class Pt extends As{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:gG++}),this.uuid=Jr(),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(wD(e)?SE:_E)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,i=0){this.groups.push({start:e,count:n,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(e),n.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new Ft().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ls.makeRotationFromQuaternion(e),this.applyMatrix4(ls),this}rotateX(e){return ls.makeRotationX(e),this.applyMatrix4(ls),this}rotateY(e){return ls.makeRotationY(e),this.applyMatrix4(ls),this}rotateZ(e){return ls.makeRotationZ(e),this.applyMatrix4(ls),this}translate(e,n,i){return ls.makeTranslation(e,n,i),this.applyMatrix4(ls),this}scale(e,n,i){return ls.makeScale(e,n,i),this.applyMatrix4(ls),this}lookAt(e){return Z_.lookAt(e),Z_.updateMatrix(),this.applyMatrix4(Z_.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Cu).negate(),this.translate(Cu.x,Cu.y,Cu.z),this}setFromPoints(e){const n=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];n.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new lt(n,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new eo);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "fal
71se".',this),this.boundingBox.set(new G(-1/0,-1/0,-1/0),new G(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let i=0,r=n.length;i<r;i++){const s=n[i];Ur.setFromBufferAttribute(s),this.morphTargetsRelative?(yi.addVectors(this.boundingBox.min,Ur.min),this.boundingBox.expandByPoint(yi),yi.addVectors(this.boundingBox.max,Ur.max),this.boundingBox.expandByPoint(yi)):(this.boundingBox.expandByPoint(Ur.min),this.boundingBox.expandByPoint(Ur.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 Ms);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "fal
71se".',this),this.boundingSphere.set(new G,1/0);return}if(e){const i=this.boundingSphere.center;if(Ur.setFromBufferAttribute(e),n)for(let s=0,o=n.length;s<o;s++){const a=n[s];Xh.setFromBufferAttribute(a),this.morphTargetsRelative?(yi.addVectors(Ur.min,Xh.min),Ur.expandByPoint(yi),yi.addVectors(Ur.max,Xh.max),Ur.expandByPoint(yi)):(Ur.expandByPoint(Xh.min),Ur.expandByPoint(Xh.max))}Ur.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;s++)yi.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(yi));if(n)for(let s=0,o=n.length;s<o;s++){const a=n[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)yi.fromBufferAttribute(a,c),l&&(Cu.fromBufferAttribute(e,c),yi.add(Cu)),r=Math.max(r,i.distanceToSquared(yi))}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,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.array,r=n.position.array,s=n.normal.array,o=n.uv.array,a=r.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Zt(new Float32Array(4*a),4));const l=this.getAttribute("tangent").array,c=[],u=[];for(let L=0;L<a;L++)c[L]=new G,u[L]=new G;const f=new G,p=new G,m=new G,v=new le,w=new le,x=new le,g=new G,_=new G;function y(L,k,$){f.fromArray(r,L*3),p.fromArray(r,k*3),m.fromArray(r,$*3),v.fromArray(o,L*2),w.fromArray(o,k*2),x.fromArray(o,$*2),p.sub(f),m.sub(f),w.sub(v),x.sub(v);const ee=1/(w.x*x.y-x.x*w.y);isFinite(ee)&&(g.copy(p).multiplyScalar(x.y).addScaledVector(m,-w.y).multiplyScalar(ee),_.copy(m).multiplyScalar(w.x).addScaledVector(p,-x.x).multiplyScalar(ee),c[L].add(g),c[k].add(g),c[$].add(g),u[L].add(_),u[k].add(_),u[$].add(_))}let M=this.groups;M.length===0&&(M=[{start:0,count:i.length}]);for(let L=0,k=M.length;L<k;++L){const $=M[L],ee=$.start,D=$.count;for(let U=ee,z=ee+D;U<z;U+=3)y(i[U+0],i[U+1],i[U+2])}const E=new G,C=new G,P=new G,N=new G;function R(L){P.fromArray(s,L*3),N.copy(P);const k=c[L];E.copy(k),E.sub(P.multiplyScalar(P.dot(k))).normalize(),C.crossVectors(N,k);const ee=C.dot(u[L])<0?-1:1;l[L*4]=E.x,l[L*4+1]=E.y,l[L*4+2]=E.z,l[L*4+3]=ee}for(let L=0,k=M.length;L<k;++L){const $=M[L],ee=$.start,D=$.count;for(let U=ee,z=ee+D;U<z;U+=3)R(i[U+0]),R(i[U+1]),R(i[U+2])}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Zt(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let p=0,m=i.count;p<m;p++)i.setXYZ(p,0,0,0);const r=new G,s=new G,o=new G,a=new G,l=new G,c=new G,u=new G,f=new G;if(e)for(let p=0,m=e.count;p<m;p+=3){const v=e.getX(p+0),w=e.getX(p+1),x=e.getX(p+2);r.fromBufferAttribute(n,v),s.fromBufferAttribute(n,w),o.fromBufferAttribute(n,x),u.subVectors(o,s),f.subVectors(r,s),u.cross(f),a.fromBufferAttribute(i,v),l.fromBufferAttribute(i,w),c.fromBufferAttribute(i,x),a.add(u),l.add(u),c.add(u),i.setXYZ(v,a.x,a.y,a.z),i.setXYZ(w,l.x,l.y,l.z),i.setXYZ(x,c.x,c.y,c.z)}else for(let p=0,m=n.count;p<m;p+=3)r.fromBufferAttribute(n,p+0),s.fromBufferAttribute(n,p+1),o.fromBufferAttribute(n,p+2),u.subVectors(o,s),f.subVectors(r,s),u.cross(f),i.setXYZ(p+0,u.x,u.y,u.z),i.setXYZ(p+1,u.x,u.y,u.z),i.setXYZ(p+2,u.x,u.y,u.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,i=e.count;n<i;n++)yi.fromBufferAttribute(e,n),yi.normalize(),e.setXYZ(n,yi.x,yi.y,yi.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,f=a.normalized,p=new c.constructor(l.length*u);let m=0,v=0;for(let w=0,x=l.length;w<x;w++){a.isInterleavedBufferAttribute?m=l[w]*a.data.stride+a.offset:m=l[w]*u;for(let g=0;g<u;g++)p[v++]=c[m++]}return new Zt(p,u,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new Pt,i=this.index.array,r=this.attributes;for(const a in r){const l=r[a],c=e(l,i);n.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let u=0,f=c.length;u<f;u++){const p=c[u],m=e(p,i);l.push(m)}n.morphAttributes[a]=l}n.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addGroup(c.start,c.count,c.materialIndex)}return n}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 20,263 bytes, lines 71-110
71if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,p=c.length;f<p;f++){const m=c[f];u.push(m.toJSON(e.data))}u.length>0&&(r[l]=u,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 n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(n));const r=e.attributes;for(const c in r){const u=r[c];this.setAttribute(c,u.clone(n))}const s=e.morphAttributes;for(const c in s){const u=[],f=s[c];for(let p=0,m=f.length;p<m;p++)u.push(f[p].clone(n));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,u=o.length;c<u;c++){const f=o[c];this.addGroup(f.start,f.count,f.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 ER=new Et,Gl=new $c,j0=new Ms,TR=new G,Ru=new G,Pu=new G,Bu=new G,q_=new G,W0=new G,X0=new le,J0=new le,K0=new le,bR=new G,CR=new G,RR=new G,Y0=new G,Q0=new G;class ui extends Kt{constructor(e=new Pt,n=new jr){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),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 n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(e,n){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,o=i.morphTargetsRelative;n.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){W0.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],f=s[l];u!==0&&(q_.fromBufferAttribute(f,e),o?W0.addScaledVector(q_,u):W0.addScaledVector(q_.sub(n),u))}n.add(W0)}return n}raycast(e,n){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),j0.copy(i.boundingSphere),j0.applyMatrix4(s),Gl.copy(e.ray).recast(e.near),!(j0.containsPoint(Gl.origin)===!1&&(Gl.intersectSphere(j0,TR)===null||Gl.origin.distanceToSquared(TR)>(e.far-e.near)**2))&&(ER.copy(s).invert(),Gl.copy(e.ray).applyMatrix4(ER),!(i.boundingBox!==null&&Gl.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,Gl)))}_computeIntersections(e,n,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,f=s.attributes.normal,p=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,w=p.length;v<w;v++){const x=p[v],g=o[x.materialIndex],_=Math.max(x.start,m.start),y=Math.min(a.count,Math.min(x.start+x.count,m.start+m.count));for(let M=_,E=y;M<E;M+=3){const C=a.getX(M),P=a.getX(M+1),N=a.getX(M+2);r=Z0(this,g,e,i,c,u,f,C,P,N),r&&(r.faceIndex=Math.floor(M/3),r.face.materialIndex=x.materialIndex,n.push(r))}}else{const v=Math.max(0,m.start),w=Math.min(a.count,m.start+m.count);for(let x=v,g=w;x<g;x+=3){const _=a.getX(x),y=a.getX(x+1),M=a.getX(x+2);r=Z0(this,o,e,i,c,u,f,_,y,M),r&&(r.faceIndex=Math.floor(x/3),n.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,w=p.length;v<w;v++){const x=p[v],g=o[x.materialIndex],_=Math.max(x.start,m.start),y=Math.min(l.count,Math.min(x.start+x.count,m.start+m.count));for(let M=_,E=y;M<E;M+=3){const C=M,P=M+1,N=M+2;r=Z0(this,g,e,i,c,u,f,C,P,N),r&&(r.faceIndex=Math.floor(M/3),r.face.materialIndex=x.materialIndex,n.push(r))}}else{const v=Math.max(0,m.start),w=Math.min(l.count,m.start+m.count);for(let x=v,g=w;x<g;x+=3){const _=x,y=x+1,M=x+2;r=Z0(this,o,e,i,c,u,f,_,y,M),r&&(r.faceIndex=Math.floor(x/3),n.push(r))}}}}function vG(t,e,n,i,r,s,o,a){let l;if(e.side===ci?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===Qs,a),l===null)return null;Q0.copy(a),Q0.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(Q0);return c<n.near||c>n.far?null:{distance:c,point:Q0.clone(),object:t}}function Z0(t,e,n,i,r,s,o,a,l,c){t.getVertexPosition(a,Ru),t.getVertexPosition(l,Pu),t.getVertexPosition(c,Bu);const u=vG(t,e,n,i,Ru,Pu,Bu,Y0);if(u){r&&(X0.fromBufferAttribute(r,a),J0.fromBufferAttribute(r,l),K0.fromBufferAttribute(r,c),u.uv=wr.getInterpolation(Y0,Ru,Pu,Bu,X0,J0,K0,new le)),s&&(X0.fromBufferAttribute(s,a),J0.fromBufferAttribute(s,l),K0.fromBufferAttribute(s,c),u.uv1=wr.getInterpolation(Y0,Ru,Pu,Bu,X0,J0,K0,new le),u.uv2=u.uv1),o&&(bR.fromBufferAttribute(o,a),CR.fromBufferAttribute(o,l),RR.fromBufferAttribute(o,c),u.normal=wr.getInterpolation(Y0,Ru,Pu,Bu,bR,CR,RR,new G),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const f={a,b:l,c,normal:new G,materialIndex:0};wr.getNormal(Ru,Pu,Bu,f.normal),u.face=f}return u}class eu extends Pt{constructor(e=1,n=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],f=[];let p=0,m=0;v("z","y","x",-1,-1,i,n,e,o,s,0),v("z","y","x",1,-1,i,n,-e,o,s,1),v("x","z","y",1,1,e,i,n,r,o,2),v("x","z","y",1,-1,e,i,-n,r,o,3),v("x","y","z",1,-1,e,n,i,r,s,4),v("x","y","z",-1,-1,e,n,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new lt(c,3)),this.setAttribute("normal",new lt(u,3)),this.setAttribute("uv",new lt(f,2));function v(w,x,g,_,y,M,E,C,P,N,R){const L=M/P,k=E/N,$=M/2,ee=E/2,D=C/2,U=P+1,z=N+1;let Y=0,O=0;const H=new G;for(let W=0;W<z;W++){const j=W*k-ee;for(let Z=0;Z<U;Z++){const re=Z*L-$;H[w]=re*_,H[x]=j*y,H[g]=D,c.push(H.x,H.y,H.z),H[w]=0,H[x]=0,H[g]=C>0?1:-1,u.push(H.x,H.y,H.z),f.push(Z/P),f.push(1-W/N),Y+=1}}for(let W=0;W<N;W++)for(let j=0;j<P;j++){const Z=p+j+U*W,re=p+j+U*(W+1),ue=p+(j+1)+U*(W+1),ve=p+(j+1)+U*W;l.push(Z,re,ve),l.push(re,ue,ve),O+=6}a.addGroup(m,O,R),m+=O,p+=Y}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new eu(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Wf(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][i]=null):e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function nr(t){const e={};for(let n=0;n<t.length;n++){const i=Wf(t[n]);for(const r in i)e[r]=i[r]}return e}function yG(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function TD(t){return t.getRenderTarget()===null?t.outputColorSpace:cn.workingColorSpace}const bD={clone:Wf,merge:nr};var xG=`void main() {
72	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
73}`,_G=`void main() {
74	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
75}`;class Yn extends Kn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=xG,this.fragmentShader=_G,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!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=Wf(e.uniforms),this.uniformsGroups=yG(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 n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?n.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[r]={type:"m4",value:o.toArray()}:n.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class em extends Kt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Et,this.projectionMatrix=new Et,this.projectionMatrixInverse=new Et,this.coordinateSystem=wo}copy(e,n){return super.copy(e,n),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,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class xn extends em{constructor(e=50,n=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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 n=.5*this.getFilmHeight()/e;this.fov=jf*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Mc*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return jf*2*Math.atan(Math.tan(Mc*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,i,r,s,o){this.aspect=e/n,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=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Mc*.5*this.fov)/this.zoom,i=2*n,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,n-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Lu=-90,Iu=1;class CD extends Kt{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new xn(Lu,Iu,e,n);r.layers=this.layers,this.add(r);const s=new xn(Lu,Iu,e,n);s.layers=this.layers,this.add(s);const o=new xn(Lu,Iu,e,n);o.layers=this.layers,this.add(o);const a=new xn(Lu,Iu,e,n);a.layers=this.layers,this.add(a);const l=new xn(Lu,Iu,e,n);l.layers=this.layers,this.add(l);const c=new xn(Lu,Iu,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,r,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===wo)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===wp)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,f=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const w=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(n,s),e.setRenderTarget(i,1,r),e.render(n,o),e.setRenderTarget(i,2,r),e.render(n,a),e.setRenderTarget(i,3,r),e.render(n,l),e.setRenderTarget(i,4,r),e.render(n,c),i.texture.generateMipmaps=w,e.setRenderTarget(i,5,r),e.render(n,u),e.setRenderTarget(f,p,m),e.xr.enabled=v,i.texture.needsPMREMUpdate=!0}}class tm extends Mn{constructor(e,n,i,r,s,o,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:va,super(e,n,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class RD extends Fn{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];n.encoding!==void 0&&(Nd("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===hl?jt:ar),this.texture=new tm(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:gn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`
76
77				varying vec3 vWorldDirection;
78
79				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
80
81					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
82
83				}
84
85				void main() {
86
87					vWorldDirection = transformDirection( position, modelMatrix );
88
89					#include <begin_vertex>
90					#include <project_vertex>
91
92				}
93			`,fragmentShader:`
94
95				uniform sampler2D tEquirect;
96
97				varying vec3 vWorldDirection;
98
99				#include <common>
100
101				void main() {
102
103					vec3 direction = normalize( vWorldDirection );
104
105					vec2 sampleUV = equirectUv( direction );
106
107					gl_FragColor = texture2D( tEquirect, sampleUV );
108
109				}
110			`},r=new eu(5,5,5),s=new Yn({name:"CubemapFromEquirect",uniforms:Wf(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:ci,blending:Pi});s.uniforms.tEquirect.value=n;const o=new ui(r,s),a=n.minFilter;return n.minFilter===Po&&(n.minFilter=gn),new CD(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,i,r);e.setRenderTarget(s)}}const $_=new G,SG=new G,wG=new Ft;class ta{constructor(e=new G(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,r){return this.normal.set(e,n,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const r=$_.subVectors(i,n).cross(SG.subVectors(e,n)).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,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const i=e.delta($_),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:n.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>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,n){const i=n||wG.getNormalMatrix(e),r=this.coplanarPoint($_).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Vl=new Ms,q0=new G;class wy{constructor(e=new ta,n=new ta,i=new ta,r=new ta,s=new ta,o=new ta){this.planes=[e,n,i,r,s,o]}set(e,n,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=wo){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],f=r[6],p=r[7],m=r[8],v=r[9],w=r[10],x=r[11],g=r[12],_=r[13],y=r[14],M=r[15];if(i[0].setComponents(l-s,p-c,x-m,M-g).normalize(),i[1].setComponents(l+s,p+c,x+m,M+g).normalize(),i[2].setComponents(l+o,p+u,x+v,M+_).normalize(),i[3].setComponents(l-o,p-u,x-v,M-_).normalize(),i[4].setComponents(l-a,p-f,x-w,M-y).normalize(),n===wo)i[5].setComponents(l+a,p+f,x+w,M+y).normalize();else if(n===wp)i[5].setComponents(a,f,w,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Vl.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Vl.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Vl)}
vendor: 5,226 bytes, lines 110-158
110intersectsSprite(e){return Vl.center.set(0,0,0),Vl.radius=.7071067811865476,Vl.applyMatrix4(e.matrixWorld),this.intersectsSphere(Vl)}intersectsSphere(e){const n=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const n=this.planes;for(let i=0;i<6;i++){const r=n[i];if(q0.x=r.normal.x>0?e.max.x:e.min.x,q0.y=r.normal.y>0?e.max.y:e.min.y,q0.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(q0)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function PD(){let t=null,e=!1,n=null,i=null;function r(s,o){n(s,o),i=t.requestAnimationFrame(r)}return{start:function(){e!==!0&&n!==null&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function AG(t,e){const n=e.isWebGL2,i=new WeakMap;function r(c,u){const f=c.array,p=c.usage,m=t.createBuffer();t.bindBuffer(u,m),t.bufferData(u,f,p),c.onUploadCallback();let v;if(f instanceof Float32Array)v=t.FLOAT;else if(f instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)v=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else v=t.UNSIGNED_SHORT;else if(f instanceof Int16Array)v=t.SHORT;else if(f instanceof Uint32Array)v=t.UNSIGNED_INT;else if(f instanceof Int32Array)v=t.INT;else if(f instanceof Int8Array)v=t.BYTE;else if(f instanceof Uint8Array)v=t.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)v=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:m,type:v,bytesPerElement:f.BYTES_PER_ELEMENT,version:c.version}}function s(c,u,f){const p=u.array,m=u.updateRange;t.bindBuffer(f,c),m.count===-1?t.bufferSubData(f,0,p):(n?t.bufferSubData(f,m.offset*p.BYTES_PER_ELEMENT,p,m.offset,m.count):t.bufferSubData(f,m.offset*p.BYTES_PER_ELEMENT,p.subarray(m.offset,m.offset+m.count)),m.count=-1),u.onUploadCallback()}function o(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=i.get(c);u&&(t.deleteBuffer(u.buffer),i.delete(c))}function l(c,u){if(c.isGLBufferAttribute){const p=i.get(c);(!p||p.version<c.version)&&i.set(c,{buffer:c.buffer,type:c.type,bytesPerElement:c.elementSize,version:c.version});return}c.isInterleavedBufferAttribute&&(c=c.data);const f=i.get(c);f===void 0?i.set(c,r(c,u)):f.version<c.version&&(s(f.buffer,c,u),f.version=c.version)}return{get:o,remove:a,update:l}}class nm extends Pt{constructor(e=1,n=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:i,heightSegments:r};const s=e/2,o=n/2,a=Math.floor(i),l=Math.floor(r),c=a+1,u=l+1,f=e/a,p=n/l,m=[],v=[],w=[],x=[];for(let g=0;g<u;g++){const _=g*p-o;for(let y=0;y<c;y++){const M=y*f-s;v.push(M,-_,0),w.push(0,0,1),x.push(y/a),x.push(1-g/l)}}for(let g=0;g<l;g++)for(let _=0;_<a;_++){const y=_+c*g,M=_+c*(g+1),E=_+1+c*(g+1),C=_+1+c*g;m.push(y,M,C),m.push(M,E,C)}this.setIndex(m),this.setAttribute("position",new lt(v,3)),this.setAttribute("normal",new lt(w,3)),this.setAttribute("uv",new lt(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nm(e.width,e.height,e.widthSegments,e.heightSegments)}}var MG=`#ifdef USE_ALPHAHASH
111	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
112#endif`,EG=`#ifdef USE_ALPHAHASH
113	const float ALPHA_HASH_SCALE = 0.05;
114	float hash2D( vec2 value ) {
115		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
116	}
117	float hash3D( vec3 value ) {
118		return hash2D( vec2( hash2D( value.xy ), value.z ) );
119	}
120	float getAlphaHashThreshold( vec3 position ) {
121		float maxDeriv = max(
122			length( dFdx( position.xyz ) ),
123			length( dFdy( position.xyz ) )
124		);
125		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
126		vec2 pixScales = vec2(
127			exp2( floor( log2( pixScale ) ) ),
128			exp2( ceil( log2( pixScale ) ) )
129		);
130		vec2 alpha = vec2(
131			hash3D( floor( pixScales.x * position.xyz ) ),
132			hash3D( floor( pixScales.y * position.xyz ) )
133		);
134		float lerpFactor = fract( log2( pixScale ) );
135		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
136		float a = min( lerpFactor, 1.0 - lerpFactor );
137		vec3 cases = vec3(
138			x * x / ( 2.0 * a * ( 1.0 - a ) ),
139			( x - 0.5 * a ) / ( 1.0 - a ),
140			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
141		);
142		float threshold = ( x < ( 1.0 - a ) )
143			? ( ( x < a ) ? cases.x : cases.y )
144			: cases.z;
145		return clamp( threshold , 1.0e-6, 1.0 );
146	}
147#endif`,TG=`#ifdef USE_ALPHAMAP
148	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
149#endif`,bG=`#ifdef USE_ALPHAMAP
150	uniform sampler2D alphaMap;
151#endif`,CG=`#ifdef USE_ALPHATEST
152	if ( diffuseColor.a < alphaTest ) discard;
153#endif`,RG=`#ifdef USE_ALPHATEST
154	uniform float alphaTest;
155#endif`,PG=`#ifdef USE_AOMAP
156	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
157	reflectedLight.indirectDiffuse *= ambientOcclusion;
158	#if defined( USE_ENVMAP ) && defined( STANDARD )
159		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
160		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
161	#endif
162#endif`,BG=`#ifdef USE_AOMAP
163	uniform sampler2D aoMap;
164	uniform float aoMapIntensity;
165#endif`,LG=`vec3 transformed = vec3( position );
166#ifdef USE_ALPHAHASH
167	vPosition = vec3( position );
168#endif`,IG=`vec3 objectNormal = vec3( normal );
169#ifdef USE_TANGENT
170	vec3 objectTangent = vec3( tangent.xyz );
171#endif`,NG=`float G_BlinnPhong_Implicit( ) {
172	return 0.25;
173}
174float D_BlinnPhong( const in float shininess, const in float dotNH ) {
175	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
176}
177vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
178	vec3 halfDir = normalize( lightDir + viewDir );
179	float dotNH = saturate( dot( normal, halfDir ) );
180	float dotVH = saturate( dot( viewDir, halfDir ) );
181	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
182	float G = G_BlinnPhong_Implicit( );
183	float D = D_BlinnPhong( shininess, dotNH );
184	return F * ( G * D );
185} // validated`,DG=`#ifdef USE_IRIDESCENCE
186	const mat3 XYZ_TO_REC709 = mat3(
187		 3.2404542, -0.9692660,  0.0556434,
188		-1.5371385,  1.8760108, -0.2040259,
189		-0.4985314,  0.0415560,  1.0572252
190	);
191	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
192		vec3 sqrtF0 = sqrt( fresnel0 );
193		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
194	}
195	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
196		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
197	}
198	float IorToFresnel0( float transmittedIor, float incidentIor ) {
199		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
200	}
201	vec3 evalSensitivity( float OPD, vec3 shift ) {
202		float phase = 2.0 * PI * OPD * 1.0e-9;
203		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
204		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
205		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
206		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
207		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 ) );
208		xyz /= 1.0685e-7;
209		vec3 rgb = XYZ_TO_REC709 * xyz;
210		return rgb;
211	}
212	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
213		vec3 I;
214		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
215		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
216		float cosTheta2Sq = 1.0 - sinTheta2Sq;
217		if ( cosTheta2Sq < 0.0 ) {
218			return vec3( 1.0 );
219		}
220		float cosTheta2 = sqrt( cosTheta2Sq );
221		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
222		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
223		float T121 = 1.0 - R12;
224		float phi12 = 0.0;
225		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
226		float phi21 = PI - phi12;
227		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
228		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
229		vec3 phi23 = vec3( 0.0 );
230		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
231		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
232		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
233		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
234		vec3 phi = vec3( phi21 ) + phi23;
235		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
236		vec3 r123 = sqrt( R123 );
237		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
238		vec3 C0 = R12 + Rs;
239		I = C0;
240		vec3 Cm = Rs - T121;
241		for ( int m = 1; m <= 2; ++ m ) {
242			Cm *= r123;
243			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
244			I += Cm * Sm;
245		}
246		return max( I, vec3( 0.0 ) );
247	}
248#endif`,FG=`#ifdef USE_BUMPMAP
249	uniform sampler2D bumpMap;
250	uniform float bumpScale;
251	vec2 dHdxy_fwd() {
252		vec2 dSTdx = dFdx( vBumpMapUv );
253		vec2 dSTdy = dFdy( vBumpMapUv );
254		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
255		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
256		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
257		return vec2( dBx, dBy );
258	}
259	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
260		vec3 vSigmaX = dFdx( surf_pos.xyz );
261		vec3 vSigmaY = dFdy( surf_pos.xyz );
262		vec3 vN = surf_norm;
263		vec3 R1 = cross( vSigmaY, vN );
264		vec3 R2 = cross( vN, vSigmaX );
265		float fDet = dot( vSigmaX, R1 ) * faceDirection;
266		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
267		return normalize( abs( fDet ) * surf_norm - vGrad );
268	}
269#endif`,OG=`#if NUM_CLIPPING_PLANES > 0
270	vec4 plane;
271	#pragma unroll_loop_start
272	for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
273		plane = clippingPlanes[ i ];
274		if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
275	}
276	#pragma unroll_loop_end
277	#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
278		bool clipped = true;
279		#pragma unroll_loop_start
280		for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
281			plane = clippingPlanes[ i ];
282			clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
283		}
284		#pragma unroll_loop_end
285		if ( clipped ) discard;
286	#endif
287#endif`,UG=`#if NUM_CLIPPING_PLANES > 0
288	varying vec3 vClipPosition;
289	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
290#endif`,kG=`#if NUM_CLIPPING_PLANES > 0
291	varying vec3 vClipPosition;
292#endif`,zG=`#if NUM_CLIPPING_PLANES > 0
293	vClipPosition = - mvPosition.xyz;
294#endif`,HG=`#if defined( USE_COLOR_ALPHA )
295	diffuseColor *= vColor;
296#elif defined( USE_COLOR )
297	diffuseColor.rgb *= vColor;
298#endif`,GG=`#if defined( USE_COLOR_ALPHA )
299	varying vec4 vColor;
300#elif defined( USE_COLOR )
301	varying vec3 vColor;
302#endif`,VG=`#if defined( USE_COLOR_ALPHA )
303	varying vec4 vColor;
304#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
305	varying vec3 vColor;
306#endif`,jG=`#if defined( USE_COLOR_ALPHA )
307	vColor = vec4( 1.0 );
308#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
309	vColor = vec3( 1.0 );
310#endif
311#ifdef USE_COLOR
312	vColor *= color;
313#endif
314#ifdef USE_INSTANCING_COLOR
315	vColor.xyz *= instanceColor.xyz;
316#endif`,WG=`#define PI 3.141592653589793
317#define PI2 6.283185307179586
318#define PI_HALF 1.5707963267948966
319#define RECIPROCAL_PI 0.3183098861837907
320#define RECIPROCAL_PI2 0.15915494309189535
321#define EPSILON 1e-6
322#ifndef saturate
323#define saturate( a ) clamp( a, 0.0, 1.0 )
324#endif
325#define whiteComplement( a ) ( 1.0 - saturate( a ) )
326float pow2( const in float x ) { return x*x; }
327vec3 pow2( const in vec3 x ) { return x*x; }
328float pow3( const in float x ) { return x*x*x; }
329float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
330float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
331float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
332highp float rand( const in vec2 uv ) {
333	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
334	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
335	return fract( sin( sn ) * c );
336}
337#ifdef HIGH_PRECISION
338	float precisionSafeLength( vec3 v ) { return length( v ); }
339#else
340	float precisionSafeLength( vec3 v ) {
341		float maxComponent = max3( abs( v ) );
342		return length( v / maxComponent ) * maxComponent;
343	}
344#endif
345struct IncidentLight {
346	vec3 color;
347	vec3 direction;
348	bool visible;
349};
350struct ReflectedLight {
351	vec3 directDiffuse;
352	vec3 directSpecular;
353	vec3 indirectDiffuse;
354	vec3 indirectSpecular;
355};
356#ifdef USE_ALPHAHASH
357	varying vec3 vPosition;
358#endif
359vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
360	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
361}
362vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
363	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
364}
365mat3 transposeMat3( const in mat3 m ) {
366	mat3 tmp;
367	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
368	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
369	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
370	return tmp;
371}
372float luminance( const in vec3 rgb ) {
373	const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );
374	return dot( weights, rgb );
375}
376bool isPerspectiveMatrix( mat4 m ) {
377	return m[ 2 ][ 3 ] == - 1.0;
378}
379vec2 equirectUv( in vec3 dir ) {
380	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
381	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
382	return vec2( u, v );
383}
384vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
385	return RECIPROCAL_PI * diffuseColor;
386}
387vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
388	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
389	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
390}
391float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
392	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
393	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
394} // validated`,XG=`#ifdef ENVMAP_TYPE_CUBE_UV
395	#define cubeUV_minMipLevel 4.0
396	#define cubeUV_minTileSize 16.0
397	float getFace( vec3 direction ) {
398		vec3 absDirection = abs( direction );
399		float face = - 1.0;
400		if ( absDirection.x > absDirection.z ) {
401			if ( absDirection.x > absDirection.y )
402				face = direction.x > 0.0 ? 0.0 : 3.0;
403			else
404				face = direction.y > 0.0 ? 1.0 : 4.0;
405		} else {
406			if ( absDirection.z > absDirection.y )
407				face = direction.z > 0.0 ? 2.0 : 5.0;
408			else
409				face = direction.y > 0.0 ? 1.0 : 4.0;
410		}
411		return face;
412	}
413	vec2 getUV( vec3 direction, float face ) {
414		vec2 uv;
415		if ( face == 0.0 ) {
416			uv = vec2( direction.z, direction.y ) / abs( direction.x );
417		} else if ( face == 1.0 ) {
418			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
419		} else if ( face == 2.0 ) {
420			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
421		} else if ( face == 3.0 ) {
422			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
423		} else if ( face == 4.0 ) {
424			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
425		} else {
426			uv = vec2( direction.x, direction.y ) / abs( direction.z );
427		}
428		return 0.5 * ( uv + 1.0 );
429	}
430	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
431		float face = getFace( direction );
432		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
433		mipInt = max( mipInt, cubeUV_minMipLevel );
434		float faceSize = exp2( mipInt );
435		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
436		if ( face > 2.0 ) {
437			uv.y += faceSize;
438			face -= 3.0;
439		}
440		uv.x += face * faceSize;
441		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
442		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
443		uv.x *= CUBEUV_TEXEL_WIDTH;
444		uv.y *= CUBEUV_TEXEL_HEIGHT;
445		#ifdef texture2DGradEXT
446			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
447		#else
448			return texture2D( envMap, uv ).rgb;
449		#endif
450	}
451	#define cubeUV_r0 1.0
452	#define cubeUV_v0 0.339
453	#define cubeUV_m0 - 2.0
454	#define cubeUV_r1 0.8
455	#define cubeUV_v1 0.276
456	#define cubeUV_m1 - 1.0
457	#define cubeUV_r4 0.4
458	#define cubeUV_v4 0.046
459	#define cubeUV_m4 2.0
460	#define cubeUV_r5 0.305
461	#define cubeUV_v5 0.016
462	#define cubeUV_m5 3.0
463	#define cubeUV_r6 0.21
464	#define cubeUV_v6 0.0038
465	#define cubeUV_m6 4.0
466	float roughnessToMip( float roughness ) {
467		float mip = 0.0;
468		if ( roughness >= cubeUV_r1 ) {
469			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
470		} else if ( roughness >= cubeUV_r4 ) {
471			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
472		} else if ( roughness >= cubeUV_r5 ) {
473			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
474		} else if ( roughness >= cubeUV_r6 ) {
475			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
476		} else {
477			mip = - 2.0 * log2( 1.16 * roughness );		}
478		return mip;
479	}
480	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
481		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
482		float mipF = fract( mip );
483		float mipInt = floor( mip );
484		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
485		if ( mipF == 0.0 ) {
486			return vec4( color0, 1.0 );
487		} else {
488			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
489			return vec4( mix( color0, color1, mipF ), 1.0 );
490		}
491	}
492#endif`,JG=`vec3 transformedNormal = objectNormal;
493#ifdef USE_INSTANCING
494	mat3 m = mat3( instanceMatrix );
495	transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );
496	transformedNormal = m * transformedNormal;
497#endif
498transformedNormal = normalMatrix * transformedNormal;
499#ifdef FLIP_SIDED
500	transformedNormal = - transformedNormal;
501#endif
502#ifdef USE_TANGENT
503	vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;
504	#ifdef FLIP_SIDED
505		transformedTangent = - transformedTangent;
506	#endif
507#endif`,KG=`#ifdef USE_DISPLACEMENTMAP
508	uniform sampler2D displacementMap;
509	uniform float displacementScale;
510	uniform float displacementBias;
511#endif`,YG=`#ifdef USE_DISPLACEMENTMAP
512	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
512placementBias );
513#endif`,QG=`#ifdef USE_EMISSIVEMAP
514	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
515	totalEmissiveRadiance *= emissiveColor.rgb;
516#endif`,ZG=`#ifdef USE_EMISSIVEMAP
517	uniform sampler2D emissiveMap;
518#endif`,qG="gl_FragColor = linearToOutputTexel( gl_FragColor );",$G=`
519const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(
520	vec3( 0.8224621, 0.177538, 0.0 ),
521	vec3( 0.0331941, 0.9668058, 0.0 ),
522	vec3( 0.0170827, 0.0723974, 0.9105199 )
523);
524const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(
525	vec3( 1.2249401, - 0.2249404, 0.0 ),
526	vec3( - 0.0420569, 1.0420571, 0.0 ),
527	vec3( - 0.0196376, - 0.0786361, 1.0982735 )
528);
529vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {
530	return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );
531}
532vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {
533	return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );
534}
535vec4 LinearTransferOETF( in vec4 value ) {
536	return value;
537}
538vec4 sRGBTransferOETF( in vec4 value ) {
539	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 );
540}
541vec4 LinearToLinear( in vec4 value ) {
542	return value;
543}
544vec4 LinearTosRGB( in vec4 value ) {
545	return sRGBTransferOETF( value );
546}`,eV=`#ifdef USE_ENVMAP
547	#ifdef ENV_WORLDPOS
548		vec3 cameraToFrag;
549		if ( isOrthographic ) {
550			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
551		} else {
552			cameraToFrag = normalize( vWorldPosition - cameraPosition );
553		}
554		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
555		#ifdef ENVMAP_MODE_REFLECTION
556			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
557		#else
558			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
559		#endif
560	#else
561		vec3 reflectVec = vReflect;
562	#endif
563	#ifdef ENVMAP_TYPE_CUBE
564		vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
565	#else
566		vec4 envColor = vec4( 0.0 );
567	#endif
568	#ifdef ENVMAP_BLENDING_MULTIPLY
569		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
570	#elif defined( ENVMAP_BLENDING_MIX )
571		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
572	#elif defined( ENVMAP_BLENDING_ADD )
573		outgoingLight += envColor.xyz * specularStrength * reflectivity;
574	#endif
575#endif`,tV=`#ifdef USE_ENVMAP
576	uniform float envMapIntensity;
577	uniform float flipEnvMap;
578	#ifdef ENVMAP_TYPE_CUBE
579		uniform samplerCube envMap;
580	#else
581		uniform sampler2D envMap;
582	#endif
583	
584#endif`,nV=`#ifdef USE_ENVMAP
585	uniform float reflectivity;
586	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
587		#define ENV_WORLDPOS
588	#endif
589	#ifdef ENV_WORLDPOS
590		varying vec3 vWorldPosition;
591		uniform float refractionRatio;
592	#else
593		varying vec3 vReflect;
594	#endif
595#endif`,iV=`#ifdef USE_ENVMAP
596	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
597		#define ENV_WORLDPOS
598	#endif
599	#ifdef ENV_WORLDPOS
600		
601		varying vec3 vWorldPosition;
602	#else
603		varying vec3 vReflect;
604		uniform float refractionRatio;
605	#endif
606#endif`,rV=`#ifdef USE_ENVMAP
607	#ifdef ENV_WORLDPOS
608		vWorldPosition = worldPosition.xyz;
609	#else
610		vec3 cameraToVertex;
611		if ( isOrthographic ) {
612			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
613		} else {
614			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
615		}
616		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
617		#ifdef ENVMAP_MODE_REFLECTION
618			vReflect = reflect( cameraToVertex, worldNormal );
619		#else
620			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
621		#endif
622	#endif
623#endif`,sV=`#ifdef USE_FOG
624	vFogDepth = - mvPosition.z;
625#endif`,oV=`#ifdef USE_FOG
626	varying float vFogDepth;
627#endif`,aV=`#ifdef USE_FOG
628	#ifdef FOG_EXP2
629		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
630	#else
631		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
632	#endif
633	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
634#endif`,lV=`#ifdef USE_FOG
635	uniform vec3 fogColor;
636	varying float vFogDepth;
637	#ifdef FOG_EXP2
638		uniform float fogDensity;
639	#else
640		uniform float fogNear;
641		uniform float fogFar;
642	#endif
643#endif`,cV=`#ifdef USE_GRADIENTMAP
644	uniform sampler2D gradientMap;
645#endif
646vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
647	float dotNL = dot( normal, lightDirection );
648	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
649	#ifdef USE_GRADIENTMAP
650		return vec3( texture2D( gradientMap, coord ).r );
651	#else
652		vec2 fw = fwidth( coord ) * 0.5;
653		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
654	#endif
655}`,uV=`#ifdef USE_LIGHTMAP
656	vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
657	vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
658	reflectedLight.indirectDiffuse += lightMapIrradiance;
659#endif`,fV=`#ifdef USE_LIGHTMAP
660	uniform sampler2D lightMap;
661	uniform float lightMapIntensity;
662#endif`,hV=`LambertMaterial material;
663material.diffuseColor = diffuseColor.rgb;
664material.specularStrength = specularStrength;`,dV=`varying vec3 vViewPosition;
665struct LambertMaterial {
666	vec3 diffuseColor;
667	float specularStrength;
668};
669void 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 ) {
670	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
671	vec3 irradiance = dotNL * directLight.color;
672	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
673}
674void 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 ) {
675	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
676}
677#define RE_Direct				RE_Direct_Lambert
678#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,pV=`uniform bool receiveShadow;
679uniform vec3 ambientLightColor;
680#if defined( USE_LIGHT_PROBES )
681	uniform vec3 lightProbe[ 9 ];
682#endif
683vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
684	float x = normal.x, y = normal.y, z = normal.z;
685	vec3 result = shCoefficients[ 0 ] * 0.886227;
686	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
687	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
688	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
689	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
690	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
691	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
692	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
693	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
694	return result;
695}
696vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
697	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
698	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
699	return irradiance;
700}
701vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
702	vec3 irradiance = ambientLightColor;
703	return irradiance;
704}
705float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
706	#if defined ( LEGACY_LIGHTS )
707		if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
708			return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );
709		}
710		return 1.0;
711	#else
712		float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
713		if ( cutoffDistance > 0.0 ) {
714			distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
715		}
716		return distanceFalloff;
717	#endif
718}
719float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
720	return smoothstep( coneCosine, penumbraCosine, angleCosine );
721}
722#if NUM_DIR_LIGHTS > 0
723	struct DirectionalLight {
724		vec3 direction;
725		vec3 color;
726	};
727	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
728	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
729		light.color = directionalLight.color;
730		light.direction = directionalLight.direction;
731		light.visible = true;
732	}
733#endif
734#if NUM_POINT_LIGHTS > 0
735	struct PointLight {
736		vec3 position;
737		vec3 color;
738		float distance;
739		float decay;
740	};
741	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
742	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
743		vec3 lVector = pointLight.position - geometryPosition;
744		light.direction = normalize( lVector );
745		float lightDistance = length( lVector );
746		light.color = pointLight.color;
747		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
748		light.visible = ( light.color != vec3( 0.0 ) );
749	}
750#endif
751#if NUM_SPOT_LIGHTS > 0
752	struct SpotLight {
753		vec3 position;
754		vec3 direction;
755		vec3 color;
756		float distance;
757		float decay;
758		float coneCos;
759		float penumbraCos;
760	};
761	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
762	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
763		vec3 lVector = spotLight.position - geometryPosition;
764		light.direction = normalize( lVector );
765		float angleCos = dot( light.direction, spotLight.direction );
766		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
767		if ( spotAttenuation > 0.0 ) {
768			float lightDistance = length( lVector );
769			light.color = spotLight.color * spotAttenuation;
770			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
771			light.visible = ( light.color != vec3( 0.0 ) );
772		} else {
773			light.color = vec3( 0.0 );
774			light.visible = false;
775		}
776	}
777#endif
778#if NUM_RECT_AREA_LIGHTS > 0
779	struct RectAreaLight {
780		vec3 color;
781		vec3 position;
782		vec3 halfWidth;
783		vec3 halfHeight;
784	};
785	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
786	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
787#endif
788#if NUM_HEMI_LIGHTS > 0
789	struct HemisphereLight {
790		vec3 direction;
791		vec3 skyColor;
792		vec3 groundColor;
793	};
794	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
795	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
796		float dotNL = dot( normal, hemiLight.direction );
797		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
798		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
799		return irradiance;
800	}
801#endif`,mV=`#ifdef USE_ENVMAP
802	vec3 getIBLIrradiance( const in vec3 normal ) {
803		#ifdef ENVMAP_TYPE_CUBE_UV
804			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
805			vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );
806			return PI * envMapColor.rgb * envMapIntensity;
807		#else
808			return vec3( 0.0 );
809		#endif
810	}
811	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
812		#ifdef ENVMAP_TYPE_CUBE_UV
813			vec3 reflectVec = reflect( - viewDir, normal );
814			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
815			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
816			vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );
817			return envMapColor.rgb * envMapIntensity;
818		#else
819			return vec3( 0.0 );
820		#endif
821	}
822	#ifdef USE_ANISOTROPY
823		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
824			#ifdef ENVMAP_TYPE_CUBE_UV
825				vec3 bentNormal = cross( bitangent, viewDir );
826				bentNormal = normalize( cross( bentNormal, bitangent ) );
827				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
828				return getIBLRadiance( viewDir, bentNormal, roughness );
829			#else
830				return vec3( 0.0 );
831			#endif
832		}
833	#endif
834#endif`,gV=`ToonMaterial material;
835material.diffuseColor = diffuseColor.rgb;`,vV=`varying vec3 vViewPosition;
836struct ToonMaterial {
837	vec3 diffuseColor;
838};
839void 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 ) {
840	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
841	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
842}
843void 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 ) {
844	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
845}
846#define RE_Direct				RE_Direct_Toon
847#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,yV=`BlinnPhongMaterial material;
848material.diffuseColor = diffuseColor.rgb;
849material.specularColor = specular;
850material.specularShininess = shininess;
851material.specularStrength = specularStrength;`,xV=`varying vec3 vViewPosition;
852struct BlinnPhongMaterial {
853	vec3 diffuseColor;
854	vec3 specularColor;
855	float specularShininess;
856	float specularStrength;
857};
858void 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 ) {
859	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
860	vec3 irradiance = dotNL * directLight.color;
861	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
862	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
863}
864void 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 ) {
865	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
866}
867#define RE_Direct				RE_Direct_BlinnPhong
868#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,_V=`PhysicalMaterial material;
869material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
870vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
871float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
872material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
873material.roughness = min( material.roughness, 1.0 );
874#ifdef IOR
875	material.ior = ior;
876	#ifdef USE_SPECULAR
877		float specularIntensityFactor = specularIntensity;
878		vec3 specularColorFactor = specularColor;
879		#ifdef USE_SPECULAR_COLORMAP
880			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
881		#endif
882		#ifdef USE_SPECULAR_INTENSITYMAP
883			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
884		#endif
885		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
886	#else
887		float specularIntensityFactor = 1.0;
888		vec3 specularColorFactor = vec3( 1.0 );
889		material.specularF90 = 1.0;
890	#endif
891	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
892#else
893	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
894	material.specularF90 = 1.0;
895#endif
896#ifdef USE_CLEARCOAT
897	material.clearcoat = clearcoat;
898	material.clearcoatRoughness = clearcoatRoughness;
899	material.clearcoatF0 = vec3( 0.04 );
900	material.clearcoatF90 = 1.0;
901	#ifdef USE_CLEARCOATMAP
902		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
903	#endif
904	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
905		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
906	#endif
907	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
908	material.clearcoatRoughness += geometryRoughness;
909	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
910#endif
911#ifdef USE_IRIDESCENCE
912	material.iridescence = iridescence;
913	material.iridescenceIOR = iridescenceIOR;
914	#ifdef USE_IRIDESCENCEMAP
915		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
916	#endif
917	#ifdef USE_IRIDESCENCE_THICKNESSMAP
918		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
919	#else
920		material.iridescenceThickness = iridescenceThicknessMaximum;
921	#endif
922#endif
923#ifdef USE_SHEEN
924	material.sheenColor = sheenColor;
925	#ifdef USE_SHEEN_COLORMAP
926		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
927	#endif
928	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
929	#ifdef USE_SHEEN_ROUGHNESSMAP
930		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
931	#endif
932#endif
933#ifdef USE_ANISOTROPY
934	#ifdef USE_ANISOTROPYMAP
935		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
936		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
937		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
938	#else
939		vec2 anisotropyV = anisotropyVector;
940	#endif
941	material.anisotropy = length( anisotropyV );
942	anisotropyV /= material.anisotropy;
943	material.anisotropy = saturate( material.anisotropy );
944	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
945	material.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;
946	material.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;
947#endif`,SV=`struct PhysicalMaterial {
948	vec3 diffuseColor;
949	float roughness;
950	vec3 specularColor;
951	float specularF90;
952	#ifdef USE_CLEARCOAT
953		float clearcoat;
954		float clearcoatRoughness;
955		vec3 clearcoatF0;
956		float clearcoatF90;
957	#endif
958	#ifdef USE_IRIDESCENCE
959		float iridescence;
960		float iridescenceIOR;
961		float iridescenceThickness;
962		vec3 iridescenceFresnel;
963		vec3 iridescenceF0;
964	#endif
965	#ifdef USE_SHEEN
966		vec3 sheenColor;
967		float sheenRoughness;
968	#endif
969	#ifdef IOR
970		float ior;
971	#endif
972	#ifdef USE_TRANSMISSION
973		float transmission;
974		float transmissionAlpha;
975		float thickness;
976		float attenuationDistance;
977		vec3 attenuationColor;
978	#endif
979	#ifdef USE_ANISOTROPY
980		float anisotropy;
981		float alphaT;
982		vec3 anisotropyT;
983		vec3 anisotropyB;
984	#endif
985};
986vec3 clearcoatSpecular = vec3( 0.0 );
987vec3 sheenSpecular = vec3( 
vendor: 10,772 bytes, lines 987-1207
9870.0 );
988vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
989    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
990    float x2 = x * x;
991    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
992    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
993}
994float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
995	float a2 = pow2( alpha );
996	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
997	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
998	return 0.5 / max( gv + gl, EPSILON );
999}
1000float D_GGX( const in float alpha, const in float dotNH ) {
1001	float a2 = pow2( alpha );
1002	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
1003	return RECIPROCAL_PI * a2 / pow2( denom );
1004}
1005#ifdef USE_ANISOTROPY
1006	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 ) {
1007		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
1008		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
1009		float v = 0.5 / ( gv + gl );
1010		return saturate(v);
1011	}
1012	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
1013		float a2 = alphaT * alphaB;
1014		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
1015		highp float v2 = dot( v, v );
1016		float w2 = a2 / v2;
1017		return RECIPROCAL_PI * a2 * pow2 ( w2 );
1018	}
1019#endif
1020#ifdef USE_CLEARCOAT
1021	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
1022		vec3 f0 = material.clearcoatF0;
1023		float f90 = material.clearcoatF90;
1024		float roughness = material.clearcoatRoughness;
1025		float alpha = pow2( roughness );
1026		vec3 halfDir = normalize( lightDir + viewDir );
1027		float dotNL = saturate( dot( normal, lightDir ) );
1028		float dotNV = saturate( dot( normal, viewDir ) );
1029		float dotNH = saturate( dot( normal, halfDir ) );
1030		float dotVH = saturate( dot( viewDir, halfDir ) );
1031		vec3 F = F_Schlick( f0, f90, dotVH );
1032		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1033		float D = D_GGX( alpha, dotNH );
1034		return F * ( V * D );
1035	}
1036#endif
1037vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
1038	vec3 f0 = material.specularColor;
1039	float f90 = material.specularF90;
1040	float roughness = material.roughness;
1041	float alpha = pow2( roughness );
1042	vec3 halfDir = normalize( lightDir + viewDir );
1043	float dotNL = saturate( dot( normal, lightDir ) );
1044	float dotNV = saturate( dot( normal, viewDir ) );
1045	float dotNH = saturate( dot( normal, halfDir ) );
1046	float dotVH = saturate( dot( viewDir, halfDir ) );
1047	vec3 F = F_Schlick( f0, f90, dotVH );
1048	#ifdef USE_IRIDESCENCE
1049		F = mix( F, material.iridescenceFresnel, material.iridescence );
1050	#endif
1051	#ifdef USE_ANISOTROPY
1052		float dotTL = dot( material.anisotropyT, lightDir );
1053		float dotTV = dot( material.anisotropyT, viewDir );
1054		float dotTH = dot( material.anisotropyT, halfDir );
1055		float dotBL = dot( material.anisotropyB, lightDir );
1056		float dotBV = dot( material.anisotropyB, viewDir );
1057		float dotBH = dot( material.anisotropyB, halfDir );
1058		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
1059		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
1060	#else
1061		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1062		float D = D_GGX( alpha, dotNH );
1063	#endif
1064	return F * ( V * D );
1065}
1066vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
1067	const float LUT_SIZE = 64.0;
1068	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
1069	const float LUT_BIAS = 0.5 / LUT_SIZE;
1070	float dotNV = saturate( dot( N, V ) );
1071	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
1072	uv = uv * LUT_SCALE + LUT_BIAS;
1073	return uv;
1074}
1075float LTC_ClippedSphereFormFactor( const in vec3 f ) {
1076	float l = length( f );
1077	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
1078}
1079vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
1080	float x = dot( v1, v2 );
1081	float y = abs( x );
1082	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
1083	float b = 3.4175940 + ( 4.1616724 + y ) * y;
1084	float v = a / b;
1085	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
1086	return cross( v1, v2 ) * theta_sintheta;
1087}
1088vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
1089	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
1090	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
1091	vec3 lightNormal = cross( v1, v2 );
1092	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
1093	vec3 T1, T2;
1094	T1 = normalize( V - N * dot( V, N ) );
1095	T2 = - cross( N, T1 );
1096	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
1097	vec3 coords[ 4 ];
1098	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
1099	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
1100	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
1101	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
1102	coords[ 0 ] = normalize( coords[ 0 ] );
1103	coords[ 1 ] = normalize( coords[ 1 ] );
1104	coords[ 2 ] = normalize( coords[ 2 ] );
1105	coords[ 3 ] = normalize( coords[ 3 ] );
1106	vec3 vectorFormFactor = vec3( 0.0 );
1107	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
1108	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
1109	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
1110	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
1111	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
1112	return vec3( result );
1113}
1114#if defined( USE_SHEEN )
1115float D_Charlie( float roughness, float dotNH ) {
1116	float alpha = pow2( roughness );
1117	float invAlpha = 1.0 / alpha;
1118	float cos2h = dotNH * dotNH;
1119	float sin2h = max( 1.0 - cos2h, 0.0078125 );
1120	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
1121}
1122float V_Neubelt( float dotNV, float dotNL ) {
1123	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
1124}
1125vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
1126	vec3 halfDir = normalize( lightDir + viewDir );
1127	float dotNL = saturate( dot( normal, lightDir ) );
1128	float dotNV = saturate( dot( normal, viewDir ) );
1129	float dotNH = saturate( dot( normal, halfDir ) );
1130	float D = D_Charlie( sheenRoughness, dotNH );
1131	float V = V_Neubelt( dotNV, dotNL );
1132	return sheenColor * ( D * V );
1133}
1134#endif
1135float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1136	float dotNV = saturate( dot( normal, viewDir ) );
1137	float r2 = roughness * roughness;
1138	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
1139	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
1140	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
1141	return saturate( DG * RECIPROCAL_PI );
1142}
1143vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1144	float dotNV = saturate( dot( normal, viewDir ) );
1145	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
1146	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
1147	vec4 r = roughness * c0 + c1;
1148	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
1149	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
1150	return fab;
1151}
1152vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
1153	vec2 fab = DFGApprox( normal, viewDir, roughness );
1154	return specularColor * fab.x + specularF90 * fab.y;
1155}
1156#ifdef USE_IRIDESCENCE
1157void 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 ) {
1158#else
1159void 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 ) {
1160#endif
1161	vec2 fab = DFGApprox( normal, viewDir, roughness );
1162	#ifdef USE_IRIDESCENCE
1163		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
1164	#else
1165		vec3 Fr = specularColor;
1166	#endif
1167	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
1168	float Ess = fab.x + fab.y;
1169	float Ems = 1.0 - Ess;
1170	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
1171	singleScatter += FssEss;
1172	multiScatter += Fms * Ems;
1173}
1174#if NUM_RECT_AREA_LIGHTS > 0
1175	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 ) {
1176		vec3 normal = geometryNormal;
1177		vec3 viewDir = geometryViewDir;
1178		vec3 position = geometryPosition;
1179		vec3 lightPos = rectAreaLight.position;
1180		vec3 halfWidth = rectAreaLight.halfWidth;
1181		vec3 halfHeight = rectAreaLight.halfHeight;
1182		vec3 lightColor = rectAreaLight.color;
1183		float roughness = material.roughness;
1184		vec3 rectCoords[ 4 ];
1185		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
1186		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
1187		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
1188		vec2 uv = LTC_Uv( normal, viewDir, roughness );
1189		vec4 t1 = texture2D( ltc_1, uv );
1190		vec4 t2 = texture2D( ltc_2, uv );
1191		mat3 mInv = mat3(
1192			vec3( t1.x, 0, t1.y ),
1193			vec3(    0, 1,    0 ),
1194			vec3( t1.z, 0, t1.w )
1195		);
1196		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
1197		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
1198		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
1199	}
1200#endif
1201void 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 ) {
1202	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
1203	vec3 irradiance = dotNL * directLight.color;
1204	#ifdef USE_CLEARCOAT
1205		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
1206		vec3 ccIrradiance = dotNLcc * directLight.color;
1207		clearcoatSpecular
1207 += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
1208	#endif
1209	#ifdef USE_SHEEN
1210		sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
1211	#endif
1212	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
1213	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1214}
1215void 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 ) {
1216	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1217}
1218void 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) {
1219	#ifdef USE_CLEARCOAT
1220		clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
1221	#endif
1222	#ifdef USE_SHEEN
1223		sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1224	#endif
1225	vec3 singleScattering = vec3( 0.0 );
1226	vec3 multiScattering = vec3( 0.0 );
1227	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
1228	#ifdef USE_IRIDESCENCE
1229		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
1230	#else
1231		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
1232	#endif
1233	vec3 totalScattering = singleScattering + multiScattering;
1234	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
1235	reflectedLight.indirectSpecular += radiance * singleScattering;
1236	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
1237	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
1238}
1239#define RE_Direct				RE_Direct_Physical
1240#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
1241#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
1242#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
1243float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
1244	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
1245}`,wV=`
1246vec3 geometryPosition = - vViewPosition;
1247vec3 geometryNormal = normal;
1248vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
1249vec3 geometryClearcoatNormal;
1250#ifdef USE_CLEARCOAT
1251	geometryClearcoatNormal = clearcoatNormal;
1252#endif
1253#ifdef USE_IRIDESCENCE
1254	float dotNVi = saturate( dot( normal, geometryViewDir ) );
1255	if ( material.iridescenceThickness == 0.0 ) {
1256		material.iridescence = 0.0;
1257	} else {
1258		material.iridescence = saturate( material.iridescence );
1259	}
1260	if ( material.iridescence > 0.0 ) {
1261		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
1262		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
1263	}
1264#endif
1265IncidentLight directLight;
1266#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
1267	PointLight pointLight;
1268	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
1269	PointLightShadow pointLightShadow;
1270	#endif
1271	#pragma unroll_loop_start
1272	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
1273		pointLight = pointLights[ i ];
1274		getPointLightInfo( pointLight, geometryPosition, directLight );
1275		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
1276		pointLightShadow = pointLightShadows[ i ];
1277		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
1278		#endif
1279		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1280	}
1281	#pragma unroll_loop_end
1282#endif
1283#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
1284	SpotLight spotLight;
1285	vec4 spotColor;
1286	vec3 spotLightCoord;
1287	bool inSpotLightMap;
1288	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
1289	SpotLightShadow spotLightShadow;
1290	#endif
1291	#pragma unroll_loop_start
1292	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
1293		spotLight = spotLights[ i ];
1294		getSpotLightInfo( spotLight, geometryPosition, directLight );
1295		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1296		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
1297		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1298		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
1299		#else
1300		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1301		#endif
1302		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
1303			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
1304			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
1305			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
1306			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
1307		#endif
1308		#undef SPOT_LIGHT_MAP_INDEX
1309		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1310		spotLightShadow = spotLightShadows[ i ];
1311		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
1312		#endif
1313		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1314	}
1315	#pragma unroll_loop_end
1316#endif
1317#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
1318	DirectionalLight directionalLight;
1319	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
1320	DirectionalLightShadow directionalLightShadow;
1321	#endif
1322	#pragma unroll_loop_start
1323	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
1324		directionalLight = directionalLights[ i ];
1325		getDirectionalLightInfo( directionalLight, directLight );
1326		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
1327		directionalLightShadow = directionalLightShadows[ i ];
1328		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
1329		#endif
1330		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1331	}
1332	#pragma unroll_loop_end
1333#endif
1334#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
1335	RectAreaLight rectAreaLight;
1336	#pragma unroll_loop_start
1337	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
1338		rectAreaLight = rectAreaLights[ i ];
1339		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1340	}
1341	#pragma unroll_loop_end
1342#endif
1343#if defined( RE_IndirectDiffuse )
1344	vec3 iblIrradiance = vec3( 0.0 );
1345	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
1346	#if defined( USE_LIGHT_PROBES )
1347		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
1348	#endif
1349	#if ( NUM_HEMI_LIGHTS > 0 )
1350		#pragma unroll_loop_start
1351		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
1352			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
1353		}
1354		#pragma unroll_loop_end
1355	#endif
1356#endif
1357#if defined( RE_IndirectSpecular )
1358	vec3 radiance = vec3( 0.0 );
1359	vec3 clearcoatRadiance = vec3( 0.0 );
1360#endif`,AV=`#if defined( RE_IndirectDiffuse )
1361	#ifdef USE_LIGHTMAP
1362		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
1363		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
1364		irradiance += lightMapIrradiance;
1365	#endif
1366	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
1367		iblIrradiance += getIBLIrradiance( geometryNormal );
1368	#endif
1369#endif
1370#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
1371	#ifdef USE_ANISOTROPY
1372		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
1373	#else
1374		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
1375	#endif
1376	#ifdef USE_CLEARCOAT
1377		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
1378	#endif
1379#endif`,MV=`#if defined( RE_IndirectDiffuse )
1380	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1381#endif
1382#if defined( RE_IndirectSpecular )
1383	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1384#endif`,EV=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
1385	gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
1386#endif`,TV=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
1387	uniform float logDepthBufFC;
1388	varying float vFragDepth;
1389	varying float vIsPerspective;
1390#endif`,bV=`#ifdef USE_LOGDEPTHBUF
1391	#ifdef USE_LOGDEPTHBUF_EXT
1392		varying float vFragDepth;
1393		varying float vIsPerspective;
1394	#else
1395		uniform float logDepthBufFC;
1396	#endif
1397#endif`,CV=`#ifdef USE_LOGDEPTHBUF
1398	#ifdef USE_LOGDEPTHBUF_EXT
1399		vFragDepth = 1.0 + gl_Position.w;
1400		vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
1401	#else
1402		if ( isPerspectiveMatrix( projectionMatrix ) ) {
1403			gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
1404			gl_Position.z *= gl_Position.w;
1405		}
1406	#endif
1407#endif`,RV=`#ifdef USE_MAP
1408	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
1409	#ifdef DECODE_VIDEO_TEXTURE
1410		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 );
1411	
1412	#endif
1413	diffuseColor *= sampledDiffuseColor;
1414#endif`,PV=`#ifdef USE_MAP
1415	uniform sampler2D map;
1416#endif`,BV=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1417	#if defined( USE_POINTS_UV )
1418		vec2 uv = vUv;
1419	#else
1420		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
1421	#endif
1422#endif
1423#ifdef USE_MAP
1424	diffuseColor *= texture2D( map, uv );
1425#endif
1426#ifdef USE_ALPHAMAP
1427	diffuseColor.a *= texture2D( alphaMap, uv ).g;
1428#endif`,LV=`#if defined( USE_POINTS_UV )
1429	varying vec2 vUv;
1430#else
1431	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1432		uniform mat3 uvTransform;
1433	#endif
1434#endif
1435#ifdef USE_MAP
1436	uniform sampler2D map;
1437#endif
1438#ifdef USE_ALPHAMAP
1439	uniform sampler2D alphaMap;
1440#endif`,IV=`float metalnessFactor = metalness;
1441#ifdef USE_METALNESSMAP
1442	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
1443	metalnessFactor *= texelMetalness.b;
1444#endif`,NV=`#ifdef USE_METALNESSMAP
1445	uniform sampler2D metalnessMap;
1446#endif`,DV=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
1447	vColor *= morphTargetBaseInfluence;
1448	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1449		#if defined( USE_COLOR_ALPHA )
1450			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
1451		#elif defined( USE_COLOR )
1452			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
1453		#endif
1454	}
1455#endif`,FV=`#ifdef USE_MORPHNORMALS
1456	objectNormal *= morphTargetBaseInfluence;
1457	#ifdef MORPHTARGETS_TEXTURE
1458		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1459			if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
1460		}
1461	#else
1462		objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
1463		objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
1464		objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
1465		objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
1466	#endif
1467#endif`,OV=`#ifdef USE_MORPHTARGETS
1468	uniform float morphTargetBaseInfluence;
1469	#ifdef MORPHTARGETS_TEXTURE
1470		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1471		uniform sampler2DArray morphTargetsTexture;
1472		uniform ivec2 morphTargetsTextureSize;
1473		vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
1474			int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
1475			int y = texelIndex / morphTargetsTextureSize.x;
1476			int x = texelIndex - y * morphTargetsTextureSize.x;
1477			ivec3 morphUV = ivec3( x, y, morphTargetIndex );
1478			return texelFetch( morphTargetsTexture, morphUV, 0 );
1479		}
1480	#else
1481		#ifndef USE_MORPHNORMALS
1482			uniform float morphTargetInfluences[ 8 ];
1483		#else
1484			uniform float morphTargetInfluences[ 4 ];
1485		#endif
1486	#endif
1487#endif`,UV=`#ifdef USE_MORPHTARGETS
1488	transformed *= morphTargetBaseInfluence;
1489	#ifdef MORPHTARGETS_TEXTURE
1490		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1491			if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
1492		}
1493	#else
1494		transformed += morphTarget0 * morphTargetInfluences[ 0 ];
1495		transformed += morphTarget1 * morphTargetInfluences[ 1 ];
1496		transformed += morphTarget2 * morphTargetInfluences[ 2 ];
1497		transformed += morphTarget3 * morphTargetInfluences[ 3 ];
1498		#ifndef USE_MORPHNORMALS
1499			transformed += morphTarget4 * morphTargetInfluences[ 4 ];
1500			transformed += morphTarget5 * morphTargetInfluences[ 5 ];
1501			transformed += morphTarget6 * morphTargetInfluences[ 6 ];
1502			transformed += morphTarget7 * morphTargetInfluences[ 7 ];
1503		#endif
1504	#endif
1505#endif`,kV=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
1506#ifdef FLAT_SHADED
1507	vec3 fdx = dFdx( vViewPosition );
1508	vec3 fdy = dFdy( vViewPosition );
1509	vec3 normal = normalize( cross( fdx, fdy ) );
1510#else
1511	vec3 normal = normalize( vNormal );
1512	#ifdef DOUBLE_SIDED
1513		normal *= faceDirection;
1514	#endif
1515#endif
1516#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
1517	#ifdef USE_TANGENT
1518		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1519	#else
1520		mat3 tbn = getTangentFrame( - vViewPosition, normal,
1521		#if defined( USE_NORMALMAP )
1522			vNormalMapUv
1523		#elif defined( USE_CLEARCOAT_NORMALMAP )
1524			vClearcoatNormalMapUv
1525		#else
1526			vUv
1527		#endif
1528		);
1529	#endif
1530	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1531		tbn[0] *= faceDirection;
1532		tbn[1] *= faceDirection;
1533	#endif
1534#endif
1535#ifdef USE_CLEARCOAT_NORMALMAP
1536	#ifdef USE_TANGENT
1537		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1538	#else
1539		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
1540	#endif
1541	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1542		tbn2[0] *= faceDirection;
1543		tbn2[1] *= faceDirection;
1544	#endif
1545#endif
1546vec3 nonPerturbedNormal = normal;`,zV=`#ifdef USE_NORMALMAP_OBJECTSPACE
1547	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1548	#ifdef FLIP_SIDED
1549		normal = - normal;
1550	#endif
1551	#ifdef DOUBLE_SIDED
1552		normal = normal * faceDirection;
1553	#endif
1554	normal = normalize( normalMatrix * normal );
1555#elif defined( USE_NORMALMAP_TANGENTSPACE )
1556	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1557	mapN.xy *= normalScale;
1558	normal = normalize( tbn * mapN );
1559#elif defined( USE_BUMPMAP )
1560	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
1561#endif`,HV=`#ifndef FLAT_SHADED
1562	varying vec3 vNormal;
1563	#ifdef USE_TANGENT
1564		varying vec3 vTangent;
1565		varying vec3 vBitangent;
1566	#endif
1567#endif`,GV=`#ifndef FLAT_SHADED
1568	varying vec3 vNormal;
1569	#ifdef USE_TANGENT
1570		varying vec3 vTangent;
1571		varying vec3 vBitangent;
1572	#endif
1573#endif`,VV=`#ifndef FLAT_SHADED
1574	vNormal = normalize( transformedNormal );
1575	#ifdef USE_TANGENT
1576		vTangent = normalize( transformedTangent );
1577		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
1578	#endif
1579#endif`,jV=`#ifdef USE_NORMALMAP
1580	uniform sampler2D normalMap;
1581	uniform vec2 normalScale;
1582#endif
1583#ifdef USE_NORMALMAP_OBJECTSPACE
1584	uniform mat3 normalMatrix;
1585#endif
1586#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
1587	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
1588		vec3 q0 = dFdx( eye_pos.xyz );
1589		vec3 q1 = dFdy( eye_pos.xyz );
1590		vec2 st0 = dFdx( uv.st );
1591		vec2 st1 = dFdy( uv.st );
1592		vec3 N = surf_norm;
1593		vec3 q1perp = cross( q1, N );
1594		vec3 q0perp = cross( N, q0 );
1595		vec3 T = q1perp * st0.x + q0perp * st1.x;
1596		vec3 B = q1perp * st0.y + q0perp * st1.y;
1597		float det = max( dot( T, T ), dot( B, B ) );
1598		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
1599		return mat3( T * scale, B * scale, N );
1600	}
1601#endif`,WV=`#ifdef USE_CLEARCOAT
1602	vec3 clearcoatNormal = nonPerturbedNormal;
1603#endif`,XV=`#ifdef USE_CLEARCOAT_NORMALMAP
1604	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
1605	clearcoatMapN.xy *= clearcoatNormalScale;
1606	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
1607#endif`,JV=`#ifdef USE_CLEARCOATMAP
1608	uniform sampler2D clearcoatMap;
1609#endif
1610#ifdef USE_CLEARCOAT_NORMALMAP
1611	uniform sampler2D clearcoatNormalMap;
1612	uniform vec2 clearcoatNormalScale;
1613#endif
1614#ifdef USE_CLEARCOAT_ROUGHNESSMAP
1615	uniform sampler2D clearcoatRoughnessMap;
1616#endif`,KV=`#ifdef USE_IRIDESCENCEMAP
1617	uniform sampler2D iridescenceMap;
1618#endif
1619#ifdef USE_IRIDESCENCE_THICKNESSMAP
1620	uniform sampler2D iridescenceThicknessMap;
1621#endif`,YV=`#ifdef OPAQUE
1622diffuseColor.a = 1.0;
1623#endif
1624#ifdef USE_TRANSMISSION
1625diffuseColor.a *= material.transmissionAlpha;
1626#endif
1627gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,QV=`vec3 packNormalToRGB( const in vec3 normal ) {
1628	return normalize( normal ) * 0.5 + 0.5;
1629}
1630vec3 unpackRGBToNormal( const in vec3 rgb ) {
1631	return 2.0 * rgb.xyz - 1.0;
1632}
1633const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
1634const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
1635const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
1636const float ShiftRight8 = 1. / 256.;
1637vec4 packDepthToRGBA( const in float v ) {
1638	vec4 r = vec4( fract( v * PackFactors ), v );
1639	r.yzw -= r.xyz * ShiftRight8;	return r * PackUpscale;
1640}
1641float unpackRGBAToDepth( const in vec4 v ) {
1642	return dot( v, UnpackFactors );
1643}
1644vec2 packDepthToRG( in highp float v ) {
1645	return packDepthToRGBA( v ).yx;
1646}
1647float unpackRGToDepth( const in highp vec2 v ) {
1648	return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );
1649}
1650vec4 pack2HalfToRGBA( vec2 v ) {
1651	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
1652	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
1653}
1654vec2 unpackRGBATo2Half( vec4 v ) {
1655	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
1656}
1657float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
1658	return ( viewZ + near ) / ( near - far );
1659}
1660float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
1661	return depth * ( near - far ) - near;
1662}
1663float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
1664	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
1665}
1666float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
1667	return ( near * far ) / ( ( far - near ) * depth - far );
1668}`,ZV=`#ifdef PREMULTIPLIED_ALPHA
1669	gl_FragColor.rgb *= gl_FragColor.a;
1670#endif`,qV=`vec4 mvPosition = vec4( transformed, 1.0 );
1671#ifdef USE_INSTANCING
1672	mvPosition = instanceMatrix * mvPosition;
1673#endif
1674mvPosition = modelViewMatrix * mvPosition;
1675gl_Position = projectionMatrix * mvPosition;`,$V=`#ifdef DITHERING
1676	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
1677#endif`,ej=`#ifdef DITHERING
1678	vec3 dithering( vec3 color ) {
1679		float grid_position = rand( gl_FragCoord.xy );
1680		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
1681		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
1682		return color + dither_shift_RGB;
1683	}
1684#endif`,tj=`float roughnessFactor = roughness;
1685#ifdef USE_ROUGHNESSMAP
1686	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
1687	roughnessFactor *= texelRoughness.g;
1688#endif`,nj=`#ifdef USE_ROUGHNESSMAP
1689	uniform sampler2D roughnessMap;
1690#endif`,ij=`#if NUM_SPOT_LIGHT_COORDS > 0
1691	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1692#endif
1693#if NUM_SPOT_LIGHT_MAPS > 0
1694	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
1695#endif
1696#ifdef USE_SHADOWMAP
1697	#if NUM_DIR_LIGHT_SHADOWS > 0
1698		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
1699		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1700		struct DirectionalLightShadow {
1701			float shadowBias;
1702			float shadowNormalBias;
1703			float shadowRadius;
1704			vec2 shadowMapSize;
1705		};
1706		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1707	#endif
1708	#if NUM_SPOT_LIGHT_SHADOWS > 0
1709		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
1710		struct SpotLightShadow {
1711			float shadowBias;
1712			float shadowNormalBias;
1713			float shadowRadius;
1714			vec2 shadowMapSize;
1715		};
1716		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1717	#endif
1718	#if NUM_POINT_LIGHT_SHADOWS > 0
1719		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
1720		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1721		struct PointLightShadow {
1722			float shadowBias;
1723			float shadowNormalBias;
1724			float shadowRadius;
1725			vec2 shadowMapSize;
1726			float shadowCameraNear;
1727			float shadowCameraFar;
1728		};
1729		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1730	#endif
1731	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
1732		return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
1733	}
1734	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
1735		return unpackRGBATo2Half( texture2D( shadow, uv ) );
1736	}
1737	float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
1738		float occlusion = 1.0;
1739		vec2 distribution = texture2DDistribution( shadow, uv );
1740		float hard_shadow = step( compare , distribution.x );
1741		if (hard_shadow != 1.0 ) {
1742			float distance = compare - distribution.x ;
1743			float variance = max( 0.00000, distribution.y * distribution.y );
1744			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 );
1745		}
1746		return occlusion;
1747	}
1748	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
1749		float shadow = 1.0;
1750		shadowCoord.xyz /= shadowCoord.w;
1751		shadowCoord.z += shadowBias;
1752		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
1753		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
1754		if ( frustumTest ) {
1755		#if defined( SHADOWMAP_TYPE_PCF )
1756			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1757			float dx0 = - texelSize.x * shadowRadius;
1758			float dy0 = - texelSize.y * shadowRadius;
1759			float dx1 = + texelSize.x * shadowRadius;
1760			float dy1 = + texelSize.y * shadowRadius;
1761			float dx2 = dx0 / 2.0;
1762			float dy2 = dy0 / 2.0;
1763			float dx3 = dx1 / 2.0;
1764			float dy3 = dy1 / 2.0;
1765			shadow = (
1766				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
1767				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
1768				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
1769				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
1770				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
1771				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
1772				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
1773				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
1774				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
1775				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
1776				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
1777				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
1778				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
1779				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
1780				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
1781				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
1782				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
1783			) * ( 1.0 / 17.0 );
1784		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
1785			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1786			float dx = texelSize.x;
1787			float dy = texelSize.y;
1788			vec2 uv = shadowCoord.xy;
1789			vec2 f = fract( uv * shadowMapSize + 0.5 );
1790			uv -= f * texelSize;
1791			shadow = (
1792				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
1793				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
1794				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
1795				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
1796				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
1797					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
1798					 f.x ) +
1799				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
1800					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
1801					 f.x ) +
1802				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
1803					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
1804					 f.y ) +
1805				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
1806					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
1807					 f.y ) +
1808				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
1809						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
1810						  f.x ),
1811					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
1812						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
1813						  f.x ),
1814					 f.y )
1815			) * ( 1.0 / 9.0 );
1816		#elif defined( SHADOWMAP_TYPE_VSM )
1817			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
1818		#else
1819			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
1820		#endif
1821		}
1822		return shadow;
1823	}
1824	vec2 cubeToUV( vec3 v, float texelSizeY ) {
1825		vec3 absV = abs( v );
1826		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
1827		absV *= scaleToCube;
1828		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
1829		vec2 planar = v.xy;
1830		float almostATexel = 1.5 * texelSizeY;
1831		float almostOne = 1.0 - almostATexel;
1832		if ( absV.z >= almostOne ) {
1833			if ( v.z > 0.0 )
1834				planar.x = 4.0 - v.x;
1835		} else if ( absV.x >= almostOne ) {
1836			float signX = sign( v.x );
1837			planar.x = v.z * signX + 2.0 * signX;
1838		} else if ( absV.y >= almostOne ) {
1839			float signY = sign( v.y );
1840			planar.x = v.x + 2.0 * signY + 2.0;
1841			planar.y = v.z * signY - 2.0;
1842		}
1843		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
1844	}
1845	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
1846		vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
1847		vec3 lightToPosition = shadowCoord.xyz;
1848		float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );		dp += shadowBias;
1849		vec3 bd3D = normalize( lightToPosition );
1850		#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
1851			vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
1852			return (
1853				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
1854				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
1855				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
1856				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
1857				texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
1858				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
1859				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
1860				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
1861				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
1862			) * ( 1.0 / 9.0 );
1863		#else
1864			return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
1865		#endif
1866	}
1867#endif`,rj=`#if NUM_SPOT_LIGHT_COORDS > 0
1868	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
1869	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1870#endif
1871#ifdef USE_SHADOWMAP
1872	#if NUM_DIR_LIGHT_SHADOWS > 0
1873		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
1874		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1875		struct DirectionalLightShadow {
1876			float shadowBias;
1877			float shadowNormalBias;
1878			float shadowRadius;
1879			vec2 shadowMapSize;
1880		};
1881		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1882	#endif
1883	#if NUM_SPOT_LIGHT_SHADOWS > 0
1884		struct SpotLightShadow {
1885			float shadowBias;
1886			float shadowNormalBias;
1887			float shadowRadius;
1888			vec2 shadowMapSize;
1889		};
1890		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1891	#endif
1892	#if NUM_POINT_LIGHT_SHADOWS > 0
1893		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
1894		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1895		struct PointLightShadow {
1896			float shadowBias;
1897			float shadowNormalBias;
1898			float shadowRadius;
1899			vec2 shadowMapSize;
1900			float shadowCameraNear;
1901			float shadowCameraFar;
1902		};
1903		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1904	#endif
1905#endif`,sj=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
1906	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
1907	vec4 shadowWorldPosition;
1908#endif
1909#if defined( USE_SHADOWMAP )
1910	#if NUM_DIR_LIGHT_SHADOWS > 0
1911		#pragma unroll_loop_start
1912		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
1913			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
1914			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
1915		}
1916		#pragma unroll_loop_end
1917	#endif
1918	#if NUM_POINT_LIGHT_SHADOWS > 0
1919		#pragma unroll_loop_start
1920		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
1921			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
1922			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
1923		}
1924		#pragma unroll_loop_end
1925	#endif
1926#endif
1927#if NUM_SPOT_LIGHT_COORDS > 0
1928	#pragma unroll_loop_start
1929	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
1930		shadowWorldPosition = worldPosition;
1931		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1932			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
1933		#endif
1934		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
1935	}
1936	#pragma unroll_loop_end
1937#endif`,oj=`float getShadowMask() {
1938	float shadow = 1.0;
1939	#ifdef USE_SHADOWMAP
1940	#if NUM_DIR_LIGHT_SHADOWS > 0
1941	DirectionalLightShadow directionalLight;
1942	#pragma unroll_loop_start
1943	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
1944		directionalLight = directionalLightShadows[ i ];
1945		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
1946	}
1947	#pragma unroll_loop_end
1948	#endif
1949	#if NUM_SPOT_LIGHT_SHADOWS > 0
1950	SpotLightShadow spotLight;
1951	#pragma unroll_loop_start
1952	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
1953		spotLight = spotLightShadows[ i ];
1954		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
1955	}
1956	#pragma unroll_loop_end
1957	#endif
1958	#if NUM_POINT_LIGHT_SHADOWS > 0
1959	PointLightShadow pointLight;
1960	#pragma unroll_loop_start
1961	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
1962		pointLight = pointLightShadows[ i ];
1963		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
1964	}
1965	#pragma unroll_loop_end
1966	#endif
1967	#endif
1968	return shadow;
1969}`,aj=`#ifdef USE_SKINNING
1970	mat4 boneMatX = getBoneMatrix( skinIndex.x );
1971	mat4 boneMatY = getBoneMatrix( skinIndex.y );
1972	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
1973	mat4 boneMatW = getBoneMatrix( skinIndex.w );
1974#endif`,lj=`#ifdef USE_SKINNING
1975	uniform mat4 bindMatrix;
1976	uniform mat4 bindMatrixInverse;
1977	uniform highp sampler2D boneTexture;
1978	uniform int boneTextureSize;
1979	mat4 getBoneMatrix( const in float i ) {
1980		float j = i * 4.0;
1981		float x = mod( j, float( boneTextureSize ) );
1982		float y = floor( j / float( boneTextureSize ) );
1983		float dx = 1.0 / float( boneTextureSize );
1984		float dy = 1.0 / float( boneTextureSize );
1985		y = dy * ( y + 0.5 );
1986		vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );
1987		vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );
1988		vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );
1989		vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );
1990		mat4 bone = mat4( v1, v2, v3, v4 );
1991		return bone;
1992	}
1993#endif`,cj=`#ifdef USE_SKINNING
1994	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
1995	vec4 skinned = vec4( 0.0 );
1996	skinned += boneMatX * skinVertex * skinWeight.x;
1997	skinned += boneMatY * skinVertex * skinWeight.y;
1998	skinned += boneMatZ * skinVertex * skinWeight.z;
1999	skinned += boneMatW * skinVertex * skinWeight.w;
2000	transformed = ( bindMatrixInverse * skinned ).xyz;
2001#endif`,uj=`#ifdef USE_SKINNING
2002	mat4 skinMatrix = mat4( 0.0 );
2003	skinMatrix += skinWeight.x * boneMatX;
2004	skinMatrix += skinWeight.y * boneMatY;
2005	skinMatrix += skinWeight.z * boneMatZ;
2006	skinMatrix += skinWeight.w * boneMatW;
2007	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
2008	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
2009	#ifdef USE_TANGENT
2010		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
2011	#endif
2012#endif`,fj=`float specularStrength;
2013#ifdef USE_SPECULARMAP
2014	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
2015	specularStrength = texelSpecular.r;
2016#else
2017	specularStrength = 1.0;
2018#endif`,hj=`#ifdef USE_SPECULARMAP
2019	uniform sampler2D specularMap;
2020#endif`,dj=`#if defined( TONE_MAPPING )
2021	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
2022#endif`,pj=`#ifndef saturate
2023#define saturate( a ) clamp( a, 0.0, 1.0 )
2024#endif
2025uniform float toneMappingExposure;
2026vec3 LinearToneMapping( vec3 color ) {
2027	return saturate( toneMappingExposure * color );
2028}
2029vec3 ReinhardToneMapping( vec3 color ) {
2030	color *= toneMappingExposure;
2031	return saturate( color / ( vec3( 1.0 ) + color ) );
2032}
2033vec3 OptimizedCineonToneMapping( vec3 color ) {
2034	color *= toneMappingExposure;
2035	color = max( vec3( 0.0 ), color - 0.004 );
2036	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
2037}
2038vec3 RRTAndODTFit( vec3 v ) {
2039	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
2040	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
2041	return a / b;
2042}
2043vec3 ACESFilmicToneMapping( vec3 color ) {
2044	const mat3 ACESInputMat = mat3(
2045		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
2046		vec3( 0.04823, 0.01566, 0.83777 )
2047	);
2048	const mat3 ACESOutputMat = mat3(
2049		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
2050		vec3( -0.07367, -0.00605,  1.07602 )
2051	);
2052	color *= toneMappingExposure / 0.6;
2053	color = ACESInputMat * color;
2054	color = RRTAndODTFit( color );
2055	color = ACESOutputMat * color;
2056	return saturate( color );
2057}
2058vec3 CustomToneMapping( vec3 color ) { return color; }`,mj=`#ifdef USE_TRANSMISSION
2059	material.transmission = transmission;
2060	material.transmissionAlpha = 1.0;
2061	material.thickness = thickness;
2062	material.attenuationDistance = attenuationDistance;
2063	material.attenuationColor = attenuationColor;
2064	#ifdef USE_TRANSMISSIONMAP
2065		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
2066	#endif
2067	#ifdef USE_THICKNESSMAP
2068		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
2069	#endif
2070	vec3 pos = vWorldPosition;
2071	vec3 v = normalize( cameraPosition - pos );
2072	vec3 n = inverseTransformDirection( normal, viewMatrix );
2073	vec4 transmitted = getIBLVolumeRefraction(
2074		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
2075		pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,
2076		material.attenuationColor, material.attenuationDistance );
2077	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
2078	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
2079#endif`,gj=`#ifdef USE_TRANSMISSION
2080	uniform float transmission;
2081	uniform float thickness;
2082	uniform float attenuationDistance;
2083	uniform vec3 attenuationColor;
2084	#ifdef USE_TRANSMISSIONMAP
2085		uniform sampler2D transmissionMap;
2086	#endif
2087	#ifdef USE_THICKNESSMAP
2088		uniform sampler2D thicknessMap;
2089	#endif
2090	uniform vec2 transmissionSamplerSize;
2091	uniform sampler2D transmissionSamplerMap;
2092	uniform mat4 modelMatrix;
2093	uniform mat4 projectionMatrix;
2094	varying vec3 vWorldPosition;
2095	float w0( float a ) {
2096		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
2097	}
2098	float w1( float a ) {
2099		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
2100	}
2101	float w2( float a ){
2102		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
2103	}
2104	float w3( float a ) {
2105		return ( 1.0 / 6.0 ) * ( a * a * a );
2106	}
2107	float g0( float a ) {
2108		return w0( a ) + w1( a );
2109	}
2110	float g1( float a ) {
2111		return w2( a ) + w3( a );
2112	}
2113	float h0( float a ) {
2114		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
2115	}
2116	float h1( float a ) {
2117		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
2118	}
2119	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
2120		uv = uv * texelSize.zw + 0.5;
2121		vec2 iuv = floor( uv );
2122		vec2 fuv = fract( uv );
2123		float g0x = g0( fuv.x );
2124		float g1x = g1( fuv.x );
2125		float h0x = h0( fuv.x );
2126		float h1x = h1( fuv.x );
2127		float h0y = h0( fuv.y );
2128		float h1y = h1( fuv.y );
2129		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2130		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2131		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2132		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2133		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
2134			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
2135	}
2136	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
2137		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
2138		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
2139		vec2 fLodSizeInv = 1.0 / fLodSize;
2140		vec2 cLodSizeInv = 1.0 / cLodSize;
2141		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
2142		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
2143		return mix( fSample, cSample, fract( lod ) );
2144	}
2145	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
2146		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
2147		vec3 modelScale;
2148		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
2149		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
2150		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
2151		return normalize( refractionVector ) * thickness * modelScale;
2152	}
2153	float applyIorToRoughness( const in float roughness, const in float ior ) {
2154		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
2155	}
2156	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
2157		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
2158		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
2159	}
2160	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
2161		if ( isinf( attenuationDistance ) ) {
2162			return vec3( 1.0 );
2163		} else {
2164			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
2165			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
2166		}
2167	}
2168	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
2169		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
2170		const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,
2171		const in vec3 attenuationColor, const in float attenuationDistance ) {
2172		vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
2173		vec3 refractedRayExit = position + transmissionRay;
2174		vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2175		vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2176		refractionCoords += 1.0;
2177		refractionCoords /= 2.0;
2178		vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
2179		vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
2180		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
2181		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
2182		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
2183		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
2184	}
2185#endif`,vj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2186	varying vec2 vUv;
2187#endif
2188#ifdef USE_MAP
2189	varying vec2 vMapUv;
2190#endif
2191#ifdef USE_ALPHAMAP
2192	varying vec2 vAlphaMapUv;
2193#endif
2194#ifdef USE_LIGHTMAP
2195	varying vec2 vLightMapUv;
2196#endif
2197#ifdef USE_AOMAP
2198	varying vec2 vAoMapUv;
2199#endif
2200#ifdef USE_BUMPMAP
2201	varying vec2 vBumpMapUv;
2202#endif
2203#ifdef USE_NORMALMAP
2204	varying vec2 vNormalMapUv;
2205#endif
2206#ifdef USE_EMISSIVEMAP
2207	varying vec2 vEmissiveMapUv;
2208#endif
2209#ifdef USE_METALNESSMAP
2210	varying vec2 vMetalnessMapUv;
2211#endif
2212#ifdef USE_ROUGHNESSMAP
2213	varying vec2 vRoughnessMapUv;
2214#endif
2215#ifdef USE_ANISOTROPYMAP
2216	varying vec2 vAnisotropyMapUv;
2217#endif
2218#ifdef USE_CLEARCOATMAP
2219	varying vec2 vClearcoatMapUv;
2220#endif
2221#ifdef USE_CLEARCOAT_NORMALMAP
2222	varying vec2 vClearcoatNormalMapUv;
2223#endif
2224#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2225	varying vec2 vClearcoatRoughnessMapUv;
2226#endif
2227#ifdef USE_IRIDESCENCEMAP
2228	varying vec2 vIridescenceMapUv;
2229#endif
2230#ifdef USE_IRIDESCENCE_THICKNESSMAP
2231	varying vec2 vIridescenceThicknessMapUv;
2232#endif
2233#ifdef USE_SHEEN_COLORMAP
2234	varying vec2 vSheenColorMapUv;
2235#endif
2236#ifdef USE_SHEEN_ROUGHNESSMAP
2237	varying vec2 vSheenRoughnessMapUv;
2238#endif
2239#ifdef USE_SPECULARMAP
2240	varying vec2 vSpecularMapUv;
2241#endif
2242#ifdef USE_SPECULAR_COLORMAP
2243	varying vec2 vSpecularColorMapUv;
2244#endif
2245#ifdef USE_SPECULAR_INTENSITYMAP
2246	varying vec2 vSpecularIntensityMapUv;
2247#endif
2248#ifdef USE_TRANSMISSIONMAP
2249	uniform mat3 transmissionMapTransform;
2250	varying vec2 vTransmissionMapUv;
2251#endif
2252#ifdef USE_THICKNESSMAP
2253	uniform mat3 thicknessMapTransform;
2254	varying vec2 vThicknessMapUv;
2255#endif`,yj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2256	varying vec2 vUv;
2257#endif
2258#ifdef USE_MAP
2259	uniform mat3 mapTransform;
2260	varying vec2 vMapUv;
2261#endif
2262#ifdef USE_ALPHAMAP
2263	uniform mat3 alphaMapTransform;
2264	varying vec2 vAlphaMapUv;
2265#endif
2266#ifdef USE_LIGHTMAP
2267	uniform mat3 lightMapTransform;
2268	varying vec2 vLightMapUv;
2269#endif
2270#ifdef USE_AOMAP
2271	uniform mat3 aoMapTransform;
2272	varying vec2 vAoMapUv;
2273#endif
2274#ifdef USE_BUMPMAP
2275	uniform mat3 bumpMapTransform;
2276	varying vec2 vBumpMapUv;
2277#endif
2278#ifdef USE_NORMALMAP
2279	uniform mat3 normalMapTransform;
2280	varying vec2 vNormalMapUv;
2281#endif
2282#ifdef USE_DISPLACEMENTMAP
2283	uniform mat3 displacementMapTransform;
2284	varying vec2 vDisplacementMapUv;
2285#endif
2286#ifdef USE_EMISSIVEMAP
2287	uniform mat3 emissiveMapTransform;
2288	varying vec2 vEmissiveMapUv;
2289#endif
2290#ifdef USE_METALNESSMAP
2291	uniform mat3 metalnessMapTransform;
2292	varying vec2 vMetalnessMapUv;
2293#endif
2294#ifdef USE_ROUGHNESSMAP
2295	uniform mat3 roughnessMapTransform;
2296	varying vec2 vRoughnessMapUv;
2297#endif
2298#ifdef USE_ANISOTROPYMAP
2299	uniform mat3 anisotropyMapTransform;
2300	varying vec2 vAnisotropyMapUv;
2301#endif
2302#ifdef USE_CLEARCOATMAP
2303	uniform mat3 clearcoatMapTransform;
2304	varying vec2 vClearcoatMapUv;
2305#endif
2306#ifdef USE_CLEARCOAT_NORMALMAP
2307	uniform mat3 clearcoatNormalMapTransform;
2308	varying vec2 vClearcoatNormalMapUv;
2309#endif
2310#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2311	uniform mat3 clearcoatRoughnessMapTransform;
2312	varying vec2 vClearcoatRoughnessMapUv;
2313#endif
2314#ifdef USE_SHEEN_COLORMAP
2315	uniform mat3 sheenColorMapTransform;
2316	varying vec2 vSheenColorMapUv;
2317#endif
2318#ifdef USE_SHEEN_ROUGHNESSMAP
2319	uniform mat3 sheenRoughnessMapTransform;
2320	varying vec2 vSheenRoughnessMapUv;
2321#endif
2322#ifdef USE_IRIDESCENCEMAP
2323	uniform mat3 iridescenceMapTransform;
2324	varying vec2 vIridescenceMapUv;
2325#endif
2326#ifdef USE_IRIDESCENCE_THICKNESSMAP
2327	uniform mat3 iridescenceThicknessMapTransform;
2328	varying vec2 vIridescenceThicknessMapUv;
2329#endif
2330#ifdef USE_SPECULARMAP
2331	uniform mat3 specularMapTransform;
2332	varying vec2 vSpecularMapUv;
2333#endif
2334#ifdef USE_SPECULAR_COLORMAP
2335	uniform mat3 specularColorMapTransform;
2336	varying vec2 vSpecularColorMapUv;
2337#endif
2338#ifdef USE_SPECULAR_INTENSITYMAP
2339	uniform mat3 specularIntensityMapTransform;
2340	varying vec2 vSpecularIntensityMapUv;
2341#endif
2342#ifdef USE_TRANSMISSIONMAP
2343	uniform mat3 transmissionMapTransform;
2344	varying vec2 vTransmissionMapUv;
2345#endif
2346#ifdef USE_THICKNESSMAP
2347	uniform mat3 thicknessMapTransform;
2348	varying vec2 vThicknessMapUv;
2349#endif`,xj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2350	vUv = vec3( uv, 1 ).xy;
2351#endif
2352#ifdef USE_MAP
2353	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
2354#endif
2355#ifdef USE_ALPHAMAP
2356	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
2357#endif
2358#ifdef USE_LIGHTMAP
2359	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
2360#endif
2361#ifdef USE_AOMAP
2362	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
2363#endif
2364#ifdef USE_BUMPMAP
2365	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
2366#endif
2367#ifdef USE_NORMALMAP
2368	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
2369#endif
2370#ifdef USE_DISPLACEMENTMAP
2371	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
2372#endif
2373#ifdef USE_EMISSIVEMAP
2374	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
2375#endif
2376#ifdef USE_METALNESSMAP
2377	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
2378#endif
2379#ifdef USE_ROUGHNESSMAP
2380	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
2381#endif
2382#ifdef USE_ANISOTROPYMAP
2383	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
2384#endif
2385#ifdef USE_CLEARCOATMAP
2386	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
2387#endif
2388#ifdef USE_CLEARCOAT_NORMALMAP
2389	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
2390#endif
2391#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2392	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
2393#endif
2394#ifdef USE_IRIDESCENCEMAP
2395	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
2396#endif
2397#ifdef USE_IRIDESCENCE_THICKNESSMAP
2398	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
2399#endif
2400#ifdef USE_SHEEN_COLORMAP
2401	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
2402#endif
2403#ifdef USE_SHEEN_ROUGHNESSMAP
2404	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
2405#endif
2406#ifdef USE_SPECULARMAP
2407	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
2408#endif
2409#ifdef USE_SPECULAR_COLORMAP
2410	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
2411#endif
2412#ifdef USE_SPECULAR_INTENSITYMAP
2413	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
2414#endif
2415#ifdef USE_TRANSMISSIONMAP
2416	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
2417#endif
2418#ifdef USE_THICKNESSMAP
2419	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
2420#endif`,_j=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
2421	vec4 worldPosition = vec4( transformed, 1.0 );
2422	#ifdef USE_INSTANCING
2423		worldPosition = instanceMatrix * worldPosition;
2424	#endif
2425	worldPosition = modelMatrix * worldPosition;
2426#endif`;const Sj=`varying vec2 vUv;
2427uniform mat3 uvTransform;
2428void main() {
2429	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
2430	gl_Position = vec4( position.xy, 1.0, 1.0 );
2431}`,wj=`uniform sampler2D t2D;
2432uniform float backgroundIntensity;
2433varying vec2 vUv;
2434void main() {
2435	vec4 texColor = texture2D( t2D, vUv );
2436	#ifdef DECODE_VIDEO_TEXTURE
2437		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 );
2438	#endif
2439	texColor.rgb *= backgroundIntensity;
2440	gl_FragColor = texColor;
2441	#include <tonemapping_fragment>
2442	#include <colorspace_fragment>
2443}`,Aj=`varying vec3 vWorldDirection;
2444#include <common>
2445void main() {
2446	vWorldDirection = transformDirection( position, modelMatrix );
2447	#include <begin_vertex>
2448	#include <project_vertex>
2449	gl_Position.z = gl_Position.w;
2450}`,Mj=`#ifdef ENVMAP_TYPE_CUBE
2451	uniform samplerCube envMap;
2452#elif defined( ENVMAP_TYPE_CUBE_UV )
2453	uniform sampler2D envMap;
2454#endif
2455uniform float flipEnvMap;
2456uniform float backgroundBlurriness;
2457uniform float backgroundIntensity;
2458varying vec3 vWorldDirection;
2459#include <cube_uv_reflection_fragment>
2460void main() {
2461	#ifdef ENVMAP_TYPE_CUBE
2462		vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
2463	#elif defined( ENVMAP_TYPE_CUBE_UV )
2464		vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );
2465	#else
2466		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
2467	#endif
2468	texColor.rgb *= backgroundIntensity;
2469	gl_FragColor = texColor;
2470	#include <tonemapping_fragment>
2471	#include <colorspace_fragment>
2472}`,Ej=`varying vec3 vWorldDirection;
2473#include <common>
2474void main() {
2475	vWorldDirection = transformDirection( position, modelMatrix );
2476	#include <begin_vertex>
2477	#include <project_vertex>
2478	gl_Position.z = gl_Position.w;
2479}`,Tj=`uniform samplerCube tCube;
2480uniform float tFlip;
2481uniform float opacity;
2482varying vec3 vWorldDirection;
2483void main() {
2484	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
2485	gl_FragColor = texColor;
2486	gl_FragColor.a *= opacity;
2487	#include <tonemapping_fragment>
2488	#include <colorspace_fragment>
2489}`,bj=`#include <common>
2490#include <uv_pars_vertex>
2491#include <displacementmap_pars_vertex>
2492#include <morphtarget_pars_vertex>
2493#include <skinning_pars_vertex>
2494#include <logdepthbuf_pars_vertex>
2495#include <clipping_planes_pars_vertex>
2496varying vec2 vHighPrecisionZW;
2497void main() {
2498	#include <uv_vertex>
2499	#include <skinbase_vertex>
2500	#ifdef USE_DISPLACEMENTMAP
2501		#include <beginnormal_vertex>
2502		#include <morphnormal_vertex>
2503		#include <skinnormal_vertex>
2504	#endif
2505	#include <begin_vertex>
2506	#include <morphtarget_vertex>
2507	#include <skinning_vertex>
2508	#include <displacementmap_vertex>
2509	#include <project_vertex>
2510	#include <logdepthbuf_vertex>
2511	#include <clipping_planes_vertex>
2512	vHighPrecisionZW = gl_Position.zw;
2513}`,Cj=`#if DEPTH_PACKING == 3200
2514	uniform float opacity;
2515#endif
2516#include <common>
2517#include <packing>
2518#include <uv_pars_fragment>
2519#include <map_pars_fragment>
2520#include <alphamap_pars_fragment>
2521#include <alphatest_pars_fragment>
2522#include <alphahash_pars_fragment>
2523#include <logdepthbuf_pars_fragment>
2524#include <clipping_planes_pars_fragment>
2525varying vec2 vHighPrecisionZW;
2526void main() {
2527	#include <clipping_planes_fragment>
2528	vec4 diffuseColor = vec4( 1.0 );
2529	#if DEPTH_PACKING == 3200
2530		diffuseColor.a = opacity;
2531	#endif
2532	#include <map_fragment>
2533	#include <alphamap_fragment>
2534	#include <alphatest_fragment>
2535	#include <alphahash_fragment>
2536	#include <logdepthbuf_fragment>
2537	float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
2538	#if DEPTH_PACKING == 3200
2539		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
2540	#elif DEPTH_PACKING == 3201
2541		gl_FragColor = packDepthToRGBA( fragCoordZ );
2542	#endif
2543}`,Rj=`#define DISTANCE
2544varying vec3 vWorldPosition;
2545#include <common>
2546#include <uv_pars_vertex>
2547#include <displacementmap_pars_vertex>
2548#include <morphtarget_pars_vertex>
2549#include <skinning_pars_vertex>
2550#include <clipping_planes_pars_vertex>
2551void main() {
2552	#include <uv_vertex>
2553	#include <skinbase_vertex>
2554	#ifdef USE_DISPLACEMENTMAP
2555		#include <beginnormal_vertex>
2556		#include <morphnormal_vertex>
2557		#include <skinnormal_vertex>
2558	#endif
2559	#include <begin_vertex>
2560	#include <morphtarget_vertex>
2561	#include <skinning_vertex>
2562	#include <displacementmap_vertex>
2563	#include <project_vertex>
2564	#include <worldpos_vertex>
2565	#include <clipping_planes_vertex>
2566	vWorldPosition = worldPosition.xyz;
2567}`,Pj=`#define DISTANCE
2568uniform vec3 referencePosition;
2569uniform float nearDistance;
2570uniform float farDistance;
2571varying vec3 vWorldPosition;
2572#include <common>
2573#include <packing>
2574#include <uv_pars_fragment>
2575#include <map_pars_fragment>
2576#include <alphamap_pars_fragment>
2577#include <alphatest_pars_fragment>
2578#include <alphahash_pars_fragment>
2579#include <clipping_planes_pars_fragment>
2580void main () {
2581	#include <clipping_planes_fragment>
2582	vec4 diffuseColor = vec4( 1.0 );
2583	#include <map_fragment>
2584	#include <alphamap_fragment>
2585	#include <alphatest_fragment>
2586	#include <alphahash_fragment>
2587	float dist = length( vWorldPosition - referencePosition );
2588	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
2589	dist = saturate( dist );
2590	gl_FragColor = packDepthToRGBA( dist );
2591}`,Bj=`varying vec3 vWorldDirection;
2592#include <common>
2593void main() {
2594	vWorldDirection = transformDirection( position, modelMatrix );
2595	#include <begin_vertex>
2596	#include <project_vertex>
2597}`,Lj=`uniform sampler2D tEquirect;
2598varying vec3 vWorldDirection;
2599#include <common>
2600void main() {
2601	vec3 direction = normalize( vWorldDirection );
2602	vec2 sampleUV = equirectUv( direction );
2603	gl_FragColor = texture2D( tEquirect, sampleUV );
2604	#include <tonemapping_fragment>
2605	#include <colorspace_fragment>
2606}`,Ij=`uniform float scale;
2607attribute float lineDistance;
2608varying float vLineDistance;
2609#include <common>
2610#include <uv_pars_vertex>
2611#include <color_pars_vertex>
2612#include <fog_pars_vertex>
2613#include <morphtarget_pars_vertex>
2614#include <logdepthbuf_pars_vertex>
2615#include <clipping_planes_pars_vertex>
2616void main() {
2617	vLineDistance = scale * lineDistance;
2618	#include <uv_vertex>
2619	#include <color_vertex>
2620	#include <morphcolor_vertex>
2621	#include <begin_vertex>
2622	#include <morphtarget_vertex>
2623	#include <project_vertex>
2624	#include <logdepthbuf_vertex>
2625	#include <clipping_planes_vertex>
2626	#include <fog_vertex>
2627}`,Nj=`uniform vec3 diffuse;
2628uniform float opacity;
2629uniform float dashSize;
2630uniform float totalSize;
2631varying float vLineDistance;
2632#include <common>
2633#include <color_pars_fragment>
2634#include <uv_pars_fragment>
2635#include <map_pars_fragment>
2636#include <fog_pars_fragment>
2637#include <logdepthbuf_pars_fragment>
2638#include <clipping_planes_pars_fragment>
2639void main() {
2640	#include <clipping_planes_fragment>
2641	if ( mod( vLineDistance, totalSize ) > dashSize ) {
2642		discard;
2643	}
2644	vec3 outgoingLight = vec3( 0.0 );
2645	vec4 diffuseColor = vec4( diffuse, opacity );
2646	#include <logdepthbuf_fragment>
2647	#include <map_fragment>
2648	#include <color_fragment>
2649	outgoingLight = diffuseColor.rgb;
2650	#include <opaque_fragment>
2651	#include <tonemapping_fragment>
2652	#include <colorspace_fragment>
2653	#include <fog_fragment>
2654	#include <premultiplied_alpha_fragment>
2655}`,Dj=`#include <common>
2656#include <uv_pars_vertex>
2657#include <envmap_pars_vertex>
2658#include <color_pars_vertex>
2659#include <fog_pars_vertex>
2660#include <morphtarget_pars_vertex>
2661#include <skinning_pars_vertex>
2662#include <logdepthbuf_pars_vertex>
2663#include <clipping_planes_pars_vertex>
2664void main() {
2665	#include <uv_vertex>
2666	#include <color_vertex>
2667	#include <morphcolor_vertex>
2668	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
2669		#include <beginnormal_vertex>
2670		#include <morphnormal_vertex>
2671		#include <skinbase_vertex>
2672		#include <skinnormal_vertex>
2673		#include <defaultnormal_vertex>
2674	#endif
2675	#include <begin_vertex>
2676	#include <morphtarget_vertex>
2677	#include <skinning_vertex>
2678	#include <project_vertex>
2679	#include <logdepthbuf_vertex>
2680	#include <clipping_planes_vertex>
2681	#include <worldpos_vertex>
2682	#include <envmap_vertex>
2683	#include <fog_vertex>
2684}`,Fj=`uniform vec3 diffuse;
2685uniform float opacity;
2686#ifndef FLAT_SHADED
2687	varying vec3 vNormal;
2688#endif
2689#include <common>
2690#include <dithering_pars_fragment>
2691#include <color_pars_fragment>
2692#include <uv_pars_fragment>
2693#include <map_pars_fragment>
2694#include <alphamap_pars_fragment>
2695#include <alphatest_pars_fragment>
2696#include <alphahash_pars_fragment>
2697#include <aomap_pars_fragment>
2698#include <lightmap_pars_fragment>
2699#include <envmap_common_pars_fragment>
2700#include <envmap_pars_fragment>
2701#include <fog_pars_fragment>
2702#include <specularmap_pars_fragment>
2703#include <logdepthbuf_pars_fragment>
2704#include <clipping_planes_pars_fragment>
2705void main() {
2706	#include <clipping_planes_fragment>
2707	vec4 diffuseColor = vec4( diffuse, opacity );
2708	#include <logdepthbuf_fragment>
2709	#include <map_fragment>
2710	#include <color_fragment>
2711	#include <alphamap_fragment>
2712	#include <alphatest_fragment>
2713	#include <alphahash_fragment>
2714	#include <specularmap_fragment>
2715	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2716	#ifdef USE_LIGHTMAP
2717		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
2718		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
2719	#else
2720		reflectedLight.indirectDiffuse += vec3( 1.0 );
2721	#endif
2722	#include <aomap_fragment>
2723	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
2724	vec3 outgoingLight = reflectedLight.indirectDiffuse;
2725	#include <envmap_fragment>
2726	#include <opaque_fragment>
2727	#include <tonemapping_fragment>
2728	#include <colorspace_fragment>
2729	#include <fog_fragment>
2730	#include <premultiplied_alpha_fragment>
2731	#include <dithering_fragment>
2732}`,Oj=`#define LAMBERT
2733varying vec3 vViewPosition;
2734#include <common>
2735#include <uv_pars_vertex>
2736#include <displacementmap_pars_vertex>
2737#include <envmap_pars_vertex>
2738#include <color_pars_vertex>
2739#include <fog_pars_vertex>
2740#include <normal_pars_vertex>
2741#include <morphtarget_pars_vertex>
2742#include <skinning_pars_vertex>
2743#include <shadowmap_pars_vertex>
2744#include <logdepthbuf_pars_vertex>
2745#include <clipping_planes_pars_vertex>
2746void main() {
2747	#include <uv_vertex>
2748	#include <color_vertex>
2749	#include <morphcolor_vertex>
2750	#include <beginnormal_vertex>
2751	#include <morphnormal_vertex>
2752	#include <skinbase_vertex>
2753	#include <skinnormal_vertex>
2754	#include <defaultnormal_vertex>
2755	#include <normal_vertex>
2756	#include <begin_vertex>
2757	#include <morphtarget_vertex>
2758	#include <skinning_vertex>
2759	#include <displacementmap_vertex>
2760	#include <project_vertex>
2761	#include <logdepthbuf_vertex>
2762	#include <clipping_planes_vertex>
2763	vViewPosition = - mvPosition.xyz;
2764	#include <worldpos_vertex>
2765	#include <envmap_vertex>
2766	#include <shadowmap_vertex>
2767	#include <fog_vertex>
2768}`,Uj=`#define LAMBERT
2769uniform vec3 diffuse;
2770uniform vec3 emissive;
2771uniform float opacity;
2772#include <common>
2773#include <packing>
2774#include <dithering_pars_fragment>
2775#include <color_pars_fragment>
2776#include <uv_pars_fragment>
2777#include <map_pars_fragment>
2778#include <alphamap_pars_fragment>
2779#include <alphatest_pars_fragment>
2780#include <alphahash_pars_fragment>
2781#include <aomap_pars_fragment>
2782#include <lightmap_pars_fragment>
2783#include <emissivemap_pars_fragment>
2784#include <envmap_common_pars_fragment>
2785#include <envmap_pars_fragment>
2786#include <fog_pars_fragment>
2787#include <bsdfs>
2788#include <lights_pars_begin>
2789#include <normal_pars_fragment>
2790#include <lights_lambert_pars_fragment>
2791#include <shadowmap_pars_fragment>
2792#include <bumpmap_pars_fragment>
2793#include <normalmap_pars_fragment>
2794#include <specularmap_pars_fragment>
2795#include <logdepthbuf_pars_fragment>
2796#include <clipping_planes_pars_fragment>
2797void main() {
2798	#include <clipping_planes_fragment>
2799	vec4 diffuseColor = vec4( diffuse, opacity );
2800	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2801	vec3 totalEmissiveRadiance = emissive;
2802	#include <logdepthbuf_fragment>
2803	#include <map_fragment>
2804	#include <color_fragment>
2805	#include <alphamap_fragment>
2806	#include <alphatest_fragment>
2807	#include <alphahash_fragment>
2808	#include <specularmap_fragment>
2809	#include <normal_fragment_begin>
2810	#include <normal_fragment_maps>
2811	#include <emissivemap_fragment>
2812	#include <lights_lambert_fragment>
2813	#include <lights_fragment_begin>
2814	#include <lights_fragment_maps>
2815	#include <lights_fragment_end>
2816	#include <aomap_fragment>
2817	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
2818	#include <envmap_fragment>
2819	#include <opaque_fragment>
2820	#include <tonemapping_fragment>
2821	#include <colorspace_fragment>
2822	#include <fog_fragment>
2823	#include <premultiplied_alpha_fragment>
2824	#include <dithering_fragment>
2825}`,kj=`#define MATCAP
2826varying vec3 vViewPosition;
2827#include <common>
2828#include <uv_pars_vertex>
2829#include <color_pars_vertex>
2830#include <displacementmap_pars_vertex>
2831#include <fog_pars_vertex>
2832#include <normal_pars_vertex>
2833#include <morphtarget_pars_vertex>
2834#include <skinning_pars_vertex>
2835#include <logdepthbuf_pars_vertex>
2836#include <clipping_planes_pars_vertex>
2837void main() {
2838	#include <uv_vertex>
2839	#include <color_vertex>
2840	#include <morphcolor_vertex>
2841	#include <beginnormal_vertex>
2842	#include <morphnormal_vertex>
2843	#include <skinbase_vertex>
2844	#include <skinnormal_vertex>
2845	#include <defaultnormal_vertex>
2846	#include <normal_vertex>
2847	#include <begin_vertex>
2848	#include <morphtarget_vertex>
2849	#include <skinning_vertex>
2850	#include <displacementmap_vertex>
2851	#include <project_vertex>
2852	#include <logdepthbuf_vertex>
2853	#include <clipping_planes_vertex>
2854	#include <fog_vertex>
2855	vViewPosition = - mvPosition.xyz;
2856}`,zj=`#define MATCAP
2857uniform vec3 diffuse;
2858uniform float opacity;
2859uniform sampler2D matcap;
2860varying vec3 vViewPosition;
2861#include <common>
2862#include <dithering_pars_fragment>
2863#include <color_pars_fragment>
2864#include <uv_pars_fragment>
2865#include <map_pars_fragment>
2866#include <alphamap_pars_fragment>
2867#include <alphatest_pars_fragment>
2868#include <alphahash_pars_fragment>
2869#include <fog_pars_fragment>
2870#include <normal_pars_fragment>
2871#include <bumpmap_pars_fragment>
2872#include <normalmap_pars_fragment>
2873#include <logdepthbuf_pars_fragment>
2874#include <clipping_planes_pars_fragment>
2875void main() {
2876	#include <clipping_planes_fragment>
2877	vec4 diffuseColor = vec4( diffuse, opacity );
2878	#include <logdepthbuf_fragment>
2879	#include <map_fragment>
2880	#include <color_fragment>
2881	#include <alphamap_fragment>
2882	#include <alphatest_fragment>
2883	#include <alphahash_fragment>
2884	#include <normal_fragment_begin>
2885	#include <normal_fragment_maps>
2886	vec3 viewDir = normalize( vViewPosition );
2887	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
2888	vec3 y = cross( viewDir, x );
2889	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
2890	#ifdef USE_MATCAP
2891		vec4 matcapColor = texture2D( matcap, uv );
2892	#else
2893		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
2894	#endif
2895	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
2896	#include <opaque_fragment>
2897	#include <tonemapping_fragment>
2898	#include <colorspace_fragment>
2899	#include <fog_fragment>
2900	#include <premultiplied_alpha_fragment>
2901	#include <dithering_fragment>
2902}`,Hj=`#define NORMAL
2903#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
2904	varying vec3 vViewPosition;
2905#endif
2906#include <common>
2907#include <uv_pars_vertex>
2908#include <displacementmap_pars_vertex>
2909#include <normal_pars_vertex>
2910#include <morphtarget_pars_vertex>
2911#include <skinning_pars_vertex>
2912#include <logdepthbuf_pars_vertex>
2913#include <clipping_planes_pars_vertex>
2914void main() {
2915	#include <uv_vertex>
2916	#include <beginnormal_vertex>
2917	#include <morphnormal_vertex>
2918	#include <skinbase_vertex>
2919	#include <skinnormal_vertex>
2920	#include <defaultnormal_vertex>
2921	#include <normal_vertex>
2922	#include <begin_vertex>
2923	#include <morphtarget_vertex>
2924	#include <skinning_vertex>
2925	#include <displacementmap_vertex>
2926	#include <project_vertex>
2927	#include <logdepthbuf_vertex>
2928	#include <clipping_planes_vertex>
2929#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
2930	vViewPosition = - mvPosition.xyz;
2931#endif
2932}`,Gj=`#define NORMAL
2933uniform float opacity;
2934#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
2935	varying vec3 vViewPosition;
2936#endif
2937#include <packing>
2938#include <uv_pars_fragment>
2939#include <normal_pars_fragment>
2940#include <bumpmap_pars_fragment>
2941#include <normalmap_pars_fragment>
2942#include <logdepthbuf_pars_fragment>
2943#include <clipping_planes_pars_fragment>
2944void main() {
2945	#include <clipping_planes_fragment>
2946	#include <logdepthbuf_fragment>
2947	#include <normal_fragment_begin>
2948	#include <normal_fragment_maps>
2949	gl_FragColor = vec4( packNormalToRGB( normal ), opacity );
2950	#ifdef OPAQUE
2951		gl_FragColor.a = 1.0;
2952	#endif
2953}`,Vj=`#define PHONG
2954varying vec3 vViewPosition;
2955#include <common>
2956#include <uv_pars_vertex>
2957#include <displacementmap_pars_vertex>
2958#include <envmap_pars_vertex>
2959#include <color_pars_vertex>
2960#include <fog_pars_vertex>
2961#include <normal_pars_vertex>
2962#include <morphtarget_pars_vertex>
2963#include <skinning_pars_vertex>
2964#include <shadowmap_pars_vertex>
2965#include <logdepthbuf_pars_vertex>
2966#include <clipping_planes_pars_vertex>
2967void main() {
2968	#include <uv_vertex>
2969	#include <color_vertex>
2970	#include <morphcolor_vertex>
2971	#include <beginnormal_vertex>
2972	#include <morphnormal_vertex>
2973	#include <skinbase_vertex>
2974	#include <skinnormal_vertex>
2975	#include <defaultnormal_vertex>
2976	#include <normal_vertex>
2977	#include <begin_vertex>
2978	#include <morphtarget_vertex>
2979	#include <skinning_vertex>
2980	#include <displacementmap_vertex>
2981	#include <project_vertex>
2982	#include <logdepthbuf_vertex>
2983	#include <clipping_planes_vertex>
2984	vViewPosition = - mvPosition.xyz;
2985	#include <worldpos_vertex>
2986	#include <envmap_vertex>
2987	#include <shadowmap_vertex>
2988	#include <fog_vertex>
2989}`,jj=`#define PHONG
2990uniform vec3 diffuse;
2991uniform vec3 emissive;
2992uniform vec3 specular;
2993uniform float shininess;
2994uniform float opacity;
2995#include <common>
2996#include <packing>
2997#include <dithering_pars_fragment>
2998#include <color_pars_fragment>
2999#include <uv_pars_fragment>
3000#include <map_pars_fragment>
3001#include <alphamap_pars_fragment>
3002#include <alphatest_pars_fragment>
3003#include <alphahash_pars_fragment>
3004#include <aomap_pars_fragment>
3005#include <lightmap_pars_fragment>
3006#include <emissivemap_pars_fragment>
3007#include <envmap_common_pars_fragment>
3008#include <envmap_pars_fragment>
3009#include <fog_pars_fragment>
3010#include <bsdfs>
3011#include <lights_pars_begin>
3012#include <normal_pars_fragment>
3013#include <lights_phong_pars_fragment>
3014#include <shadowmap_pars_fragment>
3015#include <bumpmap_pars_fragment>
3016#include <normalmap_pars_fragment>
3017#include <specularmap_pars_fragment>
3018#include <logdepthbuf_pars_fragment>
3019#include <clipping_planes_pars_fragment>
3020void main() {
3021	#include <clipping_planes_fragment>
3022	vec4 diffuseColor = vec4( diffuse, opacity );
3023	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3024	vec3 totalEmissiveRadiance = emissive;
3025	#include <logdepthbuf_fragment>
3026	#include <map_fragment>
3027	#include <color_fragment>
3028	#include <alphamap_fragment>
3029	#include <alphatest_fragment>
3030	#include <alphahash_fragment>
3031	#include <specularmap_fragment>
3032	#include <normal_fragment_begin>
3033	#include <normal_fragment_maps>
3034	#include <emissivemap_fragment>
3035	#include <lights_phong_fragment>
3036	#include <lights_fragment_begin>
3037	#include <lights_fragment_maps>
3038	#include <lights_fragment_end>
3039	#include <aomap_fragment>
3040	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
3041	#include <envmap_fragment>
3042	#include <opaque_fragment>
3043	#include <tonemapping_fragment>
3044	#include <colorspace_fragment>
3045	#include <fog_fragment>
3046	#include <premultiplied_alpha_fragment>
3047	#include <dithering_fragment>
3048}`,Wj=`#define STANDARD
3049varying vec3 vViewPosition;
3050#ifdef USE_TRANSMISSION
3051	varying vec3 vWorldPosition;
3052#endif
3053#include <common>
3054#include <uv_pars_vertex>
3055#include <displacementmap_pars_vertex>
3056#include <color_pars_vertex>
3057#include <fog_pars_vertex>
3058#include <normal_pars_vertex>
3059#include <morphtarget_pars_vertex>
3060#include <skinning_pars_vertex>
3061#include <shadowmap_pars_vertex>
3062#include <logdepthbuf_pars_vertex>
3063#include <clipping_planes_pars_vertex>
3064void main() {
3065	#include <uv_vertex>
3066	#include <color_vertex>
3067	#include <morphcolor_vertex>
3068	#include <beginnormal_vertex>
3069	#include <morphnormal_vertex>
3070	#include <skinbase_vertex>
3071	#include <skinnormal_vertex>
3072	#include <defaultnormal_vertex>
3073	#include <normal_vertex>
3074	#include <begin_vertex>
3075	#include <morphtarget_vertex>
3076	#include <skinning_vertex>
3077	#include <displacementmap_vertex>
3078	#include <project_vertex>
3079	#include <logdepthbuf_vertex>
3080	#include <clipping_planes_vertex>
3081	vViewPosition = - mvPosition.xyz;
3082	#include <worldpos_vertex>
3083	#include <shadowmap_vertex>
3084	#include <fog_vertex>
3085#ifdef USE_TRANSMISSION
3086	vWorldPosition = worldPosition.xyz;
3087#endif
3088}`,Xj=`#define STANDARD
3089#ifdef PHYSICAL
3090	#define IOR
3091	#define USE_SPECULAR
3092#endif
3093uniform vec3 diffuse;
3094uniform vec3 emissive;
3095uniform float roughness;
3096uniform float metalness;
3097uniform float opacity;
3098#ifdef IOR
3099	uniform float ior;
3100#endif
3101#ifdef USE_SPECULAR
3102	uniform float specularIntensity;
3103	uniform vec3 specularColor;
3104	#ifdef USE_SPECULAR_COLORMAP
3105		uniform sampler2D specularColorMap;
3106	#endif
3107	#ifdef USE_SPECULAR_INTENSITYMAP
3108		uniform sampler2D specularIntensityMap;
3109	#endif
3110#endif
3111#ifdef USE_CLEARCOAT
3112	uniform float clearcoat;
3113	uniform float clearcoatRoughness;
3114#endif
3115#ifdef USE_IRIDESCENCE
3116	uniform float iridescence;
3117	uniform float iridescenceIOR;
3118	uniform float iridescenceThicknessMinimum;
3119	uniform float iridescenceThicknessMaximum;
3120#endif
3121#ifdef USE_SHEEN
3122	uniform vec3 sheenColor;
3123	uniform float sheenRoughness;
3124	#ifdef USE_SHEEN_COLORMAP
3125		uniform sampler2D sheenColorMap;
3126	#endif
3127	#ifdef USE_SHEEN_ROUGHNESSMAP
3128		uniform sampler2D sheenRoughnessMap;
3129	#endif
3130#endif
3131#ifdef USE_ANISOTROPY
3132	uniform vec2 anisotropyVector;
3133	#ifdef USE_ANISOTROPYMAP
3134		uniform sampler2D anisotropyMap;
3135	#endif
3136#endif
3137varying vec3 vViewPosition;
3138#include <common>
3139#include <packing>
3140#include <dithering_pars_fragment>
3141#include <color_pars_fragment>
3142#include <uv_pars_fragment>
3143#include <map_pars_fragment>
3144#include <alphamap_pars_fragment>
3145#include <alphatest_pars_fragment>
3146#include <alphahash_pars_fragment>
3147#include <aomap_pars_fragment>
3148#include <lightmap_pars_fragment>
3149#include <emissivemap_pars_fragment>
3150#include <iridescence_fragment>
3151#include <cube_uv_reflection_fragment>
3152#include <envmap_common_pars_fragment>
3153#include <envmap_physical_pars_fragment>
3154#include <fog_pars_fragment>
3155#include <lights_pars_begin>
3156#include <normal_pars_fragment>
3157#include <lights_physical_pars_fragment>
3158#include <transmission_pars_fragment>
3159#include <shadowmap_pars_fragment>
3160#include <bumpmap_pars_fragment>
3161#include <normalmap_pars_fragment>
3162#include <clearcoat_pars_fragment>
3163#include <iridescence_pars_fragment>
3164#include <roughnessmap_pars_fragment>
3165#include <metalnessmap_pars_fragment>
3166#include <logdepthbuf_pars_fragment>
3167#include <clipping_planes_pars_fragment>
3168void main() {
3169	#include <clipping_planes_fragment>
3170	vec4 diffuseColor = vec4( diffuse, opacity );
3171	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3172	vec3 totalEmissiveRadiance = emissive;
3173	#include <logdepthbuf_fragment>
3174	#include <map_fragment>
3175	#include <color_fragment>
3176	#include <alphamap_fragment>
3177	#include <alphatest_fragment>
3178	#include <alphahash_fragment>
3179	#include <roughnessmap_fragment>
3180	#include <metalnessmap_fragment>
3181	#include <normal_fragment_begin>
3182	#include <normal_fragment_maps>
3183	#include <clearcoat_normal_fragment_begin>
3184	#include <clearcoat_normal_fragment_maps>
3185	#include <emissivemap_fragment>
3186	#include <lights_physical_fragment>
3187	#include <lights_fragment_begin>
3188	#include <lights_fragment_maps>
3189	#include <lights_fragment_end>
3190	#include <aomap_fragment>
3191	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
3192	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
3193	#include <transmission_fragment>
3194	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
3195	#ifdef USE_SHEEN
3196		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
3197		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;
3198	#endif
3199	#ifdef USE_CLEARCOAT
3200		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
3201		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
3202		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;
3203	#endif
3204	#include <opaque_fragment>
3205	#include <tonemapping_fragment>
3206	#include <colorspace_fragment>
3207	#include <fog_fragment>
3208	#include <premultiplied_alpha_fragment>
3209	#include <dithering_fragment>
3210}`,Jj=`#define TOON
3211varying vec3 vViewPosition;
3212#include <common>
3213#include <uv_pars_vertex>
3214#include <displacementmap_pars_vertex>
3215#include <color_pars_vertex>
3216#include <fog_pars_vertex>
3217#include <normal_pars_vertex>
3218#include <morphtarget_pars_vertex>
3219#include <skinning_pars_vertex>
3220#include <shadowmap_pars_vertex>
3221#include <logdepthbuf_pars_vertex>
3222#include <clipping_planes_pars_vertex>
3223void main() {
3224	#include <uv_vertex>
3225	#include <color_vertex>
3226	#include <morphcolor_vertex>
3227	#include <beginnormal_vertex>
3228	#include <morphnormal_vertex>
3229	#include <skinbase_vertex>
3230	#include <skinnormal_vertex>
3231	#include <defaultnormal_vertex>
3232	#include <normal_vertex>
3233	#include <begin_vertex>
3234	#include <morphtarget_vertex>
3235	#include <skinning_vertex>
3236	#include <displacementmap_vertex>
3237	#include <project_vertex>
3238	#include <logdepthbuf_vertex>
3239	#include <clipping_planes_vertex>
3240	vViewPosition = - mvPosition.xyz;
3241	#include <worldpos_vertex>
3242	#include <shadowmap_vertex>
3243	#include <fog_vertex>
3244}`,Kj=`#define TOON
3245uniform vec3 diffuse;
3246uniform vec3 emissive;
3247uniform float opacity;
3248#include <common>
3249#include <packing>
3250#include <dithering_pars_fragment>
3251#include <color_pars_fragment>
3252#include <uv_pars_fragment>
3253#include <map_pars_fragment>
3254#include <alphamap_pars_fragment>
3255#include <alphatest_pars_fragment>
3256#include <alphahash_pars_fragment>
3257#include <aomap_pars_fragment>
3258#include <lightmap_pars_fragment>
3259#include <emissivemap_pars_fragment>
3260#include <gradientmap_pars_fragment>
3261#include <fog_pars_fragment>
3262#include <bsdfs>
3263#include <lights_pars_begin>
3264#include <normal_pars_fragment>
3265#include <lights_toon_pars_fragment>
3266#include <shadowmap_pars_fragment>
3267#include <bumpmap_pars_fragment>
3268#include <normalmap_pars_fragment>
3269#include <logdepthbuf_pars_fragment>
3270#include <clipping_planes_pars_fragment>
3271void main() {
3272	#include <clipping_planes_fragment>
3273	vec4 diffuseColor = vec4( diffuse, opacity );
3274	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3275	vec3 totalEmissiveRadiance = emissive;
3276	#include <logdepthbuf_fragment>
3277	#include <map_fragment>
3278	#include <color_fragment>
3279	#include <alphamap_fragment>
3280	#include <alphatest_fragment>
3281	#include <alphahash_fragment>
3282	#include <normal_fragment_begin>
3283	#include <normal_fragment_maps>
3284	#include <emissivemap_fragment>
3285	#include <lights_toon_fragment>
3286	#include <lights_fragment_begin>
3287	#include <lights_fragment_maps>
3288	#include <lights_fragment_end>
3289	#include <aomap_fragment>
3290	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3291	#include <opaque_fragment>
3292	#include <tonemapping_fragment>
3293	#include <colorspace_fragment>
3294	#include <fog_fragment>
3295	#include <premultiplied_alpha_fragment>
3296	#include <dithering_fragment>
3297}`,Yj=`uniform float size;
3298uniform float scale;
3299#include <common>
3300#include <color_pars_vertex>
3301#include <fog_pars_vertex>
3302#include <morphtarget_pars_vertex>
3303#include <logdepthbuf_pars_vertex>
3304#include <clipping_planes_pars_vertex>
3305#ifdef USE_POINTS_UV
3306	varying vec2 vUv;
3307	uniform mat3 uvTransform;
3308#endif
3309void main() {
3310	#ifdef USE_POINTS_UV
3311		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
3312	#endif
3313	#include <color_vertex>
3314	#include <morphcolor_vertex>
3315	#include <begin_vertex>
3316	#include <morphtarget_vertex>
3317	#include <project_vertex>
3318	gl_PointSize = size;
3319	#ifdef USE_SIZEATTENUATION
3320		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3321		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
3322	#endif
3323	#include <logdepthbuf_vertex>
3324	#include <clipping_planes_vertex>
3325	#include <worldpos_vertex>
3326	#include <fog_vertex>
3327}`,Qj=`uniform vec3 diffuse;
3328uniform float opacity;
3329#include <common>
3330#include <color_pars_fragment>
3331#include <map_particle_pars_fragment>
3332#include <alphatest_pars_fragment>
3333#include <alphahash_pars_fragment>
3334#include <fog_pars_fragment>
3335#include <logdepthbuf_pars_fragment>
3336#include <clipping_planes_pars_fragment>
3337void main() {
3338	#include <clipping_planes_fragment>
3339	vec3 outgoingLight = vec3( 0.0 );
3340	vec4 diffuseColor = vec4( diffuse, opacity );
3341	#include <logdepthbuf_fragment>
3342	#include <map_particle_fragment>
3343	#include <color_fragment>
3344	#include <alphatest_fragment>
3345	#include <alphahash_fragment>
3346	outgoingLight = diffuseColor.rgb;
3347	#include <opaque_fragment>
3348	#include <tonemapping_fragment>
3349	#include <colorspace_fragment>
3350	#include <fog_fragment>
3351	#include <premultiplied_alpha_fragment>
3352}`,Zj=`#include <common>
3353#include <fog_pars_vertex>
3354#include <morphtarget_pars_vertex>
3355#include <skinning_pars_vertex>
3356#include <logdepthbuf_pars_vertex>
3357#include <shadowmap_pars_vertex>
3358void main() {
3359	#include <beginnormal_vertex>
3360	#include <morphnormal_vertex>
3361	#include <skinbase_vertex>
3362	#include <skinnormal_vertex>
3363	#include <defaultnormal_vertex>
3364	#include <begin_vertex>
3365	#include <morphtarget_vertex>
3366	#include <skinning_vertex>
3367	#include <project_vertex>
3368	#include <logdepthbuf_vertex>
3369	#include <worldpos_vertex>
3370	#include <shadowmap_vertex>
3371	#include <fog_vertex>
3372}`,qj=`uniform vec3 color;
3373uniform float opacity;
3374#include <common>
3375#include <packing>
3376#include <fog_pars_fragment>
3377#include <bsdfs>
3378#include <lights_pars_begin>
3379#include <logdepthbuf_pars_fragment>
3380#include <shadowmap_pars_fragment>
3381#include <shadowmask_pars_fragment>
3382void main() {
3383	#include <logdepthbuf_fragment>
3384	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
3385	#include <tonemapping_fragment>
3386	#include <colorspace_fragment>
3387	#include <fog_fragment>
3388}`,$j=`uniform float rotation;
3389uniform vec2 center;
3390#include <common>
3391#include <uv_pars_vertex>
3392#include <fog_pars_vertex>
3393#include <logdepthbuf_pars_vertex>
3394#include <clipping_planes_pars_vertex>
3395void main() {
3396	#include <uv_vertex>
3397	vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
3398	vec2 scale;
3399	scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
3400	scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
3401	#ifndef USE_SIZEATTENUATION
3402		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3403		if ( isPerspective ) scale *= - mvPosition.z;
3404	#endif
3405	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
3406	vec2 rotatedPosition;
3407	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3408	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3409	mvPosition.xy += rotatedPosition;
3410	gl_Position = projectionMatrix * mvPosition;
3411	#include <logdepthbuf_vertex>
3412	#include <clipping_planes_vertex>
3413	#include <fog_vertex>
3414}`,eW=`uniform vec3 diffuse;
3415uniform float opacity;
3416#include <common>
3417#include <uv_pars_fragment>
3418#include <map_pars_fragment>
3419#include <alphamap_pars_fragment>
3420#include <alphatest_pars_fragment>
3421#include <alphahash_pars_fragment>
3422#include <fog_pars_fragment>
3423#include <logdepthbuf_pars_fragment>
3424#include <clipping_planes_pars_fragment>
3425void main() {
3426	#include <clipping_planes_fragment>
3427	vec3 outgoingLight = vec3( 0.0 );
3428	vec4 diffuseColor = vec4( diffuse, opacity );
3429	#include <logdepthbuf_fragment>
3430	#include <map_fragment>
3431	#include <alphamap_fragment>
3432	#include <alphatest_fragment>
3433	#include <alphahash_fragment>
3434	outgoingLight = diffuseColor.rgb;
3435	#include <opaque_fragment>
3436	#include <tonemapping_fragment>
3437	#include <colorspace_fragment>
3438	#include <fog_fragment>
3439}`,Lt={alphahash_fragment:MG,alphahash_pars_fragment:EG,alphamap_fragment:TG,alphamap_pars_fragment:bG,alphatest_fragment:CG,alphatest_pars_fragment:RG,aomap_fragment:PG,aomap_pars_fragment:BG,begin_vertex:LG,beginnormal_vertex:IG,bsdfs:NG,iridescence_fragment:DG,bumpmap_pars_fragment:FG,clipping_planes_fragment:OG,clipping_planes_pars_fragment:UG,clipping_planes_pars_vertex:kG,clipping_planes_vertex:zG,color_fragment:HG,color_pars_fragment:GG,color_pars_vertex:VG,color_vertex:jG,common:WG,cube_uv_reflection_fragment:XG,defaultnormal_vertex:JG,displacementmap_pars_vertex:KG,displacementmap_vertex:YG,emissivemap_fragment:QG,emissivemap_pars_fragment:ZG,colorspace_fragment:qG,colorspace_pars_fragment:$G,envmap_fragment:eV,envmap_common_pars_fragment:tV,envmap_pars_fragment:nV,envmap_pars_vertex:iV,envmap_physical_pars_fragment:mV,envmap_vertex:rV,fog_vertex:sV,fog_pars_vertex:oV,fog_fragment:aV,fog_pars_fragment:lV,gradientmap_pars_fragment:cV,lightmap_fragment:uV,lightmap_pars_fragment:fV,lights_lambert_fragment:hV,lights_lambert_pars_fragment:dV,lights_pars_begin:pV,lights_toon_fragment:gV,lights_toon_pars_fragment:vV,lights_phong_fragment:yV,lights_phong_pars_fragment:xV,lights_physical_fragment:_V,lights_physical_pars_fragment:SV,lights_fragment_begin:wV,lights_fragment_maps:AV,lights_fragment_end:MV,logdepthbuf_fragment:EV,logdepthbuf_pars_fragment:TV,logdepthbuf_pars_vertex:bV,logdepthbuf_vertex:CV,map_fragment:RV,map_pars_fragment:PV,map_particle_fragment:BV,map_particle_pars_fragment:LV,metalnessmap_fragment:IV,metalnessmap_pars_fragment:NV,morphcolor_vertex:DV,morphnormal_vertex:FV,morphtarget_pars_vertex:OV,morphtarget_vertex:UV,normal_fragment_begin:kV,normal_fragment_maps:zV,normal_pars_fragment:HV,normal_pars_vertex:GV,normal_vertex:VV,normalmap_pars_fragment:jV,clearcoat_normal_fragment_begin:WV,clearcoat_normal_fragment_maps:XV,clearcoat_pars_fragment:JV,iridescence_pars_fragment:KV,opaque_fragment:YV,packing:QV,premultiplied_alpha_fragment:ZV,project_vertex:qV,dithering_fragment:$V,dithering_pars_fragment:ej,roughnessmap_fragment:tj,roughnessmap_pars_fragment:nj,shadowmap_pars_fragment:ij,shadowmap_pars_vertex:rj,shadowmap_vertex:sj,shadowmask_pars_fragment:oj,skinbase_vertex:aj,skinning_pars_vertex:lj,skinning_vertex:cj,skinnormal_vertex:uj,specularmap_fragment:fj,specularmap_pars_fragment:hj,tonemapping_fragment:dj,tonemapping_pars_fragment:pj,transmission_fragment:mj,transmission_pars_fragment:gj,uv_pars_fragment:vj,uv_pars_vertex:yj,uv_vertex:xj,worldpos_vertex:_j,background_vert:Sj,background_frag:wj,backgroundCube_vert:Aj,backgroundCube_frag:Mj,cube_vert:Ej,cube_frag:Tj,depth_vert:bj,depth_frag:Cj,distanceRGBA_vert:Rj,distanceRGBA_frag:Pj,equirect_vert:Bj,equirect_frag:Lj,linedashed_vert:Ij,linedashed_frag:Nj,meshbasic_vert:Dj,meshbasic_frag:Fj,meshlambert_vert:Oj,meshlambert_frag:Uj,meshmatcap_vert:kj,meshmatcap_frag:zj,meshnormal_vert:Hj,meshnormal_frag:Gj,meshphong_vert:Vj,meshphong_frag:jj,meshphysical_vert:Wj,meshphysical_frag:Xj,meshtoon_vert:Jj,meshtoon_frag:Kj,points_vert:Yj,points_frag:Qj,shadow_vert:Zj,shadow_frag:qj,sprite_vert:$j,sprite_frag:eW},je={common:{diffuse:{value:new He(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ft},alphaMap:{value:null},alphaMapTransform:{value:new Ft},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ft}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ft}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ft}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ft},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ft},normalScale:{value:new le(1,1)}}
vendor: 7,218 bytes, line 3439
3439,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ft},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ft}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ft}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ft}},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 Ft},alphaTest:{value:0},uvTransform:{value:new Ft}},sprite:{diffuse:{value:new He(16777215)},opacity:{value:1},center:{value:new le(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ft},alphaMap:{value:null},alphaMapTransform:{value:new Ft},alphaTest:{value:0}}},zs={basic:{uniforms:nr([je.common,je.specularmap,je.envmap,je.aomap,je.lightmap,je.fog]),vertexShader:Lt.meshbasic_vert,fragmentShader:Lt.meshbasic_frag},lambert:{uniforms:nr([je.common,je.specularmap,je.envmap,je.aomap,je.lightmap,je.emissivemap,je.bumpmap,je.normalmap,je.displacementmap,je.fog,je.lights,{emissive:{value:new He(0)}}]),vertexShader:Lt.meshlambert_vert,fragmentShader:Lt.meshlambert_frag},phong:{uniforms:nr([je.common,je.specularmap,je.envmap,je.aomap,je.lightmap,je.emissivemap,je.bumpmap,je.normalmap,je.displacementmap,je.fog,je.lights,{emissive:{value:new He(0)},specular:{value:new He(1118481)},shininess:{value:30}}]),vertexShader:Lt.meshphong_vert,fragmentShader:Lt.meshphong_frag},standard:{uniforms:nr([je.common,je.envmap,je.aomap,je.lightmap,je.emissivemap,je.bumpmap,je.normalmap,je.displacementmap,je.roughnessmap,je.metalnessmap,je.fog,je.lights,{emissive:{value:new He(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Lt.meshphysical_vert,fragmentShader:Lt.meshphysical_frag},toon:{uniforms:nr([je.common,je.aomap,je.lightmap,je.emissivemap,je.bumpmap,je.normalmap,je.displacementmap,je.gradientmap,je.fog,je.lights,{emissive:{value:new He(0)}}]),vertexShader:Lt.meshtoon_vert,fragmentShader:Lt.meshtoon_frag},matcap:{uniforms:nr([je.common,je.bumpmap,je.normalmap,je.displacementmap,je.fog,{matcap:{value:null}}]),vertexShader:Lt.meshmatcap_vert,fragmentShader:Lt.meshmatcap_frag},points:{uniforms:nr([je.points,je.fog]),vertexShader:Lt.points_vert,fragmentShader:Lt.points_frag},dashed:{uniforms:nr([je.common,je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Lt.linedashed_vert,fragmentShader:Lt.linedashed_frag},depth:{uniforms:nr([je.common,je.displacementmap]),vertexShader:Lt.depth_vert,fragmentShader:Lt.depth_frag},normal:{uniforms:nr([je.common,je.bumpmap,je.normalmap,je.displacementmap,{opacity:{value:1}}]),vertexShader:Lt.meshnormal_vert,fragmentShader:Lt.meshnormal_frag},sprite:{uniforms:nr([je.sprite,je.fog]),vertexShader:Lt.sprite_vert,fragmentShader:Lt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ft},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Lt.background_vert,fragmentShader:Lt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Lt.backgroundCube_vert,fragmentShader:Lt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Lt.cube_vert,fragmentShader:Lt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Lt.equirect_vert,fragmentShader:Lt.equirect_frag},distanceRGBA:{uniforms:nr([je.common,je.displacementmap,{referencePosition:{value:new G},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Lt.distanceRGBA_vert,fragmentShader:Lt.distanceRGBA_frag},shadow:{uniforms:nr([je.lights,je.fog,{color:{value:new He(0)},opacity:{value:1}}]),vertexShader:Lt.shadow_vert,fragmentShader:Lt.shadow_frag}};zs.physical={uniforms:nr([zs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ft},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ft},clearcoatNormalScale:{value:new le(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ft},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ft},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ft},sheen:{value:0},sheenColor:{value:new He(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ft},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ft},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ft},transmissionSamplerSize:{value:new le},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ft},attenuationDistance:{value:0},attenuationColor:{value:new He(0)},specularColor:{value:new He(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ft},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ft},anisotropyVector:{value:new le},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ft}}]),vertexShader:Lt.meshphysical_vert,fragmentShader:Lt.meshphysical_frag};const $0={r:0,b:0,g:0};function tW(t,e,n,i,r,s,o){const a=new He(0);let l=s===!0?0:1,c,u,f=null,p=0,m=null;function v(x,g){let _=!1,y=g.isScene===!0?g.background:null;y&&y.isTexture&&(y=(g.backgroundBlurriness>0?n:e).get(y)),y===null?w(a,l):y&&y.isColor&&(w(y,1),_=!0);const M=t.xr.getEnvironmentBlendMode();M==="additive"?i.buffers.color.setClear(0,0,0,1,o):M==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||_)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===sh)?(u===void 0&&(u=new ui(new eu(1,1,1),new Yn({name:"Backgroun
3439dCubeMaterial",uniforms:Wf(zs.backgroundCube.uniforms),vertexShader:zs.backgroundCube.vertexShader,fragmentShader:zs.backgroundCube.fragmentShader,side:ci,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(E,C,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=cn.getTransfer(y.colorSpace)!==vn,(f!==y||p!==y.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=y,p=y.version,m=t.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(c===void 0&&(c=new ui(new nm(2,2),new Yn({name:"BackgroundMaterial",uniforms:Wf(zs.background.uniforms),vertexShader:zs.background.vertexShader,fragmentShader:zs.background.fragmentShader,side:Qs,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=y,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=cn.getTransfer(y.colorSpace)!==vn,y.matrixAutoUpdate===!0&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),(f!==y||p!==y.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=y,p=y.version,m=t.toneMapping),c.layers.enableAll(),x.unshift(c,c.geometry,c.material,0,0,null))}function w(x,g){x.getRGB($0,TD(t)),i.buffers.color.setClear($0.r,$0.g,$0.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(x,g=1){a.set(x),l=g,w(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,w(a,l)},render:v}}function nW(t,e,n,i){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=x(null);let c=l,u=!1;function f(D,U,z,Y,O){let H=!1;if(o){const W=w(Y,z,U);c!==W&&(c=W,m(c.object)),H=g(D,Y,z,O),H&&_(D,Y,z,O)}else{const W=U.wireframe===!0;(c.geometry!==Y.id||c.program!==z.id||c.wireframe!==W)&&(c.geometry=Y.id,c.program=z.i
vendor: 2,176 bytes, line 3439
3439d,c.wireframe=W,H=!0)}O!==null&&n.update(O,t.ELEMENT_ARRAY_BUFFER),(H||u)&&(u=!1,N(D,U,z,Y),O!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(O).buffer))}function p(){return i.isWebGL2?t.createVertexArray():s.createVertexArrayOES()}function m(D){return i.isWebGL2?t.bindVertexArray(D):s.bindVertexArrayOES(D)}function v(D){return i.isWebGL2?t.deleteVertexArray(D):s.deleteVertexArrayOES(D)}function w(D,U,z){const Y=z.wireframe===!0;let O=a[D.id];O===void 0&&(O={},a[D.id]=O);let H=O[U.id];H===void 0&&(H={},O[U.id]=H);let W=H[Y];return W===void 0&&(W=x(p()),H[Y]=W),W}function x(D){const U=[],z=[],Y=[];for(let O=0;O<r;O++)U[O]=0,z[O]=0,Y[O]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:U,enabledAttributes:z,attributeDivisors:Y,object:D,attributes:{},index:null}}function g(D,U,z,Y){const O=c.attributes,H=U.attributes;let W=0;const j=z.getAttributes();for(const Z in j)if(j[Z].location>=0){const ue=O[Z];let ve=H[Z];if(ve===void 0&&(Z==="instanceMatrix"&&D.instanceMatrix&&(ve=D.instanceMatrix),Z==="instanceColor"&&D.instanceColor&&(ve=D.instanceColor)),ue===void 0||ue.attribute!==ve||ve&&ue.data!==ve.data)return!0;W++}return c.attributesNum!==W||c.index!==Y}function _(D,U,z,Y){const O={},H=U.attributes;let W=0;const j=z.getAttributes();for(const Z in j)if(j[Z].location>=0){let ue=H[Z];ue===void 0&&(Z==="instanceMatrix"&&D.instanceMatrix&&(ue=D.instanceMatrix),Z==="instanceColor"&&D.instanceColor&&(ue=D.instanceColor));const ve={};ve.attribute=ue,ue&&ue.data&&(ve.data=ue.data),O[Z]=ve,W++}c.attributes=O,c.attributesNum=W,c.index=Y}function y(){const D=c.newAttributes;for(let U=0,z=D.length;U<z;U++)D[U]=0}function M(D){E(D,0)}function E(D,U){const z=c.newAttributes,Y=c.enabledAttributes,O=c.attributeDivisors;z[D]=1,Y[D]===0&&(t.enableVertexAttribArray(D),Y[D]=1),O[D]!==U&&((i.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](D,U),O[D]=U)}function C(){const D=c.newAttributes,U=c.enabledAttributes;for(let z=0,Y=U.length;z<Y;z++)U[z]!==D[z]&&(t.disableVertexAttribArray(z),U[z]=0)}function P(D,U,z,Y,O,H,W){W===!0?t.vertexAttribIPointer(D,U,z,O,H):t.vertexAttribPointer(D,U,z,Y,O,H)}
vendor: 2,518 bytes, line 3439
3439function N(D,U,z,Y){if(i.isWebGL2===!1&&(D.isInstancedMesh||Y.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;y();const O=Y.attributes,H=z.getAttributes(),W=U.defaultAttributeValues;for(const j in H){const Z=H[j];if(Z.location>=0){let re=O[j];if(re===void 0&&(j==="instanceMatrix"&&D.instanceMatrix&&(re=D.instanceMatrix),j==="instanceColor"&&D.instanceColor&&(re=D.instanceColor)),re!==void 0){const ue=re.normalized,ve=re.itemSize,Re=n.get(re);if(Re===void 0)continue;const Le=Re.buffer,ze=Re.type,Qe=Re.bytesPerElement,Ze=i.isWebGL2===!0&&(ze===t.INT||ze===t.UNSIGNED_INT||re.gpuType===lE);if(re.isInterleavedBufferAttribute){const Me=re.data,Q=Me.stride,ge=re.offset;if(Me.isInstancedInterleavedBuffer){for(let de=0;de<Z.locationSize;de++)E(Z.location+de,Me.meshPerAttribute);D.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=Me.meshPerAttribute*Me.count)}else for(let de=0;de<Z.locationSize;de++)M(Z.location+de);t.bindBuffer(t.ARRAY_BUFFER,Le);for(let de=0;de<Z.locationSize;de++)P(Z.location+de,ve/Z.locationSize,ze,ue,Q*Qe,(ge+ve/Z.locationSize*de)*Qe,Ze)}else{if(re.isInstancedBufferAttribute){for(let Me=0;Me<Z.locationSize;Me++)E(Z.location+Me,re.meshPerAttribute);D.isInstancedMesh!==!0&&Y._maxInstanceCount===void 0&&(Y._maxInstanceCount=re.meshPerAttribute*re.count)}else for(let Me=0;Me<Z.locationSize;Me++)M(Z.location+Me);t.bindBuffer(t.ARRAY_BUFFER,Le);for(let Me=0;Me<Z.locationSize;Me++)P(Z.location+Me,ve/Z.locationSize,ze,ue,ve*Qe,ve/Z.locationSize*Me*Qe,Ze)}}else if(W!==void 0){const ue=W[j];if(ue!==void 0)switch(ue.length){case 2:t.vertexAttrib2fv(Z.location,ue);break;case 3:t.vertexAttrib3fv(Z.location,ue);break;case 4:t.vertexAttrib4fv(Z.location,ue);break;default:t.vertexAttrib1fv(Z.location,ue)}}}}C()}function R(){$();for(const D in a){const U=a[D];for(const z in U){const Y=U[z];for(const O in Y)v(Y[O].object),delete Y[O];delete U[z]}delete a[D]}}function L(D){if(a[D.id]===void 0)return;const U=a[D.id];for(const z in U){const Y=U[z];for(const O in Y)v(Y[O].object),delete Y[O];delete U[z]}delete a[D.id]}function k(D){for(const U in a){const z=a[U];if(z[D.id]===void 0)continue;const Y=z[D.id];for(const O in Y)v(Y[O].object),delete Y[O];delete z[D.id]}}function $(){ee(),u=!0,c!==l&&(c=l,m(c.object))}function ee(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:f,reset:$,resetDefaultState:ee,dispose:R,releaseStatesOfGeometry:L,releaseStatesOfProgram:k,initAttributes:y,enableAttribute:M,disableUnusedAttributes:C}}
vendor: 4,107 bytes, line 3439
3439function iW(t,e,n,i){const r=i.isWebGL2;let s;function o(c){s=c}function a(c,u){t.drawArrays(s,c,u),n.update(u,s,1)}function l(c,u,f){if(f===0)return;let p,m;if(r)p=t,m="drawArraysInstanced";else if(p=e.get("ANGLE_instanced_arrays"),m="drawArraysInstancedANGLE",p===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}p[m](s,c,u,f),n.update(u,s,f)}this.setMode=o,this.render=a,this.renderInstances=l}function rW(t,e,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const P=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(P){if(P==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return P==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=o||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,f=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),p=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_TEXTURE_SIZE),v=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),w=t.getParameter(t.MAX_VERTEX_ATTRIBS),x=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),_=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),y=p>0,M=o||e.has("OES_texture_float"),E=y&&M,C=o?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:c,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:u,maxTextures:f,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:v,maxAttributes:w,maxVertexUniforms:x,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:y,floatFragmentTextures:M,floatVertexTextures:E,maxSamples:C}}function sW(t){const e=this;let n=null,i=0,r=!1,s=!1;const o=new ta,a=new Ft,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,p){const m=f.length!==0||p||i!==0||r;return r=p,i=f.length,m},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,p){n=u(f,p,0)},this.setState=function(f,p,m){const v=f.clippingPlanes,w=f.clipIntersection,x=f.clipShadows,g=t.get(f);if(!r||v===null||v.length===0||s&&!x)s?u(null):c();else{const _=s?0:i,y=_*4;let M=g.clippingState||null;l.value=M,M=u(v,p,y,m);for(let E=0;E!==y;++E)M[E]=n[E];g.clippingState=M,this.numIntersection=w?this.numPlanes:0,this.numPlanes+=_}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,p,m,v){const w=f!==null?f.length:0;let x=null;if(w!==0){if(x=l.value,v!==!0||x===null){const g=m+w*4,_=p.matrixWorldInverse;a.getNormalMatrix(_),(x===null||x.length<g)&&(x=new Float32Array(g));for(let y=0,M=m;y!==w;++y,M+=4)o.copy(f[y]).applyMatrix4(_,a),o.normal.toArray(x,M),x[M+3]=o.constant}l.value=x,l.needsUpdate=!0}return e.numPlanes=w,e.numIntersection=0,x}}function oW(t){let e=new WeakMap;function n(o,a){return a===pp?o.mapping=va:a===mp&&(o.mapping=gl),o}function i(o){if(o&&o.isTexture&&o.isRenderTargetTexture===!1){const a=o.mapping;if(a===pp||a===mp)if(e.has(o)){const l=e.get(o).texture;return n(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new RD(l.height/2);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",r),n(c.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class vs extends em{constructor(e=-1,n=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="Orthogra
3439phicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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,n,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+n,l=r-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*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 n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const cf=4,PR=[.125,.215,.35,.446,.526,.582],lc=20,e2=new vs,BR=new He;let t2=null;const rc=(1+Math.sqrt(5))/2,Nu=1/rc,LR=[new G(1,1,1),new G(-1,1,1),new G(1,1,-1),new G(-1,1,-1),new G(0,rc,Nu),new G(0,rc,-Nu),new G(Nu,0,rc),new G(-Nu,0,rc),new G(rc,Nu,0),new G(-rc,Nu,0)];class Fw{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,n=0,i=.1,r=100){t2=this._renderer.getRenderTarget(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=DR(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=NR(),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(t2),e.scissorTest=!1,eg(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===va||e.mapping===gl?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),t2=this._renderer.getRenderTarget();const i=n||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,i={magFilter:gn,minFilter:gn,generateMipmaps:!1,type:Dc,format:Mr,colorSpace:ws,depthBuffer:!1},r=IR(e,n,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=IR(e,n,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=aW(s)),this._blurMaterial=lW(s,e,n)}return r}_compileMaterial(e){const n=new ui(this._lodPlanes[0],e);this._renderer.compile(n,e2)}_sceneToCubeUV(e,n,i,r){const a=new xn(90,1,n,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,f=u.autoClear,p=u.toneMapping;u.getClearColor(BR),u.toneMapping=Js,u.autoClear=!1;
vendor: 5,406 bytes, lines 3439-3514
3439const m=new jr({name:"PMREM.Background",side:ci,depthWrite:!1,depthTest:!1}),v=new ui(new eu,m);let w=!1;const x=e.background;x?x.isColor&&(m.color.copy(x),e.background=null,w=!0):(m.color.copy(BR),w=!0);for(let g=0;g<6;g++){const _=g%3;_===0?(a.up.set(0,l[g],0),a.lookAt(c[g],0,0)):_===1?(a.up.set(0,0,l[g]),a.lookAt(0,c[g],0)):(a.up.set(0,l[g],0),a.lookAt(0,0,c[g]));const y=this._cubeSize;eg(r,_*y,g>2?y:0,y,y),u.setRenderTarget(r),w&&u.render(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=p,u.autoClear=f,e.background=x}_textureToCubeUV(e,n){const i=this._renderer,r=e.mapping===va||e.mapping===gl;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=DR()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=NR());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new ui(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;eg(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,e2)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;for(let r=1;r<this._lodPlanes.length;r++){const s=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),o=LR[(r-1)%LR.length];this._blur(e,r-1,r,s,o)}n.autoClear=i}_blur(e,n,i,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,n,i,r,"latitudinal",s),this._halfBlur(o,e,i,i,r,"longitudinal",s)}_halfBlur(e,n,i,r,s,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const u=3,f=new ui(this._lodPlanes[r],c),p=c.uniforms,m=this._sizeLods[i]-1,v=isFinite(s)?Math.PI/(2*m):2*Math.PI/(2*lc-1),w=s/v,x=isFinite(s)?1+Math.floor(u*w):lc;x>lc&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${lc}`);const g=[];let _=0;for(let P=0;P<lc;++P){const N=P/w,R=Math.exp(-N*N/2);g.push(R),P===0?_+=R:P<x&&(_+=2*R)}for(let P=0;P<g.length;P++)g[P]=g[P]/_;p.envMap.value=e.texture,p.samples.value=x,p.weights.value=g,p.latitudinal.value=o==="latitudinal",a&&(p.poleAxis.value=a);const{_lodMax:y}=this;p.dTheta.value=v,p.mipInt.value=y-i;const M=this._sizeLods[r],E=3*M*(r>y-cf?r-y+cf:0),C=4*(this._cubeSize-M);eg(n,E,C,3*M,2*M),l.setRenderTarget(n),l.render(f,e2)}}function aW(t){const e=[],n=[],i=[];let r=t;const s=t-cf+1+PR.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);n.push(a);let l=1/a;o>t-cf?l=PR[o-t+cf-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,f=1+c,p=[u,u,f,u,f,f,u,u,f,f,u,f],m=6,v=6,w=3,x=2,g=1,_=new Float32Array(w*v*m),y=new Float32Array(x*v*m),M=new Float32Array(g*v*m);for(let C=0;C<m;C++){const P=C%3*2/3-1,N=C>2?0:-1,R=[P,N,0,P+2/3,N,0,P+2/3,N+1,0,P,N,0,P+2/3,N+1,0,P,N+1,0];_.set(R,w*v*C),y.set(p,x*v*C);const L=[C,C,C,C,C,C];M.set(L,g*v*C)}const E=new Pt;E.setAttribute("position",new Zt(_,w)),E.setAttribute("uv",new Zt(y,x)),E.setAttribute("faceIndex",new Zt(M,g)),e.push(E),r>cf&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function IR(t,e,n){const i=new Fn(t,e,n);return i.texture.mapping=sh,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function eg(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function lW(t,e,n){const i=new Float32Array(lc),r=new G(0,1,0);return new Yn({name:"SphericalGaussianBlur",defines:{n:lc,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:wE(),fragmentShader:`
3440
3441			precision mediump float;
3442			precision mediump int;
3443
3444			varying vec3 vOutputDirection;
3445
3446			uniform sampler2D envMap;
3447			uniform int samples;
3448			uniform float weights[ n ];
3449			uniform bool latitudinal;
3450			uniform float dTheta;
3451			uniform float mipInt;
3452			uniform vec3 poleAxis;
3453
3454			#define ENVMAP_TYPE_CUBE_UV
3455			#include <cube_uv_reflection_fragment>
3456
3457			vec3 getSample( float theta, vec3 axis ) {
3458
3459				float cosTheta = cos( theta );
3460				// Rodrigues' axis-angle rotation
3461				vec3 sampleDirection = vOutputDirection * cosTheta
3462					+ cross( axis, vOutputDirection ) * sin( theta )
3463					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
3464
3465				return bilinearCubeUV( envMap, sampleDirection, mipInt );
3466
3467			}
3468
3469			void main() {
3470
3471				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
3472
3473				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
3474
3475					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
3476
3477				}
3478
3479				axis = normalize( axis );
3480
3481				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
3482				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
3483
3484				for ( int i = 1; i < n; i++ ) {
3485
3486					if ( i >= samples ) {
3487
3488						break;
3489
3490					}
3491
3492					float theta = dTheta * float( i );
3493					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
3494					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
3495
3496				}
3497
3498			}
3499		`,blending:Pi,depthTest:!1,depthWrite:!1})}function NR(){return new Yn({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:wE(),fragmentShader:`
3500
3501			precision mediump float;
3502			precision mediump int;
3503
3504			varying vec3 vOutputDirection;
3505
3506			uniform sampler2D envMap;
3507
3508			#include <common>
3509
3510			void main() {
3511
3512				vec3 outputDirection = normalize( vOutputDirection );
3513				vec2 uv = equirectUv( outputDirection );
3514
3515				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
3516
3517			}
3518		`,blending:Pi,depthTest:!1,depthWrite:!1})}function DR(){return new Yn({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:wE(),fragmentShader:`
3519
3520			precision mediump float;
3521			precision mediump int;
3522
3523			uniform float flipEnvMap;
3524
3525			varying vec3 vOutputDirection;
3526
3527			uniform samplerCube envMap;
3528
3529			void main() {
3530
3531				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
3532
3533			}
3534		`,blending:Pi,depthTest:!1,depthWrite:!1})}function wE(){return`
3535
3536		precision mediump float;
3537		precision mediump int;
3538
3539		attribute float faceIndex;
3540
3541		varying vec3 vOutputDirection;
3542
3543		// RH coordinate system; PMREM face-indexing convention
3544		vec3 getDirection( vec2 uv, float face ) {
3545
3546			uv = 2.0 * uv - 1.0;
3547
3548			vec3 direction = vec3( uv, 1.0 );
3549
3550			if ( face == 0.0 ) {
3551
3552				direction = direction.zyx; // ( 1, v, u ) pos x
3553
3554			} else if ( face == 1.0 ) {
3555
3556				direction = direction.xzy;
3557				direction.xz *= -1.0; // ( -u, 1, -v ) pos y
3558
3559			} else if ( face == 2.0 ) {
3560
3561				direction.x *= -1.0; // ( -u, v, 1 ) pos z
3562
3563			} else if ( face == 3.0 ) {
3564
3565				direction = direction.zyx;
3566				direction.xz *= -1.0; // ( -1, v, -u ) neg x
3567
3568			} else if ( face == 4.0 ) {
3569
3570				direction = direction.xzy;
3571				direction.xy *= -1.0; // ( -u, -1, v ) neg y
3572
3573			} else if ( face == 5.0 ) {
3574
3575				direction.z *= -1.0; // ( u, v, -1 ) neg z
3576
3577			}
3578
3579			return direction;
3580
3581		}
3582
3583		void main() {
3584
3585			vOutputDirection = getDirection( uv, faceIndex );
3586			gl_Position = vec4( position, 1.0 );
3587
3588		}
3589	`}function cW(t){let e=new WeakMap,n=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===pp||l===mp,u=l===va||l===gl;if(c||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let f=e.get(a);return n===null&&(n=new Fw(t)),f=c?n.fromEquirectangular(a,f):n.fromCubemap(a,f),e.set(a,f),f.texture}else{if(e.has(a))return e.get(a).texture;{const f=a.image;if(c&&f&&f.height>0||u&&f&&r(f)){n===null&&(n=new Fw(t));const p=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}else return null}}}return a}function r(a){let l=0;const c=6;for(let u=0;u<c;u++)a[u]!==void 0&&l++;return l===c}function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:o}}function uW(t){const e={};function n(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(i)}return e[i]=r,r}return{has:function(i){return n(i)!==null},init:function(i){i.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(i){const r=n(i);return r===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function fW(t,e,n,i){const r={},s=new WeakMap;function o(f){const p=f.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 w=p.morphAttributes[v];for(let x=0,g=w.length;x<g;x++)e.remove(w[x])}p.removeEventListener("dispose",o),delete r[p.id];const m=s.get(p);m&&(e.remove(m),s.delete(p)),i.releaseStatesOfGeometry(p),p.isInstancedBufferGeometry===!0&&delete p._maxInstanceCount,n.memory.geometries--}function a(f,p){return r[p.id]===!0||(p.addEventListener("dispose",o),r[p.id]=!0,n.memory.geometries++),p}function l(f){const p=f.attributes;for(const v in p)e.update(p[v],t.ARRAY_BUFFER);const m=f.morphAttributes;for(const v in m){const w=m[v];for(let x=0,g=w.length;x<g;x++)e.update(w[x],t.ARRAY_BUFFER)}}function c(f){const p=[],m=f.index,v=f.attributes.position;let w=0;if(m!==null){const _=m.array;w=m.version;for(let y=0,M=_.length;y<M;y+=3){const E=_[y+0],C=_[y+1],P=_[y+2];p.push(E,C,C,P,P,E)}}else if(v!==void 0){const _=v.array;w=v.version;for(let y=0,M=_.length/3-1;y<M;y+=3){const E=y+0,C=y+1,P=y+2;p.push(E,C,C,P,P,E)}}else return;const x=new(wD(p)?SE:_E)(p,1);x.version=w;const g=s.get(f);g&&e.remove(g),s.set(f,x)}function u(f){const p=s.get(f);if(p){const m=f.index;m!==null&&p.version<m.version&&c(f)}else c(f);return s.get(f)}return{get:a,update:l,getWireframeAttribute:u}}
vendor: 4,691 bytes, line 3589
3589function hW(t,e,n,i){const r=i.isWebGL2;let s;function o(p){s=p}let a,l;function c(p){a=p.type,l=p.bytesPerElement}function u(p,m){t.drawElements(s,m,a,p*l),n.update(m,s,1)}function f(p,m,v){if(v===0)return;let w,x;if(r)w=t,x="drawElementsInstanced";else if(w=e.get("ANGLE_instanced_arrays"),x="drawElementsInstancedANGLE",w===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}w[x](s,m,a,p*l,v),n.update(m,s,v)}this.setMode=o,this.setIndex=c,this.render=u,this.renderInstances=f}function dW(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function i(s,o,a){switch(n.calls++,o){case t.TRIANGLES:n.triangles+=a*(s/3);break;case t.LINES:n.lines+=a*(s/2);break;case t.LINE_STRIP:n.lines+=a*(s-1);break;case t.LINE_LOOP:n.lines+=a*s;break;case t.POINTS:n.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function r(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:r,update:i}}function pW(t,e){return t[0]-e[0]}function mW(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gW(t,e,n){const i={},r=new Float32Array(8),s=new WeakMap,o=new on,a=[];for(let c=0;c<8;c++)a[c]=[c,0];function l(c,u,f){const p=c.morphTargetInfluences;if(e.isWebGL2===!0){const m=u.morphAttributes.position||u.morphAttributes.normal||u.morphAttributes.color,v=m!==void 0?m.length:0;let w=s.get(u);if(w===void 0||w.count!==v){let D=function(){$.dispose(),s.delete(u),u.removeEventListener("dispose",D)};w!==void 0&&w.texture.dispose();const _=u.morphAttributes.position!==void 0,y=u.morphAttributes.normal!==void 0,M=u.morphAttributes.color!==void 0,E=u.morphAttributes.position||[],C=u.morphAttributes.normal||[],P=u.morphAttributes.color||[];let N=0;_===!0&&(N=1),y===!0&&(N=2),M===!0&&(N=3);let R=u.attributes.position.count*N,L=1;R>e.maxTextureSize&&(L=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const k=new Float32Array(R*L*4*v),$=new Sy(k,R,L,v);$.type=Vs,$.needsUpdate=!0;const ee=N*4;for(let U=0;U<v;U++){const z=E[U],Y=C[U],O=P[U],H=R*L*4*U;for(let W=0;W<z.count;W++){const j=W*ee;_===!0&&(o.fromBufferAttribute(z,W),k[H+j+0]=o.x,k[H+j+1]=o.y,k[H+j+2]=o.z,k[H+j+3]=0),y===!0&&(o.fromBufferAttribute(Y,W),k[H+j+4]=o.x,k[H+j+5]=o.y,k[H+j+6]=o.z,k[H+j+7]=0),M===!0&&(o.fromBufferAttribute(O,W),k[H+j+8]=o.x,k[H+j+9]=o.y,k[H+j+10]=o.z,k[H+j+11]=O.itemSize===4?o.w:1)}}w={count:v,texture:$,size:new le(R,L)},s.set(u,w),u.addEventListener("dispose",D)}let x=0;for(let _=0;_<p.length;_++)x+=p[_];const g=u.morphTargetsRelative?1:1-x;f.getUniforms().setValue(t,"morphTargetBaseInfluence",g),f.getUniforms().setValue(t,"morphTargetInfluences",p),f.getUniforms().setValue(t,"morphTargetsTexture",w.texture,n),f.getUniforms().setValue(t,"morphTargetsTextureSize",w.size)}else{const m=p===void 0?0:p.length;let v=i[u.id];if(v===void 0||v.length!==m){v=[];for(let y=0;y<m;y++)v[y]=[y,0];i[u.id]=v}for(let y=0;y<m;y++){const M=v[y];M[0]=y,M[1]=p[y]}v.sort(mW);for(let y=0;y<8;y++)y<m&&v[y][1]?(a[y][0]=v[y][0],a[y][1]=v[y][1]):(a[y][0]=Number.MAX_SAFE_INTEGER,a[y][1]=0);a.sort(pW);const w=u.morphAttributes.position,x=u.morphAttributes.normal;let g=0;for(let y=0;y<8;y++){const M=a[y],E=M[0],C=M[1];E!==Number.MAX_SAFE_INTEGER&&C?(w&&u.getAttribute("morphTarget"+y)!==w[E]&&u.setAttribute("morphTarget"+y,w[E]),x&&u.getAttribute("morphNormal"+y)!==x[E]&&u.setAttribute("morphNormal"+y,x[E]),r[y]=C,g+=C):(w&&u.hasAttribute("morphTarget"+y)===!0&&u.deleteAttribute("morphTarget"+y),x&&u.hasAttribute("morphNormal"+y)===!0&&u.deleteAttribute("morphNormal"+y),r[y]=0)}const _=u.morphTargetsRelative?1:1-g;f.getUniforms().setValue(t,"morphTargetBaseInfluence",_),f.getUniforms().setValue(t,"morphTargetInfluences",r)}}return{update:l}}function vW(t,e,n,i){let r=new WeakMap;function s(l){const c=i.render.frame,u=l.geometry,f=e.get(l,u);if(r.get(f)!==c&&(e.update(f),r.set(f,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==c&&(n.update(l.instanceMatrix,t.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,t.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const p=l.skeleton;r.get(p)!==c&&(p.update(),r.set(p,c))}return f}function o(){r=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),n.remove(c.instanceMatrix),c.instanceColor!==null&&n.remove(c.instanceColor)}return{update:s,dispose:o}}const BD=new Mn,LD=new Sy,ID=new xE,ND=new tm,FR=[],OR=[],UR=new Float32Array(16),kR=new Float32Array(9),zR=new Float32Array(4);function oh(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;
vendor: 14,531 bytes, lines 3589-3606
3589let s=FR[r];if(s===void 0&&(s=new Float32Array(r),FR[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function hi(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function di(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function Ay(t,e){let n=OR[e];n===void 0&&(n=new Int32Array(e),OR[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function yW(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function xW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(hi(n,e))return;t.uniform2fv(this.addr,e),di(n,e)}}function _W(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(hi(n,e))return;t.uniform3fv(this.addr,e),di(n,e)}}function SW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(hi(n,e))return;t.uniform4fv(this.addr,e),di(n,e)}}function wW(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(hi(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),di(n,e)}else{if(hi(n,i))return;zR.set(i),t.uniformMatrix2fv(this.addr,!1,zR),di(n,i)}}function AW(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(hi(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),di(n,e)}else{if(hi(n,i))return;kR.set(i),t.uniformMatrix3fv(this.addr,!1,kR),di(n,i)}}function MW(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(hi(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),di(n,e)}else{if(hi(n,i))return;UR.set(i),t.uniformMatrix4fv(this.addr,!1,UR),di(n,i)}}function EW(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function TW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(hi(n,e))return;t.uniform2iv(this.addr,e),di(n,e)}}function bW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(hi(n,e))return;t.uniform3iv(this.addr,e),di(n,e)}}function CW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(hi(n,e))return;t.uniform4iv(this.addr,e),di(n,e)}}function RW(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function PW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(hi(n,e))return;t.uniform2uiv(this.addr,e),di(n,e)}}function BW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(hi(n,e))return;t.uniform3uiv(this.addr,e),di(n,e)}}function LW(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(hi(n,e))return;t.uniform4uiv(this.addr,e),di(n,e)}}function IW(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2D(e||BD,r)}function NW(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||ID,r)}function DW(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||ND,r)}function FW(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||LD,r)}function OW(t){switch(t){case 5126:return yW;case 35664:return xW;case 35665:return _W;case 35666:return SW;case 35674:return wW;case 35675:return AW;case 35676:return MW;case 5124:case 35670:return EW;case 35667:case 35671:return TW;case 35668:case 35672:return bW;case 35669:case 35673:return CW;case 5125:return RW;case 36294:return PW;case 36295:return BW;case 36296:return LW;case 35678:case 36198:case 36298:case 36306:case 35682:return IW;case 35679:case 36299:case 36307:return NW;case 35680:case 36300:case 36308:case 36293:return DW;case 36289:case 36303:case 36311:case 36292:return FW}}function UW(t,e){t.uniform1fv(this.addr,e)}function kW(t,e){const n=oh(e,this.size,2);t.uniform2fv(this.addr,n)}function zW(t,e){const n=oh(e,this.size,3);t.uniform3fv(this.addr,n)}function HW(t,e){const n=oh(e,this.size,4);t.uniform4fv(this.addr,n)}function GW(t,e){const n=oh(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function VW(t,e){const n=oh(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function jW(t,e){const n=oh(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function WW(t,e){t.uniform1iv(this.addr,e)}function XW(t,e){t.uniform2iv(this.addr,e)}function JW(t,e){t.uniform3iv(this.addr,e)}function KW(t,e){t.uniform4iv(this.addr,e)}function YW(t,e){t.uniform1uiv(this.addr,e)}function QW(t,e){t.uniform2uiv(this.addr,e)}function ZW(t,e){t.uniform3uiv(this.addr,e)}function qW(t,e){t.uniform4uiv(this.addr,e)}function $W(t,e,n){const i=this.cache,r=e.length,s=Ay(n,r);hi(i,s)||(t.uniform1iv(this.addr,s),di(i,s));for(let o=0;o!==r;++o)n.setTexture2D(e[o]||BD,s[o])}function eX(t,e,n){const i=this.cache,r=e.length,s=Ay(n,r);hi(i,s)||(t.uniform1iv(this.addr,s),di(i,s));for(let o=0;o!==r;++o)n.setTexture3D(e[o]||ID,s[o])}function tX(t,e,n){const i=this.cache,r=e.length,s=Ay(n,r);hi(i,s)||(t.uniform1iv(this.addr,s),di(i,s));for(let o=0;o!==r;++o)n.setTextureCube(e[o]||ND,s[o])}function nX(t,e,n){const i=this.cache,r=e.length,s=Ay(n,r);hi(i,s)||(t.uniform1iv(this.addr,s),di(i,s));for(let o=0;o!==r;++o)n.setTexture2DArray(e[o]||LD,s[o])}function iX(t){switch(t){case 5126:return UW;case 35664:return kW;case 35665:return zW;case 35666:return HW;case 35674:return GW;case 35675:return VW;case 35676:return jW;case 5124:case 35670:return WW;case 35667:case 35671:return XW;case 35668:case 35672:return JW;case 35669:case 35673:return KW;case 5125:return YW;case 36294:return QW;case 36295:return ZW;case 36296:return qW;case 35678:case 36198:case 36298:case 36306:case 35682:return $W;case 35679:case 36299:case 36307:return eX;case 35680:case 36300:case 36308:case 36293:return tX;case 36289:case 36303:case 36311:case 36292:return nX}}class rX{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.setValue=OW(n.type)}}class sX{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.size=n.size,this.setValue=iX(n.type)}}class oX{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,i){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,n[a.id],i)}}}const n2=/(\w+)(\])?(\[|\.)?/g;function HR(t,e){t.seq.push(e),t.map[e.id]=e}function aX(t,e,n){const i=t.name,r=i.length;for(n2.lastIndex=0;;){const s=n2.exec(i),o=n2.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){HR(n,c===void 0?new rX(a,t,e):new sX(a,t,e));break}else{let f=n.map[a];f===void 0&&(f=new oX(a),HR(n,f)),n=f}}}class lv{constructor(e,n){this.seq=[],this.map={};const i=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(n,r),o=e.getUniformLocation(n,s.name);aX(s,o,this)}}setValue(e,n,i,r){const s=this.map[n];s!==void 0&&s.setValue(e,i,r)}setOptional(e,n,i){const r=n[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,n,i,r){for(let s=0,o=n.length;s!==o;++s){const a=n[s],l=i[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,n){const i=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in n&&i.push(o)}return i}}function GR(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}let lX=0;function cX(t,e){const n=t.split(`
3590`),i=[],r=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let o=r;o<s;o++){const a=o+1;i.push(`${a===e?">":" "} ${a}: ${n[o]}`)}return i.join(`
3591`)}function uX(t){const e=cn.getPrimaries(cn.workingColorSpace),n=cn.getPrimaries(t);let i;switch(e===n?i="":e===_p&&n===xp?i="LinearDisplayP3ToLinearSRGB":e===xp&&n===_p&&(i="LinearSRGBToLinearDisplayP3"),t){case ws:case qp:return[i,"LinearTransferOETF"];case jt:case _y:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}function VR(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),r=t.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return n.toUpperCase()+`
3592
3593`+r+`
3594
3595`+cX(t.getShaderSource(e),o)}else return r}function fX(t,e){const n=uX(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function hX(t,e){let n;switch(e){case KN:n="Linear";break;case YN:n="Reinhard";break;case QN:n="OptimizedCineon";break;case aE:n="ACESFilmic";break;case ZN:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function dX(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(dd).join(`
3596`)}function pX(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(`
3597`)}function mX(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=t.getActiveAttrib(e,r),o=s.name;let a=1;s.type===t.FLOAT_MAT2&&(a=2),s.type===t.FLOAT_MAT3&&(a=3),s.type===t.FLOAT_MAT4&&(a=4),n[o]={type:s.type,location:t.getAttribLocation(e,o),locationSize:a}}return n}function dd(t){return t!==""}function jR(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.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,n).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 WR(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const gX=/^[ \t]*#include +<([\w\d./]+)>/gm;function Ow(t){return t.replace(gX,yX)}const vX=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function yX(t,e){let n=Lt[e];if(n===void 0){const i=vX.get(e);if(i!==void 0)n=Lt[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return Ow(n)}const xX=/#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 XR(t){return t.replace(xX,_X)}function _X(t,e,n,i){let r="";for(let s=parseInt(e);s<parseInt(n);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function JR(t){let e="precision "+t.precision+` float;
3598precision `+t.precision+" int;";return t.precision==="highp"?e+=`
3599#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
3600#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
3601#define LOW_PRECISION`),e}function SX(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===hy?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===Ld?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===Os&&(e="SHADOWMAP_TYPE_VSM"),e}function wX(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case va:case gl:e="ENVMAP_TYPE_CUBE";break;case sh:e="ENVMAP_TYPE_CUBE_UV";break}return e}function AX(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case gl:e="ENVMAP_MODE_REFRACTION";break}return e}function MX(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case Zp:e="ENVMAP_BLENDING_MULTIPLY";break;case XN:e="ENVMAP_BLENDING_MIX";break;case JN:e="ENVMAP_BLENDING_ADD";break}return e}function EX(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:i,maxMip:n}}function TX(t,e,n,i){const r=t.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=SX(n),c=wX(n),u=AX(n),f=MX(n),p=EX(n),m=n.isWebGL2?"":dX(n),v=pX(s),w=r.createProgram();let x,g,_=n.glslVersion?"#version "+n.glslVersion+`
3602`:"";n.isRawShaderMaterial?(x=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(dd).join(`
3603`),x.length>0&&(x+=`
3604`),g=[m,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(dd).join(`
3605`),g.length>0&&(g+=`
3606`)):(x=[JR(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IR
3606IDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","	attribute vec3 morphTarget0;","	attribute vec3 morphTarget1;","	attribute vec3 morphTarget2;","	attribute vec3 morphTarget3;","	#ifdef USE_MORPHNORMALS","		attribute vec3 morphNormal0;","		attribute vec3 morphNormal1;","		attribute vec3 morphNormal2;","		attribute vec3 morphNormal3;","	#else","		attribute vec3 morphTarget4;","		attribute vec3 morphTarget5;","		attribute vec3 morphTarget6;","		attribute vec3 morphTarget7;","	#endif","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
3607`].filter(dd).join(`
3608`),g=[m,JR(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IR
3608IDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Js?"#define TONE_MAPPING":"",n.toneMapping!==Js?Lt.tonemapping_pars_fragment:"",n.toneMapping!==Js?hX("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Lt.colorspace_pars_fragment,fX("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
3609`].filter(dd).join(`
3610`)),o=Ow(o),o=jR(o,n),o=WR(o,n),a=Ow(a),a=jR(a,n),a=WR(a,n),o=XR(o),a=XR(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(_=`#version 300 es
3611`,x=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`
3612`)+`
3613`+x,g=["#define varying in",n.glslVersion===Nw?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Nw?"":"#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(`
3614`)+`
3615`+g);const y=_+x+o,M=_+g+a,E=GR(r,r.VERTEX_SHADER,y),C=GR(r,r.FRAGMENT_SHADER,M);if(r.attachShader(w,E),r.attachShader(w,C),n.index0AttributeName!==void 0?r.bindAttribLocation(w,0,n.index0AttributeName):n.morphTargets===!0&&r.bindAttribLocation(w,0,"position"),r.linkProgram(w),t.debug.checkShaderErrors){const R=r.getProgramInfoLog(w).trim(),L=r.getShaderInfoLog(E).trim(),k=r.getShaderInfoLog(C).trim();let $=!0,ee=!0;if(r.getProgramParameter(w,r.LINK_STATUS)===!1)if($=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(r,w,E,C);else{const D=VR(r,E,"vertex"),U=VR(r,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(w,r.VALIDATE_STATUS)+`
3616
3617Program Info Log: `+R+`
3618`+D+`
3619`+U)}else R!==""?console.warn("THREE.WebGLProgram: Program Info Log:",R):(L===""||k==="")&&(ee=!1);ee&&(this.diagnostics={runnable:$,programLog:R,vertexShader:{log:L,prefix:x},fragmentShader:{log:k,prefix:g}})}r.deleteShader(E),r.deleteShader(C);let P;this.getUniforms=function(){return P===void 0&&(P=new lv(r,w)),P};let N;return this.getAttributes=function(){return N===void 0&&(N=mX(r,w)),N},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(w),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=lX++,this.cacheKey=e,this.usedTimes=1,this.program=w,this.vertexShader=E,this.fragmentShader=C,this}let bX=0;class CX{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(n),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new RX(e),n.set(e,i)),i}}class RX{constructor(e){this.id=bX++,this.code=e,this.usedTimes=0}}function PX(t,e,n,i,r,s,o){const a=new Tc,l=new CX,c=[],u=r.isWebGL2,f=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 w(R){return R===0?"uv":`uv${R}`}function x(R,L,k,$,ee){const D=$.fog,U=ee.geometry,z=R.isMeshStandardMaterial?$.environment:null,Y=(R.isMeshStandardMaterial?n:e).get(R.envMap||z),O=Y&&Y.mapping===sh?Y.image.height:null,H=v[R.type];R.precision!==null&&(m=r.getMaxPrecision(R.precision),m!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",m,"instead."));const W=U.morphAttributes.position||U.morphAttributes.normal||U.morphAttributes.color,j=W!==void 0?W.length:0;let Z=0;U.morphAttributes.position!==void 0&&(Z=1),U.morphAttributes.normal!==void 0&&(Z=2),U.morphAttributes.color!==void 0&&(Z=3);let re,ue,ve,Re;if(H){const Ne=zs[H];re=Ne.vertexShader,ue=Ne.fragmentShader}else re=R.vertexShader,ue=R.fragmentShader,l.update(R),ve=l.getVertexShaderID(R),Re=l.getFragmentShaderID(R);const Le=t.getRenderTarget(),ze=ee.isInstancedMesh===!0,Qe=!!R.map,Ze=!!R.matcap,Me=!!Y,Q=!!R.aoMap,ge=!!R.lightMap,de=!!R.bumpMap,Ae=!!R.normalMap,xe=!!R.displacementMap,Fe=!!R.emissiveMap,Ge=!!R.metalnessMap,We=!!R.roughnessMap,ot=R.anisotropy>0,rt=R.clearcoat>0,Xt=R.iridescence>
vendor: 31,839 bytes, lines 3619-3647
36190,X=R.sheen>0,F=R.transmission>0,se=ot&&!!R.anisotropyMap,be=rt&&!!R.clearcoatMap,ye=rt&&!!R.clearcoatNormalMap,Ee=rt&&!!R.clearcoatRoughnessMap,et=Xt&&!!R.iridescenceMap,Pe=Xt&&!!R.iridescenceThicknessMap,Oe=X&&!!R.sheenColorMap,mt=X&&!!R.sheenRoughnessMap,Bt=!!R.specularMap,Ce=!!R.specularColorMap,xt=!!R.specularIntensityMap,q=F&&!!R.transmissionMap,fe=F&&!!R.thicknessMap,we=!!R.gradientMap,J=!!R.alphaMap,Se=R.alphaTest>0,Te=!!R.alphaHash,De=!!R.extensions,ke=!!U.attributes.uv1,_e=!!U.attributes.uv2,Ke=!!U.attributes.uv3;let Xe=Js;return R.toneMapped&&(Le===null||Le.isXRRenderTarget===!0)&&(Xe=t.toneMapping),{isWebGL2:u,shaderID:H,shaderType:R.type,shaderName:R.name,vertexShader:re,fragmentShader:ue,defines:R.defines,customVertexShaderID:ve,customFragmentShaderID:Re,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:m,instancing:ze,instancingColor:ze&&ee.instanceColor!==null,supportsVertexTextures:p,outputColorSpace:Le===null?t.outputColorSpace:Le.isXRRenderTarget===!0?Le.texture.colorSpace:ws,map:Qe,matcap:Ze,envMap:Me,envMapMode:Me&&Y.mapping,envMapCubeUVHeight:O,aoMap:Q,lightMap:ge,bumpMap:de,normalMap:Ae,displacementMap:p&&xe,emissiveMap:Fe,normalMapObjectSpace:Ae&&R.normalMapType===fD,normalMapTangentSpace:Ae&&R.normalMapType===bl,metalnessMap:Ge,roughnessMap:We,anisotropy:ot,anisotropyMap:se,clearcoat:rt,clearcoatMap:be,clearcoatNormalMap:ye,clearcoatRoughnessMap:Ee,iridescence:Xt,iridescenceMap:et,iridescenceThicknessMap:Pe,sheen:X,sheenColorMap:Oe,sheenRoughnessMap:mt,specularMap:Bt,specularColorMap:Ce,specularIntensityMap:xt,transmission:F,transmissionMap:q,thicknessMap:fe,gradientMap:we,opaque:R.transparent===!1&&R.blending===wc,alphaMap:J,alphaTest:Se,alphaHash:Te,combine:R.combine,mapUv:Qe&&w(R.map.channel),aoMapUv:Q&&w(R.aoMap.channel),lightMapUv:ge&&w(R.lightMap.channel),bumpMapUv:de&&w(R.bumpMap.channel),normalMapUv:Ae&&w(R.normalMap.channel),displacementMapUv:xe&&w(R.displacementMap.channel),emissiveMapUv:Fe&&w(R.emissiveMap.channel),metalnessMapUv:Ge&&w(R.metalnessMap.channel),roughnessMapUv:We&&w(R.roughnessMap.channel),anisotropyMapUv:se&&w(R.anisotropyMap.channel),clearcoatMapUv:be&&w(R.clearcoatMap.channel),clearcoatNormalMapUv:ye&&w(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ee&&w(R.clearcoatRoughnessMap.channel),iridescenceMapUv:et&&w(R.iridescenceMap.channel),iridescenceThicknessMapUv:Pe&&w(R.iridescenceThicknessMap.channel),sheenColorMapUv:Oe&&w(R.sheenColorMap.channel),sheenRoughnessMapUv:mt&&w(R.sheenRoughnessMap.channel),specularMapUv:Bt&&w(R.specularMap.channel),specularColorMapUv:Ce&&w(R.specularColorMap.channel),specularIntensityMapUv:xt&&w(R.specularIntensityMap.channel),transmissionMapUv:q&&w(R.transmissionMap.channel),thicknessMapUv:fe&&w(R.thicknessMap.channel),alphaMapUv:J&&w(R.alphaMap.channel),vertexTangents:!!U.attributes.tangent&&(Ae||ot),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!U.attributes.color&&U.attributes.color.itemSize===4,vertexUv1s:ke,vertexUv2s:_e,vertexUv3s:Ke,pointsUvs:ee.isPoints===!0&&!!U.attributes.uv&&(Qe||J),fog:!!D,useFog:R.fog===!0,fogExp2:D&&D.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:ee.isSkinnedMesh===!0,morphTargets:U.morphAttributes.position!==void 0,morphNormals:U.morphAttributes.normal!==void 0,morphColors:U.morphAttributes.color!==void 0,morphTargetsCount:j,morphTextureStride:Z,numDirLights:L.directional.length,numPointLights:L.point.length,numSpotLights:L.spot.length,numSpotLightMaps:L.spotLightMap.length,numRectAreaLights:L.rectArea.length,numHemiLights:L.hemi.length,numDirLightShadows:L.directionalShadowMap.length,numPointLightShadows:L.pointShadowMap.length,numSpotLightShadows:L.spotShadowMap.length,numSpotLightShadowsWithMaps:L.numSpotLightShadowsWithMaps,numLightProbes:L.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:R.dithering,shadowMapEnabled:t.shadowMap.enabled&&k.length>0,shadowMapType:t.shadowMap.type,toneMapping:Xe,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Qe&&R.map.isVideoTexture===!0&&cn.getTransfer(R.map.colorSpace)===vn,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===ji,flipSided:R.side===ci,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionDerivatives:De&&R.extensions.derivatives===!0,extensionFragDepth:De&&R.extensions.fragDepth===!0,extensionDrawBuffers:De&&R.extensions.drawBuffers===!0,extensionShaderTextureLOD:De&&R.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:R.customProgramCacheKey()}}function g(R){const L=[];if(R.shaderID?L.push(R.shaderID):(L.push(R.customVertexShaderID),L.push(R.customFragmentShaderID)),R.defines!==void 0)for(const k in R.defines)L.push(k),L.push(R.defines[k]);return R.isRawShaderMaterial===!1&&(_(L,R),y(L,R),L.push(t.outputColorSpace)),L.push(R.customProgramCacheKey),L.join()}function _(R,L){R.push(L.precision),R.push(L.outputColorSpace),R.push(L.envMapMode),R.push(L.envMapCubeUVHeight),R.push(L.mapUv),R.push(L.alphaMapUv),R.push(L.lightMapUv),R.push(L.aoMapUv),R.push(L.bumpMapUv),R.push(L.normalMapUv),R.push(L.displacementMapUv),R.push(L.emissiveMapUv),R.push(L.metalnessMapUv),R.push(L.roughnessMapUv),R.push(L.anisotropyMapUv),R.push(L.clearcoatMapUv),R.push(L.clearcoatNormalMapUv),R.push(L.clearcoatRoughnessMapUv),R.push(L.iridescenceMapUv),R.push(L.iridescenceThicknessMapUv),R.push(L.sheenColorMapUv),R.push(L.sheenRoughnessMapUv),R.push(L.specularMapUv),R.push(L.specularColorMapUv),R.push(L.specularIntensityMapUv),R.push(L.transmissionMapUv),R.push(L.thicknessMapUv),R.push(L.combine),R.push(L.fogExp2),R.push(L.sizeAttenuation),R.push(L.morphTargetsCount),R.push(L.morphAttributeCount),R.push(L.numDirLights),R.push(L.numPointLights),R.push(L.numSpotLights),R.push(L.numSpotLightMaps),R.push(L.numHemiLights),R.push(L.numRectAreaLights),R.push(L.numDirLightShadows),R.push(L.numPointLightShadows),R.push(L.numSpotLightShadows),R.push(L.numSpotLightShadowsWithMaps),R.push(L.numLightProbes),R.push(L.shadowMapType),R.push(L.toneMapping),R.push(L.numClippingPlanes),R.push(L.numClipIntersection),R.push(L.depthPacking)}function y(R,L){a.disableAll(),L.isWebGL2&&a.enable(0),L.supportsVertexTextures&&a.enable(1),L.instancing&&a.enable(2),L.instancingColor&&a.enable(3),L.matcap&&a.enable(4),L.envMap&&a.enable(5),L.normalMapObjectSpace&&a.enable(6),L.normalMapTangentSpace&&a.enable(7),L.clearcoat&&a.enable(8),L.iridescence&&a.enable(9),L.alphaTest&&a.enable(10),L.vertexColors&&a.enable(11),L.vertexAlphas&&a.enable(12),L.vertexUv1s&&a.enable(13),L.vertexUv2s&&a.enable(14),L.vertexUv3s&&a.enable(15),L.vertexTangents&&a.enable(16),L.anisotropy&&a.enable(17),R.push(a.mask),a.disableAll(),L.fog&&a.enable(0),L.useFog&&a.enable(1),L.flatShading&&a.enable(2),L.logarithmicDepthBuffer&&a.enable(3),L.skinning&&a.enable(4),L.morphTargets&&a.enable(5),L.morphNormals&&a.enable(6),L.morphColors&&a.enable(7),L.premultipliedAlpha&&a.enable(8),L.shadowMapEnabled&&a.enable(9),L.useLegacyLights&&a.enable(10),L.doubleSided&&a.enable(11),L.flipSided&&a.enable(12),L.useDepthPacking&&a.enable(13),L.dithering&&a.enable(14),L.transmission&&a.enable(15),L.sheen&&a.enable(16),L.opaque&&a.enable(17),L.pointsUvs&&a.enable(18),L.decodeVideoTexture&&a.enable(19),R.push(a.mask)}function M(R){const L=v[R.type];let k;if(L){const $=zs[L];k=bD.clone($.uniforms)}else k=R.uniforms;return k}function E(R,L){let k;for(let $=0,ee=c.length;$<ee;$++){const D=c[$];if(D.cacheKey===L){k=D,++k.usedTimes;break}}return k===void 0&&(k=new TX(t,L,R,s),c.push(k)),k}function C(R){if(--R.usedTimes===0){const L=c.indexOf(R);c[L]=c[c.length-1],c.pop(),R.destroy()}}function P(R){l.remove(R)}function N(){l.dispose()}return{getParameters:x,getProgramCacheKey:g,getUniforms:M,acquireProgram:E,releaseProgram:C,releaseShaderCache:P,programs:c,dispose:N}}function BX(){let t=new WeakMap;function e(s){let o=t.get(s);return o===void 0&&(o={},t.set(s,o)),o}function n(s){t.delete(s)}function i(s,o,a){t.get(s)[o]=a}function r(){t=new WeakMap}return{get:e,remove:n,update:i,dispose:r}}function LX(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function KR(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function YR(){const t=[];let e=0;const n=[],i=[],r=[];function s(){e=0,n.length=0,i.length=0,r.length=0}function o(f,p,m,v,w,x){let g=t[e];return g===void 0?(g={id:f.id,object:f,geometry:p,material:m,groupOrder:v,renderOrder:f.renderOrder,z:w,group:x},t[e]=g):(g.id=f.id,g.object=f,g.geometry=p,g.material=m,g.groupOrder=v,g.renderOrder=f.renderOrder,g.z=w,g.group=x),e++,g}function a(f,p,m,v,w,x){const g=o(f,p,m,v,w,x);m.transmission>0?i.push(g):m.transparent===!0?r.push(g):n.push(g)}function l(f,p,m,v,w,x){const g=o(f,p,m,v,w,x);m.transmission>0?i.unshift(g):m.transparent===!0?r.unshift(g):n.unshift(g)}function c(f,p){n.length>1&&n.sort(f||LX),i.length>1&&i.sort(p||KR),r.length>1&&r.sort(p||KR)}function u(){for(let f=e,p=t.length;f<p;f++){const m=t[f];if(m.id===null)break;m.id=null,m.object=null,m.geometry=null,m.material=null,m.group=null}}return{opaque:n,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:u,sort:c}}function IX(){let t=new WeakMap;function e(i,r){const s=t.get(i);let o;return s===void 0?(o=new YR,t.set(i,[o])):r>=s.length?(o=new YR,s.push(o)):o=s[r],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function NX(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new G,color:new He};break;case"SpotLight":n={position:new G,direction:new G,color:new He,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new G,color:new He,distance:0,decay:0};break;case"HemisphereLight":n={direction:new G,skyColor:new He,groundColor:new He};break;case"RectAreaLight":n={color:new He,position:new G,halfWidth:new G,halfHeight:new G};break}return t[e.id]=n,n}}}function DX(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let FX=0;function OX(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function UX(t,e){const n=new NX,i=DX(),r={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++)r.probe.push(new G);const s=new G,o=new Et,a=new Et;function l(u,f){let p=0,m=0,v=0;for(let $=0;$<9;$++)r.probe[$].set(0,0,0);let w=0,x=0,g=0,_=0,y=0,M=0,E=0,C=0,P=0,N=0,R=0;u.sort(OX);const L=f===!0?Math.PI:1;for(let $=0,ee=u.length;$<ee;$++){const D=u[$],U=D.color,z=D.intensity,Y=D.distance,O=D.shadow&&D.shadow.map?D.shadow.map.texture:null;if(D.isAmbientLight)p+=U.r*z*L,m+=U.g*z*L,v+=U.b*z*L;else if(D.isLightProbe){for(let H=0;H<9;H++)r.probe[H].addScaledVector(D.sh.coefficients[H],z);R++}else if(D.isDirectionalLight){const H=n.get(D);if(H.color.copy(D.color).multiplyScalar(D.intensity*L),D.castShadow){const W=D.shadow,j=i.get(D);j.shadowBias=W.bias,j.shadowNormalBias=W.normalBias,j.shadowRadius=W.radius,j.shadowMapSize=W.mapSize,r.directionalShadow[w]=j,r.directionalShadowMap[w]=O,r.directionalShadowMatrix[w]=D.shadow.matrix,M++}r.directional[w]=H,w++}else if(D.isSpotLight){const H=n.get(D);H.position.setFromMatrixPosition(D.matrixWorld),H.color.copy(U).multiplyScalar(z*L),H.distance=Y,H.coneCos=Math.cos(D.angle),H.penumbraCos=Math.cos(D.angle*(1-D.penumbra)),H.decay=D.decay,r.spot[g]=H;const W=D.shadow;if(D.map&&(r.spotLightMap[P]=D.map,P++,W.updateMatrices(D),D.castShadow&&N++),r.spotLightMatrix[g]=W.matrix,D.castShadow){const j=i.get(D);j.shadowBias=W.bias,j.shadowNormalBias=W.normalBias,j.shadowRadius=W.radius,j.shadowMapSize=W.mapSize,r.spotShadow[g]=j,r.spotShadowMap[g]=O,C++}g++}else if(D.isRectAreaLight){const H=n.get(D);H.color.copy(U).multiplyScalar(z),H.halfWidth.set(D.width*.5,0,0),H.halfHeight.set(0,D.height*.5,0),r.rectArea[_]=H,_++}else if(D.isPointLight){const H=n.get(D);if(H.color.copy(D.color).multiplyScalar(D.intensity*L),H.distance=D.distance,H.decay=D.decay,D.castShadow){const W=D.shadow,j=i.get(D);j.shadowBias=W.bias,j.shadowNormalBias=W.normalBias,j.shadowRadius=W.radius,j.shadowMapSize=W.mapSize,j.shadowCameraNear=W.camera.near,j.shadowCameraFar=W.camera.far,r.pointShadow[x]=j,r.pointShadowMap[x]=O,r.pointShadowMatrix[x]=D.shadow.matrix,E++}r.point[x]=H,x++}else if(D.isHemisphereLight){const H=n.get(D);H.skyColor.copy(D.color).multiplyScalar(z*L),H.groundColor.copy(D.groundColor).multiplyScalar(z*L),r.hemi[y]=H,y++}}_>0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=je.LTC_FLOAT_1,r.rectAreaLTC2=je.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=je.LTC_HALF_1,r.rectAreaLTC2=je.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=m,r.ambient[2]=v;const k=r.hash;(k.directionalLength!==w||k.pointLength!==x||k.spotLength!==g||k.rectAreaLength!==_||k.hemiLength!==y||k.numDirectionalShadows!==M||k.numPointShadows!==E||k.numSpotShadows!==C||k.numSpotMaps!==P||k.numLightProbes!==R)&&(r.directional.length=w,r.spot.length=g,r.rectArea.length=_,r.point.length=x,r.hemi.length=y,r.directionalShadow.length=M,r.directionalShadowMap.length=M,r.pointShadow.length=E,r.pointShadowMap.length=E,r.spotShadow.length=C,r.spotShadowMap.length=C,r.directionalShadowMatrix.length=M,r.pointShadowMatrix.length=E,r.spotLightMatrix.length=C+P-N,r.spotLightMap.length=P,r.numSpotLightShadowsWithMaps=N,r.numLightProbes=R,k.directionalLength=w,k.pointLength=x,k.spotLength=g,k.rectAreaLength=_,k.hemiLength=y,k.numDirectionalShadows=M,k.numPointShadows=E,k.numSpotShadows=C,k.numSpotMaps=P,k.numLightProbes=R,r.version=FX++)}function c(u,f){let p=0,m=0,v=0,w=0,x=0;const g=f.matrixWorldInverse;for(let _=0,y=u.length;_<y;_++){const M=u[_];if(M.isDirectionalLight){const E=r.directional[p];E.direction.setFromMatrixPosition(M.matrixWorld),s.setFromMatrixPosition(M.target.matrixWorld),E.direction.sub(s),E.direction.transformDirection(g),p++}else if(M.isSpotLight){const E=r.spot[v];E.position.setFromMatrixPosition(M.matrixWorld),E.position.applyMatrix4(g),E.direction.setFromMatrixPosition(M.matrixWorld),s.setFromMatrixPosition(M.target.matrixWorld),E.direction.sub(s),E.direction.transformDirection(g),v++}else if(M.isRectAreaLight){const E=r.rectArea[w];E.position.setFromMatrixPosition(M.matrixWorld),E.position.applyMatrix4(g),a.identity(),o.copy(M.matrixWorld),o.premultiply(g),a.extractRotation(o),E.halfWidth.set(M.width*.5,0,0),E.halfHeight.set(0,M.height*.5,0),E.halfWidth.applyMatrix4(a),E.halfHeight.applyMatrix4(a),w++}else if(M.isPointLight){const E=r.point[m];E.position.setFromMatrixPosition(M.matrixWorld),E.position.applyMatrix4(g),m++}else if(M.isHemisphereLight){const E=r.hemi[x];E.direction.setFromMatrixPosition(M.matrixWorld),E.direction.transformDirection(g),x++}}}return{setup:l,setupView:c,state:r}}function QR(t,e){const n=new UX(t,e),i=[],r=[];function s(){i.length=0,r.length=0}function o(f){i.push(f)}function a(f){r.push(f)}function l(f){n.setup(i,f)}function c(f){n.setupView(i,f)}return{init:s,state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:l,setupLightsView:c,pushLight:o,pushShadow:a}}function kX(t,e){let n=new WeakMap;function i(s,o=0){const a=n.get(s);let l;return a===void 0?(l=new QR(t,e),n.set(s,[l])):o>=a.length?(l=new QR(t,e),a.push(l)):l=a[o],l}function r(){n=new WeakMap}return{get:i,dispose:r}}class My extends Kn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Zs,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 AE extends Kn{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 zX=`void main() {
3620	gl_Position = vec4( position, 1.0 );
3621}`,HX=`uniform sampler2D shadow_pass;
3622uniform vec2 resolution;
3623uniform float radius;
3624#include <packing>
3625void main() {
3626	const float samples = float( VSM_SAMPLES );
3627	float mean = 0.0;
3628	float squared_mean = 0.0;
3629	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
3630	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
3631	for ( float i = 0.0; i < samples; i ++ ) {
3632		float uvOffset = uvStart + i * uvStride;
3633		#ifdef HORIZONTAL_PASS
3634			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
3635			mean += distribution.x;
3636			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
3637		#else
3638			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
3639			mean += depth;
3640			squared_mean += depth * depth;
3641		#endif
3642	}
3643	mean = mean / samples;
3644	squared_mean = squared_mean / samples;
3645	float std_dev = sqrt( squared_mean - mean * mean );
3646	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
3647}`;function GX(t,e,n){let i=new wy;const r=new le,s=new le,o=new on,a=new My({depthPacking:xy}),l=new AE,c={},u=n.maxTextureSize,f={[Qs]:ci,[ci]:Qs,[ji]:ji},p=new Yn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new le},radius:{value:4}},vertexShader:zX,fragmentShader:HX}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const v=new Pt;v.setAttribute("position",new Zt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new ui(v,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=hy;let g=this.type;this.render=function(E,C,P){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||E.length===0)return;const N=t.getRenderTarget(),R=t.getActiveCubeFace(),L=t.getActiveMipmapLevel(),k=t.state;k.setBlending(Pi),k.buffers.color.setClear(1,1,1,1),k.buffers.depth.setTest(!0),k.setScissorTest(!1);const $=g!==Os&&this.type===Os,ee=g===Os&&this.type!==Os;for(let D=0,U=E.length;D<U;D++){const z=E[D],Y=z.shadow;if(Y===void 0){console.warn("THREE.WebGLShadowMap:",z,"has no shadow.");continue}if(Y.autoUpdate===!1&&Y.needsUpdate===!1)continue;r.copy(Y.mapSize);const O=Y.getFrameExtents();if(r.multiply(O),s.copy(Y.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/O.x),r.x=s.x*O.x,Y.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/O.y),r.y=s.y*O.y,Y.mapSize.y=s.y)),Y.map===null||$===!0||ee===!0){const W=this.type!==Os?{minFilter:fn,magFilter:fn}:{};Y.map!==null&&Y.map.dispose(),Y.map=new Fn(r.x,r.y,W),Y.map.texture.name=z.name+".shadowMap",Y.camera.updateProjectionMatrix()}t.setRenderTarget(Y.map),t.clear();const H=Y.getViewportCount();for(let W=0;W<H;W++){const j=Y.getViewport(W);o.set(s.x*j.x,s.y*j.y,s.x*j.z,s.y*j.w),k.viewport(o),Y.updateMatrices(z,W),i=Y.getFrustum(),M(C,P,Y.camera,z,this.type)}Y.isPointLightShadow!==!0&&this.type===Os&&_(Y,P),Y.needsUpdate=!1}g=this.type,x.needsUpdate=!1,t.setRenderTarget(N,R,L)};function _(E,C){const P=e.update(w);p.defines.VSM_SAMPLES!==E.blurSamples&&(p.defines.VSM_SAMPLES=E.blurSamples,m.defines.VSM_SAMPLES=E.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),E.mapPass===null&&(E.mapPass=new Fn(r.x,r.y)),p.uniforms.shadow_pass.value=E.map.texture,p.uniforms.resolution.value=E.mapSize,p.uniforms.radius.value=E.radius,t.setRenderTarget(E.mapPass),t.clear(),t.renderBufferDirect(C,null,P,p,w,null),m.uniforms.shadow_pass.value=E.mapPass.texture,m.uniforms.resolution.value=E.mapSize,m.uniforms.radius.value=E.radius,t.setRenderTarget(E.map),t.clear(),t.renderBufferDirect(C,null,P,m,w,null)}function y(E,C,P,N){let R=null;const L=P.isPointLight===!0?E.customDistanceMaterial:E.customDepthMaterial;if(L!==void 0)R=L;else if(R=P.isPointLight===!0?l:a,t.localClippingEnabled&&C.clipShadows===!0&&Array.isArray(C.clippingPlanes)&&C.clippingPlanes.length!==0||C.displacementMap&&C.displacementScale!==0||C.alphaMap&&C.alphaTest>0||C.map&&C.alphaTest>0){const k=R.uuid,$=C.uuid;let ee=c[k];ee===void 0&&(ee={},c[k]=ee);let D=ee[$];D===void 0&&(D=R.clone(),ee[$]=D),R=D}if(R.visible=C.visible,R.wireframe=C.wireframe,N===Os?R.side=C.shadowSide!==null?C.shadowSide:C.side:R.side=C.shadowSide!==null?C.shadowSide:f[C.side],R.alphaMap=C.alphaMap,R.alphaTest=C.alphaTest,R.map=C.map,R.clipShadows=C.clipShadows,R.clippingPlanes=C.clippingPlanes,R.clipIntersection=C.clipIntersection,R.displacementMap=C.displacementMap,R.displacementScale=C.displacementScale,R.displacementBias=C.displacementBias,R.wireframeLinewidth=C.wireframeLinewidth,R.linewidth=C.linewidth,P.isPointLight===!0&&R.isMeshDistanceMaterial===!0){const k=t.properties.get(R);k.light=P}return R}function M(E,C,P,N,R){if(E.visible===!1)return;if(E.layers.test(C.layers)&&(E.isMesh||E.isLine||E.isPoints)&&(E.castShadow||E.receiveShadow&&R===Os)&&(!E.frustumCulled||i.intersectsObject(E))){E.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,E.matrixWorld);const $=e.update(E),ee=E.material;if(Array.isArray(ee)){const D=$.groups;for(let U=0,z=D.length;U<z;U++){const Y=D[U],O=ee[Y.materialIndex];if(O&&O.visible){const H=y(E,O,N,R);t.renderBufferDirect(P,null,$,H,E,Y)}}}else if(ee.visible){const D=y(E,ee,N,R);t.renderBufferDirect(P,null,$,D,E,null)}}const k=E.children;for(let $=0,ee=k.length;$<ee;$++)M(k[$],C,P,N,R)}}function VX(t,e,n){const i=n.isWebGL2;function r(){let J=!1;const Se=new on;let Te=null;const De=new on(0,0,0,0);return{setMask:function(ke){Te!==ke&&!J&&(t.colorMask(ke,ke,ke,ke),Te=ke)},setLocked:function(ke){J=ke},setClear:function(ke,_e,Ke,Xe,Nt){Nt===!0&&(ke*=Xe,_e*=Xe,Ke*=Xe),Se.set(ke,_e,Ke,Xe),De.equals(Se)===!1&&(t.clearColor(ke,_e,Ke,Xe),De.copy(Se))},reset:function(){J=!1,Te=null,De.set(-1,0,0,0)}}}function s(){let J=!1,Se=null,Te=null,De=null;return{setTest:function(ke){ke?Le(t.DEPTH_TEST):ze(t.DEPTH_TEST)},setMask:function(ke){Se!==ke&&!J&&(t.depthMask(ke),Se=ke)},setFunc:function(ke){if(Te!==ke){switch(ke){case rE:t.depthFunc(t.NEVER);break;case dy:t.depthFunc(t.ALWAYS);break;case Qv:t.depthFunc(t.LESS);break;case hp:t.depthFunc(t.LEQUAL);break;case dp:t.depthFunc(t.EQUAL);break;case sE:t.depthFunc(t.GEQUAL);break;case oE:t.depthFunc(t.GREATER);break;case py:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}Te=ke}},setLocked:function(ke){J=ke},setClear:function(ke){De!==ke&&(t.clearDepth(ke),De=ke)},reset:function(){J=!1,Se=null,Te=null,De=null}}}function o(){let J=!1,Se=null,Te=null,De=null,ke=null,_e=null,Ke=null,Xe=null,Nt=null;return{setTest:function(Ne){J||(Ne?Le(t.STENCIL_TEST):ze(t.STENCIL_TEST))},setMask:function(Ne){Se!==Ne&&!J&&(t.stencilMask(Ne),Se=Ne)},setFunc:function(Ne,gt,Jt){(Te!==Ne||De!==gt||ke!==Jt)&&(t.stencilFunc(Ne,gt,Jt),Te=Ne,De=gt,ke=Jt)},setOp:function(Ne,gt,Jt){(_e!==Ne||Ke!==gt||Xe!==Jt)&&(t.stencilOp(Ne,gt,Jt),_e=Ne,Ke=gt,Xe=Jt)},setLocked:function(Ne){J=Ne},setClear:function(Ne){Nt!==Ne&&(t.clearStencil(Ne),Nt=Ne)},reset:function(){J=!1,Se=null,Te=null,De=null,ke=null,_e=null,Ke=null,Xe=null,Nt=null}}}const a=new r,l=new s,c=new o,u=new WeakMap,f=new WeakMap;let p={},m={},v=new WeakMap,w=[],x=null,g=!1,_=null,y=null,M=null,E=null,C=null,P=null,N=null,R=!1,L=null,k=null,$=null,ee=null,D=null;const U=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let z=!1,Y=0;const O=t.getParameter(t.VERSION);O.indexOf("WebGL")!==-1?(Y=parseFloat(/^WebGL (\d)/.exec(O)[1]),z=Y>=1):O.indexOf("OpenGL ES")!==-1&&(Y=parseFloat(/^OpenGL ES (\d)/.exec(O)[1]),z=Y>=2);let H=null,W={};const j=t.getParameter(t.SCISSOR_BOX),Z=t.getParameter(t.VIEWPORT),re=new on().fromArray(j),ue=new on().fromArray(Z);function ve(J,Se,Te,De){const ke=new Uint8Array(4),_e=t.createTexture();t.bindTexture(J,_e),t.texParameteri(J,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(J,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Ke=0;Ke<Te;Ke++)i&&(J===t.TEXTURE_3D||J===t.TEXTURE_2D_ARRAY)?t.texImage3D(Se,0,t.RGBA,1,1,De,0,t.RGBA,t.UNSIGNED_BYTE,ke):t.texImage2D(Se+Ke,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,ke);return _e}const Re={};Re[t.TEXTURE_2D]=ve(t.TEXTURE_2D,t.TEXTURE_2D,1),Re[t.TEXTURE_CUBE_MAP]=ve(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),i&&(Re[t.TEXTURE_2D_ARRAY]=ve(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),Re[t.TEXTURE_3D]=ve(t.TEXTURE_3D,t.TEXTURE_3D,1,1)),a.setClear(0,0,0,1),l.setClear(1),c.setClear(0),Le(t.DEPTH_TEST),l.setFunc(hp),xe(!1),Fe(rw),Le(t.CULL_FACE),de(Pi);function Le(J){p[J]!==!0&&(t.enable(J),p[J]=!0)}function ze(J){p[J]!==!1&&(t.disable(J),p[J]=!1)}function Qe(J,Se){return m[J]!==Se?(t.bindFramebuffer(J,Se),m[J]=Se,i&&(J===t.DRAW_FRAMEBUFFER&&(m[t.FRAMEBUFFER]=Se),J===t.FRAMEBUFFER&&(m[t.DRAW_FRAMEBUFFER]=Se)),!0):!1}function Ze(J,Se){let Te=w,De=!1;if(J)if(Te=v.get(Se),Te===void 0&&(Te=[],v.set(Se,Te)),J.isWebGLMultipleRenderTargets){const ke=J.texture;if(Te.length!==ke.length||Te[0]!==t.COLOR_ATTACHMENT0){for(let _e=0,Ke=ke.length;_e<Ke;_e++)Te[_e]=t.COLOR_ATTACHMENT0+_e;Te.length=ke.length,De=!0}}else Te[0]!==t.COLOR_ATTACHMENT0&&(Te[0]=t.COLOR_ATTACHMENT0,De=!0);else Te[0]!==t.BACK&&(Te[0]=t.BACK,De=!0);De&&(n.isWebGL2?t.drawBuffers(Te):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(Te))}function Me(J){return x!==J?(t.useProgram(J),x=J,!0):!1}const Q={[ac]:t.FUNC_ADD,[DN]:t.FUNC_SUBTRACT,[FN]:t.FUNC_REVERSE_SUBTRACT};if(i)Q[aw]=t.MIN,Q[lw]=t.MAX;else{const J=e.get("EXT_blend_minmax");J!==null&&(Q[aw]=J.MIN_EXT,Q[lw]=J.MAX_EXT)}const ge={[ON]:t.ZERO,[UN]:t.ONE,[kN]:t.SRC_COLOR,[nE]:t.SRC_ALPHA,[WN]:t.SRC_ALPHA_SATURATE,[VN]:t.DST_COLOR,[HN]:t.DST_ALPHA,[zN]:t.ONE_MINUS_SRC_COLOR,[iE]:t.ONE_MINUS_SRC_ALPHA,[jN]:t.ONE_MINUS_DST_COLOR,[GN]:t.ONE_MINUS_DST_ALPHA};function de(J,Se,Te,De,ke,_e,Ke,Xe){if(J===Pi){g===!0&&(ze(t.BLEND),g=!1);return}if(g===!1&&(Le(t.BLEND),g=!0),J!==NN){if(J!==_||Xe!==R){if((y!==ac||C!==ac)&&(t.blendEquation(t.FUNC_ADD),y=ac,C=ac),Xe)switch(J){case wc:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case Yv:t.blendFunc(t.ONE,t.ONE);break;case sw:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case ow:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",J);break}else switch(J){case wc:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case Yv:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case sw:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case ow:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",J);break}M=null,E=null,P=null,N=null,_=J,R=Xe}return}ke=ke||Se,_e=_e||Te,Ke=Ke||De,(Se!==y||ke!==C)&&(t.blendEquationSeparate(Q[Se],Q[ke]),y=Se,C=ke),(Te!==M||De!==E||_e!==P||Ke!==N)&&(t.blendFuncSeparate(ge[Te],ge[De],ge[_e],ge[Ke]),M=Te,E=De,P=_e,N=Ke),_=J,R=!1}function Ae(J,Se){J.side===ji?ze(t.CULL_FACE):Le(t.CULL_FACE);let Te=J.side===ci;Se&&(Te=!Te),xe(Te),J.blending===wc&&J.transparent===!1?de(Pi):de(J.blending,J.blendEquation,J.blendSrc,J.blendDst,J.blendEquationAlpha,J.blendSrcAlpha,J.blendDstAlpha,J.premultipliedAlpha),l.setFunc(J.depthFunc),l.setTest(J.depthTest),l.setMask(J.depthWrite),a.setMask(J.colorWrite);const De=J.stencilWrite;c.setTest(De),De&&(c.setMask(J.stencilWriteMask),c.setFunc(J.stencilFunc,J.stencilRef,J.stencilFuncMask),c.setOp(J.stencilFail,J.stencilZFail,J.stencilZPass)),We(J.polygonOffset,J.polygonOffsetFactor,J.polygonOffsetUnits),J.alphaToCoverage===!0?Le(t.SAMPLE_ALPHA_TO_COVERAGE):ze(t.SAMPLE_ALPHA_TO_COVERAGE)}function xe(J){L!==J&&(J?t.frontFace(t.CW):t.frontFace(t.CCW),L=J)}function Fe(J){J!==BN?(Le(t.CULL_FACE),J!==k&&(J===rw?t.cullFace(t.BACK):J===LN?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):ze(t.CULL_FACE),k=J}function Ge(J){J!==$&&(z&&t.lineWidth(J),$=J)}function We(J,Se,Te){J?(Le(t.POLYGON_OFFSET_FILL),(ee!==Se||D!==Te)&&(t.polygonOffset(Se,Te),ee=Se,D=Te)):ze(t.POLYGON_OFFSET_FILL)}function ot(J){J?Le(t.SCISSOR_TEST):ze(t.SCISSOR_TEST)}function rt(J){J===void 0&&(J=t.TEXTURE0+U-1),H!==J&&(t.activeTexture(J),H=J)}function Xt(J,Se,Te){Te===void 0&&(H===null?Te=t.TEXTURE0+U-1:Te=H);let De=W[Te];De===void 0&&(De={type:void 0,texture:void 0},W[Te]=De),(De.type!==J||De.texture!==Se)&&(H!==Te&&(t.activeTexture(Te),H=Te),t.bindTexture(J,Se||Re[J]),De.type=J,De.texture=Se)}function X(){const J=W[H];J!==void 0&&J.type!==void 0&&(t.bindTexture(J.type,null),J.type=void 0,J.texture=void 0)}function F(){try{t.compressedTexImage2D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function se(){try{t.compressedTexImage3D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function be(){try{t.texSubImage2D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function ye(){try{t.texSubImage3D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Ee(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function et(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Pe(){try{t.texStorage2D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Oe(){try{t.texStorage3D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function mt(){try{t.texImage2D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Bt(){try{t.texImage3D.apply(t,arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Ce(J){re.equals(J)===!1&&(t.scissor(J.x,J.y,J.z,J.w),re.copy(J))}function xt(J){ue.equals(J)===!1&&(t.viewport(J.x,J.y,J.z,J.w),ue.copy(J))}function q(J,Se){let Te=f.get(Se);Te===void 0&&(Te=new WeakMap,f.set(Se,Te));let De=Te.get(J);De===void 0&&(De=t.getUniformBlockIndex(Se,J.name),Te.set(J,De))}function fe(J,Se){const De=f.get(Se).get(J);u.get(Se)!==De&&(t.uniformBlockBinding(Se,De,J.__bindingPointIndex),u.set(Se,De))}function we(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.colorMask(!0,!0,
3647!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),i===!0&&(t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null)),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),p={},H=null,W={},m={},v=new WeakMap,w=[],x=null,g=!1,_=null,y=null,M=null,E=null,C=null,P=null,N=null,R=!1,L=null,k=null,$=null,ee=null,D=null,re.set(0,0,t.canvas.width,t.canvas.height),ue.set(0,0,t.canvas.width,t.canvas.height),a.reset(),l.reset(),c.reset()}return{buffers:{color:a,depth:l,stencil:c},enable:Le,disable:ze,bindFramebuffer:Qe,drawBuffers:Ze,useProgram:Me,setBlending:de,setMaterial:Ae,setFlipSided:xe,setCullFace:Fe,setLineWidth:Ge,setPolygonOffset:We,setScissorTest:ot,activeTexture:rt,bindTexture:Xt,unbindTexture:X,compressedTexImage2D:F,compressedTexImage3D:se,texImage2D:mt,texImage3D:Bt,updateUBOMapping:q,uniformBlockBinding:fe,texStorage2D:Pe,texStorage3D:Oe,texSubImage2D:be,texSubImage3D:ye,compressedTexSubImage2D:Ee,compressedTexSubImage3D:et,scissor:Ce,viewport:xt,reset:we}}function jX(t,e,n,i,r,s,o){const a=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,u=r.maxTextureSize,f=r.maxSamples,p=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,m=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),v=new WeakMap;let w;const x=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(X,F){return g?new OffscreenCanvas(X,F):Ap("canvas")}function y(X,F,se,be){let ye=1;if((X.width>be||X.height>be)&&(ye=be/Math.max(X.width,X.height)),ye<1||F===!0)if(typeof HTMLImageElement<"u"&&X instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&X instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&X instanceof ImageBitmap){const Ee=F?$v:Math.floor,et=Ee(ye*X.width),Pe=Ee(ye*X.height);w===void 0&&(w=_(et,Pe));const Oe=se?_(et,Pe):w;return Oe.width=et,Oe.height=Pe,Oe.getContext("2d").drawImage(X,0,0,et,Pe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+X.width+"x"+X.height+") to ("+et+"x"+Pe+")."),Oe}else return"data"in X&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+X.width+"x"+X.height+")."),X;return X}function M(X){return Dw(X.width)&&Dw(X.height)}function E(X){return a?!1:X.wrapS!==Ci||X.wrapT!==Ci||X.minFilter!==fn&&X.minFilter!==gn}function C(X,F){return X.generateMipmaps&&F&&X.minFilter!==fn&&X.minFilter!==gn}function P(X){t.generateMipmap(X)}function N(X,F,se,be,ye=!1){if(a===!1)return F;if(X!==null){if(t[X]!==void 0)return t[X];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+X+"'")}let Ee=F;if(F===t.RED&&(se===t.FLOAT&&(Ee=t.R32F),se===t.HALF_FLOAT&&(Ee=t.R16F),se===t.UNSIGNED_BYTE&&(Ee=t.R8)),F===t.RED_INTEGER&&(se===t.UNSIGNED_BYTE&&(Ee=t.R8UI),se===t.UNSIGNED_SHORT&&(Ee=t.R16UI),se===t.UNSIGNED_INT&&(Ee=t.R32UI),se===t.BYTE&&(Ee=t.R8I),se===t.SHORT&&(Ee=t.R16I),se===t.INT&&(Ee=t.R32I)),F===t.RG&&(se===t.FLOAT&&(Ee=t.RG32F),se===t.HALF_FLOAT&&(Ee=t.RG16F),se===t.UNSIGNED_BYTE&&(Ee=t.RG8)),F===t.RGBA){const et=ye?yp:cn.getTransfer(be);se===t.FLOAT&&(Ee=t.RGBA32F),se===t.HALF_FLOAT&&(Ee=t.RGBA16F),se===t.UNSIGNED_BYTE&&(Ee=et===vn?t.SRGB8_ALPHA8:t.RGBA8),se===t.UNSIGNED_SHORT_4_4_4_4&&(Ee=t.RGBA4),se===t.UNSIGNED_SHORT_5_5_5_1&&(Ee=t.RGB5_A1)}return(Ee===t.R16F||Ee===t.R32F||Ee===t.RG16F||Ee===t.RG32F||Ee===t.RGBA16F||Ee===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ee}function R(X,F,se){return C(X,se)===!0||X.isFramebufferTexture&&X.minFilter!==fn&&X.minFilter!==gn?Math.log2(Math.max(F.width,F.height))+1:X.mipmaps!==void 0&&X.mipmaps.length>0?X.mipmaps.length:X.isCompressedTexture&&Array.isArray(X.image)?F.mipmaps.length:1}function L(X){return X===fn||X===gp||X===Tf?t.NEAREST:t.LINEAR}function k(X){const F=X.target;F.removeEventListener("dispose",k),ee(F),F.isVideoTexture&&v.delete(F)}function $(X){const F=X.target;F.removeEventListener("dispose",$),U(F)}function ee(X){const F=i.get(X);if(F.__webglInit===void 0)return;const se=X.source,be=x.get(se);if(be){const ye=be[F.__cacheKey];ye.usedTimes--,ye.usedTimes===0&&D(X),Object.keys(be).length===0&&x.delete(se)}i.remove(X)}function D(X){const F=i.get(X);t.deleteTexture(F.__webglTexture);const se=X.source,be=x.get(se);delete be[F.__cacheKey],o.memory.textures--}function U(X){const F=X.texture,se=i.get(X),be=i.get(F);if(be.__webglTexture!==void 0&&(t.deleteTexture(be.__webglTexture),o.memory.textures--),X.depthTexture&&X.depthTexture.dispose(),X.isWebGLCubeRen
3647derTarget)for(let ye=0;ye<6;ye++){if(Array.isArray(se.__webglFramebuffer[ye]))for(let Ee=0;Ee<se.__webglFramebuffer[ye].length;Ee++)t.deleteFramebuffer(se.__webglFramebuffer[ye][Ee]);else t.deleteFramebuffer(se.__webglFramebuffer[ye]);se.__webglDepthbuffer&&t.deleteRenderbuffer(se.__webglDepthbuffer[ye])}else{if(Array.isArray(se.__webglFramebuffer))for(let ye=0;ye<se.__webglFramebuffer.length;ye++)t.deleteFramebuffer(se.__webglFramebuffer[ye]);else t.deleteFramebuffer(se.__webglFramebuffer);if(se.__webglDepthbuffer&&t.deleteRenderbuffer(se.__webglDepthbuffer),se.__webglMultisampledFramebuffer&&t.deleteFramebuffer(se.__webglMultisampledFramebuffer),se.__webglColorRenderbuffer)for(let ye=0;ye<se.__webglColorRenderbuffer.length;ye++)se.__webglColorRenderbuffer[ye]&&t.deleteRenderbuffer(se.__webglColorRenderbuffer[ye]);se.__webglDepthRenderbuffer&&t.deleteRenderbuffer(se.__webglDepthRenderbuffer)}if(X.isWebGLMultipleRenderTargets)for(let ye=0,Ee=F.length;ye<Ee;ye++){const et=i.get(F[ye]);et.__webglTexture&&(t.deleteTexture(et.__webglTexture),o.memory.textures--),i.remove(F[ye])}i.remove(F),i.remove(X)}let z=0;function Y(){z=0}function O(){const X=z;return X>=l&&console.warn("THREE.WebGLTextures: Trying to use "+X+" texture units while this GPU supports only "+l),z+=1,X}function H(X){const F=[];return F.push(X.wrapS),F.push(X.wrapT),F.push(X.wrapR||0),F.push(X.magFilter),F.push(X.minFilter),F.push(X.anisotropy),F.push(X.internalFormat),F.push(X.format),F.push(X.type),F.push(X.generateMipmaps),F.push(X.premultiplyAlpha),F.push(X.flipY),F.push(X.unpackAlignment),F.push(X.colorSpace),F.join()}function W(X,F){const se=i.get(X);if(X.isVideoTexture&&rt(X),X.isRenderTargetTexture===!1&&X.version>0&&se.__version!==X.version){const be=X.image;if(be===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(be.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Qe(se,X,F);return}}n.bindTexture(t.TEXTURE_2D,se.__webglTexture,t.TEXTURE0+F)}function j(X,F){const se=i.get(X);if(X.version>0&&se.__version!==X.version){Qe(se,X,F);return}n.bindTexture(t.TEXTURE_2D_ARRAY,se.__webglTexture,t.TEXTURE0+F)}function Z(X,F){const se=i.get(X);if(X.version>0&&se.__version!==X.version){Qe(se,X,F);return}n.bindTexture(t.TEXTURE_3D,se.__webglTexture,t.TEXTURE0+F)}function re(X,F){const se=i.get(X);if(X.version>0&&se.__version!==X.version){Ze(se,X,F);return}n.bindTexture(t.TEXTURE_CUBE_MAP,se.__webglTexture,t.TEXTURE0+F)}const ue={[vl]:t.REPEAT,[Ci]:t.CLAMP_TO_EDGE,[Gf]:t.MIRRORED_REPEAT},ve={[fn]:t.NEAREST,[gp]:t.NEAREST_MIPMAP_NEAREST,[Tf]:t.NEAREST_MIPMAP_LINEAR,[gn]:t.LINEAR,[gy]:t.LINEAR_MIPMAP_NEAREST,[Po]:t.LINEAR_MIPMAP_LINEAR},Re={[dD]:t.NEVER,[_D]:t.ALWAYS,[pD]:t.LESS,[gD]:t.LEQUAL,[mD]:t.EQUAL,[xD]:t.GEQUAL,[vD]:t.GREATER,[yD]:t.NOTEQUAL};function Le(X,F,se){if(se?(t.texParameteri(X,t.TEXTURE_WRAP_S,ue[F.wrapS]),t.texParameteri(X,t.TEXTURE_WRAP_T,ue[F.wrapT]),(X===t.TEXTURE_3D||X===t.TEXTURE_2D_ARRAY)&&t.texParameteri(X,t.TEXTURE_WRAP_R,ue[F.wrapR]),t.texParameteri(X,t.TEXTURE_MAG_FILTER,ve[F.magFilter]),t.texParameteri(X,t.TEXTURE_MIN_FILTER,ve[F.minFilter])):(t.texParameteri(X,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(X,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(X===t.TEXTURE_3D||X===t.TEXTURE_2D_ARRAY)&&t.texParameteri(X,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(F.wrapS!==Ci||F.wrapT!==Ci)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(X,t.TEXTURE_MAG_FILTER,L(F.magFilter)),t.texParameteri(X,t.TEXTURE_MIN_FILTER,L(F.minFilter)),F.minFilter!==fn&&F.minFilter!==gn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),F.compareFunction&&(t.texParameteri(X,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(X,t.TEXTURE_COMPARE_FUNC,Re[F.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const be=e.get("EXT_texture_filter_anisotropic");if(F.magFilter===fn||F.minFilter!==Tf&&F.minFilter!==Po||F.type===Vs&&e.has("OES_texture_float_linear")===!1||a===!1&&F.type===Dc&&e.has("OES_texture_half_float_linear")===!1)return;(F.anisotropy>1||i.get(F).__currentAnisotropy)&&(t.texParameterf(X,be.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(F.anisotropy,r.getMaxAnisotropy())),i.get(F).__currentAnisotropy=F.anisotropy)}}function ze(X,F){let se=!1;X.__webglInit===void 0&&(X.__webglInit=!0,F.addEventListener("dispose",k));const be=F.source;let ye=x.get(be);ye===void 0&&(ye={},x.set(be,ye));const Ee=H(F);if(Ee!==X.__cacheKey){ye[Ee]===void 0&&(ye[Ee]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,se=!0),ye[Ee].usedTimes++;const et=ye[X.__cacheKey];et!==void 0&&(ye[X.__cacheKey].usedTimes--,et.usedTimes===0&&D(F)),X.__cacheKey=Ee,X.__webglTexture=ye[
3647Ee].texture}return se}function Qe(X,F,se){let be=t.TEXTURE_2D;(F.isDataArrayTexture||F.isCompressedArrayTexture)&&(be=t.TEXTURE_2D_ARRAY),F.isData3DTexture&&(be=t.TEXTURE_3D);const ye=ze(X,F),Ee=F.source;n.bindTexture(be,X.__webglTexture,t.TEXTURE0+se);const et=i.get(Ee);if(Ee.version!==et.__version||ye===!0){n.activeTexture(t.TEXTURE0+se);const Pe=cn.getPrimaries(cn.workingColorSpace),Oe=F.colorSpace===ar?null:cn.getPrimaries(F.colorSpace),mt=F.colorSpace===ar||Pe===Oe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,F.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,F.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,mt);const Bt=E(F)&&M(F.image)===!1;let Ce=y(F.image,Bt,!1,u);Ce=Xt(F,Ce);const xt=M(Ce)||a,q=s.convert(F.format,F.colorSpace);let fe=s.convert(F.type),we=N(F.internalFormat,q,fe,F.colorSpace,F.isVideoTexture);Le(be,F,xt);let J;const Se=F.mipmaps,Te=a&&F.isVideoTexture!==!0,De=et.__version===void 0||ye===!0,ke=R(F,Ce,xt);if(F.isDepthTexture)we=t.DEPTH_COMPONENT,a?F.type===Vs?we=t.DEPTH_COMPONENT32F:F.type===So?we=t.DEPTH_COMPONENT24:F.type===ua?we=t.DEPTH24_STENCIL8:we=t.DEPTH_COMPONENT16:F.type===Vs&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),F.format===fl&&we===t.DEPTH_COMPONENT&&F.type!==vy&&F.type!==So&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),F.type=So,fe=s.convert(F.type)),F.format===yl&&we===t.DEPTH_COMPONENT&&(we=t.DEPTH_STENCIL,F.type!==ua&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),F.type=ua,fe=s.convert(F.type))),De&&(Te?n.texStorage2D(t.TEXTURE_2D,1,we,Ce.width,Ce.height):n.texImage2D(t.TEXTURE_2D,0,we,Ce.width,Ce.height,0,q,fe,null));else if(F.isDataTexture)if(Se.length>0&&xt){Te&&De&&n.texStorage2D(t.TEXTURE_2D,ke,we,Se[0].width,Se[0].height);for(let _e=0,Ke=Se.length;_e<Ke;_e++)J=Se[_e],Te?n.texSubImage2D(t.TEXTURE_2D,_e,0,0,J.width,J.height,q,fe,J.data):n.texImage2D(t.TEXTURE_2D,_e,we,J.width,J.height,0,q,fe,J.data);F.generateMipmaps=!1}else Te?(De&&n.texStorage2D(t.TEXTURE_2D,ke,we,Ce.width,Ce.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,Ce.width,Ce.height,q,fe,Ce.data)):n.texImage2D(t.TEXTURE_2D,0,we,Ce.width,Ce.height,0,q,fe,Ce.data);else if(F.isCompressedTexture)if(F.isCompressedArrayTexture){Te&&De&&n.texStorage3D(t.TEXTURE_2D_ARRAY,ke,we,Se[0].width,Se[0].height,Ce.depth);for(let _e=0,Ke=Se.length;_e<Ke;_e++)J=Se[_e],F.format!==Mr?q!==null?Te?n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,_e,0,0,0,J.width,J.height,Ce.depth,q,J.data,0,0):n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,_e,we,J.width,J.height,Ce.depth,0,J.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Te?n.texSubImage3D(t.TEXTURE_2D_ARRAY,_e,0,0,0,J.width,J.height,Ce.depth,q,fe,J.data):n.texImage3D(t.TEXTURE_2D_ARRAY,_e,we,J.width,J.height,Ce.depth,0,q,fe,J.data)}else{Te&&De&&n.texStorage2D(t.TEXTURE_2D,ke,we,Se[0].width,Se[0].height);for(let _e=0,Ke=Se.length;_e<Ke;_e++)J=Se[_e],F.format!==Mr?q!==null?Te?n.compressedTexSubImage2D(t.TEXTURE_2D,_e,0,0,J.width,J.height,q,J.data):n.compressedTexImage2D(t.TEXTURE_2D,_e,we,J.width,J.height,0,J.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Te?n.texSubImage2D(t.TEXTURE_2D,_e,0,0,J.width,J.height,q,fe,J.data):n.texImage2D(t.TEXTURE_2D,_e,we,J.width,J.height,0,q,fe,J.data)}else if(F.isDataArrayTexture)Te?(De&&n.texStorage3D(t.TEXTURE_2D_ARRAY,ke,we,Ce.width,Ce.height,Ce.depth),n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Ce.width,Ce.height,Ce.depth,q,fe,Ce.data)):n.texImage3D(t.TEXTURE_2D_ARRAY,0,we,Ce.width,Ce.height,Ce.depth,0,q,fe,Ce.data);else if(F.isData3DTexture)Te?(De&&n.texStorage3D(t.TEXTURE_3D,ke,we,Ce.width,Ce.height,Ce.depth),n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Ce.width,Ce.height,Ce.depth,q,fe,Ce.data)):n.texImage3D(t.TEXTURE_3D,0,we,Ce.width,Ce.height,Ce.depth,0,q,fe,Ce.data);else if(F.isFramebufferTexture){if(De)if(Te)n.texStorage2D(t.TEXTURE_2D,ke,we,Ce.width,Ce.height);else{let _e=Ce.width,Ke=Ce.height;for(let Xe=0;Xe<ke;Xe++)n.texImage2D(t.TEXTURE_2D,Xe,we,_e,Ke,0,q,fe,null),_e>>=1,Ke>>=1}}else if(Se.length>0&&xt){Te&&De&&n.texStorage2D(t.TEXTURE_2D,ke,we,Se[0].width,Se[0].height);for(let _e=0,Ke=Se.length;_e<Ke;_e++)J=Se[_e],Te?n.texSubImage2D(t.TEXTURE_2D,_e,0,0,q,fe,J):n.texImage2D(t.TEXTURE_2D,_e,we,q,fe,J);F.generateMipmaps=!1}else Te?(De&&n.texStorage2D(t.TEXTURE_2D,ke,we,Ce.width,Ce.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,q,fe,Ce)):n.texImage2D(t.TEXTURE_2D,0,we,q,fe,Ce);C(F,xt)&&P(be),et.__version=Ee.version,F.onUpdate&&F.onUpdate(F)}X.__version=F.version}function Ze(X,F,se){if(F.image.length!==6)return;const be=ze(X,F),ye=F.source;n.bindTexture(t.TEXTURE_CUBE_MAP,X.__webglTexture,t.TEXTURE0+se);const Ee=i.get(ye);if(ye.version!==Ee.__version||be===!0){n.activeTexture(t.TEXTURE0+se);
3647const et=cn.getPrimaries(cn.workingColorSpace),Pe=F.colorSpace===ar?null:cn.getPrimaries(F.colorSpace),Oe=F.colorSpace===ar||et===Pe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,F.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,F.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Oe);const mt=F.isCompressedTexture||F.image[0].isCompressedTexture,Bt=F.image[0]&&F.image[0].isDataTexture,Ce=[];for(let _e=0;_e<6;_e++)!mt&&!Bt?Ce[_e]=y(F.image[_e],!1,!0,c):Ce[_e]=Bt?F.image[_e].image:F.image[_e],Ce[_e]=Xt(F,Ce[_e]);const xt=Ce[0],q=M(xt)||a,fe=s.convert(F.format,F.colorSpace),we=s.convert(F.type),J=N(F.internalFormat,fe,we,F.colorSpace),Se=a&&F.isVideoTexture!==!0,Te=Ee.__version===void 0||be===!0;let De=R(F,xt,q);Le(t.TEXTURE_CUBE_MAP,F,q);let ke;if(mt){Se&&Te&&n.texStorage2D(t.TEXTURE_CUBE_MAP,De,J,xt.width,xt.height);for(let _e=0;_e<6;_e++){ke=Ce[_e].mipmaps;for(let Ke=0;Ke<ke.length;Ke++){const Xe=ke[Ke];F.format!==Mr?fe!==null?Se?n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke,0,0,Xe.width,Xe.height,fe,Xe.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke,J,Xe.width,Xe.height,0,Xe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Se?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke,0,0,Xe.width,Xe.height,fe,we,Xe.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke,J,Xe.width,Xe.height,0,fe,we,Xe.data)}}}else{ke=F.mipmaps,Se&&Te&&(ke.length>0&&De++,n.texStorage2D(t.TEXTURE_CUBE_MAP,De,J,Ce[0].width,Ce[0].height));for(let _e=0;_e<6;_e++)if(Bt){Se?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,0,0,0,Ce[_e].width,Ce[_e].height,fe,we,Ce[_e].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,0,J,Ce[_e].width,Ce[_e].height,0,fe,we,Ce[_e].data);for(let Ke=0;Ke<ke.length;Ke++){const Nt=ke[Ke].image[_e].image;Se?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke+1,0,0,Nt.width,Nt.height,fe,we,Nt.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke+1,J,Nt.width,Nt.height,0,fe,we,Nt.data)}}else{Se?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,0,0,0,fe,we,Ce[_e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,0,J,fe,we,Ce[_e]);for(let Ke=0;Ke<ke.length;Ke++){const Xe=ke[Ke];Se?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke+1,0,0,fe,we,Xe.image[_e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+_e,Ke+1,J,fe,we,Xe.image[_e])}}}C(F,q)&&P(t.TEXTURE_CUBE_MAP),Ee.__version=ye.version,F.onUpdate&&F.onUpdate(F)}X.__version=F.version}function Me(X,F,se,be,ye,Ee){const et=s.convert(se.format,se.colorSpace),Pe=s.convert(se.type),Oe=N(se.internalFormat,et,Pe,se.colorSpace);if(!i.get(F).__hasExternalTextures){const Bt=Math.max(1,F.width>>Ee),Ce=Math.max(1,F.height>>Ee);ye===t.TEXTURE_3D||ye===t.TEXTURE_2D_ARRAY?n.texImage3D(ye,Ee,Oe,Bt,Ce,F.depth,0,et,Pe,null):n.texImage2D(ye,Ee,Oe,Bt,Ce,0,et,Pe,null)}n.bindFramebuffer(t.FRAMEBUFFER,X),ot(F)?p.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,be,ye,i.get(se).__webglTexture,0,We(F)):(ye===t.TEXTURE_2D||ye>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&ye<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,be,ye,i.get(se).__webglTexture,Ee),n.bindFramebuffer(t.FRAMEBUFFER,null)}function Q(X,F,se){if(t.bindRenderbuffer(t.RENDERBUFFER,X),F.depthBuffer&&!F.stencilBuffer){let be=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(se||ot(F)){const ye=F.depthTexture;ye&&ye.isDepthTexture&&(ye.type===Vs?be=t.DEPTH_COMPONENT32F:ye.type===So&&(be=t.DEPTH_COMPONENT24));const Ee=We(F);ot(F)?p.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ee,be,F.width,F.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,Ee,be,F.width,F.height)}else t.renderbufferStorage(t.RENDERBUFFER,be,F.width,F.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,X)}else if(F.depthBuffer&&F.stencilBuffer){const be=We(F);se&&ot(F)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,be,t.DEPTH24_STENCIL8,F.width,F.height):ot(F)?p.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,be,t.DEPTH24_STENCIL8,F.width,F.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,F.width,F.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,X)}else{const be=F.isWebGLMultipleRenderTargets===!0?F.texture:[F.texture];for(let ye=0;ye<be.length;ye++){const Ee=be[ye],et=s.convert(Ee.format,Ee.colorSpace),Pe=s.convert(Ee.type),Oe=N(Ee.internalFormat,et,Pe,Ee.colorSpace),mt=We(F);se&&ot(F)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,mt,Oe,F.width,F.height):ot(F)?p.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,mt,Oe,F.width,F.height):t.renderbufferStorage(t.RENDERBUFFER,Oe,F.width,F.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}
vendor: 4,530 bytes, line 3647
3647function ge(X,F){if(F&&F.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,X),!(F.depthTexture&&F.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(F.depthTexture).__webglTexture||F.depthTexture.image.width!==F.width||F.depthTexture.image.height!==F.height)&&(F.depthTexture.image.width=F.width,F.depthTexture.image.height=F.height,F.depthTexture.needsUpdate=!0),W(F.depthTexture,0);const be=i.get(F.depthTexture).__webglTexture,ye=We(F);if(F.depthTexture.format===fl)ot(F)?p.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,be,0,ye):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,be,0);else if(F.depthTexture.format===yl)ot(F)?p.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,be,0,ye):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,be,0);else throw new Error("Unknown depthTexture format")}function de(X){const F=i.get(X),se=X.isWebGLCubeRenderTarget===!0;if(X.depthTexture&&!F.__autoAllocateDepthBuffer){if(se)throw new Error("target.depthTexture not supported in Cube render targets");ge(F.__webglFramebuffer,X)}else if(se){F.__webglDepthbuffer=[];for(let be=0;be<6;be++)n.bindFramebuffer(t.FRAMEBUFFER,F.__webglFramebuffer[be]),F.__webglDepthbuffer[be]=t.createRenderbuffer(),Q(F.__webglDepthbuffer[be],X,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,F.__webglFramebuffer),F.__webglDepthbuffer=t.createRenderbuffer(),Q(F.__webglDepthbuffer,X,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function Ae(X,F,se){const be=i.get(X);F!==void 0&&Me(be.__webglFramebuffer,X,X.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),se!==void 0&&de(X)}function xe(X){const F=X.texture,se=i.get(X),be=i.get(F);X.addEventListener("dispose",$),X.isWebGLMultipleRenderTargets!==!0&&(be.__webglTexture===void 0&&(be.__webglTexture=t.createTexture()),be.__version=F.version,o.memory.textures++);const ye=X.isWebGLCubeRenderTarget===!0,Ee=X.isWebGLMultipleRenderTargets===!0,et=M(X)||a;if(ye){se.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(a&&F.mipmaps&&F.mipmaps.length>0){se.__webglFramebuffer[Pe]=[];for(let Oe=0;Oe<F.mipmaps.length;Oe++)se.__webglFramebuffer[Pe][Oe]=t.createFramebuffer()}else se.__webglFramebuffer[Pe]=t.createFramebuffer()}else{if(a&&F.mipmaps&&F.mipmaps.length>0){se.__webglFramebuffer=[];for(let Pe=0;Pe<F.mipmaps.length;Pe++)se.__webglFramebuffer[Pe]=t.createFramebuffer()}else se.__webglFramebuffer=t.createFramebuffer();if(Ee)if(r.drawBuffers){const Pe=X.texture;for(let Oe=0,mt=Pe.length;Oe<mt;Oe++){const Bt=i.get(Pe[Oe]);Bt.__webglTexture===void 0&&(Bt.__webglTexture=t.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(a&&X.samples>0&&ot(X)===!1){const Pe=Ee?F:[F];se.__webglMultisampledFramebuffer=t.createFramebuffer(),se.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Oe=0;Oe<Pe.length;Oe++){const mt=Pe[Oe];se.__webglColorRenderbuffer[Oe]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,se.__webglColorRenderbuffer[Oe]);const Bt=s.convert(mt.format,mt.colorSpace),Ce=s.convert(mt.type),xt=N(mt.internalFormat,Bt,Ce,mt.colorSpace,X.isXRRenderTarget===!0),q=We(X);t.renderbufferStorageMultisample(t.RENDERBUFFER,q,xt,X.width,X.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Oe,t.RENDERBUFFER,se.__webglColorRenderbuffer[Oe])}t.bindRenderbuffer(t.RENDERBUFFER,null),X.depthBuffer&&(se.__webglDepthRenderbuffer=t.createRenderbuffer(),Q(se.__webglDepthRenderbuffer,X,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(ye){n.bindTexture(t.TEXTURE_CUBE_MAP,be.__webglTexture),Le(t.TEXTURE_CUBE_MAP,F,et);for(let Pe=0;Pe<6;Pe++)if(a&&F.mipmaps&&F.mipmaps.length>0)for(let Oe=0;Oe<F.mipmaps.length;Oe++)Me(se.__webglFramebuffer[Pe][Oe],X,F,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,Oe);else Me(se.__webglFramebuffer[Pe],X,F,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0);C(F,et)&&P(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(Ee){const Pe=X.texture;for(let Oe=0,mt=Pe.length;Oe<mt;Oe++){const Bt=Pe[Oe],Ce=i.get(Bt);n.bindTexture(t.TEXTURE_2D,Ce.__webglTexture),Le(t.TEXTURE_2D,Bt,et),Me(se.__webglFramebuffer,X,Bt,t.COLOR_ATTACHMENT0+Oe,t.TEXTURE_2D,0),C(Bt,et)&&P(t.TEXTURE_2D)}n.unbindTexture()}else{let Pe=t.TEXTURE_2D;
3647if((X.isWebGL3DRenderTarget||X.isWebGLArrayRenderTarget)&&(a?Pe=X.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(Pe,be.__webglTexture),Le(Pe,F,et),a&&F.mipmaps&&F.mipmaps.length>0)for(let Oe=0;Oe<F.mipmaps.length;Oe++)Me(se.__webglFramebuffer[Oe],X,F,t.COLOR_ATTACHMENT0,Pe,Oe);else Me(se.__webglFramebuffer,X,F,t.COLOR_ATTACHMENT0,Pe,0);C(F,et)&&P(Pe),n.unbindTexture()}X.depthBuffer&&de(X)}function Fe(X){const F=M(X)||a,se=X.isWebGLMultipleRenderTargets===!0?X.texture:[X.texture];for(let be=0,ye=se.length;be<ye;be++){const Ee=se[be];if(C(Ee,F)){const et=X.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,Pe=i.get(Ee).__webglTexture;n.bindTexture(et,Pe),P(et),n.unbindTexture()}}}function Ge(X){if(a&&X.samples>0&&ot(X)===!1){const F=X.isWebGLMultipleRenderTargets?X.texture:[X.texture],se=X.width,be=X.height;let ye=t.COLOR_BUFFER_BIT;const Ee=[],et=X.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Pe=i.get(X),Oe=X.isWebGLMultipleRenderTargets===!0;if(Oe)for(let mt=0;mt<F.length;mt++)n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+mt,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+mt,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,Pe.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Pe.__webglFramebuffer);for(let mt=0;mt<F.length;mt++){Ee.push(t.COLOR_ATTACHMENT0+mt),X.depthBuffer&&Ee.push(et);const Bt=Pe.__ignoreDepthValues!==void 0?Pe.__ignoreDepthValues:!1;if(Bt===!1&&(X.depthBuffer&&(ye|=t.DEPTH_BUFFER_BIT),X.stencilBuffer&&(ye|=t.STENCIL_BUFFER_BIT)),Oe&&t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,Pe.__webglColorRenderbuffer[mt]),Bt===!0&&(t.invalidateFramebuffer(t.READ_FRAMEBUFFER,[et]),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[et])),Oe){const Ce=i.get(F[mt]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,Ce,0)}t.blitFramebuffer(0,0,se,be,0,0,se,be,ye,t.NEAREST),m&&t.invalidateFramebuffer(t.READ_FRAMEBUFFER,Ee)}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),Oe)for(let mt=0;mt<F.length;mt++){n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+mt,t.RENDERBUFFER,Pe.__webglColorRenderbuffer[mt]);const Bt=i.get(F[mt]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+mt,t.TEXTURE_2D,Bt,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Pe.__webglMultisampledFramebuffer)}}function We(X){return Math.min(f,X.samples)}function ot(X){const F=i.get(X);return a&&X.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&F.__useRenderToTexture!==!1}function rt(X){const F=o.render.frame;v.get(X)!==F&&(v.set(X,F),X.update())}function Xt(X,F){const se=X.colorSpace,be=X.format,ye=X.type;return X.isCompressedTexture===!0||X.isVideoTexture===!0||X.format===qv||se!==ws&&se!==ar&&(cn.getTransfer(se)===vn?a===!1?e.has("EXT_sRGB")===!0&&be===Mr?(X.format=qv,X.minFilter=gn,X.generateMipmaps=!1):F=yE.sRGBToLinear(F):(be!==Mr||ye!==Si)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),F}this.allocateTextureUnit=O,this.resetTextureUnits=Y,this.setTexture2D=W,this.setTexture2DArray=j,this.setTexture3D=Z,this.setTextureCube=re,this.rebindTextures=Ae,this.setupRenderTarget=xe,this.updateRenderTargetMipmap=Fe,this.updateMultisampleRenderTarget=Ge,this.setupDepthRenderbuffer=de,this.setupFrameBufferTexture=Me,this.useMultisampledRTT=ot}function DD(t,e,n){const i=n.isWebGL2;function r(s,o=ar){let a;const l=cn.getTransfer(o);if(s===Si)return t.UNSIGNED_BYTE;if(s===cE)return t.UNSIGNED_SHORT_4_4_4_4;if(s===uE)return t.UNSIGNED_SHORT_5_5_5_1;if(s===qN)return t.BYTE;if(s===$N)return t.SHORT;if(s===vy)return t.UNSIGNED_SHORT;if(s===lE)return t.INT;if(s===So)return t.UNSIGNED_INT;if(s===Vs)return t.FLOAT;if(s===Dc)return i?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===eD)return t.ALPHA;if(s===Mr)return t.RGBA;if(s===tD)return t.LUMINANCE;if(s===nD)return t.LUMINANCE_ALPHA;if(s===fl)return t.DEPTH_COMPONENT;if(s===yl)return t.DEPTH_STENCIL;if(s===qv)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===iD)return t.RED;if(s===fE)return t.RED_INTEGER;if(s===rD)return t.RG;if(s===hE)return t.RG_INTEGER;if(s===dE)return t.RGBA_INTEGER;if(s===tv||s===nv||s===iv||s===rv)if(l===vn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===tv)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===nv)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===iv)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===rv)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===tv)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===nv)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===iv)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===rv)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;
vendor: 20,663 bytes, line 3647
3647if(s===cw||s===uw||s===fw||s===hw)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===cw)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===uw)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===fw)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===hw)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===sD)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===dw||s===pw)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===dw)return l===vn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===pw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===mw||s===gw||s===vw||s===yw||s===xw||s===_w||s===Sw||s===ww||s===Aw||s===Mw||s===Ew||s===Tw||s===bw||s===Cw)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===mw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===gw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===vw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===yw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===xw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===_w)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Sw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===ww)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===Aw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===Mw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===Ew)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===Tw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===bw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===Cw)return l===vn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===sv||s===Rw||s===Pw)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===sv)return l===vn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(s===Rw)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(s===Pw)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(s===oD||s===Bw||s===Lw||s===Iw)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===sv)return a.COMPRESSED_RED_RGTC1_EXT;if(s===Bw)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===Lw)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===Iw)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===ua?i?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[s]!==void 0?t[s]:null}return{convert:r}}class FD extends xn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class aa extends Kt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const WX={type:"move"};class i2{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new aa,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 aa,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new G,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new G),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new aa,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new G,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new G),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const w of e.hand.values()){const x=n.getJointPose(w,i),g=this._getHandJoint(c,w);x!==null&&(g.matrix.fromArray(x.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=x.radius),g.visible=x!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],p=u.position.distanceTo(f.position),m=.02,v=.005;c.inputState.pinching&&p>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&p<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=n.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(WX)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new aa;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}class ME extends Mn{constructor(e,n,i,r,s,o,a,l,c,u){if(u=u!==void 0?u:fl,u!==fl&&u!==yl)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===fl&&(i=So),i===void 0&&u===yl&&(i=ua),super(null,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:fn,this.minFilter=l!==void 0?l:fn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class XX extends As{constructor(e,n){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,p=null,m=null,v=null;const w=n.getContextAttributes();let x=null,g=null;const _=[],y=[],M=new xn;M.layers.enable(1),M.viewport=new on;const E=new xn;E.layers.enable(2),E.viewport=new on;const C=[M,E],P=new FD;P.layers.enable(1),P.layers.enable(2);let N=null,R=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let Z=_[j];return Z===void 0&&(Z=new i2,_[j]=Z),Z.getTargetRaySpace()},this.getControllerGrip=function(j){let Z=_[j];return Z===void 0&&(Z=new i2,_[j]=Z),Z.getGripSpace()},this.getHand=function(j){let Z=_[j];return Z===void 0&&(Z=new i2,_[j]=Z),Z.getHandSpace()};function L(j){const Z=y.indexOf(j.inputSource);if(Z===-1)return;const re=_[Z];re!==void 0&&(re.update(j.inputSource,j.frame,c||o),re.dispatchEvent({type:j.type,data:j.inputSource}))}function k(){r.removeEventListener("select",L),r.removeEventListener("selectstart",L),r.removeEventListener("selectend",L),r.removeEventListener("squeeze",L),r.removeEventListener("squeezestart",L),r.removeEventListener("squeezeend",L),r.removeEventListener("end",k),r.removeEventListener("inputsourceschange",$);for(let j=0;j<_.length;j++){const Z=y[j];Z!==null&&(y[j]=null,_[j].disconnect(Z))}N=null,R=null,e.setRenderTarget(x),m=null,p=null,f=null,r=null,g=null,W.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(j){s=j,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(j){a=j,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(j){c=j},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return f},this.getFrame=function(){return v},this.getSession=function(){return r},this.setSession=async function(j){if(r=j,r!==null){if(x=e.getRenderTarget(),r.addEventListener("select",L),r.addEventListener("selectstart",L),r.addEventListener("selectend",L),r.addEventListener("squeeze",L),r.addEventListener("squeezestart",L),r.addEventListener("squeezeend",L),r.addEventListener("end",k),r.addEventListener("inputsourceschange",$),w.xrCompatible!==!0&&await n.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const Z={antialias:r.renderState.layers===void 0?w.antialias:!0,alpha:!0,depth:w.depth,stencil:w.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,n,Z),r.updateRenderState({baseLayer:m}),g=new Fn(m.framebufferWidth,m.framebufferHeight,{format:Mr,type:Si,colorSpace:e.outputColorSpace,stencilBuffer:w.stencil})}else{let Z=null,re=null,ue=null;w.depth&&(ue=w.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,Z=w.stencil?yl:fl,re=w.stencil?ua:So);const ve={colorFormat:n.RGBA8,depthFormat:ue,scaleFactor:s};f=new XRWebGLBinding(r,n),p=f.createProjectionLayer(ve),r.updateRenderState({layers:[p]}),g=new Fn(p.textureWidth,p.textureHeight,{format:Mr,type:Si,depthTexture:new ME(p.textureWidth,p.textureHeight,re,void 0,void 0,void 0,void 0,void 0,void 0,Z),stencilBuffer:w.stencil,colorSpace:e.outputColorSpace,samples:w.antialias?4:0});const Re=e.properties.get(g);Re.__ignoreDepthValues=p.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),W.setContext(r),W.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function $(j){for(let Z=0;Z<j.removed.length;Z++){const re=j.removed[Z],ue=y.indexOf(re);ue>=0&&(y[ue]=null,_[ue].disconnect(re))}for(let Z=0;Z<j.added.length;Z++){const re=j.added[Z];let ue=y.indexOf(re);if(ue===-1){for(let Re=0;Re<_.length;Re++)if(Re>=y.length){y.push(re),ue=Re;break}else if(y[Re]===null){y[Re]=re,ue=Re;break}if(ue===-1)break}const ve=_[ue];ve&&ve.connect(re)}}const ee=new G,D=new G;function U(j,Z,re){ee.setFromMatrixPosition(Z.matrixWorld),D.setFromMatrixPosition(re.matrixWorld);const ue=ee.distanceTo(D),ve=Z.projectionMatrix.elements,Re=re.projectionMatrix.elements,Le=ve[14]/(ve[10]-1),ze=ve[14]/(ve[10]+1),Qe=(ve[9]+1)/ve[5],Ze=(ve[9]-1)/ve[5],Me=(ve[8]-1)/ve[0],Q=(Re[8]+1)/Re[0],ge=Le*Me,de=Le*Q,Ae=ue/(-Me+Q),xe=Ae*-Me;Z.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(xe),j.translateZ(Ae),j.matrixWorld.compose(j.position,j.quaternion,j.scale),j.matrixWorldInverse.copy(j.matrixWorld).invert();const Fe=Le+Ae,Ge=ze+Ae,We=ge-xe,ot=de+(ue-xe),rt=Qe*ze/Ge*Fe,Xt=Ze*ze/Ge*Fe;j.projectionMatrix.makePerspective(We,ot,rt,Xt,Fe,Ge),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}function z(j,Z){Z===null?j.matrixWorld.copy(j.matrix):j.matrixWorld.multiplyMatrices(Z.matrixWorld,j.matrix),j.matrixWorldInverse.copy(j.matrixWorld).invert()}this.updateCamera=function(j){if(r===null)return;P.near=E.near=M.near=j.near,P.far=E.far=M.far=j.far,(N!==P.near||R!==P.far)&&(r.updateRenderState({depthNear:P.near,depthFar:P.far}),N=P.near,R=P.far);const Z=j.parent,re=P.cameras;z(P,Z);for(let ue=0;ue<re.length;ue++)z(re[ue],Z);re.length===2?U(P,M,E):P.projectionMatrix.copy(M.projectionMatrix),Y(j,P,Z)};function Y(j,Z,re){re===null?j.matrix.copy(Z.matrixWorld):(j.matrix.copy(re.matrixWorld),j.matrix.invert(),j.matrix.multiply(Z.matrixWorld)),j.matrix.decompose(j.position,j.quaternion,j.scale),j.updateMatrixWorld(!0),j.projectionMatrix.copy(Z.projectionMatrix),j.projectionMatrixInverse.copy(Z.projectionMatrixInverse),j.isPerspectiveCamera&&(j.fov=jf*2*Math.atan(1/j.projectionMatrix.elements[5]),j.zoom=1)}this.getCamera=function(){return P},this.getFoveation=function(){if(!(p===null&&m===null))return l},this.setFoveation=function(j){l=j,p!==null&&(p.fixedFoveation=j),m!==null&&m.fixedFoveation!==void 0&&(m.fixedFoveation=j)};let O=null;function H(j,Z){if(u=Z.getViewerPose(c||o),v=Z,u!==null){const re=u.views;m!==null&&(e.setRenderTargetFramebuffer(g,m.framebuffer),e.setRenderTarget(g));let ue=!1;re.length!==P.cameras.length&&(P.cameras.length=0,ue=!0);for(let ve=0;ve<re.length;ve++){const Re=re[ve];let Le=null;if(m!==null)Le=m.getViewport(Re);else{const Qe=f.getViewSubImage(p,Re);Le=Qe.viewport,ve===0&&(e.setRenderTargetTextures(g,Qe.colorTexture,p.ignoreDepthValues?void 0:Qe.depthStencilTexture),e.setRenderTarget(g))}let ze=C[ve];ze===void 0&&(ze=new xn,ze.layers.enable(ve),ze.viewport=new on,C[ve]=ze),ze.matrix.fromArray(Re.transform.matrix),ze.matrix.decompose(ze.position,ze.quaternion,ze.scale),ze.projectionMatrix.fromArray(Re.projectionMatrix),ze.projectionMatrixInverse.copy(ze.projectionMatrix).invert(),ze.viewport.set(Le.x,Le.y,Le.width,Le.height),ve===0&&(P.matrix.copy(ze.matrix),P.matrix.decompose(P.position,P.quaternion,P.scale)),ue===!0&&P.cameras.push(ze)}}for(let re=0;re<_.length;re++){const ue=y[re],ve=_[re];ue!==null&&ve!==void 0&&ve.update(ue,Z,c||o)}O&&O(j,Z),Z.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:Z}),v=null}const W=new PD;W.setAnimationLoop(H),this.setAnimationLoop=function(j){O=j},this.dispose=function(){}}}function JX(t,e){function n(x,g){x.matrixAutoUpdate===!0&&x.updateMatrix(),g.value.copy(x.matrix)}function i(x,g){g.color.getRGB(x.fogColor.value,TD(t)),g.isFog?(x.fogNear.value=g.near,x.fogFar.value=g.far):g.isFogExp2&&(x.fogDensity.value=g.density)}function r(x,g,_,y,M){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(x,g):g.isMeshToonMaterial?(s(x,g),f(x,g)):g.isMeshPhongMaterial?(s(x,g),u(x,g)):g.isMeshStandardMaterial?(s(x,g),p(x,g),g.isMeshPhysicalMaterial&&m(x,g,M)):g.isMeshMatcapMaterial?(s(x,g),v(x,g)):g.isMeshDepthMaterial?s(x,g):g.isMeshDistanceMaterial?(s(x,g),w(x,g)):g.isMeshNormalMaterial?s(x,g):g.isLineBasicMaterial?(o(x,g),g.isLineDashedMaterial&&a(x,g)):g.isPointsMaterial?l(x,g,_,y):g.isSpriteMaterial?c(x,g):g.isShadowMaterial?(x.color.value.copy(g.color),x.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(x,g){x.opacity.value=g.opacity,g.color&&x.diffuse.value.copy(g.color),g.emissive&&x.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(x.map.value=g.map,n(g.map,x.mapTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,n(g.alphaMap,x.alphaMapTransform)),g.bumpMap&&(x.bumpMap.value=g.bumpMap,n(g.bumpMap,x.bumpMapTransform),x.bumpScale.value=g.bumpScale,g.side===ci&&(x.bumpScale.value*=-1)),g.normalMap&&(x.normalMap.value=g.normalMap,n(g.normalMap,x.normalMapTransform),x.normalScale.value.copy(g.normalScale),g.side===ci&&x.normalScale.value.negate()),g.displacementMap&&(x.displacementMap.value=g.displacementMap,n(g.displacementMap,x.displacementMapTransform),x.displacementScale.value=g.displacementScale,x.displacementBias.value=g.displacementBias),g.emissiveMap&&(x.emissiveMap.value=g.emissiveMap,n(g.emissiveMap,x.emissiveMapTransform)),g.specularMap&&(x.specularMap.value=g.specularMap,n(g.specularMap,x.specularMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest);const _=e.get(g).envMap;if(_&&(x.envMap.value=_,x.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,x.reflectivity.value=g.reflectivity,x.ior.value=g.ior,x.refractionRatio.value=g.refractionRatio),g.lightMap){x.lightMap.value=g.lightMap;const y=t._useLegacyLights===!0?Math.PI:1;x.lightMapIntensity.value=g.lightMapIntensity*y,n(g.lightMap,x.lightMapTransform)}g.aoMap&&(x.aoMap.value=g.aoMap,x.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,x.aoMapTransform))}function o(x,g){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,g.map&&(x.map.value=g.map,n(g.map,x.mapTransform))}function a(x,g){x.dashSize.value=g.dashSize,x.totalSize.value=g.dashSize+g.gapSize,x.scale.value=g.scale}function l(x,g,_,y){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.size.value=g.size*_,x.scale.value=y*.5,g.map&&(x.map.value=g.map,n(g.map,x.uvTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,n(g.alphaMap,x.alphaMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest)}function c(x,g){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.rotation.value=g.rotation,g.map&&(x.map.value=g.map,n(g.map,x.mapTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,n(g.alphaMap,x.alphaMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest)}function u(x,g){x.specular.value.copy(g.specular),x.shininess.value=Math.max(g.shininess,1e-4)}function f(x,g){g.gradientMap&&(x.gradientMap.value=g.gradientMap)}function p(x,g){x.metalness.value=g.metalness,g.metalnessMap&&(x.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,x.metalnessMapTransform)),x.roughness.value=g.roughness,g.roughnessMap&&(x.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,x.roughnessMapTransform)),e.get(g).envMap&&(x.envMapIntensity.value=g.envMapIntensity)}function m(x,g,_){x.ior.value=g.ior,g.sheen>0&&(x.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),x.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(x.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,x.sheenColorMapTransform)),g.sheenRoughnessMap&&(x.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,x.sheenRoughnessMapTransform))),g.clearcoat>0&&(x.clearcoat.value=g.clearcoat,x.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(x.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,x.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(x.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,x.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(x.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,x.clearcoatNormalMapTransform),x.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===ci&&x.clearcoatNormalScale.value.negate())),g.iridescence>0&&(x.iridescence.value=g.iridescence,x.iridescenceIOR.value=g.iridescenceIOR,x.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],x.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(x.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,x.iridescenceMapTransform)),g.iridescenceThicknessMap&&(x.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,x.iridescenceThicknessMapTransform))),g.transmission>0&&(x.transmission.value=g.transmission,x.transmissionSamplerMap.value=_.texture,x.transmissionSamplerSize.value.set(_.width,_.height),g.transmissionMap&&(x.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,x.transmissionMapTransform)),x.thickness.value=g.thickness,g.thicknessMap&&(x.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,x.thicknessMapTransform)),x.attenuationDistance.value=g.attenuationDistance,x.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(x.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(x.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,x.anisotropyMapTransform))),x.specularIntensity.value=g.specularIntensity,x.specularColor.value.copy(g.specularColor),g.specularColorMap&&(x.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,x.specularColorMapTransform)),g.specularIntensityMap&&(x.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,x.specularIntensityMapTransform))}function v(x,g){g.matcap&&(x.matcap.value=g.matcap)}function w(x,g){const _=e.get(g).light;x.referencePosition.value.setFromMatrixPosition(_.matrixWorld),x.nearDistance.value=_.shadow.camera.near,x.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function KX(t,e,n,i){let r={},s={},o=[];
3647const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(_,y){const M=y.program;i.uniformBlockBinding(_,M)}function c(_,y){let M=r[_.id];M===void 0&&(v(_),M=u(_),r[_.id]=M,_.addEventListener("dispose",x));const E=y.program;i.updateUBOMapping(_,E);const C=e.render.frame;s[_.id]!==C&&(p(_),s[_.id]=C)}function u(_){const y=f();_.__bindingPointIndex=y;const M=t.createBuffer(),E=_.__size,C=_.usage;return t.bindBuffer(t.UNIFORM_BUFFER,M),t.bufferData(t.UNIFORM_BUFFER,E,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,y,M),M}function f(){for(let _=0;_<a;_++)if(o.indexOf(_)===-1)return o.push(_),_;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(_){const y=r[_.id],M=_.uniforms,E=_.__cache;t.bindBuffer(t.UNIFORM_BUFFER,y);for(let C=0,P=M.length;C<P;C++){const N=M[C];if(m(N,C,E)===!0){const R=N.__offset,L=Array.isArray(N.value)?N.value:[N.value];let k=0;for(let $=0;$<L.length;$++){const ee=L[$],D=w(ee);typeof ee=="number"?(N.__data[0]=ee,t.bufferSubData(t.UNIFORM_BUFFER,R+k,N.__data)):ee.isMatrix3?(N.__data[0]=ee.elements[0],N.__data[1]=ee.elements[1],N.__data[2]=ee.elements[2],N.__data[3]=ee.elements[0],N.__data[4]=ee.elements[3],N.__data[5]=ee.elements[4],N.__data[6]=ee.elements[5],N.__data[7]=ee.elements[0],N.__data[8]=ee.elements[6],N.__data[9]=ee.elements[7],N.__data[10]=ee.elements[8],N.__data[11]=ee.elements[0]):(ee.toArray(N.__data,k),k+=D.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,R,N.__data)}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function m(_,y,M){const E=_.value;if(M[y]===void 0){if(typeof E=="number")M[y]=E;else{const C=Array.isArray(E)?E:[E],P=[];for(let N=0;N<C.length;N++)P.push(C[N].clone());M[y]=P}return!0}else if(typeof E=="number"){if(M[y]!==E)return M[y]=E,!0}else{const C=Array.isArray(M[y])?M[y]:[M[y]],P=Array.isArray(E)?E:[E];for(let N=0;N<C.length;N++){const R=C[N];if(R.equals(P[N])===!1)return R.copy(P[N]),!0}}return!1}function v(_){const y=_.uniforms;let M=0;const E=16;let C=0;for(let P=0,N=y.length;P<N;P++){const R=y[P],L={boundary:0,storage:0},k=Array.isArray(R.value)?R.value:[R.value];for(let $=0,ee=k.length;$<ee;$++){const D=k[$],U=w(D);L.boundary+=U.boundary,L.storage+=U.storage}if(R.__data=new Float32Array(L.storage/Float32Array.BYTES_PER_ELEMENT),R.__offset=M,P>0){C=M%E;const $=E-C;C!==0&&$-L.boundary<0&&(M+=E-C,R.__offset=M)}M+=L.storage}return C=M%E,C>0&&(M+=E-C),_.__size=M,_.__cache={},this}function w(_){const y={boundary:0,storage:0};return typeof _=="number"?(y.boundary=4,y.storage=4):_.isVector2?(y.boundary=8,y.storage=8):_.isVector3||_.isColor?(y.boundary=16,y.storage=12):_.isVector4?(y.boundary=16,y.storage=16):_.isMatrix3?(y.boundary=48,y.storage=48):_.isMatrix4?(y.boundary=64,y.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),y}function x(_){const y=_.target;y.removeEventListener("dispose",x);const M=o.indexOf(y.__bindingPointIndex);o.splice(M,1),t.deleteBuffer(r[y.id]),delete r[y.id],delete s[y.id]}function g(){for(const _ in r)t.deleteBuffer(r[_]);o=[],r={},s={}}return{bind:l,update:c,dispose:g}}class EE{constructor(e={}){const{canvas:n=AD(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let p;i!==null?p=i.getContextAttributes().alpha:p=o;const m=new Uint32Array(4),v=new Int32Array(4);let w=null,x=null;const g=[],_=[];this.domElement=n,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=jt,this._useLegacyLights=!1,this.toneMapping=Js,this.toneMappingExposure=1;const y=this;let M=!1,E=0,C=0,P=null,N=-1,R=null;const L=new on,k=new on;let $=null;const ee=new He(0);let D=0,U=n.width,z=n.height,Y=1,O=null,H=null;const W=new on(0,0,U,z),j=new on(0,0,U,z);let Z=!1;const re=new wy;let ue=!1,ve=!1,Re=null;const Le=new Et,ze=new le,Qe=new G,Ze={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Me(){return P===null?Y:1}let Q=i;function ge(V,ie){for(let pe=0;pe<V.length;pe++){const oe=V[pe],he=n.getContext(oe,ie);if(he!==null)return he}return null}try{const V={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${Tl}`),n.addEventListener("webglcontextlost",Se,!1),n.addEventListener("webglcontextrestored",Te,!1),n.addEventListener("webglcontextcreationerror",De,!1),Q===null){const ie=["webgl2","webgl","experimental-webgl"];
vendor: 5,645 bytes, line 3647
3647if(y.isWebGL1Renderer===!0&&ie.shift(),Q=ge(ie,V),Q===null)throw ge(ie)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext<"u"&&Q instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),Q.getShaderPrecisionFormat===void 0&&(Q.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(V){throw console.error("THREE.WebGLRenderer: "+V.message),V}let de,Ae,xe,Fe,Ge,We,ot,rt,Xt,X,F,se,be,ye,Ee,et,Pe,Oe,mt,Bt,Ce,xt,q,fe;function we(){de=new uW(Q),Ae=new rW(Q,de,e),de.init(Ae),xt=new DD(Q,de,Ae),xe=new VX(Q,de,Ae),Fe=new dW(Q),Ge=new BX,We=new jX(Q,de,xe,Ge,Ae,xt,Fe),ot=new oW(y),rt=new cW(y),Xt=new AG(Q,Ae),q=new nW(Q,de,Xt,Ae),X=new fW(Q,Xt,Fe,q),F=new vW(Q,X,Xt,Fe),mt=new gW(Q,Ae,We),et=new sW(Ge),se=new PX(y,ot,rt,de,Ae,q,et),be=new JX(y,Ge),ye=new IX,Ee=new kX(de,Ae),Oe=new tW(y,ot,rt,xe,F,p,l),Pe=new GX(y,F,Ae),fe=new KX(Q,Fe,Ae,xe),Bt=new iW(Q,de,Fe,Ae),Ce=new hW(Q,de,Fe,Ae),Fe.programs=se.programs,y.capabilities=Ae,y.extensions=de,y.properties=Ge,y.renderLists=ye,y.shadowMap=Pe,y.state=xe,y.info=Fe}we();const J=new XX(y,Q);this.xr=J,this.getContext=function(){return Q},this.getContextAttributes=function(){return Q.getContextAttributes()},this.forceContextLoss=function(){const V=de.get("WEBGL_lose_context");V&&V.loseContext()},this.forceContextRestore=function(){const V=de.get("WEBGL_lose_context");V&&V.restoreContext()},this.getPixelRatio=function(){return Y},this.setPixelRatio=function(V){V!==void 0&&(Y=V,this.setSize(U,z,!1))},this.getSize=function(V){return V.set(U,z)},this.setSize=function(V,ie,pe=!0){if(J.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}U=V,z=ie,n.width=Math.floor(V*Y),n.height=Math.floor(ie*Y),pe===!0&&(n.style.width=V+"px",n.style.height=ie+"px"),this.setViewport(0,0,V,ie)},this.getDrawingBufferSize=function(V){return V.set(U*Y,z*Y).floor()},this.setDrawingBufferSize=function(V,ie,pe){U=V,z=ie,Y=pe,n.width=Math.floor(V*pe),n.height=Math.floor(ie*pe),this.setViewport(0,0,V,ie)},this.getCurrentViewport=function(V){return V.copy(L)},this.getViewport=function(V){return V.copy(W)},this.setViewport=function(V,ie,pe,oe){V.isVector4?W.set(V.x,V.y,V.z,V.w):W.set(V,ie,pe,oe),xe.viewport(L.copy(W).multiplyScalar(Y).floor())},this.getScissor=function(V){return V.copy(j)},this.setScissor=function(V,ie,pe,oe){V.isVector4?j.set(V.x,V.y,V.z,V.w):j.set(V,ie,pe,oe),xe.scissor(k.copy(j).multiplyScalar(Y).floor())},this.getScissorTest=function(){return Z},this.setScissorTest=function(V){xe.setScissorTest(Z=V)},this.setOpaqueSort=function(V){O=V},this.setTransparentSort=function(V){H=V},this.getClearColor=function(V){return V.copy(Oe.getClearColor())},this.setClearColor=function(){Oe.setClearColor.apply(Oe,arguments)},this.getClearAlpha=function(){return Oe.getClearAlpha()},this.setClearAlpha=function(){Oe.setClearAlpha.apply(Oe,arguments)},this.clear=function(V=!0,ie=!0,pe=!0){let oe=0;if(V){let he=!1;if(P!==null){const $e=P.texture.format;he=$e===dE||$e===hE||$e===fE}if(he){const $e=P.texture.type,pt=$e===Si||$e===So||$e===vy||$e===ua||$e===cE||$e===uE,wt=Oe.getClearColor(),At=Oe.getClearAlpha(),qe=wt.r,ct=wt.g,Mt=wt.b;pt?(m[0]=qe,m[1]=ct,m[2]=Mt,m[3]=At,Q.clearBufferuiv(Q.COLOR,0,m)):(v[0]=qe,v[1]=ct,v[2]=Mt,v[3]=At,Q.clearBufferiv(Q.COLOR,0,v))}else oe|=Q.COLOR_BUFFER_BIT}ie&&(oe|=Q.DEPTH_BUFFER_BIT),pe&&(oe|=Q.STENCIL_BUFFER_BIT),Q.clear(oe)},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(){n.removeEventListener("webglcontextlost",Se,!1),n.removeEventListener("webglcontextrestored",Te,!1),n.removeEventListener("webglcontextcreationerror",De,!1),ye.dispose(),Ee.dispose(),Ge.dispose(),ot.dispose(),rt.dispose(),F.dispose(),q.dispose(),fe.dispose(),se.dispose(),J.dispose(),J.removeEventListener("sessionstart",Ne),J.removeEventListener("sessionend",gt),Re&&(Re.dispose(),Re=null),Jt.stop()};function Se(V){V.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function Te(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;const V=Fe.autoReset,ie=Pe.enabled,pe=Pe.autoUpdate,oe=Pe.needsUpdate,he=Pe.type;we(),Fe.autoReset=V,Pe.enabled=ie,Pe.autoUpdate=pe,Pe.needsUpdate=oe,Pe.type=he}function De(V){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",V.statusMessage)}function ke(V){const ie=V.target;ie.removeEventListener("dispose",ke),_e(ie)}function _e(V){Ke(V),Ge.remove(V)}function Ke(V){const ie=Ge.get(V).programs;ie!==void 0&&(ie.forEach(function(pe){se.releaseProgram(pe)}),V.isShaderMaterial&&se.releaseShaderCache(V))}this.renderBufferDirect=function(V,ie,pe,oe,he,$e){ie===null&&(ie=Ze);const pt=he.isMesh&&he.matrixWorld.determinant()<0,wt=gr(V,ie,pe,oe,he);xe.setMaterial(oe,pt);let At=pe.index,qe=1;if(oe.wireframe===!0){if(At=X.getWireframeAttribute(pe),At===void 0)return;qe=2}const ct=pe.drawRange,Mt=pe.attributes.position;let en=ct.start*qe,hn=(ct.start+ct.count)*qe;$e!==null&&(en=Math.max(en,$e.start*qe),hn=Math.min(hn,($e.start+$e.count)*qe)),At!==null?(en=Math.max(en,0),hn=Math.min(hn,At.count)):Mt!=null&&(en=Math.max(en,0),hn=Math.min(hn,Mt.count));const pi=hn-en;if(pi<0||pi===1/0)return;q.setup(he,oe,wt,pe,At);let Lr,dn=Bt;if(At!==null&&(Lr=Xt.get(At),dn=Ce,dn.setIndex(Lr)),he.isMesh)oe.wireframe===!0?(xe.setLineWidth(oe.wireframeLinewidth*Me()),dn.setMode(Q.LINES)):dn.setMode(Q.TRIANGLES);
vendor: 65,290 bytes, line 3647
3647else if(he.isLine){let bt=oe.linewidth;bt===void 0&&(bt=1),xe.setLineWidth(bt*Me()),he.isLineSegments?dn.setMode(Q.LINES):he.isLineLoop?dn.setMode(Q.LINE_LOOP):dn.setMode(Q.LINE_STRIP)}else he.isPoints?dn.setMode(Q.POINTS):he.isSprite&&dn.setMode(Q.TRIANGLES);if(he.isInstancedMesh)dn.renderInstances(en,pi,he.count);else if(pe.isInstancedBufferGeometry){const bt=pe._maxInstanceCount!==void 0?pe._maxInstanceCount:1/0,ln=Math.min(pe.instanceCount,bt);dn.renderInstances(en,pi,ln)}else dn.render(en,pi)},this.compile=function(V,ie){function pe(oe,he,$e){oe.transparent===!0&&oe.side===ji&&oe.forceSinglePass===!1?(oe.side=ci,oe.needsUpdate=!0,an(oe,he,$e),oe.side=Qs,oe.needsUpdate=!0,an(oe,he,$e),oe.side=ji):an(oe,he,$e)}x=Ee.get(V),x.init(),_.push(x),V.traverseVisible(function(oe){oe.isLight&&oe.layers.test(ie.layers)&&(x.pushLight(oe),oe.castShadow&&x.pushShadow(oe))}),x.setupLights(y._useLegacyLights),V.traverse(function(oe){const he=oe.material;if(he)if(Array.isArray(he))for(let $e=0;$e<he.length;$e++){const pt=he[$e];pe(pt,V,oe)}else pe(he,V,oe)}),_.pop(),x=null};let Xe=null;function Nt(V){Xe&&Xe(V)}function Ne(){Jt.stop()}function gt(){Jt.start()}const Jt=new PD;Jt.setAnimationLoop(Nt),typeof self<"u"&&Jt.setContext(self),this.setAnimationLoop=function(V){Xe=V,J.setAnimationLoop(V),V===null?Jt.stop():Jt.start()},J.addEventListener("sessionstart",Ne),J.addEventListener("sessionend",gt),this.render=function(V,ie){if(ie!==void 0&&ie.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(M===!0)return;V.matrixWorldAutoUpdate===!0&&V.updateMatrixWorld(),ie.parent===null&&ie.matrixWorldAutoUpdate===!0&&ie.updateMatrixWorld(),J.enabled===!0&&J.isPresenting===!0&&(J.cameraAutoUpdate===!0&&J.updateCamera(ie),ie=J.getCamera()),V.isScene===!0&&V.onBeforeRender(y,V,ie,P),x=Ee.get(V,_.length),x.init(),_.push(x),Le.multiplyMatrices(ie.projectionMatrix,ie.matrixWorldInverse),re.setFromProjectionMatrix(Le),ve=this.localClippingEnabled,ue=et.init(this.clippingPlanes,ve),w=ye.get(V,g.length),w.init(),g.push(w),$r(V,ie,0,y.sortObjects),w.finish(),y.sortObjects===!0&&w.sort(O,H),this.info.render.frame++,ue===!0&&et.beginShadows();const pe=x.state.shadowsArray;if(Pe.render(pe,V,ie),ue===!0&&et.endShadows(),this.info.autoReset===!0&&this.info.reset(),Oe.render(w,V),x.setupLights(y._useLegacyLights),ie.isArrayCamera){const oe=ie.cameras;for(let he=0,$e=oe.length;he<$e;he++){const pt=oe[he];Ve(w,V,pt,pt.viewport)}}else Ve(w,V,ie);P!==null&&(We.updateMultisampleRenderTarget(P),We.updateRenderTargetMipmap(P)),V.isScene===!0&&V.onAfterRender(y,V,ie),q.resetDefaultState(),N=-1,R=null,_.pop(),_.length>0?x=_[_.length-1]:x=null,g.pop(),g.length>0?w=g[g.length-1]:w=null};function $r(V,ie,pe,oe){if(V.visible===!1)return;if(V.layers.test(ie.layers)){if(V.isGroup)pe=V.renderOrder;else if(V.isLOD)V.autoUpdate===!0&&V.update(ie);else if(V.isLight)x.pushLight(V),V.castShadow&&x.pushShadow(V);else if(V.isSprite){if(!V.frustumCulled||re.intersectsSprite(V)){oe&&Qe.setFromMatrixPosition(V.matrixWorld).applyMatrix4(Le);const pt=F.update(V),wt=V.material;wt.visible&&w.push(V,pt,wt,pe,Qe.z,null)}}else if((V.isMesh||V.isLine||V.isPoints)&&(!V.frustumCulled||re.intersectsObject(V))){const pt=F.update(V),wt=V.material;if(oe&&(V.boundingSphere!==void 0?(V.boundingSphere===null&&V.computeBoundingSphere(),Qe.copy(V.boundingSphere.center)):(pt.boundingSphere===null&&pt.computeBoundingSphere(),Qe.copy(pt.boundingSphere.center)),Qe.applyMatrix4(V.matrixWorld).applyMatrix4(Le)),Array.isArray(wt)){const At=pt.groups;for(let qe=0,ct=At.length;qe<ct;qe++){const Mt=At[qe],en=wt[Mt.materialIndex];en&&en.visible&&w.push(V,pt,en,pe,Qe.z,Mt)}}else wt.visible&&w.push(V,pt,wt,pe,Qe.z,null)}}const $e=V.children;for(let pt=0,wt=$e.length;pt<wt;pt++)$r($e[pt],ie,pe,oe)}function Ve(V,ie,pe,oe){const he=V.opaque,$e=V.transmissive,pt=V.transparent;x.setupLightsView(pe),ue===!0&&et.setGlobalState(y.clippingPlanes,pe),$e.length>0&&ht(he,$e,ie,pe),oe&&xe.viewport(L.copy(oe)),he.length>0&&at(he,ie,pe),$e.length>0&&at($e,ie,pe),pt.length>0&&at(pt,ie,pe),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function ht(V,ie,pe,oe){const he=Ae.isWebGL2;Re===null&&(Re=new Fn(1,1,{generateMipmaps:!0,type:de.has("EXT_color_buffer_half_float")?Dc:Si,minFilter:Po,samples:he?4:0})),y.getDrawingBufferSize(ze),he?Re.setSize(ze.x,ze.y):Re.setSize($v(ze.x),$v(ze.y));const $e=y.getRenderTarget();y.setRenderTarget(Re),y.getClearColor(ee),D=y.getClearAlpha(),D<1&&y.setClearColor(16777215,.5),y.clear();const pt=y.toneMapping;y.toneMapping=Js,at(V,pe,oe),We.updateMultisampleRenderTarget(Re),We.updateRenderTargetMipmap(Re);let wt=!1;for(let At=0,qe=ie.length;At<qe;At++){const ct=ie[At],Mt=ct.object,en=ct.geometry,hn=ct.material,pi=ct.group;if(hn.side===ji&&Mt.layers.test(oe.layers)){const Lr=hn.side;hn.side=ci,hn.needsUpdate=!0,qt(Mt,pe,oe,en,hn,pi),hn.side=Lr,hn.needsUpdate=!0,wt=!0}}wt===!0&&(We.updateMultisampleRenderTarget(Re),We.updateRenderTargetMipmap(Re)),y.setRenderTarget($e),y.setClearColor(ee,D),y.toneMapping=pt}function at(V,ie,pe){const oe=ie.isScene===!0?ie.overrideMaterial:null;for(let he=0,$e=V.length;he<$e;he++){const pt=V[he],wt=pt.object,At=pt.geometry,qe=oe===null?pt.material:oe,ct=pt.group;wt.layers.test(pe.layers)&&qt(wt,ie,pe,At,qe,ct)}}function qt(V,ie,pe,oe,he,$e){V.onBeforeRender(y,ie,pe,oe,he,$e),V.modelViewMatrix.multiplyMatrices(pe.matrixWorldInverse,V.matrixWorld),V.normalMatrix.getNormalMatrix(V.modelViewMatrix),he.onBeforeRender(y,ie,pe,oe,V,$e),he.transparent===!0&&he.side===ji&&he.forceSinglePass===!1?(he.side=ci,he.needsUpdate=!0,y.renderBufferDirect(pe,ie,oe,he,V,$e),he.side=Qs,he.needsUpdate=!0,y.renderBufferDirect(pe,ie,oe,he,V,$e),he.side=ji):y.renderBufferDirect(pe,ie,oe,he,V,$e),V.onAfterRender(y,ie,pe,oe,he,$e)}function an(V,ie,pe){ie.isScene!==!0&&(ie=Ze);const oe=Ge.get(V),he=x.state.lights,$e=x.state.shadowsArray,pt=he.state.version,wt=se.getParameters(V,he.state,$e,ie,pe),At=se.getProgramCacheKey(wt);let qe=oe.programs;oe.environment=V.isMeshStandardMaterial?ie.environment:null,oe.fog=ie.fog,oe.envMap=(V.isMeshStandardMaterial?rt:ot).get(V.envMap||oe.environment),qe===void 0&&(V.addEventListener("dispose",ke),qe=new Map,oe.programs=qe);let ct=qe.get(At);if(ct!==void 0){if(oe.currentProgram===ct&&oe.lightsStateVersion===pt)return qi(V,wt),ct}else wt.uniforms=se.getUniforms(V),V.onBuild(pe,wt,y),V.onBeforeCompile(wt,y),ct=se.acquireProgram(wt,At),qe.set(At,ct),oe.uniforms=wt.uniforms;const Mt=oe.uniforms;(!V.isShaderMaterial&&!V.isRawShaderMaterial||V.clipping===!0)&&(Mt.clippingPlanes=et.uniform),qi(V,wt),oe.needsLights=Li(V),oe.lightsStateVersion=pt,oe.needsLights&&(Mt.ambientLightColor.value=he.state.ambient,Mt.lightProbe.value=he.state.probe,Mt.directionalLights.value=he.state.directional,Mt.directionalLightShadows.value=he.state.directionalShadow,Mt.spotLights.value=he.state.spot,Mt.spotLightShadows.value=he.state.spotShadow,Mt.rectAreaLights.value=he.state.rectArea,Mt.ltc_1.value=he.state.rectAreaLTC1,Mt.ltc_2.value=he.state.rectAreaLTC2,Mt.pointLights.value=he.state.point,Mt.pointLightShadows.value=he.state.pointShadow,Mt.hemisphereLights.value=he.state.hemi,Mt.directionalShadowMap.value=he.state.directionalShadowMap,Mt.directionalShadowMatrix.value=he.state.directionalShadowMatrix,Mt.spotShadowMap.value=he.state.spotShadowMap,Mt.spotLightMatrix.value=he.state.spotLightMatrix,Mt.spotLightMap.value=he.state.spotLightMap,Mt.pointShadowMap.value=he.state.pointShadowMap,Mt.pointShadowMatrix.value=he.state.pointShadowMatrix);const en=ct.getUniforms(),hn=lv.seqWithValue(en.seq,Mt);return oe.currentProgram=ct,oe.uniformsList=hn,ct}function qi(V,ie){const pe=Ge.get(V);pe.outputColorSpace=ie.outputColorSpace,pe.instancing=ie.instancing,pe.instancingColor=ie.instancingColor,pe.skinning=ie.skinning,pe.morphTargets=ie.morphTargets,pe.morphNormals=ie.morphNormals,pe.morphColors=ie.morphColors,pe.morphTargetsCount=ie.morphTargetsCount,pe.numClippingPlanes=ie.numClippingPlanes,pe.numIntersection=ie.numClipIntersection,pe.vertexAlphas=ie.vertexAlphas,pe.vertexTangents=ie.vertexTangents,pe.toneMapping=ie.toneMapping}function gr(V,ie,pe,oe,he){ie.isScene!==!0&&(ie=Ze),We.resetTextureUnits();const $e=ie.fog,pt=oe.isMeshStandardMaterial?ie.environment:null,wt=P===null?y.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:ws,At=(oe.isMeshStandardMaterial?rt:ot).get(oe.envMap||pt),qe=oe.vertexColors===!0&&!!pe.attributes.color&&pe.attributes.color.itemSize===4,ct=!!pe.attributes.tangent&&(!!oe.normalMap||oe.anisotropy>0),Mt=!!pe.morphAttributes.position,en=!!pe.morphAttributes.normal,hn=!!pe.morphAttributes.color;let pi=Js;oe.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(pi=y.toneMapping);const Lr=pe.morphAttributes.position||pe.morphAttributes.normal||pe.morphAttributes.color,dn=Lr!==void 0?Lr.length:0,bt=Ge.get(oe),ln=x.state.lights;if(ue===!0&&(ve===!0||V!==R)){const Ni=V===R&&oe.id===N;et.setState(oe,V,Ni)}let Tt=!1;oe.version===bt.__version?(bt.needsLights&&bt.lightsStateVersion!==ln.state.version||bt.outputColorSpace!==wt||he.isInstancedMesh&&bt.instancing===!1||!he.isInstancedMesh&&bt.instancing===!0||he.isSkinnedMesh&&bt.skinning===!1||!he.isSkinnedMesh&&bt.skinning===!0||he.isInstancedMesh&&bt.instancingColor===!0&&he.instanceColor===null||he.isInstancedMesh&&bt.instancingColor===!1&&he.instanceColor!==null||bt.envMap!==At||oe.fog===!0&&bt.fog!==$e||bt.numClippingPlanes!==void 0&&(bt.numClippingPlanes!==et.numPlanes||bt.numIntersection!==et.numIntersection)||bt.vertexAlphas!==qe||bt.vertexTangents!==ct||bt.morphTargets!==Mt||bt.morphNormals!==en||bt.morphColors!==hn||bt.toneMapping!==pi||Ae.isWebGL2===!0&&bt.morphTargetsCount!==dn)&&(Tt=!0):(Tt=!0,bt.__version=oe.version);let Ii=bt.currentProgram;Tt===!0&&(Ii=an(oe,ie,he));let ri=!1,Qn=!1,bs=!1;const On=Ii.getUniforms(),Un=bt.uniforms;if(xe.useProgram(Ii.program)&&(ri=!0,Qn=!0,bs=!0),oe.id!==N&&(N=oe.id,Qn=!0),ri||R!==V){On.setValue(Q,"projectionMatrix",V.projectionMatrix),On.setValue(Q,"viewMatrix",V.matrixWorldInverse);const Ni=On.map.cameraPosition;Ni!==void 0&&Ni.setValue(Q,Qe.setFromMatrixPosition(V.matrixWorld)),Ae.logarithmicDepthBuffer&&On.setValue(Q,"logDepthBufFC",2/(Math.log(V.far+1)/Math.LN2)),(oe.isMeshPhongMaterial||oe.isMeshToonMaterial||oe.isMeshLambertMaterial||oe.isMeshBasicMaterial||oe.isMeshStandardMaterial||oe.isShaderMaterial)&&On.setValue(Q,"isOrthographic",V.isOrthographicCamera===!0),R!==V&&(R=V,Qn=!0,bs=!0)}if(he.isSkinnedMesh){On.setOptional(Q,he,"bindMatrix"),On.setOptional(Q,he,"bindMatrixInverse");const Ni=he.skeleton;Ni&&(Ae.floatVertexTextures?(Ni.boneTexture===null&&Ni.computeBoneTexture(),On.setValue(Q,"boneTexture",Ni.boneTexture,We),On.setValue(Q,"boneTextureSize",Ni.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const Ma=pe.morphAttributes;if((Ma.position!==void 0||Ma.normal!==void 0||Ma.color!==void 0&&Ae.isWebGL2===!0)&&mt.update(he,pe,Ii),(Qn||bt.receiveShadow!==he.receiveShadow)&&(bt.receiveShadow=he.receiveShadow,On.setValue(Q,"receiveShadow",he.receiveShadow)),oe.isMeshGouraudMaterial&&oe.envMap!==null&&(Un.envMap.value=At,Un.flipEnvMap.value=At.isCubeTexture&&At.isRenderTargetTexture===!1?-1:1),Qn&&(On.setValue(Q,"toneMappingExposure",y.toneMappingExposure),bt.needsLights&&ii(Un,bs),$e&&oe.fog===!0&&be.refreshFogUniforms(Un,$e),be.refreshMaterialUniforms(Un,oe,Y,z,Re),lv.upload(Q,bt.uniformsList,Un,We)),oe.isShaderMaterial&&oe.uniformsNeedUpdate===!0&&(lv.upload(Q,bt.uniformsList,Un,We),oe.uniformsNeedUpdate=!1),oe.isSpriteMaterial&&On.setValue(Q,"center",he.center),On.setValue(Q,"modelViewMatrix",he.modelViewMatrix),On.setValue(Q,"normalMatrix",he.normalMatrix),On.setValue(Q,"modelMatrix",he.matrixWorld),oe.isShaderMaterial||oe.isRawShaderMaterial){const Ni=oe.uniformsGroups;for(let ru=0,su=Ni.length;ru<su;ru++)if(Ae.isWebGL2){const mh=Ni[ru];fe.update(mh,Ii),fe.bind(mh,Ii)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return Ii}function ii(V,ie){V.ambientLightColor.needsUpdate=ie,V.lightProbe.needsUpdate=ie,V.directionalLights.needsUpdate=ie,V.directionalLightShadows.needsUpdate=ie,V.pointLights.needsUpdate=ie,V.pointLightShadows.needsUpdate=ie,V.spotLights.needsUpdate=ie,V.spotLightShadows.needsUpdate=ie,V.rectAreaLights.needsUpdate=ie,V.hemisphereLights.needsUpdate=ie}function Li(V){return V.isMeshLambertMaterial||V.isMeshToonMaterial||V.isMeshPhongMaterial||V.isMeshStandardMaterial||V.isShadowMaterial||V.isShaderMaterial&&V.lights===!0}this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(V,ie,pe){Ge.get(V.texture).__webglTexture=ie,Ge.get(V.depthTexture).__webglTexture=pe;const oe=Ge.get(V);oe.__hasExternalTextures=!0,oe.__hasExternalTextures&&(oe.__autoAllocateDepthBuffer=pe===void 0,oe.__autoAllocateDepthBuffer||de.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),oe.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(V,ie){const pe=Ge.get(V);pe.__webglFramebuffer=ie,pe.__useDefaultFramebuffer=ie===void 0},this.setRenderTarget=function(V,ie=0,pe=0){P=V,E=ie,C=pe;let oe=!0,he=null,$e=!1,pt=!1;if(V){const At=Ge.get(V);At.__useDefaultFramebuffer!==void 0?(xe.bindFramebuffer(Q.FRAMEBUFFER,null),oe=!1):At.__webglFramebuffer===void 0?We.setupRenderTarget(V):At.__hasExternalTextures&&We.rebindTextures(V,Ge.get(V.texture).__webglTexture,Ge.get(V.depthTexture).__webglTexture);const qe=V.texture;(qe.isData3DTexture||qe.isDataArrayTexture||qe.isCompressedArrayTexture)&&(pt=!0);const ct=Ge.get(V).__webglFramebuffer;V.isWebGLCubeRenderTarget?(Array.isArray(ct[ie])?he=ct[ie][pe]:he=ct[ie],$e=!0):Ae.isWebGL2&&V.samples>0&&We.useMultisampledRTT(V)===!1?he=Ge.get(V).__webglMultisampledFramebuffer:Array.isArray(ct)?he=ct[pe]:he=ct,L.copy(V.viewport),k.copy(V.scissor),$=V.scissorTest}else L.copy(W).multiplyScalar(Y).floor(),k.copy(j).multiplyScalar(Y).floor(),$=Z;if(xe.bindFramebuffer(Q.FRAMEBUFFER,he)&&Ae.drawBuffers&&oe&&xe.drawBuffers(V,he),xe.viewport(L),xe.scissor(k),xe.setScissorTest($),$e){const At=Ge.get(V.texture);Q.framebufferTexture2D(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,Q.TEXTURE_CUBE_MAP_POSITIVE_X+ie,At.__webglTexture,pe)}else if(pt){const At=Ge.get(V.texture),qe=ie||0;Q.framebufferTextureLayer(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,At.__webglTexture,pe||0,qe)}N=-1},this.readRenderTargetPixels=function(V,ie,pe,oe,he,$e,pt){if(!(V&&V.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let wt=Ge.get(V).__webglFramebuffer;if(V.isWebGLCubeRenderTarget&&pt!==void 0&&(wt=wt[pt]),wt){xe.bindFramebuffer(Q.FRAMEBUFFER,wt);try{const At=V.texture,qe=At.format,ct=At.type;if(qe!==Mr&&xt.convert(qe)!==Q.getParameter(Q.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Mt=ct===Dc&&(de.has("EXT_color_buffer_half_float")||Ae.isWebGL2&&de.has("EXT_color_buffer_float"));if(ct!==Si&&xt.convert(ct)!==Q.getParameter(Q.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ct===Vs&&(Ae.isWebGL2||de.has("OES_texture_float")||de.has("WEBGL_color_buffer_float")))&&!Mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ie>=0&&ie<=V.width-oe&&pe>=0&&pe<=V.height-he&&Q.readPixels(ie,pe,oe,he,xt.convert(qe),xt.convert(ct),$e)}finally{const At=P!==null?Ge.get(P).__webglFramebuffer:null;xe.bindFramebuffer(Q.FRAMEBUFFER,At)}}},this.copyFramebufferToTexture=function(V,ie,pe=0){const oe=Math.pow(2,-pe),he=Math.floor(ie.image.width*oe),$e=Math.floor(ie.image.height*oe);We.setTexture2D(ie,0),Q.copyTexSubImage2D(Q.TEXTURE_2D,pe,0,0,V.x,V.y,he,$e),xe.unbindTexture()},this.copyTextureToTexture=function(V,ie,pe,oe=0){const he=ie.image.width,$e=ie.image.height,pt=xt.convert(pe.format),wt=xt.convert(pe.type);We.setTexture2D(pe,0),Q.pixelStorei(Q.UNPACK_FLIP_Y_WEBGL,pe.flipY),Q.pixelStorei(Q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,pe.premultiplyAlpha),Q.pixelStorei(Q.UNPACK_ALIGNMENT,pe.unpackAlignment),ie.isDataTexture?Q.texSubImage2D(Q.TEXTURE_2D,oe,V.x,V.y,he,$e,pt,wt,ie.image.data):ie.isCompressedTexture?Q.compressedTexSubImage2D(Q.TEXTURE_2D,oe,V.x,V.y,ie.mipmaps[0].width,ie.mipmaps[0].height,pt,ie.mipmaps[0].data):Q.texSubImage2D(Q.TEXTURE_2D,oe,V.x,V.y,pt,wt,ie.image),oe===0&&pe.generateMipmaps&&Q.generateMipmap(Q.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(V,ie,pe,oe,he=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const $e=V.max.x-V.min.x+1,pt=V.max.y-V.min.y+1,wt=V.max.z-V.min.z+1,At=xt.convert(oe.format),qe=xt.convert(oe.type);let ct;if(oe.isData3DTexture)We.setTexture3D(oe,0),ct=Q.TEXTURE_3D;else if(oe.isDataArrayTexture)We.setTexture2DArray(oe,0),ct=Q.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Q.pixelStorei(Q.UNPACK_FLIP_Y_WEBGL,oe.flipY),Q.pixelStorei(Q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,oe.premultiplyAlpha),Q.pixelStorei(Q.UNPACK_ALIGNMENT,oe.unpackAlignment);const Mt=Q.getParameter(Q.UNPACK_ROW_LENGTH),en=Q.getParameter(Q.UNPACK_IMAGE_HEIGHT),hn=Q.getParameter(Q.UNPACK_SKIP_PIXELS),pi=Q.getParameter(Q.UNPACK_SKIP_ROWS),Lr=Q.getParameter(Q.UNPACK_SKIP_IMAGES),dn=pe.isCompressedTexture?pe.mipmaps[0]:pe.image;Q.pixelStorei(Q.UNPACK_ROW_LENGTH,dn.width),Q.pixelStorei(Q.UNPACK_IMAGE_HEIGHT,dn.height),Q.pixelStorei(Q.UNPACK_SKIP_PIXELS,V.min.x),Q.pixelStorei(Q.UNPACK_SKIP_ROWS,V.min.y),Q.pixelStorei(Q.UNPACK_SKIP_IMAGES,V.min.z),pe.isDataTexture||pe.isData3DTexture?Q.texSubImage3D(ct,he,ie.x,ie.y,ie.z,$e,pt,wt,At,qe,dn.data):pe.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Q.compressedTexSubImage3D(ct,he,ie.x,ie.y,ie.z,$e,pt,wt,At,dn.data)):Q.texSubImage3D(ct,he,ie.x,ie.y,ie.z,$e,pt,wt,At,qe,dn),Q.pixelStorei(Q.UNPACK_ROW_LENGTH,Mt),Q.pixelStorei(Q.UNPACK_IMAGE_HEIGHT,en),Q.pixelStorei(Q.UNPACK_SKIP_PIXELS,hn),Q.pixelStorei(Q.UNPACK_SKIP_ROWS,pi),Q.pixelStorei(Q.UNPACK_SKIP_IMAGES,Lr),he===0&&oe.generateMipmaps&&Q.generateMipmap(ct),xe.unbindTexture()},this.initTexture=function(V){V.isCubeTexture?We.setTextureCube(V,0):V.isData3DTexture?We.setTexture3D(V,0):V.isDataArrayTexture||V.isCompressedArrayTexture?We.setTexture2DArray(V,0):We.setTexture2D(V,0),xe.unbindTexture()},this.resetState=function(){E=0,C=0,P=null,xe.reset(),q.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return wo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===_y?"display-p3":"srgb",n.unpackColorSpace=cn.workingColorSpace===qp?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===jt?hl:gE}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===hl?jt:ws}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class OD extends EE{}OD.prototype.isWebGL1Renderer=!0;class Ey{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new He(e),this.density=n}clone(){return new Ey(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Ty{constructor(e,n=1,i=1e3){this.isFog=!0,this.name="",this.color=new He(e),this.near=n,this.far=i}clone(){return new Ty(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Mp extends Kt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class im{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Sp,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Jr()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,i){e*=this.stride,i*=n.stride;for(let r=0,s=this.stride;r<s;r++)this.array[e+r]=n.array[i+r];return this}set(e,n=0){return this.array.set(e,n),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Jr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const n=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(n,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Jr()),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 tr=new G;class xl{constructor(e,n,i,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=n,this.offset=i,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let n=0,i=this.data.count;n<i;n++)tr.fromBufferAttribute(this,n),tr.applyMatrix4(e),this.setXYZ(n,tr.x,tr.y,tr.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)tr.fromBufferAttribute(this,n),tr.applyNormalMatrix(e),this.setXYZ(n,tr.x,tr.y,tr.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)tr.fromBufferAttribute(this,n),tr.transformDirection(e),this.setXYZ(n,tr.x,tr.y,tr.z);return this}setX(e,n){return this.normalized&&(n=It(n,this.array)),this.data.array[e*this.data.stride+this.offset]=n,this}setY(e,n){return this.normalized&&(n=It(n,this.array)),this.data.array[e*this.data.stride+this.offset+1]=n,this}setZ(e,n){return this.normalized&&(n=It(n,this.array)),this.data.array[e*this.data.stride+this.offset+2]=n,this}setW(e,n){return this.normalized&&(n=It(n,this.array)),this.data.array[e*this.data.stride+this.offset+3]=n,this}getX(e){let n=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(n=Er(n,this.array)),n}getY(e){let n=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(n=Er(n,this.array)),n}getZ(e){let n=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(n=Er(n,this.array)),n}getW(e){let n=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(n=Er(n,this.array)),n}setXY(e,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(n=It(n,this.array),i=It(i,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this}setXYZ(e,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(n=It(n,this.array),i=It(i,this.array),r=It(r,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this.data.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(n=It(n,this.array),i=It(i,this.array),r=It(r,this.array),s=It(s,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this.data.array[e+2]=r,this.data.array[e+3]=s,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)n.push(this.data.array[r+s])}return new Zt(new this.array.constructor(n),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 xl(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 n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)n.push(this.data.array[r+s])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:n,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 TE extends Kn{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 Du;const Jh=new G,Fu=new G,Ou=new G,Uu=new le,Kh=new le,UD=new Et,tg=new G,Yh=new G,ng=new G,ZR=new le,r2=new le,qR=new le;class kD extends Kt{constructor(e=new TE){if(super(),this.isSprite=!0,this.type="Sprite",Du===void 0){Du=new Pt;const n=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new im(n,5);Du.setIndex([0,1,2,0,2,3]),Du.setAttribute("position",new xl(i,3,0,!1)),Du.setAttribute("uv",new xl(i,2,3,!1))}this.geometry=Du,this.material=e,this.center=new le(.5,.5)}raycast(e,n){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Fu.setFromMatrixScale(this.matrixWorld),UD.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ou.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Fu.multiplyScalar(-Ou.z);const i=this.material.rotation;let r,s;i!==0&&(s=Math.cos(i),r=Math.sin(i));const o=this.center;ig(tg.set(-.5,-.5,0),Ou,o,Fu,r,s),ig(Yh.set(.5,-.5,0),Ou,o,Fu,r,s),ig(ng.set(.5,.5,0),Ou,o,Fu,r,s),ZR.set(0,0),r2.set(1,0),qR.set(1,1);let a=e.ray.intersectTriangle(tg,Yh,ng,!1,Jh);if(a===null&&(ig(Yh.set(-.5,.5,0),Ou,o,Fu,r,s),r2.set(0,1),a=e.ray.intersectTriangle(tg,ng,Yh,!1,Jh),a===null))return;const l=e.ray.origin.distanceTo(Jh);l<e.near||l>e.far||n.push({distance:l,point:Jh.clone(),uv:wr.getInterpolation(Jh,tg,Yh,ng,ZR,r2,qR,new le),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function ig(t,e,n,i,r,s){Uu.subVectors(t,n).addScalar(.5).multiply(i),r!==void 0?(Kh.x=s*Uu.x-r*Uu.y,Kh.y=r*Uu.x+s*Uu.y):Kh.copy(Uu),t.copy(e),t.x+=Kh.x,t.y+=Kh.y,t.applyMatrix4(UD)}const rg=new G,$R=new G;class zD extends Kt{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 n=e.levels;for(let i=0,r=n.length;i<r;i++){const s=n[i];this.addLevel(s.object.clone(),s.distance,s.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,n=0,i=0){n=Math.abs(n);const r=this.levels;let s;for(s=0;s<r.length&&!(n<r[s].distance);s++);return r.splice(s,0,{distance:n,hysteresis:i,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const n=this.levels;if(n.length>0){let i,r;for(i=1,r=n.length;i<r;i++){let s=n[i].distance;if(n[i].object.visible&&(s-=s*n[i].hysteresis),e<s)break}return n[i-1].object}return null}raycast(e,n){if(this.levels.length>0){rg.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(rg);this.getObjectForDistance(r).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){rg.setFromMatrixPosition(e.matrixWorld),$R.setFromMatrixPosition(this.matrixWorld);const i=rg.distanceTo($R)/e.zoom;n[0].object.visible=!0;let r,s;for(r=1,s=n.length;r<s;r++){let o=n[r].distance;if(n[r].object.visible&&(o-=o*n[r].hysteresis),i>=o)n[r-1].object.visible=!1,n[r].object.visible=!0;else break}for(this._currentLevel=r-1;r<s;r++)n[r].object.visible=!1}}toJSON(e){const n=super.toJSON(e);this.autoUpdate===!1&&(n.object.autoUpdate=!1),n.object.levels=[];const i=this.levels;for(let r=0,s=i.length;r<s;r++){const o=i[r];n.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return n}}const e4=new G,t4=new on,n4=new on,YX=new G,i4=new Et,ku=new G,s2=new Ms,r4=new Et,o2=new $c;class bE extends ui{constructor(e,n){super(e,n),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Et,this.bindMatrixInverse=new Et,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new eo),this.boundingBox.makeEmpty();const n=e.getAttribute("position");for(let i=0;i<n.count;i++)ku.fromBufferAttribute(n,i),this.applyBoneTransform(i,ku),this.boundingBox.expandByPoint(ku)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ms),this.boundingSphere.makeEmpty();const n=e.getAttribute("position");for(let i=0;i<n.count;i++)ku.fromBufferAttribute(n,i),this.applyBoneTransform(i,ku),this.boundingSphere.expandByPoint(ku)}copy(e,n){return super.copy(e,n),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,n){const i=this.material,r=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),s2.copy(this.boundingSphere),s2.applyMatrix4(r),e.ray.intersectsSphere(s2)!==!1&&(r4.copy(r).invert(),o2.copy(e.ray).applyMatrix4(r4),!(this.boundingBox!==null&&o2.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,n,o2)))}getVertexPosition(e,n){return super.getVertexPosition(e,n),this.applyBoneTransform(e,n),n}bind(e,n){this.skeleton=e,n===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),n=this.matrixWorld),this.bindMatrix.copy(n),this.bindMatrixInverse.copy(n).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new on,n=this.geometry.attributes.skinWeight;for(let i=0,r=n.count;i<r;i++){e.fromBufferAttribute(n,i);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),n.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,n){const i=this.skeleton,r=this.geometry;t4.fromBufferAttribute(r.attributes.skinIndex,e),n4.fromBufferAttribute(r.attributes.skinWeight,e),e4.copy(n).applyMatrix4(this.bindMatrix),n.set(0,0,0);for(let s=0;s<4;s++){const o=n4.getComponent(s);if(o!==0){const a=t4.getComponent(s);i4.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),n.addScaledVector(YX.copy(e4).applyMatrix4(i4),o)}}return n.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,n){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,n)}}class by extends Kt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Cf extends Mn{constructor(e=null,n=1,i=1,r,s,o,a,l,c=fn,u=fn,f,p){super(null,o,a,l,c,u,r,s,f,p),this.isDataTexture=!0,this.image={data:e,width:n,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const s4=new Et,QX=new Et;class rm{constructor(e=[],n=[]){this.uuid=Jr(),this.bones=e.slice(0),this.boneInverses=n,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.init()}init(){const e=this.bones,n=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),n.length===0)this.calculateInverses();else if(e.length!==n.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new Et)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,n=this.bones.length;e<n;e++){const i=new Et;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,n=this.bones.length;e<n;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,n=this.bones.length;e<n;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,n=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const a=e[s]?e[s].matrixWorld:QX;s4.multiplyMatrices(a,n[s]),s4.toArray(i,s*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new rm(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=SD(e),e=Math.max(e,4);const n=new Float32Array(e*e*4);n.set(this.boneMatrices);const i=new Cf(n,e,e,Mr,Vs);return i.needsUpdate=!0,this.boneMatrices=n,this.boneTexture=i,this.boneTextureSize=e,this}getBoneByName(e){for(let n=0,i=this.bones.length;n<i;n++){const r=this.bones[n];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,n){this.uuid=e.uuid;for(let i=0,r=e.bones.length;i<r;i++){const s=e.bones[i];let o=n[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new by),this.bones.push(o),this.boneInverses.push(new Et().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const n=this.bones,i=this.boneInverses;for(let r=0,s=n.length;r<s;r++){const o=n[r];e.bones.push(o.uuid);const a=i[r];e.boneInverses.push(a.toArray())}return e}}class Oc extends Zt{constructor(e,n,i,r=1){super(e,n,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const zu=new Et,o4=new Et,sg=[],a4=new eo,ZX=new Et,Qh=new ui,Zh=new Ms;class CE extends ui{constructor(e,n,i){super(e,n),this.isInstancedMesh=!0,this.instanceMatrix=new Oc(new Float32Array(i*16),16),this.instanceColor=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<i;r++)this.setMatrixAt(r,ZX)}computeBoundingBox(){const e=this.geometry,n=this.count;this.boundingBox===null&&(this.boundingBox=new eo),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<n;i++)this.getMatrixAt(i,zu),a4.copy(e.boundingBox).applyMatrix4(zu),this.boundingBox.union(a4)}computeBoundingSphere(){const e=this.geometry,n=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ms),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<n;i++)this.getMatrixAt(i,zu),Zh.copy(e.boundingSphere).applyMatrix4(zu),this.boundingSphere.union(Zh)}copy(e,n){return super.copy(e,n),this.instanceMatrix.copy(e.instanceMatrix),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,n){n.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,n){n.fromArray(this.instanceMatrix.array,e*16)}raycast(e,n){const i=this.matrixWorld,r=this.count;if(Qh.geometry=this.geometry,Qh.material=this.material,Qh.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Zh.copy(this.boundingSphere),Zh.applyMatrix4(i),e.ray.intersectsSphere(Zh)!==!1))for(let s=0;s<r;s++){this.getMatrixAt(s,zu),o4.multiplyMatrices(i,zu),Qh.matrixWorld=o4,Qh.raycast(e,sg);for(let o=0,a=sg.length;o<a;o++){const l=sg[o];l.instanceId=s,l.object=this,n.push(l)}sg.length=0}}setColorAt(e,n){this.instanceColor===null&&(this.instanceColor=new Oc(new Float32Array(this.instanceMatrix.count*3),3)),n.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,n){n.toArray(this.instanceMatrix.array,e*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class Yi extends Kn{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 l4=new G,c4=new G,u4=new Et,a2=new $c,og=new Ms;let ya=class extends Kt{constructor(e=new Pt,n=new Yi){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),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 n=e.attributes.position,i=[0];for(let r=1,s=n.count;r<s;r++)l4.fromBufferAttribute(n,r-1),c4.fromBufferAttribute(n,r),i[r]=i[r-1],i[r]+=l4.distanceTo(c4);e.setAttribute("lineDistance",new lt(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,n){const i=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),og.copy(i.boundingSphere),og.applyMatrix4(r),og.radius+=s,e.ray.intersectsSphere(og)===!1)return;u4.copy(r).invert(),a2.copy(e.ray).applyMatrix4(u4);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=new G,u=new G,f=new G,p=new G,m=this.isLineSegments?2:1,v=i.index,x=i.attributes.position;if(v!==null){const g=Math.max(0,o.start),_=Math.min(v.count,o.start+o.count);for(let y=g,M=_-1;y<M;y+=m){const E=v.getX(y),C=v.getX(y+1);if(c.fromBufferAttribute(x,E),u.fromBufferAttribute(x,C),a2.distanceSqToSegment(c,u,p,f)>l)continue;p.applyMatrix4(this.matrixWorld);const N=e.ray.origin.distanceTo(p);N<e.near||N>e.far||n.push({distance:N,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),_=Math.min(x.count,o.start+o.count);for(let y=g,M=_-1;y<M;y+=m){if(c.fromBufferAttribute(x,y),u.fromBufferAttribute(x,y+1),a2.distanceSqToSegment(c,u,p,f)>l)continue;p.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(p);C<e.near||C>e.far||n.push({distance:C,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}};const f4=new G,h4=new G;class to extends ya{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,i=[];for(let r=0,s=n.count;r<s;r+=2)f4.fromBufferAttribute(n,r),h4.fromBufferAttribute(n,r+1),i[r]=r===0?0:i[r-1],i[r+1]=i[r]+f4.distanceTo(h4);e.setAttribute("lineDistance",new lt(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class RE extends ya{constructor(e,n){super(e,n),this.isLineLoop=!0,this.type="LineLoop"}}class Cy extends Kn{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 d4=new Et,Uw=new $c,ag=new Ms,lg=new G;let PE=class extends Kt{constructor(e=new Pt,n=new Cy){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,n){const i=this.geometry,r=this.matrixWorld,s=e.params.Points.threshold,o=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),ag.copy(i.boundingSphere),ag.applyMatrix4(r),ag.radius+=s,e.ray.intersectsSphere(ag)===!1)return;d4.copy(r).invert(),Uw.copy(e.ray).applyMatrix4(d4);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=i.index,f=i.attributes.position;if(c!==null){const p=Math.max(0,o.start),m=Math.min(c.count,o.start+o.count);for(let v=p,w=m;v<w;v++){const x=c.getX(v);lg.fromBufferAttribute(f,x),p4(lg,x,l,r,e,n,this)}}else{const p=Math.max(0,o.start),m=Math.min(f.count,o.start+o.count);for(let v=p,w=m;v<w;v++)lg.fromBufferAttribute(f,v),p4(lg,v,l,r,e,n,this)}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}};function p4(t,e,n,i,r,s,o){const a=Uw.distanceSqToPoint(t);if(a<n){const l=new G;Uw.closestPointToPoint(t,l),l.applyMatrix4(i);const c=r.ray.origin.distanceTo(l);if(c<r.near||c>r.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class qX extends Mn{constructor(e,n,i,r,s,o,a,l,c){super(e,n,i,r,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:gn,this.magFilter=s!==void 0?s:gn,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}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 $X extends Mn{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=fn,this.minFilter=fn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Ry extends Mn{constructor(e,n,i,r,s,o,a,l,c,u,f,p){super(null,o,a,l,c,u,r,s,f,p),this.isCompressedTexture=!0,this.image={width:n,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class eJ extends Ry{constructor(e,n,i,r,s,o){super(e,n,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Ci}}class tJ extends Ry{constructor(e,n,i){super(void 0,e[0].width,e[0].height,n,i,va),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class nJ extends Mn{constructor(e,n,i,r,s,o,a,l,c){super(e,n,i,r,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class no{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const i=this.getUtoTmapping(e);return this.getPoint(i,n)}getPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return n}getSpacedPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPointAt(i/e));return n}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 n=[];let i,r=this.getPoint(0),s=0;n.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),n.push(s),r=i;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const i=this.getLengths();let r=0;const s=i.length;let o;n?o=n:o=e*i[s-1];let a=0,l=s-1,c;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else if(c>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const u=i[r],p=i[r+1]-u,m=(o-u)/p;return(r+m)/(s-1)}getTangent(e,n){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=n||(o.isVector2?new le:new G);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const i=this.getUtoTmapping(e);return this.getTangent(i,n)}computeFrenetFrames(e,n){const i=new G,r=[],s=[],o=[],a=new G,l=new Et;for(let m=0;m<=e;m++){const v=m/e;r[m]=this.getTangentAt(v,new G)}s[0]=new G,o[0]=new G;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),f=Math.abs(r[0].y),p=Math.abs(r[0].z);u<=c&&(c=u,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),p<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(Vn(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,v))}o[m].crossVectors(r[m],s[m])}if(n===!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 Py extends no{constructor(e=0,n=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n){const i=n||new le,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)<Number.EPSILON;for(;s<0;)s+=r;for(;s>r;)s-=r;s<Number.EPSILON&&(o?s=0:s=r),this.aClockwise===!0&&!o&&(s===r?s=-r:s=s-r);const a=this.aStartAngle+e*s;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const u=Math.cos(this.aRotation),f=Math.sin(this.aRotation),p=l-this.aX,m=c-this.aY;l=p*u-m*f+this.aX,c=p*f+m*u+this.aY}return i.set(l,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class HD extends Py{constructor(e,n,i,r,s,o){super(e,n,i,i,r,s,o),this.isArcCurve=!0,this.type="ArcCurve"}}function BE(){let t=0,e=0,n=0,i=0;function r(s,o,a,l){t=s,e=a,n=-3*s+3*o-2*a-l,i=2*s-2*o+a+l}return{initCatmullRom:function(s,o,a,l,c){r(o,a,c*(a-s),c*(l-o))},initNonuniformCatmullRom:function(s,o,a,l,c,u,f){let p=(o-s)/c-(a-s)/(c+u)+(a-o)/u,m=(a-o)/u-(l-o)/(u+f)+(l-a)/f;p*=u,m*=u,r(o,a,p,m)},calc:function(s){const o=s*s,a=o*s;return t+e*s+n*o+i*a}}}const cg=new G,l2=new BE,c2=new BE,u2=new BE;class GD extends no{constructor(e=[],n=!1,i="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=n,this.curveType=i,this.tension=r}getPoint(e,n=new G){const i=n,r=this.points,s=r.length,o=(s-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=r[(a-1)%s]:(cg.subVectors(r[0],r[1]).add(r[0]),c=cg);const f=r[a%s],p=r[(a+1)%s];if(this.closed||a+2<s?u=r[(a+2)%s]:(cg.subVectors(r[s-1],r[s-2]).add(r[s-1]),u=cg),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let v=Math.pow(c.distanceToSquared(f),m),w=Math.pow(f.distanceToSquared(p),m),x=Math.pow(p.distanceToSquared(u),m);w<1e-4&&(w=1),v<1e-4&&(v=w),x<1e-4&&(x=w),l2.initNonuniformCatmullRom(c.x,f.x,p.x,u.x,v,w,x),c2.initNonuniformCatmullRom(c.y,f.y,p.y,u.y,v,w,x),u2.initNonuniformCatmullRom(c.z,f.z,p.z,u.z,v,w,x)}else this.curveType==="catmullrom"&&(l2.initCatmullRom(c.x,f.x,p.x,u.x,this.tension),c2.initCatmullRom(c.y,f.y,p.y,u.y,this.tension),u2.initCatmullRom(c.z,f.z,p.z,u.z,this.tension));return i.set(l2.calc(l),c2.calc(l),u2.calc(l)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];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 n=0,i=this.points.length;n<i;n++){const r=this.points[n];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 n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new G().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function m4(t,e,n,i,r){const s=(i-e)*.5,o=(r-n)*.5,a=t*t,l=t*a;return(2*n-2*i+s+o)*l+(-3*n+3*i-2*s-o)*a+s*t+n}function iJ(t,e){const n=1-t;return n*n*e}function rJ(t,e){return 2*(1-t)*t*e}function sJ(t,e){return t*t*e}function Dd(t,e,n,i){return iJ(t,e)+rJ(t,n)+sJ(t,i)}function oJ(t,e){const n=1-t;return n*n*n*e}function aJ(t,e){const n=1-t;return 3*n*n*t*e}function lJ(t,e){return 3*(1-t)*t*t*e}function cJ(t,e){return t*t*t*e}function Fd(t,e,n,i,r){return oJ(t,e)+aJ(t,n)+lJ(t,i)+cJ(t,r)}class LE extends no{constructor(e=new le,n=new le,i=new le,r=new le){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new le){const i=n,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set(Fd(e,r.x,s.x,o.x,a.x),Fd(e,r.y,s.y,o.y,a.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class VD extends no{constructor(e=new G,n=new G,i=new G,r=new G){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new G){const i=n,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return i.set(Fd(e,r.x,s.x,o.x,a.x),Fd(e,r.y,s.y,o.y,a.y),Fd(e,r.z,s.z,o.z,a.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class IE extends no{constructor(e=new le,n=new le){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=n}getPoint(e,n=new le){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new le){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}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 jD extends no{constructor(e=new G,n=new G){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=n}getPoint(e,n=new G){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new G){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}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 NE extends no{constructor(e=new le,n=new le,i=new le){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new le){const i=n,r=this.v0,s=this.v1,o=this.v2;return i.set(Dd(e,r.x,s.x,o.x),Dd(e,r.y,s.y,o.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class DE extends no{constructor(e=new G,n=new G,i=new G){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new G){const i=n,r=this.v0,s=this.v1,o=this.v2;return i.set(Dd(e,r.x,s.x,o.x),Dd(e,r.y,s.y,o.y),Dd(e,r.z,s.z,o.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class FE extends no{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,n=new le){const i=n,r=this.points,s=(r.length-1)*e,o=Math.floor(s),a=s-o,l=r[o===0?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],f=r[o>r.length-3?r.length-1:o+2];return i.set(m4(a,l.x,c.x,u.x,f.x),m4(a,l.y,c.y,u.y,f.y)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,i=this.points.length;n<i;n++){const r=this.points[n];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new le().fromArray(r))}return this}}var e1=Object.freeze({__proto__:null,ArcCurve:HD,CatmullRomCurve3:GD,CubicBezierCurve:LE,CubicBezierCurve3:VD,EllipseCurve:Py,LineCurve:IE,LineCurve3:jD,QuadraticBezierCurve:NE,QuadraticBezierCurve3:DE,SplineCurve:FE});class WD extends no{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),n=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(n)){const i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new e1[i](n,e))}return this}getPoint(e,n){const i=e*this.getLength(),r=this.getCurveLengths();let s=0;for(;s<r.length;){if(r[s]>=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}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 n=0;for(let i=0,r=this.curves.length;i<r;i++)n+=this.curves[i].getLength(),e.push(n);return this.cacheLengths=e,e}getSpacedPoints(e=40){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return this.autoClose&&n.push(n[0]),n}getPoints(e=12){const n=[];let i;for(let r=0,s=this.curves;r<s.length;r++){const o=s[r],a=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,l=o.getPoints(a);for(let c=0;c<l.length;c++){const u=l[c];i&&i.equals(u)||(n.push(u),i=u)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let n=0,i=this.curves.length;n<i;n++){const r=this.curves[n];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(new e1[r.type]().fromJSON(r))}return this}}class Ep extends WD{constructor(e){super(),this.type="Path",this.currentPoint=new le,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let n=1,i=e.length;n<i;n++)this.lineTo(e[n].x,e[n].y);return this}moveTo(e,n){return this.currentPoint.set(e,n),this}lineTo(e,n){const i=new IE(this.currentPoint.clone(),new le(e,n));return this.curves.push(i),this.currentPoint.set(e,n),this}quadraticCurveTo(e,n,i,r){const s=new NE(this.currentPoint.clone(),new le(e,n),new le(i,r));return this.curves.push(s),this.currentPoint.set(i,r),this}bezierCurveTo(e,n,i,r,s,o){const a=new LE(this.currentPoint.clone(),new le(e,n),new le(i,r),new le(s,o));return this.curves.push(a),this.currentPoint.set(s,o),this}splineThru(e){const n=[this.currentPoint.clone()].concat(e),i=new FE(n);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,n,i,r,s,o){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,n+l,i,r,s,o),this}absarc(e,n,i,r,s,o){return this.absellipse(e,n,i,i,r,s,o),this}ellipse(e,n,i,r,s,o,a,l){const c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+c,n+u,i,r,s,o,a,l),this}absellipse(e,n,i,r,s,o,a,l){const c=new Py(e,n,i,r,s,o,a,l);if(this.curves.length>0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),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 sm extends Pt{constructor(e=[new le(0,-.5),new le(.5,0),new le(0,.5)],n=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:i,phiLength:r},n=Math.floor(n),r=Vn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/n,f=new G,p=new le,m=new G,v=new G,w=new G;let x=0,g=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:x=e[_+1].x-e[_].x,g=e[_+1].y-e[_].y,m.x=g*1,m.y=-x,m.z=g*0,w.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(w.x,w.y,w.z);break;default:x=e[_+1].x-e[_].x,g=e[_+1].y-e[_].y,m.x=g*1,m.y=-x,m.z=g*0,v.copy(m),m.x+=w.x,m.y+=w.y,m.z+=w.z,m.normalize(),l.push(m.x,m.y,m.z),w.copy(v)}for(let _=0;_<=n;_++){const y=i+_*u*r,M=Math.sin(y),E=Math.cos(y);for(let C=0;C<=e.length-1;C++){f.x=e[C].x*M,f.y=e[C].y,f.z=e[C].x*E,o.push(f.x,f.y,f.z),p.x=_/n,p.y=C/(e.length-1),a.push(p.x,p.y);const P=l[3*C+0]*M,N=l[3*C+1],R=l[3*C+0]*E;c.push(P,N,R)}}for(let _=0;_<n;_++)for(let y=0;y<e.length-1;y++){const M=y+_*e.length,E=M,C=M+e.length,P=M+e.length+1,N=M+1;s.push(E,C,N),s.push(P,N,C)}this.setIndex(s),this.setAttribute("position",new lt(o,3)),this.setAttribute("uv",new lt(a,2)),this.setAttribute("normal",new lt(c,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sm(e.points,e.segments,e.phiStart,e.phiLength)}}class By extends sm{constructor(e=1,n=1,i=4,r=8){const s=new Ep;s.absarc(0,-n/2,e,Math.PI*1.5,0),s.absarc(0,n/2,e,0,Math.PI*.5),super(s.getPoints(i),r),this.type="CapsuleGeometry",this.parameters={radius:e,length:n,capSegments:i,radialSegments:r}}static fromJSON(e){return new By(e.radius,e.length,e.capSegments,e.radialSegments)}}class Ly extends Pt{constructor(e=1,n=32,i=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:n,thetaStart:i,thetaLength:r},n=Math.max(3,n);const s=[],o=[],a=[],l=[],c=new G,u=new le;o.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let f=0,p=3;f<=n;f++,p+=3){const m=i+f/n*r;c.x=e*Math.cos(m),c.y=e*Math.sin(m),o.push(c.x,c.y,c.z),a.push(0,0,1),u.x=(o[p]/e+1)/2,u.y=(o[p+1]/e+1)/2,l.push(u.x,u.y)}for(let f=1;f<=n;f++)s.push(f,f+1,0);this.setIndex(s),this.setAttribute("position",new lt(o,3)),this.setAttribute("normal",new lt(a,3)),this.setAttribute("uv",new lt(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ly(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Aa extends Pt{constructor(e=1,n=1,i=1,r=32,s=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:n,height:i,radialSegments:r,heightSegments:s,openEnded:o,thetaStart:a,thetaLength:l};const c=this;r=Math.floor(r),s=Math.floor(s);const u=[],f=[],p=[],m=[];let v=0;const w=[],x=i/2;let g=0;_(),o===!1&&(e>0&&y(!0),n>0&&y(!1)),this.setIndex(u),this.setAttribute("position",new lt(f,3)),this.setAttribute("normal",new lt(p,3)),this.setAttribute("uv",new lt(m,2));function _(){const M=new G,E=new G;let C=0;const P=(n-e)/i;for(let N=0;N<=s;N++){const R=[],L=N/s,k=L*(n-e)+e;for(let $=0;$<=r;$++){const ee=$/r,D=ee*l+a,U=Math.sin(D),z=Math.cos(D);E.x=k*U,E.y=-L*i+x,E.z=k*z,f.push(E.x,E.y,E.z),M.set(U,P,z).normalize(),p.push(M.x,M.y,M.z),m.push(ee,1-L),R.push(v++)}w.push(R)}for(let N=0;N<r;N++)for(let R=0;R<s;R++){const L=w[R][N],k=w[R+1][N],$=w[R+1][N+1],ee=w[R][N+1];u.push(L,k,ee),u.push(k,$,ee),C+=6}c.addGroup(g,C,0),g+=C}function y(M){const E=v,C=new le,P=new G;let N=0;const R=M===!0?e:n,L=M===!0?1:-1;for(let $=1;$<=r;$++)f.push(0,x*L,0),p.push(0,L,0),m.push(.5,.5),v++;const k=v;for(let $=0;$<=r;$++){const D=$/r*l+a,U=Math.cos(D),z=Math.sin(D);P.x=R*z,P.y=x*L,P.z=R*U,f.push(P.x,P.y,P.z),p.push(0,L,0),C.x=U*.5+.5,C.y=z*.5*L+.5,m.push(C.x,C.y),v++}for(let $=0;$<r;$++){const ee=E+$,D=k+$;M===!0?u.push(D,D+1,ee):u.push(D+1,D,ee),N+=3}c.addGroup(g,N,M===!0?1:2),g+=N}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Aa(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Iy extends Aa{constructor(e=1,n=1,i=32,r=1,s=!1,o=0,a=Math.PI*2){super(0,e,n,i,r,s,o,a),this.type="C
3647oneGeometry",this.parameters={radius:e,height:n,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new Iy(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Cl extends Pt{constructor(e=[],n=[],i=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:n,radius:i,detail:r};const s=[],o=[];a(r),c(i),u(),this.setAttribute("position",new lt(s,3)),this.setAttribute("normal",new lt(s.slice(),3)),this.setAttribute("uv",new lt(o,2)),r===0?this.computeVertexNormals():this.normalizeNormals();function a(_){const y=new G,M=new G,E=new G;for(let C=0;C<n.length;C+=3)m(n[C+0],y),m(n[C+1],M),m(n[C+2],E),l(y,M,E,_)}function l(_,y,M,E){const C=E+1,P=[];for(let N=0;N<=C;N++){P[N]=[];const R=_.clone().lerp(M,N/C),L=y.clone().lerp(M,N/C),k=C-N;for(let $=0;$<=k;$++)$===0&&N===C?P[N][$]=R:P[N][$]=R.clone().lerp(L,$/k)}for(let N=0;N<C;N++)for(let R=0;R<2*(C-N)-1;R++){const L=Math.floor(R/2);R%2===0?(p(P[N][L+1]),p(P[N+1][L]),p(P[N][L])):(p(P[N][L+1]),p(P[N+1][L+1]),p(P[N+1][L]))}}function c(_){const y=new G;for(let M=0;M<s.length;M+=3)y.x=s[M+0],y.y=s[M+1],y.z=s[M+2],y.normalize().multiplyScalar(_),s[M+0]=y.x,s[M+1]=y.y,s[M+2]=y.z}function u(){const _=new G;for(let y=0;y<s.length;y+=3){_.x=s[y+0],_.y=s[y+1],_.z=s[y+2];const M=x(_)/2/Math.PI+.5,E=g(_)/Math.PI+.5;o.push(M,1-E)}v(),f()}function f(){for(let _=0;_<o.length;_+=6){const y=o[_+0],M=o[_+2],E=o[_+4],C=Math.max(y,M,E),P=Math.min(y,M,E);C>.9&&P<.1&&(y<.2&&(o[_+0]+=1),M<.2&&(o[_+2]+=1),E<.2&&(o[_+4]+=1))}}function p(_){s.push(_.x,_.y,_.z)}function m(_,y){const M=_*3;y.x=e[M+0],y.y=e[M+1],y.z=e[M+2]}function v(){const _=new G,y=new G,M=new G,E=new G,C=new le,P=new le,N=new le;for(let R=0,L=0;R<s.length;R+=9,L+=6){_.set(s[R+0],s[R+1],s[R+2]),y.set(s[R+3],s[R+4],s[R+5]),M.set(s[R+6],s[R+7],s[R+8]),C.set(o[L+0],o[L+1]),P.set(o[L+2],o[L+3]),N.set(o[L+4],o[L+5]),E.copy(_).add(y).add(M).divideScalar(3);const k=x(E);w(C,L+0,_,k),w(P,L+2,y,k),w(N,L+4,M,k)}}function w(_,y,M,E){E<0&&_.x===1&&(o[y]=_.x-1),M.x===0&&M.z===0&&(o[y]=E/2/Math.PI+.5)}function x(_){return Math.atan2(_.z,-_.x)}function g(_){return Math.atan2(-_.y,Math.sqrt(_.x*_.x+_.z*_.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Cl(e.vertices,e.indices,e.radius,e.details)}}class om extends Cl{constructor(e=1,n=0){const i=(1+Math.sqrt(5))/2,r=1/i,s=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-i,0,-r,i,0,r,-i,0,r,i,-r,-i,0,-r,i,0,r,-i,0,r,i,0,-i,0,-r,i,0,-r,-i,0,r,i,0,r],o=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
vendor: 139,388 bytes, line 3647
364719,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(s,o,e,n),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new om(e.radius,e.detail)}}const ug=new G,fg=new G,f2=new G,hg=new wr;class XD extends Pt{constructor(e=null,n=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:n},e!==null){const r=Math.pow(10,4),s=Math.cos(Mc*n),o=e.getIndex(),a=e.getAttribute("position"),l=o?o.count:a.count,c=[0,0,0],u=["a","b","c"],f=new Array(3),p={},m=[];for(let v=0;v<l;v+=3){o?(c[0]=o.getX(v),c[1]=o.getX(v+1),c[2]=o.getX(v+2)):(c[0]=v,c[1]=v+1,c[2]=v+2);const{a:w,b:x,c:g}=hg;if(w.fromBufferAttribute(a,c[0]),x.fromBufferAttribute(a,c[1]),g.fromBufferAttribute(a,c[2]),hg.getNormal(f2),f[0]=`${Math.round(w.x*r)},${Math.round(w.y*r)},${Math.round(w.z*r)}`,f[1]=`${Math.round(x.x*r)},${Math.round(x.y*r)},${Math.round(x.z*r)}`,f[2]=`${Math.round(g.x*r)},${Math.round(g.y*r)},${Math.round(g.z*r)}`,!(f[0]===f[1]||f[1]===f[2]||f[2]===f[0]))for(let _=0;_<3;_++){const y=(_+1)%3,M=f[_],E=f[y],C=hg[u[_]],P=hg[u[y]],N=`${M}_${E}`,R=`${E}_${M}`;R in p&&p[R]?(f2.dot(p[R].normal)<=s&&(m.push(C.x,C.y,C.z),m.push(P.x,P.y,P.z)),p[R]=null):N in p||(p[N]={index0:c[_],index1:c[y],normal:f2.clone()})}}for(const v in p)if(p[v]){const{index0:w,index1:x}=p[v];ug.fromBufferAttribute(a,w),fg.fromBufferAttribute(a,x),m.push(ug.x,ug.y,ug.z),m.push(fg.x,fg.y,fg.z)}this.setAttribute("position",new lt(m,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class bc extends Ep{constructor(e){super(e),this.uuid=Jr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const n=[];for(let i=0,r=this.holes.length;i<r;i++)n[i]=this.holes[i].getPoints(e);return n}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let n=0,i=this.holes.length;n<i;n++){const r=this.holes[n];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(new Ep().fromJSON(r))}return this}}const uJ={triangulate:function(t,e,n=2){const i=e&&e.length,r=i?e[0]*n:t.length;let s=JD(t,0,r,n,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c,u,f,p,m;if(i&&(s=mJ(t,e,s,n)),t.length>80*n){a=c=t[0],l=u=t[1];for(let v=n;v<r;v+=n)f=t[v],p=t[v+1],f<a&&(a=f),p<l&&(l=p),f>c&&(c=f),p>u&&(u=p);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return Tp(s,o,n,a,l,m,0),o}};function JD(t,e,n,i,r){let s,o;if(r===TJ(t,e,n,i)>0)for(s=e;s<n;s+=i)o=g4(s,t[s],t[s+1],o);else for(s=n-i;s>=e;s-=i)o=g4(s,t[s],t[s+1],o);return o&&Ny(o,o.next)&&(Cp(o),o=o.next),o}function Uc(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(Ny(n,n.next)||Bn(n.prev,n,n.next)===0)){if(Cp(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function Tp(t,e,n,i,r,s,o){if(!t)return;!o&&s&&_J(t,i,r,s);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?hJ(t,i,r,s):fJ(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Cp(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=dJ(Uc(t),e,n),Tp(t,e,n,i,r,s,2)):o===2&&pJ(t,e,n,i,r,s):Tp(Uc(t),e,n,i,r,s,1);break}}}function fJ(t){const e=t.prev,n=t,i=t.next;if(Bn(e,n,i)>=0)return!1;const r=e.x,s=n.x,o=i.x,a=e.y,l=n.y,c=i.y,u=r<s?r<o?r:o:s<o?s:o,f=a<l?a<c?a:c:l<c?l:c,p=r>s?r>o?r:o:s>o?s:o,m=a>l?a>c?a:c:l>c?l:c;let v=i.next;for(;v!==e;){if(v.x>=u&&v.x<=p&&v.y>=f&&v.y<=m&&uf(r,a,s,l,o,c,v.x,v.y)&&Bn(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function hJ(t,e,n,i){const r=t.prev,s=t,o=t.next;if(Bn(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,u=r.y,f=s.y,p=o.y,m=a<l?a<c?a:c:l<c?l:c,v=u<f?u<p?u:p:f<p?f:p,w=a>l?a>c?a:c:l>c?l:c,x=u>f?u>p?u:p:f>p?f:p,g=kw(m,v,e,n,i),_=kw(w,x,e,n,i);let y=t.prevZ,M=t.nextZ;for(;y&&y.z>=g&&M&&M.z<=_;){if(y.x>=m&&y.x<=w&&y.y>=v&&y.y<=x&&y!==r&&y!==o&&uf(a,u,l,f,c,p,y.x,y.y)&&Bn(y.prev,y,y.next)>=0||(y=y.prevZ,M.x>=m&&M.x<=w&&M.y>=v&&M.y<=x&&M!==r&&M!==o&&uf(a,u,l,f,c,p,M.x,M.y)&&Bn(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;y&&y.z>=g;){if(y.x>=m&&y.x<=w&&y.y>=v&&y.y<=x&&y!==r&&y!==o&&uf(a,u,l,f,c,p,y.x,y.y)&&Bn(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;M&&M.z<=_;){if(M.x>=m&&M.x<=w&&M.y>=v&&M.y<=x&&M!==r&&M!==o&&uf(a,u,l,f,c,p,M.x,M.y)&&Bn(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function dJ(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!Ny(r,s)&&KD(r,i,i.next,s)&&bp(r,s)&&bp(s,r)&&(e.push(r.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),Cp(i),Cp(i.next),i=t=s),i=i.next}while(i!==t);return Uc(i)}function pJ(t,e,n,i,r,s){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&AJ(o,a)){let l=YD(o,a);o=Uc(o,o.next),l=Uc(l,l.next),Tp(o,e,n,i,r,s,0),Tp(l,e,n,i,r,s,0);return}a=a.next}o=o.next}while(o!==t)}function mJ(t,e,n,i){const r=[];let s,o,a,l,c;for(s=0,o=e.length;s<o;s++)a=e[s]*i,l=s<o-1?e[s+1]*i:t.length,c=JD(t,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(wJ(c));for(r.sort(gJ),s=0;s<r.length;s++)n=vJ(r[s],n);return n}function gJ(t,e){return t.x-e.x}function vJ(t,e){const n=yJ(t,e);if(!n)return e;const i=YD(n,t);return Uc(i,i.next),Uc(n,n.next)}function yJ(t,e){let n=e,i=-1/0,r;const s=t.x,o=t.y;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const p=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(p<=s&&p>i&&(i=p,r=n.x<n.next.x?n:n.next,p===s))return r}n=n.next}while(n!==e);if(!r)return null;const a=r,l=r.x,c=r.y;let u=1/0,f;n=r;do s>=n.x&&n.x>=l&&s!==n.x&&uf(o<c?s:i,o,l,c,o<c?i:s,o,n.x,n.y)&&(f=Math.abs(o-n.y)/(s-n.x),bp(n,t)&&(f<u||f===u&&(n.x>r.x||n.x===r.x&&xJ(r,n)))&&(r=n,u=f)),n=n.next;while(n!==a);return r}function xJ(t,e){return Bn(t.prev,t,e.prev)<0&&Bn(e.next,t,t.next)<0}function _J(t,e,n,i){let r=t;do r.z===0&&(r.z=kw(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,SJ(r)}function SJ(t){let e,n,i,r,s,o,a,l,c=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,i=n,a=0,e=0;e<c&&(a++,i=i.nextZ,!!i);e++);for(l=c;a>0||l>0&&i;)a!==0&&(l===0||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(o>1);return t}function kw(t,e,n,i,r){return t=(t-n)*r|0,e=(e-i)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function wJ(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function uf(t,e,n,i,r,s,o,a){return(r-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(i-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(r-o)*(i-a)}function AJ(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!MJ(t,e)&&(bp(t,e)&&bp(e,t)&&EJ(t,e)&&(Bn(t.prev,t,e.prev)||Bn(t,e.prev,e))||Ny(t,e)&&Bn(t.prev,t,t.next)>0&&Bn(e.prev,e,e.next)>0)}function Bn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Ny(t,e){return t.x===e.x&&t.y===e.y}function KD(t,e,n,i){const r=pg(Bn(t,e,n)),s=pg(Bn(t,e,i)),o=pg(Bn(n,i,t)),a=pg(Bn(n,i,e));return!!(r!==s&&o!==a||r===0&&dg(t,n,e)||s===0&&dg(t,i,e)||o===0&&dg(n,t,i)||a===0&&dg(n,e,i))}function dg(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function pg(t){return t>0?1:t<0?-1:0}function MJ(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&KD(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function bp(t,e){return Bn(t.prev,t,t.next)<0?Bn(t,e,t.next)>=0&&Bn(t,t.prev,e)>=0:Bn(t,e,t.prev)<0||Bn(t,t.next,e)<0}function EJ(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function YD(t,e){const n=new zw(t.i,t.x,t.y),i=new zw(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function g4(t,e,n,i){const r=new zw(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Cp(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function zw(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function TJ(t,e,n,i){let r=0;for(let s=e,o=n-i;s<n;s+=i)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}class Eo{static area(e){const n=e.length;let i=0;for(let r=n-1,s=0;s<n;r=s++)i+=e[r].x*e[s].y-e[s].x*e[r].y;return i*.5}static isClockWise(e){return Eo.area(e)<0}static triangulateShape(e,n){const i=[],r=[],s=[];v4(e),y4(i,e);let o=e.length;n.forEach(v4);for(let l=0;l<n.length;l++)r.push(o),o+=n[l].length,y4(i,n[l]);const a=uJ.triangulate(i,r);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function v4(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function y4(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class Dy extends Pt{constructor(e=new bc([new le(.5,.5),new le(-.5,.5),new le(-.5,-.5),new le(.5,-.5)]),n={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:n},e=Array.isArray(e)?e:[e];const i=this,r=[],s=[];for(let a=0,l=e.length;a<l;a++){const c=e[a];o(c)}this.setAttribute("position",new lt(r,3)),this.setAttribute("uv",new lt(s,2)),this.computeVertexNormals();function o(a){const l=[],c=n.curveSegments!==void 0?n.curveSegments:12,u=n.steps!==void 0?n.steps:1,f=n.depth!==void 0?n.depth:1;let p=n.bevelEnabled!==void 0?n.bevelEnabled:!0,m=n.bevelThickness!==void 0?n.bevelThickness:.2,v=n.bevelSize!==void 0?n.bevelSize:m-.1,w=n.bevelOffset!==void 0?n.bevelOffset:0,x=n.bevelSegments!==void 0?n.bevelSegments:3;const g=n.extrudePath,_=n.UVGenerator!==void 0?n.UVGenerator:bJ;let y,M=!1,E,C,P,N;g&&(y=g.getSpacedPoints(u),M=!0,p=!1,E=g.computeFrenetFrames(u,!1),C=new G,P=new G,N=new G),p||(x=0,m=0,v=0,w=0);const R=a.extractPoints(c);let L=R.shape;const k=R.holes;if(!Eo.isClockWise(L)){L=L.reverse();for(let Q=0,ge=k.length;Q<ge;Q++){const de=k[Q];Eo.isClockWise(de)&&(k[Q]=de.reverse())}}const ee=Eo.triangulateShape(L,k),D=L;for(let Q=0,ge=k.length;Q<ge;Q++){const de=k[Q];L=L.concat(de)}function U(Q,ge,de){return ge||console.error("THREE.ExtrudeGeometry: vec does not exist"),Q.clone().addScaledVector(ge,de)}const z=L.length,Y=ee.length;function O(Q,ge,de){let Ae,xe,Fe;const Ge=Q.x-ge.x,We=Q.y-ge.y,ot=de.x-Q.x,rt=de.y-Q.y,Xt=Ge*Ge+We*We,X=Ge*rt-We*ot;if(Math.abs(X)>Number.EPSILON){const F=Math.sqrt(Xt),se=Math.sqrt(ot*ot+rt*rt),be=ge.x-We/F,ye=ge.y+Ge/F,Ee=de.x-rt/se,et=de.y+ot/se,Pe=((Ee-be)*rt-(et-ye)*ot)/(Ge*rt-We*ot);Ae=be+Ge*Pe-Q.x,xe=ye+We*Pe-Q.y;const Oe=Ae*Ae+xe*xe;if(Oe<=2)return new le(Ae,xe);Fe=Math.sqrt(Oe/2)}else{let F=!1;Ge>Number.EPSILON?ot>Number.EPSILON&&(F=!0):Ge<-Number.EPSILON?ot<-Number.EPSILON&&(F=!0):Math.sign(We)===Math.sign(rt)&&(F=!0),F?(Ae=-We,xe=Ge,Fe=Math.sqrt(Xt)):(Ae=Ge,xe=We,Fe=Math.sqrt(Xt/2))}return new le(Ae/Fe,xe/Fe)}const H=[];for(let Q=0,ge=D.length,de=ge-1,Ae=Q+1;Q<ge;Q++,de++,Ae++)de===ge&&(de=0),Ae===ge&&(Ae=0),H[Q]=O(D[Q],D[de],D[Ae]);const W=[];let j,Z=H.concat();for(let Q=0,ge=k.length;Q<ge;Q++){const de=k[Q];j=[];for(let Ae=0,xe=de.length,Fe=xe-1,Ge=Ae+1;Ae<xe;Ae++,Fe++,Ge++)Fe===xe&&(Fe=0),Ge===xe&&(Ge=0),j[Ae]=O(de[Ae],de[Fe],de[Ge]);W.push(j),Z=Z.concat(j)}for(let Q=0;Q<x;Q++){const ge=Q/x,de=m*Math.cos(ge*Math.PI/2),Ae=v*Math.sin(ge*Math.PI/2)+w;for(let xe=0,Fe=D.length;xe<Fe;xe++){const Ge=U(D[xe],H[xe],Ae);Le(Ge.x,Ge.y,-de)}for(let xe=0,Fe=k.length;xe<Fe;xe++){const Ge=k[xe];j=W[xe];for(let We=0,ot=Ge.length;We<ot;We++){const rt=U(Ge[We],j[We],Ae);Le(rt.x,rt.y,-de)}}}const re=v+w;for(let Q=0;Q<z;Q++){const ge=p?U(L[Q],Z[Q],re):L[Q];M?(P.copy(E.normals[0]).multiplyScalar(ge.x),C.copy(E.binormals[0]).multiplyScalar(ge.y),N.copy(y[0]).add(P).add(C),Le(N.x,N.y,N.z)):Le(ge.x,ge.y,0)}for(let Q=1;Q<=u;Q++)for(let ge=0;ge<z;ge++){const de=p?U(L[ge],Z[ge],re):L[ge];M?(P.copy(E.normals[Q]).multiplyScalar(de.x),C.copy(E.binormals[Q]).multiplyScalar(de.y),N.copy(y[Q]).add(P).add(C),Le(N.x,N.y,N.z)):Le(de.x,de.y,f/u*Q)}for(let Q=x-1;Q>=0;Q--){const ge=Q/x,de=m*Math.cos(ge*Math.PI/2),Ae=v*Math.sin(ge*Math.PI/2)+w;for(let xe=0,Fe=D.length;xe<Fe;xe++){const Ge=U(D[xe],H[xe],Ae);Le(Ge.x,Ge.y,f+de)}for(let xe=0,Fe=k.length;xe<Fe;xe++){const Ge=k[xe];j=W[xe];for(let We=0,ot=Ge.length;We<ot;We++){const rt=U(Ge[We],j[We],Ae);M?Le(rt.x,rt.y+y[u-1].y,y[u-1].x+de):Le(rt.x,rt.y,f+de)}}}ue(),ve();function ue(){const Q=r.length/3;if(p){let ge=0,de=z*ge;for(let Ae=0;Ae<Y;Ae++){const xe=ee[Ae];ze(xe[2]+de,xe[1]+de,xe[0]+de)}ge=u+x*2,de=z*ge;for(let Ae=0;Ae<Y;Ae++){const xe=ee[Ae];ze(xe[0]+de,xe[1]+de,xe[2]+de)}}else{for(let ge=0;ge<Y;ge++){const de=ee[ge];ze(de[2],de[1],de[0])}for(let ge=0;ge<Y;ge++){const de=ee[ge];ze(de[0]+z*u,de[1]+z*u,de[2]+z*u)}}i.addGroup(Q,r.length/3-Q,0)}function ve(){const Q=r.length/3;let ge=0;Re(D,ge),ge+=D.length;for(let de=0,Ae=k.length;de<Ae;de++){const xe=k[de];Re(xe,ge),ge+=xe.length}i.addGroup(Q,r.length/3-Q,1)}function Re(Q,ge){let de=Q.length;for(;--de>=0;){const Ae=de;let xe=de-1;xe<0&&(xe=Q.length-1);for(let Fe=0,Ge=u+x*2;Fe<Ge;Fe++){const We=z*Fe,ot=z*(Fe+1),rt=ge+Ae+We,Xt=ge+xe+We,X=ge+xe+ot,F=ge+Ae+ot;Qe(rt,Xt,X,F)}}}function Le(Q,ge,de){l.push(Q),l.push(ge),l.push(de)}function ze(Q,ge,de){Ze(Q),Ze(ge),Ze(de);const Ae=r.length/3,xe=_.generateTopUV(i,r,Ae-3,Ae-2,Ae-1);Me(xe[0]),Me(xe[1]),Me(xe[2])}function Qe(Q,ge,de,Ae){Ze(Q),Ze(ge),Ze(Ae),Ze(ge),Ze(de),Ze(Ae);const xe=r.length/3,Fe=_.generateSideWallUV(i,r,xe-6,xe-3,xe-2,xe-1);Me(Fe[0]),Me(Fe[1]),Me(Fe[3]),Me(Fe[1]),Me(Fe[2]),Me(Fe[3])}function Ze(Q){r.push(l[Q*3+0]),r.push(l[Q*3+1]),r.push(l[Q*3+2])}function Me(Q){s.push(Q.x),s.push(Q.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes,i=this.parameters.options;return CJ(n,i,e)}static fromJSON(e,n){const i=[];for(let s=0,o=e.shapes.length;s<o;s++){const a=n[e.shapes[s]];i.push(a)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new e1[r.type]().fromJSON(r)),new Dy(i,e.options)}}const bJ={generateTopUV:function(t,e,n,i,r){const s=e[n*3],o=e[n*3+1],a=e[i*3],l=e[i*3+1],c=e[r*3],u=e[r*3+1];return[new le(s,o),new le(a,l),new le(c,u)]},generateSideWallUV:function(t,e,n,i,r,s){const o=e[n*3],a=e[n*3+1],l=e[n*3+2],c=e[i*3],u=e[i*3+1],f=e[i*3+2],p=e[r*3],m=e[r*3+1],v=e[r*3+2],w=e[s*3],x=e[s*3+1],g=e[s*3+2];return Math.abs(a-u)<Math.abs(o-c)?[new le(o,1-l),new le(c,1-f),new le(p,1-v),new le(w,1-g)]:[new le(a,1-l),new le(u,1-f),new le(m,1-v),new le(x,1-g)]}};function CJ(t,e,n){if(n.shapes=[],Array.isArray(t))for(let i=0,r=t.length;i<r;i++){const s=t[i];n.shapes.push(s.uuid)}else n.shapes.push(t.uuid);return n.options=Object.assign({},e),e.extrudePath!==void 0&&(n.options.extrudePath=e.extrudePath.toJSON()),n}class Fy extends Cl{constructor(e=1,n=0){const i=(1+Math.sqrt(5))/2,r=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(r,s,e,n),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new Fy(e.radius,e.detail)}}class ah extends Cl{constructor(e=1,n=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,r,e,n),this.type="OctahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new ah(e.radius,e.detail)}}class Oy extends Pt{constructor(e=.5,n=1,i=32,r=1,s=0,o=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:n,thetaSegments:i,phiSegments:r,thetaStart:s,thetaLength:o},i=Math.max(3,i),r=Math.max(1,r);const a=[],l=[],c=[],u=[];let f=e;const p=(n-e)/r,m=new G,v=new le;for(let w=0;w<=r;w++){for(let x=0;x<=i;x++){const g=s+x/i*o;m.x=f*Math.cos(g),m.y=f*Math.sin(g),l.push(m.x,m.y,m.z),c.push(0,0,1),v.x=(m.x/n+1)/2,v.y=(m.y/n+1)/2,u.push(v.x,v.y)}f+=p}for(let w=0;w<r;w++){const x=w*(i+1);for(let g=0;g<i;g++){const _=g+x,y=_,M=_+i+1,E=_+i+2,C=_+1;a.push(y,M,C),a.push(M,E,C)}}this.setIndex(a),this.setAttribute("position",new lt(l,3)),this.setAttribute("normal",new lt(c,3)),this.setAttribute("uv",new lt(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Oy(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Uy extends Pt{constructor(e=new bc([new le(0,.5),new le(-.5,-.5),new le(.5,-.5)]),n=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:n};const i=[],r=[],s=[],o=[];let a=0,l=0;if(Array.isArray(e)===!1)c(e);else for(let u=0;u<e.length;u++)c(e[u]),this.addGroup(a,l,u),a+=l,l=0;this.setIndex(i),this.setAttribute("position",new lt(r,3)),this.setAttribute("normal",new lt(s,3)),this.setAttribute("uv",new lt(o,2));function c(u){const f=r.length/3,p=u.extractPoints(n);let m=p.shape;const v=p.holes;Eo.isClockWise(m)===!1&&(m=m.reverse());for(let x=0,g=v.length;x<g;x++){const _=v[x];Eo.isClockWise(_)===!0&&(v[x]=_.reverse())}const w=Eo.triangulateShape(m,v);for(let x=0,g=v.length;x<g;x++){const _=v[x];m=m.concat(_)}for(let x=0,g=m.length;x<g;x++){const _=m[x];r.push(_.x,_.y,0),s.push(0,0,1),o.push(_.x,_.y)}for(let x=0,g=w.length;x<g;x++){const _=w[x],y=_[0]+f,M=_[1]+f,E=_[2]+f;i.push(y,M,E),l+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes;return RJ(n,e)}static fromJSON(e,n){const i=[];for(let r=0,s=e.shapes.length;r<s;r++){const o=n[e.shapes[r]];i.push(o)}return new Uy(i,e.curveSegments)}}function RJ(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const r=t[n];e.shapes.push(r.uuid)}else e.shapes.push(t.uuid);return e}class am extends Pt{constructor(e=1,n=32,i=16,r=0,s=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:n,heightSegments:i,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},n=Math.max(3,Math.floor(n)),i=Math.max(2,Math.floor(i));const l=Math.min(o+a,Math.PI);let c=0;const u=[],f=new G,p=new G,m=[],v=[],w=[],x=[];for(let g=0;g<=i;g++){const _=[],y=g/i;let M=0;g===0&&o===0?M=.5/n:g===i&&l===Math.PI&&(M=-.5/n);for(let E=0;E<=n;E++){const C=E/n;f.x=-e*Math.cos(r+C*s)*Math.sin(o+y*a),f.y=e*Math.cos(o+y*a),f.z=e*Math.sin(r+C*s)*Math.sin(o+y*a),v.push(f.x,f.y,f.z),p.copy(f).normalize(),w.push(p.x,p.y,p.z),x.push(C+M,1-y),_.push(c++)}u.push(_)}for(let g=0;g<i;g++)for(let _=0;_<n;_++){const y=u[g][_+1],M=u[g][_],E=u[g+1][_],C=u[g+1][_+1];(g!==0||o>0)&&m.push(y,M,C),(g!==i-1||l<Math.PI)&&m.push(M,E,C)}this.setIndex(m),this.setAttribute("position",new lt(v,3)),this.setAttribute("normal",new lt(w,3)),this.setAttribute("uv",new lt(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new am(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class ky extends Cl{constructor(e=1,n=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,r,e,n),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new ky(e.radius,e.detail)}}class zy extends Pt{constructor(e=1,n=.4,i=12,r=48,s=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:n,radialSegments:i,tubularSegments:r,arc:s},i=Math.floor(i),r=Math.floor(r);const o=[],a=[],l=[],c=[],u=new G,f=new G,p=new G;for(let m=0;m<=i;m++)for(let v=0;v<=r;v++){const w=v/r*s,x=m/i*Math.PI*2;f.x=(e+n*Math.cos(x))*Math.cos(w),f.y=(e+n*Math.cos(x))*Math.sin(w),f.z=n*Math.sin(x),a.push(f.x,f.y,f.z),u.x=e*Math.cos(w),u.y=e*Math.sin(w),p.subVectors(f,u).normalize(),l.push(p.x,p.y,p.z),c.push(v/r),c.push(m/i)}for(let m=1;m<=i;m++)for(let v=1;v<=r;v++){const w=(r+1)*m+v-1,x=(r+1)*(m-1)+v-1,g=(r+1)*(m-1)+v,_=(r+1)*m+v;o.push(w,x,_),o.push(x,g,_)}this.setIndex(o),this.setAttribute("position",new lt(a,3)),this.setAttribute("normal",new lt(l,3)),this.setAttribute("uv",new lt(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new zy(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Hy extends Pt{constructor(e=1,n=.4,i=64,r=8,s=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:n,tubularSegments:i,radialSegments:r,p:s,q:o},i=Math.floor(i),r=Math.floor(r);const a=[],l=[],c=[],u=[],f=new G,p=new G,m=new G,v=new G,w=new G,x=new G,g=new G;for(let y=0;y<=i;++y){const M=y/i*s*Math.PI*2;_(M,s,o,e,m),_(M+.01,s,o,e,v),x.subVectors(v,m),g.addVectors(v,m),w.crossVectors(x,g),g.crossVectors(w,x),w.normalize(),g.normalize();for(let E=0;E<=r;++E){const C=E/r*Math.PI*2,P=-n*Math.cos(C),N=n*Math.sin(C);f.x=m.x+(P*g.x+N*w.x),f.y=m.y+(P*g.y+N*w.y),f.z=m.z+(P*g.z+N*w.z),l.push(f.x,f.y,f.z),p.subVectors(f,m).normalize(),c.push(p.x,p.y,p.z),u.push(y/i),u.push(E/r)}}for(let y=1;y<=i;y++)for(let M=1;M<=r;M++){const E=(r+1)*(y-1)+(M-1),C=(r+1)*y+(M-1),P=(r+1)*y+M,N=(r+1)*(y-1)+M;a.push(E,C,N),a.push(C,P,N)}this.setIndex(a),this.setAttribute("position",new lt(l,3)),this.setAttribute("normal",new lt(c,3)),this.setAttribute("uv",new lt(u,2));function _(y,M,E,C,P){const N=Math.cos(y),R=Math.sin(y),L=E/M*y,k=Math.cos(L);P.x=C*(2+k)*.5*N,P.y=C*(2+k)*R*.5,P.z=C*Math.sin(L)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Hy(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Gy extends Pt{constructor(e=new DE(new G(-1,-1,0),new G(-1,1,0),new G(1,1,0)),n=64,i=1,r=8,s=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:n,radius:i,radialSegments:r,closed:s};const o=e.computeFrenetFrames(n,s);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new G,l=new G,c=new le;let u=new G;const f=[],p=[],m=[],v=[];w(),this.setIndex(v),this.setAttribute("position",new lt(f,3)),this.setAttribute("normal",new lt(p,3)),this.setAttribute("uv",new lt(m,2));function w(){for(let y=0;y<n;y++)x(y);x(s===!1?n:0),_(),g()}function x(y){u=e.getPointAt(y/n,u);const M=o.normals[y],E=o.binormals[y];for(let C=0;C<=r;C++){const P=C/r*Math.PI*2,N=Math.sin(P),R=-Math.cos(P);l.x=R*M.x+N*E.x,l.y=R*M.y+N*E.y,l.z=R*M.z+N*E.z,l.normalize(),p.push(l.x,l.y,l.z),a.x=u.x+i*l.x,a.y=u.y+i*l.y,a.z=u.z+i*l.z,f.push(a.x,a.y,a.z)}}function g(){for(let y=1;y<=n;y++)for(let M=1;M<=r;M++){const E=(r+1)*(y-1)+(M-1),C=(r+1)*y+(M-1),P=(r+1)*y+M,N=(r+1)*(y-1)+M;v.push(E,C,N),v.push(C,P,N)}}function _(){for(let y=0;y<=n;y++)for(let M=0;M<=r;M++)c.x=y/n,c.y=M/r,m.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Gy(new e1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class QD extends Pt{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const n=[],i=new Set,r=new G,s=new G;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,u=l.length;c<u;++c){const f=l[c],p=f.start,m=f.count;for(let v=p,w=p+m;v<w;v+=3)for(let x=0;x<3;x++){const g=a.getX(v+x),_=a.getX(v+(x+1)%3);r.fromBufferAttribute(o,g),s.fromBufferAttribute(o,_),x4(r,s,i)===!0&&(n.push(r.x,r.y,r.z),n.push(s.x,s.y,s.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const u=3*a+c,f=3*a+(c+1)%3;r.fromBufferAttribute(o,u),s.fromBufferAttribute(o,f),x4(r,s,i)===!0&&(n.push(r.x,r.y,r.z),n.push(s.x,s.y,s.z))}}this.setAttribute("position",new lt(n,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function x4(t,e,n){const i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`;return n.has(i)===!0||n.has(r)===!0?!1:(n.add(i),n.add(r),!0)}var _4=Object.freeze({__proto__:null,BoxGeometry:eu,CapsuleGeometry:By,CircleGeometry:Ly,ConeGeometry:Iy,CylinderGeometry:Aa,DodecahedronGeometry:om,EdgesGeometry:XD,ExtrudeGeometry:Dy,IcosahedronGeometry:Fy,LatheGeometry:sm,OctahedronGeometry:ah,PlaneGeometry:nm,PolyhedronGeometry:Cl,RingGeometry:Oy,ShapeGeometry:Uy,SphereGeometry:am,TetrahedronGeometry:ky,TorusGeometry:zy,TorusKnotGeometry:Hy,TubeGeometry:Gy,WireframeGeometry:QD});class ZD extends Kn{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 qD extends Yn{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class No extends Kn{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=bl,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,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.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 No{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 le(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(n){this.ior=(1+.4*n)/(1-.4*n)}}),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._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 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.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 $D extends Kn{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=bl,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Zp,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class e6 extends Kn{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=bl,this.normalScale=new le(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 OE extends Kn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bl,this.normalScale=new le(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 t6 extends Kn{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=bl,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Zp,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class n6 extends Kn{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=bl,this.normalScale=new le(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 i6 extends Yi{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 mc(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function r6(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function s6(t){function e(r,s){return t[r]-t[s]}const n=t.length,i=new Array(n);for(let r=0;r!==n;++r)i[r]=r;return i.sort(e),i}function Hw(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,o=0;o!==i;++s){const a=n[s]*e;for(let l=0;l!==e;++l)r[o++]=t[a+l]}return r}function UE(t,e,n,i){let r=1,s=t[0];for(;s!==void 0&&s[i]===void 0;)s=t[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),n.push.apply(n,o)),s=t[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(n,n.length)),s=t[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),n.push(o)),s=t[r++];while(s!==void 0)}function PJ(t,e,n,i,r=30){const s=t.clone();s.name=e;const o=[];for(let l=0;l<s.tracks.length;++l){const c=s.tracks[l],u=c.getValueSize(),f=[],p=[];for(let m=0;m<c.times.length;++m){const v=c.times[m]*r;if(!(v<n||v>=i)){f.push(c.times[m]);for(let w=0;w<u;++w)p.push(c.values[m*u+w])}}f.length!==0&&(c.times=mc(f,c.times.constructor),c.values=mc(p,c.values.constructor),o.push(c))}s.tracks=o;let a=1/0;for(let l=0;l<s.tracks.length;++l)a>s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l<s.tracks.length;++l)s.tracks[l].shift(-1*a);return s.resetDuration(),s}function BJ(t,e=0,n=t,i=30){i<=0&&(i=30);const r=n.tracks.length,s=e/i;for(let o=0;o<r;++o){const a=n.tracks[o],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const c=t.tracks.find(function(g){return g.name===a.name&&g.ValueTypeName===l});if(c===void 0)continue;let u=0;const f=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=f/3);let p=0;const m=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=m/3);const v=a.times.length-1;let w;if(s<=a.times[0]){const g=u,_=f-u;w=a.values.slice(g,_)}else if(s>=a.times[v]){const g=v*f+u,_=g+f-u;w=a.values.slice(g,_)}else{const g=a.createInterpolant(),_=u,y=f-u;g.evaluate(s),w=g.resultBuffer.slice(_,y)}l==="quaternion"&&new wi().fromArray(w).normalize().conjugate().toArray(w);const x=c.times.length;for(let g=0;g<x;++g){const _=g*m+p;if(l==="quaternion")wi.multiplyQuaternionsFlat(c.values,_,w,0,c.values,_);else{const y=m-p*2;for(let M=0;M<y;++M)c.values[_+M]-=w[M]}}}return t.blendMode=pE,t}const LJ={convertArray:mc,isTypedArray:r6,getKeyframeOrder:s6,sortedArray:Hw,flattenJSON:UE,subclip:PJ,makeClipAdditive:BJ};class lh{constructor(e,n,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new n.constructor(i),this.sampleValues=n,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let i=this._cachedIndex,r=n[i],s=n[i-1];e:{t:{let o;n:{i:if(!(e<r)){for(let a=i+2;;){if(r===void 0){if(e<s)break i;return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(s=r,r=n[++i],e<r)break t}o=n.length;break n}if(!(e>=s)){const a=n[1];e<a&&(i=2,s=a);for(let l=i-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(r=s,s=n[--i-1],e>=s)break t}o=i,i=0;break n}break e}for(;i<o;){const a=i+o>>>1;e<n[a]?o=a:i=a+1}if(r=n[i],s=n[i-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,s,r)}return this.interpolate_(i,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const n=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r;for(let o=0;o!==r;++o)n[o]=i[s+o];return n}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class o6 extends lh{constructor(e,n,i,r){super(e,n,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:hc,endingEnd:hc}}intervalChanged_(e,n,i){const r=this.parameterPositions;let s=e-2,o=e+1,a=r[s],l=r[o];if(a===void 0)switch(this.getSettings_().endingStart){case dc:s=e,a=2*n-i;break;case vp:s=r.length-2,a=n+r[s]-r[s+1];break;default:s=e,a=i}if(l===void 0)switch(this.getSettings_().endingEnd){case dc:o=e,l=2*i-n;break;case vp:o=1,l=i+r[1]-r[0];break;default:o=e-1,l=n}const c=(i-n)*.5,u=this.valueSize;this._weightPrev=c/(n-a),this._weightNext=c/(l-i),this._offsetPrev=s*u,this._offsetNext=o*u}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=this._offsetPrev,f=this._offsetNext,p=this._weightPrev,m=this._weightNext,v=(i-n)/(r-n),w=v*v,x=w*v,g=-p*x+2*p*w-p*v,_=(1+p)*x+(-1.5-2*p)*w+(-.5+p)*v+1,y=(-1-m)*x+(1.5+m)*w+.5*v,M=m*x-m*w;for(let E=0;E!==a;++E)s[E]=g*o[u+E]+_*o[c+E]+y*o[l+E]+M*o[f+E];return s}}class kE extends lh{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=(i-n)/(r-n),f=1-u;for(let p=0;p!==a;++p)s[p]=o[c+p]*f+o[l+p]*u;return s}}class a6 extends lh{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class io{constructor(e,n,i,r){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(n===void 0||n.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=mc(n,this.TimeBufferType),this.values=mc(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const n=e.constructor;let i;if(n.toJSON!==this.toJSON)i=n.toJSON(e);else{i={name:e.name,times:mc(e.times,Array),values:mc(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new a6(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new kE(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new o6(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let n;switch(e){case Vf:n=this.InterpolantFactoryMethodDiscrete;break;case Fc:n=this.InterpolantFactoryMethodLinear;break;case ov:n=this.InterpolantFactoryMethodSmooth;break}if(n===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=n,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Vf;case this.InterpolantFactoryMethodLinear:return Fc;case this.InterpolantFactoryMethodSmooth:return ov}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]+=e}return this}scale(e){if(e!==1){const n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]*=e}return this}trim(e,n){const i=this.times,r=i.length;let s=0,o=r-1;for(;s!==r&&i[s]<e;)++s;for(;o!==-1&&i[o]>n;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&r6(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===ov,s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const c=e[a],u=e[a+1];if(c!==u&&(a!==1||c!==e[0]))if(r)l=!0;else{const f=a*i,p=f-i,m=f+i;for(let v=0;v!==i;++v){const w=n[f+v];if(w!==n[p+v]||w!==n[m+v]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const f=a*i,p=o*i;for(let m=0;m!==i;++m)n[p+m]=n[f+m]}++o}}if(s>0){e[o]=e[s];for(let a=s*i,l=o*i,c=0;c!==i;++c)n[l+c]=n[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*i)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),i=this.constructor,r=new i(this.name,e,n);return r.createInterpolant=this.createInterpolant,r}}io.prototype.TimeBufferType=Float32Array;io.prototype.ValueBufferType=Float32Array;io.prototype.DefaultInterpolation=Fc;class tu extends io{}tu.prototype.ValueTypeName="bool";tu.prototype.ValueBufferType=Array;tu.prototype.DefaultInterpolation=Vf;tu.prototype.InterpolantFactoryMethodLinear=void 0;tu.prototype.InterpolantFactoryMethodSmooth=void 0;class zE extends io{}zE.prototype.ValueTypeName="color";class kc extends io{}kc.prototype.ValueTypeName="number";class l6 extends lh{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-n)/(r-n);let c=e*a;for(let u=c+a;c!==u;c+=4)wi.slerpFlat(s,0,o,c-a,o,c,l);return s}}class _l extends io{InterpolantFactoryMethodLinear(e){return new l6(this.times,this.values,this.getValueSize(),e)}}_l.prototype.ValueTypeName="quaternion";_l.prototype.DefaultInterpolation=Fc;_l.prototype.InterpolantFactoryMethodSmooth=void 0;class nu extends io{}nu.prototype.ValueTypeName="string";nu.prototype.ValueBufferType=Array;nu.prototype.DefaultInterpolation=Vf;nu.prototype.InterpolantFactoryMethodLinear=void 0;nu.prototype.InterpolantFactoryMethodSmooth=void 0;class zc extends io{}zc.prototype.ValueTypeName="vector";class Xf{constructor(e,n=-1,i,r=yy){this.name=e,this.tracks=i,this.duration=n,this.blendMode=r,this.uuid=Jr(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)n.push(NJ(i[o]).scale(r));const s=new this(e.name,e.duration,n,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const n=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)n.push(io.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,n,i,r){const s=n.length,o=[];for(let a=0;a<s;a++){let l=[],c=[];l.push((a+s-1)%s,a,(a+1)%s),c.push(0,1,0);const u=s6(l);l=Hw(l,1,u),c=Hw(c,1,u),!r&&l[0]===0&&(l.push(s),c.push(c[0])),o.push(new kc(".morphTargetInfluences["+n[a].name+"]",l,c).scale(1/i))}return new this(e,-1,o)}static findByName(e,n){let i=e;if(!Array.isArray(e)){const r=e;i=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<i.length;r++)if(i[r].name===n)return i[r];return null}static CreateClipsFromMorphTargetSequences(e,n,i){const r={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],u=c.name.match(s);if(u&&u.length>1){const f=u[1];let p=r[f];p||(r[f]=p=[]),p.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],n,i));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(f,p,m,v,w){if(m.length!==0){const x=[],g=[];UE(m,x,g,v),x.length!==0&&w.push(new f(p,x,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f<c.length;f++){const p=c[f].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 w=0;w<p[v].morphTargets.length;w++)m[p[v].morphTargets[w]]=-1;for(const w in m){const x=[],g=[];for(let _=0;_!==p[v].morphTargets.length;++_){const y=p[v];x.push(y.time),g.push(y.morphTarget===w?1:0)}r.push(new kc(".morphTargetInfluence["+w+"]",x,g))}l=m.length*o}else{const m=".bones["+n[f].name+"]";i(zc,m+".position",p,"pos",r),i(_l,m+".quaternion",p,"rot",r),i(zc,m+".scale",p,"scl",r)}}return r.length===0?null:new this(s,l,r,a)}resetDuration(){const e=this.tracks;let n=0;for(let i=0,r=e.length;i!==r;++i){const s=this.tracks[i];n=Math.max(n,s.times[s.times.length-1])}return this.duration=n,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 n=0;n<this.tracks.length;n++)e=e&&this.tracks[n].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function IJ(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return kc;case"vector":case"vector2":case"vector3":case"vector4":return zc;case"color":return zE;case"quaternion":return _l;case"bool":case"boolean":return tu;case"string":return nu}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function NJ(t){if(t.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=IJ(t.type);if(t.times===void 0){const n=[],i=[];UE(t.keys,n,i,"value"),t.times=n,t.values=i}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const Hc={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class HE{constructor(e,n,i){const r=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=i,this.itemStart=function(u){a++,s===!1&&r.onStart!==void 0&&r.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,r.onProgress!==void 0&&r.onProgress(u,o,a),o===a&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(u){r.onError!==void 0&&r.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,f){return c.push(u,f),this},this.removeHandler=function(u){const f=c.indexOf(u);return f!==-1&&c.splice(f,2),this},this.getHandler=function(u){for(let f=0,p=c.length;f<p;f+=2){const m=c[f],v=c[f+1];if(m.global&&(m.lastIndex=0),m.test(u))return v}return null}}}const c6=new HE;let Qi=class{constructor(e){this.manager=e!==void 0?e:c6,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){const i=this;return new Promise(function(r,s){i.load(e,r,n,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}};Qi.DEFAULT_MATERIAL_NAME="__DEFAULT";const Zo={};class DJ extends Error{constructor(e,n){super(e),this.response=n}}class Qr extends Qi{constructor(e){super(e)}load(e,n,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=Hc.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{n&&n(s),this.manager.itemEnd(e)},0),s;if(Zo[e]!==void 0){Zo[e].push({onLoad:n,onProgress:i,onError:r});return}Zo[e]=[],Zo[e].push({onLoad:n,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=Zo[e],f=c.body.getReader(),p=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),m=p?parseInt(p):0,v=m!==0;let w=0;const x=new ReadableStream({start(g){_();function _(){f.read().then(({done:y,value:M})=>{if(y)g.close();else{w+=M.byteLength;const E=new ProgressEvent("progress",{lengthComputable:v,loaded:w,total:m});for(let C=0,P=u.length;C<P;C++){const N=u[C];N.onProgress&&N.onProgress(E)}g.enqueue(M),_()}})}}});return new Response(x)}else throw new DJ(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),p=f&&f[1]?f[1].toLowerCase():void 0,m=new TextDecoder(p);return c.arrayBuffer().then(v=>m.decode(v))}}}).then(c=>{Hc.add(e,c);const u=Zo[e];delete Zo[e];for(let f=0,p=u.length;f<p;f++){const m=u[f];m.onLoad&&m.onLoad(c)}}).catch(c=>{const u=Zo[e];if(u===void 0)throw this.manager.itemError(e),c;delete Zo[e];for(let f=0,p=u.length;f<p;f++){const m=u[f];m.onError&&m.onError(c)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class FJ extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new Qr(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const n=[];for(let i=0;i<e.length;i++){const r=Xf.parse(e[i]);n.push(r)}return n}}class OJ extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=[],a=new Ry,l=new Qr(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(s.withCredentials);let c=0;function u(f){l.load(e[f],function(p){const m=s.parse(p,!0);o[f]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps},c+=1,c===6&&(m.mipmapCount===1&&(a.minFilter=gn),a.image=o,a.format=m.format,a.needsUpdate=!0,n&&n(a))},i,r)}if(Array.isArray(e))for(let f=0,p=e.length;f<p;++f)u(f);else l.load(e,function(f){const p=s.parse(f,!0);if(p.isCubemap){const m=p.mipmaps.length/p.mipmapCount;for(let v=0;v<m;v++){o[v]={mipmaps:[]};for(let w=0;w<p.mipmapCount;w++)o[v].mipmaps.push(p.mipmaps[v*p.mipmapCount+w]),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=gn),a.format=p.format,a.needsUpdate=!0,n&&n(a)},i,r);return a}}class Rp extends Qi{constructor(e){super(e)}load(e,n,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Hc.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o;const a=Ap("img");function l(){u(),Hc.add(e,this),n&&n(this),s.manager.itemEnd(e)}function c(f){u(),r&&r(f),s.manager.itemError(e),s.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class UJ extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=new tm;s.colorSpace=jt;const o=new Rp(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function l(c){o.load(e[c],function(u){s.images[c]=u,a++,a===6&&(s.needsUpdate=!0,n&&n(s))},void 0,r)}for(let c=0;c<e.length;++c)l(c);return s}}class kJ extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new Cf,a=new Qr(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(s.withCredentials),a.load(e,function(l){let c;try{c=s.parse(l)}catch(u){if(r!==void 0)r(u);else{console.error(u);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:Ci,o.wrapT=c.wrapT!==void 0?c.wrapT:Ci,o.magFilter=c.magFilter!==void 0?c.magFilter:gn,o.minFilter=c.minFilter!==void 0?c.minFilter:gn,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0?o.colorSpace=c.colorSpace:c.encoding!==void 0&&(o.encoding=c.encoding),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=Po),c.mipmapCount===1&&(o.minFilter=gn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,n&&n(o,c)},i,r),o}}class u6 extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=new Mn,o=new Rp(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,n!==void 0&&n(s)},i,r),s}}class Rl extends Kt{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new He(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}class f6 extends Rl{constructor(e,n,i){super(e,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Kt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new He(n)}copy(e,n){return super.copy(e,n),this.groundColor.copy(e.groundColor),this}}const h2=new Et,S4=new G,w4=new G;class GE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new le(512,512),this.map=null,this.mapPass=null,this.matrix=new Et,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new wy,this._frameExtents=new le(1,1),this._viewportCount=1,this._viewports=[new on(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,i=this.matrix;S4.setFromMatrixPosition(e.matrixWorld),n.position.copy(S4),w4.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(w4),n.updateMatrixWorld(),h2.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(h2),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(h2)}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 zJ extends GE{constructor(){super(new xn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,i=jf*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||n.far;(i!==n.fov||r!==n.aspect||s!==n.far)&&(n.fov=i,n.aspect=r,n.far=s,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class VE extends Rl{constructor(e,n,i=0,r=Math.PI/3,s=0,o=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Kt.DEFAULT_UP),this.updateMatrix(),this.target=new Kt,this.distance=i,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new zJ}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),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 A4=new Et,qh=new G,d2=new G;class HJ extends GE{constructor(){super(new xn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new le(4,2),this._viewportCount=6,this._viewports=[new on(2,1,1,1),new on(0,1,1,1),new on(3,1,1,1),new on(1,1,1,1),new on(3,0,1,1),new on(1,0,1,1)],this._cubeDirections=[new G(1,0,0),new G(-1,0,0),new G(0,0,1),new G(0,0,-1),new G(0,1,0),new G(0,-1,0)],this._cubeUps=[new G(0,1,0),new G(0,1,0),new G(0,1,0),new G(0,1,0),new G(0,0,1),new G(0,0,-1)]}updateMatrices(e,n=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),qh.setFromMatrixPosition(e.matrixWorld),i.position.copy(qh),d2.copy(i.position),d2.add(this._cubeDirections[n]),i.up.copy(this._cubeUps[n]),i.lookAt(d2),i.updateMatrixWorld(),r.makeTranslation(-qh.x,-qh.y,-qh.z),A4.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(A4)}}class jE extends Rl{constructor(e,n,i=0,r=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new HJ}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class GJ extends GE{constructor(){super(new vs(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class WE extends Rl{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Kt.DEFAULT_UP),this.updateMatrix(),this.target=new Kt,this.shadow=new GJ}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class h6 extends Rl{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class d6 extends Rl{constructor(e,n,i=10,r=10){super(e,n),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const n=super.toJSON(e);return n.object.width=this.width,n.object.height=this.height,n}}class p6{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new G)}set(e){for(let n=0;n<9;n++)this.coefficients[n].copy(e[n]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,n){const i=e.x,r=e.y,s=e.z,o=this.coefficients;return n.copy(o[0]).multiplyScalar(.282095),n.addScaledVector(o[1],.488603*r),n.addScaledVector(o[2],.488603*s),n.addScaledVector(o[3],.488603*i),n.addScaledVector(o[4],1.092548*(i*r)),n.addScaledVector(o[5],1.092548*(r*s)),n.addScaledVector(o[6],.315392*(3*s*s-1)),n.addScaledVector(o[7],1.092548*(i*s)),n.addScaledVector(o[8],.546274*(i*i-r*r)),n}getIrradianceAt(e,n){const i=e.x,r=e.y,s=e.z,o=this.coefficients;return n.copy(o[0]).multiplyScalar(.886227),n.addScaledVector(o[1],2*.511664*r),n.addScaledVector(o[2],2*.511664*s),n.addScaledVector(o[3],2*.511664*i),n.addScaledVector(o[4],2*.429043*i*r),n.addScaledVector(o[5],2*.429043*r*s),n.addScaledVector(o[6],.743125*s*s-.247708),n.addScaledVector(o[7],2*.429043*i*s),n.addScaledVector(o[8],.429043*(i*i-r*r)),n}add(e){for(let n=0;n<9;n++)this.coefficients[n].add(e.coefficients[n]);return this}addScaledSH(e,n){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],n);return this}scale(e){for(let n=0;n<9;n++)this.coefficients[n].multiplyScalar(e);return this}lerp(e,n){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],n);return this}equals(e){for(let n=0;n<9;n++)if(!this.coefficients[n].equals(e.coefficients[n]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,n=0){const i=this.coefficients;for(let r=0;r<9;r++)i[r].fromArray(e,n+r*3);return this}toArray(e=[],n=0){const i=this.coefficients;for(let r=0;r<9;r++)i[r].toArray(e,n+r*3);return e}static getBasisAt(e,n){const i=e.x,r=e.y,s=e.z;n[0]=.282095,n[1]=.488603*r,n[2]=.488603*s,n[3]=.488603*i,n[4]=1.092548*i*r,n[5]=1.092548*r*s,n[6]=.315392*(3*s*s-1),n[7]=1.092548*i*s,n[8]=.546274*(i*i-r*r)}}class m6 extends Rl{constructor(e=new p6,n=1){super(void 0,n),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 n=super.toJSON(e);return n.object.sh=this.sh.toArray(),n}}class Vy extends Qi{constructor(e){super(e),this.textures={}}load(e,n,i,r){const s=this,o=new Qr(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const n=this.textures;function i(s){return n[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),n[s]}const r=Vy.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.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.depthTest!==void 0&&(r.depthTest=e.depthTest),e.depthWrite!==void 0&&(r.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(r.colorWrite=e.colorWrite),e.stencilWrite!==void 0&&(r.stencilWrite=e.stencilWrite),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.wireframe!==void 0&&(r.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(r.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(r.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(r.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(r.rotation=e.rotation),e.linewidth!==void 0&&(r.linewidth=e.linewidth),e.dashSize!==void 0&&(r.dashSize=e.dashSize),e.gapSize!==void 0&&(r.gapSize=e.gapSize),e.scale!==void 0&&(r.scale=e.scale),e.polygonOffset!==void 0&&(r.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(r.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(r.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(r.dithering=e.dithering),e.alphaToCoverage!==void 0&&(r.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(r.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(r.forceSinglePass=e.forceSinglePass),e.visible!==void 0&&(r.visible=e.visible),e.toneMapped!==void 0&&(r.toneMapped=e.toneMapped),e.userData!==void 0&&(r.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new He().setHex(o.value);break;case"v2":r.uniforms[s].value=new le().fromArray(o.value);break;case"v3":r.uniforms[s].value=new G().fromArray(o.value);break;case"v4":r.uniforms[s].value=new on().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Ft().fromArray(o.value);break;case"m4":r.uniforms[s].value=new Et().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new le().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new le().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:ZD,SpriteMaterial:TE,RawShaderMaterial:qD,ShaderMaterial:Yn,PointsMaterial:Cy,MeshPhysicalMaterial:Es,MeshStandardMaterial:No,MeshPhongMaterial:$D,MeshToonMaterial:e6,MeshNormalMaterial:OE,MeshLambertMaterial:t6,MeshDepthMaterial:My,MeshDistanceMaterial:AE,MeshBasicMaterial:jr,MeshMatcapMaterial:n6,LineDashedMaterial:i6,LineBasicMaterial:Yi,Material:Kn};return new n[e]}}class dl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let i=0,r=e.length;i<r;i++)n+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(n))}catch{return n}}static extractUrlBase(e){const n=e.lastIndexOf("/");return n===-1?"./":e.slice(0,n+1)}static resolveURL(e,n){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(n)&&/^\//.test(e)&&(n=n.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:n+e)}}class g6 extends Pt{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 v6 extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new Qr(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{n(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const n={},i={};function r(m,v){if(n[v]!==void 0)return n[v];const x=m.interleavedBuffers[v],g=s(m,x.buffer),_=lf(x.type,g),y=new im(_,x.stride);return y.uuid=x.uuid,n[v]=y,y}function s(m,v){if(i[v]!==void 0)return i[v];const x=m.arrayBuffers[v],g=new Uint32Array(x).buffer;return i[v]=g,g}const o=e.isInstancedBufferGeometry?new g6:new Pt,a=e.data.index;if(a!==void 0){const m=lf(a.type,a.array);o.setIndex(new Zt(m,1))}const l=e.data.attributes;for(const m in l){const v=l[m];let w;if(v.isInterleavedBufferAttribute){const x=r(e.data,v.data);w=new xl(x,v.itemSize,v.offset,v.normalized)}else{const x=lf(v.type,v.array),g=v.isInstancedBufferAttribute?Oc:Zt;w=new g(x,v.itemSize,v.normalized)}v.name!==void 0&&(w.name=v.name),v.usage!==void 0&&w.setUsage(v.usage),v.updateRange!==void 0&&(w.updateRange.offset=v.updateRange.offset,w.updateRange.count=v.updateRange.count),o.setAttribute(m,w)}const c=e.data.morphAttributes;if(c)for(const m in c){const v=c[m],w=[];for(let x=0,g=v.length;x<g;x++){const _=v[x];let y;if(_.isInterleavedBufferAttribute){const M=r(e.data,_.data);y=new xl(M,_.itemSize,_.offset,_.normalized)}else{const M=lf(_.type,_.array);y=new Zt(M,_.itemSize,_.normalized)}_.name!==void 0&&(y.name=_.name),w.push(y)}o.morphAttributes[m]=w}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const f=e.data.groups||e.data.drawcalls||e.data.offsets;if(f!==void 0)for(let m=0,v=f.length;m!==v;++m){const w=f[m];o.addGroup(w.start,w.count,w.materialIndex)}const p=e.data.boundingSphere;if(p!==void 0){const m=new G;p.center!==void 0&&m.fromArray(p.center),o.boundingSphere=new Ms(m,p.radius)}return e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class VJ extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=this.path===""?dl.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new Qr(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){let c=null;try{c=JSON.parse(l)}catch(f){r!==void 0&&r(f),console.error("THREE:ObjectLoader: Can't parse "+e+".",f.message);return}const u=c.metadata;if(u===void 0||u.type===void 0||u.type.toLowerCase()==="geometry"){r!==void 0&&r(new Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}s.parse(c,n)},i,r)}async loadAsync(e,n){const i=this,r=this.path===""?dl.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||r;const s=new Qr(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials);const o=await s.loadAsync(e,n),a=JSON.parse(o),l=a.metadata;if(l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await i.parseAsync(a)}parse(e,n){const i=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,function(){n!==void 0&&n(c)}),a=this.parseTextures(e.textures,o),l=this.parseMaterials(e.materials,a),c=this.parseObject(e.object,s,l,a,i),u=this.parseSkeletons(e.skeletons,c);if(this.bindSkeletons(c,u),n!==void 0){let f=!1;for(const p in o)if(o[p].data instanceof HTMLImageElement){f=!0;break}f===!1&&n(c)}return c}async parseAsync(e){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),s=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,s),a=this.parseMaterials(e.materials,o),l=this.parseObject(e.object,r,a,o,n),c=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,c),l}parseShapes(e){const n={};if(e!==void 0)for(let i=0,r=e.length;i<r;i++){const s=new bc().fromJSON(e[i]);n[s.uuid]=s}return n}parseSkeletons(e,n){const i={},r={};if(n.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 rm().fromJSON(e[s],r);i[a.uuid]=a}return i}parseGeometries(e,n){const i={};if(e!==void 0){const r=new v6;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 _4?a=_4[l.type].fromJSON(l,n):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${l.type}"`)}a.uuid=l.uuid,l.name!==void 0&&(a.name=l.name),l.userData!==void 0&&(a.userData=l.userData),i[l.uuid]=a}}return i}parseMaterials(e,n){const i={},r={};if(e!==void 0){const s=new Vy;s.setTextures(n);for(let o=0,a=e.length;o<a;o++){const l=e[o];i[l.uuid]===void 0&&(i[l.uuid]=s.parse(l)),r[l.uuid]=i[l.uuid]}}return r}parseAnimations(e){const n={};if(e!==void 0)for(let i=0;i<e.length;i++){const r=e[i],s=Xf.parse(r);n[s.uuid]=s}return n}parseImages(e,n){const i=this,r={};let s;function o(l){return i.manager.itemStart(l),s.load(l,function(){i.manager.itemEnd(l)},void 0,function(){i.manager.itemError(l),i.manager.itemEnd(l)})}function a(l){if(typeof l=="string"){const c=l,u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c)?c:i.resourcePath+c;return o(u)}else return l.data?{data:lf(l.type,l.data),width:l.width,height:l.height}:null}if(e!==void 0&&e.length>0){const l=new HE(n);s=new Rp(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c<u;c++){const f=e[c],p=f.url;if(Array.isArray(p)){const m=[];for(let v=0,w=p.length;v<w;v++){const x=p[v],g=a(x);g!==null&&(g instanceof HTMLImageElement?m.push(g):m.push(new Cf(g.data,g.width,g.height)))}r[f.uuid]=new pc(m)}else{const m=a(f.url);r[f.uuid]=new pc(m)}}}return r}async parseImagesAsync(e){const n=this,i={};let r;async function s(o){if(typeof o=="string"){const a=o,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:n.resourcePath+a;return await r.loadAsync(l)}else return o.data?{data:lf(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){r=new Rp(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.url;if(Array.isArray(c)){const u=[];for(let f=0,p=c.length;f<p;f++){const m=c[f],v=await s(m);v!==null&&(v instanceof HTMLImageElement?u.push(v):u.push(new Cf(v.data,v.width,v.height)))}i[l.uuid]=new pc(u)}else{const u=await s(l.url);i[l.uuid]=new pc(u)}}}return i}parseTextures(e,n){function i(s,o){return typeof s=="number"?s:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",s),o[s])}const r={};if(e!==void 0)for(let s=0,o=e.length;s<o;s++){const a=e[s];a.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),n[a.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const l=n[a.image],c=l.data;let u;Array.isArray(c)?(u=new tm,c.length===6&&(u.needsUpdate=!0)):(c&&c.data?u=new Cf:u=new Mn,c&&(u.needsUpdate=!0)),u.source=l,u.uuid=a.uuid,a.name!==void 0&&(u.name=a.name),a.mapping!==void 0&&(u.mapping=i(a.mapping,jJ)),a.channel!==void 0&&(u.channel=a.channel),a.offset!==void 0&&u.offset.fromArray(a.offset),a.repeat!==void 0&&u.repeat.fromArray(a.repeat),a.center!==void 0&&u.center.fromArray(a.center),a.rotation!==void 0&&(u.rotation=a.rotation),a.wrap!==void 0&&(u.wrapS=i(a.wrap[0],M4),u.wrapT=i(a.wrap[1],M4)),a.format!==void 0&&(u.format=a.format),a.internalFormat!==void 0&&(u.internalFormat=a.internalFormat),a.type!==void 0&&(u.type=a.type),a.colorSpace!==void 0&&(u.colorSpace=a.colorSpace),a.encoding!==void 0&&(u.encoding=a.encoding),a.minFilter!==void 0&&(u.minFilter=i(a.minFilter,E4)),a.magFilter!==void 0&&(u.magFilter=i(a.magFilter,E4)),a.anisotropy!==void 0&&(u.anisotropy=a.anisotropy),a.flipY!==void 0&&(u.flipY=a.flipY),a.generateMipmaps!==void 0&&(u.generateMipmaps=a.generateMipmaps),a.premultiplyAlpha!==void 0&&(u.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(u.unpackAlignment=a.unpackAlignment),a.compareFunction!==void 0&&(u.compareFunction=a.compareFunction),a.userData!==void 0&&(u.userData=a.userData),r[a.uuid]=u}return r}parseObject(e,n,i,r,s){let o;function a(p){return n[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",p),n[p]}function l(p){if(p!==void 0){if(Array.isArray(p)){const m=[];for(let v=0,w=p.length;v<w;v++){const x=p[v];i[x]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",x),m.push(i[x])}return m}return i[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",p),i[p]}}function c(p){return r[p]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",p),r[p]}let u,f;switch(e.type){case"Scene":o=new Mp,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new He(e.background):o.background=c(e.background)),e.environment!==void 0&&(o.environment=c(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?o.fog=new Ty(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new Ey(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);break;case"PerspectiveCamera":o=new xn(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 vs(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 h6(e.color,e.intensity);break;case"DirectionalLight":o=new WE(e.color,e.intensity);break;case"PointLight":o=new jE(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new d6(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new VE(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new f6(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=new m6().fromJSON(e);break;case"SkinnedMesh":u=a(e.geometry),f=l(e.material),o=new bE(u,f),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":u=a(e.geometry),f=l(e.material),o=new ui(u,f);break;case"InstancedMesh":u=a(e.geometry),f=l(e.material);const p=e.count,m=e.instanceMatrix,v=e.instanceColor;o=new CE(u,f,p),o.instanceMatrix=new Oc(new Float32Array(m.array),16),v!==void 0&&(o.instanceColor=new Oc(new Float32Array(v.array),v.itemSize));break;case"LOD":o=new zD;break;case"Line":o=new ya(a(e.geometry),l(e.material));break;case"LineLoop":o=new RE(a(e.geometry),l(e.material));break;case"LineSegments":o=new to(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new PE(a(e.geometry),l(e.material));break;case"Sprite":o=new kD(l(e.material));break;case"Group":o=new aa;break;case"Bone":o=new by;break;default:o=new Kt}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],n,i,r,s))}if(e.animations!==void 0){const p=e.animations;for(let m=0;m<p.length;m++){const v=p[m];o.animations.push(s[v])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(o.autoUpdate=e.autoUpdate);const p=e.levels;for(let m=0;m<p.length;m++){const v=p[m],w=o.getObjectByProperty("uuid",v.object);w!==void 0&&o.addLevel(w,v.distance,v.hysteresis)}}return o}bindSkeletons(e,n){Object.keys(n).length!==0&&e.traverse(function(i){if(i.isSkinnedMesh===!0&&i.skeleton!==void 0){const r=n[i.skeleton];r===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",i.skeleton):i.bind(r,i.bindMatrix)}})}}const jJ={UVMapping:my,CubeReflectionMapping:va,CubeRefractionMapping:gl,EquirectangularReflectionMapping:pp,EquirectangularRefractionMapping:mp,CubeUVReflectionMapping:sh},M4={RepeatWrapping:vl,ClampToEdgeWrapping:Ci,MirroredRepeatWrapping:Gf},E4={NearestFilter:fn,NearestMipmapNearestFilter:gp,NearestMipmapLinearFilter:Tf,LinearFilter:gn,LinearMipmapNearestFilter:gy,LinearMipmapLinearFilter:Po};class y6 extends Qi{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,n,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Hc.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){Hc.add(e,l),n&&n(l),s.manager.itemEnd(e)}).catch(function(l){r&&r(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}let mg;class XE{static getContext(){return mg===void 0&&(mg=new(window.AudioContext||window.webkitAudioContext)),mg}static setContext(e){mg=e}}class WJ extends Qi{constructor(e){super(e)}load(e,n,i,r){const s=this,o=new Qr(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);XE.getContext().decodeAudioData(c,function(f){n(f)},a)}catch(c){a(c)}},i,r);function a(l){r?r(l):console.error(l),s.manager.itemError(e)}}}const T4=new Et,b4=new Et,jl=new Et;class XJ{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new xn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new xn,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 n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,jl.copy(e.projectionMatrix);const r=n.eyeSep/2,s=r*n.near/n.focus,o=n.near*Math.tan(Mc*n.fov*.5)/n.zoom;let a,l;b4.elements[12]=-r,T4.elements[12]=r,a=-o*n.aspect+s,l=o*n.aspect+s,jl.elements[0]=2*n.near/(l-a),jl.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(jl),a=-o*n.aspect-s,l=o*n.aspect-s,jl.elements[0]=2*n.near/(l-a),jl.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(jl)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(b4),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(T4)}}class JE{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=C4(),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 n=C4();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function C4(){return(typeof performance>"u"?Date:performance).now()}const Wl=new G,R4=new wi,JJ=new G,Xl=new G;class KJ extends Kt{constructor(){super(),this.type="AudioListener",this.context=XE.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new JE}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 n=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Wl,R4,JJ),Xl.set(0,0,-1).applyQuaternion(R4),n.positionX){const r=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(Wl.x,r),n.positionY.linearRampToValueAtTime(Wl.y,r),n.positionZ.linearRampToValueAtTime(Wl.z,r),n.forwardX.linearRampToValueAtTime(Xl.x,r),n.forwardY.linearRampToValueAtTime(Xl.y,r),n.forwardZ.linearRampToValueAtTime(Xl.z,r),n.upX.linearRampToValueAtTime(i.x,r),n.upY.linearRampToValueAtTime(i.y,r),n.upZ.linearRampToValueAtTime(i.z,r)}else n.setPosition(Wl.x,Wl.y,Wl.z),n.setOrientation(Xl.x,Xl.y,Xl.z,i.x,i.y,i.z)}}let x6=class extends Kt{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 n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,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,n=this.filters.length;e<n;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,n=this.filters.length;e<n;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){if(this.detune=e,this.source.detune!==void 0)return this.isPlaying===!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 Jl=new G,P4=new wi,YJ=new G,Kl=new G;class QJ extends x6{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,n,i){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=n,this.panner.coneOuterGain=i,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Jl,P4,YJ),Kl.set(0,0,1).applyQuaternion(P4);const n=this.panner;if(n.positionX){const i=this.context.currentTime+this.listener.timeDelta;n.positionX.linearRampToValueAtTime(Jl.x,i),n.positionY.linearRampToValueAtTime(Jl.y,i),n.positionZ.linearRampToValueAtTime(Jl.z,i),n.orientationX.linearRampToValueAtTime(Kl.x,i),n.orientationY.linearRampToValueAtTime(Kl.y,i),n.orientationZ.linearRampToValueAtTime(Kl.z,i)}else n.setPosition(Jl.x,Jl.y,Jl.z),n.setOrientation(Kl.x,Kl.y,Kl.z)}}class ZJ{constructor(e,n=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=n,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 n=this.getFrequencyData();for(let i=0;i<n.length;i++)e+=n[i];return e/n.length}}class _6{constructor(e,n,i){this.binding=e,this.valueSize=i;let r,s,o;switch(n){case"quaternion":r=this._slerp,s=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(i*6),this._workIndex=5;break;case"string":case"bool":r=this._select,s=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(i*5);break;default:r=this._lerp,s=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(i*5)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=s,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,n){const i=this.buffer,r=this.valueSize,s=e*r+r;let o=this.cumulativeWeight;if(o===0){for(let a=0;a!==r;++a)i[s+a]=i[a];o=n}else{o+=n;const a=n/o;this._mixBufferRegion(i,s,0,a,r)}this.cumulativeWeight=o}accumulateAdditive(e){const n=this.buffer,i=this.valueSize,r=i*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(n,r,0,e,i),this.cumulativeWeightAdditive+=e}apply(e){const n=this.valueSize,i=this.buffer,r=e*n+n,s=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,s<1){const l=n*this._origIndex;this._mixBufferRegion(i,r,l,1-s,n)}o>0&&this._mixBufferRegionAdditive(i,r,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(i[l]!==i[l+n]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,n=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(n,r);for(let s=i,o=r;s!==o;++s)n[s]=n[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let i=e;i<n;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,n=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[n+i]=this.buffer[e+i]}_select(e,n,i,r,s){if(r>=.5)for(let o=0;o!==s;++o)e[n+o]=e[i+o]}_slerp(e,n,i,r){wi.slerpFlat(e,n,e,n,e,i,r)}_slerpAdditive(e,n,i,r,s){const o=this._workIndex*s;wi.multiplyQuaternionsFlat(e,o,e,n,e,i),wi.slerpFlat(e,n,e,n,e,o,r)}_lerp(e,n,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=n+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,n,i,r,s){for(let o=0;o!==s;++o){const a=n+o;e[a]=e[a]+e[i+o]*r}}}const KE="\\[\\]\\.:\\/",qJ=new RegExp("["+KE+"]","g"),YE="[^"+KE+"]",$J="[^"+KE.replace("\\.","")+"]",eK=/((?:WC+[\/:])*)/.source.replace("WC",YE),tK=/(WCOD+)?/.source.replace("WCOD",$J),nK=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",YE),iK=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",YE),rK=new RegExp("^"+eK+tK+nK+iK+"$"),sK=["material","materials","bones","map"];class oK{constructor(e,n,i){const r=i||Qt.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,r)}getValue(e,n){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,n)}setValue(e,n){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].unbind()}}class Qt{constructor(e,n,i){this.path=n,this.parsedPath=i||Qt.parseTrackName(n),this.node=Qt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,i){return e&&e.isAnimationObjectGroup?new Qt.Composite(e,n,i):new Qt(e,n,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(qJ,"")}static parseTrackName(e){const n=rK.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);sK.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(n);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o<s.length;o++){const a=s[o];if(a.name===n||a.uuid===n)return a;const l=i(a.children);if(l)return l}return null},r=i(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,n){e[n]=this.targetObject[this.propertyName]}_getValue_array(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)e[n++]=i[r]}_getValue_arrayElement(e,n){e[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,n){this.resolvedProperty.toArray(e,n)}_setValue_direct(e,n){this.targetObject[this.propertyName]=e[n]}_setValue_direct_setNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++]}_setValue_array_setNeedsUpdate(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,n){this.resolvedProperty[this.propertyIndex]=e[n]}_setValue_arrayElement_setNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,n){this.resolvedProperty.fromArray(e,n)}_setValue_fromArray_setNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,n){this.bind(),this.getValue(e,n)}_setValue_unbound(e,n){this.bind(),this.setValue(e,n)}bind(){let e=this.node;const n=this.parsedPath,i=n.objectName,r=n.propertyName;let s=n.propertyIndex;if(e||(e=Qt.findNode(this.rootNode,n.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let c=n.objectIndex;switch(i){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let u=0;u<e.length;u++)if(e[u].name===c){c=u;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[i]}if(c!==void 0){if(e[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[c]}}const o=e[r];if(o===void 0){const c=n.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+r+" but it wasn't found.",e);return}let a=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(r==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[s]!==void 0&&(s=e.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Qt.Composite=oK;Qt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Qt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Qt.prototype.GetterByBindingType=[Qt.prototype._getValue_direct,Qt.prototype._getValue_array,Qt.prototype._getValue_arrayElement,Qt.prototype._getValue_toArray];Qt.prototype.SetterByBindingTypeAndVersioning=[[Qt.prototype._setValue_direct,Qt.prototype._setValue_direct_setNeedsUpdate,Qt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Qt.prototype._setValue_array,Qt.prototype._setValue_array_setNeedsUpdate,Qt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Qt.prototype._setValue_arrayElement,Qt.prototype._setValue_arrayElement_setNeedsUpdate,Qt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Qt.prototype._setValue_fromArray,Qt.prototype._setValue_fromArray_setNeedsUpdate,Qt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class aK{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Jr(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let i=0,r=arguments.length;i!==r;++i)e[arguments[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}add(){const e=this._objects,n=this._indicesByUUID,i=this._paths,r=this._parsedPaths,s=this._bindings,o=s.length;let a,l=e.length,c=this.nCachedObjects_;for(let u=0,f=arguments.length;u!==f;++u){const p=arguments[u],m=p.uuid;let v=n[m];if(v===void 0){v=l++,n[m]=v,e.push(p);for(let w=0,x=o;w!==x;++w)s[w].push(new Qt(p,i[w],r[w]))}else if(v<c){a=e[v];const w=--c,x=e[w];n[x.uuid]=v,e[v]=x,n[m]=w,e[w]=p;for(let g=0,_=o;g!==_;++g){const y=s[g],M=y[w];let E=y[v];y[v]=M,E===void 0&&(E=new Qt(p,i[g],r[g])),y[w]=E}}else e[v]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){const e=this._objects,n=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const l=arguments[o],c=l.uuid,u=n[c];if(u!==void 0&&u>=s){const f=s++,p=e[f];n[p.uuid]=u,e[u]=p,n[c]=f,e[f]=l;for(let m=0,v=r;m!==v;++m){const w=i[m],x=w[f],g=w[u];w[u]=x,w[f]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,n=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=n[u];if(f!==void 0)if(delete n[u],f<s){const p=--s,m=e[p],v=--o,w=e[v];n[m.uuid]=f,e[f]=m,n[w.uuid]=p,e[p]=w,e.pop();for(let x=0,g=r;x!==g;++x){const _=i[x],y=_[p],M=_[v];_[f]=y,_[p]=M,_.pop()}}else{const p=--o,m=e[p];p>0&&(n[m.uuid]=f),e[f]=m,e.pop();for(let v=0,w=r;v!==w;++v){const x=i[v];x[f]=x[p],x.pop()}}}this.nCachedObjects_=s}subscribe_(e,n){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);r=s.length,i[e]=r,o.push(e),a.push(n),s.push(f);for(let p=u,m=l.length;p!==m;++p){const v=l[p];f[p]=new Qt(v,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,i=n[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];n[c]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class S6{constructor(e,n,i=null,r=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=i,this.blendMode=r;const s=n.tracks,o=s.length,a=new Array(o),l={endingStart:hc,endingEnd:hc};for(let c=0;c!==o;++c){const u=s[c].createInterpolant(null);a[c]=u,u.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=lD,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,n){return this.loop=e,this.repetitions=n,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,n,i){if(e.fadeOut(n),this.fadeIn(n),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,i){return e.crossFadeFrom(this,n,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+i,c[0]=e/o,c[1]=n/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,n,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?n=0:(this._startTime=null,n=i*l)}n*=this._updateTimeScale(e);const o=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case pE:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case yy:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(r,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];n*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];n*=r,e>i.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===cD;if(e===0)return s===-1?r:o&&(s&1)===1?n-r:r;if(i===aD){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=n)r=n;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>=n||r<0){const a=Math.floor(r/n);r-=n*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?n:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return n-r}return r}_setEndings(e,n,i){const r=this._interpolantSettings;i?(r.endingStart=dc,r.endingEnd=dc):(e?r.endingStart=this.zeroSlopeAtStart?dc:hc:r.endingStart=vp,n?r.endingEnd=this.zeroSlopeAtEnd?dc:hc:r.endingEnd=vp)}_scheduleFading(e,n,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=n,a[1]=s+e,l[1]=i,this}}const lK=new Float32Array(1);class cK extends As{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==s;++f){const p=r[f],m=p.name;let v=u[m];if(v!==void 0)++v.referenceCount,o[f]=v;else{if(v=o[f],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const w=n&&n._propertyBindings[f].binding.parsedPath;v=new _6(Qt.create(i,m,w),p.ValueTypeName,p.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),o[f]=v}a[f].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n<this._nActiveActions}_addInactiveAction(e,n,i){const r=this._actions,s=this._actionsByClip;let o=s[n];if(o===void 0)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,s[n]=o;else{const a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[i]=e}_removeInactiveAction(e){const n=this._actions,i=n[n.length-1],r=e._cacheIndex;i._cacheIndex=r,n[r]=i,n.pop(),e._cacheIndex=null;const s=e._clip.uuid,o=this._actionsByClip,a=o[s],l=a.knownActions,c=l[l.length-1],u=e._byClipCacheIndex;c._byClipCacheIndex=u,l[u]=c,l.pop(),e._byClipCacheIndex=null;const f=a.actionByRoot,p=(e._localRoot||this._root).uuid;delete f[p],l.length===0&&delete o[s],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];--s.referenceCount===0&&this._removeInactiveBinding(s)}}_lendAction(e){const n=this._actions,i=e._cacheIndex,r=this._nActiveActions++,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_takeBackAction(e){const n=this._actions,i=e._cacheIndex,r=--this._nActiveActions,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_addInactiveBinding(e,n,i){const r=this._bindingsByRootAndName,s=this._bindings;let o=r[n];o===void 0&&(o={},r[n]=o),o[i]=e,e._cacheIndex=s.length,s.push(e)}_removeInactiveBinding(e){const n=this._bindings,i=e.binding,r=i.rootNode.uuid,s=i.path,o=this._bindingsByRootAndName,a=o[r],l=n[n.length-1],c=e._cacheIndex;l._cacheIndex=c,n[c]=l,n.pop(),delete a[s],Object.keys(a).length===0&&delete o[r]}_lendBinding(e){const n=this._bindings,i=e._cacheIndex,r=this._nActiveBindings++,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_takeBackBinding(e){const n=this._bindings,i=e._cacheIndex,r=--this._nActiveBindings,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_lendControlInterpolant(){const e=this._controlInterpolants,n=this._nActiveControlInterpolants++;let i=e[n];return i===void 0&&(i=new kE(new Float32Array(2),new Float32Array(2),1,lK),i.__cacheIndex=n,e[n]=i),i}_takeBackControlInterpolant(e){const n=this._controlInterpolants,i=e.__cacheIndex,r=--this._nActiveControlInterpolants,s=n[r];e.__cacheIndex=r,n[r]=e,s.__cacheIndex=i,n[i]=s}clipAction(e,n,i){const r=n||this._root,s=r.uuid;let o=typeof e=="string"?Xf.findByName(r,e):e;const a=o!==null?o.uuid:e,l=this._actionsByClip[a];let c=null;if(i===void 0&&(o!==null?i=o.blendMode:i=yy),l!==void 0){const f=l.actionByRoot[s];if(f!==void 0&&f.blendMode===i)return f;c=l.knownActions[0],o===null&&(o=c._clip)}if(o===null)return null;const u=new S6(this,o,n,i);return this._bindAction(u,c),this._addInactiveAction(u,a,s),u}existingAction(e,n){const i=n||this._root,r=i.uuid,s=typeof e=="string"?Xf.findByName(i,e):e,o=s?s.uuid:e,a=this._actionsByClip[o];return a!==void 0&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions,n=this._nActiveActions;for(let i=n-1;i>=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const n=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)n[c]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let n=0;n<this._actions.length;n++)this._actions[n].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const n=this._actions,i=e.uuid,r=this._actionsByClip,s=r[i];if(s!==void 0){const o=s.knownActions;for(let a=0,l=o.length;a!==l;++a){const c=o[a];this._deactivateAction(c);const u=c._cacheIndex,f=n[n.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,f._cacheIndex=u,n[u]=f,n.pop(),this._removeInactiveBindingsForAction(c)}delete r[i]}}uncacheRoot(e){const n=e.uuid,i=this._actionsByClip;for(const o in i){const a=i[o].actionByRoot,l=a[n];l!==void 0&&(this._deactivateAction(l),this._removeInactiveAction(l))}const r=this._bindingsByRootAndName,s=r[n];if(s!==void 0)for(const o in s){const a=s[o];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(e,n){const i=this.existingAction(e,n);i!==null&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class kt{constructor(e){this.value=e}clone(){return new kt(this.value.clone===void 0?this.value:this.value.clone())}}let uK=0;class fK extends As{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:uK++}),this.name="",this.usage=Sp,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const n=this.uniforms.indexOf(e);return n!==-1&&this.uniforms.splice(n,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 n=e.uniforms;this.uniforms.length=0;for(let i=0,r=n.length;i<r;i++)this.uniforms.push(n[i].clone());return this}clone(){return new this.constructor().copy(this)}}class hK extends im{constructor(e,n,i=1){super(e,n),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const n=super.clone(e);return n.meshPerAttribute=this.meshPerAttribute,n}toJSON(e){const n=super.toJSON(e);return n.isInstancedInterleavedBuffer=!0,n.meshPerAttribute=this.meshPerAttribute,n}}class dK{constructor(e,n,i,r,s){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=n,this.itemSize=i,this.elementSize=r,this.count=s,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,n){return this.type=e,this.elementSize=n,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}class w6{constructor(e,n,i=0,r=1/0){this.ray=new $c(e,n),this.near=i,this.far=r,this.camera=null,this.layers=new Tc,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,n){this.ray.set(e,n)}setFromCamera(e,n){n.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(n).sub(this.ray.origin).normalize(),this.camera=n):n.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld),this.camera=n):console.error("THREE.Raycaster: Unsupported camera type: "+n.type)}intersectObject(e,n=!0,i=[]){return Gw(e,this,i,n),i.sort(B4),i}intersectObjects(e,n=!0,i=[]){for(let r=0,s=e.length;r<s;r++)Gw(e[r],this,i,n);return i.sort(B4),i}}function B4(t,e){return t.distance-e.distance}function Gw(t,e,n,i){if(t.layers.test(e.layers)&&t.raycast(e,n),i===!0){const r=t.children;for(let s=0,o=r.length;s<o;s++)Gw(r[s],e,n,!0)}}class t1{constructor(e=1,n=0,i=0){return this.radius=e,this.phi=n,this.theta=i,this}set(e,n,i){return this.radius=e,this.phi=n,this.theta=i,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,i){return this.radius=Math.sqrt(e*e+n*n+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(Vn(n/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class pK{constructor(e=1,n=0,i=0){return this.radius=e,this.theta=n,this.y=i,this}set(e,n,i){return this.radius=e,this.theta=n,this.y=i,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,i){return this.radius=Math.sqrt(e*e+i*i),this.theta=Math.atan2(e,i),this.y=n,this}clone(){return new this.constructor().copy(this)}}const L4=new le;class mK{constructor(e=new le(1/0,1/0),n=new le(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=L4.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.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,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,L4).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 I4=new G,gg=new G;class gK{constructor(e=new G,n=new G){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),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,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){I4.subVectors(e,this.start),gg.subVectors(this.end,this.start);const i=gg.dot(gg);let s=gg.dot(I4)/i;return n&&(s=Vn(s,0,1)),s}closestPointToPoint(e,n,i){const r=this.closestPointToPointParameter(e,n);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const N4=new G;class vK extends Kt{constructor(e,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const i=new Pt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o<l;o++,a++){const c=o/l*Math.PI*2,u=a/l*Math.PI*2;r.push(Math.cos(c),Math.sin(c),1,Math.cos(u),Math.sin(u),1)}i.setAttribute("position",new lt(r,3));const s=new Yi({fog:!1,toneMapped:!1});this.cone=new to(i,s),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const e=this.light.distance?this.light.distance:1e3,n=e*Math.tan(this.light.angle);this.cone.scale.set(n,n,e),N4.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(N4),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const ka=new G,vg=new Et,p2=new Et;class yK extends to{constructor(e){const n=A6(e),i=new Pt,r=[],s=[],o=new He(0,0,1),a=new He(0,1,0);for(let c=0;c<n.length;c++){const u=n[c];u.parent&&u.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),s.push(o.r,o.g,o.b),s.push(a.r,a.g,a.b))}i.setAttribute("position",new lt(r,3)),i.setAttribute("color",new lt(s,3));const l=new Yi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(i,l),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=n,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const n=this.bones,i=this.geometry,r=i.getAttribute("position");p2.copy(this.root.matrixWorld).invert();for(let s=0,o=0;s<n.length;s++){const a=n[s];a.parent&&a.parent.isBone&&(vg.multiplyMatrices(p2,a.matrixWorld),ka.setFromMatrixPosition(vg),r.setXYZ(o,ka.x,ka.y,ka.z),vg.multiplyMatrices(p2,a.parent.matrixWorld),ka.setFromMatrixPosition(vg),r.setXYZ(o+1,ka.x,ka.y,ka.z),o+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function A6(t){const e=[];t.isBone===!0&&e.push(t);for(let n=0;n<t.children.length;n++)e.push.apply(e,A6(t.children[n]));return e}class xK extends ui{constructor(e,n,i){const r=new am(n,4,2),s=new jr({wireframe:!0,fog:!1,toneMapped:!1});super(r,s),this.light=e,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const _K=new G,D4=new He,F4=new He;class SK extends Kt{constructor(e,n,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const r=new ah(n);r.rotateY(Math.PI*.5),this.material=new jr({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 Zt(o,3)),this.add(new ui(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 n=e.geometry.getAttribute("color");D4.copy(this.light.color),F4.copy(this.light.groundColor);for(let i=0,r=n.count;i<r;i++){const s=i<r/2?D4:F4;n.setXYZ(i,s.r,s.g,s.b)}n.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(_K.setFromMatrixPosition(this.light.matrixWorld).negate())}}class wK extends to{constructor(e=10,n=10,i=4473924,r=8947848){i=new He(i),r=new He(r);const s=n/2,o=e/n,a=e/2,l=[],c=[];for(let p=0,m=0,v=-a;p<=n;p++,v+=o){l.push(-a,0,v,a,0,v),l.push(v,0,-a,v,0,a);const w=p===s?i:r;w.toArray(c,m),m+=3,w.toArray(c,m),m+=3,w.toArray(c,m),m+=3,w.toArray(c,m),m+=3}const u=new Pt;u.setAttribute("position",new lt(l,3)),u.setAttribute("color",new lt(c,3));const f=new Yi({vertexColors:!0,toneMapped:!1});super(u,f),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class AK extends to{constructor(e=10,n=16,i=8,r=64,s=4473924,o=8947848){s=new He(s),o=new He(o);const a=[],l=[];if(n>1)for(let f=0;f<n;f++){const p=f/n*(Math.PI*2),m=Math.sin(p)*e,v=Math.cos(p)*e;a.push(0,0,0),a.push(m,0,v);const w=f&1?s:o;l.push(w.r,w.g,w.b),l.push(w.r,w.g,w.b)}for(let f=0;f<i;f++){const p=f&1?s:o,m=e-e/i*f;for(let v=0;v<r;v++){let w=v/r*(Math.PI*2),x=Math.sin(w)*m,g=Math.cos(w)*m;a.push(x,0,g),l.push(p.r,p.g,p.b),w=(v+1)/r*(Math.PI*2),x=Math.sin(w)*m,g=Math.cos(w)*m,a.push(x,0,g),l.push(p.r,p.g,p.b)}}const c=new Pt;c.setAttribute("position",new lt(a,3)),c.setAttribute("color",new lt(l,3));const u=new Yi({vertexColors:!0,toneMapped:!1});super(c,u),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const O4=new G,yg=new G,U4=new G;class MK extends Kt{constructor(e,n,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",n===void 0&&(n=1);let r=new Pt;r.setAttribute("position",new lt([-n,n,0,n,n,0,n,-n,0,-n,-n,0,-n,n,0],3));const s=new Yi({fog:!1,toneMapped:!1});this.lightPlane=new ya(r,s),this.add(this.lightPlane),r=new Pt,r.setAttribute("position",new lt([0,0,0,0,0,1],3)),this.targetLine=new ya(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),O4.setFromMatrixPosition(this.light.matrixWorld),yg.setFromMatrixPosition(this.light.target.matrixWorld),U4.subVectors(yg,O4),this.lightPlane.lookAt(yg),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(yg),this.targetLine.scale.z=U4.length()}}const xg=new G,zn=new em;class EK extends to{constructor(e){const n=new Pt,i=new Yi({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,w){l(v),l(w)}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)}n.setAttribute("position",new lt(r,3)),n.setAttribute("color",new lt(s,3)),super(n,i),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const c=new He(16755200),u=new He(16711680),f=new He(43775),p=new He(16777215),m=new He(3355443);this.setColors(c,u,f,p,m)}setColors(e,n,i,r,s){const a=this.geometry.getAttribute("color");a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,n.r,n.g,n.b),a.setXYZ(25,n.r,n.g,n.b),a.setXYZ(26,n.r,n.g,n.b),a.setXYZ(27,n.r,n.g,n.b),a.setXYZ(28,n.r,n.g,n.b),a.setXYZ(29,n.r,n.g,n.b),a.setXYZ(30,n.r,n.g,n.b),a.setXYZ(31,n.r,n.g,n.b),a.setXYZ(32,i.r,i.g,i.b),a.setXYZ(33,i.r,i.g,i.b),a.setXYZ(34,i.r,i.g,i.b),a.setXYZ(35,i.r,i.g,i.b),a.setXYZ(36,i.r,i.g,i.b),a.setXYZ(37,i.r,i.g,i.b),a.setXYZ(38,r.r,r.g,r.b),a.setXYZ(39,r.r,r.g,r.b),a.setXYZ(40,s.r,s.g,s.b),a.setXYZ(41,s.r,s.g,s.b),a.setXYZ(42,s.r,s.g,s.b),a.setXYZ(43,s.r,s.g,s.b),a.setXYZ(44,s.r,s.g,s.b),a.setXYZ(45,s.r,s.g,s.b),a.setXYZ(46,s.r,s.g,s.b),a.setXYZ(47,s.r,s.g,s.b),a.setXYZ(48,s.r,s.g,s.b),a.setXYZ(49,s.r,s.g,s.b),a.needsUpdate=!0}update(){const e=this.geometry,n=this.pointMap,i=1,r=1;zn.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Xn("c",n,e,zn,0,0,-1),Xn("t",n,e,zn,0,0,1),Xn("n1",n,e,zn,-i,-r,-1),Xn("n2",n,e,zn,i,-r,-1),Xn("n3",n,e,zn,-i,r,-1),Xn("n4",n,e,zn,i,r,-1),Xn("f1",n,e,zn,-i,-r,1),Xn("f2",n,e,zn,i,-r,1),Xn("f3",n,e,zn,-i,r,1),Xn("f4",n,e,zn,i,r,1),Xn("u1",n,e,zn,i*.7,r*1.1,-1),Xn("u2",n,e,zn,-i*.7,r*1.1,-1),Xn("u3",n,e,zn,0,r*2,-1),Xn("cf1",n,e,zn,-i,0,1),Xn("cf2",n,e,zn,i,0,1),Xn("cf3",n,e,zn,0,-r,1),Xn("cf4",n,e,zn,0,r,1),Xn("cn1",n,e,zn,-i,0,-1),Xn("cn2",n,e,zn,i,0,-1),Xn("cn3",n,e,zn,0,-r,-1),Xn("cn4",n,e,zn,0,r,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Xn(t,e,n,i,r,s,o){xg.set(r,s,o).unproject(i);const a=e[t];if(a!==void 0){const l=n.getAttribute("position");for(let c=0,u=a.length;c<u;c++)l.setXYZ(a[c],xg.x,xg.y,xg.z)}}const _g=new eo;class TK extends to{constructor(e,n=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(8*3),s=new Pt;s.setIndex(new Zt(i,1)),s.setAttribute("position",new Zt(r,3)),super(s,new Yi({color:n,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update(
3647) has no longer arguments."),this.object!==void 0&&_g.setFromObject(this.object),_g.isEmpty())return;const n=_g.min,i=_g.max,r=this.geometry.attributes.position,s=r.array;s[0]=i.x,s[1]=i.y,s[2]=i.z,s[3]=n.x,s[4]=i.y,s[5]=i.z,s[6]=n.x,s[7]=n.y,s[8]=i.z,s[9]=i.x,s[10]=n.y,s[11]=i.z,s[12]=i.x,s[13]=i.y,s[14]=n.z,s[15]=n.x,s[16]=i.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=i.x,s[22]=n.y,s[23]=n.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,n){return super.copy(e,n),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class bK extends to{constructor(e,n=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],s=new Pt;s.setIndex(new Zt(i,1)),s.setAttribute("position",new lt(r,3)),super(s,new Yi({color:n,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const n=this.box;n.isEmpty()||(n.getCenter(this.position),n.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class CK extends ya{constructor(e,n=1,i=16776960){const r=i,s=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o=new Pt;o.setAttribute("position",new lt(s,3)),o.computeBoundingSphere(),super(o,new Yi({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=n;const a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],l=new Pt;l.setAttribute("position",new lt(a,3)),l.computeBoundingSphere(),this.add(new ui(l,new jr({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 k4=new G;let Sg,m2;class RK extends Kt{constructor(e=new G(0,0,1),n=new G(0,0,0),i=1,r=16776960,s=i*.2,o=s*.2){super(),this.type="ArrowHelper",Sg===void 0&&(Sg=new Pt,Sg.setAttribute("position",new lt([0,0,0,0,1,0],3)),m2=new Aa(0,.5,1,5,1),m2.translate(0,-.5,0)),this.position.copy(n),this.line=new ya(Sg,new Yi({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ui(m2,new jr({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,s,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{k4.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(k4,n)}}setLength(e,n=e*.2,i=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(i,n,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class PK extends to{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new Pt;r.setAttribute("position",new lt(n,3)),r.setAttribute("color",new lt(i,3));const s=new Yi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,n,i){const r=new He,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(n),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class BK{constructor(){this.type="ShapePath",this.color=new He,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Ep,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,i,r){return this.currentPath.quadraticCurveTo(e,n,i,r),this}bezierCurveTo(e,n,i,r,s,o){return this.currentPath.bezierCurveTo(e,n,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const _=[];for(let y=0,M=g.length;y<M;y++){const E=g[y],C=new bc;C.curves=E.curves,_.push(C)}return _}function i(g,_){const y=_.length;let M=!1;for(let E=y-1,C=0;C<y;E=C++){let P=_[E],N=_[C],R=N.x-P.x,L=N.y-P.y;if(Math.abs(L)>Number.EPSILON){if(L<0&&(P=_[C],R=-R,N=_[E],L=-L),g.y<P.y||g.y>N.y)continue;if(g.y===P.y){if(g.x===P.x)return!0}
vendor: 4,402 bytes, line 3647
3647else{const k=L*(g.x-P.x)-R*(g.y-P.y);if(k===0)return!0;if(k<0)continue;M=!M}}else{if(g.y!==P.y)continue;if(N.x<=g.x&&g.x<=P.x||P.x<=g.x&&g.x<=N.x)return!0}}return M}const r=Eo.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new bc,l.curves=a.curves,c.push(l),c;let u=!r(s[0].getPoints());u=e?!u:u;const f=[],p=[];let m=[],v=0,w;p[v]=void 0,m[v]=[];for(let g=0,_=s.length;g<_;g++)a=s[g],w=a.getPoints(),o=r(w),o=e?!o:o,o?(!u&&p[v]&&v++,p[v]={s:new bc,p:w},p[v].s.curves=a.curves,u&&v++,m[v]=[]):m[v].push({h:a,p:w[0]});if(!p[0])return n(s);if(p.length>1){let g=!1,_=0;for(let y=0,M=p.length;y<M;y++)f[y]=[];for(let y=0,M=p.length;y<M;y++){const E=m[y];for(let C=0;C<E.length;C++){const P=E[C];let N=!0;for(let R=0;R<p.length;R++)i(P.p,p[R].p)&&(y!==R&&_++,N?(N=!1,f[R].push(P)):g=!0);N&&f[y].push(P)}}_>0&&g===!1&&(m=f)}let x;for(let g=0,_=p.length;g<_;g++){l=p[g].s,c.push(l),x=m[g];for(let y=0,M=x.length;y<M;y++)l.holes.push(x[y].h)}return c}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Tl}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Tl);const LK=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:aE,AddEquation:ac,AddOperation:JN,AdditiveAnimationBlendMode:pE,AdditiveBlending:Yv,AlphaFormat:eD,AlwaysCompare:_D,AlwaysDepth:dy,AlwaysStencilFunc:hD,AmbientLight:h6,AnimationAction:S6,AnimationClip:Xf,AnimationLoader:FJ,AnimationMixer:cK,AnimationObjectGroup:aK,AnimationUtils:LJ,ArcCurve:HD,ArrayCamera:FD,ArrowHelper:RK,Audio:x6,AudioAnalyser:ZJ,AudioContext:XE,AudioListener:KJ,AudioLoader:WJ,AxesHelper:PK,BackSide:ci,BasicDepthPacking:Zs,BasicShadowMap:IN,Bone:by,BooleanKeyframeTrack:tu,Box2:mK,Box3:eo,Box3Helper:bK,BoxGeometry:eu,BoxHelper:TK,BufferAttribute:Zt,BufferGeometry:Pt,BufferGeometryLoader:v6,ByteType:qN,Cache:Hc,Camera:em,CameraHelper:EK,CanvasTexture:nJ,CapsuleGeometry:By,CatmullRomCurve3:GD,CineonToneMapping:QN,CircleGeometry:Ly,ClampToEdgeWrapping:Ci,Clock:JE,Color:He,ColorKeyframeTrack:zE,ColorManagement:cn,CompressedArrayTexture:eJ,CompressedCubeTexture:tJ,CompressedTexture:Ry,CompressedTextureLoader:OJ,ConeGeometry:Iy,CubeCamera:CD,CubeReflectionMapping:va,CubeRefractionMapping:gl,CubeTexture:tm,CubeTextureLoader:UJ,CubeUVReflectionMapping:sh,CubicBezierCurve:LE,CubicBezierCurve3:VD,CubicInterpolant:o6,CullFaceBack:rw,CullFaceFront:LN,CullFaceFrontBack:rH,CullFaceNone:BN,Curve:no,CurvePath:WD,CustomBlending:NN,CustomToneMapping:ZN,CylinderGeometry:Aa,Cylindrical:pK,Data3DTexture:xE,DataArrayTexture:Sy,DataTexture:Cf,DataTextureLoader:kJ,DataUtils:lG,DecrementStencilOp:dH,DecrementWrapStencilOp:mH,DefaultLoadingManager:c6,DepthFormat:fl,DepthStencilFormat:yl,DepthTexture:ME,DirectionalLight:WE,DirectionalLightHelper:MK,DiscreteInterpolant:a6,DisplayP3ColorSpace:_y,DodecahedronGeometry:om,DoubleSide:ji,DstAlphaFactor:HN,DstColorFactor:VN,DynamicCopyUsage:RH,DynamicDrawUsage:Ac,DynamicReadUsage:TH,EdgesGeometry:XD,EllipseCurve:Py,EqualCompare:mD,EqualDepth:dp,EqualStencilFunc:xH,EquirectangularReflectionMapping:pp,EquirectangularRefractionMapping:mp,Euler:$p,EventDispatcher:As,ExtrudeGeometry:Dy,FileLoader:Qr,Float16BufferAttribute:pG,Float32BufferAttribute:lt,Float64BufferAttribute:mG,FloatType:Vs,Fog:Ty,FogExp2:Ey,FramebufferTexture:$X,FrontSide:Qs,Frustum:wy,GLBufferAttribute:dK,GLSL1:BH,GLSL3:Nw,GreaterCompare:vD,GreaterDepth:oE,GreaterEqualCompare:xD,GreaterEqualDepth:sE,GreaterEqualStencilFunc:AH,GreaterStencilFunc:SH,GridHelper:wK,Group:aa,HalfFloatType:Dc,HemisphereLight:f6,HemisphereLightHelper:SK,IcosahedronGeometry:Fy,ImageBitmapLoader:y6,ImageLoader:Rp,ImageUtils:yE,IncrementStencilOp:hH,IncrementWrapStencilOp:pH,InstancedBufferAttribute:Oc,InstancedBufferGeometry:g6,InstancedInterleavedBuffer:hK,InstancedMesh:CE,Int16BufferAttribute:hG,Int32BufferAttribute:dG,Int8BufferAttribute:cG,IntType:lE,InterleavedBuffer:im,InterleavedBufferAttribute:xl,Interpolant:lh,InterpolateDiscrete:Vf,InterpolateLinear:Fc,InterpolateSmooth:ov,InvertStencilOp:gH,KeepStencilOp:av,KeyframeTrack:io,LOD:zD,LatheGeometry:sm,Layers:Tc,LessCompare:pD,LessDepth:Qv,LessEqualCompare:gD,LessEqualDepth:hp,LessEqualStencilFunc:_H,LessStencilFunc:yH,Light:Rl,LightProbe:m6,Line:ya,Line3:gK,LineBasicMaterial:Yi,LineCurve:
3647IE,LineCurve3:jD,LineDashedMaterial:i6,LineLoop:RE,LineSegments:to,LinearDisplayP3ColorSpace:qp,LinearEncoding:gE,LinearFilter:gn,LinearInterpolant:kE,LinearMipMapLinearFilter:cH,LinearMipMapNearestFilter:lH,LinearMipmapLinearFilter:Po,LinearMipmapNearestFilter:gy,LinearSRGBColorSpace:ws,LinearToneMapping:KN,LinearTransfer:yp,Loader:Qi,LoaderUtils:dl,LoadingManager:HE,LoopOnce:aD,LoopPingPong:cD,LoopRepeat:lD,LuminanceAlphaFormat:nD,LuminanceFormat:tD,MOUSE:nc,Material:Kn,MaterialLoader:Vy,MathUtils:Ec,Matrix3:Ft,Matrix4:Et,MaxEquation:lw,Mesh:ui,MeshBasicMaterial:jr,MeshDepthMaterial:My,MeshDistanceMaterial:AE,MeshLambertMaterial:t6,MeshMatcapMaterial:n6,MeshNormalMaterial:OE,MeshPhongMaterial:$D,MeshPhysicalMaterial:Es,MeshStandardMaterial:No,MeshToonMaterial:e6,MinEquation:aw,MirroredRepeatWrapping:Gf,MixOperation:XN,MultiplyBlending:ow,MultiplyOperation:Zp,NearestFilter:fn,NearestMipMapLinearFilter:aH,NearestMipMapNearestFilter:oH,NearestMipmapLinearFilter:Tf,NearestMipmapNearestFilter:gp,NeverCompare:dD,NeverDepth:rE,NeverStencilFunc:vH,NoBlending:Pi,NoColorSpace:ar,NoToneMapping:Js,NormalAnimationBlendMode:yy,NormalBlending:wc,NotEqualCompare:yD,NotEqualDepth:py,NotEqualStencilFunc:wH,NumberKeyframeTrack:kc,Object3D:Kt,ObjectLoader:VJ,ObjectSpaceNormalMap:fD,OctahedronGeometry:ah,OneFactor:UN,OneMinusDstAlphaFactor:GN,OneMinusDstColorFactor:jN,OneMinusSrcAlphaFactor:iE,OneMinusSrcColorFactor:zN,OrthographicCamera:vs,P3Primaries:_p,PCFShadowMap:hy,PCFSoftShadowMap:Ld,PMREMGenerator:Fw,Path:Ep,PerspectiveCamera:xn,Plane:ta,PlaneGeometry:nm,PlaneHelper:CK,PointLight:jE,PointLightHelper:xK,Points:PE,PointsMaterial:Cy,PolarGridHelper:AK,PolyhedronGeometry:Cl,PositionalAudio:QJ,PropertyBinding:Qt,PropertyMixer:_6,QuadraticBezierCurve:NE,QuadraticBezierCurve3:DE,Quaternion:wi,QuaternionKeyframeTrack:_l,QuaternionLinearInterpolant:l6,RED_GREEN_RGTC2_Format:Lw,RED_RGTC1_Format:oD,REVISION:Tl,RGBADepthPacking:xy,RGBAFormat:Mr,RGBAIntegerFormat:dE,RGBA_ASTC_10x10_Format:Tw,RGBA_ASTC_10x5_Format:Aw,RGBA_ASTC_10x6_Format:Mw,RGBA_ASTC_10x8_Format:Ew,RGBA_ASTC_12x10_Format:bw,RGBA_ASTC_12x12_Format:Cw,RGBA_ASTC_4x4_Format:mw,RGBA_ASTC_5x4_Format:gw,RGBA_ASTC_5x5_Format:vw,RGBA_ASTC_6x5_Format:yw,RGBA_ASTC_6x6_Format:xw,RGBA_ASTC_8x5_Format:_w,RGBA_ASTC_8x6_Format:Sw,RGBA_ASTC_8x8_Format:ww,RGBA_BPTC_Format:sv,RGBA_ETC2_EAC_Format:pw,RGBA_PVRTC_2BPPV1_Format:hw,RGBA_PVRTC_4BPPV1_Format:fw,RGBA_S3TC_DXT1_Format:nv,RGBA_S3TC_DXT3_Format:iv,RGBA_S3TC_DXT5_Format:rv,RGB_BPTC_SIGNED_Format:Rw,RGB_BPTC_UNSIGNED_Format:Pw,RGB_ETC1_Format:sD,RGB_ETC2_Format:dw,RGB_PVRTC_2BPPV1_Format:uw,RGB_PVRTC_4BPPV1_Format:cw,RGB_S3TC_DXT1_Format:tv,RGFormat:rD,RGIntegerFormat:hE,RawShaderMaterial:qD,Ray:$c,Raycaster:w6,Rec709Primaries:xp,RectAreaLight:d6,RedFormat:iD,RedIntegerFormat:fE,ReinhardToneMapping:YN,RenderTarget:MD,RepeatWrapping:vl,ReplaceStencilOp:fH,ReverseSubtractEquation:FN,RingGeometry:Oy,SIGNED_RED_GREEN_RGTC2_Format:Iw,SIGNED_RED_RGTC1_Format:Bw,SRGBColorSpace:jt,SRGBTransfer:vn,Scene:Mp,ShaderChunk:Lt,ShaderLib:zs,ShaderMaterial:Yn,ShadowMaterial:ZD,Shape:bc,ShapeGeometry:Uy,ShapePath:BK,ShapeUtils:Eo,ShortType:$N,Skeleton:rm,SkeletonHelper:yK,SkinnedMesh:bE,Source:pc,Sphere:Ms,SphereGeometry:am,Spherical:t1,SphericalHarmonics3:p6,SplineCurve:FE,SpotLight:VE,SpotLightHelper:vK,Sprite:kD,SpriteMaterial:TE,SrcAlphaFactor:nE,SrcAlphaSaturateFactor:WN,SrcColorFactor:kN,StaticCopyUsage:CH,StaticDrawUsage:Sp,StaticReadUsage:EH,StereoCamera:XJ,StreamCopyUsage:PH,StreamDrawUsage:MH,StreamReadUsage:bH,StringKeyframeTrack:nu,SubtractEquation:DN,SubtractiveBlending:sw,TOUCH:ic,TangentSpaceNormalMap:bl,TetrahedronGeometry:ky,Texture:Mn,TextureLoader:u6,TorusGeometry:zy,TorusKnotGeometry:Hy,Triangle:wr,TriangleFanDrawMode:Zv,TriangleStripDrawMode:mE,TrianglesDrawMode:uD,TubeGeometry:Gy,TwoPassDoubleSide:sH,UVMapping:my,Uint16BufferAttribute:_E,Uint32BufferAttribute:SE,Uint8BufferAttribute:uG,Uint8ClampedBufferAttribute:fG,Uniform:kt,UniformsGroup:fK,UniformsLib:je,UniformsUtils:bD,UnsignedByteType:Si,UnsignedInt248Type:ua,UnsignedIntType:So,UnsignedShort4444Type:cE,UnsignedShort5551Type:uE,UnsignedShortType:vy,VSMShadowMap:Os,Vector2:le,Vector3:G,Vector4:on,VectorKeyframeTrack:zc,VideoTexture:qX,WebGL1Renderer:OD,WebGL3DRenderTarget:QH,WebGLArrayRenderTarget:YH,WebGLCoordinateSystem:wo,WebGLCubeRen
vendor: 29,452 bytes, lines 3647-3675
3647derTarget:RD,WebGLMultipleRenderTargets:ZH,WebGLRenderTarget:Fn,WebGLRenderer:EE,WebGLUtils:DD,WebGPUCoordinateSystem:wp,WireframeGeometry:QD,WrapAroundEnding:vp,ZeroCurvatureEnding:hc,ZeroFactor:ON,ZeroSlopeEnding:dc,ZeroStencilOp:uH,_SRGBAFormat:qv,createCanvasElement:AD,sRGBEncoding:hl},Symbol.toStringTag,{value:"Module"}));var M6={exports:{}},iu={};/**
3648 * @license React
3649 * react-reconciler-constants.production.min.js
3650 *
3651 * Copyright (c) Facebook, Inc. and its affiliates.
3652 *
3653 * This source code is licensed under the MIT license found in the
3654 * LICENSE file in the root directory of this source tree.
3655 */iu.ConcurrentRoot=1;iu.ContinuousEventPriority=4;iu.DefaultEventPriority=16;iu.DiscreteEventPriority=1;iu.IdleEventPriority=536870912;iu.LegacyRoot=0;M6.exports=iu;var ff=M6.exports;function IK(t){let e;const n=new Set,i=(c,u)=>{const f=typeof c=="function"?c(e):c;if(f!==e){const p=e;e=u?f:Object.assign({},e,f),n.forEach(m=>m(e,p))}},r=()=>e,s=(c,u=r,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=u(e);function m(){const v=u(e);if(!f(p,v)){const w=p;c(p=v,w)}}return n.add(m),()=>n.delete(m)},l={setState:i,getState:r,subscribe:(c,u,f)=>u||f?s(c,u,f):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(i,r,l),l}const NK=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),z4=NK?I.useEffect:I.useLayoutEffect;function DK(t){const e=typeof t=="function"?IK(t):t,n=(i=e.getState,r=Object.is)=>{const[,s]=I.useReducer(x=>x+1,0),o=e.getState(),a=I.useRef(o),l=I.useRef(i),c=I.useRef(r),u=I.useRef(!1),f=I.useRef();f.current===void 0&&(f.current=i(o));let p,m=!1;(a.current!==o||l.current!==i||c.current!==r||u.current)&&(p=i(o),m=!r(f.current,p)),z4(()=>{m&&(f.current=p),a.current=o,l.current=i,c.current=r,u.current=!1});const v=I.useRef(o);z4(()=>{const x=()=>{try{const _=e.getState(),y=l.current(_);c.current(f.current,y)||(a.current=_,f.current=y,s())}catch{u.current=!0,s()}},g=e.subscribe(x);return e.getState()!==v.current&&x(),g},[]);const w=m?p:f.current;return I.useDebugValue(w),w};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[n,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},n}const FK=t=>typeof t=="object"&&typeof t.then=="function",gc=[];function E6(t,e,n=(i,r)=>i===r){if(t===e)return!0;if(!t||!e)return!1;const i=t.length;if(e.length!==i)return!1;for(let r=0;r<i;r++)if(!n(t[r],e[r]))return!1;return!0}function T6(t,e=null,n=!1,i={}){e===null&&(e=[t]);for(const s of gc)if(E6(e,s.keys,s.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(s,"error"))throw s.error;if(Object.prototype.hasOwnProperty.call(s,"response"))return i.lifespan&&i.lifespan>0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!n)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=gc.indexOf(r);s!==-1&&gc.splice(s,1)},promise:(FK(t)?t:t(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(gc.push(r),!n)throw r.promise}const OK=(t,e,n)=>T6(t,e,!1,n),UK=(t,e,n)=>void T6(t,e,!0,n),kK=t=>{if(t===void 0||t.length===0)gc.splice(0,gc.length);else{const e=gc.find(n=>E6(t,n.keys,n.equal));e&&e.remove()}};var b6={exports:{}},C6={exports:{}},R6={};/**
3656 * @license React
3657 * scheduler.production.min.js
3658 *
3659 * Copyright (c) Facebook, Inc. and its affiliates.
3660 *
3661 * This source code is licensed under the MIT license found in the
3662 * LICENSE file in the root directory of this source tree.
3663 */(function(t){function e(O,H){var W=O.length;O.push(H);e:for(;0<W;){var j=W-1>>>1,Z=O[j];if(0<r(Z,H))O[j]=H,O[W]=Z,W=j;else break e}}function n(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var H=O[0],W=O.pop();if(W!==H){O[0]=W;e:for(var j=0,Z=O.length,re=Z>>>1;j<re;){var ue=2*(j+1)-1,ve=O[ue],Re=ue+1,Le=O[Re];if(0>r(ve,W))Re<Z&&0>r(Le,ve)?(O[j]=Le,O[Re]=W,j=Re):(O[j]=ve,O[ue]=W,j=ue);else if(Re<Z&&0>r(Le,W))O[j]=Le,O[Re]=W,j=Re;else break e}}return H}function r(O,H){var W=O.sortIndex-H.sortIndex;return W!==0?W:O.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,p=3,m=!1,v=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(O){for(var H=n(c);H!==null;){if(H.callback===null)i(c);else if(H.startTime<=O)i(c),H.sortIndex=H.expirationTime,e(l,H);else break;H=n(c)}}function M(O){if(w=!1,y(O),!v)if(n(l)!==null)v=!0,z(E);else{var H=n(c);H!==null&&Y(M,H.startTime-O)}}function E(O,H){v=!1,w&&(w=!1,g(N),N=-1),m=!0;var W=p;try{for(y(H),f=n(l);f!==null&&(!(f.expirationTime>H)||O&&!k());){var j=f.callback;if(typeof j=="function"){f.callback=null,p=f.priorityLevel;var Z=j(f.expirationTime<=H);H=t.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(l)&&i(l),y(H)}else i(l);f=n(l)}if(f!==null)var re=!0;else{var ue=n(c);ue!==null&&Y(M,ue.startTime-H),re=!1}return re}finally{f=null,p=W,m=!1}}var C=!1,P=null,N=-1,R=5,L=-1;function k(){return!(t.unstable_now()-L<R)}function $(){if(P!==null){var O=t.unstable_now();L=O;var H=!0;try{H=P(!0,O)}finally{H?ee():(C=!1,P=null)}}else C=!1}var ee;if(typeof _=="function")ee=function(){_($)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,U=D.port2;D.port1.onmessage=$,ee=function(){U.postMessage(null)}}else ee=function(){x($,0)};function z(O){P=O,C||(C=!0,ee())}function Y(O,H){N=x(function(){O(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(O){O.callback=null},t.unstable_continueExecution=function(){v||m||(v=!0,z(E))},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(O){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var W=p;p=H;try{return O()}finally{p=W}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(O,H){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var W=p;p=O;try{return H()}finally{p=W}},t.unstable_scheduleCallback=function(O,H,W){var j=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?j+W:j):W=j,O){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=W+Z,O={id:u++,callback:H,priorityLevel:O,startTime:W,expirationTime:Z,sortIndex:-1},W>j?(O.sortIndex=W,e(c,O),n(l)===null&&O===n(c)&&(w?(g(N),N=-1):w=!0,Y(M,W-j))):(O.sortIndex=Z,e(l,O),v||m||(v=!0,z(E))),O},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(O){var H=p;return function(){var W=p;p=H;try{return O.apply(this,arguments)}finally{p=W}}}})(R6);C6.exports=R6;var Vw=C6.exports;/**
3664 * @license React
3665 * react-reconciler.production.min.js
3666 *
3667 * Copyright (c) Facebook, Inc. and its affiliates.
3668 *
3669 * This source code is licensed under the MIT license found in the
3670 * LICENSE file in the root directory of this source tree.
3671 */var zK=function(e){var n={},i=I,r=Vw,s=Object.assign;function o(h){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+h,S=1;S<arguments.length;S++)d+="&args[]="+encodeURIComponent(arguments[S]);return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),v=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),E=Symbol.iterator;function C(h){return h===null||typeof h!="object"?null:(h=E&&h[E]||h["@@iterator"],typeof h=="function"?h:null)}function P(h){if(h==null)return null;if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case u:return"Fragment";case c:return"Portal";case p:return"Profiler";case f:return"StrictMode";case x:return"Suspense";case g:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case v:return(h.displayName||"Context")+".Consumer";case m:return(h._context.displayName||"Context")+".Provider";case w:var d=h.render;return h=h.displayName,h||(h=d.displayName||d.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case _:return d=h.displayName||null,d!==null?d:P(h.type)||"Memo";case y:d=h._payload,h=h._init;try{return P(h(d))}catch{}}return null}function N(h){var d=h.type;switch(h.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 h=d.render,h=h.displayName||h.name||"",d.displayName||(h!==""?"ForwardRef("+h+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(d);case 8:return d===f?"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 R(h){var d=h,S=h;if(h.alternate)for(;d.return;)d=d.return;else{h=d;do d=h,d.flags&4098&&(S=d.return),h=d.return;while(h)}return d.tag===3?S:null}function L(h){if(R(h)!==h)throw Error(o(188))}function k(h){var d=h.alternate;if(!d){if(d=R(h),d===null)throw Error(o(188));return d!==h?null:h}for(var S=h,A=d;;){var b=S.return;if(b===null)break;var B=b.alternate;if(B===null){if(A=b.return,A!==null){S=A;continue}break}if(b.child===B.child){for(B=b.child;B;){if(B===S)return L(b),h;if(B===A)return L(b),d;B=B.sibling}throw Error(o(188))}if(S.return!==A.return)S=b,A=B;else{for(var K=!1,te=b.child;te;){if(te===S){K=!0,S=b,A=B;break}if(te===A){K=!0,A=b,S=B;break}te=te.sibling}if(!K){for(te=B.child;te;){if(te===S){K=!0,S=B,A=b;break}if(te===A){K=!0,A=B,S=b;break}te=te.sibling}if(!K)throw Error(o(189))}}if(S.alternate!==A)throw Error(o(190))}if(S.tag!==3)throw Error(o(188));return S.stateNode.current===S?h:d}function $(h){return h=k(h),h!==null?ee(h):null}function ee(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){var d=ee(h);if(d!==null)return d;h=h.sibling}return null}function D(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){if(h.tag!==4){var d=D(h);if(d!==null)return d}h=h.sibling}return null}var U=Array.isArray,z=e.getPublicInstance,Y=e.getRootHostContext,O=e.getChildHostContext,H=e.prepareForCommit,W=e.resetAfterCommit,j=e.createInstance,Z=e.appendInitialChild,re=e.finalizeInitialChildren,ue=e.prepareUpdate,ve=e.shouldSetTextContent,Re=e.createTextInstance,Le=e.scheduleTimeout,ze=e.cancelTimeout,Qe=e.noTimeout,Ze=e.isPrimaryRenderer,Me=e.supportsMutation,Q=e.supportsPersistence,ge=e.supportsHydration,de=e.getInstanceFromNode,Ae=e.preparePortalMount,xe=e.getCurrentEventPriority,Fe=e.detachDeletedInstance,Ge=e.supportsMicrotasks,We=e.scheduleMicrotask,ot=e.supportsTestSelectors,rt=e.findFiberRoot,Xt=e.getBoundingRect,X=e.getTextContent,F=e.isHiddenSubtree,se=e.matchAccessibilityRole,be=e.setFocusIfFocusable,ye=e.setupIntersectionObserver,Ee=e.appendChild,et=e.appendChildToContainer,Pe=e.commitTextUpdate,Oe=e.commitMount,mt=e.commitUpdate,Bt=e.insertBefore,Ce=e.insertInContainerBefore,xt=e.removeChild,q=e.removeChildFromContainer,fe=e.resetTextContent,we=e.hideInstance,J=e.hideTextInstance,Se=e.unhideInstance,Te=e.unhideTextInstance,De=e.clearContainer,ke=e.cloneInstance,_e=e.createContainerChildSet,Ke=e.appendChildToContainerChildSet,Xe=e.finalizeContainerChildren,Nt=e.replaceContainerChildren,Ne=e.cloneHiddenInstance,gt=e.cloneHiddenTextInstance,Jt=e.canHydrateInstance,$r=e.canHydrateTextInstance,Ve=e.canHydrateSuspenseInstance,ht=e.isSuspenseInstancePending,at=e.isSuspenseInstanceFallback,qt=e.registerSuspenseInstanceRetry,an=e.getNextHydratableSibling,qi=e.getFirstHydratableChild,gr=e.getFirstHydratableChildWithinContainer,ii=e.getFirstHydratableChildWithinSuspenseInstance,Li=e.hydrateInstance,V=e.hydrateTextInstance,ie=e.hydrateSuspenseInstance,pe=e.getNextHydratableInstanceAfterSuspenseInstance,oe=e.commitHydratedContainer,he=e.commitHydratedSuspenseInstance,$e=e.clearSuspenseBoundary,pt=e.clearSuspenseBoundaryFromContainer,wt=e.shouldDeleteUnhydratedTailInstances,At=e.didNotMatchHydratedContainerTextInstance,qe=e.didNotMatchHydratedTextInstance,ct;function Mt(h){if(ct===void 0)try{throw Error()}catch(S){var d=S.stack.trim().match(/\n( *(at )?)/);ct=d&&d[1]||""}return`
3672`+ct+h}var en=!1;function hn(h,d){if(!h||en)return"";en=!0;var S=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(Ie){var A=Ie}Reflect.construct(h,[],d)}else{try{d.call()}catch(Ie){A=Ie}h.call(d.prototype)}else{try{throw Error()}catch(Ie){A=Ie}h()}}catch(Ie){if(Ie&&A&&typeof Ie.stack=="string"){for(var b=Ie.stack.split(`
3673`),B=A.stack.split(`
3674`),K=b.length-1,te=B.length-1;1<=K&&0<=te&&b[K]!==B[te];)te--;for(;1<=K&&0<=te;K--,te--)if(b[K]!==B[te]){if(K!==1||te!==1)do if(K--,te--,0>te||b[K]!==B[te]){var me=`
3675`+b[K].replace(" at new "," at ");return h.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",h.displayName)),me}while(1<=K&&0<=te);break}}}finally{en=!1,Error.prepareStackTrace=S}return(h=h?h.displayName||h.name:"")?Mt(h):""}var pi=Object.prototype.hasOwnProperty,Lr=[],dn=-1;function bt(h){return{current:h}}function ln(h){0>dn||(h.current=Lr[dn],Lr[dn]=null,dn--)}function Tt(h,d){dn++,Lr[dn]=h.current,h.current=d}var Ii={},ri=bt(Ii),Qn=bt(!1),bs=Ii;function On(h,d){var S=h.type.contextTypes;if(!S)return Ii;var A=h.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===d)return A.__reactInternalMemoizedMaskedChildContext;var b={},B;for(B in S)b[B]=d[B];return A&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=d,h.__reactInternalMemoizedMaskedChildContext=b),b}function Un(h){return h=h.childContextTypes,h!=null}function Ma(){ln(Qn),ln(ri)}function Ni(h,d,S){if(ri.current!==Ii)throw Error(o(168));Tt(ri,d),Tt(Qn,S)}function ru(h,d,S){var A=h.stateNode;if(d=d.childContextTypes,typeof A.getChildContext!="function")return S;A=A.getChildContext();for(var b in A)if(!(b in d))throw Error(o(108,N(h)||"Unknown",b));return s({},S,A)}function su(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||Ii,bs=ri.current,Tt(ri,h),Tt(Qn,Qn.current),!0}function mh(h,d,S){var A=h.stateNode;if(!A)throw Error(o(169));S?(h=ru(h,d,bs),A.__reactInternalMemoizedMergedChildContext=h,ln(Qn),ln(ri),Tt(ri,h)):ln(Qn),Tt(Qn,S)}var Cs=Math.clz32?Math.clz32:F9,N9=Math.log,D9=Math.LN2;function F9(h){return h>>>=0,h===0?32:31-(N9(h)/D9|0)|0}var Em=64,Tm=4194304;function gh(h){switch(h&-h){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 h&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function bm(h,d){var S=h.pendingLanes;if(S===0)return 0;var A=0,b=h.suspendedLanes,B=h.pingedLanes,K=S&268435455;if(K!==0){var te=K&~b;te!==0?A=gh(te):(B&=K,B!==0&&(A=gh(B)))}else K=S&~b,K!==0?A=gh(K):B!==0&&(A=gh(B));if(A===0)return 0;if(d!==0&&d!==A&&!(d&b)&&(b=A&-A,B=d&-d,b>=B||b===16&&(B&4194240)!==0))return d;if(A&4&&(A|=S&16),d=h.entangledLanes,d!==0)for(h=h.entanglements,d&=A;0<d;)S=31-Cs(d),b=1<<S,A|=h[S],d&=~b;return A}function O9(h,d){switch(h){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 U9(h,d){for(var S=h.suspendedLanes,A=h.pingedLanes,b=h.expirationTimes,B=h.pendingLanes;0<B;){var K=31-Cs(B),te=1<<K,me=b[K];me===-1?(!(te&S)||te&A)&&(b[K]=O9(te,d)):me<=d&&(h.expiredLanes|=te),B&=~te}}function ox(h){return h=h.pendingLanes&-1073741825,h!==0?h:h&1073741824?1073741824:0}function ax(h){for(var d=[],S=0;31>S;S++)d.push(h);return d}function vh(h,d,S){h.pendingLanes|=d,d!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,d=31-Cs(d),h[d]=S}function k9(h,d){var S=h.pendingLanes&~d;h.pendingLanes=d,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=d,h.mutableReadLanes&=d,h.entangledLanes&=d,d=h.entanglements;var A=h.eventTimes;for(h=h.expirationTimes;0<S;){var b=31-Cs(S),B=1<<b;d[b]=0,A[b]=-1,h[b]=-1,S&=~B}}function lx(h,d){var S=h.entangledLanes|=d;for(h=h.entanglements;S;){var A=31-Cs(S),b=1<<A;b&d|h[A]&d&&(h[A]|=d),S&=~b}}var tn=0;function g3(h){return h&=-h,1<h?4<h?h&268435455?16:536870912:4:1}var cx=r.unstable_scheduleCallback,v3=r.unstable_cancelCallback,z9=r.unstable_shouldYield,H9=r.unstable_requestPaint,mi=r.unstable_now,ux=r.unstable_ImmediatePriority,G9=r.unstable_UserBlockingPriority,fx=r.unstable_NormalPriority,V9=r.unstable_IdlePriority,Cm=null,oo=null;function j9(h){if(oo&&typeof oo.onCommitFiberRoot=="function")try{oo.onCommitFiberRoot(Cm,h,void 0,(h.current.flags&128)===128)}catch{}}function W9(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var ao=typeof Object.is=="function"?Object.is:W9,ko=null,Rm=!1,hx=!1;function y3(h){ko===null?ko=[h]:ko.push(h)}function X9(h){Rm=!0,y3(h)}function lo(){if(!hx&&ko!==null){hx=!0;var h=0,d=tn;try{var S=ko;for(tn=1;h<S.length;h++){var A=S[h];do A=A(!0);while(A!==null)}ko=null,Rm=!1}catch(b){throw ko!==null&&(ko=ko.slice(h+1)),cx(ux,lo),b}finally{tn=d,hx=!1}}return null}var J9=a.ReactCurrentBatchConfig;function Pm(h,d){if(ao(h,d))return!0;if(typeof h!="object"||h===null||typeof d!="object"||d===null)return!1;var S=Object.keys(h),A=Object.keys(d);if(S.length!==A.length)return!1;for(A=0;A<S.length;A++){var b=S[A];if(!pi.call(d,b)||!ao(h[b],d[b]))return!1}return!0}function K9(h){switch(h.tag){case 5:return Mt(h.type);case 16:return Mt("Lazy");case 13:return Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 2:case 15:return h=hn(h.type,!1),h;case 11:return h=hn(h.type.render,!1),h;case 1:return h=hn(h.type,!0),h;default:return""}}function Rs(h,d){if(h&&h.defaultProps){d=s({},d),h=h.defaultProps;for(var S in h)d[S]===void 0&&(d[S]=h[S]);return d}return d}var Bm=bt(null),Lm=null,ou=null,dx=null;function px(){dx=ou=Lm=null}function x3(h,d,S){Ze?(Tt(Bm,d._currentValue),d._currentValue=S):(Tt(Bm,d._currentValue2),d._currentValue2=S)}function mx(h){var d=Bm.current;ln(Bm),Ze?h._currentValue=d:h._currentValue2=d}function gx(h,d,S){for(;h!==null;){var A=h.alternate;if((h.childLanes&d)!==d?(h.childLanes|=d,A!==null&&(A.childLanes|=d)):A!==null&&(A.childLanes&d)!==d&&(A.childLanes|=d),h===S)break;h=h.return}}function au(h,d){Lm=h,dx=ou=null,h=h.dependencies,h!==null&&h.firstContext!==null&&(h.lanes&d&&(Dr=!0),h.firstContext=null)}function es(h){var d=Ze?h._currentValue:h._currentValue2;if(dx!==h)if(h={context:h,memoizedValue:d,next:null},ou===null){if(Lm===null)throw Error(o(308));ou=h,Lm.dependencies={lanes:0,firstContext:h}}else ou=ou.next=h;return d}var co=null,Ea=!1;function vx(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _3(h,d){h=h.updateQueue,d.updateQueue===h&&(d.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects})}function zo(h,d){return{eventTime:h,lane:d,tag:0,payload:null,callback:null,next:null}}function Ta(h,d){var S=h.updateQueue;S!==null&&(S=S.shared,Zn!==null&&h.mode&1&&!(Ot&2)?(h=S.interleaved,h===null?(d.next=d,co===null?co=[S]:co.push(S)):(d.next=h.next,h.next=d),S.interleaved=d):(h=S.pending,h===null?d.next=d:(d.next=h.next,h.next=d),S.pending=d))}function Im(h,d,S){if(d=d.updateQueue,d!==null&&(d=d.shared,(S&4194240)!==0)){var A=d.lanes;A&=h.pendingLanes,S|=A,d.lanes=S,lx(h,S)}}function S3(h,d){var S=h.updateQueue,A=h.alternate;if(A!==null&&(A=A.updateQueue,S===A)){var b=null,B=null;if(S=S.firstBaseUpdate,S!==null){do{var K={eventTime:S.eventTime,lane:S.lane,tag:S.tag,payload:S.payload,callback:S.callback,next:null};B===null?b=B=K:B=B.next=K,S=S.next}while(S!==null);B===null?b=B=d:B=B.next=d}else b=B=d;S={baseState:A.baseState,firstBaseUpdate:b,lastBaseUpdate:B,shared:A.shared,effects:A.effects},h.updateQueue=S;return}h=S.lastBaseUpdate,h===null?S.firstBaseUpdate=d:h.next=d,S.lastBaseUpdate=d}function Nm(h,d,S,A){var b=h.updateQueue;Ea=!1;var B=b.firstBaseUpdate,K=b.lastBaseUpdate,te=b.shared.pending;if(te!==null){b.shared.pending=null;var me=te,Ie=me.next;me.next=null,K===null?B=Ie:K.next=Ie,K=me;var it=h.alternate;it!==null&&(it=it.updateQueue,te=it.lastBaseUpdate,te!==K&&(te===null?it.firstBaseUpdate=Ie:te.next=Ie,it.lastBaseUpdate=me))}if(B!==null){var Ct=b.baseState;K=0,it=Ie=me=null,te=B;do{var _t=te.lane,pn=te.eventTime;if((A&_t)===_t){it!==null&&(it=it.next={eventTime:pn,lane:0,tag:te.tag,payload:te.payload,callback:te.callback,next:null});e:{var dt=h,Ui=te;switch(_t=d,pn=S,Ui.tag){case 1:if(dt=Ui.payload,typeof dt=="function"){Ct=dt.call(pn,Ct,_t);break e}Ct=dt;break e;case 3:dt.flags=dt.flags&-65537|128;case 0:if(dt=Ui.payload,_t=typeof dt=="function"?dt.call(pn,Ct,_t):dt,_t==null)break e;Ct=s({},Ct,_t);break e;case 2:Ea=!0}}te.callback!==null&&te.lane!==0&&(h.flags|=64,_t=b.effects,_t===null?b.effects=[te]:_t.push(te))}else pn={eventTime:pn,lane:_t,tag:te.tag,payload:te.payload,callback:te.callback,next:null},it===null?(Ie=it=pn,me=Ct):it=it.next=pn,K|=_t;if(te=te.next,te===null){if(te=b.shared.pending,te===null)break;_t=te,te=_t.next,_t.next=null,b.lastBaseUpdate=_t,b.shared.pending=null}}while(1);if(it===null&&(me=Ct),b.baseState=me,b.firstBaseUpdate=Ie,b.lastBaseUpdate=it,d=b.shared.interleaved,d!==null){b=d;do K|=b.lane,b=b.next;while(b!==d)}else B===null&&(b.shared.lanes=0);gu|=K,h.lanes=K,h.memoizedState=Ct}}function w3(h,d,S){if(h=d.effects,d.effects=null,h!==null)for(d=0;d<h.length;d++){var A=h[d],b=A.callback;if(b!==null){if(A.callback=null,A=S,typeof b!="function")throw Error(o(191,b));b.call(A)}}}var A3=new i.Component().refs;function yx(h,d,S,A){d=h.memoizedState,S=S(A,d),S=S==null?d:s({},d,S),h.memoizedState=S,h.lanes===0&&(h.updateQueue.baseState=S)}var Dm={isMounted:function(h){return(h=h._reactInternals)?R(h)===h:!1},enqueueSetState:function(h,d,S){h=h._reactInternals;var A=er(),b=Ra(h),B=zo(A,b);B.payload=d,S!=null&&(B.callback=S),Ta(h,B),d=ss(h,b,A),d!==null&&Im(d,h,b)},enqueueReplaceState:function(h,d,S){h=h._reactInternals;var A=er(),b=Ra(h),B=zo(A,b);B.tag=1,B.payload=d,S!=null&&(B.callback=S),Ta(h,B),d=ss(h,b,A),d!==null&&Im(d,h,b)},enqueueForceUpdate:function(h,d){h=h._reactInternals;var S=er(),A=Ra(h),b=zo(S,A);b.tag=2,d!=null&&(b.callback=d),Ta(h,b),d=ss(h,A,S),d!==null&&Im(d,h,A)}};function M3(h,d,S,A,b,B,K){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(A,B,K):d.prototype&&d.prototype.isPureReactComponent?!Pm(S,A)||!Pm(b,B):!0}function E3(h,d,S){var A=!1,b=Ii,B=d.contextType;return typeof B=="object"&&B!==null?B=es(B):(b=Un(d)?bs:ri.current,A=d.contextTypes,B=(A=A!=null)?On(h,b):Ii),d=new d(S,B),h.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Dm,h.stateNode=d,d._reactInternals=h,A&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=b,h.__reactInternalMemoizedMaskedChildContext=B),d}function T3(h,d,S,A){h=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(S,A),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(S,A),d.state!==h&&Dm.enqueueReplaceState(d,d.state,null)}function xx(h,d,S,A){var b=h.stateNode;b.props=S,b.state=h.memoizedState,b.refs=A3,vx(h);var B=d.contextType;typeof B=="object"&&B!==null?b.context=es(B):(B=Un(d)?bs:ri.current,b.context=On(h,B)),b.state=h.memoizedState,B=d.getDerivedStateFromProps,typeof B=="function"&&(yx(h,d,B,S),b.state=h.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(d=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),d!==b.state&&Dm.enqueueReplaceState(b,b.state,null),Nm(h,S,b,A),b.state=h.memoizedState),typeof b.componentDidMount=="function"&&(h.flags|=4194308)}var lu=[],cu=0,Fm=null,Om=0,ts=[],ns=0,Bl=null,Ho=1,Go="";function Ll(h,d){lu[cu++]=Om,lu[cu++]=Fm,Fm=h,Om=d}function b3(h,d,S){ts[ns++]=Ho,ts[ns++]=Go,ts[ns++]=Bl,Bl=h;var A=Ho;h=Go;var b=32-Cs(A)-1;A&=~(1<<b),S+=1;var B=32-Cs(d)+b;if(30<B){var K=b-b%5;B=(A&(1<<K)-1).toString(32),A>>=K,b-=K,Ho=1<<32-Cs(d)+b|S<<b|A,Go=B+h}else Ho=1<<B|S<<b|A,Go=h}function _x(h){h.return!==null&&(Ll(h,1),b3(h,1,0))}function Sx(h){for(;h===Fm;)Fm=lu[--cu],lu[cu]=null,Om=lu[--cu],lu[cu]=null;for(;h===Bl;)Bl=ts[--ns],ts[ns]=null,Go=ts[--ns],ts[ns]=null,Ho=ts[--ns],ts[ns]=null}var Ir=null,Nr=null,En=!1,yh=!1,Ps=null;function C3(h,d){var S=os(5,null,null,0);S.elementType="DELETED",S.stateNode=d,S.return=h,d=h.deletions,d===null?(h.deletions=[S],h.flags|=16):d.push(S)}function R3(h,d){switch(h.tag){case 5:return d=Jt(d,h.type,h.pendingProps),d!==null?(h.stateNode=d,Ir=h,Nr=qi(d),!0):!1;case 6:return d=$r(d,h.pendingProps),d!==null?(h.stateNode=d,Ir=h,Nr=null,!0):!1;case 13:if(d=Ve(d),d!==null){var S=Bl!==null?{id:Ho,overflow:Go}:null;return h.memoizedState={dehydrated:d,treeContext:S,retryLane:1073741824},S=os(18,null,null,0),S.stateNode=d,S.return=h,h.child=S,Ir=h,Nr=null,!0}return!1;default:return!1}}function wx(h){return(h.mode&1)!==0&&(h.flags&128)===0}function Ax(h){if(En){var d=Nr;if(d){var S=d;if(!R3(h,d)){if(wx(h))throw Error(o(418));d=an(S);var A=Ir;d&&R3(h,d)?C3(A,S):(h.flags=h.flags&-4097|2,En=!1,Ir=h)}}else{if(wx(h))throw Error(o(418));h.flags=h.flags&-4097|2,En=!1,Ir=h}}}function P3(h){for(h=h.return;h!==null&&h.tag!==5&&h.tag!==3&&h.tag!==13;)h=h.return;Ir=h}function xh(h){if(!ge||h!==Ir)return!1;if(!En)return P3(h),En=!0,!1;if(h.tag!==3&&(h.tag!==5||wt(h.type)&&!ve(h.type,h.memoizedProps))){var d=Nr;if(d){if(wx(h)){for(h=Nr;h;)h=an(h);throw Error(o(418))}for(;d;)C3(h,d),d=an(d)}}if(P3(h),h.tag===13){if(!ge)throw Error(o(316));if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(o(317));Nr=pe(h)}else Nr=Ir?an(h.stateNode):null;return!0}function uu(){ge&&(Nr=Ir=null,yh=En=!1)}function Mx(h){Ps===null?Ps=[h]:Ps.push(h)}function _h(h,d,S){if(h=S.ref,h!==null&&typeof h!="function"&&typeof h!="object"){if(S._owner){if(S=S._owner,S){if(S.tag!==1)throw Error(o(309));var A=S.stateNode}if(!A)throw Error(o(147,h));var b=A,B=""+h;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===B?d.ref:(d=function(K){var te=b.refs;te===A3&&(te=b.refs={}),K===null?delete te[B]:te[B]=K},d._stringRef=B,d)}if(typeof h!="string")throw Error(o(284));if(!S._owner)throw Error(o(290,h))}return h}function Um(h,d){throw h=Object.prototype.toString.call(d),Error(o(31,h==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":h))}function B3(h){var d=h._init;return d(h._payload)}function L3(h){function d(ae,ne){if(h){var ce=ae.deletions;ce===null?(ae.deletions=[ne],ae.flags|=16):ce.push(ne)}}function S(ae,ne){if(!h)return null;for(;ne!==null;)d(ae,ne),ne=ne.sibling;return null}function A(ae,ne){for(ae=new Map;ne!==null;)ne.key!==null?ae.set(ne.key,ne):ae.set(ne.index,ne),ne=ne.sibling;return ae}function b(ae,ne){return ae=Ba(ae,ne),ae.index=0,ae.sibling=null,ae}function B(ae,ne,ce){return ae.index=ce,h?(ce=ae.alternate,ce!==null?(ce=ce.index,ce<ne?(ae.flags|=2,ne):ce):(ae.flags|=2,ne)):(ae.flags|=1048576,ne)}function K(ae){return h&&ae.alternate===null&&(ae.flags|=2),ae}function te(ae,ne,ce,Ye){return ne===null||ne.tag!==6?(ne=a_(ce,ae.mode,Ye),ne.return=ae,ne):(ne=b(ne,ce),ne.return=ae,ne)}
vendor: 5,148 bytes, line 3675
3675function me(ae,ne,ce,Ye){var ft=ce.type;return ft===u?it(ae,ne,ce.props.children,Ye,ce.key):ne!==null&&(ne.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===y&&B3(ft)===ne.type)?(Ye=b(ne,ce.props),Ye.ref=_h(ae,ne,ce),Ye.return=ae,Ye):(Ye=m0(ce.type,ce.key,ce.props,null,ae.mode,Ye),Ye.ref=_h(ae,ne,ce),Ye.return=ae,Ye)}function Ie(ae,ne,ce,Ye){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==ce.containerInfo||ne.stateNode.implementation!==ce.implementation?(ne=l_(ce,ae.mode,Ye),ne.return=ae,ne):(ne=b(ne,ce.children||[]),ne.return=ae,ne)}function it(ae,ne,ce,Ye,ft){return ne===null||ne.tag!==7?(ne=kl(ce,ae.mode,Ye,ft),ne.return=ae,ne):(ne=b(ne,ce),ne.return=ae,ne)}function Ct(ae,ne,ce){if(typeof ne=="string"&&ne!==""||typeof ne=="number")return ne=a_(""+ne,ae.mode,ce),ne.return=ae,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case l:return ce=m0(ne.type,ne.key,ne.props,null,ae.mode,ce),ce.ref=_h(ae,null,ne),ce.return=ae,ce;case c:return ne=l_(ne,ae.mode,ce),ne.return=ae,ne;case y:var Ye=ne._init;return Ct(ae,Ye(ne._payload),ce)}if(U(ne)||C(ne))return ne=kl(ne,ae.mode,ce,null),ne.return=ae,ne;Um(ae,ne)}return null}function _t(ae,ne,ce,Ye){var ft=ne!==null?ne.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number")return ft!==null?null:te(ae,ne,""+ce,Ye);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:return ce.key===ft?me(ae,ne,ce,Ye):null;case c:return ce.key===ft?Ie(ae,ne,ce,Ye):null;case y:return ft=ce._init,_t(ae,ne,ft(ce._payload),Ye)}if(U(ce)||C(ce))return ft!==null?null:it(ae,ne,ce,Ye,null);Um(ae,ce)}return null}function pn(ae,ne,ce,Ye,ft){if(typeof Ye=="string"&&Ye!==""||typeof Ye=="number")return ae=ae.get(ce)||null,te(ne,ae,""+Ye,ft);if(typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case l:return ae=ae.get(Ye.key===null?ce:Ye.key)||null,me(ne,ae,Ye,ft);case c:return ae=ae.get(Ye.key===null?ce:Ye.key)||null,Ie(ne,ae,Ye,ft);case y:var Dt=Ye._init;return pn(ae,ne,ce,Dt(Ye._payload),ft)}if(U(Ye)||C(Ye))return ae=ae.get(ce)||null,it(ne,ae,Ye,ft,null);Um(ne,Ye)}return null}function dt(ae,ne,ce,Ye){for(var ft=null,Dt=null,Rt=ne,nn=ne=0,vi=null;Rt!==null&&nn<ce.length;nn++){Rt.index>nn?(vi=Rt,Rt=null):vi=Rt.sibling;var rn=_t(ae,Rt,ce[nn],Ye);if(rn===null){Rt===null&&(Rt=vi);break}h&&Rt&&rn.alternate===null&&d(ae,Rt),ne=B(rn,ne,nn),Dt===null?ft=rn:Dt.sibling=rn,Dt=rn,Rt=vi}if(nn===ce.length)return S(ae,Rt),En&&Ll(ae,nn),ft;if(Rt===null){for(;nn<ce.length;nn++)Rt=Ct(ae,ce[nn],Ye),Rt!==null&&(ne=B(Rt,ne,nn),Dt===null?ft=Rt:Dt.sibling=Rt,Dt=Rt);return En&&Ll(ae,nn),ft}for(Rt=A(ae,Rt);nn<ce.length;nn++)vi=pn(Rt,ae,nn,ce[nn],Ye),vi!==null&&(h&&vi.alternate!==null&&Rt.delete(vi.key===null?nn:vi.key),ne=B(vi,ne,nn),Dt===null?ft=vi:Dt.sibling=vi,Dt=vi);return h&&Rt.forEach(function(La){return d(ae,La)}),En&&Ll(ae,nn),ft}function Ui(ae,ne,ce,Ye){var ft=C(ce);if(typeof ft!="function")throw Error(o(150));if(ce=ft.call(ce),ce==null)throw Error(o(151));for(var Dt=ft=null,Rt=ne,nn=ne=0,vi=null,rn=ce.next();Rt!==null&&!rn.done;nn++,rn=ce.next()){Rt.index>nn?(vi=Rt,Rt=null):vi=Rt.sibling;var La=_t(ae,Rt,rn.value,Ye);if(La===null){Rt===null&&(Rt=vi);break}h&&Rt&&La.alternate===null&&d(ae,Rt),ne=B(La,ne,nn),Dt===null?ft=La:Dt.sibling=La,Dt=La,Rt=vi}if(rn.done)return S(ae,Rt),En&&Ll(ae,nn),ft;if(Rt===null){for(;!rn.done;nn++,rn=ce.next())rn=Ct(ae,rn.value,Ye),rn!==null&&(ne=B(rn,ne,nn),Dt===null?ft=rn:Dt.sibling=rn,Dt=rn);return En&&Ll(ae,nn),ft}for(Rt=A(ae,Rt);!rn.done;nn++,rn=ce.next())rn=pn(Rt,ae,nn,rn.value,Ye),rn!==null&&(h&&rn.alternate!==null&&Rt.delete(rn.key===null?nn:rn.key),ne=B(rn,ne,nn),Dt===null?ft=rn:Dt.sibling=rn,Dt=rn);return h&&Rt.forEach(function(MU){return d(ae,MU)}),En&&Ll(ae,nn),ft}function as(ae,ne,ce,Ye){if(typeof ce=="object"&&ce!==null&&ce.type===u&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:e:{for(var ft=ce.key,Dt=ne;Dt!==null;){if(Dt.key===ft){if(ft=ce.type,ft===u){if(Dt.tag===7){S(ae,Dt.sibling),ne=b(Dt,ce.props.children),ne.return=ae,ae=ne;break e}}else if(Dt.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===y&&B3(ft)===Dt.type){S(ae,Dt.sibling),ne=b(Dt,ce.props),ne.ref=_h(ae,Dt,ce),ne.return=ae,ae=ne;break e}S(ae,Dt);break}else d(ae,Dt);Dt=Dt.sibling}ce.type===u?(ne=kl(ce.props.children,ae.mode,Ye,ce.key),ne.return=ae,ae=ne):(Ye=m0(ce.type,ce.key,ce.props,null,ae.mode,Ye),Ye.ref=_h(ae,ne,ce),Ye.return=ae,ae=Ye)}return K(ae);case c:e:{for(Dt=ce.key;ne!==null;){if(ne.key===Dt)if(ne.tag===4&&ne.stateNode.containerInfo===ce.containerInfo&&ne.stateNode.implementation===ce.implementation){S(ae,ne.sibling),ne=b(ne,ce.children||[]),ne.return=ae,ae=ne;break e}else{S(ae,ne);break}else d(ae,ne);ne=ne.sibling}ne=l_(ce,ae.mode,Ye),ne.return=ae,ae=ne}return K(ae);case y:return Dt=ce._init,as(ae,ne,Dt(ce._payload),Ye)}if(U(ce))return dt(ae,ne,ce,Ye);if(C(ce))return Ui(ae,ne,ce,Ye);Um(ae,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,ne!==null&&ne.tag===6?(S(ae,ne.sibling),ne=b(ne,ce),ne.return=ae,ae=ne):(S(ae,ne),ne=a_(ce,ae.mode,Ye),ne.return=ae,ae=ne),K(ae)):S(ae,ne)}return as}var fu=L3(!0),I3=L3(!1),Sh={}
vendor: 108,665 bytes, lines 3675-3718
3675,is=bt(Sh),wh=bt(Sh),hu=bt(Sh);function uo(h){if(h===Sh)throw Error(o(174));return h}function Ex(h,d){Tt(hu,d),Tt(wh,h),Tt(is,Sh),h=Y(d),ln(is),Tt(is,h)}function du(){ln(is),ln(wh),ln(hu)}function N3(h){var d=uo(hu.current),S=uo(is.current);d=O(S,h.type,d),S!==d&&(Tt(wh,h),Tt(is,d))}function Tx(h){wh.current===h&&(ln(is),ln(wh))}var bn=bt(0);function km(h){for(var d=h;d!==null;){if(d.tag===13){var S=d.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||ht(S)||at(S)))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if(d.flags&128)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break;for(;d.sibling===null;){if(d.return===null||d.return===h)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var bx=[];function Cx(){for(var h=0;h<bx.length;h++){var d=bx[h];Ze?d._workInProgressVersionPrimary=null:d._workInProgressVersionSecondary=null}bx.length=0}var zm=a.ReactCurrentDispatcher,rs=a.ReactCurrentBatchConfig,pu=0,kn=null,Di=null,gi=null,Hm=!1,Ah=!1,Mh=0,Y9=0;function Fi(){throw Error(o(321))}function Rx(h,d){if(d===null)return!1;for(var S=0;S<d.length&&S<h.length;S++)if(!ao(h[S],d[S]))return!1;return!0}function Px(h,d,S,A,b,B){if(pu=B,kn=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,zm.current=h===null||h.memoizedState===null?$9:eU,h=S(A,b),Ah){B=0;do{if(Ah=!1,Mh=0,25<=B)throw Error(o(301));B+=1,gi=Di=null,d.updateQueue=null,zm.current=tU,h=S(A,b)}while(Ah)}if(zm.current=Xm,d=Di!==null&&Di.next!==null,pu=0,gi=Di=kn=null,Hm=!1,d)throw Error(o(300));return h}function Bx(){var h=Mh!==0;return Mh=0,h}function Vo(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gi===null?kn.memoizedState=gi=h:gi=gi.next=h,gi}function fo(){if(Di===null){var h=kn.alternate;h=h!==null?h.memoizedState:null}else h=Di.next;var d=gi===null?kn.memoizedState:gi.next;if(d!==null)gi=d,Di=h;else{if(h===null)throw Error(o(310));Di=h,h={memoizedState:Di.memoizedState,baseState:Di.baseState,baseQueue:Di.baseQueue,queue:Di.queue,next:null},gi===null?kn.memoizedState=gi=h:gi=gi.next=h}return gi}function Il(h,d){return typeof d=="function"?d(h):d}function Gm(h){var d=fo(),S=d.queue;if(S===null)throw Error(o(311));S.lastRenderedReducer=h;var A=Di,b=A.baseQueue,B=S.pending;if(B!==null){if(b!==null){var K=b.next;b.next=B.next,B.next=K}A.baseQueue=b=B,S.pending=null}if(b!==null){B=b.next,A=A.baseState;var te=K=null,me=null,Ie=B;do{var it=Ie.lane;if((pu&it)===it)me!==null&&(me=me.next={lane:0,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null}),A=Ie.hasEagerState?Ie.eagerState:h(A,Ie.action);else{var Ct={lane:it,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null};me===null?(te=me=Ct,K=A):me=me.next=Ct,kn.lanes|=it,gu|=it}Ie=Ie.next}while(Ie!==null&&Ie!==B);me===null?K=A:me.next=te,ao(A,d.memoizedState)||(Dr=!0),d.memoizedState=A,d.baseState=K,d.baseQueue=me,S.lastRenderedState=A}if(h=S.interleaved,h!==null){b=h;do B=b.lane,kn.lanes|=B,gu|=B,b=b.next;while(b!==h)}else b===null&&(S.lanes=0);return[d.memoizedState,S.dispatch]}function Vm(h){var d=fo(),S=d.queue;if(S===null)throw Error(o(311));S.lastRenderedReducer=h;var A=S.dispatch,b=S.pending,B=d.memoizedState;if(b!==null){S.pending=null;var K=b=b.next;do B=h(B,K.action),K=K.next;while(K!==b);ao(B,d.memoizedState)||(Dr=!0),d.memoizedState=B,d.baseQueue===null&&(d.baseState=B),S.lastRenderedState=B}return[B,A]}function D3(){}function F3(h,d){var S=kn,A=fo(),b=d(),B=!ao(A.memoizedState,b);if(B&&(A.memoizedState=b,Dr=!0),A=A.queue,Th(k3.bind(null,S,A,h),[h]),A.getSnapshot!==d||B||gi!==null&&gi.memoizedState.tag&1){if(S.flags|=2048,Eh(9,U3.bind(null,S,A,b,d),void 0,null),Zn===null)throw Error(o(349));pu&30||O3(S,d,b)}return b}function O3(h,d,S){h.flags|=16384,h={getSnapshot:d,value:S},d=kn.updateQueue,d===null?(d={lastEffect:null,stores:null},kn.updateQueue=d,d.stores=[h]):(S=d.stores,S===null?d.stores=[h]:S.push(h))}function U3(h,d,S,A){d.value=S,d.getSnapshot=A,z3(d)&&ss(h,1,-1)}function k3(h,d,S){return S(function(){z3(d)&&ss(h,1,-1)})}function z3(h){var d=h.getSnapshot;h=h.value;try{var S=d();return!ao(h,S)}catch{return!0}}function Lx(h){var d=Vo();return typeof h=="function"&&(h=h()),d.memoizedState=d.baseState=h,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:h},d.queue=h,h=h.dispatch=q9.bind(null,kn,h),[d.memoizedState,h]}function Eh(h,d,S,A){return h={tag:h,create:d,destroy:S,deps:A,next:null},d=kn.updateQueue,d===null?(d={lastEffect:null,stores:null},kn.updateQueue=d,d.lastEffect=h.next=h):(S=d.lastEffect,S===null?d.lastEffect=h.next=h:(A=S.next,S.next=h,h.next=A,d.lastEffect=h)),h}function H3(){return fo().memoizedState}function jm(h,d,S,A){var b=Vo();kn.flags|=h,b.memoizedState=Eh(1|d,S,void 0,A===void 0?null:A)}function Wm(h,d,S,A){var b=fo();A=A===void 0?null:A;var B=void 0;if(Di!==null){var K=Di.memoizedState;if(B=K.destroy,A!==null&&Rx(A,K.deps)){b.memoizedState=Eh(d,S,B,A);return}}kn.flags|=h,b.memoizedState=Eh(1|d,S,B,A)}function Ix(h,d){return jm(8390656,8,h,d)}function Th(h,d){return Wm(2048,8,h,d)}function G3(h,d){return Wm(4,2,h,d)}function V3(h,d){return Wm(4,4,h,d)}function j3(h,d){if(typeof d=="function")return h=h(),d(h),function(){d(null)};if(d!=null)return h=h(),d.current=h,function(){d.current=null}}function W3(h,d,S){return S=S!=null?S.concat([h]):null,Wm(4,4,j3.bind(null,d,h),S)}function Nx(){}function X3(h,d){var S=fo();d=d===void 0?null:d;var A=S.memoizedState;return A!==null&&d!==null&&Rx(d,A[1])?A[0]:(S.memoizedState=[h,d],h)}function J3(h,d){var S=fo();d=d===void 0?null:d;var A=S.memoizedState;return A!==null&&d!==null&&Rx(d,A[1])?A[0]:(h=h(),S.memoizedState=[h,d],h)}function Q9(h,d){var S=tn;tn=S!==0&&4>S?S:4,h(!0);var A=rs.transition;rs.transition={};try{h(!1),d()}finally{tn=S,rs.transition=A}}function K3(){return fo().memoizedState}function Z9(h,d,S){var A=Ra(h);S={lane:A,action:S,hasEagerState:!1,eagerState:null,next:null},Y3(h)?Q3(d,S):(Z3(h,d,S),S=er(),h=ss(h,A,S),h!==null&&q3(h,d,A))}function q9(h,d,S){var A=Ra(h),b={lane:A,action:S,hasEagerState:!1,eagerState:null,next:null};if(Y3(h))Q3(d,b);else{Z3(h,d,b);var B=h.alternate;if(h.lanes===0&&(B===null||B.lanes===0)&&(B=d.lastRenderedReducer,B!==null))try{var K=d.lastRenderedState,te=B(K,S);if(b.hasEagerState=!0,b.eagerState=te,ao(te,K))return}catch{}finally{}S=er(),h=ss(h,A,S),h!==null&&q3(h,d,A)}}function Y3(h){var d=h.alternate;return h===kn||d!==null&&d===kn}function Q3(h,d){Ah=Hm=!0;var S=h.pending;S===null?d.next=d:(d.next=S.next,S.next=d),h.pending=d}function Z3(h,d,S){Zn!==null&&h.mode&1&&!(Ot&2)?(h=d.interleaved,h===null?(S.next=S,co===null?co=[d]:co.push(d)):(S.next=h.next,h.next=S),d.interleaved=S):(h=d.pending,h===null?S.next=S:(S.next=h.next,h.next=S),d.pending=S)}function q3(h,d,S){if(S&4194240){var A=d.lanes;A&=h.pendingLanes,S|=A,d.lanes=S,lx(h,S)}}var Xm={readContext:es,useCallback:Fi,useContext:Fi,useEffect:Fi,useImperativeHandle:Fi,useInsertionEffect:Fi,useLayoutEffect:Fi,useMemo:Fi,useReducer:Fi,useRef:Fi,useState:Fi,useDebugValue:Fi,useDeferredValue:Fi,useTransition:Fi,useMutableSource:Fi,useSyncExternalStore:Fi,useId:Fi,unstable_isNewReconciler:!1},$9={readContext:es,useCallback:function(h,d){return Vo().memoizedState=[h,d===void 0?null:d],h},useContext:es,useEffect:Ix,useImperativeHandle:function(h,d,S){return S=S!=null?S.concat([h]):null,jm(4194308,4,j3.bind(null,d,h),S)},useLayoutEffect:function(h,d){return jm(4194308,4,h,d)},useInsertionEffect:function(h,d){return jm(4,2,h,d)},useMemo:function(h,d){var S=Vo();return d=d===void 0?null:d,h=h(),S.memoizedState=[h,d],h},useReducer:function(h,d,S){var A=Vo();return d=S!==void 0?S(d):d,A.memoizedState=A.baseState=d,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:d},A.queue=h,h=h.dispatch=Z9.bind(null,kn,h),[A.memoizedState,h]},useRef:function(h){var d=Vo();return h={current:h},d.memoizedState=h},useState:Lx,useDebugValue:Nx,useDeferredValue:function(h){var d=Lx(h),S=d[0],A=d[1];return Ix(function(){var b=rs.transition;rs.transition={};try{A(h)}finally{rs.transition=b}},[h]),S},useTransition:function(){var h=Lx(!1),d=h[0];return h=Q9.bind(null,h[1]),Vo().memoizedState=h,[d,h]},useMutableSource:function(){},useSyncExternalStore:function(h,d,S){var A=kn,b=Vo();if(En){if(S===void 0)throw Error(o(407));S=S()}else{if(S=d(),Zn===null)throw Error(o(349));pu&30||O3(A,d,S)}b.memoizedState=S;var B={value:S,getSnapshot:d};return b.queue=B,Ix(k3.bind(null,A,B,h),[h]),A.flags|=2048,Eh(9,U3.bind(null,A,B,S,d),void 0,null),S},useId:function(){var h=Vo(),d=Zn.identifierPrefix;if(En){var S=Go,A=Ho;S=(A&~(1<<32-Cs(A)-1)).toString(32)+S,d=":"+d+"R"+S,S=Mh++,0<S&&(d+="H"+S.toString(32)),d+=":"}else S=Y9++,d=":"+d+"r"+S.toString(32)+":";return h.memoizedState=d},unstable_isNewReconciler:!1},eU={readContext:es,useCallback:X3,useContext:es,useEffect:Th,useImperativeHandle:W3,useInsertionEffect:G3,useLayoutEffect:V3,useMemo:J3,useReducer:Gm,useRef:H3,useState:function(){return Gm(Il)},useDebugValue:Nx,useDeferredValue:function(h){var d=Gm(Il),S=d[0],A=d[1];return Th(function(){var b=rs.transition;rs.transition={};try{A(h)}finally{rs.transition=b}},[h]),S},useTransition:function(){var h=Gm(Il)[0],d=fo().memoizedState;return[h,d]},useMutableSource:D3,useSyncExternalStore:F3,useId:K3,unstable_isNewReconciler:!1},tU={readContext:es,useCallback:X3,useContext:es,useEffect:Th,useImperativeHandle:W3,useInsertionEffect:G3,useLayoutEffect:V3,useMemo:J3,useReducer:Vm,useRef:H3,useState:function(){return Vm(Il)},useDebugValue:Nx,useDeferredValue:function(h){var d=Vm(Il),S=d[0],A=d[1];return Th(function(){var b=rs.transition;rs.transition={};try{A(h)}finally{rs.transition=b}},[h]),S},useTransition:function(){var h=Vm(Il)[0],d=fo().memoizedState;return[h,d]},useMutableSource:D3,useSyncExternalStore:F3,useId:K3,unstable_isNewReconciler:!1};function Dx(h,d){try{var S="",A=d;do S+=K9(A),A=A.return;while(A);var b=S}catch(B){b=`
3676Error generating stack: `+B.message+`
3677`+B.stack}return{value:h,source:d,stack:b}}function Fx(h,d){try{console.error(d.value)}catch(S){setTimeout(function(){throw S})}}var nU=typeof WeakMap=="function"?WeakMap:Map;function $3(h,d,S){S=zo(-1,S),S.tag=3,S.payload={element:null};var A=d.value;return S.callback=function(){l0||(l0=!0,e_=A),Fx(h,d)},S}function eb(h,d,S){S=zo(-1,S),S.tag=3;var A=h.type.getDerivedStateFromError;if(typeof A=="function"){var b=d.value;S.payload=function(){return A(b)},S.callback=function(){Fx(h,d)}}var B=h.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(S.callback=function(){Fx(h,d),typeof A!="function"&&(ba===null?ba=new Set([this]):ba.add(this));var K=d.stack;this.componentDidCatch(d.value,{componentStack:K!==null?K:""})}),S}function tb(h,d,S){var A=h.pingCache;if(A===null){A=h.pingCache=new nU;var b=new Set;A.set(d,b)}else b=A.get(d),b===void 0&&(b=new Set,A.set(d,b));b.has(S)||(b.add(S),h=gU.bind(null,h,d,S),d.then(h,h))}function nb(h){do{var d;if((d=h.tag===13)&&(d=h.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return h;h=h.return}while(h!==null);return null}function ib(h,d,S,A,b){return h.mode&1?(h.flags|=65536,h.lanes=b,h):(h===d?h.flags|=65536:(h.flags|=128,S.flags|=131072,S.flags&=-52805,S.tag===1&&(S.alternate===null?S.tag=17:(d=zo(-1,1),d.tag=2,Ta(S,d))),S.lanes|=1),h)}function ho(h){h.flags|=4}function rb(h,d){if(h!==null&&h.child===d.child)return!0;if(d.flags&16)return!1;for(h=d.child;h!==null;){if(h.flags&12854||h.subtreeFlags&12854)return!1;h=h.sibling}return!0}var bh,Ch,Jm,Km;if(Me)bh=function(h,d){for(var S=d.child;S!==null;){if(S.tag===5||S.tag===6)Z(h,S.stateNode);else if(S.tag!==4&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===d)break;for(;S.sibling===null;){if(S.return===null||S.return===d)return;S=S.return}S.sibling.return=S.return,S=S.sibling}},Ch=function(){},Jm=function(h,d,S,A,b){if(h=h.memoizedProps,h!==A){var B=d.stateNode,K=uo(is.current);S=ue(B,S,h,A,b,K),(d.updateQueue=S)&&ho(d)}},Km=function(h,d,S,A){S!==A&&ho(d)};else if(Q){bh=function(h,d,S,A){for(var b=d.child;b!==null;){if(b.tag===5){var B=b.stateNode;S&&A&&(B=Ne(B,b.type,b.memoizedProps,b)),Z(h,B)}else if(b.tag===6)B=b.stateNode,S&&A&&(B=gt(B,b.memoizedProps,b)),Z(h,B);else if(b.tag!==4){if(b.tag===22&&b.memoizedState!==null)B=b.child,B!==null&&(B.return=b),bh(h,b,!0,!0);else if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===d)break;for(;b.sibling===null;){if(b.return===null||b.return===d)return;b=b.return}b.sibling.return=b.return,b=b.sibling}};var sb=function(h,d,S,A){for(var b=d.child;b!==null;){if(b.tag===5){var B=b.stateNode;S&&A&&(B=Ne(B,b.type,b.memoizedProps,b)),Ke(h,B)}else if(b.tag===6)B=b.stateNode,S&&A&&(B=gt(B,b.memoizedProps,b)),Ke(h,B);else if(b.tag!==4){if(b.tag===22&&b.memoizedState!==null)B=b.child,B!==null&&(B.return=b),sb(h,b,!0,!0);else if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===d)break;for(;b.sibling===null;){if(b.return===null||b.return===d)return;b=b.return}b.sibling.return=b.return,b=b.sibling}};Ch=function(h,d){var S=d.stateNode;if(!rb(h,d)){h=S.containerInfo;var A=_e(h);sb(A,d,!1,!1),S.pendingChildren=A,ho(d),Xe(h,A)}},Jm=function(h,d,S,A,b){var B=h.stateNode,K=h.memoizedProps;if((h=rb(h,d))&&K===A)d.stateNode=B;else{var te=d.stateNode,me=uo(is.current),Ie=null;K!==A&&(Ie=ue(te,S,K,A,b,me)),h&&Ie===null?d.stateNode=B:(B=ke(B,Ie,S,K,A,d,h,te),re(B,S,A,b,me)&&ho(d),d.stateNode=B,h?ho(d):bh(B,d,!1,!1))}},Km=function(h,d,S,A){S!==A?(h=uo(hu.current),S=uo(is.current),d.stateNode=Re(A,h,S,d),ho(d)):d.stateNode=h.stateNode}}else Ch=function(){},Jm=function(){},Km=function(){};function Rh(h,d){if(!En)switch(h.tailMode){case"hidden":d=h.tail;for(var S=null;d!==null;)d.alternate!==null&&(S=d),d=d.sibling;S===null?h.tail=null:S.sibling=null;break;case"collapsed":S=h.tail;for(var A=null;S!==null;)S.alternate!==null&&(A=S),S=S.sibling;A===null?d||h.tail===null?h.tail=null:h.tail.sibling=null:A.sibling=null}}function Oi(h){var d=h.alternate!==null&&h.alternate.child===h.child,S=0,A=0;if(d)for(var b=h.child;b!==null;)S|=b.lanes|b.childLanes,A|=b.subtreeFlags&14680064,A|=b.flags&14680064,b.return=h,b=b.sibling;else for(b=h.child;b!==null;)S|=b.lanes|b.childLanes,A|=b.subtreeFlags,A|=b.flags,b.return=h,b=b.sibling;return h.subtreeFlags|=A,h.childLanes=S,d}function iU(h,d,S){var A=d.pendingProps;switch(Sx(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oi(d),null;case 1:return Un(d.type)&&Ma(),Oi(d),null;case 3:return A=d.stateNode,du(),ln(Qn),ln(ri),Cx(),A.pendingContext&&(A.context=A.pendingContext,A.pendingContext=null),(h===null||h.child===null)&&(xh(d)?ho(d):h===null||h.memoizedState.isDehydrated&&!(d.flags&256)||(d.flags|=1024,Ps!==null&&(i_(Ps),Ps=null))),Ch(h,d),Oi(d),null;case 5:Tx(d),S=uo(hu.current);var b=d.type;if(h!==null&&d.stateNode!=null)Jm(h,d,b,A,S),h.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!A){if(d.stateNode===null)throw Error(o(166));return Oi(d),null}if(h=uo(is.current),xh(d)){if(!ge)throw Error(o(175));h=Li(d.stateNode,d.type,d.memoizedProps,S,h,d,!yh),d.updateQueue=h,h!==null&&ho(d)}else{var B=j(b,A,S,h,d);bh(B,d,!1,!1),d.stateNode=B,re(B,b,A,S,h)&&ho(d)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return Oi(d),null;case 6:if(h&&d.stateNode!=null)Km(h,d,h.memoizedProps,A);else{if(typeof A!="string"&&d.stateNode===null)throw Error(o(166));if(h=uo(hu.current),S=uo(is.current),xh(d)){if(!ge)throw Error(o(176));if(h=d.stateNode,A=d.memoizedProps,(S=V(h,A,d,!yh))&&(b=Ir,b!==null))switch(B=(b.mode&1)!==0,b.tag){case 3:At(b.stateNode.containerInfo,h,A,B);break;case 5:qe(b.type,b.memoizedProps,b.stateNode,h,A,B)}S&&ho(d)}else d.stateNode=Re(A,h,S,d)}return Oi(d),null;case 13:if(ln(bn),A=d.memoizedState,En&&Nr!==null&&d.mode&1&&!(d.flags&128)){for(h=Nr;h;)h=an(h);return uu(),d.flags|=98560,d}if(A!==null&&A.dehydrated!==null){if(A=xh(d),h===null){if(!A)throw Error(o(318));if(!ge)throw Error(o(344));if(h=d.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(o(317));ie(h,d)}else uu(),!(d.flags&128)&&(d.memoizedState=null),d.flags|=4;return Oi(d),null}return Ps!==null&&(i_(Ps),Ps=null),d.flags&128?(d.lanes=S,d):(A=A!==null,S=!1,h===null?xh(d):S=h.memoizedState!==null,A&&!S&&(d.child.flags|=8192,d.mode&1&&(h===null||bn.current&1?si===0&&(si=3):s_())),d.updateQueue!==null&&(d.flags|=4),Oi(d),null);case 4:return du(),Ch(h,d),h===null&&Ae(d.stateNode.containerInfo),Oi(d),null;case 10:return mx(d.type._context),Oi(d),null;case 17:return Un(d.type)&&Ma(),Oi(d),null;case 19:if(ln(bn),b=d.memoizedState,b===null)return Oi(d),null;if(A=(d.flags&128)!==0,B=b.rendering,B===null)if(A)Rh(b,!1);else{if(si!==0||h!==null&&h.flags&128)for(h=d.child;h!==null;){if(B=km(h),B!==null){for(d.flags|=128,Rh(b,!1),h=B.updateQueue,h!==null&&(d.updateQueue=h,d.flags|=4),d.subtreeFlags=0,h=S,A=d.child;A!==null;)S=A,b=h,S.flags&=14680066,B=S.alternate,B===null?(S.childLanes=0,S.lanes=b,S.child=null,S.subtreeFlags=0,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=B.childLanes,S.lanes=B.lanes,S.child=B.child,S.subtreeFlags=0,S.deletions=null,S.memoizedProps=B.memoizedProps,S.memoizedState=B.memoizedState,S.updateQueue=B.updateQueue,S.type=B.type,b=B.dependencies,S.dependencies=b===null?null:{lanes:b.lanes,firstContext:b.firstContext}),A=A.sibling;return Tt(bn,bn.current&1|2),d.child}h=h.sibling}b.tail!==null&&mi()>$x&&(d.flags|=128,A=!0,Rh(b,!1),d.lanes=4194304)}else{if(!A)if(h=km(B),h!==null){if(d.flags|=128,A=!0,h=h.updateQueue,h!==null&&(d.updateQueue=h,d.flags|=4),Rh(b,!0),b.tail===null&&b.tailMode==="hidden"&&!B.alternate&&!En)return Oi(d),null}else 2*mi()-b.renderingStartTime>$x&&S!==1073741824&&(d.flags|=128,A=!0,Rh(b,!1),d.lanes=4194304);b.isBackwards?(B.sibling=d.child,d.child=B):(h=b.last,h!==null?h.sibling=B:d.child=B,b.last=B)}return b.tail!==null?(d=b.tail,b.rendering=d,b.tail=d.sibling,b.renderingStartTime=mi(),d.sibling=null,h=bn.current,Tt(bn,A?h&1|2:h&1),d):(Oi(d),null);case 22:case 23:return r_(),A=d.memoizedState!==null,h!==null&&h.memoizedState!==null!==A&&(d.flags|=8192),A&&d.mode&1?Fr&1073741824&&(Oi(d),Me&&d.subtreeFlags&6&&(d.flags|=8192)):Oi(d),null;case 24:return null;case 25:return null}throw Error(o(156,d.tag))}var rU=a.ReactCurrentOwner,Dr=!1;function $i(h,d,S,A){d.child=h===null?I3(d,null,S,A):fu(d,h.child,S,A)}function ob(h,d,S,A,b){S=S.render;var B=d.ref;return au(d,b),A=Px(h,d,S,A,B,b),S=Bx(),h!==null&&!Dr?(d.updateQueue=h.updateQueue,d.flags&=-2053,h.lanes&=~b,jo(h,d,b)):(En&&S&&_x(d),d.flags|=1,$i(h,d,A,b),d.child)}function ab(h,d,S,A,b){if(h===null){var B=S.type;return typeof B=="function"&&!o_(B)&&B.defaultProps===void 0&&S.compare===null&&S.defaultProps===void 0?(d.tag=15,d.type=B,lb(h,d,B,A,b)):(h=m0(S.type,null,A,d,d.mode,b),h.ref=d.ref,h.return=d,d.child=h)}if(B=h.child,!(h.lanes&b)){var K=B.memoizedProps;if(S=S.compare,S=S!==null?S:Pm,S(K,A)&&h.ref===d.ref)return jo(h,d,b)}return d.flags|=1,h=Ba(B,A),h.ref=d.ref,h.return=d,d.child=h}function lb(h,d,S,A,b){if(h!==null&&Pm(h.memoizedProps,A)&&h.ref===d.ref)if(Dr=!1,(h.lanes&b)!==0)h.flags&131072&&(Dr=!0);else return d.lanes=h.lanes,jo(h,d,b);return Ox(h,d,S,A,b)}function cb(h,d,S){var A=d.pendingProps,b=A.children,B=h!==null?h.memoizedState:null;if(A.mode==="hidden")if(!(d.mode&1))d.memoizedState={baseLanes:0,cachePool:null},Tt(mu,Fr),Fr|=S;else if(S&1073741824)d.memoizedState={baseLanes:0,cachePool:null},A=B!==null?B.baseLanes:S,Tt(mu,Fr),Fr|=A;else return h=B!==null?B.baseLanes|S:S,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:h,cachePool:null},d.updateQueue=null,Tt(mu,Fr),Fr|=h,null;else B!==null?(A=B.baseLanes|S,d.memoizedState=null):A=S,Tt(mu,Fr),Fr|=A;return $i(h,d,b,S),d.child}function ub(h,d){var S=d.ref;(h===null&&S!==null||h!==null&&h.ref!==S)&&(d.flags|=512,d.flags|=2097152)}function Ox(h,d,S,A,b){var B=Un(S)?bs:ri.current;return B=On(d,B),au(d,b),S=Px(h,d,S,A,B,b),A=Bx(),h!==null&&!Dr?(d.updateQueue=h.updateQueue,d.flags&=-2053,h.lanes&=~b,jo(h,d,b)):(En&&A&&_x(d),d.flags|=1,$i(h,d,S,b),d.child)}function fb(h,d,S,A,b){if(Un(S)){var B=!0;su(d)}else B=!1;if(au(d,b),d.stateNode===null)h!==null&&(h.alternate=null,d.alternate=null,d.flags|=2),E3(d,S,A),xx(d,S,A,b),A=!0;else if(h===null){var K=d.stateNode,te=d.memoizedProps;K.props=te;var me=K.context,Ie=S.contextType;typeof Ie=="object"&&Ie!==null?Ie=es(Ie):(Ie=Un(S)?bs:ri.current,Ie=On(d,Ie));var it=S.getDerivedStateFromProps,Ct=typeof it=="function"||typeof K.getSnapshotBeforeUpdate=="function";Ct||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(te!==A||me!==Ie)&&T3(d,K,A,Ie),Ea=!1;var _t=d.memoizedState;K.state=_t,Nm(d,A,K,b),me=d.memoizedState,te!==A||_t!==me||Qn.current||Ea?(typeof it=="function"&&(yx(d,S,it,A),me=d.memoizedState),(te=Ea||M3(d,S,te,A,_t,me,Ie))?(Ct||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount()),typeof K.componentDidMount=="function"&&(d.flags|=4194308)):(typeof K.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=A,d.memoizedState=me),K.props=A,K.state=me,K.context=Ie,A=te):(typeof K.componentDidMount=="function"&&(d.flags|=4194308),A=!1)}else{K=d.stateNode,_3(h,d),te=d.memoizedProps,Ie=d.type===d.elementType?te:Rs(d.type,te),K.props=Ie,Ct=d.pendingProps,_t=K.context,me=S.contextType,typeof me=="object"&&me!==null?me=es(me):(me=Un(S)?bs:ri.current,me=On(d,me));var pn=S.getDerivedStateFromProps;(it=typeof pn=="function"||typeof K.getSnapshotBeforeUpdate=="function")||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(te!==Ct||_t!==me)&&T3(d,K,A,me),Ea=!1,_t=d.memoizedState,K.state=_t,Nm(d,A,K,b);var dt=d.memoizedState;te!==Ct||_t!==dt||Qn.current||Ea?(typeof pn=="function"&&(yx(d,S,pn,A),dt=d.memoizedState),(Ie=Ea||M3(d,S,Ie,A,_t,dt,me)||!1)?(it||typeof K.UNSAFE_componentWillUpdate!="function"&&typeof K.componentWillUpdate!="function"||(typeof K.componentWillUpdate=="function"&&K.componentWillUpdate(A,dt,me),typeof K.UNSAFE_componentWillUpdate=="function"&&K.UNSAFE_componentWillUpdate(A,dt,me)),typeof K.componentDidUpdate=="function"&&(d.flags|=4),typeof K.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof K.componentDidUpdate!="function"||te===h.memoizedProps&&_t===h.memoizedState||(d.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||te===h.memoizedProps&&_t===h.memoizedState||(d.flags|=1024),d.memoizedProps=A,d.memoizedState=dt),K.props=A,K.state=dt,K.context=me,A=Ie):(typeof K.componentDidUpdate!="function"||te===h.memoizedProps&&_t===h.memoizedState||(d.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||te===h.memoizedProps&&_t===h.memoizedState||(d.flags|=1024),A=!1)}return Ux(h,d,S,A,B,b)}function Ux(h,d,S,A,b,B){ub(h,d);var K=(d.flags&128)!==0;if(!A&&!K)return b&&mh(d,S,!1),jo(h,d,B);A=d.stateNode,rU.current=d;var te=K&&typeof S.getDerivedStateFromError!="function"?null:A.render();return d.flags|=1,h!==null&&K?(d.child=fu(d,h.child,null,B),d.child=fu(d,null,te,B)):$i(h,d,te,B),d.memoizedState=A.state,b&&mh(d,S,!0),d.child}function hb(h){var d=h.stateNode;d.pendingContext?Ni(h,d.pendingContext,d.pendingContext!==d.context):d.context&&Ni(h,d.context,!1),Ex(h,d.containerInfo)}function db(h,d,S,A,b){return uu(),Mx(b),d.flags|=256,$i(h,d,S,A),d.child}var Ym={dehydrated:null,treeContext:null,retryLane:0};function Qm(h){return{baseLanes:h,cachePool:null}}function pb(h,d,S){var A=d.pendingProps,b=bn.current,B=!1,K=(d.flags&128)!==0,te;if((te=K)||(te=h!==null&&h.memoizedState===null?!1:(b&2)!==0),te?(B=!0,d.flags&=-129):(h===null||h.memoizedState!==null)&&(b|=1),Tt(bn,b&1),h===null)return Ax(d),h=d.memoizedState,h!==null&&(h=h.dehydrated,h!==null)?(d.mode&1?at(h)?d.lanes=8:d.lanes=1073741824:d.lanes=1,null):(b=A.children,h=A.fallback,B?(A=d.mode,B=d.child,b={mode:"hidden",children:b},!(A&1)&&B!==null?(B.childLanes=0,B.pendingProps=b):B=g0(b,A,0,null),h=kl(h,A,S,null),B.return=d,h.return=d,B.sibling=h,d.child=B,d.child.memoizedState=Qm(S),d.memoizedState=Ym,h):kx(d,b));if(b=h.memoizedState,b!==null){if(te=b.dehydrated,te!==null){if(K)return d.flags&256?(d.flags&=-257,Zm(h,d,S,Error(o(422)))):d.memoizedState!==null?(d.child=h.child,d.flags|=128,null):(B=A.fallback,b=d.mode,A=g0({mode:"visible",children:A.children},b,0,null),B=kl(B,b,S,null),B.flags|=2,A.return=d,B.return=d,A.sibling=B,d.child=A,d.mode&1&&fu(d,h.child,null,S),d.child.memoizedState=Qm(S),d.memoizedState=Ym,B);if(!(d.mode&1))d=Zm(h,d,S,null);else if(at(te))d=Zm(h,d,S,Error(o(419)));else if(A=(S&h.childLanes)!==0,Dr||A){if(A=Zn,A!==null){switch(S&-S){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}A=B&(A.suspendedLanes|S)?0:B,A!==0&&A!==b.retryLane&&(b.retryLane=A,ss(h,A,-1))}s_(),d=Zm(h,d,S,Error(o(421)))}else ht(te)?(d.flags|=128,d.child=h.child,d=vU.bind(null,h),qt(te,d),d=null):(S=b.treeContext,ge&&(Nr=ii(te),Ir=d,En=!0,Ps=null,yh=!1,S!==null&&(ts[ns++]=Ho,ts[ns++]=Go,ts[ns++]=Bl,Ho=S.id,Go=S.overflow,Bl=d)),d=kx(d,d.pendingProps.children),d.flags|=4096);return d}return B?(A=gb(h,d,A.children,A.fallback,S),B=d.child,b=h.child.memoizedState,B.memoizedState=b===null?Qm(S):{baseLanes:b.baseLanes|S,cachePool:null},B.childLanes=h.childLanes&~S,d.memoizedState=Ym,A):(S=mb(h,d,A.children,S),d.memoizedState=null,S)}return B?(A=gb(h,d,A.children,A.fallback,S),B=d.child,b=h.child.memoizedState,B.memoizedState=b===null?Qm(S):{baseLanes:b.baseLanes|S,cachePool:null},B.childLanes=h.childLanes&~S,d.memoizedState=Ym,A):(S=mb(h,d,A.children,S),d.memoizedState=null,S)}function kx(h,d){return d=g0({mode:"visible",children:d},h.mode,0,null),d.return=h,h.child=d}function mb(h,d,S,A){var b=h.child;return h=b.sibling,S=Ba(b,{mode:"visible",children:S}),!(d.mode&1)&&(S.lanes=A),S.return=d,S.sibling=null,h!==null&&(A=d.deletions,A===null?(d.deletions=[h],d.flags|=16):A.push(h)),d.child=S}function gb(h,d,S,A,b){var B=d.mode;h=h.child;var K=h.sibling,te={mode:"hidden",children:S};return!(B&1)&&d.child!==h?(S=d.child,S.childLanes=0,S.pendingProps=te,d.deletions=null):(S=Ba(h,te),S.subtreeFlags=h.subtreeFlags&14680064),K!==null?A=Ba(K,A):(A=kl(A,B,b,null),A.flags|=2),A.return=d,S.return=d,S.sibling=A,d.child=S,A}function Zm(h,d,S,A){return A!==null&&Mx(A),fu(d,h.child,null,S),h=kx(d,d.pendingProps.children),h.flags|=2,d.memoizedState=null,h}function vb(h,d,S){h.lanes|=d;var A=h.alternate;A!==null&&(A.lanes|=d),gx(h.return,d,S)}function zx(h,d,S,A,b){var B=h.memoizedState;B===null?h.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:A,tail:S,tailMode:b}:(B.isBackwards=d,B.rendering=null,B.renderingStartTime=0,B.last=A,B.tail=S,B.tailMode=b)}function yb(h,d,S){var A=d.pendingProps,b=A.revealOrder,B=A.tail;if($i(h,d,A.children,S),A=bn.current,A&2)A=A&1|2,d.flags|=128;else{if(h!==null&&h.flags&128)e:for(h=d.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&vb(h,S,d);else if(h.tag===19)vb(h,S,d);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}A&=1}if(Tt(bn,A),!(d.mode&1))d.memoizedState=null;else switch(b){case"forwards":for(S=d.child,b=null;S!==null;)h=S.alternate,h!==null&&km(h)===null&&(b=S),S=S.sibling;S=b,S===null?(b=d.child,d.child=null):(b=S.sibling,S.sibling=null),zx(d,!1,b,S,B);break;case"backwards":for(S=null,b=d.child,d.child=null;b!==null;){if(h=b.alternate,h!==null&&km(h)===null){d.child=b;break}h=b.sibling,b.sibling=S,S=b,b=h}zx(d,!0,S,null,B);break;case"together":zx(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function jo(h,d,S){if(h!==null&&(d.dependencies=h.dependencies),gu|=d.lanes,!(S&d.childLanes))return null;if(h!==null&&d.child!==h.child)throw Error(o(153));if(d.child!==null){for(h=d.child,S=Ba(h,h.pendingProps),d.child=S,S.return=d;h.sibling!==null;)h=h.sibling,S=S.sibling=Ba(h,h.pendingProps),S.return=d;S.sibling=null}return d.child}function sU(h,d,S){switch(d.tag){case 3:hb(d),uu();break;case 5:N3(d);break;case 1:Un(d.type)&&su(d);break;case 4:Ex(d,d.stateNode.containerInfo);break;case 10:x3(d,d.type._context,d.memoizedProps.value);break;case 13:var A=d.memoizedState;if(A!==null)return A.dehydrated!==null?(Tt(bn,bn.current&1),d.flags|=128,null):S&d.child.childLanes?pb(h,d,S):(Tt(bn,bn.current&1),h=jo(h,d,S),h!==null?h.sibling:null);Tt(bn,bn.current&1);break;case 19:if(A=(S&d.childLanes)!==0,h.flags&128){if(A)return yb(h,d,S);d.flags|=128}var b=d.memoizedState;if(b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),Tt(bn,bn.current),A)break;return null;case 22:case 23:return d.lanes=0,cb(h,d,S)}return jo(h,d,S)}function oU(h,d){switch(Sx(d),d.tag){case 1:return Un(d.type)&&Ma(),h=d.flags,h&65536?(d.flags=h&-65537|128,d):null;case 3:return du(),ln(Qn),ln(ri),Cx(),h=d.flags,h&65536&&!(h&128)?(d.flags=h&-65537|128,d):null;case 5:return Tx(d),null;case 13:if(ln(bn),h=d.memoizedState,h!==null&&h.dehydrated!==null){if(d.alternate===null)throw Error(o(340));uu()}return h=d.flags,h&65536?(d.flags=h&-65537|128,d):null;case 19:return ln(bn),null;case 4:return du(),null;case 10:return mx(d.type._context),null;case 22:case 23:return r_(),null;case 24:return null;default:return null}}var qm=!1,Nl=!1,aU=typeof WeakSet=="function"?WeakSet:Set,Je=null;function $m(h,d){var S=h.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(A){xr(h,d,A)}else S.current=null}function Hx(h,d,S){try{S()}catch(A){xr(h,d,A)}}var xb=!1;function lU(h,d){for(H(h.containerInfo),Je=d;Je!==null;)if(h=Je,d=h.child,(h.subtreeFlags&1028)!==0&&d!==null)d.return=h,Je=d;else for(;Je!==null;){h=Je;try{var S=h.alternate;if(h.flags&1024)switch(h.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var A=S.memoizedProps,b=S.memoizedState,B=h.stateNode,K=B.getSnapshotBeforeUpdate(h.elementType===h.type?A:Rs(h.type,A),b);B.__reactInternalSnapshotBeforeUpdate=K}break;case 3:Me&&De(h.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(te){xr(h,h.return,te)}if(d=h.sibling,d!==null){d.return=h.return,Je=d;break}Je=h.return}return S=xb,xb=!1,S}function Dl(h,d,S){var A=d.updateQueue;if(A=A!==null?A.lastEffect:null,A!==null){var b=A=A.next;do{if((b.tag&h)===h){var B=b.destroy;b.destroy=void 0,B!==void 0&&Hx(d,S,B)}b=b.next}while(b!==A)}}function Ph(h,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var S=d=d.next;do{if((S.tag&h)===h){var A=S.create;S.destroy=A()}S=S.next}while(S!==d)}}function Gx(h){var d=h.ref;if(d!==null){var S=h.stateNode;switch(h.tag){case 5:h=z(S);break;default:h=S}typeof d=="function"?d(h):d.current=h}}function _b(h,d,S){if(oo&&typeof oo.onCommitFiberUnmount=="function")try{oo.onCommitFiberUnmount(Cm,d)}catch{}switch(d.tag){case 0:case 11:case 14:case 15:if(h=d.updateQueue,h!==null&&(h=h.lastEffect,h!==null)){var A=h=h.next;do{var b=A,B=b.destroy;b=b.tag,B!==void 0&&(b&2||b&4)&&Hx(d,S,B),A=A.next}while(A!==h)}break;case 1:if($m(d,S),h=d.stateNode,typeof h.componentWillUnmount=="function")try{h.props=d.memoizedProps,h.state=d.memoizedState,h.componentWillUnmount()}catch(K){xr(d,S,K)}break;case 5:$m(d,S);break;case 4:Me?Tb(h,d,S):Q&&Q&&(d=d.stateNode.containerInfo,S=_e(d),Nt(d,S))}}function Sb(h,d,S){for(var A=d;;)if(_b(h,A,S),A.child===null||Me&&A.tag===4){if(A===d)break;for(;A.sibling===null;){if(A.return===null||A.return===d)return;A=A.return}A.sibling.return=A.return,A=A.sibling}else A.child.return=A,A=A.child}function wb(h){var d=h.alternate;d!==null&&(h.alternate=null,wb(d)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(d=h.stateNode,d!==null&&Fe(d)),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function Ab(h){return h.tag===5||h.tag===3||h.tag===4}function Mb(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||Ab(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function Eb(h){if(Me){e:{for(var d=h.return;d!==null;){if(Ab(d))break e;d=d.return}throw Error(o(160))}var S=d;switch(S.tag){case 5:d=S.stateNode,S.flags&32&&(fe(d),S.flags&=-33),S=Mb(h),jx(h,S,d);break;case 3:case 4:d=S.stateNode.containerInfo,S=Mb(h),Vx(h,S,d);break;default:throw Error(o(161))}}}function Vx(h,d,S){var A=h.tag;if(A===5||A===6)h=h.stateNode,d?Ce(S,h,d):et(S,h);else if(A!==4&&(h=h.child,h!==null))for(Vx(h,d,S),h=h.sibling;h!==null;)Vx(h,d,S),h=h.sibling}function jx(h,d,S){var A=h.tag;if(A===5||A===6)h=h.stateNode,d?Bt(S,h,d):Ee(S,h);else if(A!==4&&(h=h.child,h!==null))for(jx(h,d,S),h=h.sibling;h!==null;)jx(h,d,S),h=h.sibling}function Tb(h,d,S){for(var A=d,b=!1,B,K;;){if(!b){b=A.return;e:for(;;){if(b===null)throw Error(o(160));switch(B=b.stateNode,b.tag){case 5:K=!1;break e;case 3:B=B.containerInfo,K=!0;break e;case 4:B=B.containerInfo,K=!0;break e}b=b.return}b=!0}if(A.tag===5||A.tag===6)Sb(h,A,S),K?q(B,A.stateNode):xt(B,A.stateNode);else if(A.tag===18)K?pt(B,A.stateNode):$e(B,A.stateNode);else if(A.tag===4){if(A.child!==null){B=A.stateNode.containerInfo,K=!0,A.child.return=A,A=A.child;continue}}else if(_b(h,A,S),A.child!==null){A.child.return=A,A=A.child;continue}if(A===d)break;for(;A.sibling===null;){if(A.return===null||A.return===d)return;A=A.return,A.tag===4&&(b=!1)}A.sibling.return=A.return,A=A.sibling}}function Wx(h,d){if(Me){switch(d.tag){case 0:case 11:case 14:case 15:Dl(3,d,d.return),Ph(3,d),Dl(5,d,d.return);return;case 1:return;case 5:var S=d.stateNode;if(S!=null){var A=d.memoizedProps;h=h!==null?h.memoizedProps:A;var b=d.type,B=d.updateQueue;d.updateQueue=null,B!==null&&mt(S,B,b,h,A,d)}return;case 6:if(d.stateNode===null)throw Error(o(162));S=d.memoizedProps,Pe(d.stateNode,h!==null?h.memoizedProps:S,S);return;case 3:ge&&h!==null&&h.memoizedState.isDehydrated&&oe(d.stateNode.containerInfo);return;case 12:return;case 13:e0(d);return;case 19:e0(d);return;case 17:return}throw Error(o(163))}switch(d.tag){case 0:case 11:case 14:case 15:Dl(3,d,d.return),Ph(3,d),Dl(5,d,d.return);return;case 12:return;case 13:e0(d);return;case 19:e0(d);return;case 3:ge&&h!==null&&h.memoizedState.isDehydrated&&oe(d.stateNode.containerInfo);break;case 22:case 23:return}e:if(Q){switch(d.tag){case 1:case 5:case 6:break e;case 3:case 4:d=d.stateNode,Nt(d.containerInfo,d.pendingChildren);break e}throw Error(o(163))}}function e0(h){var d=h.updateQueue;if(d!==null){h.updateQueue=null;var S=h.stateNode;S===null&&(S=h.stateNode=new aU),d.forEach(function(A){var b=yU.bind(null,h,A);S.has(A)||(S.add(A),A.then(b,b))})}}function cU(h,d){for(Je=d;Je!==null;){d=Je;var S=d.deletions;if(S!==null)for(var A=0;A<S.length;A++){var b=S[A];try{var B=h;Me?Tb(B,b,d):Sb(B,b,d);var K=b.alternate;K!==null&&(K.return=null),b.return=null}catch(ft){xr(b,d,ft)}}if(S=d.child,d.subtreeFlags&12854&&S!==null)S.return=d,Je=S;else for(;Je!==null;){d=Je;try{var te=d.flags;if(te&32&&Me&&fe(d.stateNode),te&512){var me=d.alternate;if(me!==null){var Ie=me.ref;Ie!==null&&(typeof Ie=="function"?Ie(null):Ie.current=null)}}if(te&8192)switch(d.tag){case 13:if(d.memoizedState!==null){var it=d.alternate;(it===null||it.memoizedState===null)&&(qx=mi())}break;case 22:var Ct=d.memoizedState!==null,_t=d.alternate,pn=_t!==null&&_t.memoizedState!==null;if(S=d,Me){e:if(A=S,b=Ct,B=null,Me)for(var dt=A;;){if(dt.tag===5){if(B===null){B=dt;var Ui=dt.stateNode;b?we(Ui):Se(dt.stateNode,dt.memoizedProps)}}else if(dt.tag===6){if(B===null){var as=dt.stateNode;b?J(as):Te(as,dt.memoizedProps)}}else if((dt.tag!==22&&dt.tag!==23||dt.memoizedState===null||dt===A)&&dt.child!==null){dt.child.return=dt,dt=dt.child;continue}if(dt===A)break;for(;dt.sibling===null;){if(dt.return===null||dt.return===A)break e;B===dt&&(B=null),dt=dt.return}B===dt&&(B=null),dt.sibling.return=dt.return,dt=dt.sibling}}if(Ct&&!pn&&S.mode&1){Je=S;for(var ae=S.child;ae!==null;){for(S=Je=ae;Je!==null;){A=Je;var ne=A.child;switch(A.tag){case 0:case 11:case 14:case 15:Dl(4,A,A.return);break;case 1:$m(A,A.return);var ce=A.stateNode;if(typeof ce.componentWillUnmount=="function"){var Ye=A.return;try{ce.props=A.memoizedProps,ce.state=A.memoizedState,ce.componentWillUnmount()}catch(ft){xr(A,Ye,ft)}}break;case 5:$m(A,A.return);break;case 22:if(A.memoizedState!==null){Rb(S);continue}}ne!==null?(ne.return=A,Je=ne):Rb(S)}ae=ae.sibling}}}switch(te&4102){case 2:Eb(d),d.flags&=-3;break;case 6:Eb(d),d.flags&=-3,Wx(d.alternate,d);break;case 4096:d.flags&=-4097;break;case 4100:d.flags&=-4097,Wx(d.alternate,d);break;case 4:Wx(d.alternate,d)}}catch(ft){xr(d,d.return,ft)}if(S=d.sibling,S!==null){S.return=d.return,Je=S;break}Je=d.return}}}function uU(h,d,S){Je=h,bb(h)}function bb(h,d,S){for(var A=(h.mode&1)!==0;Je!==null;){var b=Je,B=b.child;if(b.tag===22&&A){var K=b.memoizedState!==null||qm;if(!K){var te=b.alternate,me=te!==null&&te.memoizedState!==null||Nl;te=qm;var Ie=Nl;if(qm=K,(Nl=me)&&!Ie)for(Je=b;Je!==null;)K=Je,me=K.child,K.tag===22&&K.memoizedState!==null?Pb(b):me!==null?(me.return=K,Je=me):Pb(b);for(;B!==null;)Je=B,bb(B),B=B.sibling;Je=b,qm=te,Nl=Ie}Cb(h)}else b.subtreeFlags&8772&&B!==null?(B.return=b,Je=B):Cb(h)}}function Cb(h){for(;Je!==null;){var d=Je;if(d.flags&8772){var S=d.alternate;try{if(d.flags&8772)switch(d.tag){case 0:case 11:case 15:Nl||Ph(5,d);break;case 1:var A=d.stateNode;if(d.flags&4&&!Nl)if(S===null)A.componentDidMount();else{var b=d.elementType===d.type?S.memoizedProps:Rs(d.type,S.memoizedProps);A.componentDidUpdate(b,S.memoizedState,A.__reactInternalSnapshotBeforeUpdate)}var B=d.updateQueue;B!==null&&w3(d,B,A);break;case 3:var K=d.updateQueue;if(K!==null){if(S=null,d.child!==null)switch(d.child.tag){case 5:S=z(d.child.stateNode);break;case 1:S=d.child.stateNode}w3(d,K,S)}break;case 5:var te=d.stateNode;S===null&&d.flags&4&&Oe(te,d.type,d.memoizedProps,d);break;case 6:break;case 4:break;case 12:break;case 13:if(ge&&d.memoizedState===null){var me=d.alternate;if(me!==null){var Ie=me.memoizedState;if(Ie!==null){var it=Ie.dehydrated;it!==null&&he(it)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(o(163))}Nl||d.flags&512&&Gx(d)}catch(Ct){xr(d,d.return,Ct)}}if(d===h){Je=null;break}if(S=d.sibling,S!==null){S.return=d.return,Je=S;break}Je=d.return}}function Rb(h){for(;Je!==null;){var d=Je;if(d===h){Je=null;break}var S=d.sibling;if(S!==null){S.return=d.return,Je=S;break}Je=d.return}}function Pb(h){for(;Je!==null;){var d=Je;try{switch(d.tag){case 0:case 11:case 15:var S=d.return;try{Ph(4,d)}catch(me){xr(d,S,me)}break;case 1:var A=d.stateNode;if(typeof A.componentDidMount=="function"){var b=d.return;try{A.componentDidMount()}catch(me){xr(d,b,me)}}var B=d.return;try{Gx(d)}catch(me){xr(d,B,me)}break;case 5:var K=d.return;try{Gx(d)}catch(me){xr(d,K,me)}}}catch(me){xr(d,d.return,me)}if(d===h){Je=null;break}var te=d.sibling;if(te!==null){te.return=d.return,Je=te;break}Je=d.return}}var t0=0,n0=1,i0=2,r0=3,s0=4;if(typeof Symbol=="function"&&Symbol.for){var Bh=Symbol.for;t0=Bh("selector.component"),n0=Bh("selector.has_pseudo_class"),i0=Bh("selector.role"),r0=Bh("selector.test_id"),s0=Bh("selector.text")}function Xx(h){var d=de(h);if(d!=null){if(typeof d.memoizedProps["data-testname"]!="string")throw Error(o(364));return d}if(h=rt(h),h===null)throw Error(o(362));return h.stateNode.current}function Jx(h,d){switch(d.$$typeof){case t0:if(h.type===d.value)return!0;break;case n0:e:{d=d.value,h=[h,0];for(var S=0;S<h.length;){var A=h[S++],b=h[S++],B=d[b];if(A.tag!==5||!F(A)){for(;B!=null&&Jx(A,B);)b++,B=d[b];if(b===d.length){d=!0;break e}else for(A=A.child;A!==null;)h.push(A,b),A=A.sibling}}d=!1}return d;case i0:if(h.tag===5&&se(h.stateNode,d.value))return!0;break;case s0:if((h.tag===5||h.tag===6)&&(h=X(h),h!==null&&0<=h.indexOf(d.value)))return!0;break;case r0:if(h.tag===5&&(h=h.memoizedProps["data-testname"],typeof h=="string"&&h.toLowerCase()===d.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function Kx(h){switch(h.$$typeof){case t0:return"<"+(P(h.value)||"Unknown")+">";case n0:return":has("+(Kx(h)||"")+")";case i0:return'[role="'+h.value+'"]';case s0:return'"'+h.value+'"';case r0:return'[data-testname="'+h.value+'"]';default:throw Error(o(365))}}function Bb(h,d){var S=[];h=[h,0];for(var A=0;A<h.length;){var b=h[A++],B=h[A++],K=d[B];if(b.tag!==5||!F(b)){for(;K!=null&&Jx(b,K);)B++,K=d[B];if(B===d.length)S.push(b);else for(b=b.child;b!==null;)h.push(b,B),b=b.sibling}}return S}function Yx(h,d){if(!ot)throw Error(o(363));h=Xx(h),h=Bb(h,d),d=[],h=Array.from(h);for(var S=0;S<h.length;){var A=h[S++];if(A.tag===5)F(A)||d.push(A.stateNode);else for(A=A.child;A!==null;)h.push(A),A=A.sibling}return d}var fU=Math.ceil,o0=a.ReactCurrentDispatcher,Qx=a.ReactCurrentOwner,Wn=a.ReactCurrentBatchConfig,Ot=0,Zn=null,qn=null,Mi=0,Fr=0,mu=bt(0),si=0,Lh=null,gu=0,a0=0,Zx=0,Ih=null,vr=null,qx=0,$x=1/0;function vu(){$x=mi()+500}var l0=!1,e_=null,ba=null,c0=!1,Ca=null,u0=0,Nh=0,t_=null,f0=-1,h0=0;function er(){return Ot&6?mi():f0!==-1?f0:f0=mi()}function Ra(h){return h.mode&1?Ot&2&&Mi!==0?Mi&-Mi:J9.transition!==null?(h0===0&&(h=Em,Em<<=1,!(Em&4194240)&&(Em=64),h0=h),h0):(h=tn,h!==0?h:xe()):1}function ss(h,d,S){if(50<Nh)throw Nh=0,t_=null,Error(o(185));var A=d0(h,d);return A===null?null:(vh(A,d,S),(!(Ot&2)||A!==Zn)&&(A===Zn&&(!(Ot&2)&&(a0|=d),si===4&&Pa(A,Mi)),yr(A,S),d===1&&Ot===0&&!(h.mode&1)&&(vu(),Rm&&lo())),A)}function d0(h,d){h.lanes|=d;var S=h.alternate;for(S!==null&&(S.lanes|=d),S=h,h=h.return;h!==null;)h.childLanes|=d,S=h.alternate,S!==null&&(S.childLanes|=d),S=h,h=h.return;return S.tag===3?S.stateNode:null}function yr(h,d){var S=h.callbackNode;U9(h,d);var A=bm(h,h===Zn?Mi:0);if(A===0)S!==null&&v3(S),h.callbackNode=null,h.callbackPriority=0;else if(d=A&-A,h.callbackPriority!==d){if(S!=null&&v3(S),d===1)h.tag===0?X9(Ib.bind(null,h)):y3(Ib.bind(null,h)),Ge?We(function(){Ot===0&&lo()}):cx(ux,lo),S=null;else{switch(g3(A)){case 1:S=ux;break;case 4:S=G9;break;case 16:S=fx;break;case 536870912:S=V9;break;default:S=fx}S=Gb(S,Lb.bind(null,h))}h.callbackPriority=d,h.callbackNode=S}}function Lb(h,d){if(f0=-1,h0=0,Ot&6)throw Error(o(327));var S=h.callbackNode;if(Ul()&&h.callbackNode!==S)return null;var A=bm(h,h===Zn?Mi:0);if(A===0)return null;if(A&30||A&h.expiredLanes||d)d=p0(h,A);else{d=A;var b=Ot;Ot|=2;var B=Fb();(Zn!==h||Mi!==d)&&(vu(),Fl(h,d));do try{pU();break}catch(te){Db(h,te)}while(1);px(),o0.current=B,Ot=b,qn!==null?d=0:(Zn=null,Mi=0,d=si)}if(d!==0){if(d===2&&(b=ox(h),b!==0&&(A=b,d=n_(h,b))),d===1)throw S=Lh,Fl(h,0),Pa(h,A),yr(h,mi()),S;if(d===6)Pa(h,A);else{if(b=h.current.alternate,!(A&30)&&!hU(b)&&(d=p0(h,A),d===2&&(B=ox(h),B!==0&&(A=B,d=n_(h,B))),d===1))throw S=Lh,Fl(h,0),Pa(h,A),yr(h,mi()),S;switch(h.finishedWork=b,h.finishedLanes=A,d){case 0:case 1:throw Error(o(345));case 2:Ol(h,vr);break;case 3:if(Pa(h,A),(A&130023424)===A&&(d=qx+500-mi(),10<d)){if(bm(h,0)!==0)break;if(b=h.suspendedLanes,(b&A)!==A){er(),h.pingedLanes|=h.suspendedLanes&b;break}h.timeoutHandle=Le(Ol.bind(null,h,vr),d);break}Ol(h,vr);break;case 4:if(Pa(h,A),(A&4194240)===A)break;for(d=h.eventTimes,b=-1;0<A;){var K=31-Cs(A);B=1<<K,K=d[K],K>b&&(b=K),A&=~B}if(A=b,A=mi()-A,A=(120>A?120:480>A?480:1080>A?1080:1920>A?1920:3e3>A?3e3:4320>A?4320:1960*fU(A/1960))-A,10<A){h.timeoutHandle=Le(Ol.bind(null,h,vr),A);break}Ol(h,vr);break;case 5:Ol(h,vr);break;default:throw Error(o(329))}}}return yr(h,mi()),h.callbackNode===S?Lb.bind(null,h):null}function n_(h,d){var S=Ih;return h.current.memoizedState.isDehydrated&&(Fl(h,d).flags|=256),h=p0(h,d),h!==2&&(d=vr,vr=S,d!==null&&i_(d)),h}function i_(h){vr===null?vr=h:vr.push.apply(vr,h)}function hU(h){for(var d=h;;){if(d.flags&16384){var S=d.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var A=0;A<S.length;A++){var b=S[A],B=b.getSnapshot;b=b.value;try{if(!ao(B(),b))return!1}catch{return!1}}}if(S=d.child,d.subtreeFlags&16384&&S!==null)S.return=d,d=S;else{if(d===h)break;for(;d.sibling===null;){if(d.return===null||d.return===h)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function Pa(h,d){for(d&=~Zx,d&=~a0,h.suspendedLanes|=d,h.pingedLanes&=~d,h=h.expirationTimes;0<d;){var S=31-Cs(d),A=1<<S;h[S]=-1,d&=~A}}function Ib(h){if(Ot&6)throw Error(o(327));Ul();var d=bm(h,0);if(!(d&1))return yr(h,mi()),null;var S=p0(h,d);if(h.tag!==0&&S===2){var A=ox(h);A!==0&&(d=A,S=n_(h,A))}if(S===1)throw S=Lh,Fl(h,0),Pa(h,d),yr(h,mi()),S;if(S===6)throw Error(o(345));return h.finishedWork=h.current.alternate,h.finishedLanes=d,Ol(h,vr),yr(h,mi()),null}function Nb(h){Ca!==null&&Ca.tag===0&&!(Ot&6)&&Ul();var d=Ot;Ot|=1;var S=Wn.transition,A=tn;try{if(Wn.transition=null,tn=1,h)return h()}finally{tn=A,Wn.transition=S,Ot=d,!(Ot&6)&&lo()}}function r_(){Fr=mu.current,ln(mu)}function Fl(h,d){h.finishedWork=null,h.finishedLanes=0;var S=h.timeoutHandle;if(S!==Qe&&(h.timeoutHandle=Qe,ze(S)),qn!==null)for(S=qn.return;S!==null;){var A=S;switch(Sx(A),A.tag){case 1:A=A.type.childContextTypes,A!=null&&Ma();break;case 3:du(),ln(Qn),ln(ri),Cx();break;case 5:Tx(A);break;case 4:du();break;case 13:ln(bn);break;case 19:ln(bn);break;case 10:mx(A.type._context);break;case 22:case 23:r_()}S=S.return}if(Zn=h,qn=h=Ba(h.current,null),Mi=Fr=d,si=0,Lh=null,Zx=a0=gu=0,vr=Ih=null,co!==null){for(d=0;d<co.length;d++)if(S=co[d],A=S.interleaved,A!==null){S.interleaved=null;var b=A.next,B=S.pending;if(B!==null){var K=B.next;B.next=b,A.next=K}S.pending=A}co=null}return h}function Db(h,d){do{var S=qn;try{if(px(),zm.current=Xm,Hm){for(var A=kn.memoizedState;A!==null;){var b=A.queue;b!==null&&(b.pending=null),A=A.next}Hm=!1}if(pu=0,gi=Di=kn=null,Ah=!1,Mh=0,Qx.current=null,S===null||S.return===null){si=1,Lh=d,qn=null;break}e:{var B=h,K=S.return,te=S,me=d;if(d=Mi,te.flags|=32768,me!==null&&typeof me=="object"&&typeof me.then=="function"){var Ie=me,it=te,Ct=it.tag;if(!(it.mode&1)&&(Ct===0||Ct===11||Ct===15)){var _t=it.alternate;_t?(it.updateQueue=_t.updateQueue,it.memoizedState=_t.memoizedState,it.lanes=_t.lanes):(it.updateQueue=null,it.memoizedState=null)}var pn=nb(K);if(pn!==null){pn.flags&=-257,ib(pn,K,te,B,d),pn.mode&1&&tb(B,Ie,d),d=pn,me=Ie;var dt=d.updateQueue;if(dt===null){var Ui=new Set;Ui.add(me),d.updateQueue=Ui}else dt.add(me);break e}else{if(!(d&1)){tb(B,Ie,d),s_();break e}me=Error(o(426))}}else if(En&&te.mode&1){var as=nb(K);if(as!==null){!(as.flags&65536)&&(as.flags|=256),ib(as,K,te,B,d),Mx(me);break e}}B=me,si!==4&&(si=2),Ih===null?Ih=[B]:Ih.push(B),me=Dx(me,te),te=K;do{switch(te.tag){case 3:te.flags|=65536,d&=-d,te.lanes|=d;var ae=$3(te,me,d);S3(te,ae);break e;case 1:B=me;var ne=te.type,ce=te.stateNode;if(!(te.flags&128)&&(typeof ne.getDerivedStateFromError=="function"||ce!==null&&typeof ce.componentDidCatch=="function"&&(ba===null||!ba.has(ce)))){te.flags|=65536,d&=-d,te.lanes|=d;var Ye=eb(te,B,d);S3(te,Ye);break e}}te=te.return}while(te!==null)}Ub(S)}catch(ft){d=ft,qn===S&&S!==null&&(qn=S=S.return);continue}break}while(1)}function Fb(){var h=o0.current;return o0.current=Xm,h===null?Xm:h}function s_(){(si===0||si===3||si===2)&&(si=4),Zn===null||!(gu&268435455)&&!(a0&268435455)||Pa(Zn,Mi)}function p0(h,d){var S=Ot;Ot|=2;var A=Fb();Zn===h&&Mi===d||Fl(h,d);do try{dU();break}catch(b){Db(h,b)}while(1);if(px(),Ot=S,o0.current=A,qn!==null)throw Error(o(261));return Zn=null,Mi=0,si}function dU(){for(;qn!==null;)Ob(qn)}function pU(){for(;qn!==null&&!z9();)Ob(qn)}function Ob(h){var d=Hb(h.alternate,h,Fr);h.memoizedProps=h.pendingProps,d===null?Ub(h):qn=d,Qx.current=null}function Ub(h){var d=h;do{var S=d.alternate;if(h=d.return,d.flags&32768){if(S=oU(S,d),S!==null){S.flags&=32767,qn=S;return}if(h!==null)h.flags|=32768,h.subtreeFlags=0,h.deletions=null;else{si=6,qn=null;return}}else if(S=iU(S,d,Fr),S!==null){qn=S;return}if(d=d.sibling,d!==null){qn=d;return}qn=d=h}while(d!==null);si===0&&(si=5)}function Ol(h,d){var S=tn,A=Wn.transition;try{Wn.transition=null,tn=1,mU(h,d,S)}finally{Wn.transition=A,tn=S}return null}function mU(h,d,S){do Ul();while(Ca!==null);if(Ot&6)throw Error(o(327));var A=h.finishedWork,b=h.finishedLanes;if(A===null)return null;if(h.finishedWork=null,h.finishedLanes=0,A===h.current)throw Error(o(177));h.callbackNode=null,h.callbackPriority=0;var B=A.lanes|A.childLanes;if(k9(h,B),h===Zn&&(qn=Zn=null,Mi=0),!(A.subtreeFlags&2064)&&!(A.flags&2064)||c0||(c0=!0,Gb(fx,function(){return Ul(),null})),B=(A.flags&15990)!==0,A.subtreeFlags&15990||B){B=Wn.transition,Wn.transition=null;var K=tn;tn=1;var te=Ot;Ot|=4,Qx.current=null,lU(h,A),cU(h,A),W(h.containerInfo),h.current=A,uU(A),H9(),Ot=te,tn=K,Wn.transition=B}else h.current=A;if(c0&&(c0=!1,Ca=h,u0=b),B=h.pendingLanes,B===0&&(ba=null),j9(A.stateNode),yr(h,mi()),d!==null)for(S=h.onRecoverableError,A=0;A<d.length;A++)S(d[A]);if(l0)throw l0=!1,h=e_,e_=null,h;return u0&1&&h.tag!==0&&Ul(),B=h.pendingLanes,B&1?h===t_?Nh++:(Nh=0,t_=h):Nh=0,lo(),null}function Ul(){if(Ca!==null){var h=g3(u0),d=Wn.transition,S=tn;try{if(Wn.transition=null,tn=16>h?16:h,Ca===null)var A=!1;else{if(h=Ca,Ca=null,u0=0,Ot&6)throw Error(o(331));var b=Ot;for(Ot|=4,Je=h.current;Je!==null;){var B=Je,K=B.child;if(Je.flags&16){var te=B.deletions;if(te!==null){for(var me=0;me<te.length;me++){var Ie=te[me];for(Je=Ie;Je!==null;){var it=Je;switch(it.tag){case 0:case 11:case 15:Dl(8,it,B)}var Ct=it.child;if(Ct!==null)Ct.return=it,Je=Ct;else for(;Je!==null;){it=Je;var _t=it.sibling,pn=it.return;if(wb(it),it===Ie){Je=null;break}if(_t!==null){_t.return=pn,Je=_t;break}Je=pn}}}var dt=B.alternate;if(dt!==null){var Ui=dt.child;if(Ui!==null){dt.child=null;do{var as=Ui.sibling;Ui.sibling=null,Ui=as}while(Ui!==null)}}Je=B}}if(B.subtreeFlags&2064&&K!==null)K.return=B,Je=K;else e:for(;Je!==null;){if(B=Je,B.flags&2048)switch(B.tag){case 0:case 11:case 15:Dl(9,B,B.return)}var ae=B.sibling;if(ae!==null){ae.return=B.return,Je=ae;break e}Je=B.return}}var ne=h.current;for(Je=ne;Je!==null;){K=Je;var ce=K.child;if(K.subtreeFlags&2064&&ce!==null)ce.return=K,Je=ce;else e:for(K=ne;Je!==null;){if(te=Je,te.flags&2048)try{switch(te.tag){case 0:case 11:case 15:Ph(9,te)}}catch(ft){xr(te,te.return,ft)}if(te===K){Je=null;break e}var Ye=te.sibling;if(Ye!==null){Ye.return=te.return,Je=Ye;break e}Je=te.return}}if(Ot=b,lo(),oo&&typeof oo.onPostCommitFiberRoot=="function")try{oo.onPostCommitFiberRoot(Cm,h)}catch{}A=!0}return A}finally{tn=S,Wn.transition=d}}return!1}function kb(h,d,S){d=Dx(S,d),d=$3(h,d,1),Ta(h,d),d=er(),h=d0(h,1),h!==null&&(vh(h,1,d),yr(h,d))}function xr(h,d,S){if(h.tag===3)kb(h,h,S);else for(;d!==null;){if(d.tag===3){kb(d,h,S);break}else if(d.tag===1){var A=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&(ba===null||!ba.has(A))){h=Dx(S,h),h=eb(d,h,1),Ta(d,h),h=er(),d=d0(d,1),d!==null&&(vh(d,1,h),yr(d,h));break}}d=d.return}}function gU(h,d,S){var A=h.pingCache;A!==null&&A.delete(d),d=er(),h.pingedLanes|=h.suspendedLanes&S,Zn===h&&(Mi&S)===S&&(si===4||si===3&&(Mi&130023424)===Mi&&500>mi()-qx?Fl(h,0):Zx|=S),yr(h,d)}function zb(h,d){d===0&&(h.mode&1?(d=Tm,Tm<<=1,!(Tm&130023424)&&(Tm=4194304)):d=1);var S=er();h=d0(h,d),h!==null&&(vh(h,d,S),yr(h,S))}function vU(h){var d=h.memoizedState,S=0;d!==null&&(S=d.retryLane),zb(h,S)}function yU(h,d){var S=0;switch(h.tag){case 13:var A=h.stateNode,b=h.memoizedState;b!==null&&(S=b.retryLane);break;case 19:A=h.stateNode;break;default:throw Error(o(314))}A!==null&&A.delete(d),zb(h,S)}var Hb;Hb=function(h,d,S){if(h!==null)if(h.memoizedProps!==d.pendingProps||Qn.current)Dr=!0;else{if(!(h.lanes&S)&&!(d.flags&128))return Dr=!1,sU(h,d,S);Dr=!!(h.flags&131072)}else Dr=!1,En&&d.flags&1048576&&b3(d,Om,d.index);switch(d.lanes=0,d.tag){case 2:var A=d.type;h!==null&&(h.alternate=null,d.alternate=null,d.flags|=2),h=d.pendingProps;var b=On(d,ri.current);au(d,S),b=Px(null,d,A,h,b,S);var B=Bx();return d.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,Un(A)?(B=!0,su(d)):B=!1,d.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,vx(d),b.updater=Dm,d.stateNode=b,b._reactInternals=d,xx(d,A,h,S),d=Ux(null,d,A,!0,B,S)):(d.tag=0,En&&B&&_x(d),$i(null,d,b,S),d=d.child),d;case 16:A=d.elementType;e:{switch(h!==null&&(h.alternate=null,d.alternate=null,d.flags|=2),h=d.pendingProps,b=A._init,A=b(A._payload),d.type=A,b=d.tag=_U(A),h=Rs(A,h),b){case 0:d=Ox(null,d,A,h,S);break e;case 1:d=fb(null,d,A,h,S);break e;case 11:d=ob(null,d,A,h,S);break e;case 14:d=ab(null,d,A,Rs(A.type,h),S);break e}throw Error(o(306,A,""))}return d;case 0:return A=d.type,b=d.pendingProps,b=d.elementType===A?b:Rs(A,b),Ox(h,d,A,b,S);case 1:return A=d.type,b=d.pendingProps,b=d.elementType===A?b:Rs(A,b),fb(h,d,A,b,S);case 3:e:{if(hb(d),h===null)throw Error(o(387));A=d.pendingProps,B=d.memoizedState,b=B.element,_3(h,d),Nm(d,A,null,S);var K=d.memoizedState;if(A=K.element,ge&&B.isDehydrated)if(B={element:A,isDehydrated:!1,cache:K.cache,transitions:K.transitions},d.updateQueue.baseState=B,d.memoizedState=B,d.flags&256){b=Error(o(423)),d=db(h,d,A,S,b);break e}else if(A!==b){b=Error(o(424)),d=db(h,d,A,S,b);break e}else for(ge&&(Nr=gr(d.stateNode.containerInfo),Ir=d,En=!0,Ps=null,yh=!1),S=I3(d,null,A,S),d.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(uu(),A===b){d=jo(h,d,S);break e}$i(h,d,A,S)}d=d.child}return d;case 5:return N3(d),h===null&&Ax(d),A=d.type,b=d.pendingProps,B=h!==null?h.memoizedProps:null,K=b.children,ve(A,b)?K=null:B!==null&&ve(A,B)&&(d.flags|=32),ub(h,d),$i(h,d,K,S),d.child;case 6:return h===null&&Ax(d),null;case 13:return pb(h,d,S);case 4:return Ex(d,d.stateNode.containerInfo),A=d.pendingProps,h===null?d.child=fu(d,null,A,S):$i(h,d,A,S),d.child;case 11:return A=d.type,b=d.pendingProps,b=d.elementType===A?b:Rs(A,b),ob(h,d,A,b,S);case 7:return $i(h,d,d.pendingProps,S),d.child;case 8:return $i(h,d,d.pendingProps.children,S),d.child;case 12:return $i(h,d,d.pendingProps.children,S),d.child;case 10:e:{if(A=d.type._context,b=d.pendingProps,B=d.memoizedProps,K=b.value,x3(d,A,K),B!==null)if(ao(B.value,K)){if(B.children===b.children&&!Qn.current){d=jo(h,d,S);break e}}else for(B=d.child,B!==null&&(B.return=d);B!==null;){var te=B.dependencies;if(te!==null){K=B.child;for(var me=te.firstContext;me!==null;){if(me.context===A){if(B.tag===1){me=zo(-1,S&-S),me.tag=2;var Ie=B.updateQueue;if(Ie!==null){Ie=Ie.shared;var it=Ie.pending;it===null?me.next=me:(me.next=it.next,it.next=me),Ie.pending=me}}B.lanes|=S,me=B.alternate,me!==null&&(me.lanes|=S),gx(B.return,S,d),te.lanes|=S;break}me=me.next}}else if(B.tag===10)K=B.type===d.type?null:B.child;else if(B.tag===18){if(K=B.return,K===null)throw Error(o(341));K.lanes|=S,te=K.alternate,te!==null&&(te.lanes|=S),gx(K,S,d),K=B.sibling}else K=B.child;if(K!==null)K.return=B;else for(K=B;K!==null;){if(K===d){K=null;break}if(B=K.sibling,B!==null){B.return=K.return,K=B;break}K=K.return}B=K}$i(h,d,b.children,S),d=d.child}return d;case 9:return b=d.type,A=d.pendingProps.children,au(d,S),b=es(b),A=A(b),d.flags|=1,$i(h,d,A,S),d.child;case 14:return A=d.type,b=Rs(A,d.pendingProps),b=Rs(A.type,b),ab(h,d,A,b,S);case 15:return lb(h,d,d.type,d.pendingProps,S);case 17:return A=d.type,b=d.pendingProps,b=d.elementType===A?b:Rs(A,b),h!==null&&(h.alternate=null,d.alternate=null,d.flags|=2),d.tag=1,Un(A)?(h=!0,su(d)):h=!1,au(d,S),E3(d,A,b),xx(d,A,b,S),Ux(null,d,A,!0,h,S);case 19:return yb(h,d,S);case 22:return cb(h,d,S)}throw Error(o(156,d.tag))};function Gb(h,d){return cx(h,d)}function xU(h,d,S,A){this.tag=h,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function os(h,d,S,A){return new xU(h,d,S,A)}function o_(h){return h=h.prototype,!(!h||!h.isReactComponent)}function _U(h){if(typeof h=="function")return o_(h)?1:0;if(h!=null){if(h=h.$$typeof,h===w)return 11;if(h===_)return 14}return 2}function Ba(h,d){var S=h.alternate;return S===null?(S=os(h.tag,d,h.key,h.mode),S.elementType=h.elementType,S.type=h.type,S.stateNode=h.stateNode,S.alternate=h,h.alternate=S):(S.pendingProps=d,S.type=h.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=h.flags&14680064,S.childLanes=h.childLanes,S.lanes=h.lanes,S.child=h.child,S.memoizedProps=h.memoizedProps,S.memoizedState=h.memoizedState,S.updateQueue=h.updateQueue,d=h.dependencies,S.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},S.sibling=h.sibling,S.index=h.index,S.ref=h.ref,S}function m0(h,d,S,A,b,B){var K=2;if(A=h,typeof h=="function")o_(h)&&(K=1);else if(typeof h=="string")K=5;else e:switch(h){case u:return kl(S.children,b,B,d);case f:K=8,b|=8;break;case p:return h=os(12,S,d,b|2),h.elementType=p,h.lanes=B,h;case x:return h=os(13,S,d,b),h.elementType=x,h.lanes=B,h;case g:return h=os(19,S,d,b),h.elementType=g,h.lanes=B,h;case M:return g0(S,b,B,d);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case m:K=10;break e;case v:K=9;break e;case w:K=11;break e;case _:K=14;break e;case y:K=16,A=null;break e}throw Error(o(130,h==null?h:typeof h,""))}return d=os(K,S,d,b),d.elementType=h,d.type=A,d.lanes=B,d}function kl(h,d,S,A){return h=os(7,h,A,d),h.lanes=S,h}function g0(h,d,S,A){return h=os(22,h,A,d),h.elementType=M,h.lanes=S,h.stateNode={},h}function a_(h,d,S){return h=os(6,h,null,d),h.lanes=S,h}function l_(h,d,S){return d=os(4,h.children!==null?h.children:[],h.key,d),d.lanes=S,d.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},d}function SU(h,d,S,A,b){this.tag=d,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Qe,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ax(0),this.expirationTimes=ax(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ax(0),this.identifierPrefix=A,this.onRecoverableError=b,ge&&(this.mutableSourceEagerHydrationData=null)}function Vb(h,d,S,A,b,B,K,te,me){return h=new SU(h,d,S,te,me),d===1?(d=1,B===!0&&(d|=8)):d=0,B=os(3,null,null,d),h.current=B,B.stateNode=h,B.memoizedState={element:A,isDehydrated:S,cache:null,transitions:null},vx(B),h}function jb(h){if(!h)return Ii;h=h._reactInternals;e:{if(R(h)!==h||h.tag!==1)throw Error(o(170));var d=h;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(Un(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(o(171))}if(h.tag===1){var S=h.type;if(Un(S))return ru(h,S,d)}return d}function Wb(h){var d=h._reactInternals;if(d===void 0)throw typeof h.render=="function"?Error(o(188)):(h=Object.keys(h).join(","),Error(o(268,h)));return h=$(d),h===null?null:h.stateNode}function Xb(h,d){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var S=h.retryLane;h.retryLane=S!==0&&S<d?S:d}}function c_(h,d){Xb(h,d),(h=h.alternate)&&Xb(h,d)}function wU(h){return h=$(h),h===null?null:h.stateNode}function AU(){return null}return n.attemptContinuousHydration=function(h){if(h.tag===13){var d=er();ss(h,134217728,d),c_(h,134217728)}},n.attemptHydrationAtCurrentPriority=function(h){if(h.tag===13){var d=er(),S=Ra(h);ss(h,S,d),c_(h,S)}},n.attemptSynchronousHydration=function(h){switch(h.tag){case 3:var d=h.stateNode;if(d.current.memoizedState.isDehydrated){var S=gh(d.pendingLanes);S!==0&&(lx(d,S|1),yr(d,mi()),!(Ot&6)&&(vu(),lo()))}break;case 13:var A=er();Nb(function(){return ss(h,1,A)}),c_(h,1)}},n.batchedUpdates=function(h,d){var S=Ot;Ot|=1;try{return h(d)}finally{Ot=S,Ot===0&&(vu(),Rm&&lo())}},n.createComponentSelector=function(h){return{$$typeof:t0,value:h}},n.createContainer=function(h,d,S,A,b,B,K){return Vb(h,d,!1,null,S,A,b,B,K)},n.createHasPseudoClassSelector=function(h){return{$$typeof:n0,value:h}},n.createHydrationContainer=function(h,d,S,A,b,B,K,te,me){return h=Vb(S,A,!0,h,b,B,K,te,me),h.context=jb(null),S=h.current,A=er(),b=Ra(S),B=zo(A,b),B.callback=d??null,Ta(S,B),h.current.lanes=b,vh(h,b,A),yr(h,A),h},n.createPortal=function(h,d,S){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:A==null?null:""+A,children:h,containerInfo:d,implementation:S}},n.createRoleSelector=function(h){return{$$typeof:i0,value:h}},n.createTestNameSelector=function(h){return{$$typeof:r0,value:h}},n.createTextSelector=function(h){return{$$typeof:s0,value:h}},n.deferredUpdates=function(h){var d=tn,S=Wn.transition;try{return Wn.transition=null,tn=16,h()}finally{tn=d,Wn.transition=S}},n.discreteUpdates=function(h,d,S,A,b){var B=tn,K=Wn.transition;try{return Wn.transition=null,tn=1,h(d,S,A,b)}finally{tn=B,Wn.transition=K,Ot===0&&vu()}},n.findAllNodes=Yx,n.findBoundingRects=function(h,d){if(!ot)throw Error(o(363));d=Yx(h,d),h=[];for(var S=0;S<d.length;S++)h.push(Xt(d[S]));for(d=h.length-1;0<d;d--){S=h[d];for(var A=S.x,b=A+S.width,B=S.y,K=B+S.height,te=d-1;0<=te;te--)if(d!==te){var me=h[te],Ie=me.x,it=Ie+me.width,Ct=me.y,_t=Ct+me.height;if(A>=Ie&&B>=Ct&&b<=it&&K<=_t){h.splice(d,1);break}else if(A!==Ie||S.width!==me.width||_t<B||Ct>K){if(!(B!==Ct||S.height!==me.height||it<A||Ie>b)){Ie>A&&(me.width+=Ie-A,me.x=A),it<b&&(me.width=b-Ie),h.splice(d,1);break}}else{Ct>B&&(me.height+=Ct-B,me.y=B),_t<K&&(me.height=K-Ct),h.splice(d,1);break}}}return h},n.findHostInstance=Wb,n.findHostInstanceWithNoPortals=function(h){return h=k(h),h=h!==null?D(h):null,h===null?null:h.stateNode},n.findHostInstanceWithWarning=function(h){return Wb(h)},n.flushControlled=function(h){var d=Ot;Ot|=1;var S=Wn.transition,A=tn;try{Wn.transition=null,tn=1,h()}finally{tn=A,Wn.transition=S,Ot=d,Ot===0&&(vu(),lo())}},n.flushPassiveEffects=Ul,n.flushSync=Nb,n.focusWithin=function(h,d){if(!ot)throw Error(o(363));for(h=Xx(h),d=Bb(h,d),d=Array.from(d),h=0;h<d.length;){var S=d[h++];if(!F(S)){if(S.tag===5&&be(S.stateNode))return!0;for(S=S.child;S!==null;)d.push(S),S=S.sibling}}return!1},n.getCurrentUpdatePriority=function(){return tn},n.getFindAllNodesFailureDescription=function(h,d){if(!ot)throw Error(o(363));var S=0,A=[];h=[Xx(h),0];for(var b=0;b<h.length;){var B=h[b++],K=h[b++],te=d[K];if((B.tag!==5||!F(B))&&(Jx(B,te)&&(A.push(Kx(te)),K++,K>S&&(S=K)),K<d.length))for(B=B.child;B!==null;)h.push(B,K),B=B.sibling}if(S<d.length){for(h=[];S<d.length;S++)h.push(Kx(d[S]));return`findAllNodes was able to match part of the selector:
3678  `+(A.join(" > ")+`
3679
3680No matching component was found for:
3681  `)+h.join(" > ")}return null},n.getPublicRootInstance=function(h){if(h=h.current,!h.child)return null;switch(h.child.tag){case 5:return z(h.child.stateNode);default:return h.child.stateNode}},n.injectIntoDevTools=function(h){if(h={bundleType:h.bundleType,version:h.version,rendererPackageName:h.rendererPackageName,rendererConfig:h.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:wU,findFiberByHostInstance:h.findFiberByHostInstance||AU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")h=!1;else{var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled||!d.supportsFiber)h=!0;else{try{Cm=d.inject(h),oo=d}catch{}h=!!d.checkDCE}}return h},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(h,d,S,A){if(!ot)throw Error(o(363));h=Yx(h,d);var b=ye(h,S,A).disconnect;return{disconnect:function(){b()}}},n.registerMutableSourceForHydration=function(h,d){var S=d._getVersion;S=S(d._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[d,S]:h.mutableSourceEagerHydrationData.push(d,S)},n.runWithPriority=function(h,d){var S=tn;try{return tn=h,d()}finally{tn=S}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(h,d,S,A){var b=d.current,B=er(),K=Ra(b);return S=jb(S),d.context===null?d.context=S:d.pendingContext=S,d=zo(B,K),d.payload={element:h},A=A===void 0?null:A,A!==null&&(d.callback=A),Ta(b,d),h=ss(b,K,B),h!==null&&Im(h,b,K),K},n};b6.exports=zK;var HK=b6.exports;const GK=J1(HK),QE={},P6=t=>void Object.assign(QE,t);function VK(t,e){function n(u,{args:f=[],attach:p,...m},v){let w=`${u[0].toUpperCase()}${u.slice(1)}`,x;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;x=Xu(g,{type:u,root:v,attach:p,primitive:!0})}else{const g=QE[w];if(!g)throw new Error(`R3F: ${w} 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(f))throw new Error("R3F: The args prop must be an array!");x=Xu(new g(...f),{type:u,root:v,attach:p,memoizedProps:{args:f}})}return x.__r3f.attach===void 0&&(x.isBufferGeometry?x.__r3f.attach="geometry":x.isMaterial&&(x.__r3f.attach="material")),w!=="inject"&&y2(x,m),x}function i(u,f){let p=!1;if(f){var m,v;(m=f.__r3f)!=null&&m.attach?v2(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),p=!0),p||(v=u.__r3f)==null||v.objects.push(f),f.__r3f||Xu(f,{}),f.__r3f.parent=u,Ww(f),Ju(f)}}function r(u,f,p){let m=!1;if(f){var v,w;if((v=f.__r3f)!=null&&v.attach)v2(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){f.parent=u,f.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:f});const x=u.children.filter(_=>_!==f),g=x.indexOf(p);u.children=[...x.slice(0,g),f,...x.slice(g)],m=!0}m||(w=u.__r3f)==null||w.objects.push(f),f.__r3f||Xu(f,{}),f.__r3f.parent=u,Ww(f),Ju(f)}}function s(u,f,p=!1){u&&[...u].forEach(m=>o(f,m,p))}function o(u,f,p){if(f){var m,v,w;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(M=>M!==f)),(v=f.__r3f)!=null&&v.attach)W4(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var x;u.remove(f),(x=f.__r3f)!=null&&x.root&&qK(cv(f),f)}const _=(w=f.__r3f)==null?void 0:w.primitive,y=!_&&(p===void 0?f.dispose!==null:p);if(!_){var g;s((g=f.__r3f)==null?void 0:g.objects,f,y),s(f.children,f,y)}if(delete f.__r3f,y&&f.dispose&&f.type!=="Scene"){const M=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?Vw.unstable_scheduleCallback(Vw.unstable_IdlePriority,M):M()}Ju(u)}}function a(u,f,p,m){var v;const w=(v=u.__r3f)==null?void 0:v.parent;if(!w)return;const x=n(f,p,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&i(x,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>i(x,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||o(w,u),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(w,x),x.raycast&&x.__r3f.eventCount&&cv(x).getState().internal.interaction.push(x),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=x,g.ref&&(typeof g.ref=="function"?g.ref(x):g.ref.current=x))})}const l=()=>{};return{reconciler:GK({createInstance:n,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,f)=>{if(!f)return;const p=u.getState().scene;p.__r3f&&(p.__r3f.root=u,i(p,f))},removeChildFromContainer:(u,f)=>{f&&o(u.getState().scene,f)},insertInContainerBefore:(u,f,p)=>{if(!f||!p)return;const m=u.getState().scene;m.__r3f&&r(m,f,p)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var f;return!!((f=u==null?void 0:u.__r3f)!=null?f:{}).handlers},prepareUpdate(u,f,p,m){var v;if(((v=u==null?void 0:u.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:x=[],children:g,..._}=m,{args:y=[],children:M,...E}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((P,N)=>P!==y[N]))return[!0];const C=O6(u,_,E,!0);return C.changes.length?[!1,C]:null}},commitUpdate(u,[f,p],m,v,w,x){f?a(u,m,w,x):y2(u,p)},commitMount(u,f,p,m){var v;const w=(v=u.__r3f)!=null?v:{};u.raycast&&w.handlers&&w.eventCount&&cv(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Xu(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:p,parent:m}=(f=u.__r3f)!=null?f:{};p&&m&&W4(m,u,p),u.isObject3D&&(u.visible=!1),Ju(u)},unhideInstance(u,f){var p;const{attach:m,parent:v}=(p=u.__r3f)!=null?p:{};m&&v&&v2(v,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Ju(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():ff.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&yn.fun(performance.now)?performance.now:yn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:yn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:yn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:y2}}var H4,G4;const g2=t=>"colorSpace"in t||"outputColorSpace"in t,B6=()=>{var t;return(t=QE.ColorManagement)!=null?t:null},L6=t=>t&&t.isOrthographicCamera,jK=t=>t&&t.hasOwnProperty("current"),lm=typeof window<"u"&&((H4=window.document)!=null&&H4.createElement||((G4=window.navigator)==null?void 0:G4.product)==="ReactNative")?I.useLayoutEffect:I.useEffect;function I6(t){const e=I.useRef(t);return lm(()=>void(e.current=t),[t]),e}function WK({set:t}){return lm(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class N6 extends I.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}N6.getDerivedStateFromError=()=>({error:!0});const D6="__default",V4=new Map,XK=t=>t&&!!t.memoized&&!!t.changes;function F6(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const $h=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function cv(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const yn={obj:t=>t===Object(t)&&!yn.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:i="reference",strict:r=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(yn.str(t)||yn.num(t)||yn.boo(t))return t===e;const s=yn.obj(t);if(s&&i==="reference")return t===e;const o=yn.arr(t);if(o&&n==="reference")return t===e;if((o||s)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(s&&n==="shallow"&&i==="shallow"){for(a in r?e:t)if(!yn.equ(t[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:t)if(t[a]!==e[a])return!1;if(yn.und(a)){if(o&&t.length===0&&e.length===0||s&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function JK(t){const e={nodes:{},materials:{}};return t&&t.traverse(n=>{n.name&&(e.nodes[n.name]=n),n.material&&!e.materials[n.material.name]&&(e.materials[n.material.name]=n.material)}),e}function KK(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function Xu(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function jw(t,e){let n=t;if(e.includes("-")){const i=e.split("-"),r=i.pop();return n=i.reduce((s,o)=>s[o],t),{target:n,key:r}}else return{target:n,key:e}}const j4=/-\d+$/;function v2(t,e,n){if(yn.str(n)){if(j4.test(n)){const s=n.replace(j4,""),{target:o,key:a}=jw(t,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=jw(t,n);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=n(t,e)}function W4(t,e,n){var i,r;if(yn.str(n)){const{target:s,key:o}=jw(t,n),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(t,e);(r=e.__r3f)==null||delete r.previousAttach}function O6(t,{children:e,key:n,ref:i,...r},{children:s,key:o,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(r),p=[];if(c){const v=Object.keys(l);for(let w=0;w<v.length;w++)r.hasOwnProperty(v[w])||f.unshift([v[w],D6+"remove"])}f.forEach(([v,w])=>{var x;if((x=t.__r3f)!=null&&x.primitive&&v==="object"||yn.equ(w,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return p.push([v,w,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),p.push([v,w,!1,g]);for(const _ in r){const y=r[_];_.startsWith(`${v}-`)&&p.push([_,y,!1,_.split("-")])}});const m={...r};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(m.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(m.attach=u.memoizedProps.attach),{memoized:m,changes:p}}const YK=typeof process<"u"&&!1;function y2(t,e){var n;const i=t.__r3f,r=i==null?void 0:i.root,s=r==null||r.getState==null?void 0:r.getState(),{memoized:o,changes:a}=XK(e)?e:O6(t,e),l=i==null?void 0:i.eventCount;t.__r3f&&(t.__r3f.memoizedProps=o);for(let p=0;p<a.length;p++){let[m,v,w,x]=a[p];if(g2(t)){const M="srgb",E="srgb-linear";m==="encoding"?(m="colorSpace",v=v===3001?M:E):m==="outputEncoding"&&(m="outputColorSpace",v=v===3001?M:E)}let g=t,_=g[m];if(x.length&&(_=x.reduce((y,M)=>y[M],t),!(_&&_.set))){const[y,...M]=x.reverse();g=M.reverse().reduce((E,C)=>E[C],t),m=y}if(v===D6+"remove")if(g.constructor){let y=V4.get(g.constructor);y||(y=new g.constructor,V4.set(g.constructor,y)),v=y[m]}else v=0;if(w&&i)v?i.handlers[m]=v:delete i.handlers[m],i.eventCount=Object.keys(i.handlers).length;else if(_&&_.set&&(_.copy||_ instanceof Tc)){if(Array.isArray(v))_.fromArray?_.fromArray(v):_.set(...v);else if(_.copy&&v&&v.constructor&&(YK?_.constructor.name===v.constructor.name:_.constructor===v.constructor))_.copy(v);else if(v!==void 0){var c;const y=(c=_)==null?void 0:c.isColor;!y&&_.setScalar?_.setScalar(v):_ instanceof Tc&&v instanceof Tc?_.mask=v.mask:_.set(v),!B6()&&s&&!s.linear&&y&&_.convertSRGBToLinear()}}else{var u;if(g[m]=v,(u=g[m])!=null&&u.isTexture&&g[m].format===Mr&&g[m].type===Si&&s){const y=g[m];g2(y)&&g2(s.gl)?y.colorSpace=s.gl.outputColorSpace:y.encoding=s.gl.outputEncoding}}Ju(t)}if(i&&i.parent&&t.raycast&&l!==i.eventCount){const p=cv(t).getState().internal,m=p.interaction.indexOf(t);m>-1&&p.interaction.splice(m,1),i.eventCount&&p.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&Ww(t),t}function Ju(t){var e,n;const i=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();i&&i.internal.frames===0&&i.invalidate()}function Ww(t){t.onUpdate==null||t.onUpdate(t)}function QK(t,e){t.manual||(L6(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function wg(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function ZK(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return ff.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return ff.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return ff.ContinuousEventPriority;default:return ff.DefaultEventPriority}}function U6(t,e,n,i){const r=n.get(e);r&&(n.delete(e),n.size===0&&(t.delete(i),r.target.releasePointerCapture(i)))}function qK(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(i=>i!==e),n.initialHits=n.initialHits.filter(i=>i!==e),n.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&n.hovered.delete(r)}),n.capturedMap.forEach((i,r)=>{U6(n.capturedMap,e,i,r)})}function $K(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],f=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+f*f))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var f;return(f=c.__r3f)==null?void 0:f.handlers["onPointer"+u]}))}function i(l,c){const u=t.getState(),f=new Set,p=[],m=c?c(u.internal.interaction):u.internal.interaction;for(let g=0;g<m.length;g++){const _=$h(m[g]);_&&(_.raycaster.camera=void 0)}u.previousRoot||u.events.compute==null||u.events.compute(l,u);function v(g){const _=$h(g);if(!_||!_.events.enabled||_.raycaster.camera===null)return[];if(_.raycaster.camera===void 0){var y;_.events.compute==null||_.events.compute(l,_,(y=_.previousRoot)==null?void 0:y.getState()),_.raycaster.camera===void 0&&(_.raycaster.camera=null)}return _.raycaster.camera?_.raycaster.intersectObject(g,!0):[]}let w=m.flatMap(v).sort((g,_)=>{const y=$h(g.object),M=$h(_.object);return!y||!M?g.distance-_.distance:M.events.priority-y.events.priority||g.distance-_.distance}).filter(g=>{const _=wg(g);return f.has(_)?!1:(f.add(_),!0)});u.events.filter&&(w=u.events.filter(w,u));for(const g of w){let _=g.object;for(;_;){var x;(x=_.__r3f)!=null&&x.eventCount&&p.push({...g,eventObject:_}),_=_.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let g of u.internal.capturedMap.get(l.pointerId).values())f.has(wg(g.intersection))||p.push(g.intersection);return p}function r(l,c,u,f){const p=t.getState();if(l.length){const m={stopped:!1};for(const v of l){const w=$h(v.object)||p,{raycaster:x,pointer:g,camera:_,internal:y}=w,M=new G(g.x,g.y,0).unproject(_),E=L=>{var k,$;return(k=($=y.capturedMap.get(L))==null?void 0:$.has(v.eventObject))!=null?k:!1},C=L=>{const k={intersection:v,target:c.target};y.capturedMap.has(L)?y.capturedMap.get(L).set(v.eventObject,k):y.capturedMap.set(L,new Map([[v.eventObject,k]])),c.target.setPointerCapture(L)},P=L=>{const k=y.capturedMap.get(L);k&&U6(y.capturedMap,v.eventObject,k,L)};let N={};for(let L in c){let k=c[L];typeof k!="function"&&(N[L]=k)}let R={...v,...N,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:M,ray:x.ray,camera:_,stopPropagation(){const L="pointerId"in c&&y.capturedMap.get(c.pointerId);if((!L||L.has(v.eventObject))&&(R.stopped=m.stopped=!0,y.hovered.size&&Array.from(y.hovered.values()).find(k=>k.eventObject===v.eventObject))){const k=l.slice(0,l.indexOf(v));s([...k,v])}},target:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:P},currentTarget:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:P},nativeEvent:c};if(f(R),m.stopped===!0)break}}return l}function s(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(f=>f.object===u.object&&f.index===u.index&&f.instanceId===u.instanceId)){const p=u.eventObject.__r3f,m=p==null?void 0:p.handlers;if(c.hovered.delete(wg(u)),p!=null&&p.eventCount){const v={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function o(l,c){for(let u=0;u<c.length;u++){const f=c[u].__r3f;f==null||f.handlers.onPointerMissed==null||f.handlers.onPointerMissed(l)}}function a(l){switch(l){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),s([]))})}}return function(u){const{onPointerMissed:f,internal:p}=t.getState();p.lastEvent.current=u;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=i(u,m?n:void 0),g=v?e(u):0;l==="onPointerDown"&&(p.initialClick=[u.offsetX,u.offsetY],p.initialHits=x.map(y=>y.eventObject)),v&&!x.length&&g<=2&&(o(u,p.interaction),f&&f(u)),m&&s(x);function _(y){const M=y.eventObject,E=M.__r3f,C=E==null?void 0:E.handlers;if(E!=null&&E.eventCount)if(m){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const P=wg(y),N=p.hovered.get(P);N?N.stopped&&y.stopPropagation():(p.hovered.set(P,y),C.onPointerOver==null||C.onPointerOver(y),C.onPointerEnter==null||C.onPointerEnter(y))}C.onPointerMove==null||C.onPointerMove(y)}else{const P=C[l];P?(!v||p.initialHits.includes(M))&&(o(u,p.interaction.filter(N=>!p.initialHits.includes(N))),P(y)):v&&p.initialHits.includes(M)&&o(u,p.interaction.filter(N=>!p.initialHits.includes(N)))}}r(x,u,g,_)}}return{handlePointer:a}}const k6=t=>!!(t!=null&&t.render),z6=I.createContext(null),eY=(t,e)=>{const n=DK((a,l)=>{const c=new G,u=new G,f=new G;function p(g=l().camera,_=u,y=l().size){const{width:M,height:E,top:C,left:P}=y,N=M/E;_.isVector3?f.copy(_):f.set(..._);const R=g.getWorldPosition(c).distanceTo(f);if(L6(g))return{width:M/g.zoom,height:E/g.zoom,top:C,left:P,factor:1,distance:R,aspect:N};{const L=g.fov*Math.PI/180,k=2*Math.tan(L/2)*R,$=k*(M/E);return{width:$,height:k,top:C,left:P,factor:M/$,distance:R,aspect:N}}}let m;const v=g=>a(_=>({performance:{..._.performance,current:g}})),w=new le;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)=>t(l(),g),advance:(g,_)=>e(g,_,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new JE,pointer:w,mouse:w,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(_=>({..._,events:{..._.events,...g}})),setSize:(g,_,y,M,E)=>{const C=l().camera,P={width:g,height:_,top:M||0,left:E||0,updateStyle:y};a(N=>({size:P,viewport:{...N.viewport,...p(C,u,P)}}))},setDpr:g=>a(_=>{const y=F6(g);return{viewport:{..._.viewport,dpr:y,initialDpr:_.viewport.initialDpr||y}}}),setFrameloop:(g="always")=>{const _=l().clock;_.stop(),_.elapsedTime=0,g!=="never"&&(_.start(),_.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:I.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,_,y)=>{const M=l().internal;return M.priority=M.priority+(_>0?1:0),M.subscribers.push({ref:g,priority:_,store:y}),M.subscribers=M.subscribers.sort((E,C)=>E.priority-C.priority),()=>{const E=l().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(_>0?1:0),E.subscribers=E.subscribers.filter(C=>C.ref!==g))}}}}}),i=n.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:f}=n.getState();if(l.width!==r.width||l.height!==r.height||c.dpr!==s){var p;r=l,s=c.dpr,QK(a,l),u.setPixelRatio(c.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,m)}a!==o&&(o=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let Ag,tY=new Set,nY=new Set,iY=new Set;function x2(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function ed(t,e){switch(t){case"before":return x2(tY,e);case"after":return x2(nY,e);case"tail":return x2(iY,e)}}let _2,S2;function w2(t,e,n){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(i=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),_2=e.internal.subscribers,Ag=0;Ag<_2.length;Ag++)S2=_2[Ag],S2.ref.current(S2.store.getState(),i,n);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 rY(t){let e=!1,n=!1,i,r,s;function o(c){r=requestAnimationFrame(o),e=!0,i=0,ed("before",c),n=!0;for(const f of t.values()){var u;s=f.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((u=s.gl.xr)!=null&&u.isPresenting)&&(i+=w2(c,s))}if(n=!1,ed("after",c),i===0)return ed("tail",c),e=!1,cancelAnimationFrame(r)}function a(c,u=1){var f;if(!c)return t.forEach(p=>a(p.store.getState(),u));(f=c.gl.xr)!=null&&f.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,u=!0,f,p){if(u&&ed("before",c),f)w2(c,f,p);else for(const m of t.values())w2(c,m.store.getState());u&&ed("after",c)}return{loop:o,invalidate:a,advance:l}}function H6(){const t=I.useContext(z6);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function zr(t=n=>n,e){return H6()(t,e)}function ro(t,e=0){const n=H6(),i=n.getState().internal.subscribe,r=I6(t);return lm(()=>i(r,e,n),[e,i,n]),null}const X4=new WeakMap;function G6(t,e){return function(n,...i){let r=X4.get(n);return r||(r=new n,X4.set(n,r)),t&&t(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,JK(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function cm(t,e,n,i){const r=Array.isArray(e)?e:[e],s=OK(G6(n,i),[t,...r],{equal:yn.equ});return Array.isArray(e)?s:s[0]}cm.preload=function(t,e,n){const i=Array.isArray(e)?e:[e];return UK(G6(n),[t,...i])};cm.clear=function(t,e){const n=Array.isArray(e)?e:[e];return kK([t,...n])};const Jf=new Map,{invalidate:J4,advance:K4}=rY(Jf),{reconciler:n1,applyProps:Hu}=VK(Jf,ZK),Gu={objects:"shallow",strict:!1},sY=(t,e)=>{const n=typeof t=="function"?t(e):t;return k6(n)?n:new EE({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function oY(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=n}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:i,height:r,top:s,left:o}=t.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function aY(t){const e=Jf.get(t),n=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||eY(J4,K4),o=n||n1.createContainer(s,ff.ConcurrentRoot,null,!1,null,"",r,null);e||Jf.set(t,{fiber:o,store:s});let a,l=!1,c;return{configure(u={}){let{gl:f,size:p,scene:m,events:v,onCreated:w,shadows:x=!1,linear:g=!1,flat:_=!1,legacy:y=!1,orthographic:M=!1,frameloop:E="always",dpr:C=[1,2],performance:P,raycaster:N,camera:R,onPointerMissed:L}=u,k=s.getState(),$=k.gl;k.gl||k.set({gl:$=sY(f,t)});let ee=k.raycaster;ee||k.set({raycaster:ee=new w6});const{params:D,...U}=N||{};if(yn.equ(U,ee,Gu)||Hu(ee,{...U}),yn.equ(D,ee.params,Gu)||Hu(ee,{params:{...ee.params,...D}}),!k.camera||k.camera===c&&!yn.equ(c,R,Gu)){c=R;const W=R instanceof em,j=W?R:M?new vs(0,0,0,0,.1,1e3):new xn(75,0,.1,1e3);W||(j.position.z=5,R&&(Hu(j,R),("aspect"in R||"left"in R||"right"in R||"bottom"in R||"top"in R)&&(j.manual=!0,j.updateProjectionMatrix())),!k.camera&&!(R!=null&&R.rotation)&&j.lookAt(0,0,0)),k.set({camera:j}),ee.camera=j}if(!k.scene){let W;m!=null&&m.isScene?W=m:(W=new Mp,m&&Hu(W,m)),k.set({scene:Xu(W)})}if(!k.xr){var z;const W=(re,ue)=>{const ve=s.getState();ve.frameloop!=="never"&&K4(re,!0,ve,ue)},j=()=>{const re=s.getState();re.gl.xr.enabled=re.gl.xr.isPresenting,re.gl.xr.setAnimationLoop(re.gl.xr.isPresenting?W:null),re.gl.xr.isPresenting||J4(re)},Z={connect(){const re=s.getState().gl;re.xr.addEventListener("sessionstart",j),re.xr.addEventListener("sessionend",j)},disconnect(){const re=s.getState().gl;re.xr.removeEventListener("sessionstart",j),re.xr.removeEventListener("sessionend",j)}};typeof((z=$.xr)==null?void 0:z.addEventListener)=="function"&&Z.connect(),k.set({xr:Z})}if($.shadowMap){const W=$.shadowMap.enabled,j=$.shadowMap.type;if($.shadowMap.enabled=!!x,yn.boo(x))$.shadowMap.type=Ld;else if(yn.str(x)){var Y;const Z={basic:IN,percentage:hy,soft:Ld,variance:Os};$.shadowMap.type=(Y=Z[x])!=null?Y:Ld}else yn.obj(x)&&Object.assign($.shadowMap,x);(W!==$.shadowMap.enabled||j!==$.shadowMap.type)&&($.shadowMap.needsUpdate=!0)}const O=B6();O&&("enabled"in O?O.enabled=!y:"legacyMode"in O&&(O.legacyMode=y)),l||Hu($,{outputEncoding:g?3e3:3001,toneMapping:_?Js:aE}),k.legacy!==y&&k.set(()=>({legacy:y})),k.linear!==g&&k.set(()=>({linear:g})),k.flat!==_&&k.set(()=>({flat:_})),f&&!yn.fun(f)&&!k6(f)&&!yn.equ(f,$,Gu)&&Hu($,f),v&&!k.events.handlers&&k.set({events:v(s)});const H=oY(t,p);return yn.equ(H,k.size,Gu)||k.setSize(H.width,H.height,H.updateStyle,H.top,H.left),C&&k.viewport.dpr!==F6(C)&&k.setDpr(C),k.frameloop!==E&&k.setFrameloop(E),k.onPointerMissed||k.set({onPointerMissed:L}),P&&!yn.equ(P,k.performance,Gu)&&k.set(W=>({performance:{...W.performance,...P}})),a=w,l=!0,this},render(u){return l||this.configure(),n1.updateContainer(T.jsx(lY,{store:s,children:u,onCreated:a,rootElement:t}),o,null,()=>{}),s},unmount(){V6(t)}}}function lY({store:t,children:e,onCreated:n,rootElement:i}){return lm(()=>{const r=t.getState();r.set(s=>({internal:{...s.internal,active:!0}})),n&&n(r),t.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),T.jsx(z6.Provider,{value:t,children:e})}function V6(t,e){const n=Jf.get(t),i=n==null?void 0:n.fiber;if(i){const r=n==null?void 0:n.store.getState();r&&(r.internal.active=!1),n1.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),KK(r),Jf.delete(t),e&&e(t)}catch{}},500)})}}n1.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:I.version});const A2={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 cY(t){const{handlePointer:e}=$K(t);return{priority:1,enabled:!0,compute(n,i,r){i.pointer.set(n.offsetX/i.size.width*2-1,-(n.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(A2).reduce((n,i)=>({...n,[i]:e(i)}),{}),update:()=>{var n;const{events:i,internal:r}=t.getState();(n=r.lastEvent)!=null&&n.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:n=>{var i;const{set:r,events:s}=t.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:n}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,c]=A2[o];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:i}=t.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=A2[s];i.connected.removeEventListener(a,o)}}),n(s=>({events:{...s.events,connected:void 0}}))}}}}function Y4(t,e){let n;return(...i)=>{window.clearTimeout(n),n=window.setTimeout(()=>t(...i),e)}}function uY({debounce:t,scroll:e,polyfill:n,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const r=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!r)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[s,o]=I.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=I.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=I.useRef(!1);I.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[f,p,m]=I.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:_,top:y,width:M,height:E,bottom:C,right:P,x:N,y:R}=a.current.element.getBoundingClientRect(),L={left:_,top:y,width:M,height:E,bottom:C,right:P,x:N,y:R};a.current.element instanceof HTMLElement&&i&&(L.height=a.current.element.offsetHeight,L.width=a.current.element.offsetWidth),Object.freeze(L),u.current&&!pY(a.current.lastBounds,L)&&o(a.current.lastBounds=L)};return[g,c?Y4(g,c):g,l?Y4(g,l):g]},[o,i,l,c]);function v(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function w(){a.current.element&&(a.current.resizeObserver=new r(m),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(g=>g.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const x=g=>{!g||g===a.current.element||(v(),a.current.element=g,a.current.scrollContainers=j6(g),w())};return hY(m,!!e),fY(p),I.useEffect(()=>{v(),w()},[e,m,p]),I.useEffect(()=>v,[]),[x,s,f]}function fY(t){I.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function hY(t,e){I.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function j6(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:i,overflowY:r}=window.getComputedStyle(t);return[n,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...j6(t.parentElement)]}const dY=["x","y","top","bottom","left","right","width","height"],pY=(t,e)=>dY.every(n=>t[n]===e[n]);var mY=Object.defineProperty,gY=Object.defineProperties,vY=Object.getOwnPropertyDescriptors,Q4=Object.getOwnPropertySymbols,yY=Object.prototype.hasOwnProperty,xY=Object.prototype.propertyIsEnumerable,Z4=(t,e,n)=>e in t?mY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q4=(t,e)=>{for(var n in e||(e={}))yY.call(e,n)&&Z4(t,n,e[n]);if(Q4)for(var n of Q4(e))xY.call(e,n)&&Z4(t,n,e[n]);return t},_Y=(t,e)=>gY(t,vY(e)),$4,eP;typeof window<"u"&&(($4=window.document)!=null&&$4.createElement||((eP=window.navigator)==null?void 0:eP.product)==="ReactNative")?I.useLayoutEffect:I.useEffect;function W6(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=e?t.return:t.child;for(;i;){const r=W6(i,e,n);if(r)return r;i=e?null:i.sibling}}function X6(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const tP=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=tP;return}return tP.apply(this,arguments)};const ZE=X6(I.createContext(null));class J6 extends I.Component{render(){return I.createElement(ZE.Provider,{value:this._reactInternals},this.props.children)}}function SY(){const t=I.useContext(ZE);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=I.useId();return I.useMemo(()=>{for(const i of[t,t==null?void 0:t.alternate]){if(!i)continue;const r=W6(i,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[t,e])}function wY(){const t=SY(),[e]=I.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const r=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;r&&r!==ZE&&!e.has(r)&&e.set(r,I.useContext(X6(r)))}n=n.return}return e}function AY(){const t=wY();return I.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>I.createElement(e,null,I.createElement(n.Provider,_Y(q4({},i),{value:t.get(n)}))),e=>I.createElement(J6,q4({},e))),[t])}const MY=I.forwardRef(function({children:e,fallback:n,resize:i,style:r,gl:s,events:o=cY,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:p,orthographic:m,frameloop:v,dpr:w,performance:x,raycaster:g,camera:_,scene:y,onPointerMissed:M,onCreated:E,...C},P){I.useMemo(()=>P6(LK),[]);const N=AY(),[R,L]=uY({scroll:!0,debounce:{scroll:50,resize:0},...i}),k=I.useRef(null),$=I.useRef(null);I.useImperativeHandle(P,()=>k.current);const ee=I6(M),[D,U]=I.useState(!1),[z,Y]=I.useState(!1);if(D)throw D;if(z)throw z;const O=I.useRef(null);lm(()=>{const W=k.current;L.width>0&&L.height>0&&W&&(O.current||(O.current=aY(W)),O.current.configure({gl:s,events:o,shadows:c,linear:u,flat:f,legacy:p,orthographic:m,frameloop:v,dpr:w,performance:x,raycaster:g,camera:_,scene:y,size:L,onPointerMissed:(...j)=>ee.current==null?void 0:ee.current(...j),onCreated:j=>{j.events.connect==null||j.events.connect(a?jK(a)?a.current:a:$.current),l&&j.setEvents({compute:(Z,re)=>{const ue=Z[l+"X"],ve=Z[l+"Y"];re.pointer.set(ue/re.size.width*2-1,-(ve/re.size.height)*2+1),re.raycaster.setFromCamera(re.pointer,re.camera)}}),E==null||E(j)}}),O.current.render(T.jsx(N,{children:T.jsx(N6,{set:Y,children:T.jsx(I.Suspense,{fallback:T.jsx(WK,{set:U}),children:e??null})})})))}),I.useEffect(()=>{const W=k.current;if(W)return()=>V6(W)},[]);const H=a?"none":"auto";return T.jsx("div",{ref:$,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:H,...r},...C,children:T.jsx("div",{ref:R,style:{width:"100%",height:"100%"},children:T.jsx("canvas",{ref:k,style:{display:"block"},children:n})})})}),qE=I.forwardRef(function(e,n){return T.jsx(J6,{children:T.jsx(MY,{...e,ref:n})})}),um=new G,$E=new G,EY=new G,nP=new le;function TY(t,e,n){const i=um.setFromMatrixPosition(t.matrixWorld);i.project(e);const r=n.width/2,s=n.height/2;return[i.x*r+r,-(i.y*s)+s]}function bY(t,e){const n=um.setFromMatrixPosition(t.matrixWorld),i=$E.setFromMatrixPosition(e.matrixWorld),r=n.sub(i),s=e.getWorldDirection(EY);return r.angleTo(s)>Math.PI/2}function CY(t,e,n,i){const r=um.setFromMatrixPosition(t.matrixWorld),s=r.clone();s.project(e),nP.set(s.x,s.y),n.setFromCamera(nP,e);const o=n.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(n.ray.origin)<a}return!0}function RY(t,e){if(e instanceof vs)return e.zoom;if(e instanceof xn){const n=um.setFromMatrixPosition(t.matrixWorld),i=$E.setFromMatrixPosition(e.matrixWorld),r=e.fov*Math.PI/180,s=n.distanceTo(i);return 1/(2*Math.tan(r/2)*s)}else return 1}function PY(t,e,n){if(e instanceof xn||e instanceof vs){const i=um.setFromMatrixPosition(t.matrixWorld),r=$E.setFromMatrixPosition(e.matrixWorld),s=i.distanceTo(r),o=(n[1]-n[0])/(e.far-e.near),a=n[1]-o*e.far;return Math.round(o*s+a)}}const Xw=t=>Math.abs(t)<1e-10?0:t;function K6(t,e,n=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=Xw(e[r]*t.elements[r])+(r!==15?",":")");return n+i}const BY=(t=>e=>K6(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),LY=(t=>(e,n)=>K6(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]);function IY(t){return t&&typeof t=="object"&&"current"in t}const NY=I.forwardRef(({children:t,eps:e=.001,style:n,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:f,onOcclude:p,castShadow:m,receiveShadow:v,material:w,geometry:x,zIndexRange:g=[16777271,0],calculatePosition:_=TY,as:y="div",wrapperClass:M,pointerEvents:E="auto",...C},P)=>{const{gl:N,camera:R,scene:L,size:k,raycaster:$,events:ee,viewport:D}=zr(),[U]=I.useState(()=>document.createElement(y)),z=I.useRef(),Y=I.useRef(null),O=I.useRef(0),H=I.useRef([0,0]),W=I.useRef(null),j=I.useRef(null),Z=(a==null?void 0:a.current)||ee.connected||N.domElement.parentNode,re=I.useRef(null),ue=I.useRef(!1),ve=I.useMemo(()=>f&&f!=="blending"||Array.isArray(f)&&f.length&&IY(f[0]),[f]);I.useLayoutEffect(()=>{const Ze=N.domElement;f&&f==="blending"?(Ze.style.zIndex=`${Math.floor(g[0]/2)}`,Ze.style.position="absolute",Ze.style.pointerEvents="none"):(Ze.style.zIndex=null,Ze.style.position=null,Ze.style.pointerEvents=null)},[f]),I.useLayoutEffect(()=>{if(Y.current){const Ze=z.current=xN(U);if(L.updateMatrixWorld(),u)U.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Me=_(Y.current,R,k);U.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Me[0]}px,${Me[1]}px,0);transform-origin:0 0;`}return Z&&(r?Z.prepend(U):Z.appendChild(U)),()=>{Z&&Z.removeChild(U),Ze.unmount()}}},[Z,u]),I.useLayoutEffect(()=>{M&&(U.className=M)},[M]);const Re=I.useMemo(()=>u?{position:"absolute",top:0,left:0,width:k.width,height:k.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-k.height/2,left:-k.width/2,width:k.width,height:k.height},...n},[n,s,o,k,u]),Le=I.useMemo(()=>({position:"absolute",pointerEvents:E}),[E]);I.useLayoutEffect(()=>{if(ue.current=!1,u){var Ze;(Ze=z.current)==null||Ze.render(I.createElement("div",{ref:W,style:Re},I.createElement("div",{ref:j,style:Le},I.createElement("div",{ref:P,className:i,style:n,children:t}))))}else{var Me;(Me=z.current)==null||Me.render(I.createElement("div",{ref:P,style:Re,className:i,children:t}))}});const ze=I.useRef(!0);ro(Ze=>{if(Y.current){R.updateMatrixWorld(),Y.current.updateWorldMatrix(!0,!1);const Me=u?H.current:_(Y.current,R,k);if(u||Math.abs(O.current-R.zoom)>e||Math.abs(H.current[0]-Me[0])>e||Math.abs(H.current[1]-Me[1])>e){const Q=bY(Y.current,R);let ge=!1;ve&&(Array.isArray(f)?ge=f.map(Fe=>Fe.current):f!=="blending"&&(ge=[L]));const de=ze.current;if(ge){const Fe=CY(Y.current,R,$,ge);ze.current=Fe&&!Q}else ze.current=!Q;de!==ze.current&&(p?p(!ze.current):U.style.display=ze.current?"block":"none");const Ae=Math.floor(g[0]/2),xe=f?ve?[g[0],Ae]:[Ae-1,0]:g;if(U.style.zIndex=`${PY(Y.current,R,xe)}`,u){const[Fe,Ge]=[k.width/2,k.height/2],We=R.projectionMatrix.elements[5]*Ge,{isOrthographicCamera:ot,top:rt,left:Xt,bottom:X,right:F}=R,se=BY(R.matrixWorldInverse),be=ot?`scale(${We})translate(${Xw(-(F+Xt)/2)}px,${Xw((rt+X)/2)}px)`:`translateZ(${We}px)`;let ye=Y.current.matrixWorld;c&&(ye=R.matrixWorldInverse.clone().transpose().copyPosition(ye).scale(Y.current.scale),ye.elements[3]=ye.elements[7]=ye.elements[11]=0,ye.elements[15]=1),U.style.width=k.width+"px",U.style.height=k.height+"px",U.style.perspective=ot?"":`${We}px`,W.current&&j.current&&(W.current.style.transform=`${be}${se}translate(${Fe}px,${Ge}px)`,j.current.style.transform=LY(ye,1/((l||10)/400)))}else{const Fe=l===void 0?1:RY(Y.current,R)*l;U.style.transform=`translate3d(${Me[0]}px,${Me[1]}px,0) scale(${Fe})`}H.current=Me,O.current=R.zoom}}if(!ve&&re.current&&!ue.current)if(u){if(W.current){const Me=W.current.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const{isOrthographicCamera:Q}=R;if(Q||x)C.scale&&(Array.isArray(C.scale)?C.scale instanceof G?re.current.scale.copy(C.scale.clone().divideScalar(1)):re.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):re.current.scale.setScalar(1/C.scale));else{const ge=(l||10)/400,de=Me.clientWidth*ge,Ae=Me.clientHeight*ge;re.current.scale.set(de,Ae,1)}ue.current=!0}}}else{const Me=U.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const Q=1/D.factor,ge=Me.clientWidth*Q,de=Me.clientHeight*Q;re.current.scale.set(ge,de,1),ue.current=!0}re.current.lookAt(Ze.camera.position)}});const Qe=I.useMemo(()=>({vertexShader:u?void 0:`
3682          /*
3683            This shader is from the THREE's SpriteMaterial.
3684            We need to turn the backing plane into a Sprite
3685            (make it always face the camera) if "transfrom"
3686            is false.
3687          */
3688          #include <common>
3689
3690          void main() {
3691            vec2 center = vec2(0., 1.);
3692            float rotation = 0.0;
3693
3694            // This is somewhat arbitrary, but it seems to work well
3695            // Need to figure out how to derive this dynamically if it even matters
3696            float size = 0.03;
3697
3698            vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
3699            vec2 scale;
3700            scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
3701            scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
3702
3703            bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3704            if ( isPerspective ) scale *= - mvPosition.z;
3705
3706            vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
3707            vec2 rotatedPosition;
3708            rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3709            rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3710            mvPosition.xy += rotatedPosition;
3711
3712            gl_Position = projectionMatrix * mvPosition;
3713          }
3714      `,fragmentShader:`
3715        void main() {
3716          gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
3717        }
3718      `}),[u]);return I.createElement("group",ga({},C,{ref:Y}),f&&!ve&&I.createElement("mesh",{castShadow:m,receiveShadow:v,ref:re},x||I.createElement("planeGeometry",null),w||I.createElement("shaderMaterial",{side:ji,vertexShader:Qe.vertexShader,fragmentShader:Qe.fragmentShader})))});let td;function DY(){var t;if(td!==void 0)return td;try{let e;const n=document.createElement("canvas");return td=!!(window.WebGL2RenderingContext&&(e=n.getContext("webgl2"))),e&&((t=e.getExtension("WEBGL_lose_context"))==null||t.loseContext()),td}catch{return td=!1}}const FY=(()=>parseInt(Tl.replace(/\D+/g,"")))();function iP(t,e){if(e===uD)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===Zv||e===mE){let n=t.getIndex();if(n===null){const o=[],a=t.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)o.push(l);t.setIndex(o),n=t.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t}const i=n.count-2,r=[];if(n)if(e===Zv)for(let o=1;o<=i;o++)r.push(n.getX(0)),r.push(n.getX(o)),r.push(n.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(r.push(n.getX(o)),r.push(n.getX(o+1)),r.push(n.getX(o+2))):(r.push(n.getX(o+2)),r.push(n.getX(o+1)),r.push(n.getX(o)));r.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=t.clone();return s.setIndex(r),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t}var OY=Object.defineProperty,UY=(t,e,n)=>e in t?OY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kY=(t,e,n)=>(UY(t,typeof e!="symbol"?e+"":e,n),n);class zY{constructor(){kY(this,"_listeners")}addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}}var HY=Object.defineProperty,GY=(t,e,n)=>e in t?HY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,St=(t,e,n)=>(GY(t,typeof e!="symbol"?e+"":e,n),n);
3718const Mg=new $c,rP=new ta,VY=Math.cos(70*(Math.PI/180)),sP=(t,e)=>(t%e+e)%e;let jY=class extends zY{constructor(e,n){super(),St(this,"object"),St(this,"domElement"),St(this,"enabled",!0),St(this,"target",new G),St(this,"minDistance",0),St(this,"maxDistance",1/0),St(this,"minZoom",0),St(this,"maxZoom",1/0),St(this,"minPolarAngle",0),St(this,"maxPolarAngle",Math.PI),St(this,"minAzimuthAngle",-1/0),St(this,"maxAzimuthAngle",1/0),St(this,"enableDamping",!1),St(this,"dampingFactor",.05),St(this,"enableZoom",!0),St(this,"zoomSpeed",1),St(this,"enableRotate",!0),St(this,"rotateSpeed",1),St(this,"enablePan",!0),St(this,"panSpeed",1),St(this,"screenSpacePanning",!0),St(this,"keyPanSpeed",7),St(this,"zoomToCursor",!1),St(this,"autoRotate",!1),St(this,"autoRotateSpeed",2),St(this,"reverseOrbit",!1),St(this,"reverseHorizontalOrbit",!1),St(this,"reverseVerticalOrbit",!1),St(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),St(this,"mouseButtons",{LEFT:nc.ROTATE,MIDDLE:nc.DOLLY,RIGHT:nc.PAN}),St(this,"touches",{ONE:ic.ROTATE,TWO:ic.DOLLY_PAN}),St(this,"target0"),St(this,"position0"),St(this,"zoom0"),St(this,"_domElementKeyEvents",null),St(this,"getPolarAngle"),St(this,"getAzimuthalAngle"),St(this,"setPolarAngle"),St(this,"setAzimuthalAngle"),St(this,"getDistance"),St(this,"getZoomScale"),St(this,"listenToKeyEvents"),St(this,"stopListenToKeyEvents"),St(this,"saveState"),St(this,"reset"),St(this,"update"),St(this,"connect"),St(this,"dispose"),St(this,"dollyIn"),St(this,"dollyOut"),St(this,"getScale"),St(this,"setScale"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>u.phi,this.getAzimuthalAngle=()=>u.theta,this.setPolarAngle=q=>{let fe=sP(q,2*Math.PI),we=u.phi;we<0&&(we+=2*Math.PI),fe<0&&(fe+=2*Math.PI);let J=Math.abs(fe-we);2*Math.PI-J<J&&(fe<we?fe+=2*Math.PI:we+=2*Math.PI),f.phi=fe-we,i.update()},this.setAzimuthalAngle=q=>{let fe=sP(q,2*Math.PI),we=u.theta;we<0&&(we+=2*Math.PI),fe<0&&(fe+=2*Math.PI);let J=Math.abs(fe-we);2*Math.PI-J<J&&(fe<we?fe+=2*Math.PI:we+=2*Math.PI),f.theta=fe-we,i.update()},this.getDistance=()=>i.object.position.distanceTo(i.target),this.listenToKeyEvents=q=>{q.addEventListener("keydown",Ee),this._domElementKeyEvents=q},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Ee),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const q=new G,fe=new G(0,1,0),we=new wi().setFromUnitVectors(e.up,fe),J=we.clone().invert(),Se=new G,Te=new wi,De=2*Math.PI;return function(){const _e=i.object.position;we.setFromUnitVectors(e.up,fe),J.copy(we).invert(),q.copy(_e).sub(i.target),q.applyQuaternion(we),u.setFromVector3(q),i.autoRotate&&l===a.NONE&&D($()),i.enableDamping?(u.theta+=f.theta*i.dampingFactor,u.phi+=f.phi*i.dampingFactor):(u.theta+=f.theta,u.phi+=f.phi);let Ke=i.minAzimuthAngle,Xe=i.maxAzimuthAngle;isFinite(Ke)&&isFinite(Xe)&&(Ke<-Math.PI?Ke+=De:Ke>Math.PI&&(Ke-=De),Xe<-Math.PI?Xe+=De:Xe>Math.PI&&(Xe-=De),Ke<=Xe?u.theta=Math.max(Ke,Math.min(Xe,u.theta)):u.theta=u.theta>(Ke+Xe)/2?Math.max(Ke,u.theta):Math.min(Xe,u.theta)),u.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,u.phi)),u.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&R||i.object.isOrthographicCamera?u.radius=re(u.radius):u.radius=re(u.radius*p),q.setFromSpherical(u),q.applyQuaternion(J),_e.copy(i.target).add(q),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(f.theta*=1-i.dampingFactor,f.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(f.set(0,0,0),m.set(0,0,0));let Nt=!1;if(i.zoomToCursor&&R){let Ne=null;if(i.object instanceof xn&&i.object.isPerspectiveCamera){const gt=q.length();Ne=re(gt*p);const Jt=gt-Ne;i.object.position.addScaledVector(P,Jt),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const gt=new G(N.x,N.y,0);gt.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Nt=!0;const Jt=new G(N.x,N.y,0);Jt.unproject(i.object),i.object.position.sub(Jt).add(gt),i.object.updateMatrixWorld(),Ne=q.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Ne!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Ne).add(i.object.position):(Mg.origin.copy(i.object.position),Mg.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Mg.direction))<VY?e.lookAt(i.target):(rP.setFromNormalAndCoplanarPoint(i.object.up,i.target),Mg.intersectPlane(rP,i.target))))}else i.object instanceof vs&&i.object.isOrthographicCamera&&(Nt=p!==1,Nt&&(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix()));return p=1,R=!1,Nt||Se.distanceToSquared(i.object.position)>c||8*(1-Te.dot(i.object.quaternion))>c?(i.dispatchEvent(r),Se.copy(i.object.position),Te.copy(i.object.quaternion),Nt=!1,!0):!1}})(),this.connect=q=>{i.domElement=q,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Oe),i.domElement.addEventListener("pointerdown",Xt),i.domElement.addEventListener("pointercancel",F),i.domElement.addEventListener("wheel",ye)},this.dispose=()=>{var q,fe,we,J,Se,Te;i.domElement&&(i.domElement.style.touchAction="auto"),(q=i.domElement)==null||q.removeEventListener("contextmenu",Oe),(fe=i.domElement)==null||fe.removeEventListener("pointerdown",Xt),(we=i.domElement)==null||we.removeEventListener("pointercancel",F),(J=i.domElement)==null||J.removeEventListener("wheel",ye),(Se=i.domElement)==null||Se.ownerDocument.removeEventListener("pointermove",X),(Te=i.domElement)==null||Te.ownerDocument.removeEventListener("pointerup",F),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",Ee)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const c=1e-6,u=new t1,f=new t1;let p=1;
3718const m=new G,v=new le,w=new le,x=new le,g=new le,_=new le,y=new le,M=new le,E=new le,C=new le,P=new G,N=new le;let R=!1;const L=[],k={};function $(){return 2*Math.PI/60/60*i.autoRotateSpeed}function ee(){return Math.pow(.95,i.zoomSpeed)}function D(q){i.reverseOrbit||i.reverseHorizontalOrbit?f.theta+=q:f.theta-=q}function U(q){i.reverseOrbit||i.reverseVerticalOrbit?f.phi+=q:f.phi-=q}const z=(()=>{const q=new G;return function(we,J){q.setFromMatrixColumn(J,0),q.multiplyScalar(-we),m.add(q)}})(),Y=(()=>{const q=new G;return function(we,J){i.screenSpacePanning===!0?q.setFromMatrixColumn(J,1):(q.setFromMatrixColumn(J,0),q.crossVectors(i.object.up,q)),q.multiplyScalar(we),m.add(q)}})(),O=(()=>{const q=new G;return function(we,J){const Se=i.domElement;if(Se&&i.object instanceof xn&&i.object.isPerspectiveCamera){const Te=i.object.position;q.copy(Te).sub(i.target);let De=q.length();De*=Math.tan(i.object.fov/2*Math.PI/180),z(2*we*De/Se.clientHeight,i.object.matrix),Y(2*J*De/Se.clientHeight,i.object.matrix)}else Se&&i.object instanceof vs&&i.object.isOrthographicCamera?(z(we*(i.object.right-i.object.left)/i.object.zoom/Se.clientWidth,i.object.matrix),Y(J*(i.object.top-i.object.bottom)/i.object.zoom/Se.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function H(q){i.object instanceof xn&&i.object.isPerspectiveCamera||i.object instanceof vs&&i.object.isOrthographicCamera?p=q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function W(q){H(p/q)}function j(q){H(p*q)}function Z(q){if(!i.zoomToCursor||!i.domElement)return;R=!0;const fe=i.domElement.getBoundingClientRect(),we=q.clientX-fe.left,J=q.clientY-fe.top,Se=fe.width,Te=fe.height;N.x=we/Se*2-1,N.y=-(J/Te)*2+1,P.set(N.x,N.y,1).unproject(i.object).sub(i.object.position).normalize()}function re(q){return Math.max(i.minDistance,Math.min(i.maxDistance,q))}function ue(q){v.set(q.clientX,q.clientY)}function ve(q){Z(q),M.set(q.clientX,q.clientY)}function Re(q){g.set(q.clientX,q.clientY)}function Le(q){w.set(q.clientX,q.clientY),x.subVectors(w,v).multiplyScalar(i.rotateSpeed);const fe=i.domElement;fe&&(D(2*Math.PI*x.x/fe.clientHeight),U(2*Math.PI*x.y/fe.clientHeight)),v.copy(w),i.update()}function ze(q){E.set(q.clientX,q.clientY),C.subVectors(E,M),C.y>0?W(ee()):C.y<0&&j(ee()),M.copy(E),i.update()}function Qe(q){_.set(q.clientX,q.clientY),y.subVectors(_,g).multiplyScalar(i.panSpeed),O(y.x,y.y),g.copy(_),i.update()}function Ze(q){Z(q),q.deltaY<0?j(ee()):q.deltaY>0&&W(ee()),i.update()}function Me(q){let fe=!1;switch(q.code){case i.keys.UP:O(0,i.keyPanSpeed),fe=!0;break;case i.keys.BOTTOM:O(0,-i.keyPanSpeed),fe=!0;break;case i.keys.LEFT:O(i.keyPanSpeed,0),fe=!0;break;case i.keys.RIGHT:O(-i.keyPanSpeed,0),fe=!0;break}fe&&(q.preventDefault(),i.update())}function Q(){if(L.length==1)v.set(L[0].pageX,L[0].pageY);else{const q=.5*(L[0].pageX+L[1].pageX),fe=.5*(L[0].pageY+L[1].pageY);
3718v.set(q,fe)}}function ge(){if(L.length==1)g.set(L[0].pageX,L[0].pageY);else{const q=.5*(L[0].pageX+L[1].pageX),fe=.5*(L[0].pageY+L[1].pageY);g.set(q,fe)}}function de(){const q=L[0].pageX-L[1].pageX,fe=L[0].pageY-L[1].pageY,we=Math.sqrt(q*q+fe*fe);M.set(0,we)}function Ae(){i.enableZoom&&de(),i.enablePan&&ge()}function xe(){i.enableZoom&&de(),i.enableRotate&&Q()}function Fe(q){if(L.length==1)w.set(q.pageX,q.pageY);else{const we=xt(q),J=.5*(q.pageX+we.x),Se=.5*(q.pageY+we.y);w.set(J,Se)}x.subVectors(w,v).multiplyScalar(i.rotateSpeed);const fe=i.domElement;fe&&(D(2*Math.PI*x.x/fe.clientHeight),U(2*Math.PI*x.y/fe.clientHeight)),v.copy(w)}function Ge(q){if(L.length==1)_.set(q.pageX,q.pageY);else{const fe=xt(q),we=.5*(q.pageX+fe.x),J=.5*(q.pageY+fe.y);_.set(we,J)}y.subVectors(_,g).multiplyScalar(i.panSpeed),O(y.x,y.y),g.copy(_)}function We(q){const fe=xt(q),we=q.pageX-fe.x,J=q.pageY-fe.y,Se=Math.sqrt(we*we+J*J);E.set(0,Se),C.set(0,Math.pow(E.y/M.y,i.zoomSpeed)),W(C.y),M.copy(E)}function ot(q){i.enableZoom&&We(q),i.enablePan&&Ge(q)}function rt(q){i.enableZoom&&We(q),i.enableRotate&&Fe(q)}function Xt(q){var fe,we;i.enabled!==!1&&(L.length===0&&((fe=i.domElement)==null||fe.ownerDocument.addEventListener("pointermove",X),(we=i.domElement)==null||we.ownerDocument.addEventListener("pointerup",F)),mt(q),q.pointerType==="touch"?et(q):se(q))}function X(q){i.enabled!==!1&&(q.pointerType==="touch"?Pe(q):be(q))}function F(q){var fe,we,J;Bt(q),L.length===0&&((fe=i.domElement)==null||fe.releasePointerCapture(q.pointerId),(we=i.domElement)==null||we.ownerDocument.removeEventListener("pointermove",X),(J=i.domElement)==null||J.ownerDocument.removeEventListener("pointerup",F)),i.dispatchEvent(o),l=a.NONE}function se(q){let fe;switch(q.button){case 0:fe=i.mouseButtons.LEFT;break;case 1:fe=i.mouseButtons.MIDDLE;break;case 2:fe=i.mouseButtons.RIGHT;break;default:fe=-1}switch(fe){case nc.DOLLY:if(i.enableZoom===!1)return;ve(q),l=a.DOLLY;break;case nc.ROTATE:if(q.ctrlKey||q.metaKey||q.shiftKey){if(i.enablePan===!1)return;Re(q),l=a.PAN}else{if(i.enableRotate===!1)return;ue(q),l=a.ROTATE}break;case nc.PAN:if(q.ctrlKey||q.metaKey||q.shiftKey){if(i.enableRotate===!1)return;ue(q),l=a.ROTATE}else{if(i.enablePan===!1)return;Re(q),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function be(q){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;Le(q);break;case a.DOLLY:if(i.enableZoom===!1)return;ze(q);break;case a.PAN:if(i.enablePan===!1)return;Qe(q);break}}function ye(q){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(q.preventDefault(),i.dispatchEvent(s),Ze(q),i.dispatchEvent(o))}function Ee(q){i.enabled===!1||i.enablePan===!1||Me(q)}function et(q){switch(Ce(q),L.length){case 1:switch(i.touches.ONE){case ic.ROTATE:if(i.enableRotate===!1)return;Q(),l=a.TOUCH_ROTATE;break;case ic.PAN:if(i.enablePan===!1)return;ge(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case ic.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Ae(),l=a.TOUCH_DOLLY_PAN;break;case ic.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;xe(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Pe(q){switch(Ce(q),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Fe(q),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ge(q),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;ot(q),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;rt(q),i.update();break;default:l=a.NONE}}function Oe(q){i.enabled!==!1&&q.preventDefault()}function mt(q){L.push(q)}function Bt(q){delete k[q.pointerId];for(let fe=0;fe<L.length;fe++)if(L[fe].pointerId==q.pointerId){L.splice(fe,1);return}}function Ce(q){let fe=k[q.pointerId];fe===void 0&&(fe=new le,k[q.pointerId]=fe),fe.set(q.pageX,q.pageY)}function xt(q){const fe=q.pointerId===L[0].pointerId?L[1]:L[0];return k[fe.pointerId]}this.dollyIn=(q=ee())=>{j(q),i.update()},this.dollyOut=(q=ee())=>{W(q),i.update()},this.getScale=()=>p,this.setScale=q=>{H(q),i.update()},this.getZoomScale=()=>ee(),n!==void 0&&this.connect(n),this.update()}};function i1(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let e="";for(let n=0,i=t.length;n<i;n++)e+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(e))}catch{return e}}const vc="srgb",fa="srgb-linear",oP=3001,WY=3e3;class eT extends Qi{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(n){return new QY(n)}),this.register(function(n){return new ZY(n)}),this.register(function(n){return new oQ(n)}),this.register(function(n){return new aQ(n)}),this.register(function(n){return new lQ(n)}),this.register(function(n){return new $Y(n)}),this.register(function(n){return new eQ(n)}),this.register(function(n){return new tQ(n)}),this.register(function(n){return new nQ(n)}),this.register(function(n){return new YY(n)}),this.register(function(n){return new iQ(n)}),this.register(function(n){return new qY(n)}),this.register(function(n){return new sQ(n)}),this.register(function(n){return new rQ(n)}),this.register(function(n){return new JY(n)}),this.register(function(n){return new cQ(n)}),this.register(function(n){return new uQ(n)})}load(e,n,i,r){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const c=dl.extractUrlBase(e);o=dl.resolveURL(c,this.path)}else o=dl.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){r?r(c):console.error(c),s.manager.itemError(e),s.manager.itemEnd(e)},l=new Qr(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{
vendor: 14,641 bytes, line 3718
3718s.parse(c,o,function(u){n(u),s.manager.itemEnd(e)},a)}catch(u){a(u)}},i,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,i,r){let s;const o={},a={};if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(i1(new Uint8Array(e.slice(0,4)))===Y6){try{o[Vt.KHR_BINARY_GLTF]=new fQ(e)}catch(u){r&&r(u);return}s=JSON.parse(o[Vt.KHR_BINARY_GLTF].content)}else s=JSON.parse(i1(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 MQ(s,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c<this.pluginCallbacks.length;c++){const u=this.pluginCallbacks[c](l);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[u.name]=u,o[u.name]=!0}if(s.extensionsUsed)for(let c=0;c<s.extensionsUsed.length;++c){const u=s.extensionsUsed[c],f=s.extensionsRequired||[];switch(u){case Vt.KHR_MATERIALS_UNLIT:o[u]=new KY;break;case Vt.KHR_DRACO_MESH_COMPRESSION:o[u]=new hQ(s,this.dracoLoader);break;case Vt.KHR_TEXTURE_TRANSFORM:o[u]=new dQ;break;case Vt.KHR_MESH_QUANTIZATION:o[u]=new pQ;break;default:f.indexOf(u)>=0&&a[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(i,r)}parseAsync(e,n){const i=this;return new Promise(function(r,s){i.parse(e,n,r,s)})}}function XY(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Vt={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 JY{constructor(e){this.parser=e,this.name=Vt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let i=0,r=n.length;i<r;i++){const s=n[i];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const n=this.parser,i="light:"+e;let r=n.cache.get(i);if(r)return r;const s=n.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const u=new He(16777215);l.color!==void 0&&u.setRGB(l.color[0],l.color[1],l.color[2],fa);const f=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new WE(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new jE(u),c.distance=f;break;case"spot":c=new VE(u),c.distance=f,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,c.angle=l.spot.outerConeAngle,c.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return c.position.set(0,0,0),c.decay=2,$o(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=n.createUniqueName(l.name||"light_"+e),r=Promise.resolve(c),n.cache.add(i,r),r}getDependency(e,n){if(e==="light")return this._loadLight(n)}createNodeAttachment(e){const n=this,i=this.parser,s=i.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return i._getNodeRef(n.cache,a,l)})}}class KY{constructor(){this.name=Vt.KHR_MATERIALS_UNLIT}getMaterialType(){return jr}extendParams(e,n,i){const r=[];e.color=new He(1,1,1),e.opacity=1;const s=n.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],fa),e.opacity=o[3]}s.baseColorTexture!==void 0&&r.push(i.assignTexture(e,"map",s.baseColorTexture,vc))}return Promise.all(r)}}class YY{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,n){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&&(n.emissiveIntensity=s),Promise.resolve()}}class QY{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];if(o.clearcoatFactor!==void 0&&(n.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(i.assignTexture(n,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(n.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(i.assignTexture(n,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(i.assignTexture(n,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;n.clearcoatNormalScale=new le(a,a)}return Promise.all(s)}}class ZY{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_DISPERSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return n.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class qY{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.iridescenceFactor!==void 0&&(n.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(i.assignTexture(n,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(n.iridescenceIOR=o.iridescenceIor),n.iridescenceThicknessRange===void 0&&(n.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(n.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(n.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(i.assignTexture(n,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class $Y{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_SHEEN}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];n.sheenColor=new He(0,0,0),n.sheenRoughness=0,n.sheen=1;const o=r.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;n.sheenColor.setRGB(a[0],a[1],a[2],fa)}return o.sheenRoughnessFactor!==void 0&&(n.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(i.assignTexture(n,"sheenColorMap",o.sheenColorTexture,vc)),o.sheenRoughnessTexture!==void 0&&s.push(i.assignTexture(n,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class eQ{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.transmissionFactor!==void 0&&(n.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(i.assignTexture(n,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class tQ{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_VOLUME}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];n.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(i.assignTexture(n,"thicknessMap",o.thicknessTexture)),n.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return n.attenuationColor=new He().setRGB(a[0],a[1],a[2],fa),Promise.all(s)}}class nQ{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_IOR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return n.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class iQ{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];n.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(i.assignTexture(n,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return n.specularColor=new He().setRGB(a[0],a[1],a[2],fa),o.specularColorTexture!==void 0&&s.push(i.assignTexture(n,"specularColorMap",o.specularColorTexture,vc)),Promise.all(s)}}class rQ{constructor(e){this.parser=e,this.name=Vt.EXT_MATERIALS_BUMP}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return n.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(i.assignTexture(n,"bumpMap",o.bumpTexture)),Promise.all(s)}}class sQ{constructor(e){this.parser=e,this.name=Vt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:Es}extendMaterialParams(e,n){const i=this.parser,r=i.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.anisotropyStrength!==void 0&&(n.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(n.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(i.assignTexture(n,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class oQ{constructor(e){this.parser=e,this.name=Vt.KHR_TEXTURE_BASISU}loadTexture(e){const n=this.parser,i=n.json,r=i.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const s=r.extensions[this.name],o=n.options.ktx2Loader;if(!o){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,s.source,o)}}class aQ{constructor(e){this.parser=e,this.name=Vt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[n])return null;const o=s.extensions[n],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class lQ{constructor(e){this.parser=e,this.name=Vt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[n])return null;const o=s.extensions[n],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
3718FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class cQ{constructor(e){this.name=Vt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,i=n.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,c=r.byteLength||0,u=r.count,f=r.byteStride,p=new Uint8Array(a,l,c);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,f,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(u*f);return o.decodeGltfBuffer(new Uint8Array(m),u,f,p,r.mode,r.filter),m})})}else return null}}class uQ{constructor(e){this.name=Vt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,i=n.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=n.meshes[i.mesh];for(const c of r.primitives)if(c.mode!==us.TRIANGLES&&c.mode!==us.TRIANGLE_STRIP&&c.mode!==us.TRIANGLE_FAN&&c.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),f=u.isGroup?u.children:[u],p=c[0].count,m=[];for(const v of f){const w=new Et,x=new G,g=new wi,_=new G(1,1,1),y=new CE(v.geometry,v.material,p);for(let M=0;M<p;M++)l.TRANSLATION&&x.fromBufferAttribute(l.TRANSLATION,M),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,M),l.SCALE&&_.fromBufferAttribute(l.SCALE,M),y.setMatrixAt(M,w.compose(x,g,_));for(const M in l)if(M==="_COLOR_0"){const E=l[M];y.instanceColor=new Oc(E.array,E.itemSize,E.normalized)}else M!=="TRANSLATION"&&M!=="ROTATION"&&M!=="SCALE"&&v.geometry.setAttribute(M,l[M]);Kt.prototype.copy.call(y,v),this.parser.assignFinalMaterial(y),m.push(y)}return u.isGroup?(u.clear(),u.add(...m),u):m[0]}))}}const Y6="glTF",nd=12,aP={JSON:1313821514,BIN:5130562};class fQ{constructor(e){this.name=Vt.KHR_BINARY_GLTF,this.content=null,this.body=null;const n=new DataView(e,0,nd);if(this.header={magic:i1(new Uint8Array(e.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==Y6)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-nd,r=new DataView(e,nd);let s=0;for(;s<i;){const o=r.getUint32(s,!0);s+=4;const a=r.getUint32(s,!0);if(s+=4,a===aP.JSON){const l=new Uint8Array(e,nd+s,o);this.content=i1(l)}else if(a===aP.BIN){const l=nd+s;this.body=e.slice(l,l+o)}s+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class hQ{constructor(e,n){if(!n)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Vt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=n,this.dracoLoader.preload()}decodePrimitive(e,n){const i=this.json,r=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},c={};for(const u in o){const f=Jw[u]||u.toLowerCase();a[f]=o[u]}for(const u in e.attributes){const f=Jw[u]||u.toLowerCase();if(o[u]!==void 0){const p=i.accessors[e.attributes[u]],m=Rf[p.componentType];c[f]=m.name,l[f]=p.normalized===!0}}return n.getDependency("bufferView",s).then(function(u){return new Promise(function(f,p){r.decodeDracoFile(u,function(m){for(const v in m.attributes){const w=m.attributes[v],x=l[v];x!==void 0&&(w.normalized=x)}f(m)},a,c,fa,p)})})}}class dQ{constructor(){this.name=Vt.KHR_TEXTURE_TRANSFORM}extendTexture(e,n){return(n.texCoord===void 0||n.texCoord===e.channel)&&n.offset===void 0&&n.rotation===void 0&&n.scale===void 0||(e=e.clone(),n.texCoord!==void 0&&(e.channel=n.texCoord),n.offset!==void 0&&e.offset.fromArray(n.offset),n.rotation!==void 0&&(e.rotation=n.rotation),n.scale!==void 0&&e.repeat.fromArray(n.scale),e.needsUpdate=!0),e}}class pQ{constructor(){this.name=Vt.KHR_MESH_QUANTIZATION}}class Q6 extends lh{constructor(e,n,i,r){super(e,n,i,r)}copySampleValue_(e){const n=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)n[o]=i[s+o];return n}interpolate_(e,n,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,u=r-n,f=(i-n)/u,p=f*f,m=p*f,v=e*c,w=v-c,x=-2*m+3*p,g=m-p,_=1-x,y=g-p+f;for(let M=0;M!==a;M++){const E=o[w+M+a],C=o[w+M+l]*u,P=o[v+M+a],N=o[v+M]*u;s[M]=_*E+y*C+x*P+g*N}return s}}const mQ=new wi;class gQ extends Q6{interpolate_(e,n,i,r){const s=super.interpolate_(e,n,i,r);return mQ.fromArray(s).normalize().toArray(s),s}}const us={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},Rf={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},lP={9728:fn,9729:gn,9984:gp,9985:gy,9986:Tf,9987:Po},cP={33071:Ci,33648:Gf,10497:vl},M2={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Jw={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...FY>=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"},za={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},vQ={CUBICSPLINE:void 0,LINEAR:Fc,STEP:Vf},E2={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function yQ(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new No({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Qs})),t.DefaultMaterial}function Yl(t,e,n){for(const i in n.extensions)t[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=n.extensions[i])}function $o(t,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(t.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function xQ(t,e,n){let i=!1,r=!1,s=!1;for(let c=0,u=e.length;c<u;c++){const f=e[c];if(f.POSITION!==void 0&&(i=!0),f.NORMAL!==void 0&&(r=!0),f.COLOR_0!==void 0&&(s=!0),i&&r&&s)break}if(!i&&!r&&!s)return Promise.resolve(t);const o=[],a=[],l=[];for(let c=0,u=e.length;c<u;c++){const f=e[c];if(i){const p=f.POSITION!==void 0?n.getDependency("accessor",f.POSITION):t.attributes.position;o.push(p)}if(r){const p=f.NORMAL!==void 0?n.getDependency("accessor",f.NORMAL):t.attributes.normal;a.push(p)}if(s){const p=f.COLOR_0!==void 0?n.getDependency("accessor",f.COLOR_0):t.attributes.color;l.push(p)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(c){const u=c[0],f=c[1],p=c[2];return i&&(t.morphAttributes.position=u),r&&(t.morphAttributes.normal=f),s&&(t.morphAttributes.color=p),t.morphTargetsRelative=!0,t})}function _Q(t,e){if(t.updateMorphTargets(),e.weights!==void 0)for(let n=0,i=e.weights.length;n<i;n++)t.morphTargetInfluences[n]=e.weights[n];if(e.extras&&Array.isArray(e.extras.targetNames)){const n=e.extras.targetNames;if(t.morphTargetInfluences.length===n.length){t.morphTargetDictionary={};for(let i=0,r=n.length;i<r;i++)t.morphTargetDictionary[n[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function SQ(t){let e;const n=t.extensions&&t.extensions[Vt.KHR_DRACO_MESH_COMPRESSION];if(n?e="draco:"+n.bufferView+":"+n.indices+":"+T2(n.attributes):e=t.indices+":"+T2(t.attributes)+":"+t.mode,t.targets!==void 0)for(let i=0,r=t.targets.length;i<r;i++)e+=":"+T2(t.targets[i]);return e}function T2(t){let e="";const n=Object.keys(t).sort();for(let i=0,r=n.length;i<r;i++)e+=n[i]+":"+t[n[i]]+";";return e}function Kw(t){switch(t){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 wQ(t){return t.search(/\.jpe?g($|\?)/i)>0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const AQ=new Et;class MQ{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new XY,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new u6(this.options.manager):this.textureLoader=new y6(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Qr(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,n){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()}
vendor: 24,693 bytes, lines 3718-3719
3718)).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return Yl(s,a,r),$o(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=n.length;r<s;r++){const o=n[r].joints;for(let a=0,l=o.length;a<l;a++)e[o[a]].isBone=!0}for(let r=0,s=e.length;r<s;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(i[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,n){n!==void 0&&(e.refs[n]===void 0&&(e.refs[n]=e.uses[n]=0),e.refs[n]++)}_getNodeRef(e,n,i){if(e.refs[n]<=1)return i;const r=i.clone(),s=(o,a)=>{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(i,r),r.name+="_instance_"+e.uses[n]++,r}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let i=0;i<n.length;i++){const r=e(n[i]);if(r)return r}return null}_invokeAll(e){const n=Object.values(this.plugins);n.unshift(this);const i=[];for(let r=0;r<n.length;r++){const s=e(n[r]);s&&i.push(s)}return i}getDependency(e,n){const i=e+":"+n;let r=this.cache.get(i);if(!r){switch(e){case"scene":r=this.loadScene(n);break;case"node":r=this._invokeOne(function(s){return s.loadNode&&s.loadNode(n)});break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(n)});break;case"accessor":r=this.loadAccessor(n);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(n)});break;case"buffer":r=this.loadBuffer(n);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(n)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(n)});break;case"skin":r=this.loadSkin(n);break;case"animation":r=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(n)});break;case"camera":r=this.loadCamera(n);break;default:if(r=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,n)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(i,r)}return r}getDependencies(e){let n=this.cache.get(e);if(!n){const i=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];n=Promise.all(r.map(function(s,o){return i.getDependency(e,o)})),this.cache.add(e,n)}return n}loadBuffer(e){const n=this.json.buffers[e],i=this.fileLoader;if(n.type&&n.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(n.uri===void 0&&e===0)return Promise.resolve(this.extensions[Vt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){i.load(dl.resolveURL(n.uri,r.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+n.uri+'".'))})})}loadBufferView(e){const n=this.json.bufferViews[e];return this.getDependency("buffer",n.buffer).then(function(i){const r=n.byteLength||0,s=n.byteOffset||0;return i.slice(s,s+r)})}loadAccessor(e){const n=this,i=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=M2[r.type],a=Rf[r.componentType],l=r.normalized===!0,c=new a(r.count*o);return Promise.resolve(new Zt(c,o,l))}const s=[];return r.bufferView!==void 0?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),r.sparse!==void 0&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then(function(o){const a=o[0],l=M2[r.type],c=Rf[r.componentType],u=c.BYTES_PER_ELEMENT,f=u*l,p=r.byteOffset||0,m=r.bufferView!==void 0?i.bufferViews[r.bufferView].byteStride:void 0,v=r.normalized===!0;let w,x;if(m&&m!==f){const g=Math.floor(p/m),_="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let y=n.cache.get(_);y||(w=new c(a,g*m,r.count*m/u),y=new im(w,m/u),n.cache.add(_,y)),x=new xl(y,l,p%m/u,v)}else a===null?w=new c(r.count*l):w=new c(a,p,r.count*l),x=new Zt(w,l,v);if(r.sparse!==void 0){const g=M2.SCALAR,_=Rf[r.sparse.indices.componentType],y=r.sparse.indices.byteOffset||0,M=r.sparse.values.byteOffset||0,E=new _(o[1],y,r.sparse.count*g),C=new c(o[2],M,r.sparse.count*l);a!==null&&(x=new Zt(x.array.slice(),x.itemSize,x.normalized));for(let P=0,N=E.length;P<N;P++){const R=E[P];if(x.setX(R,C[P*l]),l>=2&&x.setY(R,C[P*l+1]),l>=3&&x.setZ(R,C[P*l+2]),l>=4&&x.setW(R,C[P*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return x})}loadTexture(e){const n=this.json,i=this.options,s=n.textures[e].source,o=n.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,n,i){const r=this,s=this.json,o=s.textures[e],a=s.images[n],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,i).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return u.magFilter=lP[p.magFilter]||gn,u.minFilter=lP[p.minFilter]||Po,u.wrapS=cP[p.wrapS]||vl,u.wrapT=cP[p.wrapT]||vl,r.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(f){c=!0;const p=new Blob([f],{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 u=Promise.resolve(l).then(function(f){return new Promise(function(p,m){let v=p;n.isImageBitmapLoader===!0&&(v=function(w){const x=new Mn(w);x.needsUpdate=!0,p(x)}),n.load(dl.resolveURL(f,s.path),v,void 0,m)})}).then(function(f){return c===!0&&a.revokeObjectURL(l),$o(f,o),f.userData.mimeType=o.mimeType||wQ(o.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=u,u}assignTexture(e,n,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Vt.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Vt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Vt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&(typeof r=="number"&&(r=r===oP?vc:fa),"colorSpace"in o?o.colorSpace=r:o.encoding=r===vc?oP:WY),e[n]=o,o})}assignFinalMaterial(e){const n=e.geometry;let i=e.material;const r=n.attributes.tangent===void 0,s=n.attributes.color!==void 0,o=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new Cy,Kn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new Yi,Kn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return No}loadMaterial(e){const n=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},c=[];if(l[Vt.KHR_MATERIALS_UNLIT]){const f=r[Vt.KHR_MATERIALS_UNLIT];o=f.getMaterialType(),c.push(f.extendParams(a,s,n))}else{const f=s.pbrMetallicRoughness||{};if(a.color=new He(1,1,1),a.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],fa),a.opacity=p[3]}f.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",f.baseColorTexture,vc)),a.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,a.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",f.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",f.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=ji);const u=s.alphaMode||E2.OPAQUE;if(u===E2.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===E2.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==jr&&(c.push(n.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new le(1,1),s.normalTexture.scale!==void 0)){const f=s.normalTexture.scale;a.normalScale.set(f,f)}if(s.occlusionTexture!==void 0&&o!==jr&&(c.push(n.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==jr){const f=s.emissiveFactor;a.emissive=new He().setRGB(f[0],f[1],f[2],fa)}return s.emissiveTexture!==void 0&&o!==jr&&c.push(n.assignTexture(a,"emissiveMap",s.emissiveTexture,vc)),Promise.all(c).then(function(){const f=new o(a);return s.name&&(f.name=s.name),$o(f,s),n.associations.set(f,{materials:e}),s.extensions&&Yl(r,f,s),f})}createUniqueName(e){const n=Qt.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Vt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return uP(l,a,n)})}const o=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],u=SQ(c),f=r[u];if(f)o.push(f.promise);else{let p;c.extensions&&c.extensions[Vt.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=uP(new Pt,c,n),r[u]={primitive:c,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const n=this,i=this.json,r=this.extensions,s=i.meshes[e],o=s.primitives,a=[];for(let l=0,c=o.length;l<c;l++){const u=o[l].material===void 0?yQ(this.cache):this.getDependency("material",o[l].material);a.push(u)}return a.push(n.loadGeometries(o)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),u=l[l.length-1],f=[];for(let m=0,v=u.length;m<v;m++){const w=u[m],x=o[m];let g;const _=c[m];if(x.mode===us.TRIANGLES||x.mode===us.TRIANGLE_STRIP||x.mode===us.TRIANGLE_FAN||x.mode===void 0)g=s.isSkinnedMesh===!0?new bE(w,_):new ui(w,_),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),x.mode===us.TRIANGLE_STRIP?g.geometry=iP(g.geometry,mE):x.mode===us.TRIANGLE_FAN&&(g.geometry=iP(g.geometry,Zv));else if(x.mode===us.LINES)g=new to(w,_);else if(x.mode===us.LINE_STRIP)g=new ya(w,_);else if(x.mode===us.LINE_LOOP)g=new RE(w,_);else if(x.mode===us.POINTS)g=new PE(w,_);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+x.mode);Object.keys(g.geometry.morphAttributes).length>0&&_Q(g,s),g.name=n.createUniqueName(s.name||"mesh_"+e),$o(g,s),x.extensions&&Yl(r,g,x),n.assignFinalMaterial(g),f.push(g)}for(let m=0,v=f.length;m<v;m++)n.associations.set(f[m],{meshes:e,primitives:m});if(f.length===1)return s.extensions&&Yl(r,f[0],s),f[0];const p=new aa;s.extensions&&Yl(r,p,s),n.associations.set(p,{meshes:e});for(let m=0,v=f.length;m<v;m++)p.add(f[m]);return p})}loadCamera(e){let n;const i=this.json.cameras[e],r=i[i.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?n=new xn(Ec.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):i.type==="orthographic"&&(n=new vs(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),i.name&&(n.name=this.createUniqueName(i.name)),$o(n,i),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],i=[];for(let r=0,s=n.joints.length;r<s;r++)i.push(this._loadNodeShallow(n.joints[r]));return n.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",n.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(r){const s=r.pop(),o=r,a=[],l=[];for(let c=0,u=o.length;c<u;c++){const f=o[c];if(f){a.push(f);const p=new Et;s!==null&&p.fromArray(s.array,c*16),l.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',n.joints[c])}return new rm(a,l)})}loadAnimation(e){const n=this.json,i=this,r=n.animations[e],s=r.name?r.name:"animation_"+e,o=[],a=[],l=[],c=[],u=[];for(let f=0,p=r.channels.length;f<p;f++){const m=r.channels[f],v=r.samplers[m.sampler],w=m.target,x=w.node,g=r.parameters!==void 0?r.parameters[v.input]:v.input,_=r.parameters!==void 0?r.parameters[v.output]:v.output;w.node!==void 0&&(o.push(this.getDependency("node",x)),a.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",_)),c.push(v),u.push(w))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(u)]).then(function(f){const p=f[0],m=f[1],v=f[2],w=f[3],x=f[4],g=[];for(let _=0,y=p.length;_<y;_++){const M=p[_],E=m[_],C=v[_],P=w[_],N=x[_];if(M===void 0)continue;M.updateMatrix&&M.updateMatrix();const R=i._createAnimationTracks(M,E,C,P,N);if(R)for(let L=0;L<R.length;L++)g.push(R[L])}return new Xf(s,void 0,g)})}createNodeMesh(e){const n=this.json,i=this,r=n.nodes[e];return r.mesh===void 0?null:i.getDependency("mesh",r.mesh).then(function(s){const o=i._getNodeRef(i.meshCache,r.mesh,s);return r.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let l=0,c=r.weights.length;l<c;l++)a.morphTargetInfluences[l]=r.weights[l]}),o})}loadNode(e){const n=this.json,i=this,r=n.nodes[e],s=i._loadNodeShallow(e),o=[],a=r.children||[];for(let c=0,u=a.length;c<u;c++)o.push(i.getDependency("node",a[c]));const l=r.skin===void 0?Promise.resolve(null):i.getDependency("skin",r.skin);return Promise.all([s,Promise.all(o),l]).then(function(c){const u=c[0],f=c[1],p=c[2];p!==null&&u.traverse(function(m){m.isSkinnedMesh&&m.bind(p,AQ)});for(let m=0,v=f.length;m<v;m++)u.add(f[m]);return u})}_loadNodeShallow(e){const n=this.json,i=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=n.nodes[e],o=s.name?r.createUniqueName(s.name):"",a=[],l=r._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(r.getDependency("camera",s.camera).then(function(c){return r._getNodeRef(r.cameraCache,s.camera,c)})),r._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let u;if(s.isBone===!0?u=new by:c.length>1?u=new aa:c.length===1?u=c[0]:u=new Kt,u!==c[0])for(let f=0,p=c.length;f<p;f++)u.add(c[f]);if(s.name&&(u.userData.name=s.name,u.name=o),$o(u,s),s.extensions&&Yl(i,u,s),s.matrix!==void 0){const f=new Et;f.fromArray(s.matrix),u.applyMatrix4(f)}else s.translation!==void 0&&u.position.fromArray(s.translation),s.rotation!==void 0&&u.quaternion.fromArray(s.rotation),s.scale!==void 0&&u.scale.fromArray(s.scale);return r.associations.has(u)||r.associations.set(u,{}),r.associations.get(u).nodes=e,u}),this.nodeCache[e]}loadScene(e){const n=this.extensions,i=this.json.scenes[e],r=this,s=new aa;i.name&&(s.name=r.createUniqueName(i.name)),$o(s,i),i.extensions&&Yl(n,s,i);const o=i.nodes||[],a=[];for(let l=0,c=o.length;l<c;l++)a.push(r.getDependency("node",o[l]));return Promise.all(a).then(function(l){for(let u=0,f=l.length;u<f;u++)s.add(l[u]);const c=u=>{const f=new Map;for(const[p,m]of r.associations)(p instanceof Kn||p instanceof Mn)&&f.set(p,m);return u.traverse(p=>{const m=r.associations.get(p);m!=null&&f.set(p,m)}),f};return r.associations=c(s),s})}_createAnimationTracks(e,n,i,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];za[s.path]===za.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let c;switch(za[s.path]){case za.weights:c=kc;break;case za.rotation:c=_l;break;case za.position:case za.scale:c=zc;break;default:switch(i.itemSize){case 1:c=kc;break;case 2:case 3:default:c=zc;break}break}const u=r.interpolation!==void 0?vQ[r.interpolation]:Fc,f=this._getArrayFromAccessor(i);for(let p=0,m=l.length;p<m;p++){const v=new c(l[p]+"."+za[s.path],n.array,f,u);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(v),o.push(v)}return o}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const i=Kw(n.constructor),r=new Float32Array(n.length);for(let s=0,o=n.length;s<o;s++)r[s]=n[s]*i;n=r}return n}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(i){const r=this instanceof _l?gQ:Q6;return new r(this.times,this.values,this.getValueSize()/3,i)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function EQ(t,e,n){const i=e.attributes,r=new eo;if(i.POSITION!==void 0){const a=n.json.accessors[i.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(r.set(new G(l[0],l[1],l[2]),new G(c[0],c[1],c[2])),a.normalized){const u=Kw(Rf[a.componentType]);r.min.multiplyScalar(u),r.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new G,l=new G;for(let c=0,u=s.length;c<u;c++){const f=s[c];if(f.POSITION!==void 0){const p=n.json.accessors[f.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 w=Kw(Rf[p.componentType]);l.multiplyScalar(w)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(a)}t.boundingBox=r;const o=new Ms;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,t.boundingSphere=o}function uP(t,e,n){const i=e.attributes,r=[];function s(o,a){return n.getDependency("accessor",o).then(function(l){t.setAttribute(a,l)})}for(const o in i){const a=Jw[o]||o.toLowerCase();a in t.attributes||r.push(s(i[o],a))}if(e.indices!==void 0&&!t.index){const o=n.getDependency("accessor",e.indices).then(function(a){t.setIndex(a)});r.push(o)}return $o(t,e),EQ(t,e,n),Promise.all(r).then(function(){return e.targets!==void 0?xQ(t,e.targets,n):t})}const b2=new WeakMap;class TQ extends Qi{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,n,i,r){const s=new Qr(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(n).catch(r)},i,r)}decodeDracoFile(e,n,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(n)}decodeGeometry(e,n){for(const l in n.attributeTypes){const c=n.attributeTypes[l];c.BYTES_PER_ELEMENT!==void 0&&(n.attributeTypes[l]=c.name)}const i=JSON.stringify(n);if(b2.has(e)){const l=b2.get(e);if(l.key===i)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((c,u)=>{r._callbacks[s]={resolve:c,reject:u},r.postMessage({type:"decode",id:s,taskConfig:n,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),b2.set(e,{key:i,promise:a}),a}_createGeometry(e){const n=new Pt;e.index&&n.setIndex(new Zt(e.index.array,1));for(let i=0;i<e.attributes.length;i++){const r=e.attributes[i],s=r.name,o=r.array,a=r.itemSize;n.setAttribute(s,new Zt(o,a))}return n}_loadLibrary(e,n){const i=new Qr(this.manager);return i.setPath(this.decoderPath),i.setResponseType(n),i.setWithCredentials(this.withCredentials),new Promise((r,s)=>{i.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",n=[];return e?n.push(this._loadLibrary("draco_decoder.js","text")):(n.push(this._loadLibrary("draco_wasm_wrapper.js","text")),n.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(n).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=bQ.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(`
3719`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,n){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const r=new Worker(this.workerSourceURL);r._callbacks={},r._taskCosts={},r._taskLoad=0,r.postMessage({type:"init",decoderConfig:this.decoderConfig}),r.onmessage=function(s){const o=s.data;switch(o.type){case"decode":r._callbacks[o.id].resolve(o);break;case"error":r._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(r)}else this.workerPool.sort(function(r,s){return r._taskLoad>s._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=n,i._taskLoad+=n,i})}_releaseTask(e,n){e._taskLoad-=e._taskCosts[n],delete e._callbacks[n],delete e._taskCosts[n]}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 bQ(){let t,e;onmessage=function(o){const a=o.data;switch(a.type){case"init":t=a.decoderConfig,e=new Promise(function(u){t.onModuleLoaded=function(f){u({draco:f})},DracoDecoderModule(t)});break;case"decode":const l=a.buffer,c=a.taskConfig;e.then(u=>{const f=u.draco,p=new f.Decoder,m=new f.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const v=n(f,p,m,c),w=v.attributes.map(x=>x.array.buffer);v.index&&w.push(v.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:v},w)}catch(v){console.error(v),self.postMessage({type:"error",id:a.id,error:v.message})}finally{f.destroy(m),f.destroy(p)}});break}};function n(o,a,l,c){const u=c.attributeIDs,f=c.attributeTypes;let p,m;const v=a.GetEncodedGeometryType(l);if(v===o.TRIANGULAR_MESH)p=new o.Mesh,m=a.DecodeBufferToMesh(l,p);else if(v===o.POINT_CLOUD)p=new o.PointCloud,m=a.DecodeBufferToPointCloud(l,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const w={index:null,attributes:[]};for(const x in u){const g=self[f[x]];let _,y;if(c.useUniqueIDs)y=u[x],_=a.GetAttributeByUniqueId(p,y);else{if(y=a.GetAttributeId(p,o[u[x]]),y===-1)continue;_=a.GetAttribute(p,y)}w.attributes.push(r(o,a,p,x,g,_))}return v===o.TRIANGULAR_MESH&&(w.index=i(o,a,p)),o.destroy(p),w}function i(o,a,l){const u=l.num_faces()*3,f=u*4,p=o._malloc(f);a.GetTrianglesUInt32Array(l,f,p);const m=new Uint32Array(o.HEAPF32.buffer,p,u).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,c,u,f){const p=f.num_components(),v=l.num_points()*p,w=v*u.BYTES_PER_ELEMENT,x=s(o,u),g=o._malloc(w);a.GetAttributeDataArrayForAllPoints(l,f,x,w,g);const _=new u(o.HEAPF32.buffer,g,v).slice();return o._free(g),{name:c,array:_,itemSize:p}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let Eg;const C2=()=>{if(Eg)return Eg;
3719const t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIA
3719LAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",e="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMG
3719XAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/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",n=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let r=t;WebAssembly.validate(n)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(f=>{s=f.instance,s.exports.__wasm_call_ctors()});function a(f){const p=new Uint8Array(f.length);for(let v=0;v<f.length;++v){const w=f.charCodeAt(v);p[v]=w>96?w-71:w>64?w-65:w>47?w+4:w>46?63:62}let m=0;for(let v=0;v<f.length;++v)p[m++]=p[v]<60?i[p[v]]:(p[v]-60)*64+p[++v];return p.buffer.slice(0,m)}function l(f,p,m,v,w,x){const g=s.exports.sbrk,_=m+3&-4,y=g(_*v),M=g(w.length),E=new Uint8Array(s.exports.memory.buffer);E.set(w,M);const C=f(y,m,v,M,w.length);if(C===0&&x&&x(y,_,v),p.set(E.subarray(y,y+m*v)),g(y-g(0)),C!==0)throw new Error(`Malformed buffer data: ${C}`)}const c={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},u={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return Eg={ready:o,supported:!0,decodeVertexBuffer(f,p,m,v,w){l(s.exports.meshopt_decodeVertexBuffer,f,p,m,v,s.exports[c[w]])},decodeIndexBuffer(f,p,m,v){l(s.exports.meshopt_decodeIndexBuffer,f,p,m,v)},decodeIndexSequence(f,p,m,v){l(s.exports.meshopt_decodeIndexSequence,f,p,m,v)},decodeGltfBuffer(f,p,m,v,w,x){l(s.exports[u[w]],f,p,m,v,s.exports[c[x]])}},Eg},CQ=()=>parseInt(Tl.replace(/\D+/g,"")),Z6=CQ();
3719let Tg=null,q6="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function $6(t=!0,e=!0,n){return i=>{n&&n(i),t&&(Tg||(Tg=new TQ),Tg.setDecoderPath(typeof t=="string"?t:q6),i.setDRACOLoader(Tg)),e&&i.setMeshoptDecoder(typeof C2=="function"?C2():C2)}}const ch=(t,e,n,i)=>cm(eT,t,$6(e,n,i));ch.preload=(t,e,n,i)=>cm.preload(eT,t,$6(e,n,i));ch.clear=t=>cm.clear(eT,t);ch.setDecoderPath=t=>{q6=t};const RQ=I.forwardRef(({makeDefault:t,camera:e,regress:n,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...c},u)=>{const f=zr(C=>C.invalidate),p=zr(C=>C.camera),m=zr(C=>C.gl),v=zr(C=>C.events),w=zr(C=>C.setEvents),x=zr(C=>C.set),g=zr(C=>C.get),_=zr(C=>C.performance),y=e||p,M=i||v.connected||m.domElement,E=I.useMemo(()=>new jY(y),[y]);return ro(()=>{E.enabled&&E.update()},-1),I.useEffect(()=>(s&&E.connect(s===!0?M:s),E.connect(M),()=>void E.dispose()),[s,M,n,E,f]),I.useEffect(()=>{const C=R=>{f(),n&&_.regress(),o&&o(R)},P=R=>{a&&a(R)},N=R=>{l&&l(R)};return E.addEventListener("change",C),E.addEventListener("start",P),E.addEventListener("end",N),()=>{E.removeEventListener("start",P),E.removeEventListener("end",N),E.removeEventListener("change",C)}},[o,a,l,E,f,w]),I.useEffect(()=>{if(t){const C=g().controls;return x({controls:E}),()=>x({controls:C})}},[t,E]),I.createElement("primitive",ga({ref:u,object:E,enableDamping:r},c))});var e8={exports:{}},PQ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",BQ=PQ,LQ=BQ;function t8(){}function n8(){}n8.resetWarningCache=t8;var IQ=function(){function t(i,r,s,o,a,l){if(l!==LQ){var c=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 c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:n8,resetWarningCache:t8};return n.PropTypes=n,n};e8.exports=IQ();var NQ=e8.exports;const Ue=J1(NQ);class DQ extends Yn{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:`
3720      uniform float time;
3721      attribute float size;
3722      varying vec3 vColor;
3723      void main() {
3724        vColor = color;
3725        vec4 mvPosition = modelViewMatrix * vec4(position, 0.5);
3726        gl_PointSize = size * (30.0 / -mvPosition.z) * (3.0 + sin(time + 100.0));
3727        gl_Position = projectionMatrix * mvPosition;
3728      }`,fragmentShader:`
3729      uniform sampler2D pointTexture;
3730      uniform float fade;
3731      varying vec3 vColor;
3732      void main() {
3733        float opacity = 1.0;
3734        if (fade == 1.0) {
3735          float d = distance(gl_PointCoord, vec2(0.5, 0.5));
3736          opacity = 1.0 / (1.0 + exp(16.0 * (d - 0.25)));
3737        }
3738        gl_FragColor = vec4(vColor, opacity);
3739
3740        #include <tonemapping_fragment>
3741	      #include <${Z6>=154?"colorspace_fragment":"encodings_fragment"}>
3742      }`})}}const FQ=t=>new G().setFromSpherical(new t1(t,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),i8=I.forwardRef(({radius:t=100,depth:e=50,count:n=5e3,saturation:i=0,factor:r=4,fade:s=!1,speed:o=1},a)=>{const l=I.useRef(),[c,u,f]=I.useMemo(()=>{const m=[],v=[],w=Array.from({length:n},()=>(.5+.5*Math.random())*r),x=new He;let g=t+e;const _=e/n;for(let y=0;y<n;y++)g-=_*Math.random(),m.push(...FQ(g).toArray()),x.setHSL(y/n,i,.9),v.push(x.r,x.g,x.b);return[new Float32Array(m),new Float32Array(v),new Float32Array(w)]},[n,e,r,t,i]);ro(m=>l.current&&(l.current.uniforms.time.value=m.clock.elapsedTime*o));const[p]=I.useState(()=>new DQ);return I.createElement("points",{ref:a},I.createElement("bufferGeometry",null,I.createElement("bufferAttribute",{attach:"attributes-position",args:[c,3]}),I.createElement("bufferAttribute",{attach:"attributes-color",args:[u,3]}),I.createElement("bufferAttribute",{attach:"attributes-size",args:[f,1]})),I.createElement("primitive",{ref:l,object:p,attach:"material",blending:Yv,"uniforms-fade-value":s,depthWrite:!1,transparent:!0,vertexColors:!0}))});class OQ extends Yn{constructor(){super({uniforms:{time:{value:0},pixelRatio:{value:1}},vertexShader:`
3743        uniform float pixelRatio;
3744        uniform float time;
3745        attribute float size;  
3746        attribute float speed;  
3747        attribute float opacity;
3748        attribute vec3 noise;
3749        attribute vec3 color;
3750        varying vec3 vColor;
3751        varying float vOpacity;
3752
3753        void main() {
3754          vec4 modelPosition = modelMatrix * vec4(position, 1.0);
3755          modelPosition.y += sin(time * speed + modelPosition.x * noise.x * 100.0) * 0.2;
3756          modelPosition.z += cos(time * speed + modelPosition.x * noise.y * 100.0) * 0.2;
3757          modelPosition.x += cos(time * speed + modelPosition.x * noise.z * 100.0) * 0.2;
3758          vec4 viewPosition = viewMatrix * modelPosition;
3759          vec4 projectionPostion = projectionMatrix * viewPosition;
3760          gl_Position = projectionPostion;
3761          gl_PointSize = size * 25. * pixelRatio;
3762          gl_PointSize *= (1.0 / - viewPosition.z);
3763          vColor = color;
3764          vOpacity = opacity;
3765        }
3766      `,fragmentShader:`
3767        varying vec3 vColor;
3768        varying float vOpacity;
3769        void main() {
3770          float distanceToCenter = distance(gl_PointCoord, vec2(0.5));
3771          float strength = 0.05 / distanceToCenter - 0.1;
3772          gl_FragColor = vec4(vColor, strength * vOpacity);
3773          #include <tonemapping_fragment>
3774          #include <${Z6>=154?"colorspace_fragment":"encodings_fragment"}>
3775        }
3776      `})}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}get pixelRatio(){return this.uniforms.pixelRatio.value}set pixelRatio(e){this.uniforms.pixelRatio.value=e}}const r8=t=>t&&t.constructor===Float32Array,UQ=t=>[t.r,t.g,t.b],s8=t=>t instanceof le||t instanceof G||t instanceof on,o8=t=>Array.isArray(t)?t:s8(t)?t.toArray():[t,t,t];function id(t,e,n){return I.useMemo(()=>{if(e!==void 0){if(r8(e))return e;if(e instanceof He){const i=Array.from({length:t*3},()=>UQ(e)).flat();return Float32Array.from(i)}else if(s8(e)||Array.isArray(e)){const i=Array.from({length:t*3},()=>o8(e)).flat();return Float32Array.from(i)}return Float32Array.from({length:t},()=>e)}return Float32Array.from({length:t},n)},[e])}const kQ=I.forwardRef(({noise:t=1,count:e=100,speed:n=1,opacity:i=1,scale:r=1,size:s,color:o,children:a,...l},c)=>{I.useMemo(()=>P6({SparklesImplMaterial:OQ}),[]);const u=I.useRef(null),f=zr(y=>y.viewport.dpr),p=o8(r),m=I.useMemo(()=>Float32Array.from(Array.from({length:e},()=>p.map(Ec.randFloatSpread)).flat()),[e,...p]),v=id(e,s,Math.random),w=id(e,i),x=id(e,n),g=id(e*3,t),_=id(o===void 0?e*3:e,r8(o)?o:new He(o),()=>1);return ro(y=>{u.current&&u.current.material&&(u.current.material.time=y.clock.elapsedTime)}),I.useImperativeHandle(c,()=>u.current,[]),I.createElement("points",ga({key:`particle-${e}-${JSON.stringify(r)}`},l,{ref:u}),I.createElement("bufferGeometry",null,I.createElement("bufferAttribute",{attach:"attributes-position",args:[m,3]}),I.createElement("bufferAttribute",{attach:"attributes-size",args:[v,1]}),I.createElement("bufferAttribute",{attach:"attributes-opacity",args:[w,1]}),I.createElement("bufferAttribute",{attach:"attributes-speed",args:[x,1]}),I.createElement("bufferAttribute",{attach:"attributes-color",args:[_,3]}),I.createElement("bufferAttribute",{attach:"attributes-noise",args:[g,3]})),a||I.createElement("sparklesImplMaterial",{transparent:!0,pixelRatio:f,depthWrite:!1}))});let Ql,rd;const zQ=I.createContext(null),fP=new Et,hP=new G,HQ=I.forwardRef(({children:t,range:e,limit:n=1e3,...i},r)=>{const s=I.useRef(null);I.useImperativeHandle(r,()=>s.current,[]);const[o,a]=I.useState([]),[[l,c,u]]=I.useState(()=>[new Float32Array(n*3),Float32Array.from({length:n*3},()=>1),Float32Array.from({length:n},()=>1)]);I.useEffect(()=>{s.current.geometry.attributes.position.needsUpdate=!0}),ro(()=>{for(s.current.updateMatrix(),s.current.updateMatrixWorld(),fP.copy(s.current.matrixWorld).invert(),s.current.geometry.drawRange.count=Math.min(n,e!==void 0?e:n,o.length),Ql=0;Ql<o.length;Ql++)rd=o[Ql].current,rd.getWorldPosition(hP).applyMatrix4(fP),hP.toArray(l,Ql*3),s.current.geometry.attributes.position.needsUpdate=!0,rd.matrixWorldNeedsUpdate=!0,rd.color.toArray(c,Ql*3),s.current.geometry.attributes.color.needsUpdate=!0,u.set([rd.size],Ql),s.current.geometry.attributes.size.needsUpdate=!0});const f=I.useMemo(()=>({getParent:()=>s,subscribe:p=>(a(m=>[...m,p]),()=>a(m=>m.filter(v=>v.current!==p.current)))}),[]);return I.createElement("points",ga({userData:{instances:o},matrixAutoUpdate:!1,ref:s,raycast:()=>null},i),I.createElement("bufferGeometry",null,I.createElement("bufferAttribute",{attach:"attributes-position",count:l.length/3,array:l,itemSize:3,usage:Ac}),I.createElement("bufferAttribute",{attach:"attributes-color",count:c.length/3,array:c,itemSize:3,usage:Ac}),I.createElement("bufferAttribute",{attach:"attributes-size",count:u.length,array:u,itemSize:1,usage:Ac})),I.createElement(zQ.Provider,{value:f},t))}),GQ=I.forwardRef(({children:t,positions:e,colors:n,sizes:i,stride:r=3,...s},o)=>{const a=I.useRef(null);return I.useImperativeHandle(o,()=>a.current,[]),ro(()=>{const l=a.current.geometry.attributes;
3776l.position.needsUpdate=!0,n&&(l.color.needsUpdate=!0),i&&(l.size.needsUpdate=!0)}),I.createElement("points",ga({ref:a},s),I.createElement("bufferGeometry",null,I.createElement("bufferAttribute",{attach:"attributes-position",count:e.length/r,array:e,itemSize:r,usage:Ac}),n&&I.createElement("bufferAttribute",{attach:"attributes-color",count:n.length/r,array:n,itemSize:3,usage:Ac}),i&&I.createElement("bufferAttribute",{attach:"attributes-size",count:i.length/r,array:i,itemSize:1,usage:Ac})),t)}),VQ=I.forwardRef((t,e)=>t.positions instanceof Float32Array?I.createElement(GQ,ga({},t,{ref:e})):I.createElement(HQ,ga({},t,{ref:e}))),a8=()=>T.jsx(NY,{children:T.jsx("div",{className:"flex justify-center items-center",children:T.jsx("div",{className:"w-20 h-20 border-2 border-opacity-20 border-blue-500 border-t-blue-500 rounded-full animate-spin"})})}),jQ=()=>T.jsx("div",{className:"flex justify-center items-center h-screen w-full bg-black",children:T.jsx("div",{className:"w-20 h-20 border-2 border-opacity-20 border-blue-500 border-t-blue-500 rounded-full animate-spin"})}),WQ="/assets/logo-8b4fe06b.svg",XQ="/assets/myimage-9d5c1420.png",JQ="/assets/playstation-012114a0.png",KQ="/assets/saao-7075102f.png",dP="/assets/D-Pine_Black-7d96ca5e.png",l8="/assets/dartmouth-9288db6a.png",YQ=()=>{const[t,e]=I.useState(""),[n,i]=I.useState(!1),[r,s]=I.useState(!1);I.useEffect(()=>{const a=()=>{window.scrollY>50?i(!0):i(!1)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[]),I.useEffect(()=>{const a=document.querySelectorAll("section"),l={threshold:.3},c=new IntersectionObserver(u=>{u.forEach(f=>{f.isIntersecting&&e(f.target.id)})},l);return a.forEach(u=>c.observe(u)),()=>{a.forEach(u=>c.unobserve(u))}},[]);const o=a=>{const l=document.getElementById(a);l&&l.scrollIntoView({behavior:"smooth"})};return T.jsxs("header",{className:`fixed top-0 left-0 w-full z-50 transition-all duration-300 ${n?"backdrop-blur-xl bg-black/70 border-b border-white/10 shadow-lg py-3":"bg-transparent py-6"}`,children:[T.jsxs("div",{className:"container mx-auto px-6 flex justify-between items-center",children:[T.jsxs("a",{href:"/",className:"flex items-center gap-2",onClick:a=>{a.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})},children:[T.jsx("img",{src:WQ,alt:"logo",className:"w-9 h-9 object-contain"}),T.jsx("p",{className:"text-2xl font-bold tracking-tighter hover:text-gray-300 transition-colors",children:"AS"})]}),T.jsxs("nav",{className:"hidden md:flex space-x-8 text-sm font-medium tracking-wide items-center",children:[["about","experience","projects","contact"].map(a=>T.jsx("a",{href:`#${a}`,onClick:l=>{l.preventDefault(),o(a)},className:`transition-colors duration-300 hover:text-white ${t===a?"text-white":"text-gray-400"}`,children:a.charAt(0).toUpperCase()+a.slice(1)},a)),T.jsxs("div",{className:"relative group flex items-center",children:[T.jsx(Hf,{to:"/plain",className:"transition-colors duration-300 hover:text-white text-gray-500 font-mono text-xs border border-white/10 px-2 py-1 rounded",children:"[Plain.html]"}),T.jsx("div",{className:"absolute top-full right-0 mt-3 px-3 py-1.5 bg-black/90 border border-white/10 text-gray-300 text-[10px] uppercase tracking-wider font-mono whitespace-nowrap rounded opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 pointer-events-none z-50",children:"Low-bandwidth / Accessible View"})]})]}),T.jsx("div",{className:"md:hidden",children:T.jsx("button",{className:"text-white focus:outline-none",onClick:()=>s(!r),children:T.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r?T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"}):T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16m-7 6h7"})})})})]}),T.jsx("div",{className:`md:hidden absolute top-full left-0 w-full bg-black/95 backdrop-blur-xl border-b transition-all duration-300 overflow-hidden ${r?"max-h-96 py-6 border-white/10 shadow-2xl":"max-h-0 py-0 border-transparent"}`,children:T.jsxs("nav",{className:"flex flex-col items-center space-y-6",children:[["about","experience","projects","contact"].map(a=>T.jsx("a",{href:`#${a}`,onClick:l=>{l.preventDefault(),o(a),s(!1)},className:`transition-colors duration-300 hover:text-white text-lg font-medium tracking-wide ${t===a?"text-white":"text-gray-400"}`,children:a.charAt(0).toUpperCase()+a.slice(1)},a)),T.jsxs("div",{className:"relative group flex flex-col items-center mt-2",children:[T.jsx(Hf,{to:"/plain",className:"transition-colors duration-300 hover:text-white text-gray-500 font-mono text-sm border border-white/10 px-4 py-2 rounded",children:"[Plain.html]"}),T.jsx("p",{className:"text-gray-500 text-[10px] mt-1 font-mono uppercase tracking-wider",children:"Low-bandwidth / Accessible View"})]})]})})]})};var c8={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},pP=zt.createContext&&zt.createContext(c8),QQ=["attr","size","title"];function ZQ(t,e){if(t==null)return{};var n=qQ(t,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)i=s[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function qQ(t,e){if(t==null)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function r1(){return r1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},r1.apply(this,arguments)}function mP(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function s1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
vendor: 5,341 bytes, line 3776
3776e%2?mP(Object(n),!0).forEach(function(i){$Q(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mP(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function $Q(t,e,n){return e=eZ(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function eZ(t){var e=tZ(t,"string");return typeof e=="symbol"?e:e+""}function tZ(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function u8(t){return t&&t.map((e,n)=>zt.createElement(e.tag,s1({key:n},e.attr),u8(e.child)))}function Ht(t){return e=>zt.createElement(nZ,r1({attr:s1({},t.attr)},e),u8(t.child))}function nZ(t){var e=n=>{var{attr:i,size:r,title:s}=t,o=ZQ(t,QQ),a=r||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),zt.createElement("svg",r1({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,o,{className:l,style:s1(s1({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&zt.createElement("title",null,s),t.children)};return pP!==void 0?zt.createElement(pP.Consumer,null,n=>e(n)):e(c8)}function iZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M185.7 268.1h76.2l-38.1-91.6-38.1 91.6zM223.8 32L16 106.4l31.8 275.7 176 97.9 176-97.9 31.8-275.7zM354 373.8h-48.6l-26.2-65.4H168.6l-26.2 65.4H93.7L223.8 81.5z"},child:[]}]})(t)}function rZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M180.41 203.01c-.72 22.65 10.6 32.68 10.88 39.05a8.164 8.164 0 0 1-4.1 6.27l-12.8 8.96a10.66 10.66 0 0 1-5.63 1.92c-.43-.02-8.19 1.83-20.48-25.61a78.608 78.608 0 0 1-62.61 29.45c-16.28.89-60.4-9.24-58.13-56.21-1.59-38.28 34.06-62.06 70.93-60.05 7.1.02 21.6.37 46.99 6.27v-15.62c2.69-26.46-14.7-46.99-44.81-43.91-2.4.01-19.4-.5-45.84 10.11-7.36 3.38-8.3 2.82-10.75 2.82-7.41 0-4.36-21.48-2.94-24.2 5.21-6.4 35.86-18.35 65.94-18.18a76.857 76.857 0 0 1 55.69 17.28 70.285 70.285 0 0 1 17.67 52.36l-.01 69.29zM93.99 235.4c32.43-.47 46.16-19.97 49.29-30.47 2.46-10.05 2.05-16.41 2.05-27.4-9.67-2.32-23.59-4.85-39.56-4.87-15.15-1.14-42.82 5.63-41.74 32.26-1.24 16.79 11.12 31.4 29.96 30.48zm170.92 23.05c-7.86.72-11.52-4.86-12.68-10.37l-49.8-164.65c-.97-2.78-1.61-5.65-1.92-8.58a4.61 4.61 0 0 1 3.86-5.25c.24-.04-2.13 0 22.25 0 8.78-.88 11.64 6.03 12.55 10.37l35.72 140.83 33.16-140.83c.53-3.22 2.94-11.07 12.8-10.24h17.16c2.17-.18 11.11-.5 12.68 10.37l33.42 142.63L420.98 80.1c.48-2.18 2.72-11.37 12.68-10.37h19.72c.85-.13 6.15-.81 5.25 8.58-.43 1.85 3.41-10.66-52.75 169.9-1.15 5.51-4.82 11.09-12.68 10.37h-18.69c-10.94 1.15-12.51-9.66-12.68-10.75L328.67 110.7l-32.78 136.99c-.16 1.09-1.73 11.9-12.68 10.75h-18.3zm273.48 5.63c-5.88.01-33.92-.3-57.36-12.29a12.802 12.802 0 0 1-7.81-11.91v-10.75c0-8.45 6.2-6.9 8.83-5.89 10.04 4.06 16.48 7.14 28.81 9.6 36.65 7.53 52.77-2.3 56.72-4.48 13.15-7.81 14.19-25.68 5.25-34.95-10.48-8.79-15.48-9.12-53.13-21-4.64-1.29-43.7-13.61-43.79-52.36-.61-28.24 25.05-56.18 69.52-55.95 12.67-.01 46.43 4.13 55.57 15.62 1.35 2.09 2.02 4.55 1.92 7.04v10.11c0 4.44-1.62 6.66-4.87 6.66-7.71-.86-21.39-11.17-49.16-10.75-6.89-.36-39.89.91-38.41 24.97-.43 18.96 26.61 26.07 29.7 26.89 36.46 10.97 48.65 12.79 63.12 29.58 17.14 22.25 7.9 48.3 4.35 55.44-19.08 37.49-68.42 34.44-69.26 34.42zm40.2 104.86c-70.03 51.72-171.69 79.25-258.49 79.25A469.127 469.127 0 0 1 2.83 327.46c-6.53-5.89-.77-13.96 7.17-9.47a637.37 637.37 0 0 0 316.88 84.12 630.22 630.22 0 0 0 241.59-49.55c11.78-5 21.77 7.8 10.12 16.38zm29.19-33.29c-8.96-11.52-59.28-5.38-81.81-2.69-6.79.77-7.94-5.12-1.79-9.47 40.07-28.17 105.88-20.1 113.44-10.63 7.55 9.47-2.05 75.41-39.56 106.91-5.76 4.87-11.27 2.3-8.71-4.1 8.44-21.25 27.39-68.49 18.43-80.02z"},child:[]}]})(t)}function sZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"},child:[]}]})(t)}function oZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"},child:[]}]})(t)}function aZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 384 512"}
3776,child:[{tag:"path",attr:{d:"M277.74 312.9c9.8-6.7 23.4-12.5 23.4-12.5s-38.7 7-77.2 10.2c-47.1 3.9-97.7 4.7-123.1 1.3-60.1-8 33-30.1 33-30.1s-36.1-2.4-80.6 19c-52.5 25.4 130 37 224.5 12.1zm-85.4-32.1c-19-42.7-83.1-80.2 0-145.8C296 53.2 242.84 0 242.84 0c21.5 84.5-75.6 110.1-110.7 162.6-23.9 35.9 11.7 74.4 60.2 118.2zm114.6-176.2c.1 0-175.2 43.8-91.5 140.2 24.7 28.4-6.5 54-6.5 54s62.7-32.4 33.9-72.9c-26.9-37.8-47.5-56.6 64.1-121.3zm-6.1 270.5a12.19 12.19 0 0 1-2 2.6c128.3-33.7 81.1-118.9 19.8-97.3a17.33 17.33 0 0 0-8.2 6.3 70.45 70.45 0 0 1 11-3c31-6.5 75.5 41.5-20.6 91.4zM348 437.4s14.5 11.9-15.9 21.2c-57.9 17.5-240.8 22.8-291.6.7-18.3-7.9 16-19 26.8-21.3 11.2-2.4 17.7-2 17.7-2-20.3-14.3-131.3 28.1-56.4 40.2C232.84 509.4 401 461.3 348 437.4zM124.44 396c-78.7 22 47.9 67.4 148.1 24.5a185.89 185.89 0 0 1-28.2-13.8c-44.7 8.5-65.4 9.1-106 4.5-33.5-3.8-13.9-15.2-13.9-15.2zm179.8 97.2c-78.7 14.8-175.8 13.1-233.3 3.6 0-.1 11.8 9.7 72.4 13.6 92.2 5.9 233.8-3.3 237.1-46.9 0 0-6.4 16.5-76.2 29.7zM260.64 353c-59.2 11.4-93.5 11.1-136.8 6.6-33.5-3.5-11.6-19.7-11.6-19.7-86.8 28.8 48.2 61.4 169.5 25.9a60.37 60.37 0 0 1-21.1-12.8z"},child:[]}]})(t)}function gP(t){return Ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.
37761-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"},child:[]}]})(t)}function vP(t){return Ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 508c-6.7 0-13.5-1.8-19.4-5.2l-61.7-36.5c-9.2-5.2-4.7-7-1.7-8 12.3-4.3 14.8-5.2 27.9-12.7 1.4-.8 3.2-.5 4.6.4l47.4 28.1c1.7 1 4.1 1 5.7 0l184.7-106.6c1.7-1 2.8-3 2.8-5V149.3c0-2.1-1.1-4-2.9-5.1L226.8 37.7c-1.7-1-4-1-5.7 0L36.6 144.3c-1.8 1-2.9 3-2.9 5.1v213.1c0 2 1.1 4 2.9 4.9l50.6 29.2c27.5 13.7 44.3-2.4 44.3-18.7V167.5c0-3 2.4-5.3 5.4-5.3h23.4c2.9 0 5.4 2.3 5.4 5.3V378c0 36.6-20 57.6-54.7 57.6-10.7 0-19.1 0-42.5-11.6l-48.4-27.9C8.1 389.2.7 376.3.7 362.4V149.3c0-13.8 7.4-26.8 19.4-33.7L204.6 9c11.7-6.6 27.2-6.6 38.8 0l184.7 106.7c12 6.9 19.4 19.8 19.4 33.7v213.1c0 13.8-7.4 26.7-19.4 33.7L243.4 502.8c-5.9 3.4-12.6 5.2-19.4 5.2zm149.1-210.1c0-39.9-27-50.5-83.7-58-57.4-7.6-63.2-11.5-63.2-24.9 0-11.1 4.9-25.9 47.4-25.9 37.9 0 51.9 8.2 57.7 33.8.5 2.4 2.7 4.2 5.2 4.2h24c1.5 0 2.9-.6 3.9-1.7s1.5-2.6 1.4-4.1c-3.7-44.1-33-64.6-92.2-64.6-52.7 0-84.1 22.2-84.1 59.5 0 40.4 31.3 51.6 81.8 56.6 60.5 5.9 65.2 14.8 65.2 26.7 0 20.6-16.6 29.4-55.5 29.4-48.9 0-59.6-12.3-63.2-36.6-.4-2.6-2.6-4.5-5.3-4.5h-23.9c-3 0-5.3 2.4-5.3 5.3 0 31.1 16.9 68.2 97.8 68.2 58.4-.1 92-23.2 92-63.4z"},child:[]}]})(t)}function lZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 104.5c171.4 0 303.2 72.2 303.2 151.5S491.3 407.5 320 407.5c-171.4 0-303.2-72.2-303.2-151.5S148.7 104.5 320 104.5m0-16.8C143.3 87.7 0 163 0 256s143.3 168.3 320 168.3S640 349 640 256 496.7 87.7 320 87.7zM218.2 242.5c-7.9 40.5-35.8 36.3-70.1 36.3l13.7-70.6c38 0 63.8-4.1 56.4 34.3zM97.4 350.3h36.7l8.7-44.8c41.1 0 66.6 3 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7h-70.7L97.4 350.3zm185.7-213.6h36.5l-8.7 44.8c31.5 0 60.7-2.3 74.8 10.7 14.8 13.6 7.7 31-8.3 113.1h-37c15.4-79.4 18.3-86 12.7-92-5.4-5.8-17.7-4.6-47.4-4.6l-18.8 9
37766.6h-36.5l32.7-168.6zM505 242.5c-8 41.1-36.7 36.3-70.1 36.3l13.7-70.6c38.2 0 63.8-4.1 56.4 34.3zM384.2 350.3H421l8.7-44.8c43.2 0 67.1 2.5 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7H417l-32.8 168.7z"},child:[]}]})(t)}function cZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"},child:[]}]})(t)}function uZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1.9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2.6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9C38.3 196.2 0 225.4 0 255.6c0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zm-30.3-120.3c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zm-24.5 263.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6.4 19.5.6 29.5.6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8.9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zm-149.7-15c25.3 0 45.8-20.5 45.8-45.8s-20.5-45.8-45.8-45.8c-25.3 0-45.8 20.5-45.8 45.8s20.5 45.8 45.8 45.8z"},child:[]}]})(t)}function fZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M356.9 64.3H280l-56 88.6-48-88.6H0L224 448 448 64.3h-91.1zm-301.2 32h53.8L224 294.5 338.4 96.3h53.8L224 384.5 55.7 96.3z"},child:[]}]})(t)}function hZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z"},child:[]}]})(t)}function dZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"},child:[]}]})(t)}function pZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522
3776-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(t)}function R2(t){return Ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"},child:[]}]})(t)}function mZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M480.07 96H160a160 160 0 1 0 114.24 272h91.52A160 160 0 1 0 480.07 96zM248 268a12 12 0 0 1-12 12h-52v52a12 12 0 0 1-12 12h-24a12 12 0 0 1-12-12v-52H84a12 12 0 0 1-12-12v-24a12 12 0 0 1 12-12h52v-52a12 12 0 0 1 12-12h24a12 12 0 0 1 12 12v52h52a12 12 0 0 1 12 12zm216 76a40 40 0 1 1 40-40 40 40 0 0 1-40 40zm64-96a40 40 0 1 1 40-40 40 40 0 0 1-40 40z"},child:[]}]})(t)}function gZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 240v96c0 3.084-.356 6.159-1.063 9.162l-32 136C410.686 499.23 394.562 512 376 512H168a40.004 40.004 0 0 1-32.35-16.473l-127.997-176c-12.993-17.866-9.043-42.883 8.822-55.876 17.867-12.994 42.884-9.043 55.877 8.823L104 315.992V40c0-22.091 17.908-40 40-40s40 17.909 40 40v200h8v-40c0-22.091 17.908-40 40-40s40 17.909 40 40v40h8v-24c0-22.091 17.908-40 40-40s40 17.909 40 40v24h8c0-22.091 17.908-40 40-40s40 17.909 40 40zm-256 80h-8v96h8v-96zm88 0h-8v96h8v-96zm88 0h-8v96h8v-96z"},child:[]}]})(t)}function vZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505.12019,19.09375c-1.18945-5.53125-6.65819-11-12.207-12.1875C460.716,0,435.507,0,410.40747,0,307.17523,0,245.26909,55.20312,199.05238,128H94.83772c-16.34763.01562-35.55658,11.875-42.88664,26.48438L2.51562,253.29688A28.4,28.4,0,0,0,0,264a24.00867,24.00867,0,0,0,24.00582,24H127.81618l-22.47457,22.46875c-11.36521,11.36133-12.99607,32.25781,0,45.25L156.24582,406.625c11.15623,11.1875,32.15619,13.15625,45.27726,0l22.47457-22.46875V488a24.00867,24.00867,0,0,0,24.00581,24,28.55934,28.55934,0,0,0,10.707-2.51562l98.72834-49.39063c14.62888-7.29687,26.50776-26.5,26.50776-42.85937V312.79688c72.59753-46.3125,128.03493-108.40626,128.03493-211.09376C512.07526,76.5,512.07526,51.29688,505.12019,19.09375ZM384.04033,168A40,40,0,1,1,424.05,128,40.02322,40.02322,0,0,1,384.04033,168Z"},child:[]}]})(t)}function yZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M466.5 83.7l-192-80a48.15 48.15 0 0 0-36.9 0l-192 80C27.7 91.1 16 108.6 16 128c0 198.5 114.5 335.7 221.5 380.3 11.8 4.9 25.1 4.9 36.9 0C360.1 472.6 496 349.3 496 128c0-19.4-11.7-36.9-29.5-44.3zM256.1 446.3l-.1-381 175.9 73.3c-3.3 151.4-82.1 261.1-175.8 307.7z"},child:[]}]})(t)}function xZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M592.604 208.244C559.735 192.836 515.777 184 472 184H186.327c-4.952-6.555-10.585-11.978-16.72-16H376C229.157 137.747 219.403 32 96.003 32H96v128H80V32c-26.51 0-48 28.654-48 64v64c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v16c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v64c0 35.346 21.49 64 48 64V352h16v128h.003c123.4 0 133.154-105.747 279.997-136H169.606c6.135-4.022 11.768-9.445 16.72-16H472c43.777 0 87.735-8.836 120.604-24.244C622.282 289.845 640 271.992 640 256s-17.718-33.845-47.396-47.756zM488 296a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8c31.909 0 31.942 80 0 80z"},child:[]}]})(t)}function _Z(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M501.1 395.7L384 278.6c-23.1-23.1-57.6-27.6-85.4-13.9L192 158.1V96L64 0 0 64l96 128h62.1l106.6 106.6c-13.6 27.8-9.2 62.3 13.9 85.4l117.1 117.1c14.6 14.6 38.2 14.6 52.7 0l52.7-52.7c14.5-14.6 14.5-38.2 0-52.7zM331.7 225c28.3 0 54.9 11 74.9 31l19.4 19.4c15.8-6.9 30.8-16.5 43.8-29.5 37.1-37.1 49.7-89.3 37.9-136.7-2.2-9-13.5-12.1-20.1-5.5l-74.4 74.4-67.9-11.3L334 98.9l74.4-74.4c6.6-6.6 3.4-17.9-5.7-20.2-47.4-11.7-99.6.9-136.6 37.9-28.5 28.5-41.9 66.1-41.2 103.6l82.1 82.1c8.1-1.9 16.5-2.9 24.7-2.9zm-103.9 82l-56.7-56.7L18.7 402.8c-25 25-25 65.5 0 90.5s6
37765.5 25 90.5 0l123.6-123.6c-7.6-19.9-9.9-41.6-5-62.7zM64 472c-13.2 0-24-10.8-24-24 0-13.3 10.7-24 24-24s24 10.7 24 24c0 13.2-10.7 24-24 24z"},child:[]}]})(t)}function SZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"},child:[]}]})(t)}function wZ(t){return Ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"},child:[]}]})(t)}const AZ="/assets/github-00d3e3c3.svg",MZ="/assets/linkedin-13414a58.svg",tT="/assets/arrow-8accebcd.svg",EZ="/assets/contact-0a476cf0.svg",TZ="/assets/scholar-f32db6c4.svg",bZ=[{type:"work",role:"Software Engineer Intern",company:"PlayStation (Sony Interactive Entertainment)",duration:"Jun – Dec 2025",logo:JQ,desc:"Co-leading development of a React-based internal analytics app for cloud gaming. Building modular TypeScript components for an internal SDK and enhancing application scalability."},{type:"work",role:"Undergraduate Researcher",company:"South African Astronomical Observatory",duration:"Jan – March 2025",logo:KQ,desc:"Co-authored a research paper on Cataclysmic Binary Stars. Developed an end-to-end Python data pipeline for telescope imaging and engineered automated QC tools."},{type:"work",role:"Presidential Researcher",company:"Millan Research Lab",duration:"Jan 2024 – Present",logo:dP,desc:"Built ensemble ML models for a $150M NASA mission, improving space-weather forecasts by 2.5x. Designed multimodal ML pipelines for magnetosphere prediction."},{type:"work",role:"Software Engineer Consultant",company:"DTCG",duration:"Sept – Dec 2024",logo:dP,desc:"Delivered a full-stack market-making simulation with Django backend and React frontend. Engineered a dynamic P&L tracking system for 300+ users."},{type:"work",role:"CS Teaching Assistant",company:"Dartmouth Computer Science Dept.",duration:"Aug 2024 – Present",logo:l8,desc:"Mentoring 350+ students across Web Programming, Cybersecurity, and ML courses. Debugging projects in Python, C/C++, and JavaScript."}],CZ=[{name:"Contact",iconUrl:EZ,link:"/#contact"},{name:"GitHub",iconUrl:AZ,link:"https://github.com/arnavsingh0"},{name:"LinkedIn",iconUrl:MZ,link:"https://www.linkedin.com/in/arnav-singh7"},{name:"Google Scholar",iconUrl:TZ,link:"https://scholar.google.com/"}],RZ=[{iconUrl:xZ,theme:"btn-back-yellow",name:"Lunar Rover Rescue",description:"Developed an interactive 3D planetary exploration game where users navigate a rover to complete rescue objectives on treacherous terrain.",longDescription:"Command a Vanguard-class rover across procedurally generated extraterrestrial terrain. This simulation employs a custom physics engine and WebGL WebXR rendering to simulate low-gravity planetary exploration. Features dynamic terrain mapping algorithms and physics-based vehicle maneuvering under extreme conditions.",link:"/lunar-rover",tags:["Three.js","React Three Fiber","WebGL","Physics API"]},{iconUrl:hZ,theme:"btn-back-red",name:"Olympic Medal Prediction",description:"Built ML models (Random Forest, Gradient Boosting) to predict 2024 Olympic medal outcomes with 82% accuracy using 120 years of historical data.",link:"https://github.com/arnavsingh0/Olympics",tags:["Python","Scikit-learn","Pandas","Matplotlib"]},{iconUrl:yZ,theme:"btn-back-green",name:"AWS Cloud Security",description:"Architected a cloud-native AWS security stack with WAF, Shield, and Cognito. Implemented end-to-e
3776nd encryption to defend against DDoS and web exploits.",link:"https://github.com/arnavsingh0",tags:["AWS WAF","AWS Shield","Cognito","Cloud-Native"]},{iconUrl:mZ,theme:"btn-back-blue",name:"Nuggets (Multiplayer Game)",description:"Engineered server logic and dynamic UI in C for a #1-ranked multiplayer game. Implemented real-time message passing for game state synchronization.",link:"https://github.com/arnavsingh0",tags:["C","Sockets","Multithreading","Networking"]}],PZ=[{name:"Cataclysmic Binary Stars",description:"Co-authored a research paper on the photometric analysis of cataclysmic variable stars.",tags:["Astrophysics","Python","Data Science"],link:"https://iopscience.iop.org/article/10.3847/1538-3881/ae201f"},{name:"Magnetosphere Prediction",description:"Designed multimodal ML pipelines improving rapid space-weather forecasting accuracy via Open-Close Boundary.",tags:["Machine Learning","NASA","Space Weather"],link:"https://github.com/arnavsingh0/OCB_modeling"}],BZ=()=>T.jsxs("footer",{className:"relative bg-black border-t border-white/10 pt-12 pb-8 font-mono overflow-hidden z-10",children:[T.jsx("div",{className:"absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/cubes.png')] opacity-5 pointer-events-none"}),T.jsxs("div",{className:"container relative mx-auto px-6 lg:px-8 z-10 max-w-7xl",children:[T.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 pb-4 mb-8",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-8 h-1 bg-blue-500 rounded-full"}),T.jsx("p",{className:"text-xs tracking-[0.3em] text-gray-500",children:"END_OF_TRANSMISSION //"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),T.jsx("p",{className:"text-[10px] text-green-500 tracking-widest hidden sm:block",children:"SYSTEM_SECURE"})]})]}),T.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center md:items-start gap-12",children:[T.jsxs("div",{className:"flex flex-col items-center md:items-start space-y-4 max-w-sm",children:[T.jsxs(Hf,{to:"/",className:"text-2xl font-bold text-white tracking-tighter hover:text-blue-400 transition-colors flex items-center gap-2",children:[T.jsx("span",{className:"text-blue-500",children:">_"}),"ARNAV_SINGH"]}),T.jsx("p",{className:"text-gray-400 text-xs sm:text-sm text-center md:text-left leading-relaxed font-sans",children:"Crafting digital experiences that merge code with creativity. Building the future."})]}),T.jsxs("div",{className:"flex flex-col sm:flex-row gap-12 sm:gap-24 w-full md:w-auto justify-around md:justify-end",children:[T.jsxs("div",{className:"flex flex-col items-center md:items-start gap-4",children:[T.jsx("h3",{className:"text-gray-500 text-xs tracking-[0.2em]",children:"DIRECTIVES //"}),T.jsxs("div",{className:"flex flex-col items-center md:items-start gap-3",children:[T.jsx("a",{href:"#about",className:"text-gray-300 hover:text-blue-400 transition-all hover:translate-x-1 duration-300 text-sm",children:"[1] About"}),T.jsx("a",{href:"#projects",className:"text-gray-300 hover:text-blue-400 transition-all hover:translate-x-1 duration-300 text-sm",children:"[2] Projects"}),T.jsx("a",{href:"#experience",className:"text-gray-300 hover:text-blue-400 transition-all hover:translate-x-1 duration-300 text-sm",children:"[3] Experience"}),T.jsx("a",{href:"#contact",className:"text-gray-300 hover:text-blue-400 transition-all hover:translate-x-1 duration-300 text-sm",children:"[4] Contact"})]})]}),T.jsxs("div",{className:"flex flex-col items-center md:items-start gap-4",children:[T.jsx("h3",{className:"text-gray-500 text-xs tracking-[0.2em]",children:"NETWORK //"}),T.jsx("div",{className:"flex gap-4",children:CZ.map(t=>{const n=t.link.startsWith("#")||t.link.startsWith("/#")?{}:{target:"_blank",rel:"noopener noreferrer"};return T.jsx("a",{href:t.link,...n,className:"w-10 h-10 flex justify-center items-center rounded-lg bg-white/5 border border-white/10 hover:bg-blue-600/20 hover:border-blue-500/50 hover:-translate-y-1 transition-all duration-300 group","aria-label":t.name,children:T.jsx("img",{src:t.iconUrl,alt:t.name,className:"w-5 h-5 object-contain opacity-60 group-hover:opacity-100 group-hover:brightness-200 transition-all"})},t.name)}
3776)})]})]})]}),T.jsxs("div",{className:"relative w-full h-[1px] bg-white/10 mt-12 mb-6 overflow-hidden",children:[T.jsx("div",{className:"absolute top-0 left-0 w-full h-full"}),T.jsx("div",{className:"absolute top-0 left-1/2 w-1/4 h-full bg-blue-500 shadow-[0_0_10px_rgba(59,130,246,0.8)] opacity-50"})]}),T.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center text-[10px] text-gray-500 tracking-wider",children:[T.jsxs("p",{children:["SYS_COPYRIGHT © ",new Date().getFullYear()," ARNAV SINGH. ALL RIGHTS RESERVED."]}),T.jsxs("div",{className:"flex gap-6 mt-4 md:mt-0",children:[T.jsx("a",{href:"#",className:"hover:text-blue-400 transition-colors",children:"PRIVACY_POLICY"}),T.jsx("a",{href:"#",className:"hover:text-blue-400 transition-colors",children:"TERMS_OF_SERVICE"})]})]})]})]}),nT=I.createContext({});function jy(t){const e=I.useRef(null);return e.current===null&&(e.current=t()),e.current}const f8=typeof window<"u",h8=f8?I.useLayoutEffect:I.useEffect,Wy=I.createContext(null);function iT(t,e){t.indexOf(e)===-1&&t.push(e)}function o1(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Bo=(t,e,n)=>n>e?e:n<t?t:n;function yP(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let fm=()=>{},Gc=()=>{};var oL;typeof process<"u"&&((oL=process.env)==null?void 0:oL.NODE_ENV)!=="production"&&(fm=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(yP(e,n))},Gc=(t,e,n)=>{if(!t)throw new Error(yP(e,n))});const xa={},d8=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function p8(t){return typeof t=="object"&&t!==null}const m8=t=>/^0[^.\s]+$/u.test(t);function g8(t){let e;return()=>(e===void 0&&(e=t()),e)}const ys=t=>t,LZ=(t,e)=>n=>e(t(n)),hm=(...t)=>t.reduce(LZ),Pp=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class rT{constructor(){this.subscriptions=[]}add(e){return iT(this.subscriptions,e),()=>o1(this.subscriptions,e)}notify(e,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,n,i);else for(let s=0;s<r;s++){const o=this.subscriptions[s];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xs=t=>t*1e3,ps=t=>t/1e3;function v8(t,e){return e?t*(1e3/e):0}const y8=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,IZ=1e-7,NZ=12;function DZ(t,e,n,i,r){let s,o,a=0;do o=e+(n-e)/2,s=y8(o,i,r)-t,s>0?n=o:e=o;while(Math.abs(s)>IZ&&++a<NZ);return o}function dm(t,e,n,i){if(t===e&&n===i)return ys;const r=s=>DZ(s,0,1,t,n);return s=>s===0||s===1?s:y8(r(s),e,i)}const x8=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,_8=t=>e=>1-t(1-e),S8=dm(.33,1.53,.69,.99),sT=_8(S8),w8=x8(sT),A8=t=>(t*=2)<1?.5*sT(t):.5*(2-Math.pow(2,-10*(t-1))),oT=t=>1-Math.sin(Math.acos(t)),M8=_8(oT),E8=x8(oT),FZ=dm(.42,0,1,1),OZ=dm(0,0,.58,1),T8=dm(.42,0,.58,1),UZ=t=>Array.isArray(t)&&typeof t[0]!="number",b8=t=>Array.isArray(t)&&typeof t[0]=="number",xP={linear:ys,easeIn:FZ,easeInOut:T8,easeOut:OZ,circIn:oT,circInOut:E8,circOut:M8,backIn:sT,backInOut:w8,backOut:S8,anticipate:A8},kZ=t=>typeof t=="string",_P=t=>{if(b8(t)){Gc(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,r]=t;return dm(e,n,i,r)}else if(kZ(t))return Gc(xP[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),xP[t];return t},bg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],SP={value:null,addProjectionMetrics:null};function zZ(t,e){let n=new Set,i=new Set,r=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(f){o.has(f)&&(u.schedule(f),t()),l++,f(a)}const u={schedule:(f,p=!1,m=!1)=>{const w=m&&r?n:i;return p&&o.add(f),w.has(f)||w.add(f),f},cancel:f=>{i.delete(f),o.delete(f)},process:f=>{if(a=f,r){s=!0;return}
vendor: 19,795 bytes, line 3776
3776r=!0,[n,i]=[i,n],n.forEach(c),e&&SP.value&&SP.value.frameloop[e].push(l),l=0,n.clear(),r=!1,s&&(s=!1,u.process(f))}};return u}const HZ=40;function C8(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=bg.reduce((y,M)=>(y[M]=zZ(s,e?M:void 0),y),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:f,preRender:p,render:m,postRender:v}=o,w=()=>{const y=xa.useManualTiming?r.timestamp:performance.now();n=!1,xa.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(y-r.timestamp,HZ),1)),r.timestamp=y,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),f.process(r),p.process(r),m.process(r),v.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(w))},x=()=>{n=!0,i=!0,r.isProcessing||t(w)};return{schedule:bg.reduce((y,M)=>{const E=o[M];return y[M]=(C,P=!1,N=!1)=>(n||x(),E.schedule(C,P,N)),y},{}),cancel:y=>{for(let M=0;M<bg.length;M++)o[bg[M]].cancel(y)},state:r,steps:o}}const{schedule:Sn,cancel:Sl,state:Ti,steps:P2}=C8(typeof requestAnimationFrame<"u"?requestAnimationFrame:ys,!0);let uv;function GZ(){uv=void 0}const lr={now:()=>(uv===void 0&&lr.set(Ti.isProcessing||xa.useManualTiming?Ti.timestamp:performance.now()),uv),set:t=>{uv=t,queueMicrotask(GZ)}},R8=t=>e=>typeof e=="string"&&e.startsWith(t),P8=R8("--"),VZ=R8("var(--"),aT=t=>VZ(t)?jZ.test(t.split("/*")[0].trim()):!1,jZ=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wP(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const uh={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Bp={...uh,transform:t=>Bo(0,1,t)},Cg={...uh,default:1},Od=t=>Math.round(t*1e5)/1e5,lT=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function WZ(t){return t==null}const XZ=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cT=(t,e)=>n=>!!(typeof n=="string"&&XZ.test(n)&&n.startsWith(t)||e&&!WZ(n)&&Object.prototype.hasOwnProperty.call(n,e)),B8=(t,e,n)=>i=>{if(typeof i!="string")return i;const[r,s,o,a]=i.match(lT);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},JZ=t=>Bo(0,255,t),B2={...uh,transform:t=>Math.round(JZ(t))},yc={test:cT("rgb","red"),parse:B8("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+B2.transform(t)+", "+B2.transform(e)+", "+B2.transform(n)+", "+Od(Bp.transform(i))+")"};function KZ(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Yw={test:cT("#"),parse:KZ,transform:yc.transform},pm=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ga=pm("deg"),To=pm("%"),st=pm("px"),YZ=pm("vh"),QZ=pm("vw"),AP=(()=>({...To,parse:t=>To.parse(t)/100,transform:t=>To.transform(t*100)}))(),hf={test:cT("hsl","hue"),parse:B8("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+To.transform(Od(e))+", "+To.transform(Od(n))+", "+Od(Bp.transform(i))+")"},ei={test:t=>yc.test(t)||Yw.test(t)||hf.test(t),parse:t=>yc.test(t)?yc.parse(t):hf.test(t)?hf.parse(t):Yw.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?yc.transform(t):hf.transform(t),getAnimatableNone:t=>{const e=ei.parse(t);return e.alpha=0,ei.transform(e)}},ZZ=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qZ(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(lT))==null?void 0:e.length)||0)+(((n=t.match(ZZ))==null?void 0:n.length)||0)>0}const L8="number",I8="color",$Z="var",eq="var(",MP="${}",tq=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Lp(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const a=e.replace(tq,l=>(ei.test(l)?(i.color.push(s),r.push(I8),n.push(ei.parse(l))):l.startsWith(eq)?(i.var.push(s),r.push($Z),n.push(l)):(i.number.push(s),r.push(L8),n.push(parseFloat(l))),++s,MP)).split(MP);return{values:n,split:a,indexes:i,types:r}}function N8(t){return Lp(t).values}function D8(t){const{split:e,types:n}=Lp(t),i=e.length;return r=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],r[o]!==void 0){const a=n[o];a===L8?s+=Od(r[o]):a===I8?s+=ei.transform(r[o]):s+=r[o]}return s}}const nq=t=>typeof t=="number"?0:ei.test(t)?ei.getAnimatableNone(t):t;function iq(t){const e=N8(t);return D8(t)(e.map(nq))}const Ks={test:qZ,parse:N8,createTransformer:D8,getAnimatableNone:iq};function L2(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function rq({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let r=0,s=0,o=0;if(!e)r=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=L2(l,a,t+1/3),s=L2(l,a,t),o=L2(l,a,t-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}function a1(t,e){return n=>n>0?e:t}const Ln=(t,e,n)=>t+(e-t)*n,I2=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},sq=[Yw,yc,hf],oq=t=>sq.find(e=>e.test(t));function EP(t){const e=oq(t);if(fm(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===hf&&(n=rq(n)),n}const TP=(t,e)=>{const n=EP(t),i=EP(e);if(!n||!i)return a1(t,e);const r={...n};return s=>(r.red=I2(n.red,i.red,s),r.green=I2(n.green,i.green,s),r.blue=I2(n.blue,i.blue,s),r.alpha=Ln(n.alpha,i.alpha,s),yc.transform(r))},Qw=new Set(["none","hidden"]);function aq(t,e){return Qw.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function lq(t,e){return n=>Ln(t,e,n)}function uT(t){return typeof t=="number"?lq:typeof t=="string"?aT(t)?a1:ei.test(t)?TP:fq:Array.isArray(t)?F8:typeof t=="object"?ei.test(t)?TP:cq:a1}function F8(t,e){const n=[...t],i=n.length,r=t.map((s,o)=>uT(s)(s,e[o]));return s=>{for(let o=0;o<i;o++)n[o]=r[o](s);return n}}function cq(t,e){const n={...t,...e},i={};for(const r in n)t[r]!==void 0&&e[r]!==void 0&&(i[r]=uT(t[r])(t[r],e[r]));return r=>{for(const s in i)n[s]=i[s](r);return n}}function uq(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const s=e.types[r],o=t.indexes[s][i[s]],a=t.values[o]??0;n[r]=a,i[s]++}return n}const fq=(t,e)=>{const n=Ks.createTransformer(e),i=Lp(t),r=Lp(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Qw.has(t)&&!r.values.length||Qw.has(e)&&!i.values.length?aq(t,e):hm(F8(uq(i,r),r.values),n):(fm(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),a1(t,e))};function O8(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Ln(t,e,n):uT(t)(t,e)}const hq=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Sn.update(e,n),stop:()=>Sl(e),now:()=>Ti.isProcessing?Ti.timestamp:lr.now()}},U8=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let s=0;s<r;s++)i+=Math.round(t(s/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},l1=2e4;function fT(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<l1;)e+=n,i=t.next(e);return e>=l1?1/0:e}function dq(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(fT(i),l1);return{type:"keyframes",ease:s=>i.next(r*s).value/e,duration:ps(r)}}const pq=5;function k8(t,e,n){const i=Math.max(e-pq,0);return v8(n-t(i),e-i)}const Rn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},N2=.001;function mq({duration:t=Rn.duration,bounce:e=Rn.bounce,velocity:n=Rn.velocity,mass:i=Rn.mass}){let r,s;fm(t<=xs(Rn.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=Bo(Rn.minDamping,Rn.maxDamping,o),t=Bo(Rn.minDuration,Rn.maxDuration,ps(t)),o<1?(r=c=>{const u=c*o,f=u*t,p=u-n,m=Zw(c,o),v=Math.exp(-f);return N2-p/m*v},s=c=>{const f=c*o*t,p=f*n+n,m=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-f),w=Zw(Math.pow(c,2),o);return(-r(c)+N2>0?-1:1)*((p-m)*v)/w}):(r=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-N2+u*f},s=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=vq(r,s,a);if(t=xs(t),isNaN(l))return{stiffness:Rn.stiffness,damping:Rn.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}const gq=12;function vq(t,e,n){let i=n;for(let r=1;r<gq;r++)i=i-t(i)/e(i);return i}function Zw(t,e){return t*Math.sqrt(1-e*e)}const yq=["duration","bounce"],xq=["stiffness","damping","mass"];function bP(t,e){return e.some(n=>t[n]!==void 0)}function _q(t){let e={velocity:Rn.velocity,stiffness:Rn.stiffness,damping:Rn.damping,mass:Rn.mass,isResolvedFromDuration:!1,...t};if(!bP(t,xq)&&bP(t,yq))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*Bo(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Rn.mass,stiffness:r,damping:s}}else{const n=mq({...t,velocity:0});e={...e,...n,mass:Rn.mass},e.isResolvedFromDuration=!0}return e}function c1(t=Rn.visualDuration,e=Rn.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:f,velocity:p,isResolvedFromDuration:m}=_q({...n,velocity:-ps(n.velocity||0)}),v=p||0,w=c/(2*Math.sqrt(l*u)),x=o-s,g=ps(Math.sqrt(l/u)),_=Math.abs(x)<5;i||(i=_?Rn.restSpeed.granular:Rn.restSpeed.default),r||(r=_?Rn.restDelta.granular:Rn.restDelta.default);let y;if(w<1){const E=Zw(g,w);y=C=>{const P=Math.exp(-w*g*C);return o-P*((v+w*g*x)/E*Math.sin(E*C)+x*Math.cos(E*C))}}else if(w===1)y=E=>o-Math.exp(-g*E)*(x+(v+g*x)*E);else{const E=g*Math.sqrt(w*w-1);y=C=>{const P=Math.exp(-w*g*C),N=Math.min(E*C,300);return o-P*((v+w*g*x)*Math.sinh(N)+E*x*Math.cosh(N))/E}}const M={calculatedDuration:m&&f||null,next:E=>{const C=y(E);if(m)a.done=E>=f;else{let P=E===0?v:0;w<1&&(P=E===0?xs(v):k8(y,E,C));const N=Math.abs(P)<=i,R=Math.abs(o-C)<=r;a.done=N&&R}return a.value=a.done?o:C,a},toString:()=>{const E=Math.min(fT(M),l1),C=U8(P=>M.next(E*P).value,E,30);return E+"ms "+C},toTransition:()=>{}};return M}c1.applyToOptions=t=>{const e=dq(t,100,c1);return t.ease=e.ease,t.duration=xs(e.duration),t.type="keyframes",t};function qw({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],p={done:!1,value:f},m=N=>a!==void 0&&N<a||l!==void 0&&N>l,v=N=>a===void 0?l:l===void 0||Math.abs(a-N)<Math.abs(l-N)?a:l;let w=n*e;const x=f+w,g=o===void 0?x:o(x);g!==x&&(w=g-f);const _=N=>-w*Math.exp(-N/i),y=N=>g+_(N),M=N=>{const R=_(N),L=y(N);p.done=Math.abs(R)<=c,p.value=p.done?g:L};let E,C;const P=N=>{m(p.value)&&(E=N,C=c1({keyframes:[p.value,v(p.value)],velocity:k8(y,N,p.value),damping:r,stiffness:s,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:N=>{let R=!1;return!C&&E===void 0&&(R=!0,M(N),P(N)),E!==void 0&&N>=E?C.next(N-E):(!R&&M(N),p)}}}function Sq(t,e,n){const i=[],r=n||xa.mix||O8,s=t.length-1;for(let o=0;o<s;o++){let a=r(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||ys:e;a=hm(l,a)}i.push(a)}return i}function wq(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(Gc(s===e.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Sq(e,i,r),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const p=Pp(t[f],t[f+1],u);return a[f](p)};return n?u=>c(Bo(t[0],t[s-1],u)):c}function Aq(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Pp(0,e,i);t.push(Ln(n,1,r))}}function Mq(t){const e=[0];return Aq(e,t.length-1),e}function Eq(t,e){return t.map(n=>n*e)}function Tq(t,e){return t.map(()=>e||T8).splice(0,t.length-1)}function Ud({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=UZ(i)?i.map(_P):_P(i),s={done:!1,value:e[0]},o=Eq(n&&n.length===e.length?n:Mq(e),t),a=wq(o,e,{ease:Array.isArray(r)?r:Tq(e,r)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const bq=t=>t!==null;function hT(t,{repeat:e,repeatType:n="loop"},i,r=1){const s=t.filter(bq),a=r<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!a||i===void 0?s[a]:i}const Cq={decay:qw,inertia:qw,tween:Ud,keyframes:Ud,spring:c1};function z8(t){typeof t.type=="string"&&(t.type=Cq[t.type])}class dT{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Rq=t=>t/100;class pT extends dT{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var i,r;const{motionValue:n}=this.options;n&&n.updatedAt!==lr.now()&&this.tick(lr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(i=this.options).onStop)==null||r.call(i))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;z8(e);const{type:n=Ud,repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Ud;l!==Ud&&typeof a[0]!="number"&&(this.mixKeyframes=hm(Rq,O8(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=fT(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:r,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:f,repeatType:p,repeatDelay:m,type:v,onUpdate:w,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,M=i;if(f){const N=Math.min(this.currentTime,r)/a;let R=Math.floor(N),L=N%1;!L&&N>=1&&(L=1),L===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(p==="reverse"?(L=1-L,m&&(L-=m/a)):p==="mirror"&&(M=o)),y=Bo(0,1,L)*a}const E=_?{done:!1,value:u[0]}:M.next(y);s&&(E.value=s(E.value));let{done:C}=E;!_&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return P&&v!==qw&&(E.value=hT(u,this.options,x,this.speed)),w&&w(E.value),P&&this.finish(),E}then(e,n){return this.finished.then(e,n)}get duration(){return ps(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ps(e)}get time(){return ps(this.currentTime)}set time(e){var n;e=xs(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(lr.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=ps(this.currentTime))}play(){var r,s;if(this.isStopped)return;const{driver:e=hq,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(r=this.options).onPlay)==null||s.call(r);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Pq(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const xc=t=>t*180/Math.PI,$w=t=>{const e=xc(Math.atan2(t[1],t[0]));return eA(e)},Bq={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$w,rotateZ:$w,skewX:t=>xc(Math.atan(t[1])),skewY:t=>xc(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},eA=t=>(t=t%360,t<0&&(t+=360),t),CP=$w,RP=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),PP=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Lq={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:RP,scaleY:PP,scale:t=>(RP(t)+PP(t))/2,rotateX:t=>eA(xc(Math.atan2(t[6],t[5]))),rotateY:t=>eA(xc(Math.atan2(-t[2],t[0]))),rotateZ:CP,rotate:CP,skewX:t=>xc(Math.atan(t[4])),skewY:t=>xc(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tA(t){return t.includes("scale")?1:0}function nA(t,e){if(!t||t==="none")return tA(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=Lq,r=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Bq,r=a}if(!r)return tA(e);const s=i[e],o=r[1].split(",").map(Nq);return typeof s=="function"?s(o):o[s]}const Iq=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return nA(n,e)};function Nq(t){return parseFloat(t.trim())}const fh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hh=(()=>new Set(fh))(),BP=t=>t===uh||t===st,Dq=new Set(["x","y","z"]),Fq=fh.filter(t=>!Dq.has(t));function Oq(t){const e=[];return Fq.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const el={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>nA(e,"x"),y:(t,{transform:e})=>nA(e,"y")};el.translateX=el.x;el.translateY=el.y;const Cc=new Set;let iA=!1,rA=!1,sA=!1;function H8(){if(rA){const t=Array.from(Cc).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>
vendor: 1,741 bytes, line 3776
3776{const r=Oq(i);r.length&&(n.set(i,r),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,o])=>{var a;(a=i.getValue(s))==null||a.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}rA=!1,iA=!1,Cc.forEach(t=>t.complete(sA)),Cc.clear()}function G8(){Cc.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(rA=!0)})}function Uq(){sA=!0,G8(),H8(),sA=!1}class mT{constructor(e,n,i,r,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Cc.add(this),iA||(iA=!0,Sn.read(G8),Sn.resolveKeyframes(H8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:r}=this;if(e[0]===null){const s=r==null?void 0:r.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),r&&s===void 0&&r.set(e[0])}Pq(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Cc.delete(this)}cancel(){this.state==="scheduled"&&(Cc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kq=t=>t.startsWith("--");function zq(t,e,n){kq(e)?t.style.setProperty(e,n):t.style[e]=n}const Hq={};function V8(t,e){const n=g8(t);return()=>Hq[e]??n()}const Gq=V8(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),j8=V8(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 4,245 bytes, line 3776
3776,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pd=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,LP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pd([0,.65,.55,1]),circOut:pd([.55,0,1,.45]),backIn:pd([.31,.01,.66,-.59]),backOut:pd([.33,1.53,.69,.99])};function W8(t,e){if(t)return typeof t=="function"?j8()?U8(t,e):"ease-out":b8(t)?pd(t):Array.isArray(t)?t.map(n=>W8(n,e)||LP.easeOut):LP[t]}function Vq(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const f=W8(a,r);Array.isArray(f)&&(u.easing=f);const p={delay:i,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),t.animate(u,p)}function X8(t){return typeof t=="function"&&"applyToOptions"in t}function jq({type:t,...e}){return X8(t)&&j8()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class J8 extends dT{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:r,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,Gc(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=jq(e);this.animation=Vq(n,i,r,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=hT(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):zq(n,i,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,r;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((r=(i=this.animation).commitStyles)==null||r.call(i))}get duration(){var n,i;const e=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return ps(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ps(e)}get time(){return ps(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xs(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Gq()?(this.animation.timeline=e,ys):n(this)}}const K8={anticipate:A8,backInOut:w8,circInOut:E8};function Wq(t){return t in K8}function Xq(t){typeof t.ease=="string"&&Wq(t.ease)&&(t.ease=K8[t.ease])}const D2=10;class Jq extends J8{constructor(e){Xq(e),z8(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:r,element:s,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new pT({...o,autoplay:!1}),l=Math.max(D2,lr.now()-this.startTime),c=Bo(0,D2,l-D2);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const IP=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ks.test(t)||t==="0")&&!t.startsWith("url("));function Kq(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Yq(t,e,n,i){const r=t[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;
3776const s=t[t.length-1],o=IP(r,e),a=IP(s,e);return fm(o===a,`You are trying to animate ${e} from "${r}" to "${s}". "${o?s:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Kq(t)||(n==="spring"||X8(n))&&i}function oA(t){t.duration=0,t.type="keyframes"}const Qq=new Set(["opacity","clipPath","filter","transform"]),Zq=g8(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function qq(t){var u;const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:s,type:o}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Zq()&&n&&Qq.has(n)&&(n!=="transform"||!c)&&!l&&!i&&r!=="mirror"&&s!==0&&o!=="inertia"}const $q=40;class e$ extends dT{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...f}){var v;super(),this.stop=()=>{var w,x;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=lr.now();const p={autoplay:e,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...f},m=(u==null?void 0:u.KeyframeResolver)||mT;this.keyframeResolver=new m(a,(w,x,g)=>this.onKeyframesResolved(w,x,p,!g),l,c,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,i,r){var x,g;this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=lr.now(),Yq(e,s,o,a)||((xa.instantAnimations||!l)&&(u==null||u(hT(e,i,n))),e[0]=e[e.length-1],oA(i),i.repeat=0);const p={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>$q?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=!c&&qq(p),v=(g=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:g.current,w=m?new Jq({...p,element:v}):new pT(p);w.finished.then(()=>{this.notifyFinished()}).catch(ys),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Uq()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function Y8(t,e,n,i=0,r=1){const s=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(s,o):r===1?s*i:a-s*i}const t$=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function n$(t){const e=t$.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}const i$=4;function Q8(t,e,n=1){Gc(n<=i$,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=n$(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return d8(o)?parseFloat(o):o}return aT(r)?Q8(r,e,n+1):r}const r$={type:"spring",stiffness:500,damping:25,restSpeed:10},s$=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),o$={type:"keyframes",duration:.8},a$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},l$=(t,{keyframes:e})=>e.length>2?o$:hh.has(t)?t.startsWith("scale")?s$(e[1]):r$:a$,c$=t=>t!==null;function u$(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(c$),s=e&&n!=="loop"&&e%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}function Z8(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function gT(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Z8(n,t):n}function f$({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:
vendor: 4,491 bytes, line 3776
3776o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const vT=(t,e,n,i={},r,s)=>o=>{const a=gT(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-xs(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:p=>{e.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r};f$(a)||Object.assign(u,l$(t,u)),u.duration&&(u.duration=xs(u.duration)),u.repeatDelay&&(u.repeatDelay=xs(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(oA(u),u.delay===0&&(f=!0)),(xa.instantAnimations||xa.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(f=!0,oA(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!s&&e.get()!==void 0){const p=u$(u.keyframes,a);if(p!==void 0){Sn.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new pT(u):new e$(u)};function NP(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function yT(t,e,n,i){if(typeof e=="function"){const[r,s]=NP(i);e=e(n!==void 0?n:t.custom,r,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,s]=NP(i);e=e(n!==void 0?n:t.custom,r,s)}return e}function Pf(t,e,n){const i=t.getProps();return yT(i,e,n!==void 0?n:i.custom,t)}const q8=new Set(["width","height","top","left","right","bottom",...fh]),DP=30,h$=t=>!isNaN(parseFloat(t));class d${constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var s;const r=lr.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=lr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=h$(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new rT);const i=this.events[e].add(n);return e==="change"?()=>{i(),Sn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=lr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>DP)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,DP);return v8(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vc(t,e){return new d$(t,e)}const aA=t=>Array.isArray(t);function p$(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vc(n))}function m$(t){return aA(t)?t[t.length-1]||0:t}function g$(t,e){const n=Pf(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const o in s){const a=m$(s[o]);p$(t,o,a)}}const Xi=t=>!!(t&&t.getVelocity);function v$(t){return!!(Xi(t)&&t.add)}function lA(t,e){const n=t.getValue("willChange");if(v$(n))return n.add(e);if(!n&&xa.WillChange){const i=new xa.WillChange("auto");
vendor: 4,511 bytes, line 3776
3776t.addValue("willChange",i),i.add(e)}}function xT(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const y$="framerAppearId",$8="data-"+xT(y$);function eF(t){return t.props[$8]}function x$({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function tF(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:s,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();s=s?Z8(s,l):l;const c=s==null?void 0:s.reduceMotion;i&&(s=i);const u=[],f=r&&t.animationState&&t.animationState.getState()[r];for(const p in a){const m=t.getValue(p,t.latestValues[p]??null),v=a[p];if(v===void 0||f&&x$(f,p))continue;const w={delay:n,...gT(s||{},p)},x=m.get();if(x!==void 0&&!m.isAnimating&&!Array.isArray(v)&&v===x&&!w.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const M=eF(t);if(M){const E=window.MotionHandoffAnimation(M,p,Sn);E!==null&&(w.startTime=E,g=!0)}}lA(t,p);const _=c??t.shouldReduceMotion;m.start(vT(p,m,v,_&&q8.has(p)?{type:!1}:w,t,g));const y=m.animation;y&&u.push(y)}if(o){const p=()=>Sn.update(()=>{o&&g$(t,o)});u.length?Promise.all(u).then(p):p()}return u}function cA(t,e,n={}){var l;const i=Pf(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>Promise.all(tF(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:p}=r;return _$(t,e,c,u,f,p,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,u]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function _$(t,e,n=0,i=0,r=0,s=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(cA(l,e,{...o,delay:n+(typeof i=="function"?0:i)+Y8(t.variantChildren,l,i,r,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function S$(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>cA(t,s,n));i=Promise.all(r)}else if(typeof e=="string")i=cA(t,e,n);else{const r=typeof e=="function"?Pf(t,e,n.custom):e;i=Promise.all(tF(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const w$={test:t=>t==="auto",parse:t=>t},nF=t=>e=>e.test(t),iF=[uh,st,To,Ga,QZ,YZ,w$],FP=t=>iF.find(nF(t));function A$(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||m8(t):!0}const M$=new Set(["brightness","contrast","saturate","opacity"]);function E$(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(lT)||[];if(!i)return t;const r=n.replace(i,"");let s=M$.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const T$=/\b([a-z-]*)\(.*?\)/gu,uA={...Ks,getAnimatableNone:t=>{const e=t.match(T$);return e?e.map(E$).join(" "):t}},fA={...Ks,getAnimatableNone:t=>{const e=Ks.parse(t);return Ks.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},OP={...uh,transform:Math.round},b$={rotate:Ga,rotateX:Ga,rotateY:Ga,rotateZ:Ga,scale:Cg,scaleX:Cg,scaleY:Cg,scaleZ:Cg,skew:Ga,skewX:Ga,skewY:Ga,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:Bp,originX:AP,originY:AP,originZ:st},_T={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,top:st,right:st,bottom:st,left:st,inset:st,insetBlock:st,insetBlockStart:st,insetBlockEnd:st,insetInline:st,insetInlineStart:st,insetInlineEnd:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,paddingBlock:st,paddingBlockStart:st,paddingBlockEnd:st,paddingInline:st,paddingInlineStart:st,paddingInlineEnd:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,marginBlock:st,marginBlockStart:st,marginBlockEnd:st,marginInline:st,marginInlineStart:st,marginInlineEnd:st,fontSize:st,backgroundPositionX:st,backgroundPositionY:st,...b$,zIndex:OP,fillOpacity:Bp,strokeOpacity:Bp,numOctaves:OP},C$={..._T,color:ei,backgroundColor:ei,outlineColor:ei,fill:ei,stroke:ei,borderColor:ei,borderTopColor:ei,borderRightColor:ei,borderBottomColor:ei,borderLeftColor:ei,filter:uA,WebkitFilter:uA,mask:fA,WebkitMask:fA},rF=t=>C$[t],R$=new Set([uA,fA]);function sF(t,e){let n=rF(t);return R$.has(n)||(n=Ks),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 1,717 bytes, line 3776
3776const P$=new Set(["auto","none","0"]);function B$(t,e,n){let i=0,r;for(;i<t.length&&!r;){const s=t[i];typeof s=="string"&&!P$.has(s)&&Lp(s).values.length&&(r=t[i]),i++}if(r&&n)for(const s of e)t[s]=sF(n,r)}class L$ extends mT{constructor(e,n,i,r,s){super(e,n,i,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let f=e[u];if(typeof f=="string"&&(f=f.trim(),aT(f))){const p=Q8(f,n.current);p!==void 0&&(e[u]=p),u===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!q8.has(i)||e.length!==2)return;const[r,s]=e,o=FP(r),a=FP(s),l=wP(r),c=wP(s);if(l!==c&&el[i]){this.needsMeasurement=!0;return}if(o!==a)if(BP(o)&&BP(a))for(let u=0;u<e.length;u++){const f=e[u];typeof f=="string"&&(e[u]=parseFloat(f))}else el[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let r=0;r<e.length;r++)(e[r]===null||A$(e[r]))&&i.push(r);i.length&&B$(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=el[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&e.getValue(i,r).jump(r,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const s=i.length-1,o=i[s];i[s]=el[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 10,933 bytes, line 3776
3776h(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const I$=new Set(["opacity","clipPath","filter","transform"]);function oF(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);const r=(n==null?void 0:n[t])??i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t).filter(i=>i!=null)}const aF=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function hA(t){return p8(t)&&"offsetHeight"in t}const{schedule:ST,cancel:Ufe}=C8(queueMicrotask,!1),Ds={x:!1,y:!1};function lF(){return Ds.x||Ds.y}function N$(t){return t==="x"||t==="y"?Ds[t]?null:(Ds[t]=!0,()=>{Ds[t]=!1}):Ds.x||Ds.y?null:(Ds.x=Ds.y=!0,()=>{Ds.x=Ds.y=!1})}function cF(t,e){const n=oF(t),i=new AbortController,r={passive:!0,...e,signal:i.signal};return[n,r,()=>i.abort()]}function D$(t){return!(t.pointerType==="touch"||lF())}function F$(t,e,n={}){const[i,r,s]=cF(t,n);return i.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",v)},f=x=>{c&&(c(x),c=void 0),u()},p=x=>{a=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),l&&(l=!1,f(x))},m=()=>{a=!0,window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",p,r)},v=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}f(x)}},w=x=>{if(!D$(x))return;l=!1;const g=e(o,x);typeof g=="function"&&(c=g,o.addEventListener("pointerleave",v,r))};o.addEventListener("pointerenter",w,r),o.addEventListener("pointerdown",m,r)}),s}const uF=(t,e)=>e?t===e?!0:uF(t,e.parentElement):!1,wT=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,O$=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function U$(t){return O$.has(t.tagName)||t.isContentEditable===!0}const k$=new Set(["INPUT","SELECT","TEXTAREA"]);function z$(t){return k$.has(t.tagName)||t.isContentEditable===!0}const fv=new WeakSet;function UP(t){return e=>{e.key==="Enter"&&t(e)}}function F2(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const H$=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=UP(()=>{if(fv.has(n))return;F2(n,"down");const r=UP(()=>{F2(n,"up")}),s=()=>F2(n,"cancel");n.addEventListener("keyup",r,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function kP(t){return wT(t)&&!lF()}const zP=new WeakSet;function G$(t,e,n={}){const[i,r,s]=cF(t,n),o=a=>{const l=a.currentTarget;if(!kP(a)||zP.has(a))return;fv.add(l),n.stopPropagation&&zP.add(a);const c=e(l,a),u=(m,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),fv.has(l)&&fv.delete(l),kP(m)&&typeof c=="function"&&c(m,{success:v})},f=m=>{u(m,l===window||l===document||n.useGlobalTarget||uF(l,m.target))},p=m=>{u(m,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",p,r)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),hA(a)&&(a.addEventListener("focus",c=>H$(c,r)),!U$(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function AT(t){return p8(t)&&"ownerSVGElement"in t}const hv=new WeakMap;let Va;const fF=(t,e,n)=>(i,r)=>r&&r[0]?r[0][t+"Size"]:AT(i)&&"getBBox"in i?i.getBBox()[e]:i[n],V$=fF("inline","width","offsetWidth"),j$=fF("block","height","offsetHeight");function W$({target:t,borderBoxSize:e}){var n;(n=hv.get(t))==null||n.forEach(i=>{i(t,{get width(){return V$(t,e)},get height(){return j$(t,e)}})})}function X$(t){t.forEach(W$)}function J$(){typeof ResizeObserver>"u"||(Va=new ResizeObserver(X$))}function K$(t,e){Va||J$();const n=oF(t);return n.forEach(i=>{let r=hv.get(i);r||(r=new Set,hv.set(i,r)),r.add(e),Va==null||Va.observe(i)}),()=>{n.forEach(i=>{const r=hv.get(i);r==null||r.delete(e),r!=null&&r.size||Va==null||Va.unobserve(i)})}}const dv=new Set;let df;function Y$(){df=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};dv.forEach(e=>e(t))},window.addEventListener("resize",df)}function Q$(t){return dv.add(t),df||Y$(),()=>{dv.delete(t),!dv.size&&typeof df=="function"&&(window.removeEventListener("resize",df),df=void 0)}}function HP(t,e){return typeof t=="function"?Q$(t):K$(t,e)}function Z$(t){return AT(t)&&t.tagName==="svg"}const q$=[...iF,ei,Ks],$$=t=>q$.find(nF(t)),GP=()=>({translate:0,scale:1,origin:0,originPoint:0}),pf=()=>({x:GP(),y:GP()}),VP=()=>({min:0,max:0}),oi=()=>({x:VP(),y:VP()}),eee=new WeakMap;function Xy(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ip(t){return typeof t=="string"||Array.isArray(t)}const MT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ET=["initial",...MT];function Jy(t){return Xy(t.animate)||ET.some(e=>Ip(t[e]))}function hF(t){return!!(Jy(t)||t.variants)}function tee(t,e,n){for(const i in e){const r=e[i],s=n[i];if(Xi(r))t.addValue(i,r);else if(Xi(s))t.addValue(i,Vc(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=t.getStaticValue(i);t.addValue(i,Vc(o!==void 0?o:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const dA={current:null},dF={current:!1},nee=typeof window<"u";function iee(){if(dF.current=!0,!!nee)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>dA.current=t.matches;t.addEventListener("change",e),e()}else dA.current=!1}const jP=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let u1={};function pF(t){u1=t}function ree(){return u1}class see{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=mT,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=lr.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Sn.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Jy(n),this.isVariantNode=hF(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const v=p[m];c[m]!==void 0&&Xi(v)&&v.set(c[m])}}mount(e){var n,i;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=e,eee.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,s)=>this.bindToMotionValue(s,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(dF.current||iee(),this.shouldReduceMotion=dA.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),Sl(this.notifyUpdate),Sl(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&I$.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,f=new J8({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:xs(u)}),p=o(f);this.valueSubscriptions.set(e,()=>{p(),f.cancel()});return}const i=hh.has(e);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Sn.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{r(),s&&s(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in u1){const n=u1[e];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):oi()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<jP.length;i++){const r=jP[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,o=e[s];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=tee(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
vendor: 15,668 bytes, line 3776
3776addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Vc(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(d8(i)||m8(i))?i=parseFloat(i):!$$(i)&&Ks.test(n)&&(i=sF(e,n)),this.setBaseTarget(e,Xi(i)?i.get():i)),Xi(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var s;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=yT(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(i=o[e])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Xi(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new rT),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ST.render(this.render)}}class mF extends see{constructor(){super(...arguments),this.KeyframeResolver=L$}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Xi(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Pl{constructor(e){this.isMounted=!1,this.node=e}update(){}}function gF({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function oee({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function aee(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function O2(t){return t===void 0||t===1}function pA({scale:t,scaleX:e,scaleY:n}){return!O2(t)||!O2(e)||!O2(n)}function sc(t){return pA(t)||vF(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function vF(t){return WP(t.x)||WP(t.y)}function WP(t){return t&&t!=="0%"}function f1(t,e,n){const i=t-n,r=e*i;return n+r}function XP(t,e,n,i,r){return r!==void 0&&(t=f1(t,r,i)),f1(t,n,i)+e}function mA(t,e=0,n=1,i,r){t.min=XP(t.min,e,n,i,r),t.max=XP(t.max,e,n,i,r)}function yF(t,{x:e,y:n}){mA(t.x,e.translate,e.scale,e.originPoint),mA(t.y,n.translate,n.scale,n.originPoint)}const JP=.999999999999,KP=1.0000000000001;function lee(t,e,n,i=!1){const r=n.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a<r;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&gf(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,yF(t,o)),i&&sc(s.latestValues)&&gf(t,s.latestValues))}e.x<KP&&e.x>JP&&(e.x=1),e.y<KP&&e.y>JP&&(e.y=1)}function mf(t,e){t.min=t.min+e,t.max=t.max+e}function YP(t,e,n,i,r=.5){const s=Ln(t.min,t.max,r);mA(t,e,n,s,i)}function gf(t,e){YP(t.x,e.x,e.scaleX,e.scale,e.originX),YP(t.y,e.y,e.scaleY,e.scale,e.originY)}function xF(t,e){return gF(aee(t.getBoundingClientRect(),e))}function cee(t,e,n){const i=xF(t,n),{scroll:r}=e;return r&&(mf(i.x,r.offset.x),mf(i.y,r.offset.y)),i}const uee={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fee=fh.length;function hee(t,e,n){let i="",r=!0;for(let s=0;s<fee;s++){const o=fh[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=aF(a,_T[o]);if(!l){r=!1;const u=uee[o]||o;i+=`${u}(${c}) `}n&&(e[o]=c)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}function TT(t,e,n){const{style:i,vars:r,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(hh.has(l)){o=!0;continue}else if(P8(l)){r[l]=c;continue}else{const u=aF(c,_T[l]);l.startsWith("origin")?(a=!0,s[l]=u):i[l]=u}}if(e.transform||(o||n?i.transform=hee(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;i.transformOrigin=`${l} ${c} ${u}`}}function _F(t,{style:e,vars:n},i,r){const s=t.style;let o;for(o in e)s[o]=e[o];r==null||r.applyProjectionStyles(s,i);for(o in n)s.setProperty(o,n[o])}function QP(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const sd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(st.test(t))t=parseFloat(t);else return t;const n=QP(t,e.target.x),i=QP(t,e.target.y);return`${n}% ${i}%`}},dee={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=Ks.parse(t);if(r.length>5)return i;const s=Ks.createTransformer(t),o=typeof r[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const c=Ln(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=c),typeof r[3+o]=="number"&&(r[3+o]/=c),s(r)}},gA={borderRadius:{...sd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sd,borderTopRightRadius:sd,borderBottomLeftRadius:sd,borderBottomRightRadius:sd,boxShadow:dee};function SF(t,{layout:e,layoutId:n}){return hh.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!gA[t]||t==="opacity")}function bT(t,e,n){var o;const i=t.style,r=e==null?void 0:e.style,s={};if(!i)return s;for(const a in i)(Xi(i[a])||r&&Xi(r[a])||SF(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=i[a]);return s}function pee(t){return window.getComputedStyle(t)}class mee extends mF{constructor(){super(...arguments),this.type="html",this.renderInstance=_F}readValueFromInstance(e,n){var i;if(hh.has(n))return(i=this.projection)!=null&&i.isProjecting?tA(n):Iq(e,n);{const r=pee(e),s=(P8(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return xF(e,n)}build(e,n,i){TT(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return bT(e,n,i)}}const gee={offset:"stroke-dashoffset",array:"stroke-dasharray"},vee={offset:"strokeDashoffset",array:"strokeDasharray"};function yee(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?gee:vee;t[s.offset]=`${-i}`,t[s.array]=`${e} ${n}`}const xee=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function wF(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(TT(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:p}=t;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox);for(const m of xee)f[m]!==void 0&&(p[m]=f[m],delete f[m]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),r!==void 0&&yee(f,r,s,o,!1)}const AF=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),MF=t=>typeof t=="string"&&t.toLowerCase()==="svg";function _ee(t,e,n,i){_F(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(AF.has(r)?r:xT(r),e.attrs[r])}function EF(t,e,n){const i=bT(t,e,n);for(const r in t)if(Xi(t[r])||Xi(e[r])){const s=fh.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=t[r]}return i}class See extends mF{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=oi}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(hh.has(n)){const i=rF(n);return i&&i.default||0}return n=AF.has(n)?n:xT(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return EF(e,n,i)}build(e,n,i){wF(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,r){_ee(e,n,i,r)}mount(e){this.isSVGTag=MF(e.tagName),super.mount(e)}}const wee=ET.length;function TF(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?TF(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<wee;n++){const i=ET[n],r=t.props[i];(Ip(r)||r===!1)&&(e[i]=r)}return e}function bF(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Aee=[...MT].reverse(),Mee=MT.length;function Eee(t){return e=>Promise.all(e.map(({animation:n,options:i})=>S$(t,n,i)))}function Tee(t){let e=Eee(t),n=ZP(),i=!0;const r=l=>(c,u)=>{var p;const f=Pf(t,u,l==="exit"?(p=t.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:m,transitionEnd:v,...w}=f;c={...c,...w,...v}}return c};function s(l){e=l(t)}function o(l){const{props:c}=t,u=TF(t.parent)||{},f=[],p=new Set;let m={},v=1/0;for(let x=0;x<Mee;x++){const g=Aee[x],_=n[g],y=c[g]!==void 0?c[g]:u[g],M=Ip(y),E=g===l?_.isActive:null;E===!1&&(v=x);let C=y===u[g]&&y!==c[g]&&M;if(C&&i&&t.manuallyAnimateOnMount&&(C=!1),_.protectedKeys={...m},!_.isActive&&E===null||!y&&!_.prevProp||Xy(y)||typeof y=="boolean")continue;if(g==="exit"&&_.isActive&&E!==!0){_.prevResolvedValues&&(m={...m,..._.prevResolvedValues});continue}const P=bee(_.prevProp,y);let N=P||g===l&&_.isActive&&!C&&M||x>v&&M,R=!1;const L=Array.isArray(y)?y:[y];let k=L.reduce(r(g),{});E===!1&&(k={});const{prevResolvedValues:$={}}=_,ee={...$,...k},D=Y=>{N=!0,p.has(Y)&&(R=!0,p.delete(Y)),_.needsAnimating[Y]=!0;const O=t.getValue(Y);O&&(O.liveStyle=!1)};for(const Y in ee){const O=k[Y],H=$[Y];if(m.hasOwnProperty(Y))continue;let W=!1;aA(O)&&aA(H)?W=!bF(O,H):W=O!==H,W?O!=null?D(Y):p.add(Y):O!==void 0&&p.has(Y)?D(Y):_.protectedKeys[Y]=!0}_.prevProp=y,_.prevResolvedValues=k,_.isActive&&(m={...m,...k}),i&&t.blockInitialAnimation&&(N=!1);const U=C&&P;N&&(!U||R)&&f.push(...L.map(Y=>{const O={type:g};if(typeof Y=="string"&&i&&!U&&t.manuallyAnimateOnMount&&t.parent){const{parent:H}=t,W=Pf(H,Y);if(H.enteringChildren&&W){const{delayChildren:j}=W.transition||{};O.delay=Y8(H.enteringChildren,t,j)}}return{animation:Y,options:O}}))}if(p.size){const x={};if(typeof c.initial!="boolean"){const g=Pf(t,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(x.transition=g.transition)}p.forEach(g=>{const _=t.getBaseTarget(g),y=t.getValue(g);y&&(y.liveStyle=!0),x[g]=_??null}),f.push({animation:x})}let w=!!f.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(w=!1),i=!1,w?e(f):Promise.resolve()}function a(l,c){var f;if(n[l].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const p in n)n[p].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ZP()}}}function bee(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!bF(e,t):!1}function Zl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ZP(){return{animate:Zl(!0),whileInView:Zl(),whileHover:Zl(),whileTap:Zl(),whileDrag:Zl(),whileFocus:Zl(),exit:Zl()}}function qP(t,e){t.min=e.min,t.max=e.max}function Ns(t,e){qP(t.x,e.x),qP(t.y,e.y)}function $P(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const CF=1e-4,Cee=1-CF,Ree=1+CF,RF=.01,Pee=0-RF,Bee=0+RF;function cr(t){return t.max-t.min}function Lee(t,e,n){return Math.abs(t-e)<=n}function e5(t,e,n,i=.5){t.origin=i,t.originPoint=Ln(e.min,e.max,t.origin),t.scale=cr(n)/cr(e),t.translate=Ln(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Cee&&t.scale<=Ree||isNaN(t.scale))&&(t.scale=1),(t.translate>=Pee&&t.translate<=Bee||isNaN(t.translate))&&(t.translate=0)}function kd(t,e,n,i){e5(t.x,e.x,n.x,i?i.originX:void 0),e5(t.y,e.y,n.y,i?i.originY:void 0)}function t5(t,e,n){t.min=n.min+e.min,t.max=t.min+cr(e)}function Iee(t,e,n){t5(t.x,e.x,n.x),t5(t.y,e.y,n.y)}function n5(t,e,n){t.min=e.min-n.min,t.max=t.min+cr(e)}function h1(t,e,n){n5(t.x,e.x,n.x),n5(t.y,e.y,n.y)}function i5(t,e,n,i,r){return t-=e,t=f1(t,1/n,i),r!==void 0&&(t=f1(t,1/r,i)),t}function Nee(t,e=0,n=1,i=.5,r,s=t,o=t){if(To.test(e)&&(e=parseFloat(e),e=Ln(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Ln(s.min,s.max,i);t===s&&(a-=e),t.min=i5(t.min,e,n,a,r),t.max=i5(t.max,e,n,a,r)}function r5(t,e,[n,i,r],s,o){Nee(t,e[n],e[i],e[r],e.scale,s,o)}const Dee=["x","scaleX","originX"],Fee=["y","scaleY","originY"];function s5(t,e,n,i){r5(t.x,e,Dee,n?n.x:void 0,i?i.x:void 0),r5(t.y,e,Fee,n?n.y:void 0,i?i.y:void 0)}function o5(t){return t.translate===0&&t.scale===1}function PF(t){return o5(t.x)&&o5(t.y)}function a5(t,e){return t.min===e.min&&t.max===e.max}function Oee(t,e){return a5(t.x,e.x)&&a5(t.y,e.y)}function l5(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function BF(t,e){return l5(t.x,e.x)&&l5(t.y,e.y)}function c5(t){return cr(t.x)/cr(t.y)}function u5(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function go(t){return[t("x"),t("y")]}function Uee(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:p,skewX:m,skewY:v}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),f&&(i+=`rotateX(${f}deg) `),p&&(i+=`rotateY(${p}deg) `),m&&(i+=`skewX(${m}deg) `),v&&(i+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const LF=["TopLeft","TopRight","BottomLeft","BottomRight"],kee=LF.length,f5=t=>typeof t=="string"?parseFloat(t):t,h5=t=>typeof t=="number"||st.test(t);function zee(t,e,n,i,r,s){r?(t.opacity=Ln(0,n.opacity??1,Hee(i)),t.opacityExit=Ln(e.opacity??1,0,Gee(i))):s&&(t.opacity=Ln(e.opacity??1,n.opacity??1,i));for(let o=0;o<kee;o++){const a=`border${LF[o]}Radius`;let l=d5(e,a),c=d5(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||h5(l)===h5(c)?(t[a]=Math.max(Ln(f5(l),f5(c),i),0),(To.test(c)||To.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Ln(e.rotate||0,n.rotate||0,i))}function d5(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Hee=IF(0,.5,M8),Gee=IF(.5,.95,ys);function IF(t,e,n){return i=>i<t?0:i>e?1:n(Pp(t,e,i))}function Vee(t,e,n){const i=Xi(t)?t:Vc(t);return i.start(vT("",i,e,n)),i.animation}function Np(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const jee=(t,e)=>t.depth-e.depth;class Wee{constructor(){this.children=[],this.isDirty=!1}add(e){iT(this.children,e),this.isDirty=!0}remove(e){o1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jee),this.isDirty=!1,this.children.forEac
3776h(e)}}function Xee(t,e){const n=lr.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(Sl(i),t(s-e))};return Sn.setup(i,!0),()=>Sl(i)}function pv(t){return Xi(t)?t.get():t}class Jee{constructor(){this.members=[]}add(e){iT(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const r=i.instance;r&&r.isConnected===!1&&i.isPresent!==!1&&!i.snapshot&&o1(this.members,i)}e.scheduleRender()}remove(e){if(o1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(r=>e===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const s=this.members[r],o=s.instance;if(s.isPresent!==!1&&(!o||o.isConnected!==!1)){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender();const r=i.options.layoutDependency,s=e.options.layoutDependency;if(!(r!==void 0&&s!==void 0&&r===s)){const l=i.instance;l&&l.isConnected===!1&&!i.snapshot||(e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:a}=e.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const mv={hasAnimatedSinceResize:!0,hasEverUpdated:!1},U2=["","X","Y","Z"],Kee=1e3;let Yee=0;function k2(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function NF(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=eF(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Sn,!(r||s))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&NF(i)}function DF({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Yee++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(qee),this.nodes.forEach(nte),this.nodes.forEach(ite),this.nodes.forEach($ee)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wee)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new rT),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=AT(o)&&!Z$(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const p=()=>this.root.updateBlockedByResize=!1;Sn.read(()=>{f=window.innerWidth}),t(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,u&&u(),u=Xee(p,250),mv.hasAnimatedSinceResize&&(mv.hasAnimatedSinceResize=!1,this.nodes.forEac
vendor: 9,266 bytes, line 3776
3776h(g5)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||lte,{onLayoutAnimationStart:w,onLayoutAnimationComplete:x}=c.getProps(),g=!this.targetLayout||!BF(this.targetLayout,m),_=!f&&p;if(this.options.layoutRoot||this.resumeFrom||_||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...gT(v,"layout"),onPlay:w,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,_)}else f||g5(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Sl(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rte),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&NF(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(p5);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(m5);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tte),this.nodes.forEach(Qee),this.nodes.forEach(Zee)):this.nodes.forEach(m5),this.clearAllSnapshots();const a=lr.now();Ti.delta=Bo(0,1e3/60,a-Ti.timestamp),Ti.timestamp=a,Ti.isProcessing=!0,P2.update.process(Ti),P2.preRender.process(Ti),P2.render.process(Ti),Ti.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ST.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ete),this.sharedNodes.forEach(ste)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Sn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Sn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!cr(this.snapshot.measuredBox.x)&&!cr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=oi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!PF(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||sc(this.latestValues)||u)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),cte(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return oi();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(ute))){const{scroll:u}=this.root;u&&(mf(a.x,u.offset.x),mf(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=oi();if(Ns(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:p}=u;u!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Ns(a,o),mf(a.x,f.offset.x),mf(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const l=oi();Ns(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&gf(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),sc(u.latestValues)&&gf(l,u.latestValues)}return sc(this.latestValues)&&gf(l,this.latestValues),l}removeTransform(o){const a=oi();Ns(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!sc(c.latestValues))continue;pA(c.latestValues)&&c.updateSnapshot();const u=oi(),f=c.measurePageBox();Ns(u,f),s5(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return sc(this.latestValues)&&s5(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ti.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=Ti.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=oi(),this.targetWithTransforms=oi()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Iee(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ns(this.target,this.layout.layoutBox),yF(this.target,this.targetDelta)):Ns(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pA(this.parent.latestValues)||vF(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=oi(),this.relativeTargetOrigin=oi(),h1(this.relativeTargetOrigin,a,l),Ns(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&
vendor: 5,307 bytes, line 3776
3776(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ti.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Ns(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;lee(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=oi());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($P(this.prevProjectionDelta.x,this.projectionDelta.x),$P(this.prevProjectionDelta.y,this.projectionDelta.y)),kd(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!u5(this.projectionDelta.x,this.prevProjectionDelta.x)||!u5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pf(),this.projectionDelta=pf(),this.projectionDeltaWithTransform=pf()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=pf();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=oi(),m=l?l.source:void 0,v=this.layout?this.layout.source:void 0,w=m!==v,x=this.getStack(),g=!x||x.members.length<=1,_=!!(w&&!g&&this.options.crossfade===!0&&!this.path.some(ate));this.animationProgress=0;let y;this.mixTargetDelta=M=>{const E=M/1e3;v5(f.x,o.x,E),v5(f.y,o.y,E),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(h1(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ote(this.relativeTarget,this.relativeTargetOrigin,p,E),y&&Oee(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=oi()),Ns(y,this.relativeTarget)),w&&(this.animationValues=u,zee(u,c,this.latestValues,E,_,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Sl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Sn.update(()=>{mv.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vc(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vee(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Kee),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&FF(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||oi();const f=cr(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const p=cr(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}Ns(a,l),gf(a,u),kd(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Jee),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 18,607 bytes, lines 3776-3784
3776resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&k2("z",o,c,this.animationValues);for(let u=0;u<U2.length;u++)k2(`rotate${U2[u]}`,o,c,this.animationValues),k2(`skew${U2[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=pv(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=pv(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!sc(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=Uee(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),o.transform=f;const{x:p,y:m}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in gA){if(u[v]===void 0)continue;const{correct:w,applyTo:x,isCSSVariable:g}=gA[v],_=f==="none"?u[v]:w(u[v],c);if(x){const y=x.length;for(let M=0;M<y;M++)o[x[M]]=_}else g?this.options.visualElement.renderState.vars[v]=_:o[v]=_}this.options.layoutId&&(o.pointerEvents=c===this?pv(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(p5),this.root.sharedNodes.clear()}}}function Qee(t){t.updateLayout()}function Zee(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;s==="size"?go(f=>{const p=o?e.measuredBox[f]:e.layoutBox[f],m=cr(p);p.min=i[f].min,p.max=p.min+m}):FF(s,e.layoutBox,i)&&go(f=>{const p=o?e.measuredBox[f]:e.layoutBox[f],m=cr(i[f]);p.max=p.min+m,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+m)});const a=pf();kd(a,i,e.layoutBox);const l=pf();o?kd(l,t.applyTransform(r,!0),e.measuredBox):kd(l,i,e.layoutBox);const c=!PF(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:m}=f;if(p&&m){const v=oi();h1(v,e.layoutBox,p.layoutBox);const w=oi();h1(w,i,m.layoutBox),BF(v,w)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function qee(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function $ee(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ete(t){t.clearSnapshot()}function p5(t){t.clearMeasurements()}function m5(t){t.isLayoutDirty=!1}function tte(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function g5(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nte(t){t.resolveTargetDelta()}function ite(t){t.calcProjection()}function rte(t){t.resetSkewAndRotation()}function ste(t){t.removeLeadSnapshot()}function v5(t,e,n){t.translate=Ln(e.translate,0,n),t.scale=Ln(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function y5(t,e,n,i){t.min=Ln(e.min,n.min,i),t.max=Ln(e.max,n.max,i)}function ote(t,e,n,i){y5(t.x,e.x,n.x,i),y5(t.y,e.y,n.y,i)}function ate(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lte={duration:.45,ease:[.4,0,.1,1]},x5=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),_5=x5("applewebkit/")&&!x5("chrome/")?Math.round:ys;function S5(t){t.min=_5(t.min),t.max=_5(t.max)}function cte(t){S5(t.x),S5(t.y)}function FF(t,e,n){return t==="position"||t==="preserve-aspect"&&!Lee(c5(e),c5(n),.2)}function ute(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const fte=DF({attachResizeListener:(t,e)=>Np(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),z2={current:void 0},OF=DF({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!z2.current){const t=new fte({});t.mount(window),t.setOptions({layoutScroll:!0}),z2.current=t}return z2.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ky=I.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function w5(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function hte(...t){return e=>{let n=!1;const i=t.map(r=>{const s=w5(r,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<i.length;r++){const s=i[r];typeof s=="function"?s():w5(t[r],null)}}}}function dte(...t){return I.useCallback(hte(...t),t)}class pte extends I.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,r=hA(i)&&i.offsetWidth||0,s=hA(i)&&i.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=r-o.width-o.left,o.bottom=s-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function mte({children:t,isPresent:e,anchorX:n,anchorY:i,root:r,pop:s}){var p;const o=I.useId(),a=I.useRef(null),l=I.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=I.useContext(Ky),u=((p=t.props)==null?void 0:p.ref)??(t==null?void 0:t.ref),f=dte(a,u);return I.useInsertionEffect(()=>{const{width:m,height:v,top:w,left:x,right:g,bottom:_}=l.current;if(e||s===!1||!a.current||!m||!v)return;const y=n==="left"?`left: ${x}`:`right: ${g}`,M=i==="bottom"?`bottom: ${_}`:`top: ${w}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");c&&(E.nonce=c);const C=r??document.head;return C.appendChild(E),E.sheet&&E.sheet.insertRule(`
3777          [data-motion-pop-id="${o}"] {
3778            position: absolute !important;
3779            width: ${m}px !important;
3780            height: ${v}px !important;
3781            ${y}px !important;
3782            ${M}px !important;
3783          }
3784        `),()=>{C.contains(E)&&C.removeChild(E)}},[e]),T.jsx(pte,{isPresent:e,childRef:a,sizeRef:l,pop:s,children:s===!1?t:I.cloneElement(t,{ref:f})})}const gte=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=jy(vte),f=I.useId();let p=!0,m=I.useMemo(()=>(p=!1,{id:f,initial:e,isPresent:n,custom:r,onExitComplete:v=>{u.set(v,!0);for(const w of u.values())if(!w)return;i&&i()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,i]);return s&&p&&(m={...m}),I.useMemo(()=>{u.forEach((v,w)=>u.set(w,!1))},[n]),I.useEffect(()=>{!n&&!u.size&&i&&i()},[n]),t=T.jsx(mte,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:t}),T.jsx(Wy.Provider,{value:m,children:t})};function vte(){return new Map}function UF(t=!0){const e=I.useContext(Wy);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,s=I.useId();I.useEffect(()=>{if(t)return r(s)},[t]);const o=I.useCallback(()=>t&&i&&i(s),[s,i,t]);return!n&&i?[!1,o]:[!0]}const Rg=t=>t.key||"";function A5(t){const e=[];return I.Children.forEach(t,n=>{I.isValidElement(n)&&e.push(n)}),e}const kF=({children:t,custom:e,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,f]=UF(o),p=I.useMemo(()=>A5(t),[t]),m=o&&!u?[]:p.map(Rg),v=I.useRef(!0),w=I.useRef(p),x=jy(()=>new Map),g=I.useRef(new Set),[_,y]=I.useState(p),[M,E]=I.useState(p);h8(()=>{v.current=!1,w.current=p;for(let N=0;N<M.length;N++){const R=Rg(M[N]);m.includes(R)?(x.delete(R),g.current.delete(R)):x.get(R)!==!0&&x.set(R,!1)}},[M,m.length,m.join("-")]);const C=[];if(p!==_){let N=[...p];for(let R=0;R<M.length;R++){const L=M[R],k=Rg(L);m.includes(k)||(N.splice(R,0,L),C.push(L))}return s==="wait"&&C.length&&(N=C),E(A5(N)),y(p),null}const{forceRender:P}=I.useContext(nT);return T.jsx(T.Fragment,{children:M.map(N=>{const R=Rg(N),L=o&&!u?!1:p===M||m.includes(R),k=()=>{if(g.current.has(R))return;if(g.current.add(R),x.has(R))x.set(R,!0);else return;let $=!0;x.forEach(ee=>{ee||($=!1)}),$&&(P==null||P(),E(w.current),o&&(f==null||f()),i&&i())};return T.jsx(gte,{isPresent:L,initial:!v.current||n?void 0:!1,custom:e,presenceAffectsLayout:r,mode:s,root:c,onExitComplete:L?void 0:k,anchorX:a,anchorY:l,children:N},R)})})},zF=I.createContext({strict:!1}),M5={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let E5=!1;function yte(){if(E5)return;const t={};for(const e in M5)t[e]={isEnabled:n=>M5[e].some(i=>!!n[i])};pF(t),E5=!0}function HF(){return yte(),ree()}function xte(t){const e=HF();for(const n in t)e[n]={...e[n],...t[n]};pF(e)}const _te=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function d1(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_te.has(t)}let GF=t=>!d1(t);function Ste(t){typeof t=="function"&&(GF=e=>e.startsWith("on")?!d1(e):t(e))}try{Ste(require("@emotion/is-prop-valid").default)}catch{}function wte(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(GF(r)||n===!0&&d1(r)||!e&&!d1(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}const Yy=I.createContext({});function Ate(t,e){if(Jy(t)){const{initial:n,animate:i}=t;return{initial:n===!1||Ip(n)?n:void 0,animate:Ip(i)?i:void 0}}return t.inherit!==!1?e:{}}function Mte(t){const{initial:e,animate:n}=Ate(t,I.useContext(Yy));return I.useMemo(()=>({initial:e,animate:n}),[T5(e),T5(n)])}function T5(t){return Array.isArray(t)?t.join(" "):t}const CT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function VF(t,e,n){for(const i in e)!Xi(e[i])&&!SF(i,n)&&(t[i]=e[i])}function Ete({transformTemplate:t},e){return I.useMemo(()=>{const n=CT();return TT(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Tte(t,e){const n=t.style||{},i={};return VF(i,n,t),Object.assign(i,Ete(t,e)),i}function bte(t,e){const n={},i=Tte(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const jF=()=>({...CT(),attrs:{}});function Cte(t,e,n,i){const r=I.useMemo(()=>{const s=jF();return wF(s,e,MF(i),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};VF(s,t.style,t),r.style={...s,...r.style}}return r}const Rte=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function RT(t){return typeof t!="string"||t.includes("-")?!1:!!(Rte.indexOf(t)>-1||/[A-Z]/u.test(t))}function Pte(t,e,n,{latestValues:i},r,s=!1,o){const l=(o??RT(t)?Cte:bte)(e,i,r,t),c=wte(e,typeof t=="string",s),u=t!==I.Fragment?{...c,...l,ref:n}:{},{children:f}=e,p=I.useMemo(()=>Xi(f)?f.get():f,[f]);return I.createElement(t,{...u,children:p})}function Bte({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:Lte(n,i,r,t),renderState:e()}}function Lte(t,e,n,i){const r={},s=i(t,{});for(const p in s)r[p]=pv(s[p]);let{initial:o,animate:a}=t;const l=Jy(t),c=hF(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;if(f&&typeof f!="boolean"&&!Xy(f)){const p=Array.isArray(f)?f:[f];for(let m=0;m<p.length;m++){const v=yT(t,p[m]);if(v){const{transitionEnd:w,transition:x,...g}=v;for(const _ in g){let y=g[_];if(Array.isArray(y)){const M=u?y.length-1:0;y=y[M]}y!==null&&(r[_]=y)}for(const _ in w)r[_]=w[_]}}}return r}const WF=t=>(e,n)=>{const i=I.useContext(Yy),r=I.useContext(Wy),s=()=>Bte(t,e,i,r);return n?s():jy(s)},Ite=WF({scrapeMotionValuesFromProps:bT,createRenderState:CT}),Nte=WF({scrapeMotionValuesFromProps:EF,createRenderState:jF}),Dte=Symbol.for("motionComponentSymbol");function Fte(t,e,n){const i=I.useRef(n);I.useInsertionEffect(()=>{i.current=n});const r=I.useRef(null);return I.useCallback(s=>{var a;s&&((a=t.onMount)==null||a.call(t,s)),e&&(s?e.mount(s):e.unmount());const o=i.current;if(typeof o=="function")if(s){const l=o(s);typeof l=="function"&&(r.current=l)}else r.current?(r.current(),r.current=null):o(s);else o&&(o.current=s)},[e])}const XF=I.createContext({});function Ku(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ote(t,e,n,i,r,s){var y,M;const{visualElement:o}=I.useContext(Yy),a=I.useContext(zF),l=I.useContext(Wy),c=I.useContext(Ky),u=c.reducedMotion,f=c.skipAnimations,p=I.useRef(null),m=I.useRef(!1);i=i||a.renderer,!p.current&&i&&(p.current=i(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:s}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const v=p.current,w=I.useContext(XF);v&&!v.projection&&r&&(v.type==="html"||v.type==="svg")&&Ute(p.current,n,r,w);const x=I.useRef(!1);I.useInsertionEffect(()=>{v&&x.current&&v.update(n,l)});const g=n[$8],_=I.useRef(!!g&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,g))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,g)));return h8(()=>{m.current=!0,v&&(x.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),_.current&&v.animationState&&v.animationState.animateChanges())}),I.useEffect(()=>{v&&(!_.current&&v.animationState&&v.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,g)}),_.current=!1),v.enteringChildren=void 0)}),v}function Ute(t,e,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:JF(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&Ku(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function JF(t){if(t)return t.options.allowProjection!==!1?t.projection:JF(t.parent)}function H2(t,{forwardMotionProps:e=!1,type:n}={},i,r){i&&xte(i);const s=n?n==="svg":RT(t),o=s?Nte:Ite;function a(c,u){let f;const p={...I.useContext(Ky),...c,layoutId:kte(c)},{isStatic:m}=p,v=Mte(c),w=o(c,m);if(!m&&f8){zte();const x=Hte(p);f=x.MeasureLayout,v.visualElement=Ote(t,w,p,r,x.ProjectionNode,s)}return T.jsxs(Yy.Provider,{value:v,children:[f&&v.visualElement?T.jsx(f,{visualElement:v.visualElement,...p}):null,Pte(t,c,Fte(w,v.visualElement,u),w,m,e,s)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=I.forwardRef(a);return l[Dte]=t,l}function kte({layoutId:t}){const e=I.useContext(nT).id;return e&&t!==void 0?e+"-"+t:t}function zte(t,e){I.useContext(zF).strict}function Hte(t){const e=HF(),{drag:n,layout:i}=e;if(!n&&!i)return{};const r={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(t)||i!=null&&i.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Gte(t,e){if(typeof Proxy>"u")return H2;const n=new Map,i=(s,o)=>H2(s,o,t,e),r=(s,o)=>i(s,o);return new Proxy(r,{get:(s,o)=>o==="create"?i:(n.has(o)||n.set(o,H2(o,void 0,t,e)),n.get(o))})}const Vte=(t,e)=>e.isSVG??RT(t)?new See(e):new mee(e,{allowProjection:t!==I.Fragment});class jte extends Pl{constructor(e){super(e),e.animationState||(e.animationState=Tee(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Xy(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Wte=0;class Xte extends Pl{constructor(){super(...arguments),this.id=Wte++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};
vendor: 18,473 bytes, line 3784
3784n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Jte={animation:{Feature:jte},exit:{Feature:Xte}};function mm(t){return{point:{x:t.pageX,y:t.pageY}}}const Kte=t=>e=>wT(e)&&t(e,mm(e));function zd(t,e,n,i){return Np(t,e,Kte(n),i)}const KF=({current:t})=>t?t.ownerDocument.defaultView:null,b5=(t,e)=>Math.abs(t-e);function Yte(t,e){const n=b5(t.x,e.x),i=b5(t.y,e.y);return Math.sqrt(n**2+i**2)}const C5=new Set(["auto","scroll"]);class YF{constructor(e,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=V2(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,w=Yte(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!w)return;const{point:x}=m,{timestamp:g}=Ti;this.history.push({...x,timestamp:g});const{onStart:_,onMove:y}=this.handlers;v||(_&&_(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,m)},this.handlePointerMove=(m,v)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=G2(v,this.transformPagePoint),Sn.update(this.updatePoint,!0)},this.handlePointerUp=(m,v)=>{this.end();const{onEnd:w,onSessionEnd:x,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=V2(m.type==="pointercancel"?this.lastMoveEventInfo:G2(v,this.transformPagePoint),this.history);this.startEvent&&w&&w(m,_),x&&x(m,_)},!wT(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=r||window;const l=mm(e),c=G2(l,this.transformPagePoint),{point:u}=c,{timestamp:f}=Ti;this.history=[{...u,timestamp:f}];const{onSessionStart:p}=n;p&&p(e,V2(c,this.history)),this.removeListeners=hm(zd(this.contextWindow,"pointermove",this.handlePointerMove),zd(this.contextWindow,"pointerup",this.handlePointerUp),zd(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const i=getComputedStyle(n);(C5.has(i.overflowX)||C5.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const i=e===window,r=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:r.x-n.x,y:r.y-n.y};s.x===0&&s.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,r),Sn.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Sl(this.updatePoint)}}function G2(t,e){return e?{point:e(t.point)}:t}function R5(t,e){return{x:t.x-e.x,y:t.y-e.y}}function V2({point:t},e){return{point:t,delta:R5(t,QF(e)),offset:R5(t,Qte(e)),velocity:Zte(e,.1)}}function Qte(t){return t[0]}function QF(t){return t[t.length-1]}function Zte(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=QF(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>xs(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&r.timestamp-i.timestamp>xs(e)*2&&(i=t[1]);const s=ps(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function qte(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?Ln(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?Ln(n,t,i.max):Math.min(t,n)),t}function P5(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function $te(t,{top:e,left:n,bottom:i,right:r}){return{x:P5(t.x,n,r),y:P5(t.y,e,i)}}function B5(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function ene(t,e){return{x:B5(t.x,e.x),y:B5(t.y,e.y)}}function tne(t,e){let n=.5;const i=cr(t),r=cr(e);return r>i?n=Pp(e.min,e.max-i,t.min):i>r&&(n=Pp(t.min,t.max-r,e.min)),Bo(0,1,n)}function nne(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const vA=.35;function ine(t=vA){return t===!1?t=0:t===!0&&(t=vA),{x:L5(t,"left","right"),y:L5(t,"top","bottom")}}function L5(t,e,n){return{min:I5(t,e),max:I5(t,n)}}function I5(t,e){return typeof t=="number"?t:t[e]||0}const rne=new WeakMap;class sne{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=oi(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=f=>{n&&this.snapToCursor(mm(f).point),this.stopAnimation()},o=(f,p)=>{const{drag:m,dragPropagation:v,onDragStart:w}=this.getProps();if(m&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=N$(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),go(g=>{let _=this.getAxisMotionValue(g).get()||0;if(To.test(_)){const{projection:y}=this.visualElement;if(y&&y.layout){const M=y.layout.layoutBox[g];M&&(_=cr(M)*(parseFloat(_)/100))}}this.originPoint[g]=_}),w&&Sn.update(()=>w(f,p),!1,!0),lA(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:v,onDirectionLock:w,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:g}=p;if(v&&this.currentDirection===null){this.currentDirection=ane(g),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",p.point,g),this.updateAxis("y",p.point,g),this.visualElement.render(),x&&Sn.update(()=>x(f,p),!1,!0)},l=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new YF(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:KF(this.visualElement),element:this.visualElement.current})}stop(e,n){const i=e||this.latestPointerEvent,r=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!i)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Sn.postRender(()=>a(i,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!Pg(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=qte(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,r=this.constraints;e&&Ku(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=$te(i.layoutBox,e):this.constraints=!1,this.elastic=ine(n),r!==this.constraints&&!Ku(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&go(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=nne(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ku(e))return!1;const i=e.current;Gc(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=cee(i,r.root,this.visualElement.getTransformPagePoint());let o=ene(r.layout.layoutBox,s);if(n){const a=n(oee(o));this.hasMutatedConstraints=!!a,a&&(o=gF(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=go(u=>{if(!Pg(u,n,this.currentDirection))return;let f=l&&l[u]||{};o&&(f={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,v={type:"inertia",velocity:i?e[u]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return lA(this.visualElement,e),i.start(vT(e,i,0,n,this.visualElement,!1))}stopAnimation(){go(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){go(n=>{const{drag:i}=this.getProps();if(!Pg(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[n],l=s.get()||0;s.set(e[n]-Ln(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ku(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};go(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=tne({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),go(o=>{if(!Pg(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Ln(l,c,r[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;rne.set(this.visualElement,this);const e=this.visualElement.current,n=zd(e,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps(),p=c.target,m=p!==e&&z$(p);u&&f&&!m&&this.start(c)});let i;const r=()=>{const{dragConstraints:c}=this.getProps();Ku(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),i||(i=one(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Sn.read(r);const a=Np(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(go(f=>{const p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=c[f].translate,p.set(p.get()+c[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=vA,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function N5(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function one(t,e,n){const i=HP(t,N5(n)),r=HP(e,N5(n));return()=>{i(),r()}}function Pg(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ane(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class lne extends Pl{constructor(e){super(e),this.removeGroupControls=ys,this.removeListeners=ys,this.controls=new sne(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ys}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const j2=t=>(e,n)=>{t&&Sn.update(()=>t(e,n),!1,!0)};class cne extends Pl{constructor(){super(...arguments),this.removePointerDownListener=ys}onPointerDown(e){this.session=new YF(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:KF(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:j2(e),onStart:j2(n),onMove:j2(i),onEnd:(s,o)=>{delete this.session,r&&Sn.postRender(()=>r(s,o))}}}mount(){this.removePointerDownListener=zd(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let W2=!1;class une extends I.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),W2&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),mv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,{projection:o}=i;return o&&(o.isPresent=s,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),W2=!0,r||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Sn.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ST.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;W2=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ZF(t){const[e,n]=UF(),i=I.useContext(nT);return T.jsx(une,{...t,layoutGroup:i,switchLayoutGroup:I.useContext(XF),isPresent:e,safeToRemove:n})}const fne={pan:{Feature:cne},drag:{Feature:lne,ProjectionNode:OF,MeasureLayout:ZF}};function D5(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=i[r];s&&Sn.postRender(()=>s(e,mm(e)))}class hne extends Pl{mount(){const{current:e}=this.node;e&&(this.unmount=F$(e,(n,i)=>(D5(this.node,i,"Start"),r=>D5(this.node,r,"End"))))}unmount(){}}class dne extends Pl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=hm(Np(this.node.current,"focus",()=>this.onFocus()),Np(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function F5(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=i[r];s&&Sn.postRender(()=>s(e,mm(e)))}class pne extends Pl{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=G$(e,(r,s)=>(F5(this.node,s,"Start"),(o,{success:a})=>F5(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const yA=new WeakMap,X2=new WeakMap,mne=t=>{const e=yA.get(t.target);e&&e(t)},gne=t=>{t.forEach(mne)};function vne({root:t,...e}){const n=t||document;X2.has(n)||X2.set(n,{});const i=X2.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(gne,{root:t,...e})),i[r]}function yne(t,e,n){const i=vne(e);return yA.set(t,n),i.observe(t),()=>{yA.delete(t),i.unobserve(t)}}const xne={some:0,all:1};class _ne extends Pl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:xne[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),p=c?u:f;p&&p(l)};return yne(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Sne(e,n))&&this.startObserver()}unmount(){}}function Sne({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const wne={inView:{Feature:_ne},tap:{Feature:pne},focus:{Feature:dne},hover:{Feature:hne}},Ane={layout:{ProjectionNode:OF,MeasureLayout:ZF}},Mne={...Jte,...wne,...fne,...Ane},Wi=Gte(Mne,Vte);function O5(t){const e=jy(()=>Vc(t)),{isStatic:n}=I.useContext(Ky);if(n){const[,i]=I.useState(t);I.useEffect(()=>
3784e.on("change",i),[])}return e}const J2=({text:t,link:e,btnText:n})=>T.jsxs("div",{className:"w-full max-w-[90vw] sm:max-w-md mx-auto bg-black/40 border border-white/10 rounded-2xl overflow-hidden backdrop-blur-sm shadow-2xl shadow-blue-900/20",children:[T.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-white/10 bg-white/5",children:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsxs("div",{className:"flex gap-1.5",children:[T.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/80"}),T.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500/80"}),T.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-500/80 animate-pulse"})]}),T.jsx("p",{className:"font-mono text-[10px] text-gray-400 tracking-widest ml-3",children:"VANGUARD // SYS_MSG"})]})}),T.jsxs("div",{className:"px-6 py-6 text-center",children:[T.jsx("p",{className:"font-medium sm:text-lg text-white mb-6 leading-relaxed",children:t}),T.jsxs("a",{href:e,onClick:i=>{i.preventDefault();const r=document.getElementById(e.substring(1));r&&r.scrollIntoView({behavior:"smooth"})},className:"inline-flex items-center justify-center gap-3 w-full sm:w-auto bg-white/5 hover:bg-white/10 text-blue-400 hover:text-blue-300 font-mono text-sm py-3 px-6 rounded-lg transition-all duration-300 border border-white/10 hover:border-blue-500/50 cursor-pointer group",children:[T.jsx("span",{className:"tracking-widest",children:n.toUpperCase()}),T.jsx("img",{src:tT,className:"w-3 h-3 object-contain opacity-70 group-hover:translate-x-1 transition-transform",alt:"arrow"})]})]})]}),Ene={1:T.jsxs("div",{className:"w-full max-w-[90vw] sm:max-w-2xl mx-auto bg-black/40 border border-white/10 rounded-2xl overflow-hidden backdrop-blur-sm shadow-[0_0_40px_rgba(59,130,246,0.15)]",children:[T.jsx("div",{className:"flex items-center justify-between px-5 py-3 border-b border-white/10 bg-white/5",children:T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("div",{className:"flex gap-1.5",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/80 animate-pulse"})]}),T.jsx("p",{className:"font-mono text-xs text-gray-400 tracking-widest ml-4 hidden sm:block",children:"VANGUARD OS v2.0 // PERSONNEL_FILE"}),T.jsx("p",{className:"font-mono text-[10px] text-gray-400 tracking-widest ml-2 sm:hidden",children:"VANGUARD // FILE"})]})}),T.jsxs("div",{className:"px-6 py-8 sm:px-10 sm:py-10 text-center flex flex-col items-center gap-6",children:[T.jsxs("h1",{className:"text-white font-semibold flex flex-col items-center gap-3",children:[T.jsx("span",{className:"font-mono text-sm tracking-[0.2em] text-gray-500",children:"IDENTIFICATION //"}),T.jsx("span",{className:"text-5xl md:text-6xl text-blue-400 font-bold tracking-tight",children:"Arnav Singh"}),T.jsxs("span",{className:"sm:text-lg sm:leading-snug mt-2 text-gray-300 max-w-lg",children:["A ",T.jsx("span",{className:"text-white font-medium",children:"Software Engineer"})," & ",T.jsx("span",{className:"text-white font-medium",children:"Physicist"})," from ",T.jsx("span",{className:"text-purple-400 font-medium",children:"Dartmouth"})]})]}),T.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 mt-4 w-full sm:w-auto",children:[T.jsxs("a",{href:"#projects",onClick:t=>{t.preventDefault();const e=document.getElementById("projects");e&&e.scrollIntoView({behavior:"smooth"})},className:"group flex items-center justify-center gap-3 bg-blue-600/20 border border-blue-500/30 hover:bg-blue-600 text-white font-mono text-sm px-6 py-3 mx-auto w-full sm:w-auto rounded-lg transition-all cursor-pointer",children:[T.jsx("span",{children:"EXPLORE_WORK"}),T.jsx("img",{src:tT,className:"w-4 h-4 object-contain brightness-200 group-hover:translate-x-1 transition-transform",alt:"arrow"})]}),T.jsxs("a",{href:"#contact",onClick:t=>{t.preventDefault();const e=document.getElementById("contact");e&&e.scrollIntoView({behavior:"smooth"})},className:"group flex items-center justify-center gap-3 bg-white/5 border border-white/10 hover:bg-white/10 text-gray-300 hover:text-white font-mono text-sm px-6 py-3 w-full sm:w-auto rounded-lg transition-all cursor-pointer",children:[T.jsx("span",{children:"VIEW_RESUME"}),T.jsx("span",{className:"text-lg leading-none group-hover:-translate-y-0.5 transition-transform",children:"↗"})]})]})]})]}),2:T.jsx(J2,{text:"I fuse my love for Physics, CS, and Math to build applications and simulations with real momentum.",link:"#about",btnText:"About me"}),3:T.jsx(J2,{text:"Led multiple projects at PlayStation, NASA, and more. Curious about the impact?",link:"#projects",btnText:"Visit my portfolio"}),4:T.jsx(J2,{text:"Need a project done or looking for a dev? I'm just a click away!",link:"#contact",btnText:"Let's talk"})},Tne=({currentStage:t})=>{const e=[1,2,3,4];return T.jsx(kF,{mode:"wait",children:t&&T.jsxs(Wi.div,{initial:{opacity:0,y:20,scale:.9}
3784,animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.9},transition:{duration:.3,ease:"easeOut"},className:"absolute top-28 left-0 right-0 flex justify-center items-center z-10 px-4",children:[Ene[t]||null,T.jsx("div",{className:"absolute -bottom-10 left-1/2 transform -translate-x-1/2 flex gap-2",children:e.map(n=>T.jsx("div",{className:`h-1.5 rounded transition-all duration-300 ${t===n?"bg-blue-500 w-8 shadow-[0_0_10px_rgba(59,130,246,0.8)]":"bg-white/20 hover:bg-white/40 w-4"}`},n))})]},t)})},bne=()=>{const[t,e]=I.useState(!1),[n,i]=I.useState(!1),r=O5(0),s=O5(0);return I.useEffect(()=>{if(!window.matchMedia("(pointer: fine)").matches)return;const a=p=>{r.set(p.clientX),s.set(p.clientY),n||i(!0)},l=()=>e(!0),c=()=>e(!1);window.addEventListener("mousemove",a);const u=document.querySelectorAll("a, button, .cursor-pointer");u.forEach(p=>{p.addEventListener("mouseenter",l),p.addEventListener("mouseleave",c)});const f=new MutationObserver(p=>{p.forEach(m=>{m.type==="childList"&&document.querySelectorAll("a, button, .cursor-pointer").forEach(w=>{w.removeEventListener("mouseenter",l),w.removeEventListener("mouseleave",c),w.addEventListener("mouseenter",l),w.addEventListener("mouseleave",c)})})});return f.observe(document.body,{childList:!0,subtree:!0}),()=>{window.removeEventListener("mousemove",a),u.forEach(p=>{p.removeEventListener("mouseenter",l),p.removeEventListener("mouseleave",c)}),f.disconnect()}},[n,r,s]),n?T.jsx(Wi.div,{className:"fixed top-0 left-0 pointer-events-none z-[9999] rounded-full mix-blend-difference",style:{x:r,y:s,translateX:"-50%",translateY:"-50%"},animate:{width:t?"60px":"12px",height:t?"60px":"12px",backgroundColor:t?"transparent":"white",border:t?"2px solid white":"0px solid transparent"},transition:{type:"tween",ease:"backOut",duration:.2}}):null},Cne="/assets/Lohengrin-d1c1ae7b.mp3",Rne=I.createContext(null);/**
3785 * postprocessing v6.38.3 build Thu Feb 19 2026
3786 * https://github.com/pmndrs/postprocessing
3787 * Copyright 2015-2026 Raoul van Rüschen
3788 * @license Zlib
3789 */var K2=1/1e3,Pne=1e3,Bne=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(e){typeof document<"u"&&document.hidden!==void 0&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return this._delta*K2}get fixedDelta(){return this._fixedDelta*K2}set fixedDelta(e){this._fixedDelta=e*Pne}get elapsed(){return this._elapsed*K2}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(e!==void 0?e:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(e){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},Lne=(()=>{const t=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),e=new Float32Array([0,0,2,0,0,2]),n=new Pt;return n.setAttribute("position",new Zt(t,3)),n.setAttribute("uv",new Zt(e,2)),n})(),Zi=class xA{static get fullscreenGeometry(){return Lne}constructor(e="Pass",n=new Mp,i=new vs){this.name=e,this.renderer=null,this.scene=n,this.camera=i,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){const n=this.fullscreenMaterial;n!==null&&(n.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(e){let n=this.screen;n!==null?n.material=e:(n=new ui(xA.fullscreenGeometry,e),n.frustumCulled=!1,this.scene===null&&(this.scene=new Mp),this.scene.add(n),this.screen=n)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e,n=Zs){}render(e,n,i,r,s){throw new Error("Render method not implemented!")}setSize(e,n){}initialize(e,n,i){}dispose(){for(const e of Object.keys(this)){const n=this[e];(n instanceof Fn||n instanceof Kn||n instanceof Mn||n instanceof xA)&&this[e].dispose()}this.fullscreenMaterial!==null&&this.fullscreenMaterial.dispose()}},Ine=class extends Zi{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(t,e,n,i,r){const s=t.state.buffers.stencil;s.setLocked(!1),s.setTest(!1)}},Nne=`#ifdef COLOR_WRITE
3790#include <common>
3791#include <dithering_pars_fragment>
3792#ifdef FRAMEBUFFER_PRECISION_HIGH
3793uniform mediump sampler2D inputBuffer;
3794#else
3795uniform lowp sampler2D inputBuffer;
3796#endif
3797#endif
3798#ifdef DEPTH_WRITE
3799#include <packing>
3800#ifdef GL_FRAGMENT_PRECISION_HIGH
3801uniform highp sampler2D depthBuffer;
3802#else
3803uniform mediump sampler2D depthBuffer;
3804#endif
3805float readDepth(const in vec2 uv){
3806#if DEPTH_PACKING == 3201
3807return unpackRGBAToDepth(texture2D(depthBuffer,uv));
3808#else
3809return texture2D(depthBuffer,uv).r;
3810#endif
3811}
3812#endif
3813#ifdef USE_WEIGHTS
3814uniform vec4 channelWeights;
3815#endif
3816uniform float opacity;varying vec2 vUv;void main(){
3817#ifdef COLOR_WRITE
3818vec4 texel=texture2D(inputBuffer,vUv);
3819#ifdef USE_WEIGHTS
3820texel*=channelWeights;
3821#endif
3822gl_FragColor=opacity*texel;
3823#ifdef COLOR_SPACE_CONVERSION
3824#include <colorspace_fragment>
3825#endif
3826#include <dithering_fragment>
3827#else
3828gl_FragColor=vec4(0.0);
3829#endif
3830#ifdef DEPTH_WRITE
3831gl_FragDepth=readDepth(vUv);
3832#endif
3833}`,PT="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",qF=class extends Yn{constructor(){super({name:"CopyMaterial",defines:{COLOR_SPACE_CONVERSION:"1",DEPTH_PACKING:"0",COLOR_WRITE:"1"},uniforms:{inputBuffer:new kt(null),depthBuffer:new kt(null),channelWeights:new kt(null),opacity:new kt(1)},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Nne,vertexShader:PT}),this.depthFunc=dy}get inputBuffer(){return this.uniforms.inputBuffer.value}set inputBuffer(t){const e=t!==null;this.colorWrite!==e&&(e?this.defines.COLOR_WRITE=!0:delete this.defines.COLOR_WRITE,this.colorWrite=e,this.needsUpdate=!0),this.uniforms.inputBuffer.value=t}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(t){const e=t!==null;this.depthWrite!==e&&(e?this.defines.DEPTH_WRITE=!0:delete this.defines.DEPTH_WRITE,this.depthTest=e,this.depthWrite=e,this.needsUpdate=!0),this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}get colorSpaceConversion(){return this.defines.COLOR_SPACE_CONVERSION!==void 0}set colorSpaceConversion(t){this.colorSpaceConversion!==t&&(t?this.defines.COLOR_SPACE_CONVERSION=!0:delete this.defines.COLOR_SPACE_CONVERSION,this.needsUpdate=!0)}get channelWeights(){return this.uniforms.channelWeights.value}set channelWeights(t){t!==null?(this.defines.USE_WEIGHTS="1",this.uniforms.channelWeights.value=t):delete this.defines.USE_WEIGHTS,this.needsUpdate=!0}setInputBuffer(t){this.uniforms.inputBuffer.value=t}getOpacity(t){return this.uniforms.opacity.value}setOpacity(t){this.uniforms.opacity.value=t}},Dne=class extends Zi{constructor(t,e=!0){super("CopyPass"),this.fullscreenMaterial=new qF,this.needsSwap=!1,this.renderTarget=t,t===void 0&&(this.renderTarget=new Fn(1,1,{minFilter:gn,magFilter:gn,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=e}get resize(){return this.autoResize}set resize(t){this.autoResize=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(t){this.autoResize=t}render(t,e,n,i,r){this.fullscreenMaterial.inputBuffer=e.texture,t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){this.autoResize&&this.renderTarget.setSize(t,e)}initialize(t,e,n){n!==void 0&&(this.renderTarget.texture.type=n,n!==Si?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":t
vendor: 10,566 bytes, line 3833
3833!==null&&t.outputColorSpace===jt&&(this.renderTarget.texture.colorSpace=jt))}},U5=new He,BT=class extends Zi{constructor(t=!0,e=!0,n=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=t,this.depth=e,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(t,e,n){this.color=t,this.depth=e,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(t){this.overrideClearColor=t}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(t){this.overrideClearAlpha=t}render(t,e,n,i,r){const s=this.overrideClearColor,o=this.overrideClearAlpha,a=t.getClearAlpha(),l=s!==null,c=o>=0;l?(t.getClearColor(U5),t.setClearColor(s,c?o:a)):c&&t.setClearAlpha(o),t.setRenderTarget(this.renderToScreen?null:e),t.clear(this.color,this.depth,this.stencil),l?t.setClearColor(U5,a):c&&t.setClearAlpha(a)}},Fne=class extends Zi{constructor(t,e){super("MaskPass",t,e),this.needsSwap=!1,this.clearPass=new BT(!1,!1,!0),this.inverse=!1}set mainScene(t){this.scene=t}set mainCamera(t){this.camera=t}get inverted(){return this.inverse}set inverted(t){this.inverse=t}get clear(){return this.clearPass.enabled}set clear(t){this.clearPass.enabled=t}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(t){this.inverted=t}render(t,e,n,i,r){const s=t.getContext(),o=t.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,u=this.inverted?0:1,f=1-u;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),o.stencil.setFunc(s.ALWAYS,u,4294967295),o.stencil.setClear(f),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(t,null):(c.render(t,e),c.render(t,n))),this.renderToScreen?(t.setRenderTarget(null),t.render(a,l)):(t.setRenderTarget(e),t.render(a,l),t.setRenderTarget(n),t.render(a,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(s.EQUAL,1,4294967295),o.stencil.setOp(s.KEEP,s.KEEP,s.KEEP),o.stencil.setLocked(!0)}},One=class{constructor(e=null,{depthBuffer:n=!0,stencilBuffer:i=!1,multisampling:r=0,frameBufferType:s}={}){this.renderer=null,this.inputBuffer=this.createBuffer(n,i,s,r),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new Dne,this.depthTexture=null,this.passes=[],this.timer=new Bne,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const n=this.inputBuffer,i=this.multisampling;i>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):i!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(n.depthBuffer,n.stencilBuffer,n.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){const n=e.getSize(new le),i=e.getContext().getContextAttributes().alpha,r=this.inputBuffer.texture.type;r===Si&&e.outputColorSpace===jt&&(this.inputBuffer.texture.colorSpace=jt,this.outputBuffer.texture.colorSpace=jt,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(n.width,n.height);for(const s of this.passes)s.initialize(e,i,r)}}replaceRenderer(e,n=!0){const i=this.renderer,r=i.domElement.parentNode;return this.setRenderer(e),n&&r!==null&&(r.removeChild(i.domElement),r.appendChild(e.domElement)),i}createDepthTexture(){const e=this.depthTexture=new ME;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=yl,e.type=ua):e.type=So,e}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,n,i,r){const s=this.renderer,o=s===null?new le:s.getDrawingBufferSize(new le),a={minFilter:gn,magFilter:gn,stencilBuffer:n,depthBuffer:e,type:i},l=new Fn(o.width,o.height,a);return r>0&&(l.samples=r),i===Si&&s!==null&&s.outputColorSpace===jt&&(l.texture.colorSpace=jt),l.texture.name="EffectComposer.Buffer",l.texture.generateMipmaps=!1,l}setMainScene(e){for(const n of this.passes)n.mainScene=e}setMainCamera(e){for(const n of this.passes)n.mainCamera=e}addPass(e,n){const i=this.passes,r=this.renderer,s=r.getDrawingBufferSize(new le),o=r.getContext().getContextAttributes().alpha,a=this.inputBuffer.texture.type;if(e.setRenderer(r),e.setSize(s.width,s.height),e.initialize(r,o,a),this.autoRenderToScreen&&(i.length>0&&(i[i.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),n!==void 0?i.splice(n,0,e):i.push(e),this.autoRenderToScreen&&(i[i.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const l=this.createDepthTexture();for(e of i)e.setDepthTexture(l)}else e.setDepthTexture(this.depthTexture)}removePass(e){const n=this.passes,i=n.indexOf(e);if(i!==-1&&n.splice(i,1).length>0){if(this.depthTexture!==null){const o=(l,c)=>l||c.needsDepthTexture;n.reduce(o,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&i===n.length&&(e.renderToScreen=!1,n.length>0&&(n[n.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const n=this.renderer,i=this.copyPass;let r=this.inputBuffer,s=this.outputBuffer,o=!1,a,l,c;e===void 0&&(this.timer.update(),e=this.timer.getDelta());for(const u of this.passes)u.enabled&&(u.render(n,r,s,e,o),u.needsSwap&&(o&&(i.renderToScreen=u.renderToScreen,a=n.getContext(),l=n.state.buffers.stencil,l.setFunc(a.NOTEQUAL,1,4294967295),i.render(n,r,s,e,o),l.setFunc(a.EQUAL,1,4294967295)),c=r,r=s,s=c),u instanceof Fne?o=!0:u instanceof Ine&&(o=!1))}setSize(e,n,i){const r=this.renderer,s=r.getSize(new le);(e===void 0||n===void 0)&&(e=s.width,n=s.height),(s.width!==e||s.height!==n)&&r.setSize(e,n,i);const o=r.getDrawingBufferSize(new le);this.inputBuffer.setSize(o.width,o.height),this.outputBuffer.setSize(o.width,o.height);for(const a of this.passes)a.setSize(o.width,o.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(const e of this.passes)e.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose(),Zi.fullscreenGeometry.dispose()}},bo={NONE:0,DEPTH:1,CONVOLUTION:2},sn={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},Une=class{constructor(){this.shaderParts=new Map([[sn.FRAGMENT_HEAD,null],[sn.FRAGMENT_MAIN_UV,null],[sn.FRAGMENT_MAIN_IMAGE,null],[sn.VERTEX_HEAD,null],[sn.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=bo.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=ws}},Y2=!1,k5=class{constructor(t=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(t),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let n;if(e.material.flatShading)switch(e.material.side){case ji:n=this.materialsFlatShadedDoubleSide;break;case ci:n=this.materialsFlatShadedBackSide;break;default:n=this.materialsFlatShaded;break}else switch(e.material.side){case ji:n=this.materialsDoubleSide;break;case ci:n=this.materialsBackSide;break;default:n=this.materials;break}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=n[2]:e.isInstancedMesh?e.material=n[1]:e.material=n[0],++this.meshCount}}}cloneMaterial(t){if(!(t instanceof Yn))return t.clone();const e=t.uniforms,n=new Map;for(const r in e){const s=e[r].value;s.isRenderTargetTexture&&(e[r].value=null,n.set(r,s))}const i=t.clone();for(const r of n)e[r[0]].value=r[1],i.uniforms[r[0]].value=r[1];return i}setMaterial(t){if(this.disposeMaterials(),this.material=t,t!==null){const e=this.materials=[this.cloneMaterial(t),this.cloneMaterial(t),this.cloneMaterial(t)];for(const n of e)n.uniforms=Object.assign({},t.uniforms),n.side=Qs;e[2].skinning=!0,this.materialsBackSide=e.map(n=>{const i=this.cloneMaterial(n);return i.uniforms=Object.assign({},t.uniforms),i.side=ci,i}),this.materialsDoubleSide=e.map(n=>{const i=this.cloneMaterial(n);return i.uniforms=Object.assign({},t.uniforms),i.side=ji,i}),this.materialsFlatShaded=e.map(n=>{const i=this.cloneMaterial(n);return i.uniforms=Object.assign({},t.uniforms),i.flatShading=!0,i}),this.materialsFlatShadedBackSide=e.map(n=>{const i=this.cloneMaterial(n);return i.uniforms=Object.assign({},t.uniforms),i.flatShading=!0,i.side=ci,i}),this.materialsFlatShadedDoubleSide=e.map(n=>{const i=this.cloneMaterial(n);return i.uniforms=Object.assign({},t.uniforms),i.flatShading=!0,i.side=ji,i})}}render(t,e,n){const i=t.shadowMap.enabled;if(t.shadowMap.enabled=!1,Y2){const r=this.originalMaterials;this.meshCount=0,e.traverse(this.replaceMaterial),t.render(e,n);for(const s of r)s[0].material=s[1];this.meshCount!==r.size&&r.clear()}else{const r=e.overrideMaterial;e.overrideMaterial=this.material,t.render(e,n),e.overrideMaterial=r}t.shadowMap.enabled=i}disposeMaterials(){if(this.material!==null){const t=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const e of t)e.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Y2}static set workaroundEnabled(t){Y2=t}},Ha=-1,fi=class extends As{constructor(t,e=Ha,n=Ha,i=1){super(),this.resizable=t,this.baseSize=new le(1,1),this.preferredSize=new le(e,n),this.target=this.preferredSize,this.s=i,this.effectiveSize=new le,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const t=this.baseSize,e=this.preferredSize,n=this.effectiveSize,i=this.scale;e.width!==Ha?n.width=e.width:e.height!==Ha?n.width=Math.round(e.height*(t.width/
vendor: 11,478 bytes, line 3833
3833Math.max(t.height,1))):n.width=Math.round(t.width*i),e.height!==Ha?n.height=e.height:e.width!==Ha?n.height=Math.round(e.width/Math.max(t.width/Math.max(t.height,1),1)):n.height=Math.round(t.height*i)}get width(){return this.effectiveSize.width}set width(t){this.preferredWidth=t}get height(){return this.effectiveSize.height}set height(t){this.preferredHeight=t}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(t){this.s!==t&&(this.s=t,this.preferredSize.setScalar(Ha),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(t){this.scale=t}get baseWidth(){return this.baseSize.width}set baseWidth(t){this.baseSize.width!==t&&(this.baseSize.width=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(t){this.baseWidth=t}get baseHeight(){return this.baseSize.height}set baseHeight(t){this.baseSize.height!==t&&(this.baseSize.height=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(t){this.baseHeight=t}setBaseSize(t,e){(this.baseSize.width!==t||this.baseSize.height!==e)&&(this.baseSize.set(t,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(t){this.preferredSize.width!==t&&(this.preferredSize.width=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(t){this.preferredWidth=t}get preferredHeight(){return this.preferredSize.height}set preferredHeight(t){this.preferredSize.height!==t&&(this.preferredSize.height=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(t){this.preferredHeight=t}setPreferredSize(t,e){(this.preferredSize.width!==t||this.preferredSize.height!==e)&&(this.preferredSize.set(t,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(t){this.s=t.scale,this.baseSize.set(t.baseWidth,t.baseHeight),this.preferredSize.set(t.preferredWidth,t.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return Ha}},kne=class{constructor(t=0){this.nextId=t}getNextId(){return this.nextId++}reset(t=0){return this.nextId=t,this}},Q2=new kne(2),zne=class extends Set{constructor(e,n=Q2.getNextId()){super(),this.exclusive=!1,this._layer=n,(this._layer<1||this._layer>31)&&(console.warn("Layer out of range, resetting to 2"),Q2.reset(2),this._layer=Q2.getNextId()),e!==void 0&&this.set(e)}get layer(){return this._layer}set layer(e){const n=this._layer;for(const i of this)i.layers.disable(n),i.layers.enable(e);this._layer=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){const e=this.layer;for(const n of this)n.layers.disable(e);return super.clear()}set(e){this.clear();for(const n of e)this.add(n);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let n;return this.has(e)?(this.delete(e),n=!1):(this.add(e),n=!0),n}setVisible(e){for(const n of this)e?n.layers.enable(0):n.layers.disable(0);return this}},Gt={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},Hne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Gne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,src.a*opacity);}",Vne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=(dst.rgb+src.rgb)*0.5;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",jne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.xy,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Wne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=mix(step(0.0,b)*(1.0-min(vec3(1.0),(1.0-a)/max(b,1e-9))),vec3(1.0),step(1.0,a));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Xne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=step(0.0,a)*mix(min(vec3(1.0),a/max(1.0-b,1e-9)),vec3(1.0),step(1.0,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Jne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Kne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=abs(dst.rgb-src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Yne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb/max(src.rgb,1e-9);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Qne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-2.0*dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",Zne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb,1.0);vec3 b=min(src.rgb,1.0);vec3 c=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",qne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=step(1.0,dst.rgb+src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",$ne="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.x,a.yz));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",eie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",tie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=src.rgb*max(1.0-dst.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",nie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",iie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",rie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb+src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",sie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(2.0*src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",oie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.xy,b.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",aie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",lie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-abs(1.0-dst.rgb-src.rgb),0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",cie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,opacity);}",uie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=2.0*src.rgb*dst.rgb;vec3 b=1.0-2.0*(1.0-src.rgb)*(1.0-dst.rgb);vec3 c=mix(a,b,step(0.5,dst.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",fie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 c=mix(mix(src2,dst.rgb,step(0.5*dst.rgb,src.rgb)),max(src2-1.0,vec3(0.0)),step(dst.rgb,src2-1.0));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",hie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb*dst.rgb/max(1.0-src.rgb,1e-9),1.0);vec3 c=mix(a,src.rgb,step(1.0,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",die="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.x,b.y,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",pie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-min(dst.rgb*src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",mie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 d=dst.rgb+(src2-1.0);vec3 w=step(0.5,src.rgb);vec3 a=dst.rgb-(1.0-src2)*dst.rgb*(1.0-dst.rgb);vec3 b=mix(d*(sqrt(dst.rgb)-dst.rgb),d*dst.rgb*((16.0*dst.rgb-12.0)*dst.rgb+3.0),w*(1.0-step(0.25,dst.rgb)));vec3 c=mix(a,b,w);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",gie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return src;}",vie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",yie="vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=mix(max(1.0-min((1.0-dst.rgb)/(2.0*src.rgb),1.0),0.0),min(dst.rgb/(2.0*(1.0-src.rgb)),1.0),step(0.5,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}",xie=new Map([[Gt.ADD,Hne],[Gt.ALPHA,Gne],[Gt.AVERAGE,Vne],[Gt.COLOR,jne],[Gt.COLOR_BURN,Wne],[Gt.COLOR_DODGE,Xne],[Gt.DARKEN,Jne],[Gt.DIFFERENCE,Kne],[Gt.DIVIDE,Yne],[Gt.DST,null],[Gt.EXCLUSION,Qne],[Gt.HARD_LIGHT,Zne],[Gt.HARD_MIX,qne],[Gt.HUE,$ne],[Gt.INVERT,eie],[Gt.INVERT_RGB,tie],[Gt.LIGHTEN,nie],[Gt.LINEAR_BURN,iie],[Gt.LINEAR_DODGE,rie],[Gt.LINEAR_LIGHT,sie],[Gt.LUMINOSITY,oie],[Gt.MULTIPLY,aie],[Gt.NEGATION,lie],[Gt.NORMAL,cie],[Gt.OVERLAY,uie],[Gt.PIN_LIGHT,fie],[Gt.REFLECT,hie],[Gt.SATURATION,die],[Gt.SCREEN,pie],[Gt.SOFT_LIGHT,mie],[Gt.SRC,gie],[Gt.SUBTRACT,vie],[Gt.VIVID_LIGHT,yie]]),_ie=class extends As{constructor(t,e=1){super(),this._blendFunction=t,this.opacity=new kt(e)}getOpacity(){return this.opacity.value}setOpacity(t){this.opacity.value=t}get blendFunction(){return this._blendFunction}set blendFunction(t){this._blendFunction=t,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(t){this.blendFunction=t}getShaderCode(){return xie.get(this.blendFunction)}},_A=class extends As{constructor(t,e,{attributes:n=bo.NONE,blendFunction:i=Gt.NORMAL,defines:r=new Map,uniforms:s=new Map,extensions:o=null,vertexShader:a=null}={}){super(),this.name=t,this.renderer=null,this.attributes=n,this.fragmentShader=e,this.vertexShader=a,this.defines=r,this.uniforms=s,this.extensions=o,this.blendMode=new _ie(i),this.blendMode.addEventListener("change",l=>
vendor: 10,535 bytes, lines 3833-3871
3833this.setChanged()),this._inputColorSpace=ws,this._outputColorSpace=ar}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(t){this._inputColorSpace=t,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t,this.setChanged()}set mainScene(t){}set mainCamera(t){}getName(){return this.name}setRenderer(t){this.renderer=t}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(t){this.attributes=t,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(t){this.fragmentShader=t,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(t){this.vertexShader=t,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(t,e=Zs){}update(t,e,n){}setSize(t,e){}initialize(t,e,n){}dispose(){for(const t of Object.keys(this)){const e=this[t];(e instanceof Fn||e instanceof Kn||e instanceof Mn||e instanceof Zi)&&this[t].dispose()}}},LT={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},Sie=`#ifdef FRAMEBUFFER_PRECISION_HIGH
3834uniform mediump sampler2D inputBuffer;
3835#else
3836uniform lowp sampler2D inputBuffer;
3837#endif
3838varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;
3839#include <colorspace_fragment>
3840}`,wie="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",Aie=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],Mie=class extends Yn{constructor(t=new on){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new kt(null),texelSize:new kt(new on),scale:new kt(1),kernel:new kt(0)},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Sie,vertexShader:wie}),this.setTexelSize(t.x,t.y),this.kernelSize=LT.MEDIUM}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.inputBuffer=t}get kernelSequence(){return Aie[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(t){this.uniforms.scale.value=t}getScale(){return this.uniforms.scale.value}setScale(t){this.uniforms.scale.value=t}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(t){this.uniforms.kernel.value=t}setKernel(t){this.kernel=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e,t*.5,e*.5)}setSize(t,e){const n=1/t,i=1/e;this.uniforms.texelSize.value.set(n,i,n*.5,i*.5)}},Eie=class extends Zi{constructor({kernelSize:t=LT.MEDIUM,resolutionScale:e=.5,width:n=fi.AUTO_SIZE,height:i=fi.AUTO_SIZE,resolutionX:r=n,resolutionY:s=i}={}){super("KawaseBlurPass"),this.renderTargetA=new Fn(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new fi(this,r,s,e);o.addEventListener("change",a=>this.setSize(o.baseWidth,o.baseHeight)),this._blurMaterial=new Mie,this._blurMaterial.kernelSize=t,this.copyMaterial=new qF}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(t){this._blurMaterial=t}get dithering(){return this.copyMaterial.dithering}set dithering(t){this.copyMaterial.dithering=t}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(t){this.blurMaterial.kernelSize=t}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get scale(){return this.blurMaterial.scale}set scale(t){this.blurMaterial.scale=t}getScale(){return this.blurMaterial.scale}setScale(t){this.blurMaterial.scale=t}getKernelSize(){return this.kernelSize}setKernelSize(t){this.kernelSize=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,i,r){const s=this.scene,o=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,u=c.kernelSequence;let f=e;this.fullscreenMaterial=c;for(let p=0,m=u.length;p<m;++p){const v=p&1?l:a;c.kernel=u[p],c.inputBuffer=f.texture,t.setRenderTarget(v),t.render(s,o),f=v}this.fullscreenMaterial=this.copyMaterial,this.copyMaterial.inputBuffer=f.texture,t.setRenderTarget(this.renderToScreen?null:n),t.render(s,o)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e);const i=n.width,r=n.height;this.renderTargetA.setSize(i,r),this.renderTargetB.setSize(i,r),this.blurMaterial.setSize(t,e)}initialize(t,e,n){n!==void 0&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,n!==Si?(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1"):t!==null&&t.outputColorSpace===jt&&(this.renderTargetA.texture.colorSpace=jt,this.renderTargetB.texture.colorSpace=jt))}static get AUTO_SIZE(){return fi.AUTO_SIZE}},Tie=`#include <common>
3841#ifdef FRAMEBUFFER_PRECISION_HIGH
3842uniform mediump sampler2D inputBuffer;
3843#else
3844uniform lowp sampler2D inputBuffer;
3845#endif
3846#ifdef RANGE
3847uniform vec2 range;
3848#elif defined(THRESHOLD)
3849uniform float threshold;uniform float smoothing;
3850#endif
3851varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);float mask=1.0;
3852#ifdef RANGE
3853float low=step(range.x,l);float high=step(l,range.y);mask=low*high;
3854#elif defined(THRESHOLD)
3855mask=smoothstep(threshold,threshold+smoothing,l);
3856#endif
3857#ifdef COLOR
3858gl_FragColor=texel*mask;
3859#else
3860gl_FragColor=vec4(l*mask);
3861#endif
3862}`,bie=class extends Yn{constructor(t=!1,e=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:Tl.replace(/\D+/g,"")},uniforms:{inputBuffer:new kt(null),threshold:new kt(0),smoothing:new kt(1),range:new kt(null)},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Tie,vertexShader:PT}),this.colorOutput=t,this.luminanceRange=e}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get threshold(){return this.uniforms.threshold.value}set threshold(t){this.smoothing>0||t>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=t}getThreshold(){return this.threshold}setThreshold(t){this.threshold=t}get smoothing(){return this.uniforms.smoothing.value}set smoothing(t){this.threshold>0||t>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=t}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(t){this.smoothing=t}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(t){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(t){t?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(t){return this.colorOutput}setColorOutputEnabled(t){this.colorOutput=t}get useRange(){return this.luminanceRange!==null}set useRange(t){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(t){t!==null?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=t,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(t){this.luminanceRange=t}},Cie=class extends Zi{constructor({renderTarget:t,luminanceRange:e,colorOutput:n,resolutionScale:i=1,width:r=fi.AUTO_SIZE,height:s=fi.AUTO_SIZE,resolutionX:o=r,resolutionY:a=s}={}){super("LuminancePass"),this.fullscreenMaterial=new bie(n,e),this.needsSwap=!1,this.renderTarget=t,this.renderTarget===void 0&&(this.renderTarget=new Fn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new fi(this,o,a,i);l.addEventListener("change",c=>this.setSize(l.baseWidth,l.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(t,e,n,i,r){const s=this.fullscreenMaterial;s.inputBuffer=e.texture,t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}initialize(t,e,n){n!==void 0&&n!==Si&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Rie=`#ifdef FRAMEBUFFER_PRECISION_HIGH
3863uniform mediump sampler2D inputBuffer;
3864#else
3865uniform lowp sampler2D inputBuffer;
3866#endif
3867#define WEIGHT_INNER 0.125
3868#define WEIGHT_OUTER 0.05556
3869varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;
3870#include <colorspace_fragment>
3871}`,Pie="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;
3871vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}",Bie=class extends Yn{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new kt(null),texelSize:new kt(new le)},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Rie,vertexShader:Pie})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},Lie=`#ifdef FRAMEBUFFER_PRECISION_HIGH
3872uniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;
3873#else
3874uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;
3875#endif
3876uniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);
3877#include <colorspace_fragment>
3878}`,Iie="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",Nie=class extends Yn{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new kt(null),supportBuffer:new kt(null),texelSize:new kt(new le),radius:new kt(.85)},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Lie,vertexShader:Iie})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}set supportBuffer(t){this.uniforms.supportBuffer.value=t}get radius(){return this.uniforms.radius.value}set radius(t){this.uniforms.radius.value=t}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},Die=class extends Zi{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new Fn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new Bie,this.upsamplingMaterial=new Nie,this.resolution=new le}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(t){if(this.levels!==t){const e=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n<t;++n){const i=e.clone();i.texture.name="Downsampling.Mipmap"+n,this.downsamplingMipmaps.push(i)}this.upsamplingMipmaps.push(e);for(let n=1,i=t-1;n<i;++n){const r=e.clone();r.texture.name="Upsampling.Mipmap"+n,this.upsamplingMipmaps.push(r)}this.setSize(this.resolution.x,this.resolution.y)}}get radius(){return this.upsamplingMaterial.radius}set radius(t){this.upsamplingMaterial.radius=t}render(t,e,n,i,r){const{scene:s,camera:o}=this,{downsamplingMaterial:a,upsamplingMaterial:l}=this,{downsamplingMipmaps:c,upsamplingMipmaps:u}=this;let f=e;this.fullscreenMaterial=a;for(let p=0,m=c.length;p<m;++p){const v=c[p];a.setSize(f.width,f.height),a.inputBuffer=f.texture,t.setRenderTarget(v),t.render(s,o),f=v}this.fullscreenMaterial=l;for(let p=u.length-1;p>=0;--p){const m=u[p];l.setSize(f.width,f.height),l.inputBuffer=f.texture,l.supportBuffer=c[p].texture,t.setRenderTarget(m),t.render(s,o),f=m}}setSize(t,e){const n=this.resolution;n.set(t,e);let i=n.width,r=n.height;for(let s=0,o=this.downsamplingMipmaps.length;s<o;++s)i=Math.round(i*.5),r=Math.round(r*.5),this.downsamplingMipmaps[s].setSize(i,r),s<this.upsamplingMipmaps.length&&this.upsamplingMipmaps[s].setSize(i,r)}initialize(t,e,n){if(n!==void 0){const i=this.downsamplingMipmaps.concat(this.upsamplingMipmaps);for(const r of i)r.texture.type=n;if(n!==Si)this.downsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.upsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1";
3878else if(t!==null&&t.outputColorSpace===jt)for(const r of i)r.texture.colorSpace=jt}}dispose(){super.dispose();for(const t of this.downsamplingMipmaps.concat(this.upsamplingMipmaps))t.dispose()}},Fie=`#ifdef FRAMEBUFFER_PRECISION_HIGH
3879uniform mediump sampler2D map;
3880#else
3881uniform lowp sampler2D map;
3882#endif
3883uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}`,Oie=class extends _A{constructor({blendFunction:t=Gt.SCREEN,luminanceThreshold:e=1,luminanceSmoothing:n=.03,mipmapBlur:i=!0,intensity:r=1,radius:s=.85,levels:o=8,kernelSize:a=LT.LARGE,resolutionScale:l=.5,width:c=fi.AUTO_SIZE,height:u=fi.AUTO_SIZE,resolutionX:f=c,resolutionY:p=u}={}){super("BloomEffect",Fie,{blendFunction:t,uniforms:new Map([["map",new kt(null)],["intensity",new kt(r)]])}),this.renderTarget=new Fn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new Eie({kernelSize:a}),this.luminancePass=new Cie({colorOutput:!0}),this.luminanceMaterial.threshold=e,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new Die,this.mipmapBlurPass.enabled=i,this.mipmapBlurPass.radius=s,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=i?this.mipmapBlurPass.texture:this.renderTarget.texture;const m=this.resolution=new fi(this,f,p,l);m.addEventListener("change",v=>this.setSize(m.baseWidth,m.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get dithering(){return this.blurPass.dithering}set dithering(t){this.blurPass.dithering=t}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(t){this.blurPass.kernelSize=t}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(t){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(t){this.uniforms.get("intensity").value=t}getIntensity(){return this.intensity}setIntensity(t){this.intensity=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}update(t,e,n){const i=this.renderTarget,r=this.luminancePass;r.enabled?(r.render(t,e),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(t,r.renderTarget):this.blurPass.render(t,r.renderTarget,i)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(t,e):this.blurPass.render(t,e,i)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(t,e),this.mipmapBlurPass.setSize(t,e)}initialize(t,e,n){this.blurPass.initialize(t,e,n),this.luminancePass.initialize(t,e,n),this.mipmapBlurPass.initialize(t,e,n),n!==void 0&&(this.renderTarget.texture.type=n,t!==null&&t.outputColorSpace===jt&&(this.renderTarget.texture.colorSpace=jt))}},Uie=class extends Zi{constructor(t,e="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=t,this.input=e}setInput(t){this.input=t}render(t,e,n,i,r){const s=this.fullscreenMaterial.uniforms;e!==null&&s!==void 0&&s[this.input]!==void 0&&(s[this.input].value=e.texture),t.setRenderTarget(this.renderToScreen?null:n),t.render(this.scene,this.camera)}initialize(t,e,n){n!==void 0&&n!==Si&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},IT=class extends Zi{constructor(t,e,n=null){super("RenderPass",t,e),this.needsSwap=!1,this.clearPass=new BT,this.overrideMaterialManager=n===null?null:new k5(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(t){this.scene=t}set mainCamera(t){this.camera=t}get renderToScreen(){return super.renderToScreen}set renderToScreen(t){super.renderToScreen=t,this.clearPass.renderToScreen=t}get overrideMaterial(){const t=this.overrideMaterialManager;return t!==null?t.material:null}set overrideMaterial(t){const e=this.overrideMaterialManager;t!==null?e!==null?e.setMaterial(t):this.overrideMaterialManager=new k5(t):e!==null&&(e.dis
3883pose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(t){this.overrideMaterial=t}get clear(){return this.clearPass.enabled}set clear(t){this.clearPass.enabled=t}getSelection(){return this.selection}setSelection(t){this.selection=t}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(t){this.ignoreBackground=t}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(t){this.skipShadowMapUpdate=t}getClearPass(){return this.clearPass}render(t,e,n,i,r){const s=this.scene,o=this.camera,a=this.selection,l=o.layers.mask,c=s.background,u=t.shadowMap.autoUpdate,f=this.renderToScreen?null:e;a!==null&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(t.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(s.background=null),this.clearPass.enabled&&this.clearPass.render(t,e),t.setRenderTarget(f),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(t,s,o):t.render(s,o),o.layers.mask=l,s.background=c,t.shadowMap.autoUpdate=u}},Hd={DEFAULT:0,KEEP_MAX_DEPTH:1,DISCARD_MAX_DEPTH:2},kie=class extends Zi{constructor(t,e,{renderTarget:n,resolutionScale:i=1,width:r=fi.AUTO_SIZE,height:s=fi.AUTO_SIZE,resolutionX:o=r,resolutionY:a=s}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new IT(t,e,new My({depthPacking:xy}));const l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0,this.renderTarget=n,this.renderTarget===void 0&&(this.renderTarget=new Fn(1,1,{minFilter:fn,magFilter:fn}),this.renderTarget.texture.name="DepthPass.Target");const c=this.resolution=new fi(this,o,a,i);c.addEventListener("change",u=>this.setSize(c.baseWidth,c.baseHeight))}set mainScene(t){this.renderPass.mainScene=t}set mainCamera(t){this.renderPass.mainCamera=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,i,r){const s=this.renderToScreen?null:this.renderTarget;this.renderPass.render(t,s)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}initialize(t,e,n){const i=t.capabilities.reversedDepthBuffer?0:16777215,r=this.renderPass.clearPass;r.overrideClearColor=new He(i),r.overrideClearAlpha=1}},zie=`#include <common>
3884#include <packing>
3885#ifdef GL_FRAGMENT_PRECISION_HIGH
3886uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1;
3887#else
3888uniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1;
3889#endif
3890uniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){
3891#ifdef PERSPECTIVE_CAMERA
3892return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);
3893#else
3894return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);
3895#endif
3896}varying vec2 vUv;void main(){vec2 depth;
3897#if DEPTH_PACKING_0 == 3201
3898depth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv));
3899#else
3900depth.x=texture2D(depthBuffer0,vUv).r;
3901#endif
3902#if DEPTH_PACKING_1 == 3201
3903depth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv));
3904#else
3905depth.y=texture2D(depthBuffer1,vUv).r;
3906#endif
3907#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
3908float a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);float c=log2(cameraNearFar.y+1.0);float d=pow(2.0,depth.x*c)-1.0;depth.x=a+b/d;d=pow(2.0,depth.y*c)-1.0;depth.y=a+b/d;
3909#elif defined(USE_REVERSED_DEPTH_BUFFER)
3910depth.x=1.0-depth.x;depth.y=1.0-depth.y;
3911#endif
3912bool isMaxDepth=(depth.x==1.0);
3913#ifdef PERSPECTIVE_CAMERA
3914depth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y);
3915#endif
3916#if DEPTH_TEST_STRATEGY == 0
3917bool keep=depthTest(depth.x,depth.y);
3918#elif DEPTH_TEST_STRATEGY == 1
3919bool keep=isMaxDepth||depthTest(depth.x,depth.y);
3920#else
3921bool keep=!isMaxDepth&&depthTest(depth.x,depth.y);
3922#endif
3923if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,Hie=class extends Yn{constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:Hd.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new kt(null),depthBuffer0:new kt(null),depthBuffer1:new kt(null),cameraNearFar:new kt(new le(1,1))},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:zie,vertexShader:PT}),this.depthMode=Qv}set depthBuffer0(t){this.uniforms.depthBuffer0.value=t}set depthPacking0(t){this.defines.DEPTH_PACKING_0=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(t,e=Zs){this.depthBuffer0=t,this.depthPacking0=e}set depthBuffer1(t){this.uniforms.depthBuffer1.value=t}set depthPacking1(t){this.defines.DEPTH_PACKING_1=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(t,e=Zs){this.depthBuffer1=t,this.depthPacking1=e}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(t){this.defines.DEPTH_TEST_STRATEGY=t.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(t){this.maxDepthStrategy=t?Hd.KEEP_MAX_DEPTH:Hd.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(t){this.maxDepthStrategy=t}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(t){this.defines.DEPTH_EPSILON=t.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(t){this.epsilon=t}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(t){let e;switch(t){case rE:e="false";break;case dy:e="true";break;case dp:e="abs(d1 - d0) <= DEPTH_EPSILON";break;case py:e="abs(d1 - d0) > DEPTH_EPSILON";break;case Qv:e="d0 > d1";break;case hp:e="d0 >= d1";break;case sE:e="d0 <= d1";break;case oE:default:e="d0 < d1";break}this.defines.DEPTH_MODE=t.toFixed(0),this.defines["depthTest(d0, d1)"]=e,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(t){this.depthMode=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNearFar.value.set(t.near,t.far),t instanceof xn?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}}
vendor: 9,276 bytes, lines 3923-3983
3923,Gie=class extends Oie{constructor(t,e,n){super(n),this.setAttributes(this.getAttributes()|bo.DEPTH),this.camera=e,this.depthPass=new kie(t,e),this.clearPass=new BT(!0,!1,!1),this.clearPass.overrideClearColor=new He(0),this.depthMaskPass=new Uie(new Hie);const i=this.depthMaskMaterial;i.copyCameraSettings(e),i.depthBuffer1=this.depthPass.texture,i.depthPacking1=xy,i.depthMode=dp,this.renderTargetMasked=new Fn(1,1,{depthBuffer:!1}),this.renderTargetMasked.texture.name="Bloom.Masked",this.selection=new zne,this._inverted=!1,this._ignoreBackground=!1}set mainScene(t){this.depthPass.mainScene=t}set mainCamera(t){this.camera=t,this.depthPass.mainCamera=t,this.depthMaskMaterial.copyCameraSettings(t)}getSelection(){return this.selection}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get inverted(){return this._inverted}set inverted(t){this._inverted=t,this.depthMaskMaterial.depthMode=t?py:dp}isInverted(){return this.inverted}setInverted(t){this.inverted=t}get ignoreBackground(){return this._ignoreBackground}set ignoreBackground(t){this._ignoreBackground=t,this.depthMaskMaterial.maxDepthStrategy=t?Hd.DISCARD_MAX_DEPTH:Hd.KEEP_MAX_DEPTH}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(t){this.ignoreBackground=t}setDepthTexture(t,e=Zs){this.depthMaskMaterial.depthBuffer0=t,this.depthMaskMaterial.depthPacking0=e}update(t,e,n){const i=this.camera,r=this.selection,s=this.inverted;let o=e;if(this.ignoreBackground||!s||r.size>0){const a=i.layers.mask;i.layers.set(r.layer),this.depthPass.render(t),i.layers.mask=a,o=this.renderTargetMasked,this.clearPass.render(t,o),this.depthMaskPass.render(t,e,o)}super.update(t,o,n)}setSize(t,e){super.setSize(t,e),this.renderTargetMasked.setSize(t,e),this.depthPass.setSize(t,e)}initialize(t,e,n){super.initialize(t,e,n),this.clearPass.initialize(t,e,n),this.depthPass.initialize(t,e,n),this.depthMaskPass.initialize(t,e,n),t!==null&&t.capabilities.logarithmicDepthBuffer&&(this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH="1"),n!==void 0&&(this.renderTargetMasked.texture.type=n,t!==null&&t.outputColorSpace===jt&&(this.renderTargetMasked.texture.colorSpace=jt))}},Vie=`#include <packing>
3924#ifdef GL_FRAGMENT_PRECISION_HIGH
3925uniform highp sampler2D depthBuffer;
3926#else
3927uniform mediump sampler2D depthBuffer;
3928#endif
3929#ifdef DOWNSAMPLE_NORMALS
3930uniform lowp sampler2D normalBuffer;
3931#endif
3932varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){
3933#if DEPTH_PACKING == 3201
3934return unpackRGBAToDepth(texture2D(depthBuffer,uv));
3935#else
3936return texture2D(depthBuffer,uv).r;
3937#endif
3938}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]<maxDistance){remaining[j++]=i;}else{rejected[k++]=i;}}for(;j<3;++j){remaining[j]=rejected[--k];}vec3 s=vec3(samples[remaining[0]],samples[remaining[1]],samples[remaining[2]]);c=(s.x+s.y+s.z)/3.0;distances[0]=abs(c-s.x);distances[1]=abs(c-s.y);distances[2]=abs(c-s.z);float minDistance=min(distances[0],min(distances[1],distances[2]));for(i=0;i<3;++i){if(distances[i]==minDistance){break;}}return remaining[i];}void main(){float d[4];d[0]=readDepth(vUv0);d[1]=readDepth(vUv1);d[2]=readDepth(vUv2);d[3]=readDepth(vUv3);int index=findBestDepth(d);
3939#ifdef DOWNSAMPLE_NORMALS
3940vec3 n[4];n[0]=texture2D(normalBuffer,vUv0).rgb;n[1]=texture2D(normalBuffer,vUv1).rgb;n[2]=texture2D(normalBuffer,vUv2).rgb;n[3]=texture2D(normalBuffer,vUv3).rgb;
3941#else
3942vec3 n[4];n[0]=vec3(0.0);n[1]=vec3(0.0);n[2]=vec3(0.0);n[3]=vec3(0.0);
3943#endif
3944gl_FragColor=vec4(n[index],d[index]);}`,jie="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}",Wie=class extends Yn{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new kt(null),normalBuffer:new kt(null),texelSize:new kt(new le)},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Vie,vertexShader:jie})}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=Zs){this.depthBuffer=t,this.depthPacking=e}set normalBuffer(t){this.uniforms.normalBuffer.value=t,t!==null?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(t){this.normalBuffer=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e)}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},Xie=class extends Zi{constructor({normalBuffer:t=null,resolutionScale:e=.5,width:n=fi.AUTO_SIZE,height:i=fi.AUTO_SIZE,resolutionX:r=n,resolutionY:s=i}={}){super("DepthDownsamplingPass");const o=new Wie;o.normalBuffer=t,this.fullscreenMaterial=o,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new Fn(1,1,{minFilter:fn,magFilter:fn,depthBuffer:!1,type:Vs}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new fi(this,r,s,e);a.addEventListener("change",l=>this.setSize(a.baseWidth,a.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(t,e=Zs){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.depthPacking=e}render(t,e,n,i,r){t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height),this.fullscreenMaterial.setSize(t,e)}initialize(t,e,n){const i=t.getContext();if(!(i.getExtension("EXT_color_buffer_float")||i.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},Jie=`#include <common>
3945#include <packing>
3946#include <dithering_pars_fragment>
3947#define packFloatToRGBA(v) packDepthToRGBA(v)
3948#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
3949#ifdef FRAMEBUFFER_PRECISION_HIGH
3950uniform mediump sampler2D inputBuffer;
3951#else
3952uniform lowp sampler2D inputBuffer;
3953#endif
3954#if DEPTH_PACKING == 3201
3955uniform lowp sampler2D depthBuffer;
3956#elif defined(GL_FRAGMENT_PRECISION_HIGH)
3957uniform highp sampler2D depthBuffer;
3958#else
3959uniform mediump sampler2D depthBuffer;
3960#endif
3961uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}float readDepth(const in vec2 uv){
3962#if DEPTH_PACKING == 3201
3963float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
3964#else
3965float depth=texture2D(depthBuffer,uv).r;
3966#endif
3967#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
3968float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;
3969#elif defined(USE_REVERSED_DEPTH_BUFFER)
3970depth=1.0-depth;
3971#endif
3972return depth;}float getViewZ(const in float depth){
3973#ifdef PERSPECTIVE_CAMERA
3974return perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
3975#else
3976return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
3977#endif
3978}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;
3979#ifdef ENCODE_OUTPUT
3980#include <colorspace_fragment>
3981#endif
3982#include <dithering_fragment>
3983}`,Kie="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}",Yie=class extends Yn{constructor(t,e,n,i,r=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:Tl.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new kt(null),depthBuffer:new kt(null),resolution:new kt(new le),texelSize:new kt(new le),cameraNear:new kt(.3),cameraFar:new kt(1e3),aspect:ne
vendor: 8,191 bytes, lines 3983-4001
3983w kt(1),time:new kt(0)},blending:Pi,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:r}),t&&this.setShaderParts(t),e&&this.setDefines(e),n&&this.setUniforms(n),this.copyCameraSettings(i)}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(t){this.uniforms.depthBuffer.value=t}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=Zs){this.depthBuffer=t,this.depthPacking=e}setShaderData(t){this.setShaderParts(t.shaderParts),this.setDefines(t.defines),this.setUniforms(t.uniforms),this.setExtensions(t.extensions)}setShaderParts(t){return this.fragmentShader=Jie.replace(sn.FRAGMENT_HEAD,t.get(sn.FRAGMENT_HEAD)||"").replace(sn.FRAGMENT_MAIN_UV,t.get(sn.FRAGMENT_MAIN_UV)||"").replace(sn.FRAGMENT_MAIN_IMAGE,t.get(sn.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader=Kie.replace(sn.VERTEX_HEAD,t.get(sn.VERTEX_HEAD)||"").replace(sn.VERTEX_MAIN_SUPPORT,t.get(sn.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(t){for(const e of t.entries())this.defines[e[0]]=e[1];return this.needsUpdate=!0,this}setUniforms(t){for(const e of t.entries())this.uniforms[e[0]]=e[1];return this}setExtensions(t){this.extensions={};for(const e of t)this.extensions[e]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(t){this.encodeOutput!==t&&(t?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(t){return this.encodeOutput}setOutputEncodingEnabled(t){this.encodeOutput=t}get time(){return this.uniforms.time.value}set time(t){this.uniforms.time.value=t}setDeltaTime(t){this.uniforms.time.value+=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNear.value=t.near,this.uniforms.cameraFar.value=t.far,t instanceof xn?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(t,e){const n=this.uniforms;n.resolution.value.set(t,e),n.texelSize.value.set(1/t,1/e),n.aspect.value=t/e}static get Section(){return sn}};function z5(t,e,n){for(const i of e){const r="$1"+t+i.charAt(0).toUpperCase()+i.slice(1),s=new RegExp("([^\\.])(\\b"+i+"\\b)","g");for(const o of n.entries())o[1]!==null&&n.set(o[0],o[1].replace(s,r))}}function Qie(t,e,n){let i=e.getFragmentShader(),r=e.getVertexShader();const s=i!==void 0&&/mainImage/.test(i),o=i!==void 0&&/mainUv/.test(i);if(n.attributes|=e.getAttributes(),i===void 0)throw new Error(`Missing fragment shader (${e.name})`);if(o&&n.attributes&bo.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${e.name})`);if(!s&&!o)throw new Error(`Could not find mainImage or mainUv function (${e.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=n.shaderParts;let c=l.get(sn.FRAGMENT_HEAD)||"",u=l.get(sn.FRAGMENT_MAIN_UV)||"",f=l.get(sn.FRAGMENT_MAIN_IMAGE)||"",p=l.get(sn.VERTEX_HEAD)||"",m=l.get(sn.VERTEX_MAIN_SUPPORT)||"";const v=new Set,w=new Set;if(o&&(u+=`	${t}MainUv(UV);
3984`,n.uvTransformation=!0),r!==null&&/mainSupport/.test(r)){const _=/mainSupport *\([\w\s]*?uv\s*?\)/.test(r);m+=`	${t}MainSupport(`,m+=_?`vUv);
3985`:`);
3986`;for(const y of r.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const M of y[1].split(/\s*,\s*/))n.varyings.add(M),v.add(M),w.add(M);for(const y of r.matchAll(a))w.add(y[1])}for(const _ of i.matchAll(a))w.add(_[1]);for(const _ of e.defines.keys())w.add(_.replace(/\([\w\s,]*\)/g,""));for(const _ of e.uniforms.keys())w.add(_);w.delete("while"),w.delete("for"),w.delete("if"),e.uniforms.forEach((_,y)=>n.uniforms.set(t+y.charAt(0).toUpperCase()+y.slice(1),_)),e.defines.forEach((_,y)=>n.defines.set(t+y.charAt(0).toUpperCase()+y.slice(1),_));const x=new Map([["fragment",i],["vertex",r]]);z5(t,w,n.defines),z5(t,w,x),i=x.get("fragment"),r=x.get("vertex");const g=e.blendMode;if(n.blendModes.set(g.blendFunction,g),s){e.inputColorSpace!==null&&e.inputColorSpace!==n.colorSpace&&(f+=e.inputColorSpace===jt?`color0 = sRGBTransferOETF(color0);
3987	`:`color0 = sRGBToLinear(color0);
3988	`),e.outputColorSpace!==ar?n.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(n.colorSpace=e.inputColorSpace);const _=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;f+=`${t}MainImage(color0, UV, `,n.attributes&bo.DEPTH&&_.test(i)&&(f+="depth, ",n.readDepth=!0),f+=`color1);
3989	`;const y=t+"BlendOpacity";n.uniforms.set(y,g.opacity),f+=`color0 = blend${g.blendFunction}(color0, color1, ${y});
3990
3991	`,c+=`uniform float ${y};
3992
3993`}if(c+=i+`
3994`,r!==null&&(p+=r+`
3995`),l.set(sn.FRAGMENT_HEAD,c),l.set(sn.FRAGMENT_MAIN_UV,u),l.set(sn.FRAGMENT_MAIN_IMAGE,f),l.set(sn.VERTEX_HEAD,p),l.set(sn.VERTEX_MAIN_SUPPORT,m),e.extensions!==null)for(const _ of e.extensions)n.extensions.add(_)}}var Zie=class extends Zi{constructor(t,...e){super("EffectPass"),this.fullscreenMaterial=new Yie(null,null,null,t),this.listener=n=>this.handleEvent(n),this.effects=[],this.setEffects(e),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(t){for(const e of this.effects)e.mainScene=t}set mainCamera(t){this.fullscreenMaterial.copyCameraSettings(t);for(const e of this.effects)e.mainCamera=t}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(t){this.fullscreenMaterial.encodeOutput=t}get dithering(){return this.fullscreenMaterial.dithering}set dithering(t){const e=this.fullscreenMaterial;e.dithering=t,e.needsUpdate=!0}setEffects(t){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=t.sort((e,n)=>n.attributes-e.attributes);for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const t=new Une;let e=0;for(const o of this.effects)if(o.blendMode.blendFunction===Gt.DST)t.attributes|=o.getAttributes()&bo.DEPTH;else{if(t.attributes&o.getAttributes()&bo.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${o.name})`);Qie("e"+e++,o,t)}let n=t.shaderParts.get(sn.FRAGMENT_HEAD),i=t.shaderParts.get(sn.FRAGMENT_MAIN_IMAGE),r=t.shaderParts.get(sn.FRAGMENT_MAIN_UV);const s=/\bblend\b/g;for(const o of t.blendModes.values())n+=o.getShaderCode().replace(s,`blend${o.blendFunction}`)+`
3996`;t.attributes&bo.DEPTH?(t.readDepth&&(i=`float depth = readDepth(UV);
3997
3998	`+i),this.needsDepthTexture=this.getDepthTexture()===null):this.needsDepthTexture=!1,t.colorSpace===jt&&(i+=`color0 = sRGBToLinear(color0);
3999	`),t.uvTransformation?(r=`vec2 transformedUv = vUv;
4000`+r,t.defines.set("UV","transformedUv")):t.defines.set("UV","vUv"),t.shaderParts.set(sn.FRAGMENT_HEAD,n),t.shaderParts.set(sn.FRAGMENT_MAIN_IMAGE,i),t.shaderParts.set(sn.FRAGMENT_MAIN_UV,r);for(const[o,a]of t.shaderParts)a!==null&&t.shaderParts.set(o,a.trim().replace(/^#/,`
4001#`));this.skipRendering=e===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(t)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(t,e=Zs){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.depthPacking=e;for(const n of this.effects)n.setDepthTexture(t,e)}render(t,e,n,i,r){for(const s of this.effects)s.update(t,e,i);if(!this.skipRendering||this.renderToScreen){const s=this.fullscreenMaterial;s.inputBuffer=e.texture,s.time+=i*this.timeScale,t.setRenderTarget(this.renderToScreen?null:n),t.render(this.scene,this.camera)}}setSize(t,e){this.fullscreenMaterial.setSize(t,e);for(const n of this.effects)n.setSize(t,e)}initialize(t,e,n){this.renderer=t;for(const i of this.effects)i.initialize(t,e,n);this.updateMaterial(),n!==void 0&&n!==Si&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const t of this.effects)t.removeEventListener("change",this.listener),t.dispose()}handleEvent(t){switch(t.type){case"change":this.recompile();break}}},qie=class extends Zi{constructor(t,e,{renderTarget:n,resolutionScale:i=1,width:r=fi.AUTO_SIZE,height:s=fi.AUTO_SIZE,resolutionX:o=r,resolutionY:a=s}={}){super("NormalPass"),this.needsSwap=!1,this.renderPass=new IT(t,e,new OE);const l=this.renderPass;
4001l.ignoreBackground=!0,l.skipShadowMapUpdate=!0;const c=l.getClearPass();c.overrideClearColor=new He(7829503),c.overrideClearAlpha=1,this.renderTarget=n,this.renderTarget===void 0&&(this.renderTarget=new Fn(1,1,{minFilter:fn,magFilter:fn}),this.renderTarget.texture.name="NormalPass.Target");const u=this.resolution=new fi(this,o,a,i);u.addEventListener("change",f=>this.setSize(u.baseWidth,u.baseHeight))}set mainScene(t){this.renderPass.mainScene=t}set mainCamera(t){this.renderPass.mainCamera=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,i,r){const s=this.renderToScreen?null:this.renderTarget;this.renderPass.render(t,s,s)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}};const $F=I.createContext(null),H5=t=>(t.getAttributes()&bo.CONVOLUTION)===bo.CONVOLUTION,$ie=zt.memo(I.forwardRef(({children:t,camera:e,scene:n,resolutionScale:i,enabled:r=!0,renderPriority:s=1,autoClear:o=!0,depthBuffer:a,enableNormalPass:l,stencilBuffer:c,multisampling:u=8,frameBufferType:f=Dc},p)=>{const{gl:m,scene:v,camera:w,size:x}=zr(),g=n||v,_=e||w,[y,M,E]=I.useMemo(()=>{const N=DY(),R=new One(m,{depthBuffer:a,stencilBuffer:c,multisampling:u>0&&N?u:0,frameBufferType:f});R.addPass(new IT(g,_));let L=null,k=null;return l&&(k=new qie(g,_),k.enabled=!1,R.addPass(k),i!==void 0&&N&&(L=new Xie({normalBuffer:k.texture,resolutionScale:i}),L.enabled=!1,R.addPass(L))),[R,k,L]},[_,m,a,c,u,f,g,l,i]);I.useEffect(()=>y==null?void 0:y.setSize(x.width,x.height),[y,x]),ro((N,R)=>{if(r){const L=m.autoClear;m.autoClear=o,c&&!o&&m.clearStencil(),y.render(R),m.autoClear=L}},r?s:0);const C=I.useRef(null);I.useLayoutEffect(()=>{var N;const R=[],L=(N=C.current)==null?void 0:N.__r3f;if(L&&y){const k=L.objects;for(let $=0;$<k.length;$++){const ee=k[$];if(ee instanceof _A){const D=[ee];if(!H5(ee)){let z=null;for(;(z=k[$+1])instanceof _A&&!H5(z);)D.push(z),$++}const U=new Zie(_,...D);R.push(U)}else ee instanceof Zi&&R.push(ee)}for(const $ of R)y==null||y.addPass($);M&&(M.enabled=!0),E&&(E.enabled=!0)}return()=>{for(const k of R)y==null||y.removePass(k);M&&(M.enabled=!1),E&&(E.enabled=!1)}},[y,t,_,M,E]),I.useEffect(()=>{const N=m.toneMapping;return m.toneMapping=Js,()=>{m.toneMapping=N}},[m]);const P=I.useMemo(()=>({composer:y,normalPass:M,downSamplingPass:E,resolutionScale:i,camera:_,scene:g}),[y,M,E,i,_,g]);return I.useImperativeHandle(p,()=>y,[y]),T.jsx($F.Provider,{value:P,children:T.jsx("group",{ref:C,children:t})})})),Bg=t=>typeof t=="object"&&t!=null&&"current"in t?t.current:t,ere=(t,e)=>t.layers.enable(e.selection.layer),tre=(t,e)=>t.layers.disable(e.selection.layer),nre=I.forwardRef(function({selection:e=[],selectionLayer:n=10,lights:i=[],inverted:r=!1,ignoreBackground:s=!1,luminanceThreshold:o,luminanceSmoothing:a,intensity:l,width:c,height:u,kernelSize:f,mipmapBlur:p,...m},v){i.length===0&&console.warn("SelectiveBloom requires lights to work.");const w=zr(M=>M.invalidate),{scene:x,camera:g}=I.useContext($F),_=I.useMemo(()=>{const M=new Gie(x,g,{blendFunction:Gt.ADD,luminanceThreshold:o,luminanceSmoothing:a,intensity:l,width:c,height:u,kernelSize:f,mipmapBlur:p,...m});return M.inverted=r,M.ignoreBackground=s,M},[x,g,o,a,l,c,u,f,p,r,s,m]),y=I.useContext(Rne);return I.useEffect(()=>{if(!y&&e)return _.selection.set(Array.isArray(e)?e.map(Bg):[Bg(e)]),w(),()=>{_.selection.clear(),w()}},[_,e,y,w]),I.useEffect(()=>{_.selection.layer=n,w()},[_,w,n]),I.useEffect(()=>{if(i&&i.length>0)return i.forEach(M=>ere(Bg(M),_)),w(),()=>{i.forEach(M=>tre(Bg(M),_)),w()}},[_,w,i,n]),I.useEffect(()=>{var M;if(y&&y.enabled&&(M=y.selected)!=null&&M.length)return _.selection.set(y.selected),w(),()=>{_.selection.clear(),w()}},[y,_.selection,w]),T.jsx("primitive",{ref:v,object:_,dispose:null})}),ire="/assets/galaxy-3221aa68.glb";function rre({isRotating:t,setCurrentStage:e,...n}){const i=I.useRef(),r=I.useRef(),{nodes:s}=ch(ire),{camera:o}=zr(),[a,l]=I.useState(window.innerWidth<768);I.useEffect(()=>{const f=()=>{l(window.innerWidth<768)};return window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);const[c,u]=I.useMemo(()=>{s.Object_2.geometry.center();const f=new Float32Array(s.Object_2.geometry.attributes.position.array.buffer),p=new Float32Array(f.length),m=(x,g,_)=>Math.sqrt(x*x+g*g+_*_),v=new He,w=a?9:3;for(let x=0;x<f.length;x+=w){const g=f[x],_=f[x+1],y=f[x+2],E=m(g,_,y)/100;v.setRGB(Math.cos(E),Ec.randFloat(0,.8),Math.sin(E)),v.toArray(p,x)}return[f,p]},[s,a]);return ro(()=>{t||(i.current.rotation.y+=.001);let p=(Math.atan2(o.position.x,o.position.z)+Math.PI)/(2*Math.PI);p>=0&&p<.25?e(2):p>
4001=.25&&p<.5?e(1):p>=.5&&p<.75?e(4):p>=.75&&p<=1&&e(3)}),T.jsxs("group",{...n,dispose:null,ref:i,children:[T.jsx("pointLight",{position:[0,0,0],ref:r,intensity:.5}),T.jsx(VQ,{scale:.05,positions:c,colors:u,children:T.jsx("pointsMaterial",{transparent:!0,depthWrite:!1,vertexColors:!0,opacity:.4,depthTest:!0,size:.01})}),!a&&T.jsx($ie,{autoClear:!1,children:T.jsx(nre,{intensity:2,luminanceThreshold:.001,luminanceSmoothing:.225,lights:[r]})})]})}const eO="/assets/rocket-6097f717.glb";function sre({isRotating:t,...e}){const{nodes:n,materials:i}=ch(eO),r=I.useRef();return ro((s,o)=>{t?r.current.rotation.y+=2*o:r.current.rotation.y+=.5*o}),T.jsx("group",{ref:r,...e,dispose:null,children:T.jsx("group",{rotation:[-Math.PI/2,0,0],children:T.jsxs("group",{position:[-.003,.024,-6.331],rotation:[.238,-.545,.562],scale:7,children:[T.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:n.planet001_1.geometry,material:i.scene}),T.jsx("mesh",{castShadow:!0,receiveShadow:!0,geometry:n.planet001_2.geometry,material:i.scene})]})})})}ch.preload(eO);const ore=()=>{const t=I.useRef(new Audio(Cne));t.current.volume=.4,t.current.loop=!0;const[e,n]=I.useState(1),[i,r]=I.useState(!1),[s,o]=I.useState(!1),[a,l]=I.useState(!0);I.useEffect(()=>{const v=t.current;return s&&v.play(),()=>{v.pause()}},[s]),I.useEffect(()=>{const v=setTimeout(()=>{l(!1)},4e3);return()=>clearTimeout(v)},[]);const[c,u]=I.useState(window.innerWidth<768);I.useEffect(()=>{const v=()=>{u(window.innerWidth<768)};return window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const f=()=>{let v,w;return c?(v=[.7,.7,.7],w=[0,-2.5,0]):(v=[1,1,1],w=[0,-4.5,0]),[v,w]},[p,m]=f();return T.jsxs("section",{id:"home",className:"w-full h-screen relative",children:[T.jsx("div",{className:"absolute top-28 left-0 right-0 z-10 flex items-center justify-center pointer-events-none",children:T.jsx("div",{className:"pointer-events-auto",children:e&&T.jsx(Tne,{currentStage:e})})}),T.jsx("div",{className:"fixed inset-0 z-0",children:T.jsx(qE,{dpr:[1,2],
4001className:`w-full h-full bg-transparent ${i?"cursor-grabbing":"cursor-grab"}`,camera:{position:[0,0,30],near:.1,far:1e3},children:T.jsxs(I.Suspense,{fallback:T.jsx(a8,{}),children:[T.jsx("directionalLight",{position:[1,1,1],intensity:2}),T.jsx("ambientLight",{intensity:.5}),T.jsx("pointLight",{position:[10,5,10],intensity:2}),T.jsx("spotLight",{position:[0,50,10],angle:.15,penumbra:1,intensity:2}),T.jsx("hemisphereLight",{skyColor:"#b1e1ff",groundColor:"#000000",intensity:1}),T.jsx(i8,{radius:300,depth:60,count:2e4,factor:7,saturation:0,fade:!0,speed:1}),T.jsx(rre,{isRotating:i,setIsRotating:r,setCurrentStage:n,position:m,rotation:[0,0,0],scale:p}),T.jsx(RQ,{enableZoom:!1,enablePan:!1,rotateSpeed:.5,autoRotate:!i,autoRotateSpeed:.5})]})})}),T.jsx("div",{className:`absolute bottom-20 left-0 right-0 flex justify-center pointer-events-none transition-opacity duration-1000 ${a?"opacity-100":"opacity-0"}`,children:T.jsxs("div",{className:"glass-panel px-6 py-3 rounded-full flex items-center gap-3 bg-white/10 backdrop-blur-md border border-white/20",children:[T.jsx(gZ,{className:"text-blue-400 animate-bounce"}),T.jsx("span",{className:"text-white font-medium tracking-wide",children:"Drag to explore the galaxy & scroll down for more"})]})}),T.jsx("div",{className:"absolute bottom-6 left-6 z-20",children:T.jsxs("button",{onClick:()=>o(!s),className:`group relative w-12 h-12 rounded-full flex items-center justify-center transition-all duration-300 ${s?"bg-blue-500/20 border-blue-400 shadow-[0_0_20px_rgba(59,130,246,0.5)]":"bg-white/10 border-white/20 hover:bg-white/20"} backdrop-blur-md border`,children:[s?T.jsx(wZ,{className:"w-5 h-5 text-blue-400"}):T.jsx(SZ,{className:"w-5 h-5 text-gray-400 group-hover:text-white transition-colors"}),s&&T.jsx("span",{className:"absolute inset-0 rounded-full border border-blue-400 animate-ping opacity-75"})]})}),T.jsx("div",{className:"absolute bottom-6 right-6 z-20",children:T.jsxs(Hf,{to:"/lunar-rover",className:"group relative px-5 py-3 rounded-full flex items-center justify-center transition-all duration-300 bg-white/10 hover:bg-white/20 backdrop-blur-md border border-white/20 hover:border-blue-400 gap-3 cursor-pointer shadow-lg",children:[T.jsx("span",{className:"text-white text-sm font-mono tracking-wider group-hover:text-blue-300 transition-colors",children:"CLICK TO DRIVE ROVER"}),T.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-green-500/80 animate-pulse shadow-[0_0_10px_rgba(34,197,94,0.8)]"})]})})]})};function are(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M186.62 464H160a16 16 0 0 1-14.57-22.6l64.46-142.25L113.1 297l-35.3 42.77C71.07 348.23 65.7 352 52 352H34.08a17.66 17.66 0 0 1-14.7-7.06c-2.38-3.21-4.72-8.65-2.44-16.41l19.82-71c.15-.53.33-1.06.53-1.58a.38.38 0 0 0 0-.15 14.82 14.82 0 0 1-.53-1.59l-19.84-71.45c-2.15-7.61.2-12.93 2.56-16.06a16.83 16.83 0 0 1 13.6-6.7H52c10.23 0 20.16 4.59 26 12l34.57 42.05 97.32-1.44-64.44-142A16 16 0 0 1 160 48h26.91a25 25 0 0 1 19.35 9.8l125.05 152 57.77-1.52c4.23-.23 15.95-.31 18.66-.31C463 208 496 225.94 496 256c0 9.46-3.78 27-29.07 38.16-14.93 6.6-34.85 9.94-59.21 9.94-2.68 0-14.37-.08-18.66-.31l-57.76-1.54-125.36 152a25 25 0 0 1-19.32 9.75z"},child:[]}]})(t)}function lre(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M160 389a20.91 20.91 0 0 1-13.82-5.2l-128-112a21 21 0 0 1 0-31.6l128-112a21 21 0 0 1 27.66 31.61L63.89 256l109.94 96.19A21 21 0 0 1 160 389zm192 0a21 21 0 0 1-13.84-36.81L448.11 256l-109.94-96.19a21 21 0 0 1 27.66-31.61l128 112a21 21 0 0 1 0 31.6l-128 112A20.89 20.89 0 0 1 352 389zm-144 48a21 21 0 0 1-20.12-27l96-320a21 21 0 1 1 40.23 12l-96 320A21 21 0 0 1 208 437z"},child:[]}]})(t)}function cre(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M96.85 286.62a8 8 0 0 0-12.53 8.25C102.07 373.28 172.3 432 256 432a175.31 175.31 0 0 0 52.41-8 8 8 0 0 0 .79-15 1120 1120 0 0 1-109.48-55.61 1126.24 1126.24 0 0 1-102.87-66.77zm395.87 52.89c-4.19-5.58-9.11-11.44-14.7-17.53a15.83 15.83 0 0 0-26.56 5.13c0 .16-.11.31-.17.47a15.75 15.75 0 0 0 3.15 16.06c22.74 25 26.42 38.51 25.48 41.36-2 2.23-17.05 6.89-58.15-3.53q-8.83-2.24-19.32-5.46-6.76-2.08-13.79-4.49a176.76 176.76 0 0 0 19.54-27.25c.17-.29.35-.58.52-.88A175.39 175.39 0 0 0 432 256a178.87 178.87 0 0 0-1-19c-9.57-88.17-84.4-157-175-157a175.37 175.37 0 0 0-106.4 35.89 177.4 177.4 0 0 0-45.83 51.84c-.16.29-.34.58-.51.87a175.48 175.48 0 0 0-13.83 30.52q-5.59-4.87-10.79-9.67c-5.39-5-10.17-9.63-14.42-14-29.57-30.26-33.09-45.61-32.16-48.45 2-2.23 15.54-5.87 48.62 1.31A15.82 15.82 0 0 0 96.22 123l.36-.44a15.74 15.74 0 0 0-8.67-25.43A237.38 237.38 0 0 0 64.13 93c-30.72-3.53-50.83 2.52-59.78 18-3.24 5.58-6.35 15.09-2.72 28.6C7 159.66 26.14 184 53.23 209.5c8.63 8.13 18.06 16.37 28.12 24.64 7.32 6 15 12.06 22.9 18.08q7.91 6 16.15 12T137.1 276c25.41 17.61 52.26 34.52 78.59 49.69q14.34 8.26 28.64 16t28.37 14.81c21.9 11 43.35 20.92 63.86 29.43q13.19 5.48 25.81 10.16c11.89 4.42 23.37 8.31 34.31 11.59l1.1.33c25.73 7.66 47.42 11.69 64.48 12H464c21.64 0 36.3-6.38 43.58-19 9.09-15.62 4.08-36.32-14.86-61.5z"},child:[]}]})(t)}function ure(t){return Ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.83 319.44 295.63 36.88a48 48 0 0 0-79.26 0L24.17 319.44a47.1 47.1 0 0 0 16.93 68.13l192.2 102.75a48.05 48.05 0 0 0 45.4 0l192.2-102.75a47.1 47.1 0 0 0 16.93-68.13zm-431.26 41a16.12 16.12 0 0 1-8-10.38 16.8 16.8 0 0 1 2.37-13.62L232.66 69.26c2.18-3.21 7.34-1.72 7.34 2.13v374c0 5.9-6.54 9.63-11.87 6.78z"},child:[]}]})(t)}const Qy=(t,e)=>
vendor: 7,133 bytes, line 4001
4001function(){return T.jsxs(Wi.section,{initial:"hidden",whileInView:"show",viewport:{once:!0,amount:.25},className:"max-w-7xl mx-auto relative z-0",children:[T.jsx("span",{className:"hash-span",id:e,children:" "}),T.jsx(t,{})]})};class Ji{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const s=n[r],o=e+s,a=Math.abs(e)<Math.abs(s)?e-(o-s):s-(o-e);a&&(n[i++]=a),e=o}return n[i]=e,this._n=i+1,this}valueOf(){const e=this._partials;let n=this._n,i,r,s,o=0;if(n>0){for(o=e[--n];n>0&&(i=o,r=e[--n],o=i+r,s=r-(o-i),!s););n>0&&(s<0&&e[n-1]<0||s>0&&e[n-1]>0)&&(r=s*2,i=o+r,r==i-o&&(o=i))}return o}}function*fre(t){for(const e of t)yield*e}function tO(t){return Array.from(fre(t))}function vf(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,s=new Array(r);++i<r;)s[i]=t+i*n;return s}var vt=1e-6,Dp=1e-12,Ut=Math.PI,jn=Ut/2,p1=Ut/4,fr=Ut*2,mn=180/Ut,yt=Ut/180,Yt=Math.abs,dh=Math.atan,hr=Math.atan2,ut=Math.cos,Lg=Math.ceil,nO=Math.exp,SA=Math.hypot,m1=Math.log,Z2=Math.pow,tt=Math.sin,ms=Math.sign||function(t){return t>0?1:t<0?-1:0},Ai=Math.sqrt,NT=Math.tan;function iO(t){return t>1?0:t<-1?Ut:Math.acos(t)}function dr(t){return t>1?jn:t<-1?-jn:Math.asin(t)}function G5(t){return(t=tt(t/2))*t}function In(){}function g1(t,e){t&&j5.hasOwnProperty(t.type)&&j5[t.type](t,e)}var V5={Feature:function(t,e){g1(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)g1(n[i].geometry,e)}},j5={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){wA(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)wA(n[i],e,0)},Polygon:function(t,e){W5(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)W5(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)g1(n[i],e)}};function wA(t,e,n){var i=-1,r=t.length-n,s;for(e.lineStart();++i<r;)s=t[i],e.point(s[0],s[1],s[2]);e.lineEnd()}function W5(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)wA(t[n],e,1);e.polygonEnd()}function Hs(t,e){t&&V5.hasOwnProperty(t.type)?V5[t.type](t,e):g1(t,e)}var v1=new Ji,y1=new Ji,rO,sO,AA,MA,EA,Lo={point:In,lineStart:In,lineEnd:In,polygonStart:function(){v1=new Ji,Lo.lineStart=hre,Lo.lineEnd=dre},polygonEnd:function(){var t=+v1;y1.add(t<0?fr+t:t),this.lineStart=this.lineEnd=this.point=In},sphere:function(){y1.add(fr)}};function hre(){Lo.point=pre}function dre(){oO(rO,sO)}function pre(t,e){Lo.point=oO,rO=t,sO=e,t*=yt,e*=yt,AA=t,MA=ut(e=e/2+p1),EA=tt(e)}function oO(t,e){t*=yt,e*=yt,e=e/2+p1;var n=t-AA,i=n>=0?1:-1,r=i*n,s=ut(e),o=tt(e),a=EA*o,l=MA*s+a*ut(r),c=a*i*tt(r);v1.add(hr(c,l)),AA=t,MA=s,EA=o}function mre(t){return y1=new Ji,Hs(t,Lo),y1*2}function x1(t){return[hr(t[1],t[0]),dr(t[2])]}function jc(t){var e=t[0],n=t[1],i=ut(n);return[i*ut(e),i*tt(e),tt(n)]}function Ig(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Kf(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function q2(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ng(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function _1(t){var e=Ai(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Cn,Ar,Hn,Gr,oc,aO,lO,Bf,Gd,Xa,_a,na={point:TA,lineStart:X5,lineEnd:J5,polygonStart:function(){na.point=uO,na.lineStart=gre,na.lineEnd=vre,Gd=new Ji,Lo.polygonStart()},polygonEnd:function(){Lo.polygonEnd(),na.point=TA,na.lineStart=X5,na.lineEnd=J5,v1<0?(Cn=-(Hn=180),Ar=-(Gr=90)):Gd>vt?Gr=90:Gd<-vt&&(Ar=-90),_a[0]=Cn,_a[1]=Hn},sphere:function(){Cn=-(Hn=180),Ar=-(Gr=90)}};function TA(t,e){Xa.push(_a=[Cn=t,Hn=t]),e<Ar&&(Ar=e),e>Gr&&(Gr=e)}function cO(t,e){var n=jc([t*yt,e*yt]);if(Bf){var i=Kf(Bf,n),r=[i[1],-i[0],0],s=Kf(r,i);_1(s),s=x1(s);var o=t-oc,a=o>0?1:-1,l=s[0]*mn*a,c,u=Yt(o)>180;u^(a*oc<l&&l<a*t)?(c=s[1]*mn,c>Gr&&(Gr=c)):(l=(l+360)%360-180,u^(a*oc<l&&l<a*t)?(c=-s[1]*mn,c<Ar&&(Ar=c)):(e<Ar&&(Ar=e),e>Gr&&(Gr=e))),u?t<oc?Hr(Cn,t)>Hr(Cn,Hn)&&(Hn=t):Hr(t,Hn)>Hr(Cn,Hn)&&(Cn=t):Hn>=Cn?(t<Cn&&(Cn=t),t>Hn&&(Hn=t)):t>oc?Hr(Cn,t)>Hr(Cn,Hn)&&(Hn=t):Hr(t,Hn)>Hr(Cn,Hn)&&(Cn=t)}else Xa.push(_a=[Cn=t,Hn=t]);e<Ar&&(Ar=e),e>Gr&&(Gr=e),Bf=n,oc=t}function X5(){na.point=cO}function J5(){_a[0]=Cn,_a[1]=Hn,na.point=TA,Bf=null}function uO(t,e){if(Bf){var n=t-oc;Gd.add(Yt(n)>180?n+(n>0?360:-360):n)}else aO=t,lO=e;Lo.point(t,e),cO(t,e)}function gre(){Lo.lineStart()}function vre(){uO(aO,lO),Lo.lineEnd(),Yt(Gd)>vt&&(Cn=-(Hn=180)),_a[0]=Cn,_a[1]=Hn,Bf=null}function Hr(t,e){return(e-=t)<0?e+360:e}function yre(t,e){return t[0]-e[0]}function K5(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function xre(t){var e,n,i,r,s,o,a;if(Gr=Hn=-(Cn=Ar=1/0),Xa=[],Hs(t,na),n=Xa.length){for(Xa.sort(yre),e=1,i=Xa[0],s=[i];e<n;++e)r=Xa[e],K5(i,r[0])||K5(i,r[1])?(Hr(i[0],r[1])>Hr(i[0],i[1])&&(i[1]=r[1]),Hr(r[0],i[1])>Hr(i[0],i[1])&&(i[0]=r[0])):s.push(i=r);for(o=-1/0,n=s.length-1,e=0,i=s[n];e<=n;i=r,++e)r=s[e],(a=Hr(i[1],r[0]))>o&&(o=a,Cn=r[0],Hn=i[1])}return Xa=_a=null,Cn===1/0||Ar===1/0?[[NaN,NaN],[NaN,NaN]]:[[Cn,Ar],[Hn,Gr]]}var md,S1,w1,A1,M1,E1,T1,b1,bA,CA,RA,fO,hO,rr,sr,or,js={sphere:In,point:DT,lineStart:Y5,lineEnd:Q5,polygonStart:function(){js.lineStart=wre,js.lineEnd=Are},polygonEnd:function(){js.lineStart=Y5,js.lineEnd=Q5}};function DT(t,e){t*=yt,e*=yt;var n=ut(e);gm(n*ut(t),n*tt(t),tt(e))}function gm(t,e,n){++md,w1+=(t-w1)/md,A1+=(e-A1)/md,M1+=(n-M1)/md}function Y5(){js.point=_re}function _re(t,e){t*=yt,e*=yt;var n=ut(e);rr=n*ut(t),sr=n*tt(t),or=tt(e),js.point=Sre,gm(rr,sr,or)}function Sre(t,e){t*=yt,e*=yt;var n=ut(e),i=n*ut(t),r=n*tt(t),s=tt(e),o=hr(Ai((o=sr*s-or*r)*o+(o=or*i-rr*s)*o+(o=rr*r-sr*i)*o),rr*i+sr*r+or*s);S1+=o,E1+=o*(rr+(rr=i)),T1+=o*(sr+(sr=r)),b1+=o*(or+(or=s)),gm(rr,sr,or)}function Q5(){js.point=DT}function wre(){js.point=Mre}function Are(){dO(fO,hO),js.point=DT}function Mre(t,e){fO=t,hO=e,t*=yt,e*=yt,js.point=dO;var n=ut(e);rr=n*ut(t),sr=n*tt(t),or=tt(e),gm(rr,sr,or)}function dO(t,e){t*=yt,e*=yt;var n=ut(e),i=n*ut(t),r=n*tt(t),s=tt(e),o=sr*s-or*r,a=or*i-rr*s,l=rr*r-sr*i,c=SA(o,a,l),u=dr(c),f=c&&-u/c;bA.add(f*o),CA.add(f*a),RA.add(f*l),S1+=u,E1+=u*(rr+(rr=i)),T1+=u*(sr+(sr=r)),b1+=u*(or+(or=s)),gm(rr,sr,or)}function Ere(t){md=S1=w1=A1=M1=E1=T1=b1=0,bA=new Ji,CA=new Ji,RA=new Ji,Hs(t,js);var e=+bA,n=+CA,i=+RA,r=SA(e,n,i);return r<Dp&&(e=E1,n=T1,i=b1,S1<vt&&(e=w1,n=A1,i=M1),r=SA(e,n,i),r<Dp)?[NaN,NaN]:[hr(n,e)*mn,dr(i/r)*mn]}function Vu(t){return function(){return t}}function PA(t,e){function n(i,r){return i=t(i,r),e(i[0],i[1])}return t.invert&&e.invert&&(n.invert=function(i,r){return i=e.invert(i,r),i&&t.invert(i[0],i[1])}),n}function BA(t,e){return[Yt(t)>Ut?t+Math.round(-t/fr)*fr:t,e]}BA.invert=BA;function FT(t,e,n){return(t%=fr)?e||n?PA(q5(t),$5(e,n)):q5(t):e||n?$5(e,n):BA}function Z5(t){return function(e,n){return e+=t,[e>Ut?e-fr:e<-Ut?e+fr:e,n]}}function q5(t){var e=Z5(t);return e.invert=Z5(-t),e}function $5(t,e){var n=ut(t),i=tt(t),r=ut(e),s=tt(e);
vendor: 9,215 bytes, line 4001
4001function o(a,l){var c=ut(l),u=ut(a)*c,f=tt(a)*c,p=tt(l),m=p*n+u*i;return[hr(f*r-m*s,u*n-p*i),dr(m*r+f*s)]}return o.invert=function(a,l){var c=ut(l),u=ut(a)*c,f=tt(a)*c,p=tt(l),m=p*r-f*s;return[hr(f*r+p*s,u*n+m*i),dr(m*n-u*i)]},o}function pO(t){t=FT(t[0]*yt,t[1]*yt,t.length>2?t[2]*yt:0);function e(n){return n=t(n[0]*yt,n[1]*yt),n[0]*=mn,n[1]*=mn,n}return e.invert=function(n){return n=t.invert(n[0]*yt,n[1]*yt),n[0]*=mn,n[1]*=mn,n},e}function mO(t,e,n,i,r,s){if(n){var o=ut(e),a=tt(e),l=i*n;r==null?(r=e+i*fr,s=e-l/2):(r=eB(o,r),s=eB(o,s),(i>0?r<s:r>s)&&(r+=i*fr));for(var c,u=r;i>0?u>s:u<s;u-=l)c=x1([o,-a*ut(u),-a*tt(u)]),t.point(c[0],c[1])}}function eB(t,e){e=jc(e),e[0]-=t,_1(e);var n=iO(-e[1]);return((-e[2]<0?-n:n)+fr-vt)%fr}function Tre(){var t=Vu([0,0]),e=Vu(90),n=Vu(6),i,r,s={point:o};function o(l,c){i.push(l=r(l,c)),l[0]*=mn,l[1]*=mn}function a(){var l=t.apply(this,arguments),c=e.apply(this,arguments)*yt,u=n.apply(this,arguments)*yt;return i=[],r=FT(-l[0]*yt,-l[1]*yt,0).invert,mO(s,c,u,1),l={type:"Polygon",coordinates:[i]},i=r=null,l}return a.center=function(l){return arguments.length?(t=typeof l=="function"?l:Vu([+l[0],+l[1]]),a):t},a.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Vu(+l),a):e},a.precision=function(l){return arguments.length?(n=typeof l=="function"?l:Vu(+l),a):n},a}function gO(){var t=[],e;return{point:function(n,i,r){e.push([n,i,r])},lineStart:function(){t.push(e=[])},lineEnd:In,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function gv(t,e){return Yt(t[0]-e[0])<vt&&Yt(t[1]-e[1])<vt}function Dg(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function vO(t,e,n,i,r){var s=[],o=[],a,l;if(t.forEach(function(v){if(!((w=v.length-1)<=0)){var w,x=v[0],g=v[w],_;if(gv(x,g)){if(!x[2]&&!g[2]){for(r.lineStart(),a=0;a<w;++a)r.point((x=v[a])[0],x[1]);r.lineEnd();return}g[0]+=2*vt}s.push(_=new Dg(x,v,null,!0)),o.push(_.o=new Dg(x,null,_,!1)),s.push(_=new Dg(g,v,null,!1)),o.push(_.o=new Dg(g,null,_,!0))}}),!!s.length){for(o.sort(e),tB(s),tB(o),a=0,l=o.length;a<l;++a)o[a].e=n=!n;for(var c=s[0],u,f;;){for(var p=c,m=!0;p.v;)if((p=p.n)===c)return;u=p.z,r.lineStart();do{if(p.v=p.o.v=!0,p.e){if(m)for(a=0,l=u.length;a<l;++a)r.point((f=u[a])[0],f[1]);else i(p.x,p.n.x,1,r);p=p.n}else{if(m)for(u=p.p.z,a=u.length-1;a>=0;--a)r.point((f=u[a])[0],f[1]);else i(p.x,p.p.x,-1,r);p=p.p}p=p.o,u=p.z,m=!m}while(!p.v);r.lineEnd()}}}function tB(t){if(e=t.length){for(var e,n=0,i=t[0],r;++n<e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function $2(t){return Yt(t[0])<=Ut?t[0]:ms(t[0])*((Yt(t[0])+Ut)%fr-Ut)}function yO(t,e){var n=$2(e),i=e[1],r=tt(i),s=[tt(n),-ut(n),0],o=0,a=0,l=new Ji;r===1?i=jn+vt:r===-1&&(i=-jn-vt);for(var c=0,u=t.length;c<u;++c)if(p=(f=t[c]).length)for(var f,p,m=f[p-1],v=$2(m),w=m[1]/2+p1,x=tt(w),g=ut(w),_=0;_<p;++_,v=M,x=C,g=P,m=y){var y=f[_],M=$2(y),E=y[1]/2+p1,C=tt(E),P=ut(E),N=M-v,R=N>=0?1:-1,L=R*N,k=L>Ut,$=x*C;if(l.add(hr($*R*tt(L),g*P+$*ut(L))),o+=k?N+R*fr:N,k^v>=n^M>=n){var ee=Kf(jc(m),jc(y));_1(ee);var D=Kf(s,ee);_1(D);var U=(k^N>=0?-1:1)*dr(D[2]);(i>U||i===U&&(ee[0]||ee[1]))&&(a+=k^N>=0?1:-1)}}return(o<-vt||o<vt&&l<-Dp)^a&1}function xO(t,e,n,i){return function(r){var s=e(r),o=gO(),a=e(o),l=!1,c,u,f,p={point:m,lineStart:w,lineEnd:x,polygonStart:function(){p.point=g,p.lineStart=_,p.lineEnd=y,u=[],c=[]},polygonEnd:function(){p.point=m,p.lineStart=w,p.lineEnd=x,u=tO(u);var M=yO(c,i);u.length?(l||(r.polygonStart(),l=!0),vO(u,Cre,M,n,r)):M&&(l||(r.polygonStart(),l=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),u=c=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function m(M,E){t(M,E)&&r.point(M,E)}function v(M,E){s.point(M,E)}function w(){p.point=v,s.lineStart()}function x(){p.point=m,s.lineEnd()}function g(M,E){f.push([M,E]),a.point(M,E)}function _(){a.lineStart(),f=[]}function y(){g(f[0][0],f[0][1]),a.lineEnd();var M=a.clean(),E=o.result(),C,P=E.length,N,R,L;if(f.pop(),c.push(f),f=null,!!P){if(M&1){if(R=E[0],(N=R.length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),C=0;C<N;++C)r.point((L=R[C])[0],L[1]);r.lineEnd()}return}P>1&&M&2&&E.push(E.pop().concat(E.shift())),u.push(E.filter(bre))}}return p}}function bre(t){return t.length>1}function Cre(t,e){return((t=t.x)[0]<0?t[1]-jn-vt:jn-t[1])-((e=e.x)[0]<0?e[1]-jn-vt:jn-e[1])}const LA=xO(function(){return!0},Rre,Bre,[-Ut,-jn]);function Rre(t){var e=NaN,n=NaN,i=NaN,r;return{lineStart:function(){t.lineStart(),r=1},point:function(s,o){var a=s>0?Ut:-Ut,l=Yt(s-e);Yt(l-Ut)<vt?(t.point(e,n=(n+o)/2>0?jn:-jn),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(a,n),t.point(s,n),r=0):i!==a&&l>=Ut&&(Yt(e-i)<vt&&(e-=i*vt),Yt(s-a)<vt&&(s-=a*vt),n=Pre(e,n,s,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(a,n),r=0),t.point(e=s,n=o),i=a},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-r}}}function Pre(t,e,n,i){var r,s,o=tt(t-n);return Yt(o)>vt?dh((tt(e)*(s=ut(i))*tt(n)-tt(i)*(r=ut(e))*tt(t))/(r*s*o)):(e+i)/2}function Bre(t,e,n,i){var r;if(t==null)r=n*jn,i.point(-Ut,r),i.point(0,r),i.point(Ut,r),i.point(Ut,0),i.point(Ut,-r),i.point(0,-r),i.point(-Ut,-r),i.point(-Ut,0),i.point(-Ut,r);else if(Yt(t[0]-e[0])>vt){var s=t[0]<e[0]?Ut:-Ut;r=n*s/2,i.point(-s,r),i.point(0,r),i.point(s,r)}else i.point(e[0],e[1])}function _O(t){var e=ut(t),n=6*yt,i=e>0,r=Yt(e)>vt;function s(u,f,p,m){mO(m,t,n,p,u,f)}function o(u,f){return ut(u)*ut(f)>e}function a(u){var f,p,m,v,w;return{lineStart:function(){v=m=!1,w=1},point:function(x,g){var _=[x,g],y,M=o(x,g),E=i?M?0:c(x,g):M?c(x+(x<0?Ut:-Ut),g):0;if(!f&&(v=m=M)&&u.lineStart(),M!==m&&(y=l(f,_),(!y||gv(f,y)||gv(_,y))&&(_[2]=1)),M!==m)w=0,M?(u.lineStart(),y=l(_,f),u.point(y[0],y[1])):(y=l(f,_),u.point(y[0],y[1],2),u.lineEnd()),f=y;else if(r&&f&&i^M){var C;!(E&p)&&(C=l(_,f,!0))&&(w=0,i?(u.lineStart(),u.point(C[0][0],C[0][1]),u.point(C[1][0],C[1][1]),u.lineEnd()):(u.point(C[1][0],C[1][1]),u.lineEnd(),u.lineStart(),u.point(C[0][0],C[0][1],3)))}M&&(!f||!gv(f,_))&&u.point(_[0],_[1]),f=_,m=M,p=E},lineEnd:function(){m&&u.lineEnd(),f=null},clean:function(){return w|(v&&m)<<1}}}function l(u,f,p){var m=jc(u),v=jc(f),w=[1,0,0],x=Kf(m,v),g=Ig(x,x),_=x[0],y=g-_*_;if(!y)return!p&&u;var M=e*g/y,E=-e*_/y,C=Kf(w,x),P=Ng(w,M),N=Ng(x,E);q2(P,N);var R=C,L=Ig(P,R),k=Ig(R,R),$=L*L-k*(Ig(P,P)-1);if(!($<0)){var ee=Ai($),D=Ng(R,(-L-ee)/k);if(q2(D,P),D=x1(D),!p)return D;var U=u[0],z=f[0],Y=u[1],O=f[1],H;z<U&&(H=U,U=z,z=H);var W=z-U,j=Yt(W-Ut)<vt,Z=j||W<vt;if(!j&&O<Y&&(H=Y,Y=O,O=H),Z?j?Y+O>0^D[1]<(Yt(D[0]-U)<vt?Y:O):Y<=D[1]&&D[1]<=O:W>Ut^(U<=D[0]&&D[0]<=z)){var re=Ng(R,(-L+ee)/k);return q2(re,P),[D,x1(re)]}}}function c(u,f){var p=i?t:Ut-t,m=0;return u<-p?m|=1:u>p&&(m|=2),f<-p?m|=4:f>p&&(m|=8),m}return xO(o,a,s,i?[0,-t]:[-Ut,t-Ut])}function Lre(t,e,n,i,r,s){var o=t[0],a=t[1],l=e[0],c=e[1],u=0,f=1,p=l-o,m=c-a,v;if(v=n-o,!(!p&&v>0)){if(v/=p,p<0){if(v<u)return;v<f&&(f=v)}else if(p>0){if(v>f)return;v>u&&(u=v)}if(v=r-o,!(!p&&v<0)){if(v/=p,p<0){if(v>f)return;v>u&&(u=v)}else if(p>0){if(v<u)return;v<f&&(f=v)}if(v=i-a,!(!m&&v>0)){if(v/=m,m<0){if(v<u)return;v<f&&(f=v)}else if(m>0){if(v>f)return;v>u&&(u=v)}if(v=s-a,!(!m&&v<0)){if(v/=m,m<0){if(v>f)return;v>u&&(u=v)}else if(m>0){if(v<u)return;v<f&&(f=v)}return u>0&&(t[0]=o+u*p,t[1]=a+u*m),f<1&&(e[0]=o+f*p,e[1]=a+f*m),!0}}}}}var gd=1e9,Fg=-gd;function Zy(t,e,n,i){function r(c,u){return t<=c&&c<=n&&e<=u&&u<=i}function s(c,u,f,p){var m=0,v=0;if(c==null||(m=o(c,f))!==(v=o(u,f))||l(c,u)<0^f>0)do p.point(m===0||m===3?t:n,m>1?i:e);while((m=(m+f+4)%4)!==v);else p.point(u[0],u[1])}function o(c,u){return Yt(c[0]-t)<vt?u>0?0:3:Yt(c[0]-n)<vt?u>0?2:1:Yt(c[1]-e)<vt?u>0?1:0:u>0?3:2}function a(c,u){return l(c.x,u.x)}function l(c,u){var f=o(c,1),p=o(u,1);return f!==p?f-p:f===0?u[1]-c[1]:f===1?c[0]-u[0]:f===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,f=gO(),p,m,v,w,x,g,_,y,M,E,C,P={point:N,lineStart:$,lineEnd:ee,polygonStart:L,polygonEnd:k};function N(U,z){r(U,z)&&u.point(U,z)}function R(){for(var U=0,z=0,Y=m.length;z<Y;++z)for(var O=m[z],H=1,W=O.length,j=O[0],Z,re,ue=j[0],ve=j[1];H<W;++H)Z=ue,re=ve,j=O[H],ue=j[0],ve=j[1],re<=i?ve>i&&(ue-Z)*(i-re)>(ve-re)*(t-Z)&&++U:ve<=i&&(ue-Z)*(i-re)<(ve-re)*(t-Z)&&--U;return U}function L(){u=f,p=[],m=[],C=!0}function k(){var U=R(),z=C&&U,Y=(p=tO(p)).length;(z||Y)&&(c.polygonStart(),z&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),Y&&vO(p,a,U,s,c),c.polygonEnd()),u=c,p=m=v=null}function $(){P.point=D,m&&m.push(v=[]),E=!0,M=!1,_=y=NaN}function ee(){p&&(D(w,x),g&&M&&f.rejoin(),p.push(f.result())),P.point=N,M&&u.lineEnd()}function D(U,z){var Y=r(U,z);if(m&&v.push([U,z]),E)w=U,x=z,g=Y,E=!1,Y&&(u.lineStart(),u.point(U,z));else if(Y&&M)u.point(U,z);else{var O=[_=Math.max(Fg,Math.min(gd,_)),y=Math.max(Fg,Math.min(gd,y))],H=[U=Math.max(Fg,Math.min(gd,U)),z=Math.max(Fg,Math.min(gd,z))];Lre(O,H,t,e,n,i)?(M||(u.lineStart(),u.point(O[0],O[1])),u.point(H[0],H[1]),Y||u.lineEnd(),C=!1):Y&&(u.lineStart(),u.point(U,z),C=!1)}_=U,y=z,M=Y}return P}}function Ire(){var t=0,e=0,n=960,i=500,r,s,o;return o={stream:function(a){return r&&s===a?r:r=Zy(t,e,n,i)(s=a)},extent:function(a){return arguments.length?(t=+a[0][0],e=+a[0][1],n=+a[1][0],i=+a[1][1],r=s=null,o):[[t,e],[n,i]]}}}
vendor: 7,223 bytes, line 4001
4001var IA,NA,vv,yv,Yf={sphere:In,point:In,lineStart:Nre,lineEnd:In,polygonStart:In,polygonEnd:In};function Nre(){Yf.point=Fre,Yf.lineEnd=Dre}function Dre(){Yf.point=Yf.lineEnd=In}function Fre(t,e){t*=yt,e*=yt,NA=t,vv=tt(e),yv=ut(e),Yf.point=Ore}function Ore(t,e){t*=yt,e*=yt;var n=tt(e),i=ut(e),r=Yt(t-NA),s=ut(r),o=tt(r),a=i*o,l=yv*n-vv*i*s,c=vv*n+yv*i*s;IA.add(hr(Ai(a*a+l*l),c)),NA=t,vv=n,yv=i}function SO(t){return IA=new Ji,Hs(t,Yf),+IA}var DA=[null,null],Ure={type:"LineString",coordinates:DA};function C1(t,e){return DA[0]=t,DA[1]=e,SO(Ure)}var nB={Feature:function(t,e){return R1(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)if(R1(n[i].geometry,e))return!0;return!1}},iB={Sphere:function(){return!0},Point:function(t,e){return rB(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)if(rB(n[i],e))return!0;return!1},LineString:function(t,e){return sB(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)if(sB(n[i],e))return!0;return!1},Polygon:function(t,e){return oB(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)if(oB(n[i],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)if(R1(n[i],e))return!0;return!1}};function R1(t,e){return t&&iB.hasOwnProperty(t.type)?iB[t.type](t,e):!1}function rB(t,e){return C1(t,e)===0}function sB(t,e){for(var n,i,r,s=0,o=t.length;s<o;s++){if(i=C1(t[s],e),i===0||s>0&&(r=C1(t[s],t[s-1]),r>0&&n<=r&&i<=r&&(n+i-r)*(1-Math.pow((n-i)/r,2))<Dp*r))return!0;n=i}return!1}function oB(t,e){return!!yO(t.map(kre),wO(e))}function kre(t){return t=t.map(wO),t.pop(),t}function wO(t){return[t[0]*yt,t[1]*yt]}function zre(t,e){return(t&&nB.hasOwnProperty(t.type)?nB[t.type]:R1)(t,e)}function aB(t,e,n){var i=vf(t,e-vt,n).concat(e);return function(r){return i.map(function(s){return[r,s]})}}function lB(t,e,n){var i=vf(t,e-vt,n).concat(e);return function(r){return i.map(function(s){return[s,r]})}}function OT(){var t,e,n,i,r,s,o,a,l=10,c=l,u=90,f=360,p,m,v,w,x=2.5;function g(){return{type:"MultiLineString",coordinates:_()}}function _(){return vf(Lg(i/u)*u,n,u).map(v).concat(vf(Lg(a/f)*f,o,f).map(w)).concat(vf(Lg(e/l)*l,t,l).filter(function(y){return Yt(y%u)>vt}).map(p)).concat(vf(Lg(s/c)*c,r,c).filter(function(y){return Yt(y%f)>vt}).map(m))}return g.lines=function(){return _().map(function(y){return{type:"LineString",coordinates:y}})},g.outline=function(){return{type:"Polygon",coordinates:[v(i).concat(w(o).slice(1),v(n).reverse().slice(1),w(a).reverse().slice(1))]}},g.extent=function(y){return arguments.length?g.extentMajor(y).extentMinor(y):g.extentMinor()},g.extentMajor=function(y){return arguments.length?(i=+y[0][0],n=+y[1][0],a=+y[0][1],o=+y[1][1],i>n&&(y=i,i=n,n=y),a>o&&(y=a,a=o,o=y),g.precision(x)):[[i,a],[n,o]]},g.extentMinor=function(y){return arguments.length?(e=+y[0][0],t=+y[1][0],s=+y[0][1],r=+y[1][1],e>t&&(y=e,e=t,t=y),s>r&&(y=s,s=r,r=y),g.precision(x)):[[e,s],[t,r]]},g.step=function(y){return arguments.length?g.stepMajor(y).stepMinor(y):g.stepMinor()},g.stepMajor=function(y){return arguments.length?(u=+y[0],f=+y[1],g):[u,f]},g.stepMinor=function(y){return arguments.length?(l=+y[0],c=+y[1],g):[l,c]},g.precision=function(y){return arguments.length?(x=+y,p=aB(s,r,90),m=lB(e,t,x),v=aB(a,o,90),w=lB(i,n,x),g):x},g.extentMajor([[-180,-90+vt],[180,90-vt]]).extentMinor([[-180,-80-vt],[180,80+vt]])}function Hre(){return OT()()}function Gre(t,e){var n=t[0]*yt,i=t[1]*yt,r=e[0]*yt,s=e[1]*yt,o=ut(i),a=tt(i),l=ut(s),c=tt(s),u=o*ut(n),f=o*tt(n),p=l*ut(r),m=l*tt(r),v=2*dr(Ai(G5(s-i)+o*l*G5(r-n))),w=tt(v),x=v?function(g){var _=tt(g*=v)/w,y=tt(v-g)/w,M=y*u+_*p,E=y*f+_*m,C=y*a+_*c;return[hr(E,M)*mn,hr(C,Ai(M*M+E*E))*mn]}:function(){return[n*mn,i*mn]};return x.distance=v,x}const Fp=t=>t;var eS=new Ji,FA=new Ji,AO,MO,OA,UA,Qa={point:In,lineStart:In,lineEnd:In,polygonStart:function(){Qa.lineStart=Vre,Qa.lineEnd=Wre},polygonEnd:function(){Qa.lineStart=Qa.lineEnd=Qa.point=In,eS.add(Yt(FA)),FA=new Ji},result:function(){var t=eS/2;return eS=new Ji,t}};function Vre(){Qa.point=jre}function jre(t,e){Qa.point=EO,AO=OA=t,MO=UA=e}function EO(t,e){FA.add(UA*t-OA*e),OA=t,UA=e}function Wre(){EO(AO,MO)}const cB=Qa;var Qf=1/0,P1=Qf,Op=-Qf,B1=Op,Xre={point:Jre,lineStart:In,lineEnd:In,polygonStart:In,polygonEnd:In,result:function(){var t=[[Qf,P1],[Op,B1]];return Op=B1=-(P1=Qf=1/0),t}};function Jre(t,e){t<Qf&&(Qf=t),t>Op&&(Op=t),e<P1&&(P1=e),e>B1&&(B1=e)}const L1=Xre;var kA=0,zA=0,vd=0,I1=0,N1=0,yf=0,HA=0,GA=0,yd=0,TO,bO,yo,xo,Gs={point:Wc,lineStart:uB,lineEnd:fB,polygonStart:function(){Gs.lineStart=Qre,Gs.lineEnd=Zre},polygonEnd:function(){Gs.point=Wc,Gs.lineStart=uB,Gs.lineEnd=fB},result:function(){var t=yd?[HA/yd,GA/yd]:yf?[I1/yf,N1/yf]:vd?[kA/vd,zA/vd]:[NaN,NaN];return kA=zA=vd=I1=N1=yf=HA=GA=yd=0,t}};function Wc(t,e){kA+=t,zA+=e,++vd}function uB(){Gs.point=Kre}function Kre(t,e){Gs.point=Yre,Wc(yo=t,xo=e)}function Yre(t,e){var n=t-yo,i=e-xo,r=Ai(n*n+i*i);I1+=r*(yo+t)/2,N1+=r*(xo+e)/2,yf+=r,Wc(yo=t,xo=e)}function fB(){Gs.point=Wc}function Qre(){Gs.point=qre}function Zre(){CO(TO,bO)}function qre(t,e){Gs.point=CO,Wc(TO=yo=t,bO=xo=e)}function CO(t,e){var n=t-yo,i=e-xo,r=Ai(n*n+i*i);I1+=r*(yo+t)/2,N1+=r*(xo+e)/2,yf+=r,r=xo*t-yo*e,HA+=r*(yo+t),GA+=r*(xo+e),yd+=r*3,Wc(yo=t,xo=e)}const hB=Gs;function RO(t){this._context=t}RO.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,fr);break}}},result:In};var VA=new Ji,tS,PO,BO,xd,_d,D1={point:In,lineStart:function(){D1.point=$re},lineEnd:function(){tS&&LO(PO,BO),D1.point=In},polygonStart:function(){tS=!0},polygonEnd:function(){tS=null},result:function(){var t=+VA;return VA=new Ji,t}};function $re(t,e){D1.point=LO,PO=xd=t,BO=_d=e}function LO(t,e){xd-=t,_d-=e,VA.add(Ai(xd*xd+_d*_d)),xd=t,_d=e}const dB=D1;function IO(){this._string=[]}IO.prototype={_radius:4.5,_circle:pB(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._string.push("M",t,",",e),this._point=1;break}case 1:{this._string.push("L",t,",",e);break}default:{this._circle==null&&(this._circle=pB(this._radius)),this._string.push("M",t,",",e,this._circle);break}}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}else return null}};function pB(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function NO(t,e){var n=4.5,i,r;function s(o){return o&&(typeof n=="function"&&r.pointRadius(+n.apply(this,arguments)),Hs(o,i(r))),r.result()}
vendor: 5,282 bytes, line 4001
4001return s.area=function(o){return Hs(o,i(cB)),cB.result()},s.measure=function(o){return Hs(o,i(dB)),dB.result()},s.bounds=function(o){return Hs(o,i(L1)),L1.result()},s.centroid=function(o){return Hs(o,i(hB)),hB.result()},s.projection=function(o){return arguments.length?(i=o==null?(t=null,Fp):(t=o).stream,s):t},s.context=function(o){return arguments.length?(r=o==null?(e=null,new IO):new RO(e=o),typeof n!="function"&&r.pointRadius(n),s):e},s.pointRadius=function(o){return arguments.length?(n=typeof o=="function"?o:(r.pointRadius(+o),+o),s):n},s.projection(t).context(e)}function ese(t){return{stream:vm(t)}}function vm(t){return function(e){var n=new jA;for(var i in t)n[i]=t[i];return n.stream=e,n}}function jA(){}jA.prototype={constructor:jA,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function UT(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),i!=null&&t.clipExtent(null),Hs(n,t.stream(L1)),e(L1.result()),i!=null&&t.clipExtent(i),t}function qy(t,e,n){return UT(t,function(i){var r=e[1][0]-e[0][0],s=e[1][1]-e[0][1],o=Math.min(r/(i[1][0]-i[0][0]),s/(i[1][1]-i[0][1])),a=+e[0][0]+(r-o*(i[1][0]+i[0][0]))/2,l=+e[0][1]+(s-o*(i[1][1]+i[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function kT(t,e,n){return qy(t,[[0,0],e],n)}function zT(t,e,n){return UT(t,function(i){var r=+e,s=r/(i[1][0]-i[0][0]),o=(r-s*(i[1][0]+i[0][0]))/2,a=-s*i[0][1];t.scale(150*s).translate([o,a])},n)}function HT(t,e,n){return UT(t,function(i){var r=+e,s=r/(i[1][1]-i[0][1]),o=-s*i[0][0],a=(r-s*(i[1][1]+i[0][1]))/2;t.scale(150*s).translate([o,a])},n)}var mB=16,tse=ut(30*yt);function gB(t,e){return+e?ise(t,e):nse(t)}function nse(t){return vm({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function ise(t,e){function n(i,r,s,o,a,l,c,u,f,p,m,v,w,x){var g=c-i,_=u-r,y=g*g+_*_;if(y>4*e&&w--){var M=o+p,E=a+m,C=l+v,P=Ai(M*M+E*E+C*C),N=dr(C/=P),R=Yt(Yt(C)-1)<vt||Yt(s-f)<vt?(s+f)/2:hr(E,M),L=t(R,N),k=L[0],$=L[1],ee=k-i,D=$-r,U=_*ee-g*D;(U*U/y>e||Yt((g*ee+_*D)/y-.5)>.3||o*p+a*m+l*v<tse)&&(n(i,r,s,o,a,l,k,$,R,M/=P,E/=P,C,w,x),x.point(k,$),n(k,$,R,M,E,C,c,u,f,p,m,v,w,x))}}return function(i){var r,s,o,a,l,c,u,f,p,m,v,w,x={point:g,lineStart:_,lineEnd:M,polygonStart:function(){i.polygonStart(),x.lineStart=E},polygonEnd:function(){i.polygonEnd(),x.lineStart=_}};function g(N,R){N=t(N,R),i.point(N[0],N[1])}function _(){f=NaN,x.point=y,i.lineStart()}function y(N,R){var L=jc([N,R]),k=t(N,R);n(f,p,u,m,v,w,f=k[0],p=k[1],u=N,m=L[0],v=L[1],w=L[2],mB,i),i.point(f,p)}function M(){x.point=g,i.lineEnd()}function E(){_(),x.point=C,x.lineEnd=P}function C(N,R){y(r=N,R),s=f,o=p,a=m,l=v,c=w,x.point=y}function P(){n(f,p,u,m,v,w,s,o,r,a,l,c,mB,i),x.lineEnd=M,M()}return x}}var rse=vm({point:function(t,e){this.stream.point(t*yt,e*yt)}});function sse(t){return vm({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}function ose(t,e,n,i,r){function s(o,a){return o*=i,a*=r,[e+t*o,n-t*a]}return s.invert=function(o,a){return[(o-e)/t*i,(n-a)/t*r]},s}function vB(t,e,n,i,r,s){if(!s)return ose(t,e,n,i,r);var o=ut(s),a=tt(s),l=o*t,c=a*t,u=o/t,f=a/t,p=(a*n-o*e)/t,m=(a*e+o*n)/t;function v(w,x){return w*=i,x*=r,[l*w-c*x+e,n-c*w-l*x]}return v.invert=function(w,x){return[i*(u*w-f*x+p),r*(m-f*w-u*x)]},v}function Do(t){return GT(function(){return t})()}function GT(t){var e,n=150,i=480,r=250,s=0,o=0,a=0,l=0,c=0,u,f=0,p=1,m=1,v=null,w=LA,x=null,g,_,y,M=Fp,E=.5,C,P,N,R,L;function k(U){return N(U[0]*yt,U[1]*yt)}function $(U){return U=N.invert(U[0],U[1]),U&&[U[0]*mn,U[1]*mn]}k.stream=function(U){return R&&L===U?R:R=rse(sse(u)(w(C(M(L=U)))))},k.preclip=function(U){return arguments.length?(w=U,v=void 0,D()):w},k.postclip=function(U){return arguments.length?(M=U,x=g=_=y=null,D()):M},k.clipAngle=function(U){return arguments.length?(w=+U?_O(v=U*yt):(v=null,LA),D()):v*mn},k.clipExtent=function(U){return arguments.length?(M=U==null?(x=g=_=y=null,Fp):Zy(x=+U[0][0],g=+U[0][1],_=+U[1][0],y=+U[1][1]),D()):x==null?null:[[x,g],[_,y]]},k.scale=function(U){return arguments.length?(n=+U,ee()):n},k.translate=function(U){return arguments.length?(i=+U[0],r=+U[1],ee()):[i,r]},k.center=function(U){return arguments.length?(s=U[0]%360*yt,o=U[1]%360*yt,ee()):[s*mn,o*mn]},k.rotate=function(U){return arguments.length?(a=U[0]%360*yt,l=U[1]%360*yt,c=U.length>2?U[2]%360*yt:0,ee()):[a*mn,l*mn,c*mn]},k.angle=function(U){return arguments.length?(f=U%360*yt,ee()):f*mn},k.reflectX=function(U){return arguments.length?(p=U?-1:1,ee()):p<0},k.reflectY=function(U){return arguments.length?(m=U?-1:1,ee()):m<0},k.precision=function(U){return arguments.length?(C=gB(P,E=U*U),D()):Ai(E)},k.fitExtent=function(U,z){return qy(k,U,z)},k.fitSize=function(U,z){return kT(k,U,z)},k.fitWidth=function(U,z){return zT(k,U,z)},k.fitHeight=function(U,z){return HT(k,U,z)};function ee(){var U=vB(n,0,0,p,m,f).apply(null,e(s,o)),z=vB(n,i-U[0],r-U[1],p,m,f);return u=FT(a,l,c),P=PA(e,z),N=PA(u,P),C=gB(P,E),D()}function D(){return R=L=null,k}return function(){return e=t.apply(this,arguments),k.invert=e.invert&&$,ee()}}function VT(t){var e=0,n=Ut/3,i=GT(t),r=i(e,n);
vendor: 9,716 bytes, line 4001
4001return r.parallels=function(s){return arguments.length?i(e=s[0]*yt,n=s[1]*yt):[e*mn,n*mn]},r}function ase(t){var e=ut(t);function n(i,r){return[i*e,tt(r)/e]}return n.invert=function(i,r){return[i/e,dr(r*e)]},n}function DO(t,e){var n=tt(t),i=(n+tt(e))/2;if(Yt(i)<vt)return ase(t);var r=1+n*(2*i-n),s=Ai(r)/i;function o(a,l){var c=Ai(r-2*i*tt(l))/i;return[c*tt(a*=i),s-c*ut(a)]}return o.invert=function(a,l){var c=s-l,u=hr(a,Yt(c))*ms(c);return c*i<0&&(u-=Ut*ms(a)*ms(c)),[u/i,dr((r-(a*a+c*c)*i*i)/(2*i))]},o}function F1(){return VT(DO).scale(155.424).center([0,33.6442])}function FO(){return F1().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function lse(t){var e=t.length;return{point:function(n,i){for(var r=-1;++r<e;)t[r].point(n,i)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function cse(){var t,e,n=FO(),i,r=F1().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s,o=F1().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a,l,c={point:function(p,m){l=[p,m]}};function u(p){var m=p[0],v=p[1];return l=null,i.point(m,v),l||(s.point(m,v),l)||(a.point(m,v),l)}u.invert=function(p){var m=n.scale(),v=n.translate(),w=(p[0]-v[0])/m,x=(p[1]-v[1])/m;return(x>=.12&&x<.234&&w>=-.425&&w<-.214?r:x>=.166&&x<.234&&w>=-.214&&w<-.115?o:n).invert(p)},u.stream=function(p){return t&&e===p?t:t=lse([n.stream(e=p),r.stream(p),o.stream(p)])},u.precision=function(p){return arguments.length?(n.precision(p),r.precision(p),o.precision(p),f()):n.precision()},u.scale=function(p){return arguments.length?(n.scale(p),r.scale(p*.35),o.scale(p),u.translate(n.translate())):n.scale()},u.translate=function(p){if(!arguments.length)return n.translate();var m=n.scale(),v=+p[0],w=+p[1];return i=n.translate(p).clipExtent([[v-.455*m,w-.238*m],[v+.455*m,w+.238*m]]).stream(c),s=r.translate([v-.307*m,w+.201*m]).clipExtent([[v-.425*m+vt,w+.12*m+vt],[v-.214*m-vt,w+.234*m-vt]]).stream(c),a=o.translate([v-.205*m,w+.212*m]).clipExtent([[v-.214*m+vt,w+.166*m+vt],[v-.115*m-vt,w+.234*m-vt]]).stream(c),f()},u.fitExtent=function(p,m){return qy(u,p,m)},u.fitSize=function(p,m){return kT(u,p,m)},u.fitWidth=function(p,m){return zT(u,p,m)},u.fitHeight=function(p,m){return HT(u,p,m)};function f(){return t=e=null,u}return u.scale(1070)}function OO(t){return function(e,n){var i=ut(e),r=ut(n),s=t(i*r);return s===1/0?[2,0]:[s*r*tt(e),s*tt(n)]}}function ym(t){return function(e,n){var i=Ai(e*e+n*n),r=t(i),s=tt(r),o=ut(r);return[hr(e*s,i*o),dr(i&&n*s/i)]}}var jT=OO(function(t){return Ai(2/(1+t))});jT.invert=ym(function(t){return 2*dr(t/2)});function use(){return Do(jT).scale(124.75).clipAngle(180-.001)}var WT=OO(function(t){return(t=iO(t))&&t/tt(t)});WT.invert=ym(function(t){return t});function fse(){return Do(WT).scale(79.4188).clipAngle(180-.001)}function xm(t,e){return[t,m1(NT((jn+e)/2))]}xm.invert=function(t,e){return[t,2*dh(nO(e))-jn]};function hse(){return UO(xm).scale(961/fr)}function UO(t){var e=Do(t),n=e.center,i=e.scale,r=e.translate,s=e.clipExtent,o=null,a,l,c;e.scale=function(f){return arguments.length?(i(f),u()):i()},e.translate=function(f){return arguments.length?(r(f),u()):r()},e.center=function(f){return arguments.length?(n(f),u()):n()},e.clipExtent=function(f){return arguments.length?(f==null?o=a=l=c=null:(o=+f[0][0],a=+f[0][1],l=+f[1][0],c=+f[1][1]),u()):o==null?null:[[o,a],[l,c]]};function u(){var f=Ut*i(),p=e(pO(e.rotate()).invert([0,0]));return s(o==null?[[p[0]-f,p[1]-f],[p[0]+f,p[1]+f]]:t===xm?[[Math.max(p[0]-f,o),a],[Math.min(p[0]+f,l),c]]:[[o,Math.max(p[1]-f,a)],[l,Math.min(p[1]+f,c)]])}return u()}function Og(t){return NT((jn+t)/2)}function kO(t,e){var n=ut(t),i=t===e?tt(t):m1(n/ut(e))/m1(Og(e)/Og(t)),r=n*Z2(Og(t),i)/i;if(!i)return xm;function s(o,a){r>0?a<-jn+vt&&(a=-jn+vt):a>jn-vt&&(a=jn-vt);var l=r/Z2(Og(a),i);return[l*tt(i*o),r-l*ut(i*o)]}return s.invert=function(o,a){var l=r-a,c=ms(i)*Ai(o*o+l*l),u=hr(o,Yt(l))*ms(l);return l*i<0&&(u-=Ut*ms(o)*ms(l)),[u/i,2*dh(Z2(r/c,1/i))-jn]},s}function dse(){return VT(kO).scale(109.5).parallels([30,30])}function Up(t,e){return[t,e]}Up.invert=Up;function pse(){return Do(Up).scale(152.63)}function zO(t,e){var n=ut(t),i=t===e?tt(t):(n-ut(e))/(e-t),r=n/i+t;if(Yt(i)<vt)return Up;function s(o,a){var l=r-a,c=i*o;return[l*tt(c),r-l*ut(c)]}return s.invert=function(o,a){var l=r-a,c=hr(o,Yt(l))*ms(l);return l*i<0&&(c-=Ut*ms(o)*ms(l)),[c/i,r-ms(i)*Ai(o*o+l*l)]},s}function mse(){return VT(zO).scale(131.154).center([0,13.9389])}var Vd=1.340264,jd=-.081106,Wd=893e-6,Xd=.003796,O1=Ai(3)/2,gse=12;function XT(t,e){var n=dr(O1*tt(e)),i=n*n,r=i*i*i;return[t*ut(n)/(O1*(Vd+3*jd*i+r*(7*Wd+9*Xd*i))),n*(Vd+jd*i+r*(Wd+Xd*i))]}XT.invert=function(t,e){for(var n=e,i=n*n,r=i*i*i,s=0,o,a,l;s<gse&&(a=n*(Vd+jd*i+r*(Wd+Xd*i))-e,l=Vd+3*jd*i+r*(7*Wd+9*Xd*i),n-=o=a/l,i=n*n,r=i*i*i,!(Yt(o)<Dp));++s);return[O1*t*(Vd+3*jd*i+r*(7*Wd+9*Xd*i))/ut(n),dr(tt(n)/O1)]};function vse(){return Do(XT).scale(177.158)}function JT(t,e){var n=ut(e),i=ut(t)*n;return[n*tt(t)/i,tt(e)/i]}JT.invert=ym(dh);function yse(){return Do(JT).scale(144.049).clipAngle(60)}function xse(){var t=1,e=0,n=0,i=1,r=1,s=0,o,a,l=null,c,u,f,p=1,m=1,v=vm({point:function(M,E){var C=y([M,E]);this.stream.point(C[0],C[1])}}),w=Fp,x,g;function _(){return p=t*i,m=t*r,x=g=null,y}function y(M){var E=M[0]*p,C=M[1]*m;if(s){var P=C*o-E*a;E=E*o+C*a,C=P}return[E+e,C+n]}return y.invert=function(M){var E=M[0]-e,C=M[1]-n;if(s){var P=C*o+E*a;E=E*o-C*a,C=P}return[E/p,C/m]},y.stream=function(M){return x&&g===M?x:x=v(w(g=M))},y.postclip=function(M){return arguments.length?(w=M,l=c=u=f=null,_()):w},y.clipExtent=function(M){return arguments.length?(w=M==null?(l=c=u=f=null,Fp):Zy(l=+M[0][0],c=+M[0][1],u=+M[1][0],f=+M[1][1]),_()):l==null?null:[[l,c],[u,f]]},y.scale=function(M){return arguments.length?(t=+M,_()):t},y.translate=function(M){return arguments.length?(e=+M[0],n=+M[1],_()):[e,n]},y.angle=function(M){return arguments.length?(s=M%360*yt,a=tt(s),o=ut(s),_()):s*mn},y.reflectX=function(M){return arguments.length?(i=M?-1:1,_()):i<0},y.reflectY=function(M){return arguments.length?(r=M?-1:1,_()):r<0},y.fitExtent=function(M,E){return qy(y,M,E)},y.fitSize=function(M,E){return kT(y,M,E)},y.fitWidth=function(M,E){return zT(y,M,E)},y.fitHeight=function(M,E){return HT(y,M,E)},y}function KT(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(-.013791+i*(.003971*n-.001529*i))),e*(1.007226+n*(.015085+i*(-.044475+.028874*n-.005916*i)))]}KT.invert=function(t,e){var n=e,i=25,r;do{var s=n*n,o=s*s;n-=r=(n*(1.007226+s*(.015085+o*(-.044475+.028874*s-.005916*o)))-e)/(1.007226+s*(.015085*3+o*(-.044475*7+.028874*9*s-.005916*11*o)))}while(Yt(r)>vt&&--i>0);return[t/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function _se(){return Do(KT).scale(175.295)}function YT(t,e){return[ut(e)*tt(t),tt(e)]}YT.invert=ym(dr);function Sse(){return Do(YT).scale(249.5).clipAngle(90+vt)}function QT(t,e){var n=ut(e),i=1+ut(t)*n;return[n*tt(t)/i,tt(e)/i]}QT.invert=ym(function(t){return 2*dh(t)});function wse(){return Do(QT).scale(250).clipAngle(142)}function ZT(t,e){return[m1(NT((jn+e)/2)),-t]}ZT.invert=function(t,e){return[-e,2*dh(nO(t))-jn]};function Ase(){var t=UO(ZT),e=t.center,n=t.rotate;return t.center=function(i){return arguments.length?e([-i[1],i[0]]):(i=e(),[i[1],-i[0]])},t.rotate=function(i){return arguments.length?n([i[0],i[1],i.length>2?i[2]+90:90]):(i=n(),[i[0],i[1],i[2]-90])},n([0,0,90]).scale(159.155)}const Mse=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:FO,geoAlbersUsa:cse,geoArea:mre,geoAzimuthalEqualArea:use,geoAzimuthalEqualAreaRaw:jT,geoAzimuthalEquidistant:fse,geoAzimuthalEquidistantRaw:WT,geoBounds:xre,geoCentroid:Ere,geoCircle:Tre,geoClipAntimeridian:LA,geoClipCircle:_O,geoClipExtent:Ire,geoClipRectangle:Zy,geoConicConformal:dse,geoConicConformalRaw:kO,geoConicEqualArea:F1,geoConicEqualAreaRaw:DO,geoConicEquidistant:mse,geoConicEquidistantRaw:zO,geoContains:zre,geoDistance:C1,geoEqualEarth:vse,geoEqualEarthRaw:XT,geoEquirectangular:pse,geoEquirectangularRaw:Up,geoGnomonic:yse,geoGnomonicRaw:JT,geoGraticule:OT,geoGraticule10:Hre,geoIdentity:xse,geoInterpolate:Gre,geoLength:SO,geoMercator:hse,geoMercatorRaw:xm,geoNaturalEarth1:_se,geoNaturalEarth1Raw:KT,geoOrthographic:Sse,geoOrthographicRaw:YT,geoPath:NO,geoProjection:Do,geoProjectionMutator:GT,geoRotation:pO,geoStereographic:wse,geoStereographicRaw:QT,geoStream:Hs,geoTransform:ese,geoTransverseMercator:Ase,geoTransverseMercatorRaw:ZT},Symbol.toStringTag,{value:"Module"}));function Ese(t){return t}function Tse(t){if(t==null)return Ese;var e,n,i=t.scale[0],r=t.scale[1],s=t.translate[0],o=t.translate[1];return function(a,l){l||(e=n=0);var c=2,u=a.length,f=new Array(u);for(f[0]=(e+=a[0])*i+s,f[1]=(n+=a[1])*r+o;c<u;)f[c]=a[c],++c;return f}}function bse(t,e){for(var n,i=t.length,r=i-e;r<--i;)n=t[r],t[r++]=t[i],t[i]=n}function Cse(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return yB(t,n)})}:yB(t,e)}function yB(t,e){var n=e.id,i=e.bbox,r=e.properties==null?{}:e.properties,s=HO(t,e);return n==null&&i==null?{type:"Feature",properties:r,geometry:s}:i==null?{type:"Feature",id:n,properties:r,geometry:s}:{type:"Feature",id:n,bbox:i,properties:r,geometry:s}}function HO(t,e){var n=Tse(t.transform),i=t.arcs;function r(u,f){f.length&&f.pop();for(var p=i[u<0?~u:u],m=0,v=p.length;m<v;++m)f.push(n(p[m],m));u<0&&bse(f,v)}function s(u){return n(u)}function o(u){for(var f=[],p=0,m=u.length;p<m;++p)r(u[p],f);
4001return f.length<2&&f.push(f[0]),f}function a(u){for(var f=o(u);f.length<4;)f.push(f[0]);return f}function l(u){return u.map(a)}function c(u){var f=u.type,p;switch(f){case"GeometryCollection":return{type:f,geometries:u.geometries.map(c)};case"Point":p=s(u.coordinates);break;case"MultiPoint":p=u.coordinates.map(s);break;case"LineString":p=o(u.arcs);break;case"MultiLineString":p=u.arcs.map(o);break;case"Polygon":p=l(u.arcs);break;case"MultiPolygon":p=u.arcs.map(l);break;default:return null}return{type:f,coordinates:p}}return c(e)}function Rse(t,e){var n={},i={},r={},s=[],o=-1;e.forEach(function(c,u){var f=t.arcs[c<0?~c:c],p;f.length<3&&!f[1][0]&&!f[1][1]&&(p=e[++o],e[o]=c,e[u]=p)}),e.forEach(function(c){var u=a(c),f=u[0],p=u[1],m,v;if(m=r[f])if(delete r[m.end],m.push(c),m.end=p,v=i[p]){delete i[v.start];var w=v===m?m:m.concat(v);i[w.start=m.start]=r[w.end=v.end]=w}else i[m.start]=r[m.end]=m;else if(m=i[p])if(delete i[m.start],m.unshift(c),m.start=f,v=r[f]){delete r[v.end];var x=v===m?m:v.concat(m);i[x.start=v.start]=r[x.end=m.end]=x}else i[m.start]=r[m.end]=m;else m=[c],i[m.start=f]=r[m.end=p]=m});function a(c){var u=t.arcs[c<0?~c:c],f=u[0],p;return t.transform?(p=[0,0],u.forEach(function(m){p[0]+=m[0],p[1]+=m[1]})):p=u[u.length-1],c<0?[p,f]:[f,p]}function l(c,u){for(var f in c){var p=c[f];delete u[p.start],delete p.start,delete p.end,p.forEach(function(m){n[m<0?~m:m]=1}),s.push(p)}}return l(r,i),l(i,r),e.forEach(function(c){n[c<0?~c:c]||s.push([c])}),s}function xB(t){return HO(t,Pse.apply(this,arguments))}function Pse(t,e,n){var i,r,s;if(arguments.length>1)i=Bse(t,e,n);else for(r=0,i=new Array(s=t.arcs.length);r<s;++r)i[r]=r;return{type:"MultiLineString",arcs:Rse(t,i)}}function Bse(t,e,n){var i=[],r=[],s;function o(f){var p=f<0?~f:f;(r[p]||(r[p]=[])).push({i:f,g:s})}function a(f){f.forEach(o)}function l(f){f.forEach(a)}function c(f){f.forEach(l)}function u(f){switch(s=f,f.type){case"GeometryCollection":f.geometries.forEach(u);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":l(f.arcs);break;case"MultiPolygon":c(f.arcs);break}}return u(e),r.forEach(n==null?function(f){i.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&i.push(f[0].i)}),i}var Lse={value:()=>{}};function qT(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new xv(n)}function xv(t){this._=t}function Ise(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}xv.prototype=qT.prototype={constructor:xv,on:function(t,e){var n=this._,i=Ise(t+"",n),r,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((r=(t=i[s]).type)&&(r=Nse(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(r=(t=i[s]).type)n[r]=_B(n[r],t.name,e);else if(e==null)for(r in n)n[r]=_B(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xv(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function Nse(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function _B(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Lse,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var WA="http://www.w3.org/1999/xhtml";const SB={svg:"http://www.w3.org/2000/svg",xhtml:WA,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $y(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),SB.hasOwnProperty(e)?{space:SB[e],local:t}:t}function Dse(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===WA&&e.documentElement.namespaceURI===WA?e.createElement(t):e.createElementNS(n,t)}}function Fse(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function GO(t){var e=$y(t);return(e.local?Fse:Dse)(e)}function Ose(){}function $T(t){return t==null?Ose:function(){return this.querySelector(t)}}function Use(t){typeof t!="function"&&(t=$T(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=new Array(o),l,c,u=0;u<o;++u)(l=s[u])&&(c=t.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new Pr(i,this._parents)}function VO(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function kse(){return[]}
vendor: 6,958 bytes, line 4001
4001function jO(t){return t==null?kse:function(){return this.querySelectorAll(t)}}function zse(t){return function(){var e=t.apply(this,arguments);return e==null?[]:VO(e)}}function Hse(t){typeof t=="function"?t=zse(t):t=jO(t);for(var e=this._groups,n=e.length,i=[],r=[],s=0;s<n;++s)for(var o=e[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&(i.push(t.call(l,l.__data__,c,o)),r.push(l));return new Pr(i,r)}function WO(t){return function(){return this.matches(t)}}function XO(t){return function(e){return e.matches(t)}}var Gse=Array.prototype.find;function Vse(t){return function(){return Gse.call(this.children,t)}}function jse(){return this.firstElementChild}function Wse(t){return this.select(t==null?jse:Vse(typeof t=="function"?t:XO(t)))}var Xse=Array.prototype.filter;function Jse(){return this.children}function Kse(t){return function(){return Xse.call(this.children,t)}}function Yse(t){return this.selectAll(t==null?Jse:Kse(typeof t=="function"?t:XO(t)))}function Qse(t){typeof t!="function"&&(t=WO(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],l,c=0;c<o;++c)(l=s[c])&&t.call(l,l.__data__,c,s)&&a.push(l);return new Pr(i,this._parents)}function JO(t){return new Array(t.length)}function Zse(){return new Pr(this._enter||this._groups.map(JO),this._parents)}function U1(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}U1.prototype={constructor:U1,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function qse(t){return function(){return t}}function $se(t,e,n,i,r,s){for(var o=0,a,l=e.length,c=s.length;o<c;++o)(a=e[o])?(a.__data__=s[o],i[o]=a):n[o]=new U1(t,s[o]);for(;o<l;++o)(a=e[o])&&(r[o]=a)}function eoe(t,e,n,i,r,s,o){var a,l,c=new Map,u=e.length,f=s.length,p=new Array(u),m;for(a=0;a<u;++a)(l=e[a])&&(p[a]=m=o.call(l,l.__data__,a,e)+"",c.has(m)?r[a]=l:c.set(m,l));for(a=0;a<f;++a)m=o.call(t,s[a],a,s)+"",(l=c.get(m))?(i[a]=l,l.__data__=s[a],c.delete(m)):n[a]=new U1(t,s[a]);for(a=0;a<u;++a)(l=e[a])&&c.get(p[a])===l&&(r[a]=l)}function toe(t){return t.__data__}function noe(t,e){if(!arguments.length)return Array.from(this,toe);var n=e?eoe:$se,i=this._parents,r=this._groups;typeof t!="function"&&(t=qse(t));for(var s=r.length,o=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var u=i[c],f=r[c],p=f.length,m=VO(t.call(u,u&&u.__data__,c,i)),v=m.length,w=a[c]=new Array(v),x=o[c]=new Array(v),g=l[c]=new Array(p);n(u,f,w,x,g,m,e);for(var _=0,y=0,M,E;_<v;++_)if(M=w[_]){for(_>=y&&(y=_+1);!(E=x[y])&&++y<v;);M._next=E||null}}return o=new Pr(o,i),o._enter=a,o._exit=l,o}function ioe(){return new Pr(this._exit||this._groups.map(JO),this._parents)}function roe(t,e,n){var i=this.enter(),r=this,s=this.exit();return i=typeof t=="function"?t(i):i.append(t+""),e!=null&&(r=e(r)),n==null?s.remove():n(s),i&&r?i.merge(r).order():r}function soe(t){if(!(t instanceof Pr))throw new Error("invalid merge");for(var e=this._groups,n=t._groups,i=e.length,r=n.length,s=Math.min(i,r),o=new Array(i),a=0;a<s;++a)for(var l=e[a],c=n[a],u=l.length,f=o[a]=new Array(u),p,m=0;m<u;++m)(p=l[m]||c[m])&&(f[m]=p);for(;a<i;++a)o[a]=e[a];return new Pr(o,this._parents)}function ooe(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,s=i[r],o;--r>=0;)(o=i[r])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function aoe(t){t||(t=loe);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}for(var n=this._groups,i=n.length,r=new Array(i),s=0;s<i;++s){for(var o=n[s],a=o.length,l=r[s]=new Array(a),c,u=0;u<a;++u)(c=o[u])&&(l[u]=c);l.sort(e)}return new Pr(r,this._parents).order()}function loe(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function coe(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function uoe(){return Array.from(this)}function foe(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length;r<s;++r){var o=i[r];if(o)return o}return null}function hoe(){let t=0;for(const e of this)++t;return t}function doe(){return!this.node()}function poe(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],s=0,o=r.length,a;s<o;++s)(a=r[s])&&t.call(a,a.__data__,s,r);return this}function moe(t){return function(){this.removeAttribute(t)}}function goe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function voe(t,e){return function(){this.setAttribute(t,e)}}function yoe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function xoe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function _oe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Soe(t,e){var n=$y(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?goe:moe:typeof e=="function"?n.local?_oe:xoe:n.local?yoe:voe)(n,e))}function KO(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function woe(t){return function(){this.style.removeProperty(t)}}function Aoe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Moe(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Eoe(t,e,n){return arguments.length>1?this.each((e==null?woe:typeof e=="function"?Moe:Aoe)(t,e,n??"")):Zf(this.node(),t)}function Zf(t,e){return t.style.getPropertyValue(e)||KO(t).getComputedStyle(t,null).getPropertyValue(e)}function Toe(t){return function(){delete this[t]}}function boe(t,e){return function(){this[t]=e}}function Coe(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Roe(t,e){return arguments.length>1?this.each((e==null?Toe:typeof e=="function"?Coe:boe)(t,e)):this.node()[t]}function YO(t){return t.trim().split(/^|\s+/)}function e3(t){return t.classList||new QO(t)}function QO(t){this._node=t,this._names=YO(t.getAttribute("class")||"")}QO.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ZO(t,e){for(var n=e3(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function qO(t,e){for(var n=e3(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Poe(t){return function(){ZO(this,t)}}function Boe(t){return function(){qO(this,t)}}function Loe(t,e){return function(){(e.apply(this,arguments)?ZO:qO)(this,t)}}function Ioe(t,e){var n=YO(t+"");
vendor: 5,570 bytes, line 4001
4001if(arguments.length<2){for(var i=e3(this.node()),r=-1,s=n.length;++r<s;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Loe:e?Poe:Boe)(n,e))}function Noe(){this.textContent=""}function Doe(t){return function(){this.textContent=t}}function Foe(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ooe(t){return arguments.length?this.each(t==null?Noe:(typeof t=="function"?Foe:Doe)(t)):this.node().textContent}function Uoe(){this.innerHTML=""}function koe(t){return function(){this.innerHTML=t}}function zoe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Hoe(t){return arguments.length?this.each(t==null?Uoe:(typeof t=="function"?zoe:koe)(t)):this.node().innerHTML}function Goe(){this.nextSibling&&this.parentNode.appendChild(this)}function Voe(){return this.each(Goe)}function joe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Woe(){return this.each(joe)}function Xoe(t){var e=typeof t=="function"?t:GO(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Joe(){return null}function Koe(t,e){var n=typeof t=="function"?t:GO(t),i=e==null?Joe:typeof e=="function"?e:$T(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Yoe(){var t=this.parentNode;t&&t.removeChild(this)}function Qoe(){return this.each(Yoe)}function Zoe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function qoe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $oe(t){return this.select(t?qoe:Zoe)}function eae(t){return arguments.length?this.property("__data__",t):this.node().__data__}function tae(t){return function(e){t.call(this,e,this.__data__)}}function nae(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function iae(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,s;n<r;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function rae(t,e,n){return function(){var i=this.__on,r,s=tae(e);if(i){for(var o=0,a=i.length;o<a;++o)if((r=i[o]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=e;return}}this.addEventListener(t.type,s,n),r={type:t.type,name:t.name,value:e,listener:s,options:n},i?i.push(r):this.__on=[r]}}function sae(t,e,n){var i=nae(t+""),r,s=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,u;l<c;++l)for(r=0,u=a[l];r<s;++r)if((o=i[r]).type===u.type&&o.name===u.name)return u.value}return}for(a=e?rae:iae,r=0;r<s;++r)this.each(a(i[r],e,n));return this}function $O(t,e,n){var i=KO(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function oae(t,e){return function(){return $O(this,t,e)}}function aae(t,e){return function(){return $O(this,t,e.apply(this,arguments))}}function lae(t,e){return this.each((typeof e=="function"?aae:oae)(t,e))}function*cae(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length,o;r<s;++r)(o=i[r])&&(yield o)}var e9=[null];function Pr(t,e){this._groups=t,this._parents=e}function _m(){return new Pr([[document.documentElement]],e9)}function uae(){return this}Pr.prototype=_m.prototype={constructor:Pr,select:Use,selectAll:Hse,selectChild:Wse,selectChildren:Yse,filter:Qse,data:noe,enter:Zse,exit:ioe,join:roe,merge:soe,selection:uae,order:ooe,sort:aoe,call:coe,nodes:uoe,node:foe,size:hoe,empty:doe,each:poe,attr:Soe,style:Eoe,property:Roe,classed:Ioe,text:Ooe,html:Hoe,raise:Voe,lower:Woe,append:Xoe,insert:Koe,remove:Qoe,clone:$oe,datum:eae,on:sae,dispatch:lae,[Symbol.iterator]:cae};function ra(t){return typeof t=="string"?new Pr([[document.querySelector(t)]],[document.documentElement]):new Pr([[t]],e9)}function fae(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ql(t,e){if(t=fae(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}function XA(t){t.preventDefault(),t.stopImmediatePropagation()}function hae(t){var e=t.document.documentElement,n=ra(t).on("dragstart.drag",XA,!0);"onselectstart"in e?n.on("selectstart.drag",XA,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function dae(t,e){var n=t.document.documentElement,i=ra(t).on("dragstart.drag",null);e&&(i.on("click.drag",XA,!0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function t3(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function t9(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Sm(){}var kp=.7,k1=1/kp,Lf="\\s*([+-]?\\d+)\\s*",zp="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Co="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pae=/^#([0-9a-f]{3,8})$/,mae=new RegExp("^rgb\\("+[Lf,Lf,Lf]+"\\)$"),gae=new RegExp("^rgb\\("+[Co,Co,
vendor: 8,957 bytes, line 4001
4001Co]+"\\)$"),vae=new RegExp("^rgba\\("+[Lf,Lf,Lf,zp]+"\\)$"),yae=new RegExp("^rgba\\("+[Co,Co,Co,zp]+"\\)$"),xae=new RegExp("^hsl\\("+[zp,Co,Co]+"\\)$"),_ae=new RegExp("^hsla\\("+[zp,Co,Co,zp]+"\\)$"),wB={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};t3(Sm,Hp,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:AB,formatHex:AB,formatHsl:Sae,formatRgb:MB,toString:MB});function AB(){return this.rgb().formatHex()}function Sae(){return n9(this).formatHsl()}function MB(){return this.rgb().formatRgb()}function Hp(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=pae.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?EB(e):n===3?new Wr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ug(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ug(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=mae.exec(t))?new Wr(e[1],e[2],e[3],1):(e=gae.exec(t))?new Wr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=vae.exec(t))?Ug(e[1],e[2],e[3],e[4]):(e=yae.exec(t))?Ug(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=xae.exec(t))?CB(e[1],e[2]/100,e[3]/100,1):(e=_ae.exec(t))?CB(e[1],e[2]/100,e[3]/100,e[4]):wB.hasOwnProperty(t)?EB(wB[t]):t==="transparent"?new Wr(NaN,NaN,NaN,0):null}function EB(t){return new Wr(t>>16&255,t>>8&255,t&255,1)}function Ug(t,e,n,i){return i<=0&&(t=e=n=NaN),new Wr(t,e,n,i)}function wae(t){return t instanceof Sm||(t=Hp(t)),t?(t=t.rgb(),new Wr(t.r,t.g,t.b,t.opacity)):new Wr}function JA(t,e,n,i){return arguments.length===1?wae(t):new Wr(t,e,n,i??1)}function Wr(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}t3(Wr,JA,t9(Sm,{brighter:function(t){return t=t==null?k1:Math.pow(k1,t),new Wr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?kp:Math.pow(kp,t),new Wr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:TB,formatHex:TB,formatRgb:bB,toString:bB}));function TB(){return"#"+nS(this.r)+nS(this.g)+nS(this.b)}function bB(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}function nS(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function CB(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _o(t,e,n,i)}function n9(t){if(t instanceof _o)return new _o(t.h,t.s,t.l,t.opacity);if(t instanceof Sm||(t=Hp(t)),!t)return new _o;if(t instanceof _o)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(e===s?o=(n-i)/a+(n<i)*6:n===s?o=(i-e)/a+2:o=(e-n)/a+4,a/=l<.5?s+r:2-s-r,o*=60):a=l>0&&l<1?0:o,new _o(o,a,l,t.opacity)}function Aae(t,e,n,i){return arguments.length===1?n9(t):new _o(t,e,n,i??1)}function _o(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}t3(_o,Aae,t9(Sm,{brighter:function(t){return t=t==null?k1:Math.pow(k1,t),new _o(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?kp:Math.pow(kp,t),new _o(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Wr(iS(t>=240?t-240:t+120,r,i),iS(t,r,i),iS(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(t===1?")":", "+t+")")}}));function iS(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const i9=t=>()=>t;function Mae(t,e){return function(n){return t+n*e}}function Eae(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Tae(t){return(t=+t)==1?r9:function(e,n){return n-e?Eae(e,n,t):i9(isNaN(e)?n:e)}}function r9(t,e){var n=e-t;return n?Mae(t,n):i9(isNaN(t)?e:t)}const RB=function t(e){var n=Tae(e);function i(r,s){var o=n((r=JA(r)).r,(s=JA(s)).r),a=n(r.g,s.g),l=n(r.b,s.b),c=r9(r.opacity,s.opacity);return function(u){return r.r=o(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function Ja(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var KA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rS=new RegExp(KA.source,"g");function bae(t){return function(){return t}}function Cae(t){return function(e){return t(e)+""}}function Rae(t,e){var n=KA.lastIndex=rS.lastIndex=0,i,r,s,o=-1,a=[],l=[];for(t=t+"",e=e+"";(i=KA.exec(t))&&(r=rS.exec(e));)(s=r.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:Ja(i,r)})),n=rS.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?Cae(l[0].x):bae(e):(e=l.length,function(c){for(var u=0,f;u<e;++u)a[(f=l[u]).i]=f.x(c);return a.join("")})}var PB=180/Math.PI,YA={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function s9(t,e,n,i,r,s){var o,a,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:r,translateY:s,rotate:Math.atan2(e,t)*PB,skewX:Math.atan(l)*PB,scaleX:o,scaleY:a}}var kg;function Pae(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?YA:s9(e.a,e.b,e.c,e.d,e.e,e.f)}function Bae(t){return t==null||(kg||(kg=document.createElementNS("http://www.w3.org/2000/svg","g")),kg.setAttribute("transform",t),!(t=kg.transform.baseVal.consolidate()))?YA:(t=t.matrix,s9(t.a,t.b,t.c,t.d,t.e,t.f))}function o9(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function s(c,u,f,p,m,v){if(c!==f||u!==p){var w=m.push("translate(",null,e,null,n);v.push({i:w-4,x:Ja(c,f)},{i:w-2,x:Ja(u,p)})}else(f||p)&&m.push("translate("+f+e+p+n)}function o(c,u,f,p){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),p.push({i:f.push(r(f)+"rotate(",null,i)-2,x:Ja(c,u)})):u&&f.push(r(f)+"rotate("+u+i)}
vendor: 7,354 bytes, line 4001
4001function a(c,u,f,p){c!==u?p.push({i:f.push(r(f)+"skewX(",null,i)-2,x:Ja(c,u)}):u&&f.push(r(f)+"skewX("+u+i)}function l(c,u,f,p,m,v){if(c!==f||u!==p){var w=m.push(r(m)+"scale(",null,",",null,")");v.push({i:w-4,x:Ja(c,f)},{i:w-2,x:Ja(u,p)})}else(f!==1||p!==1)&&m.push(r(m)+"scale("+f+","+p+")")}return function(c,u){var f=[],p=[];return c=t(c),u=t(u),s(c.translateX,c.translateY,u.translateX,u.translateY,f,p),o(c.rotate,u.rotate,f,p),a(c.skewX,u.skewX,f,p),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,f,p),c=u=null,function(m){for(var v=-1,w=p.length,x;++v<w;)f[(x=p[v]).i]=x.x(m);return f.join("")}}}var Lae=o9(Pae,"px, ","px)","deg)"),Iae=o9(Bae,", ",")",")"),Nae=1e-12;function BB(t){return((t=Math.exp(t))+1/t)/2}function Dae(t){return((t=Math.exp(t))-1/t)/2}function Fae(t){return((t=Math.exp(2*t))-1)/(t+1)}const Oae=function t(e,n,i){function r(s,o){var a=s[0],l=s[1],c=s[2],u=o[0],f=o[1],p=o[2],m=u-a,v=f-l,w=m*m+v*v,x,g;if(w<Nae)g=Math.log(p/c)/e,x=function(P){return[a+P*m,l+P*v,c*Math.exp(e*P*g)]};else{var _=Math.sqrt(w),y=(p*p-c*c+i*w)/(2*c*n*_),M=(p*p-c*c-i*w)/(2*p*n*_),E=Math.log(Math.sqrt(y*y+1)-y),C=Math.log(Math.sqrt(M*M+1)-M);g=(C-E)/e,x=function(P){var N=P*g,R=BB(E),L=c/(n*_)*(R*Fae(e*N+E)-Dae(E));return[a+L*m,l+L*v,c*R/BB(e*N+E)]}}return x.duration=g*1e3*e/Math.SQRT2,x}return r.rho=function(s){var o=Math.max(.001,+s),a=o*o,l=a*a;return t(o,a,l)},r}(Math.SQRT2,2,4);var qf=0,Sd=0,od=0,a9=1e3,z1,wd,H1=0,Xc=0,ex=0,Gp=typeof performance=="object"&&performance.now?performance:Date,l9=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function n3(){return Xc||(l9(Uae),Xc=Gp.now()+ex)}function Uae(){Xc=0}function G1(){this._call=this._time=this._next=null}G1.prototype=c9.prototype={constructor:G1,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?n3():+n)+(e==null?0:+e),!this._next&&wd!==this&&(wd?wd._next=this:z1=this,wd=this),this._call=t,this._time=n,QA()},stop:function(){this._call&&(this._call=null,this._time=1/0,QA())}};function c9(t,e,n){var i=new G1;return i.restart(t,e,n),i}function kae(){n3(),++qf;for(var t=z1,e;t;)(e=Xc-t._time)>=0&&t._call.call(null,e),t=t._next;--qf}function LB(){Xc=(H1=Gp.now())+ex,qf=Sd=0;try{kae()}finally{qf=0,Hae(),Xc=0}}function zae(){var t=Gp.now(),e=t-H1;e>a9&&(ex-=e,H1=t)}function Hae(){for(var t,e=z1,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:z1=n);wd=t,QA(i)}function QA(t){if(!qf){Sd&&(Sd=clearTimeout(Sd));var e=t-Xc;e>24?(t<1/0&&(Sd=setTimeout(LB,t-Gp.now()-ex)),od&&(od=clearInterval(od))):(od||(H1=Gp.now(),od=setInterval(zae,a9)),qf=1,l9(LB))}}function IB(t,e,n){var i=new G1;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var Gae=qT("start","end","cancel","interrupt"),Vae=[],u9=0,NB=1,ZA=2,_v=3,DB=4,qA=5,Sv=6;function tx(t,e,n,i,r,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;jae(t,n,{name:e,index:i,group:r,on:Gae,tween:Vae,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:u9})}function i3(t,e){var n=so(t,e);if(n.state>u9)throw new Error("too late; already scheduled");return n}function Fo(t,e){var n=so(t,e);if(n.state>_v)throw new Error("too late; already running");return n}function so(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function jae(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=c9(s,0,n.time);function s(c){n.state=NB,n.timer.restart(o,n.delay,n.time),n.delay<=c&&o(c-n.delay)}function o(c){var u,f,p,m;if(n.state!==NB)return l();for(u in i)if(m=i[u],m.name===n.name){if(m.state===_v)return IB(o);m.state===DB?(m.state=Sv,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete i[u]):+u<e&&(m.state=Sv,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete i[u])}if(IB(function(){n.state===_v&&(n.state=DB,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=ZA,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ZA){for(n.state=_v,r=new Array(p=n.tween.length),u=0,f=-1;u<p;++u)(m=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++f]=m);r.length=f+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=qA,1),f=-1,p=r.length;++f<p;)r[f].call(t,u);n.state===qA&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Sv,n.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function wv(t,e){var n=t.__transition,i,r,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((i=n[o]).name!==e){s=!1;continue}r=i.state>ZA&&i.state<qA,i.state=Sv,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[o]}s&&delete t.__transition}}function Wae(t){return this.each(function(){wv(this,t)})}function Xae(t,e){var n,i;return function(){var r=Fo(this,t),s=r.tween;if(s!==n){i=n=s;for(var o=0,a=i.length;o<a;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}r.tween=i}}function Jae(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var s=Fo(this,t),o=s.tween;if(o!==i){r=(i=o).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}s.tween=r}}function Kae(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=so(this.node(),n).tween,r=0,s=i.length,o;r<s;++r)if((o=i[r]).name===t)return o.value;return null}return this.each((e==null?Xae:Jae)(n,t,e))}function r3(t,e,n){var i=t._id;return t.each(function(){var r=Fo(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return so(r,i).value[e]}}function f9(t,e){var n;return(typeof e=="number"?Ja:e instanceof Hp?RB:(n=Hp(e))?(e=n,RB):Rae)(t,e)}function Yae(t){return function(){this.removeAttribute(t)}}function Qae(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Zae(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttribute(t);return o===r?null:o===i?s:s=e(i=o,n)}}function qae(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===r?null:o===i?s:s=e(i=o,n)}}function $ae(t,e,n){var i,r,s;return function(){var o,a=n(this),l;return a==null?void this.removeAttribute(t):(o=this.getAttribute(t),l=a+"",o===l?null:o===i&&l===r?s:(r=l,s=e(i=o,a)))}}function ele(t,e,n){var i,r,s;return function(){var o,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),l=a+"",o===l?null:o===i&&l===r?s:(r=l,s=e(i=o,a)))}}function tle(t,e){var n=$y(t),i=n==="transform"?Iae:f9;return this.attrTween(t,typeof e=="function"?(n.local?ele:$ae)(n,i,r3(this,"attr."+t,e)):e==null?(n.local?Qae:Yae)(n):(n.local?qae:Zae)(n,i,e))}function nle(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ile(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function rle(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&ile(t,s)),n}return r._value=e,r}function sle(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&nle(t,s)),n}return r._value=e,r}function ole(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=$y(t);return this.tween(n,(i.local?rle:sle)(i,e))}
vendor: 5,127 bytes, line 4001
4001function ale(t,e){return function(){i3(this,t).delay=+e.apply(this,arguments)}}function lle(t,e){return e=+e,function(){i3(this,t).delay=e}}function cle(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ale:lle)(e,t)):so(this.node(),e).delay}function ule(t,e){return function(){Fo(this,t).duration=+e.apply(this,arguments)}}function fle(t,e){return e=+e,function(){Fo(this,t).duration=e}}function hle(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ule:fle)(e,t)):so(this.node(),e).duration}function dle(t,e){if(typeof e!="function")throw new Error;return function(){Fo(this,t).ease=e}}function ple(t){var e=this._id;return arguments.length?this.each(dle(e,t)):so(this.node(),e).ease}function mle(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Fo(this,t).ease=n}}function gle(t){if(typeof t!="function")throw new Error;return this.each(mle(this._id,t))}function vle(t){typeof t!="function"&&(t=WO(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],l,c=0;c<o;++c)(l=s[c])&&t.call(l,l.__data__,c,s)&&a.push(l);return new Sa(i,this._parents,this._name,this._id)}function yle(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,s=Math.min(i,r),o=new Array(i),a=0;a<s;++a)for(var l=e[a],c=n[a],u=l.length,f=o[a]=new Array(u),p,m=0;m<u;++m)(p=l[m]||c[m])&&(f[m]=p);for(;a<i;++a)o[a]=e[a];return new Sa(o,this._parents,this._name,this._id)}function xle(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function _le(t,e,n){var i,r,s=xle(e)?i3:Fo;return function(){var o=s(this,t),a=o.on;a!==i&&(r=(i=a).copy()).on(e,n),o.on=r}}function Sle(t,e){var n=this._id;return arguments.length<2?so(this.node(),n).on.on(t):this.each(_le(n,t,e))}function wle(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ale(){return this.on("end.remove",wle(this._id))}function Mle(t){var e=this._name,n=this._id;typeof t!="function"&&(t=$T(t));for(var i=this._groups,r=i.length,s=new Array(r),o=0;o<r;++o)for(var a=i[o],l=a.length,c=s[o]=new Array(l),u,f,p=0;p<l;++p)(u=a[p])&&(f=t.call(u,u.__data__,p,a))&&("__data__"in u&&(f.__data__=u.__data__),c[p]=f,tx(c[p],e,n,p,c,so(u,n)));return new Sa(s,this._parents,e,n)}function Ele(t){var e=this._name,n=this._id;typeof t!="function"&&(t=jO(t));for(var i=this._groups,r=i.length,s=[],o=[],a=0;a<r;++a)for(var l=i[a],c=l.length,u,f=0;f<c;++f)if(u=l[f]){for(var p=t.call(u,u.__data__,f,l),m,v=so(u,n),w=0,x=p.length;w<x;++w)(m=p[w])&&tx(m,e,n,w,p,v);s.push(p),o.push(u)}return new Sa(s,o,e,n)}var Tle=_m.prototype.constructor;function ble(){return new Tle(this._groups,this._parents)}function Cle(t,e){var n,i,r;return function(){var s=Zf(this,t),o=(this.style.removeProperty(t),Zf(this,t));return s===o?null:s===n&&o===i?r:r=e(n=s,i=o)}}function h9(t){return function(){this.style.removeProperty(t)}}function Rle(t,e,n){var i,r=n+"",s;return function(){var o=Zf(this,t);return o===r?null:o===i?s:s=e(i=o,n)}}function Ple(t,e,n){var i,r,s;return function(){var o=Zf(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Zf(this,t))),o===l?null:o===i&&l===r?s:(r=l,s=e(i=o,a))}}function Ble(t,e){var n,i,r,s="style."+e,o="end."+s,a;return function(){var l=Fo(this,t),c=l.on,u=l.value[s]==null?a||(a=h9(e)):void 0;(c!==n||r!==u)&&(i=(n=c).copy()).on(o,r=u),l.on=i}}function Lle(t,e,n){var i=(t+="")=="transform"?Lae:f9;return e==null?this.styleTween(t,Cle(t,i)).on("end.style."+t,h9(t)):typeof e=="function"?this.styleTween(t,Ple(t,i,r3(this,"style."+t,e))).each(Ble(this._id,t)):this.styleTween(t,Rle(t,i,e),n).on("end.style."+t,null)}function Ile(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Nle(t,e,n){var i,r;function s(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&Ile(t,o,n)),i}return s._value=e,s}function Dle(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Nle(t,e,n??""))}function Fle(t){return function(){this.textContent=t}}function Ole(t){return function(){var e=t(this);this.textContent=e??""}}function Ule(t){return this.tween("text",typeof t=="function"?Ole(r3(this,"text",t)):Fle(t==null?"":t+""))}function kle(t){return function(e){this.textContent=t.call(this,e)}}function zle(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&kle(r)),e}return i._value=t,i}function Hle(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,zle(t))}function Gle(){for(var t=this._name,e=this._id,n=d9(),i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,l,c=0;c<a;++c)if(l=o[c]){var u=so(l,e);tx(l,t,n,c,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Sa(i,this._parents,t,n)}
vendor: 8,974 bytes, line 4001
4001function Vle(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(s,o){var a={value:o},l={value:function(){--r===0&&s()}};n.each(function(){var c=Fo(this,i),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&s()})}var jle=0;function Sa(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function d9(){return++jle}var $l=_m.prototype;Sa.prototype={constructor:Sa,select:Mle,selectAll:Ele,filter:vle,merge:yle,selection:ble,transition:Gle,call:$l.call,nodes:$l.nodes,node:$l.node,size:$l.size,empty:$l.empty,each:$l.each,on:Sle,attr:tle,attrTween:ole,style:Lle,styleTween:Dle,text:Ule,textTween:Hle,remove:Ale,tween:Kae,delay:cle,duration:hle,ease:ple,easeVarying:gle,end:Vle,[Symbol.iterator]:$l[Symbol.iterator]};function Wle(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Xle={time:null,delay:0,duration:250,ease:Wle};function Jle(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Kle(t){var e,n;t instanceof Sa?(e=t._id,t=t._name):(e=d9(),(n=Xle).time=n3(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&tx(l,t,e,c,o,n||Jle(l,e));return new Sa(i,this._parents,t,e)}_m.prototype.interrupt=Wae;_m.prototype.transition=Kle;const zg=t=>()=>t;function Yle(t,{sourceEvent:e,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function la(t,e,n){this.k=t,this.x=e,this.y=n}la.prototype={constructor:la,scale:function(t){return t===1?this:new la(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new la(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var s3=new la(1,0,0);la.prototype;function sS(t){t.stopImmediatePropagation()}function ad(t){t.preventDefault(),t.stopImmediatePropagation()}function Qle(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Zle(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function FB(){return this.__zoom||s3}function qle(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $le(){return navigator.maxTouchPoints||"ontouchstart"in this}function ece(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function tce(){var t=Qle,e=Zle,n=ece,i=qle,r=$le,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,l=Oae,c=qT("start","zoom","end"),u,f,p,m=500,v=150,w=0,x=10;function g(D){D.property("__zoom",FB).on("wheel.zoom",N).on("mousedown.zoom",R).on("dblclick.zoom",L).filter(r).on("touchstart.zoom",k).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",ee).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(D,U,z,Y){var O=D.selection?D.selection():D;O.property("__zoom",FB),D!==O?E(D,U,z,Y):O.interrupt().each(function(){C(this,arguments).event(Y).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},g.scaleBy=function(D,U,z,Y){g.scaleTo(D,function(){var O=this.__zoom.k,H=typeof U=="function"?U.apply(this,arguments):U;return O*H},z,Y)},g.scaleTo=function(D,U,z,Y){g.transform(D,function(){var O=e.apply(this,arguments),H=this.__zoom,W=z==null?M(O):typeof z=="function"?z.apply(this,arguments):z,j=H.invert(W),Z=typeof U=="function"?U.apply(this,arguments):U;return n(y(_(H,Z),W,j),O,o)},z,Y)},g.translateBy=function(D,U,z,Y){g.transform(D,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof z=="function"?z.apply(this,arguments):z),e.apply(this,arguments),o)},null,Y)},g.translateTo=function(D,U,z,Y,O){g.transform(D,function(){var H=e.apply(this,arguments),W=this.__zoom,j=Y==null?M(H):typeof Y=="function"?Y.apply(this,arguments):Y;return n(s3.translate(j[0],j[1]).scale(W.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof z=="function"?-z.apply(this,arguments):-z),H,o)},Y,O)};function _(D,U){return U=Math.max(s[0],Math.min(s[1],U)),U===D.k?D:new la(U,D.x,D.y)}function y(D,U,z){var Y=U[0]-z[0]*D.k,O=U[1]-z[1]*D.k;return Y===D.x&&O===D.y?D:new la(D.k,Y,O)}function M(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function E(D,U,z,Y){D.on("start.zoom",function(){C(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(Y).end()}).tween("zoom",function(){var O=this,H=arguments,W=C(O,H).event(Y),j=e.apply(O,H),Z=z==null?M(j):typeof z=="function"?z.apply(O,H):z,re=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),ue=O.__zoom,ve=typeof U=="function"?U.apply(O,H):U,Re=l(ue.invert(Z).concat(re/ue.k),ve.invert(Z).concat(re/ve.k));return function(Le){if(Le===1)Le=ve;else{var ze=Re(Le),Qe=re/ze[2];Le=new la(Qe,Z[0]-ze[0]*Qe,Z[1]-ze[1]*Qe)}W.zoom(null,Le)}})}function C(D,U,z){return!z&&D.__zooming||new P(D,U)}function P(D,U){this.that=D,this.args=U,this.active=0,this.sourceEvent=null,this.extent=e.apply(D,U),this.taps=0}P.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,U){return this.mouse&&D!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var U=ra(this.that).datum();c.call(D,this.that,new Yle(D,{sourceEvent:this.sourceEvent,target:g,type:D,transform:this.that.__zoom,dispatch:c}),U)}};function N(D,...U){if(!t.apply(this,arguments))return;var z=C(this,U).event(D),Y=this.__zoom,O=Math.max(s[0],Math.min(s[1],Y.k*Math.pow(2,i.apply(this,arguments)))),H=ql(D);if(z.wheel)(z.mouse[0][0]!==H[0]||z.mouse[0][1]!==H[1])&&(z.mouse[1]=Y.invert(z.mouse[0]=H)),clearTimeout(z.wheel);else{if(Y.k===O)return;z.mouse=[H,Y.invert(H)],wv(this),z.start()}ad(D),z.wheel=setTimeout(W,v),z.zoom("mouse",n(y(_(Y,O),z.mouse[0],z.mouse[1]),z.extent,o));function W(){z.wheel=null,z.end()}}function R(D,...U){if(p||!t.apply(this,arguments))return;var z=C(this,U,!0).event(D),Y=ra(D.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",re,!0),O=ql(D,H),H=D.currentTarget,W=D.clientX,j=D.clientY;hae(D.view),sS(D),z.mouse=[O,this.__zoom.invert(O)],wv(this),z.start();function Z(ue){if(ad(ue),!z.moved){var ve=ue.clientX-W,Re=ue.clientY-j;z.moved=ve*ve+Re*Re>w}z.event(ue).zoom("mouse",n(y(z.that.__zoom,z.mouse[0]=ql(ue,H),z.mouse[1]),z.extent,o))}function re(ue){Y.on("mousemove.zoom mouseup.zoom",null),dae(ue.view,z.moved),ad(ue),z.event(ue).end()}}function L(D,...U){if(t.apply(this,arguments)){var z=this.__zoom,Y=ql(D.changedTouches?D.changedTouches[0]:D,this),O=z.invert(Y),H=z.k*(D.shiftKey?.5:2),W=n(y(_(z,H),Y,O),e.apply(this,U),o);ad(D),a>0?ra(this).transition().duration(a).call(E,W,Y,D):ra(this).call(g.transform,W,Y,D)}}function k(D,...U){if(t.apply(this,arguments)){var z=D.touches,Y=z.length,O=C(this,U,D.changedTouches.length===Y).event(D),H,W,j,Z;for(sS(D),W=0;W<Y;++W)j=z[W],Z=ql(j,this),Z=[Z,this.__zoom.invert(Z),j.identifier],O.touch0?!O.touch1&&O.touch0[2]!==Z[2]&&(O.touch1=Z,O.taps=0):(O.touch0=Z,H=!0,O.taps=1+!!u);u&&(u=clearTimeout(u)),H&&(O.taps<2&&(f=Z[0],u=setTimeout(function(){u=null},m)),wv(this),O.start())}}function $(D,...U){if(this.__zooming){var z=C(this,U).event(D),Y=D.changedTouches,O=Y.length,H,W,j,Z;for(ad(D),H=0;H<O;++H)W=Y[H],j=ql(W,this),z.touch0&&z.touch0[2]===W.identifier?z.touch0[0]=j:z.touch1&&z.touch1[2]===W.identifier&&(z.touch1[0]=j);if(W=z.that.__zoom,z.touch1){var re=z.touch0[0],ue=z.touch0[1],ve=z.touch1[0],Re=z.touch1[1],Le=(Le=ve[0]-re[0])*Le+(Le=ve[1]-re[1])*Le,ze=(ze=Re[0]-ue[0])*ze+(ze=Re[1]-ue[1])*ze;W=_(W,Math.sqrt(Le/ze)),j=[(re[0]+ve[0])/2,(re[1]+ve[1])/2],Z=[(ue[0]+Re[0])/2,(ue[1]+Re[1])/2]}else if(z.touch0)j=z.touch0[0],Z=z.touch0[1];else return;
4001z.zoom("touch",n(y(W,j,Z),z.extent,o))}}function ee(D,...U){if(this.__zooming){var z=C(this,U).event(D),Y=D.changedTouches,O=Y.length,H,W;for(sS(D),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),H=0;H<O;++H)W=Y[H],z.touch0&&z.touch0[2]===W.identifier?delete z.touch0:z.touch1&&z.touch1[2]===W.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(W=ql(W,this),Math.hypot(f[0]-W[0],f[1]-W[1])<x)){var j=ra(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return g.wheelDelta=function(D){return arguments.length?(i=typeof D=="function"?D:zg(+D),g):i},g.filter=function(D){return arguments.length?(t=typeof D=="function"?D:zg(!!D),g):t},g.touchable=function(D){return arguments.length?(r=typeof D=="function"?D:zg(!!D),g):r},g.extent=function(D){return arguments.length?(e=typeof D=="function"?D:zg([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),g):e},g.scaleExtent=function(D){return arguments.length?(s[0]=+D[0],s[1]=+D[1],g):[s[0],s[1]]},g.translateExtent=function(D){return arguments.length?(o[0][0]=+D[0][0],o[1][0]=+D[1][0],o[0][1]=+D[0][1],o[1][1]=+D[1][1],g):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},g.constrain=function(D){return arguments.length?(n=D,g):n},g.duration=function(D){return arguments.length?(a=+D,g):a},g.interpolate=function(D){return arguments.length?(l=D,g):l},g.on=function(){var D=c.on.apply(c,arguments);return D===c?g:D},g.clickDistance=function(D){return arguments.length?(w=(D=+D)*D,g):Math.sqrt(w)},g.tapDistance=function(D){return arguments.length?(x=+D,g):x},g}function OB(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function xf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?OB(Object(n),!0).forEach(function(i){nce(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):OB(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function $A(t){"@babel/helpers - typeof";return $A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$A(t)}function nce(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Br(){return Br=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Br.apply(this,arguments)}function ice(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,s;for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Ts(t,e){if(t==null)return{};var n=ice(t,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)i=s[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function bi(t,e){return rce(t)||sce(t,e)||oce(t,e)||ace()}function rce(t){if(Array.isArray(t))return t}function sce(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],r=!0,s=!1,o,a;try{for(n=n.call(t);!(r=(o=n.next()).done)&&(i.push(o.value),!(e&&i.length===e));r=!0);}catch(l){s=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw a}}return i}}function oce(t,e){if(t){if(typeof t=="string")return UB(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UB(t,e)}}function UB(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function ace(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4002In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var lce=["width","height","projection","projectionConfig"],cce=NO,uce=Ts(Mse,["geoPath"]),Oo=I.createContext(),fce=function(e){var n=e.projectionConfig,i=n===void 0?{}:n,r=e.projection,s=r===void 0?"geoEqualEarth":r,o=e.width,a=o===void 0?800:o,l=e.height,c=l===void 0?600:l,u=typeof s=="function";if(u)return s;var f=uce[s]().translate([a/2,c/2]),p=[f.center?"center":null,f.rotate?"rotate":null,f.scale?"scale":null,f.parallels?"parallels":null];return p.forEach(function(m){m&&(f=f[m](i[m]||f[m]()))}),f}
4002,p9=function(e){var n=e.width,i=e.height,r=e.projection,s=e.projectionConfig,o=Ts(e,lce),a=s.center||[],l=bi(a,2),c=l[0],u=l[1],f=s.rotate||[],p=bi(f,3),m=p[0],v=p[1],w=p[2],x=s.parallels||[],g=bi(x,2),_=g[0],y=g[1],M=s.scale||null,E=I.useMemo(function(){return fce({projectionConfig:{center:c||c===0||u||u===0?[c,u]:null,rotate:m||m===0||v||v===0?[m,v,w]:null,parallels:_||_===0||y||y===0?[_,y]:null,scale:M},projection:r,width:n,height:i})},[n,i,r,c,u,m,v,w,_,y,M]),C=I.useCallback(E,[E]),P=I.useMemo(function(){return{width:n,height:i,projection:C,path:cce().projection(C)}},[n,i,C]);return zt.createElement(Oo.Provider,Br({value:P},o))};p9.propTypes={width:Ue.number,height:Ue.number,projection:Ue.oneOfType([Ue.string,Ue.func]),projectionConfig:Ue.object};var hce=["width","height","projection","projectionConfig","className"],o3=I.forwardRef(function(t,e){var n=t.width,i=n===void 0?800:n,r=t.height,s=r===void 0?600:r,o=t.projection,a=o===void 0?"geoEqualEarth":o,l=t.projectionConfig,c=l===void 0?{}:l,u=t.className,f=u===void 0?"":u,p=Ts(t,hce);return zt.createElement(p9,{width:i,height:s,projection:a,projectionConfig:c},zt.createElement("svg",Br({ref:e,viewBox:"0 0 ".concat(i," ").concat(s),className:"rsm-svg ".concat(f)},p)))});o3.displayName="ComposableMap";o3.propTypes={width:Ue.number,height:Ue.number,projection:Ue.oneOfType([Ue.string,Ue.func]),projectionConfig:Ue.object,className:Ue.string};function kB(t,e,n){var i=(t*n.k-t)/2,r=(e*n.k-e)/2;return[t/2-(i+n.x)/n.k,e/2-(r+n.y)/n.k]}function dce(t){return fetch(t).then(function(e){if(!e.ok)throw Error(e.statusText);return e.json()}).catch(function(e){console.log("There was a problem when fetching the data: ",e)})}function zB(t,e){var n=t.type==="Topology";if(!n)return e?e(t.features||t):t.features||t;var i=Cse(t,t.objects[Object.keys(t.objects)[0]]).features;return e?e(i):i}function HB(t){var e=t.type==="Topology";if(!e)return null;var n=xB(t,t.objects[Object.keys(t.objects)[0]],function(r,s){return r===s}),i=xB(t,t.objects[Object.keys(t.objects)[0]],function(r,s){return r!==s});return{outline:n,borders:i}}function pce(t,e,n){return t&&e?{outline:xf(xf({},t),{},{rsmKey:"outline",svgPath:n(t)}),borders:xf(xf({},e),{},{rsmKey:"borders",svgPath:n(e)})}:{}}function mce(t,e){return t?t.map(function(n,i){return xf(xf({},n),{},{rsmKey:"geo-".concat(i),svgPath:e(n)})}):[]}function gce(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:30,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:30,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.5,i=Array.isArray(n)?n:[n,n],r=t/2*i[0],s=e/2*i[1];return"M".concat(0,",",0," Q",-t/2-r,",").concat(-e/2+s," ").concat(-t,",").concat(-e)}function vce(t){return typeof t=="string"}function yce(t){var e=t.geography,n=t.parseGeographies,i=I.useContext(Oo),r=i.path,s=I.useState({}),o=bi(s,2),a=o[0],l=o[1];I.useEffect(function(){(typeof window>"u"?"undefined":$A(window))!=="undefined"&&e&&(vce(e)?dce(e).then(function(m){m&&l({geographies:zB(m,n),mesh:HB(m)})}):l({geographies:zB(e,n),mesh:HB(e)}))},[e,n]);var c=I.useMemo(function(){var m=a.mesh||{},v=pce(m.outline,m.borders,r);return{geographies:mce(a.geographies,r),outline:v.outline,borders:v.borders}},[a,r]),u=c.geographies,f=c.outline,p=c.borders;return{geographies:u,outline:f,borders:p}}var xce=["geography","children","parseGeographies","className"],V1=I.forwardRef(function(t,e){var n=t.geography,i=t.children,r=t.parseGeographies,s=t.className,o=s===void 0?"":s,a=Ts(t,xce),l=I.useContext(Oo),c=l.path,u=l.projection,f=yce({geography:n,parseGeographies:r}),p=f.geographies,m=f.outline,v=f.borders;return zt.createElement("g",Br({ref:e,className:"rsm-geographies ".concat(o)},a),p&&p.length>0&&i({geographies:p,outline:m,borders:v,path:c,projection:u}))});V1.displayName="Geographies";V1.propTypes={geography:Ue.oneOfType([Ue.string,Ue.object,Ue.array]),children:Ue.func,parseGeographies:Ue.func,className:Ue.string};var _ce=["geography","onMouseEnter","onMouseLeave","onMouseDown","onMouseUp","onFocus","onBlur","style","className"],a3=I.forwardRef(function(t,e){var n=t.geography,i=t.onMouseEnter,r=t.onMouseLeave,s=t.onMouseDown,o=t.onMouseUp,a=t.onFocus,l=t.onBlur,c=t.style,u=c===void 0?{}:c,f=t.className,p=f===void 0?"":f,m=Ts(t,_ce),v=I.useState(!1),w=bi(v,2),x=w[0],g=w[1],_=I.useState(!1),y=bi(_,2),M=y[0],E=y[1];function C($){E(!0),i&&i($)}function P($){E(!1),x&&g(!1),r&&r($)}function N($){E(!0),a&&a($)}function R($){E(!1),x&&g(!1),l&&l($)}function L($){g(!0),s&&s($)}function k($){g(!1),o&&o($)}
4002return zt.createElement("path",Br({ref:e,tabIndex:"0",className:"rsm-geography ".concat(p),d:n.svgPath,onMouseEnter:C,onMouseLeave:P,onFocus:N,onBlur:R,onMouseDown:L,onMouseUp:k,style:u[x||M?x?"pressed":"hover":"default"]},m))});a3.displayName="Geography";a3.propTypes={geography:Ue.object,onMouseEnter:Ue.func,onMouseLeave:Ue.func,onMouseDown:Ue.func,onMouseUp:Ue.func,onFocus:Ue.func,onBlur:Ue.func,style:Ue.object,className:Ue.string};var GB=I.memo(a3),Sce=["fill","stroke","step","className"],l3=I.forwardRef(function(t,e){var n=t.fill,i=n===void 0?"transparent":n,r=t.stroke,s=r===void 0?"currentcolor":r,o=t.step,a=o===void 0?[10,10]:o,l=t.className,c=l===void 0?"":l,u=Ts(t,Sce),f=I.useContext(Oo),p=f.path;return zt.createElement("path",Br({ref:e,d:p(OT().step(a)()),fill:i,stroke:s,className:"rsm-graticule ".concat(c)},u))});l3.displayName="Graticule";l3.propTypes={fill:Ue.string,stroke:Ue.string,step:Ue.array,className:Ue.string};I.memo(l3);var wce=["value"],Ace=I.createContext(),Mce={x:0,y:0,k:1,transformString:"translate(0 0) scale(1)"},m9=function(e){var n=e.value,i=n===void 0?Mce:n,r=Ts(e,wce);return zt.createElement(Ace.Provider,Br({value:i},r))};m9.propTypes={x:Ue.number,y:Ue.number,k:Ue.number,transformString:Ue.string};function Ece(t){var e=t.center,n=t.filterZoomEvent,i=t.onMoveStart,r=t.onMoveEnd,s=t.onMove,o=t.translateExtent,a=o===void 0?[[-1/0,-1/0],[1/0,1/0]]:o,l=t.scaleExtent,c=l===void 0?[1,8]:l,u=t.zoom,f=u===void 0?1:u,p=I.useContext(Oo),m=p.width,v=p.height,w=p.projection,x=bi(e,2),g=x[0],_=x[1],y=I.useState({x:0,y:0,k:1}),M=bi(y,2),E=M[0],C=M[1],P=I.useRef({x:0,y:0,k:1}),N=I.useRef(),R=I.useRef(),L=I.useRef(!1),k=bi(a,2),$=k[0],ee=k[1],D=bi($,2),U=D[0],z=D[1],Y=bi(ee,2),O=Y[0],H=Y[1],W=bi(c,2),j=W[0],Z=W[1];return I.useEffect(function(){var re=ra(N.current);function ue(Qe){!i||L.current||i({coordinates:w.invert(kB(m,v,Qe.transform)),zoom:Qe.transform.k},Qe)}function ve(Qe){if(!L.current){var Ze=Qe.transform,Me=Qe.sourceEvent;C({x:Ze.x,y:Ze.y,k:Ze.k,dragging:Me}),s&&s({x:Ze.x,y:Ze.y,zoom:Ze.k,dragging:Me},Qe)}}function Re(Qe){if(L.current){L.current=!1;return}var Ze=w.invert(kB(m,v,Qe.transform)),Me=bi(Ze,2),Q=Me[0],ge=Me[1];P.current={x:Q,y:ge,k:Qe.transform.k},r&&r({coordinates:[Q,ge],zoom:Qe.transform.k},Qe)}function Le(Qe){return n?n(Qe):Qe?!Qe.ctrlKey&&!Qe.button:!1}var ze=tce().filter(Le).scaleExtent([j,Z]).translateExtent([[U,z],[O,H]]).on("start",ue).on("zoom",ve).on("end",Re);R.current=ze,re.call(ze)},[m,v,U,z,O,H,j,Z,w,i,s,r,n]),I.useEffect(function(){if(!(g===P.current.x&&_===P.current.y&&f===P.current.k)){var re=w([g,_]),ue=re[0]*f,ve=re[1]*f,Re=ra(N.current);L.current=!0,Re.call(R.current.transform,s3.translate(m/2-ue,v/2-ve).scale(f)),C({x:m/2-ue,y:v/2-ve,k:f}),P.current={x:g,y:_,k:f}}},[g,_,f,m,v,w]),{mapRef:N,position:E,transformString:"translate(".concat(E.x," ").concat(E.y,") scale(").concat(E.k,")")}}var Tce=["center","zoom","minZoom","maxZoom","translateExtent","filterZoomEvent","onMoveStart","onMove","onMoveEnd","className"],c3=I.forwardRef(function(t,e){var n=t.center,i=n===void 0?[0,0]:n,r=t.zoom,s=r===void 0?1:r,o=t.minZoom,a=o===void 0?1:o,l=t.maxZoom,c=l===void 0?8:l,u=t.translateExtent,f=t.filterZoomEvent,p=t.onMoveStart,m=t.onMove,v=t.onMoveEnd,w=t.className,x=Ts(t,Tce),g=I.useContext(Oo),_=g.width,y=g.height,M=Ece({center:i,filterZoomEvent:f,onMoveStart:p,onMove:m,onMoveEnd:v,scaleExtent:[a,c],translateExtent:u,zoom:s}),E=M.mapRef,C=M.transformString,P=M.position;return zt.createElement(m9,{value:{x:P.x,y:P.y,k:P.k,transformString:C}},zt.createElement("g",{ref:E},zt.createElement("rect",{width:_,height:y,fill:"transparent"}),zt.createElement("g",Br({ref:e,transform:C,className:"rsm-zoomable-group ".concat(w)},x))))});c3.displayName="ZoomableGroup";c3.propTypes={center:Ue.array,zoom:Ue.number,minZoom:Ue.number,maxZoom:Ue.number,translateExtent:Ue.arrayOf(Ue.array),onMoveStart:Ue.func,onMove:Ue.func,onMoveEnd:Ue.func,className:Ue.string};var bce=["id","fill","stroke","strokeWidth","className"],u3=I.forwardRef(function(t,e){var n=t.id,i=n===void 0?"rsm-sphere":n,r=t.fill,s=r===void 0?"transparent":r,o=t.stroke,a=o===void 0?"currentcolor":o,l=t.strokeWidth,c=l===void 0?.5:l,u=t.className,f=u===void 0?"":u,p=Ts(t,bce),m=I.useContext(Oo),v=m.path,w=I.useMemo(function(){return v({type:"Sphere"})},[v]);return zt.createElement(I.Fragment,null,zt.createElement("defs",null,zt.createElement("clipPath",{id:i},zt.createElement("path",{d:w}
4002))),zt.createElement("path",Br({ref:e,d:w,fill:s,stroke:a,strokeWidth:c,style:{pointerEvents:"none"},className:"rsm-sphere ".concat(f)},p)))});u3.displayName="Sphere";u3.propTypes={id:Ue.string,fill:Ue.string,stroke:Ue.string,strokeWidth:Ue.number,className:Ue.string};I.memo(u3);var Cce=["coordinates","children","onMouseEnter","onMouseLeave","onMouseDown","onMouseUp","onFocus","onBlur","style","className"],g9=I.forwardRef(function(t,e){var n=t.coordinates,i=t.children,r=t.onMouseEnter,s=t.onMouseLeave,o=t.onMouseDown,a=t.onMouseUp,l=t.onFocus,c=t.onBlur,u=t.style,f=u===void 0?{}:u,p=t.className,m=p===void 0?"":p,v=Ts(t,Cce),w=I.useContext(Oo),x=w.projection,g=I.useState(!1),_=bi(g,2),y=_[0],M=_[1],E=I.useState(!1),C=bi(E,2),P=C[0],N=C[1],R=x(n),L=bi(R,2),k=L[0],$=L[1];function ee(H){N(!0),r&&r(H)}function D(H){N(!1),y&&M(!1),s&&s(H)}function U(H){N(!0),l&&l(H)}function z(H){N(!1),y&&M(!1),c&&c(H)}function Y(H){M(!0),o&&o(H)}function O(H){M(!1),a&&a(H)}return zt.createElement("g",Br({ref:e,transform:"translate(".concat(k,", ").concat($,")"),className:"rsm-marker ".concat(m),onMouseEnter:ee,onMouseLeave:D,onFocus:U,onBlur:z,onMouseDown:Y,onMouseUp:O,style:f[y||P?y?"pressed":"hover":"default"]},v),i)});g9.displayName="Marker";g9.propTypes={coordinates:Ue.array,children:Ue.oneOfType([Ue.node,Ue.arrayOf(Ue.node)]),onMouseEnter:Ue.func,onMouseLeave:Ue.func,onMouseDown:Ue.func,onMouseUp:Ue.func,onFocus:Ue.func,onBlur:Ue.func,style:Ue.object,className:Ue.string};var Rce=["from","to","coordinates","stroke","strokeWidth","fill","className"],v9=I.forwardRef(function(t,e){var n=t.from,i=n===void 0?[0,0]:n,r=t.to,s=r===void 0?[0,0]:r,o=t.coordinates,a=t.stroke,l=a===void 0?"currentcolor":a,c=t.strokeWidth,u=c===void 0?3:c,f=t.fill,p=f===void 0?"transparent":f,m=t.className,v=m===void 0?"":m,w=Ts(t,Rce),x=I.useContext(Oo),g=x.path,_={type:"LineString",coordinates:o||[i,s]};return zt.createElement("path",Br({ref:e,d:g(_),className:"rsm-line ".concat(v),stroke:l,strokeWidth:u,fill:p},w))});v9.displayName="Line";v9.propTypes={from:Ue.array,to:Ue.array,coordinates:Ue.array,stroke:Ue.string,strokeWidth:Ue.number,fill:Ue.string,className:Ue.string};var Pce=["subject","children","connectorProps","dx","dy","curve","className"],y9=I.forwardRef(function(t,e){var n=t.subject,i=t.children,r=t.connectorProps,s=t.dx,o=s===void 0?30:s,a=t.dy,l=a===void 0?30:a,c=t.curve,u=c===void 0?0:c,f=t.className,p=f===void 0?"":f,m=Ts(t,Pce),v=I.useContext(Oo),w=v.projection,x=w(n),g=bi(x,2),_=g[0],y=g[1],M=gce(o,l,u);return zt.createElement("g",Br({ref:e,transform:"translate(".concat(_+o,", ").concat(y+l,")"),className:"rsm-annotation ".concat(p)},m),zt.createElement("path",Br({d:M,fill:"transparent",stroke:"#000"},r)),i)});y9.displayName="Annotation";y9.propTypes={subject:Ue.array,children:Ue.oneOfType([Ue.node,Ue.arrayOf(Ue.node)]),dx:Ue.number,dy:Ue.number,curve:Ue.number,connectorProps:Ue.object,className:Ue.string};const $f=Math.min,Rc=Math.max,j1=Math.round,Hg=Math.floor,Ro=t=>({x:t,y:t}),Bce={left:"right",right:"left",bottom:"top",top:"bottom"},Lce={start:"end",end:"start"};function eM(t,e,n){return Rc(t,$f(e,n))}function wm(t,e){return typeof t=="function"?t(e):t}function Jc(t){return t.split("-")[0]}function Am(t){return t.split("-")[1]}function x9(t){return t==="x"?"y":"x"}function f3(t){return t==="y"?"height":"width"}const Ice=new Set(["top","bottom"]);function tl(t){return Ice.has(Jc(t))?"y":"x"}function h3(t){return x9(tl(t))}function Nce(t,e,n){n===void 0&&(n=!1);const i=Am(t),r=h3(t),s=f3(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=W1(o)),[o,W1(o)]}function Dce(t){const e=W1(t);return[tM(t),e,tM(e)]}function tM(t){return t.replace(/start|end/g,e=>Lce[e])}const VB=["left","right"],jB=["right","left"],Fce=["top","bottom"],Oce=["bottom","top"];function Uce(t,e,n){switch(t){case"top":case"bottom":return n?e?jB:VB:e?VB:jB;case"left":case"right":return e?Fce:Oce;default:return[]}}function kce(t,e,n,i){const r=Am(t);let s=Uce(Jc(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(tM)))),s}function W1(t){return t.replace(/left|right|bottom|top/g,e=>Bce[e])}function zce(t){return{top:0,right:0,bottom:0,left:0,...t}}function _9(t){return typeof t!="number"?zce(t):{top:t,right:t,bottom:t,left:t}}function X1(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function WB(t,e,n){let{reference:i,floating:r}=t;
vendor: 2,339 bytes, line 4002
4002const s=tl(e),o=h3(e),a=f3(o),l=Jc(e),c=s==="y",u=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,p=i[a]/2-r[a]/2;let m;switch(l){case"top":m={x:u,y:i.y-r.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:f};break;case"left":m={x:i.x-r.width,y:f};break;default:m={x:i.x,y:i.y}}switch(Am(e)){case"start":m[o]-=p*(n&&c?-1:1);break;case"end":m[o]+=p*(n&&c?-1:1);break}return m}async function Hce(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=wm(e,t),v=_9(m),x=a[p?f==="floating"?"reference":"floating":f],g=X1(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),_=f==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),M=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},E=X1(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:y,strategy:l}):_);return{top:(g.top-E.top+v.top)/M.y,bottom:(E.bottom-g.bottom+v.bottom)/M.y,left:(g.left-E.left+v.left)/M.x,right:(E.right-g.right+v.right)/M.x}}const Gce=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=WB(c,i,l),p=i,m={},v=0;for(let x=0;x<a.length;x++){var w;const{name:g,fn:_}=a[x],{x:y,y:M,data:E,reset:C}=await _({x:u,y:f,initialPlacement:i,placement:p,strategy:r,middlewareData:m,rects:c,platform:{...o,detectOverflow:(w=o.detectOverflow)!=null?w:Hce},elements:{reference:t,floating:e}});u=y??u,f=M??f,m={...m,[g]:{...m[g],...E}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):C.rects),{x:u,y:f}=WB(c,p,l)),x=-1)}return{x:u,y:f,placement:p,strategy:r,middlewareData:m}}
vendor: 5,936 bytes, line 4002
4002,Vce=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=wm(t,e)||{};if(c==null)return{};const f=_9(u),p={x:n,y:i},m=h3(r),v=f3(m),w=await o.getDimensions(c),x=m==="y",g=x?"top":"left",_=x?"bottom":"right",y=x?"clientHeight":"clientWidth",M=s.reference[v]+s.reference[m]-p[m]-s.floating[v],E=p[m]-s.reference[m],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let P=C?C[y]:0;(!P||!await(o.isElement==null?void 0:o.isElement(C)))&&(P=a.floating[y]||s.floating[v]);const N=M/2-E/2,R=P/2-w[v]/2-1,L=$f(f[g],R),k=$f(f[_],R),$=L,ee=P-w[v]-k,D=P/2-w[v]/2+N,U=eM($,D,ee),z=!l.arrow&&Am(r)!=null&&D!==U&&s.reference[v]/2-(D<$?L:k)-w[v]/2<0,Y=z?D<$?D-$:D-ee:0;return{[m]:p[m]+Y,data:{[m]:U,centerOffset:D-U-Y,...z&&{alignmentOffset:Y}},reset:z}}}),jce=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...x}=wm(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Jc(r),_=tl(a),y=Jc(a)===a,M=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=p||(y||!w?[W1(a)]:Dce(a)),C=v!=="none";!p&&C&&E.push(...kce(a,w,v,M));const P=[a,...E],N=await l.detectOverflow(e,x),R=[];let L=((i=s.flip)==null?void 0:i.overflows)||[];if(u&&R.push(N[g]),f){const D=Nce(r,o,M);R.push(N[D[0]],N[D[1]])}if(L=[...L,{placement:r,overflows:R}],!R.every(D=>D<=0)){var k,$;const D=(((k=s.flip)==null?void 0:k.index)||0)+1,U=P[D];if(U&&(!(f==="alignment"?_!==tl(U):!1)||L.every(O=>tl(O.placement)===_?O.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:U}};let z=($=L.filter(Y=>Y.overflows[0]<=0).sort((Y,O)=>Y.overflows[1]-O.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(m){case"bestFit":{var ee;const Y=(ee=L.filter(O=>{if(C){const H=tl(O.placement);return H===_||H==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(H=>H>0).reduce((H,W)=>H+W,0)]).sort((O,H)=>O[1]-H[1])[0])==null?void 0:ee[0];Y&&(z=Y);break}case"initialPlacement":z=a;break}if(r!==z)return{reset:{placement:z}}}return{}}}},Wce=new Set(["left","top"]);async function Xce(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Jc(n),a=Am(n),l=tl(n)==="y",c=Wce.has(o)?-1:1,u=s&&l?-1:1,f=wm(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),l?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Jce=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await Xce(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},Kce=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:_,y}=g;return{x:_,y}}},...c}=wm(t,e),u={x:n,y:i},f=await s.detectOverflow(e,c),p=tl(Jc(r)),m=x9(p);let v=u[m],w=u[p];if(o){const g=m==="y"?"top":"left",_=m==="y"?"bottom":"right",y=v+f[g],M=v-f[_];v=eM(y,v,M)}if(a){const g=p==="y"?"top":"left",_=p==="y"?"bottom":"right",y=w+f[g],M=w-f[_];w=eM(y,w,M)}const x=l.fn({...e,[m]:v,[p]:w});return{...x,data:{x:x.x-n,y:x.y-i,enabled:{[m]:o,[p]:a}}}}}};function nx(){return typeof window<"u"}function ph(t){return S9(t)?(t.nodeName||"").toLowerCase():"#document"}function Kr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Uo(t){var e;return(e=(S9(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function S9(t){return nx()?t instanceof Node||t instanceof Kr(t).Node:!1}function qs(t){return nx()?t instanceof Element||t instanceof Kr(t).Element:!1}function Io(t){return nx()?t instanceof HTMLElement||t instanceof Kr(t).HTMLElement:!1}function XB(t){return!nx()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Kr(t).ShadowRoot}const Yce=new Set(["inline","contents"]);function Mm(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=$s(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!Yce.has(r)}const Qce=new Set(["table","td","th"]);function Zce(t){return Qce.has(ph(t))}const qce=[":popover-open",":modal"];function ix(t){return qce.some(e=>{try{return t.matches(e)}catch{return!1}})}const $ce=["transform","translate","scale","rotate","perspective"],eue=["transform","translate","scale","rotate","perspective","filter"],tue=["paint","layout","strict","content"];function d3(t){const e=p3(),n=qs(t)?$s(t):t;return $ce.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||eue.some(i=>(n.willChange||"").includes(i))||tue.some(i=>(n.contain||"").includes(i))}function nue(t){let e=wl(t);for(;Io(e)&&!eh(e);){if(d3(e))return e;if(ix(e))return null;e=wl(e)}return null}function p3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const iue=new Set(["html","body","#document"]);function eh(t){return iue.has(ph(t))}function $s(t){return Kr(t).getComputedStyle(t)}function rx(t){return qs(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function wl(t){if(ph(t)==="html")return t;const e=t.assignedSlot||t.parentNode||XB(t)&&t.host||Uo(t);return XB(e)?e.host:e}function w9(t){const e=wl(t);return eh(e)?t.ownerDocument?t.ownerDocument.body:t.body:Io(e)&&Mm(e)?e:w9(e)}function Vp(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=w9(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=Kr
vendor: 4,672 bytes, line 4002
4002(r);if(s){const a=nM(o);return e.concat(o,o.visualViewport||[],Mm(r)?r:[],a&&n?Vp(a):[])}return e.concat(r,Vp(r,[],n))}function nM(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function A9(t){const e=$s(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Io(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=j1(n)!==s||j1(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function m3(t){return qs(t)?t:t.contextElement}function If(t){const e=m3(t);if(!Io(e))return Ro(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=A9(e);let o=(s?j1(n.width):n.width)/i,a=(s?j1(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const rue=Ro(0);function M9(t){const e=Kr(t);return!p3()||!e.visualViewport?rue:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function sue(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Kr(t)?!1:e}function Kc(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=m3(t);let o=Ro(1);e&&(i?qs(i)&&(o=If(i)):o=If(t));const a=sue(s,n,i)?M9(s):Ro(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,f=r.height/o.y;if(s){const p=Kr(s),m=i&&qs(i)?Kr(i):i;let v=p,w=nM(v);for(;w&&i&&m!==v;){const x=If(w),g=w.getBoundingClientRect(),_=$s(w),y=g.left+(w.clientLeft+parseFloat(_.paddingLeft))*x.x,M=g.top+(w.clientTop+parseFloat(_.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,f*=x.y,l+=y,c+=M,v=Kr(w),w=nM(v)}}return X1({width:u,height:f,x:l,y:c})}function sx(t,e){const n=rx(t).scrollLeft;return e?e.left+n:Kc(Uo(t)).left+n}function E9(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-sx(t,n),r=n.top+e.scrollTop;return{x:i,y:r}}function oue(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=Uo(i),a=e?ix(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ro(1);const u=Ro(0),f=Io(i);if((f||!f&&!s)&&((ph(i)!=="body"||Mm(o))&&(l=rx(i)),Io(i))){const m=Kc(i);c=If(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}const p=o&&!f&&!s?E9(o,l):Ro(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function aue(t){return Array.from(t.getClientRects())}function lue(t){const e=Uo(t),n=rx(t),i=t.ownerDocument.body,r=Rc(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Rc(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+sx(t);const a=-n.scrollTop;return $s(i).direction==="rtl"&&(o+=Rc(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const JB=25;function cue(t,e){const n=Kr(t),i=Uo(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const u=p3();(!u||u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const c=sx(i);if(c<=0){const u=i.ownerDocument,f=u.body,p=getComputedStyle(f),m=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(i.clientWidth-f.clientWidth-m);v<=JB&&(s-=v)}else c<=JB&&(s+=c);return{width:s,height:o,x:a,y:l}}const uue=new Set(["absolute","fixed"]);function fue(t,e){const n=Kc(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=Io(t)?If(t):Ro(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function KB(t,e,n){let i;if(e==="viewport")i=cue(t,n);else if(e==="document")i=lue(Uo(t));else if(qs(e))i=fue(e,n);else{const r=M9(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return X1(i)}function T9(t,e){const n=wl(t);return n===e||!qs(n)||eh(n)?!1:$s(n).position==="fixed"||T9(n,e)}function hue(t,e){const n=e.get(t);if(n)return n;let i=Vp(t,[],!1).filter(a=>qs(a)&&ph(a)!=="body"),r=null;const s=$s(t).position==="fixed";let o=s?wl(t):t;for(;qs(o)&&!eh(o);){const a=$s(o),l=d3(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&uue.has(r.position)||Mm(o)&&!l&&T9(t,o))?i=i.filter(u=>u!==o):r=a,o=wl(o)}return e.set(t,i),i}function due(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?ix(e)?[]:hue(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const f=KB(e,u,r);return c.top=Rc(f.top,c.top),c.right=$f(f.right,c.right),c.bottom=$f(f.bottom,c.bottom),c.left=Rc(f.left,c.left),c},KB(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pue(t){const{width:e,height:n}=A9(t);return{width:e,height:n}}function mue(t,e,n){const i=Io(e),r=Uo(e),s=n==="fixed",o=Kc(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Ro(0);function c(){l.x=sx(r)}if(i||!i&&!s)if((ph(e)!=="body"||Mm(r))&&(a=rx(e)),i){const m=Kc(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else r&&c();s&&!i&&r&&c();
vendor: 3,755 bytes, lines 4002-4010
4002const u=r&&!i&&!s?E9(r,a):Ro(0),f=o.left+a.scrollLeft-l.x-u.x,p=o.top+a.scrollTop-l.y-u.y;return{x:f,y:p,width:o.width,height:o.height}}function oS(t){return $s(t).position==="static"}function YB(t,e){if(!Io(t)||$s(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Uo(t)===n&&(n=n.ownerDocument.body),n}function b9(t,e){const n=Kr(t);if(ix(t))return n;if(!Io(t)){let r=wl(t);for(;r&&!eh(r);){if(qs(r)&&!oS(r))return r;r=wl(r)}return n}let i=YB(t,e);for(;i&&Zce(i)&&oS(i);)i=YB(i,e);return i&&eh(i)&&oS(i)&&!d3(i)?n:i||nue(t)||n}const gue=async function(t){const e=this.getOffsetParent||b9,n=this.getDimensions,i=await n(t.floating);return{reference:mue(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function vue(t){return $s(t).direction==="rtl"}const yue={convertOffsetParentRelativeRectToViewportRelativeRect:oue,getDocumentElement:Uo,getClippingRect:due,getOffsetParent:b9,getElementRects:gue,getClientRects:aue,getDimensions:pue,getScale:If,isElement:qs,isRTL:vue};function C9(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xue(t,e){let n=null,i;const r=Uo(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:p,height:m}=c;if(a||e(),!p||!m)return;const v=Hg(f),w=Hg(r.clientWidth-(u+p)),x=Hg(r.clientHeight-(f+m)),g=Hg(u),y={rootMargin:-v+"px "+-w+"px "+-x+"px "+-g+"px",threshold:Rc(0,$f(1,l))||1};let M=!0;function E(C){const P=C[0].intersectionRatio;if(P!==l){if(!M)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!C9(c,t.getBoundingClientRect())&&o(),M=!1}try{n=new IntersectionObserver(E,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(t)}return o(!0),s}function _ue(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=m3(t),u=r||s?[...c?Vp(c):[],...Vp(e)]:[];u.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=c&&a?xue(c,n):null;let p=-1,m=null;o&&(m=new ResizeObserver(g=>{let[_]=g;_&&_.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(e)})),n()}),c&&!l&&m.observe(c),m.observe(e));let v,w=l?Kc(t):null;l&&x();function x(){const g=Kc(t);w&&!C9(w,g)&&n(),w=g,v=requestAnimationFrame(x)}return n(),()=>{var g;u.forEach(_=>{r&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const Sue=Jce,wue=Kce,Aue=jce,Mue=Vce,QB=(t,e,n)=>{const i=new Map,r={platform:yue,...n},s={...r.platform,_c:i};return Gce(t,e,{...r,platform:s})};var R9={exports:{}};/*!
4003	Copyright (c) 2018 Jed Watson.
4004	Licensed under the MIT License (MIT), see
4005	http://jedwatson.github.io/classnames
4006*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=r(s,i(a)))}return s}function i(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=r(o,a));return o}function r(s,o){return o?s?s+" "+o:s+o:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(R9);var Eue=R9.exports;const iM=J1(Eue);/*
4007* React Tooltip
4008* {@link https://github.com/ReactTooltip/react-tooltip}
4009* @copyright ReactTooltip Team
4010* @license MIT
4011*/const Tue="react-tooltip-core-styles",bue="react-tooltip-base-styles",ZB={core:!1,base:!1};function qB({css:t,id:e=bue,type:n="base",ref:i}){var r,s;if(!t||typeof document>"u"||ZB[n]||n==="core"&&typeof process<"u"&&(!((r=process==null?void 0:process.env)===null||r===void 0)&&r.REACT_TOOLTIP_DISABLE_CORE_STYLES)||n!=="base"&&typeof process<"u"&&(!((s=process==null?void 0:process.env)===null||s===void 0)&&s.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;n==="core"&&(e=Tue),i||(i={});const{insertAt:o}=i;if(document.getElementById(e))return;const a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=e,l.type="text/css",o==="top"&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t)),ZB[n]=!0}const $B=async({elementReference:t=null,tooltipReference:e=null,tooltipArrowReference:n=null,place:i="top",offset:r=10,strategy:s="absolute",middlewares:o=[Sue(Number(r)),Aue({fallbackAxisSideDirection:"start"}),wue({padding:5})],border:a,arrowSize:l=8})=>{if(!t)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};if(e===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};const c=o;return n?(c.push(Mue({element:n,padding:5})),QB(t,e,{placement:i,strategy:s,middleware:c}).then(({x:u,y:f,placement:p,middlewareData:m})=>{var v,w;const x={left:`${u}px`,top:`${f}px`,border:a},{x:g,y:_}=(v=m.arrow)!==null&&v!==void 0?v:{x:0,y:0},y=(w={top:"bottom",right:"left",bottom:"top",left:"right"}[p.split("-")[0]])!==null&&w!==void 0?w:"bottom",M=a&&{borderBottom:a,borderRight:a};let E=0;if(a){const C=`${a}`.match(/(\d+)px/);E=C!=null&&C[1]?Number(C[1]):1}return{tooltipStyles:x,tooltipArrowStyles:{left:g!=null?`${g}px`:"",top:_!=null?`${_}px`:"",right:"",bottom:"",...M,[y]:`-${l/2+E}px`},place:p}})):QB(t,e,{placement:"bottom",strategy:s,middleware:c}).then(({x:u,y:f,placement:p})=>({tooltipStyles:{left:`${u}px`,top:`${f}px`},tooltipArrowStyles:{},place:p}))},eL=(t,e)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(t,e),tL=(t,e,n)=>{let i=null;const r=function(...s){const o=()=>{i=null,n||t.apply(this,s)};n&&!i&&(t.apply(this,s),i=setTimeout(o,e)),n||(i&&clearTimeout(i),i=setTimeout(o,e))};return r.cancel=()=>{i&&(clearTimeout(i),i=null)},r},nL=t=>t!==null&&!Array.isArray(t)&&typeof t=="object",rM=(t,e)=>{if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every((r,s)=>rM(r,e[s]));if(Array.isArray(t)!==Array.isArray(e))return!1;if(!nL(t)||!nL(e))return t===e;const n=Object.keys(t),i=Object.keys(e);return n.length===i.length&&n.every(r=>rM(t[r],e[r]))},Cue=t=>{if(!(t instanceof HTMLElement||t instanceof SVGElement))return!1;const e=getComputedStyle(t);return["overflow","overflow-x","overflow-y"].some(n=>{const i=e.getPropertyValue(n);return i==="auto"||i==="scroll"})},iL=t=>{if(!t)return null;let e=t.parentElement;for(;e;){if(Cue(e))return e;e=e.parentElement}return document.scrollingElement||document.documentElement},Rue=typeof window<"u"?I.useLayoutEffect:I.useEffect,cs=t=>{t.current&&(clearTimeout(t.current),t.current=null)},Pue="DEFAULT_TOOLTIP_ID",Bue={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Lue=I.createContext({getTooltipData:()=>Bue});function P9(t=Pue){return I.useContext(Lue).getTooltipData(t)}var ju={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},aS={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Iue=({forwardRef:t,id:e,className:n,classNameArrow:i,variant:r="dark",anchorId:s,anchorSelect:o,place:a="top",offset:l=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:f="absolute",middlewares:p,wrapper:m,delayShow:v=0,delayHide:w=0,float:x=!1,hidden:g=!1,noArrow:_=!1,clickable:y=!1,closeOnEsc:M=!1,closeOnScroll:E=!1,closeOnResize:C=!1,openEvents:P,closeEvents:N,globalCloseEvents:R,imperativeModeOnly:L,style:k,position:$,afterShow:ee,afterHide:D,disableTooltip:U,content:z,contentWrapperRef:Y,isOpen:O,defaultIsOpen:H=!1,setIsOpen:W,previousActiveAnchor:j,activeAnchor:Z,setActiveAnchor:re,border:ue,opacity:ve,arrowColor:Re,arrowSize:Le=8,role:ze="tooltip"})=>{var Qe;const Ze=I.useRef(null),Me=I.useRef(null),Q=I.useRef(null),ge=I.useRef(null),de=I.useRef(null),[Ae,xe]=I.use
4011State({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[Fe,Ge]=I.useState(!1),[We,ot]=I.useState(!1),[rt,Xt]=I.useState(null),X=I.useRef(!1),F=I.useRef(null),{anchorRefs:se,setActiveAnchor:be}=P9(e),ye=I.useRef(!1),[Ee,et]=I.useState([]),Pe=I.useRef(!1),Oe=u||c.includes("click"),mt=Oe||(P==null?void 0:P.click)||(P==null?void 0:P.dblclick)||(P==null?void 0:P.mousedown),Bt=P?{...P}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!P&&Oe&&Object.assign(Bt,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ce=N?{...N}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!N&&Oe&&Object.assign(Ce,{mouseleave:!1,blur:!1,mouseout:!1});const xt=R?{...R}:{escape:M||!1,scroll:E||!1,resize:C||!1,clickOutsideAnchor:mt||!1};L&&(Object.assign(Bt,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ce,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(xt,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Rue(()=>(Pe.current=!0,()=>{Pe.current=!1}),[]);const q=Ve=>{Pe.current&&(Ve&&ot(!0),setTimeout(()=>{Pe.current&&(W==null||W(Ve),O===void 0&&Ge(Ve))},10))};I.useEffect(()=>{if(e){if(Fe){ht(j);const at=Ve(Z),qt=[...new Set([...at,e])].filter(Boolean).join(" ");Z==null||Z.setAttribute("aria-describedby",qt)}else ht(Z);return()=>{ht(Z),ht(j)}}function Ve(at){var qt;return((qt=at==null?void 0:at.getAttribute("aria-describedby"))===null||qt===void 0?void 0:qt.split(" "))||[]}function ht(at){const qt=Ve(at).filter(an=>an!==e);qt.length?at==null||at.setAttribute("aria-describedby",qt.join(" ")):at==null||at.removeAttribute("aria-describedby")}},[Z,Fe,e,j]),I.useEffect(()=>{if(O===void 0)return()=>null;O&&ot(!0);const Ve=setTimeout(()=>{Ge(O)},10);return()=>{clearTimeout(Ve)}},[O]),I.useEffect(()=>{if(Fe!==X.current)if(cs(de),X.current=Fe,Fe)ee==null||ee();else{const Ve=(ht=>{const at=ht.match(/^([\d.]+)(ms|s)$/);if(!at)return 0;const[,qt,an]=at;return Number(qt)*(an==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));de.current=setTimeout(()=>{ot(!1),Xt(null),D==null||D()},Ve+25)}},[Fe]);const fe=Ve=>{xe(ht=>rM(ht,Ve)?ht:Ve)},we=(Ve=v)=>{cs(Q),We?q(!0):Q.current=setTimeout(()=>{q(!0)},Ve)},J=(Ve=w)=>{cs(ge),ge.current=setTimeout(()=>{ye.current||q(!1)},Ve)},Se=Ve=>{var ht;if(!Ve)return;const at=(ht=Ve.currentTarget)!==null&&ht!==void 0?ht:Ve.target;if(!(at!=null&&at.isConnected))return re(null),void be({current:null});v?we():q(!0),re(at),be({current:at}),cs(ge)},Te=()=>
4011{y?J(w||100):w?J():q(!1),cs(Q)},De=({x:Ve,y:ht})=>{var at;const qt={getBoundingClientRect:()=>({x:Ve,y:ht,width:0,height:0,top:ht,left:Ve,right:Ve,bottom:ht})};$B({place:(at=rt==null?void 0:rt.place)!==null&&at!==void 0?at:a,offset:l,elementReference:qt,tooltipReference:Ze.current,tooltipArrowReference:Me.current,strategy:f,middlewares:p,border:ue,arrowSize:Le}).then(an=>{fe(an)})},ke=Ve=>{if(!Ve)return;const ht=Ve,at={x:ht.clientX,y:ht.clientY};De(at),F.current=at},_e=Ve=>{var ht;if(!Fe)return;const at=Ve.target;at.isConnected&&(!((ht=Ze.current)===null||ht===void 0)&&ht.contains(at)||[document.querySelector(`[id='${s}']`),...Ee].some(qt=>qt==null?void 0:qt.contains(at))||(q(!1),cs(Q)))},Ke=tL(Se,50,!0),Xe=tL(Te,50,!0),Nt=Ve=>{Xe.cancel(),Ke(Ve)},Ne=()=>{Ke.cancel(),Xe()},gt=I.useCallback(()=>{var Ve,ht;const at=(Ve=rt==null?void 0:rt.position)!==null&&Ve!==void 0?Ve:$;at?De(at):x?F.current&&De(F.current):Z!=null&&Z.isConnected&&$B({place:(ht=rt==null?void 0:rt.place)!==null&&ht!==void 0?ht:a,offset:l,elementReference:Z,tooltipReference:Ze.current,tooltipArrowReference:Me.current,strategy:f,middlewares:p,border:ue,arrowSize:Le}).then(qt=>{Pe.current&&fe(qt)})},[Fe,Z,z,k,a,rt==null?void 0:rt.place,l,f,$,rt==null?void 0:rt.position,x,Le]);I.useEffect(()=>{var Ve,ht;const at=new Set(se);Ee.forEach(qe=>{U!=null&&U(qe)||at.add({current:qe})});const qt=document.querySelector(`[id='${s}']`);qt&&!(U!=null&&U(qt))&&at.add({current:qt});const an=()=>{q(!1)},qi=iL(Z),gr=iL(Ze.current);xt.scroll&&(window.addEventListener("scroll",an),qi==null||qi.addEventListener("scroll",an),gr==null||gr.addEventListener("scroll",an));let ii=null;xt.resize?window.addEventListener("resize",an):Z&&Ze.current&&(ii=_ue(Z,Ze.current,gt,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Li=qe=>{qe.key==="Escape"&&q(!1)};xt.escape&&window.addEventListener("keydown",Li),xt.clickOutsideAnchor&&window.addEventListener("click",_e);const V=[],ie=qe=>!!(qe!=null&&qe.target&&(Z!=null&&Z.contains(qe.target))),pe=qe=>{Fe&&ie(qe)||Se(qe)},oe=qe=>{Fe&&ie(qe)&&Te()},he=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],$e=["click","dblclick","mousedown","mouseup"];Object.entries(Bt).forEach(([qe,ct])=>{ct&&(he.includes(qe)?V.push({event:qe,listener:Nt}):$e.includes(qe)&&V.push({event:qe,listener:pe}))}),Object.entries(Ce).forEach(([qe,ct])=>{ct&&(he.includes(qe)?V.push({event:qe,listener:Ne}):$e.includes(qe)&&V.push({event:qe,listener:oe}))}),x&&V.push({event:"pointermove",listener:ke});const pt=()=>{ye.current=!0},wt=()=>{ye.current=!1,Te()},At=y&&(Ce.mouseout||Ce.mouseleave);return At&&((Ve=Ze.current)===null||Ve===void 0||Ve.addEventListener("mouseover",pt),(ht=Ze.current)===null||ht===void 0||ht.addEventListener("mouseout",wt)),V.forEach(({event:qe,listener:ct})=>{at.forEach(Mt=>{var en;(en=Mt.current)===null||en===void 0||en.addEventListener(qe,ct)})}),()=>{var qe,ct;xt.scroll&&(window.removeEventListener("scroll",an),qi==null||qi.removeEventListener("scroll",an),gr==null||gr.removeEventListener("scroll",an)),xt.resize?window.removeEventListener("resize",an):ii==null||ii(),xt.clickOutsideAnchor&&window.removeEventListener("click",_e),xt.escape&&window.removeEventListener("keydown",Li),At&&((qe=Ze.current)===null||qe===void 0||qe.removeEventListener("mouseover",pt),(ct=Ze.current)===null||ct===void 0||ct.removeEventListener("mouseout",wt)),V.forEach(({event:Mt,listener:en})=>{at.forEach(hn=>{var pi;(pi=hn.current)===null||pi===void 0||pi.removeEventListener(Mt,en)})})}},[Z,gt,We,se,Ee,P,N,R,Oe,v,w]),I.useEffect(()=>{var Ve,ht;let at=(ht=(Ve=rt==null?void 0:rt.anchorSelect)!==null&&Ve!==void 0?Ve:o)!==null&&ht!==void 0?ht:"";!at&&e&&(at=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`);const qt=new MutationObserver(an=>{const qi=[],gr=[];an.forEach(ii=>{if(ii.type==="attributes"&&ii.attributeName==="data-tooltip-id"&&(ii.target.getAttribute("data-tooltip-id")===e?qi.push(ii.target):ii.oldValue===e&&gr.push(ii.target)),ii.type==="childList"){if(Z){const Li=[...ii.removedNodes].filter(V=>V.nodeType===1);if(at)try{gr.push(...Li.filter(V=>
4011V.matches(at))),gr.push(...Li.flatMap(V=>[...V.querySelectorAll(at)]))}catch{}Li.some(V=>{var ie;return!!(!((ie=V==null?void 0:V.contains)===null||ie===void 0)&&ie.call(V,Z))&&(ot(!1),q(!1),re(null),cs(Q),cs(ge),!0)})}if(at)try{const Li=[...ii.addedNodes].filter(V=>V.nodeType===1);qi.push(...Li.filter(V=>V.matches(at))),qi.push(...Li.flatMap(V=>[...V.querySelectorAll(at)]))}catch{}}}),(qi.length||gr.length)&&et(ii=>[...ii.filter(Li=>!gr.includes(Li)),...qi])});return qt.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{qt.disconnect()}},[e,o,rt==null?void 0:rt.anchorSelect,Z]),I.useEffect(()=>{gt()},[gt]),I.useEffect(()=>{if(!(Y!=null&&Y.current))return()=>null;const Ve=new ResizeObserver(()=>{setTimeout(()=>gt())});return Ve.observe(Y.current),()=>{Ve.disconnect()}},[z,Y==null?void 0:Y.current]),I.useEffect(()=>{var Ve;const ht=document.querySelector(`[id='${s}']`),at=[...Ee,ht];Z&&at.includes(Z)||re((Ve=Ee[0])!==null&&Ve!==void 0?Ve:ht)},[s,Ee,Z]),I.useEffect(()=>(H&&q(!0),()=>{cs(Q),cs(ge)}),[]),I.useEffect(()=>{var Ve;let ht=(Ve=rt==null?void 0:rt.anchorSelect)!==null&&Ve!==void 0?Ve:o;if(!ht&&e&&(ht=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),ht)try{const at=Array.from(document.querySelectorAll(ht));et(at)}
4011catch{et([])}},[e,o,rt==null?void 0:rt.anchorSelect]),I.useEffect(()=>{Q.current&&(cs(Q),we(v))},[v]);const Jt=(Qe=rt==null?void 0:rt.content)!==null&&Qe!==void 0?Qe:z,$r=Fe&&Object.keys(Ae.tooltipStyles).length>0;return I.useImperativeHandle(t,()=>({open:Ve=>{if(Ve!=null&&Ve.anchorSelect)try{document.querySelector(Ve.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Ve.anchorSelect}" is not a valid CSS selector`)}Xt(Ve??null),Ve!=null&&Ve.delay?we(Ve.delay):q(!0)},close:Ve=>{Ve!=null&&Ve.delay?J(Ve.delay):q(!1)},activeAnchor:Z,place:Ae.place,isOpen:!!(We&&!g&&Jt&&$r)})),We&&!g&&Jt?zt.createElement(m,{id:e,role:ze,className:iM("react-tooltip",ju.tooltip,aS.tooltip,aS[r],n,`react-tooltip__place-${Ae.place}`,ju[$r?"show":"closing"],$r?"react-tooltip__show":"react-tooltip__closing",f==="fixed"&&ju.fixed,y&&ju.clickable),onTransitionEnd:Ve=>{cs(de),Fe||Ve.propertyName!=="opacity"||(ot(!1),Xt(null),D==null||D())},style:{...k,...Ae.tooltipStyles,opacity:ve!==void 0&&$r?ve:void 0},ref:Ze},Jt,zt.createElement(m,{className:iM("react-tooltip-arrow",ju.arrow,aS.arrow,i,_&&ju.noArrow),style:{...Ae.tooltipArrowStyles,background:Re?`linear-gradient(to right bottom, transparent 50%, ${Re} 50%)`:void 0,"--rt-arrow-size":`${Le}px`},ref:Me})):null},Nue=({content:t})=>zt.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),Due=zt.forwardRef(({id:t,anchorId:e,anchorSelect:n,content:i,html:r,render:s,className:o,classNameArrow:a,variant:l="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:w="absolute",middlewares:x,delayShow:g=0,delayHide:_=0,float:y=!1,hidden:M=!1,noArrow:E=!1,clickable:C=!1,closeOnEsc:P=!1,closeOnScroll:N=!1,closeOnResize:R=!1,openEvents:L,closeEvents:k,globalCloseEvents:$,imperativeModeOnly:ee=!1,style:D,position:U,isOpen:z,defaultIsOpen:Y=!1,disableStyleInjection:O=!1,border:H,opacity:W,arrowColor:j,arrowSize:Z,setIsOpen:re,afterShow:ue,afterHide:ve,disableTooltip:Re,role:Le="tooltip"},ze)=>{const[Qe,Ze]=I.useState(i),[Me,Q]=I.useState(r),[ge,de]=I.useState(c),[Ae,xe]=I.useState(l),[Fe,Ge]=I.useState(u),[We,ot]=I.useState(g),[rt,Xt]=I.useState(_),[X,F]=I.useState(y),[se,be]=I.useState(M),[ye,Ee]=I.useState(f),[et,Pe]=I.useState(m),[Oe,mt]=I.useState(w),[Bt,Ce]=I.useState(null),[xt,q]=I.useState(null),fe=I.useRef(null),we=I.useRef(O),{anchorRefs:J,activeAnchor:Se}=P9(t),Te=Xe=>Xe==null?void 0:Xe.getAttributeNames().reduce((Nt,Ne)=>{var gt;return Ne.startsWith("data-tooltip-")&&(Nt[Ne.replace(/^data-tooltip-/,"")]=(gt=Xe==null?void 0:Xe.getAttribute(Ne))!==null&&gt!==void 0?gt:null),Nt},{}),De=Xe=>{const Nt={place:Ne=>{var gt;de((gt=Ne)!==null&&gt!==void 0?gt:c)},content:Ne=>{Ze(Ne??i)},html:Ne=>{Q(Ne??r)},variant:Ne=>{var gt;xe((gt=Ne)!==null&&gt!==void 0?gt:l)},offset:Ne=>{Ge(Ne===null?u:Number(Ne))},wrapper:Ne=>{var gt;Ee((gt=Ne)!==null&&gt!==void 0?gt:f)},events:Ne=>{const gt=Ne==null?void 0:Ne.split(" ");Pe(gt??m)},"position-strategy":Ne=>{var gt;mt((gt=Ne)!==null&&gt!==void 0?gt:w)},"delay-show":Ne=>{ot(Ne===null?g:Number(Ne))},"delay-hide":Ne=>{Xt(Ne===null?_:Number(Ne))},float:Ne=>{F(Ne===null?y:Ne==="true")},hidden:Ne=>{be(Ne===null?M:Ne==="true")},"class-name":Ne=>{Ce(Ne)}};Object.values(Nt).forEach(Ne=>Ne(null)),Object.entries(Xe).forEach(([Ne,gt])=>{var Jt;(Jt=Nt[Ne])===null||Jt===void 0||Jt.call(Nt,gt)})};I.useEffect(()=>{Ze(i)},[i]),I.useEffect(()=>{Q(r)},[r]),I.useEffect(()=>{de(c)},[c]),I.useEffect(()=>{xe(l)},[l]),I.useEffect(()=>{Ge(u)},[u]),I.useEffect(()=>{ot(g)},[g]),I.useEffect(()=>{Xt(_)},[_]),I.useEffect(()=>{F(y)},[y]),I.useEffect(()=>{be(M)},[M]),I.useEffect(()=>{mt(w)},[w]),I.useEffect(()=>{we.current!==O&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[O]),I.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:O==="core",disableBase:O}}))},[]),I.useEffect(()=>{var Xe;const Nt=new Set(J);let Ne=n;if(!Ne&&t&&(Ne=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),Ne)try{document.querySelectorAll(Ne).forEach(ht=>{Nt.add({current:ht})})}catch{console.warn(`[react-tooltip] "${Ne}" is not a valid CSS selector`)}const gt=document.querySelector(`[id='${e}']`);if(gt&&Nt.add({current:gt}),!Nt.size)return()=>null;const Jt=(Xe=xt??gt)!==null&&Xe!==void 0?Xe:Se.current,$r=new MutationObserver(ht=>{ht.forEach(at=>{var qt;if(!Jt||at.type!=="attributes"||!(!((qt=at.attributeName)===null||qt===void 0)&&qt.startsWith("data-tooltip-")))return;const an=Te(Jt);De(an)})}),Ve={attributes:!0,childList:!1,subtree:!1};if(Jt){const ht=Te(Jt);De(ht),$r.observe(Jt,Ve)}return()=>{$r.disconnect()}},[J,Se,xt,e,n]),I.useEffect(()=>{D!=null&&D.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),H&&!eL("border",`${H}`)&&console.warn(`[react-tooltip] "${H}
4011" is not a valid \`border\`.`),D!=null&&D.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),W&&!eL("opacity",`${W}`)&&console.warn(`[react-tooltip] "${W}" is not a valid \`opacity\`.`)},[]);let ke=p;const _e=I.useRef(null);if(s){const Xe=s({content:(xt==null?void 0:xt.getAttribute("data-tooltip-content"))||Qe||null,activeAnchor:xt});ke=Xe?zt.createElement("div",{ref:_e,className:"react-tooltip-content-wrapper"},Xe):null}else Qe&&(ke=Qe);Me&&(ke=zt.createElement(Nue,{content:Me}));const Ke={forwardRef:ze,id:t,anchorId:e,anchorSelect:n,className:iM(o,Bt),classNameArrow:a,content:ke,contentWrapperRef:_e,place:ge,variant:Ae,offset:Fe,wrapper:ye,events:et,openOnClick:v,positionStrategy:Oe,middlewares:x,delayShow:We,delayHide:rt,float:X,hidden:se,noArrow:E,clickable:C,closeOnEsc:P,closeOnScroll:N,closeOnResize:R,openEvents:L,closeEvents:k,globalCloseEvents:$,imperativeModeOnly:ee,style:D,position:U,isOpen:z,defaultIsOpen:Y,border:H,opacity:W,arrowColor:j,arrowSize:Z,setIsOpen:re,afterShow:ue,afterHide:ve,disableTooltip:Re,activeAnchor:xt,previousActiveAnchor:fe.current,setActiveAnchor:Xe=>{q(Nt=>(Xe!=null&&Xe.isSameNode(Nt)||(fe.current=Nt),Xe))},role:Le};return zt.createElement(Iue,{...Ke})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",t=>{t.detail.disableCore||qB({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),t.detail.disableBase||qB({css:`
4012.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const Fue="https://cdn.jsdelivr.net/npm/world-atlas@2/countries-110m.json",Oue="https://cdn.jsdelivr.net/npm/us-atlas@3/states-10m.json",Uue=["Canada","Ireland","United Kingdom","France","Spain","India","Turkey","Singapore","South Africa","Mexico"],kue=["New York","New Hampshire","Vermont","Pennsylvania","Massachusetts","Rhode Island","Connecticut","Maine","Delaware","Maryland","Virginia","District of Columbia","North Carolina","South Carolina","Georgia","Florida","Arizona","California","Nevada","Hawaii","Ohio","Missouri","Kansas","Michigan","Indiana","Wisconsin","Illinois","New Jersey"],zue=()=>{const[t,e]=I.useState(""),[n,i]=I.useState({coordinates:[0,0],zoom:1}),r=()=>{n.zoom>=5||i(l=>({...l,zoom:l.zoom*1.5}))},s=()=>{n.zoom<=1||i(l=>({...l,zoom:l.zoom/1.5}))},o=()=>{i({coordinates:[0,0],zoom:1})},a=l=>{i(l)};return T.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center font-sans overflow-hidden bg-black/40 rounded-xl border border-cyan-900/40 relative shadow-[inset_0_0_50px_rgba(6,182,212,0.05)]",children:[T.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-20",style:{backgroundImage:`
4013                        linear-gradient(rgba(6, 182, 212, 0.2) 1px, transparent 1px),
4014                        linear-gradient(90deg, rgba(6, 182, 212, 0.2) 1px, transparent 1px)
4015                    `,backgroundSize:"40px 40px"}}),T.jsx("div",{className:"absolute inset-0 pointer-events-none flex justify-center items-center opacity-30",children:T.jsx("div",{className:"w-[80%] h-[80%
4015] rounded-full border border-cyan-500/30 animate-[ping_4s_cubic-bezier(0,0,0.2,1)_infinite]"})}),T.jsxs("div",{className:"absolute top-6 left-6 z-20 flex flex-col",children:[T.jsx("h3",{className:"text-cyan-400 text-2xl font-bold tracking-[0.2em] uppercase font-mono drop-shadow-[0_0_8px_rgba(6,182,212,0.8)]",children:"Navigation System"}),T.jsx("p",{className:"text-cyan-600 font-mono text-sm tracking-widest mt-1 uppercase",children:"Global Footprint Database"})]}),T.jsxs("div",{className:"absolute bottom-6 left-6 z-20 flex flex-col gap-4",children:[T.jsxs("div",{className:"flex gap-2",children:[T.jsx("button",{onClick:r,className:"bg-black/60 hover:bg-cyan-900/50 text-cyan-400 font-mono text-xl w-10 h-10 flex items-center justify-center rounded border border-cyan-800 transition-colors shadow-[0_0_10px_rgba(6,182,212,0.2)] focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"+"}),T.jsx("button",{onClick:s,className:"bg-black/60 hover:bg-cyan-900/50 text-cyan-400 font-mono text-xl w-10 h-10 flex items-center justify-center rounded border border-cyan-800 transition-colors shadow-[0_0_10px_rgba(6,182,212,0.2)] focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"-"}),T.jsx("button",{onClick:o,className:"bg-black/60 hover:bg-cyan-900/50 text-cyan-400 font-mono text-xs px-3 h-10 flex items-center justify-center rounded border border-cyan-800 transition-colors shadow-[0_0_10px_rgba(6,182,212,0.2)] uppercase tracking-widest focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Reset"})]}),T.jsxs("div",{className:"flex flex-col gap-2 font-mono text-xs text-cyan-500/80 uppercase tracking-widest",children:[T.jsxs("div",{className:"flex items-center gap-3 bg-black/60 px-3 py-1.5 rounded border border-cyan-900/50 backdrop-blur-md",children:[T.jsx("span",{className:"w-4 h-4 rounded-full border border-cyan-500 flex justify-center items-center text-[8px] animate-pulse",children:"⤡"}),T.jsx("span",{children:"Scroll to Zoom"})]}),T.jsxs("div",{className:"flex items-center gap-3 bg-black/60 px-3 py-1.5 rounded border border-cyan-900/50 backdrop-blur-md",children:[T.jsx("span",{className:"w-4 h-4 rounded-full border border-cyan-500 flex justify-center items-center text-[8px] animate-pulse",children:"✥"}),T.jsx("span",{children:"Click & Drag to Pan"})]})]})]}),T.jsx("div",{className:"flex-1 w-full flex justify-center items-center relative z-10",children:T.jsx(o3,{projectionConfig:{scale:140},style:{width:"100%",height:"100%"},children:T.jsxs(c3,{zoom:n.zoom,center:n.coordinates,onMoveEnd:a,maxZoom:5,children:[T.jsx(V1,{geography:Fue,children:({geographies:l})=>l.map(c=>{const u=c.properties.name;if(u==="United States of America"||u==="United States")return null;const p=Uue.includes(u);return T.jsx(GB,{geography:c,onMouseEnter:()=>{e(u)},onMouseLeave:()=>{e("")},fill:p?"rgba(6, 182, 212, 0.8)":"rgba(15, 23, 42, 0.6)",stroke:"rgba(6, 182, 212, 0.3)",strokeWidth:.5,style:{default:{outline:"none",transition:"all 0.3s ease"}
4015,hover:{fill:p?"rgba(34, 211, 238, 1)":"rgba(30, 41, 59, 0.8)",outline:"none",cursor:"crosshair"},pressed:{outline:"none"}}},c.rsmKey)})}),T.jsx(V1,{geography:Oue,children:({geographies:l})=>l.map(c=>{const u=c.properties.name,f=kue.includes(u);return T.jsx(GB,{geography:c,onMouseEnter:()=>{e(u)},onMouseLeave:()=>{e("")},fill:f?"rgba(6, 182, 212, 0.8)":"rgba(15, 23, 42, 0.6)",stroke:"rgba(6, 182, 212, 0.3)",strokeWidth:.5,style:{default:{outline:"none",transition:"all 0.3s ease"},hover:{fill:f?"rgba(34, 211, 238, 1)":"rgba(30, 41, 59, 0.8)",outline:"none",cursor:"crosshair"},pressed:{outline:"none"}}},c.rsmKey)})})]})})}),T.jsxs("div",{className:"absolute bottom-6 right-6 z-20 flex flex-col gap-3 font-mono text-xs bg-black/60 p-4 rounded-lg border border-cyan-900/50 backdrop-blur-md",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-3 h-3 bg-cyan-400 rounded-sm shadow-[0_0_10px_rgba(34,211,238,0.8)] border border-cyan-200"}),T.jsx("span",{className:"text-cyan-100 uppercase tracking-widest font-semibold",children:"Analyzed Sector"})]}),T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-3 h-3 bg-slate-800 rounded-sm border border-cyan-900/50"}),T.jsx("span",{className:"text-cyan-700 uppercase tracking-widest opacity-80",children:"Unknown Terrain"})]})]}),T.jsx(Due,{id:"map-tooltip",content:t,isOpen:t!=="",style:{backgroundColor:"rgba(0, 0, 0, 0.85)",color:"#22d3ee",border:"1px solid rgba(6, 182, 212, 0.5)",borderRadius:"4px",fontFamily:"monospace",textTransform:"uppercase",letterSpacing:"0.1em",boxShadow:"0 0 15px rgba(6, 182, 212, 0.3)",padding:"8px 12px",zIndex:100}})]})},Hue=()=>{const t=[{icon:T.jsx(lre,{className:"w-8 h-8 text-blue-400"}),title:"Cool Software",desc:"Engineering & Innovation",color:"from-blue-500/20 to-cyan-500/20"},{icon:T.jsx(cre,{className:"w-8 h-8 text-purple-400"}),title:"Astronomy",desc:"Stargazing & Space Physics",color:"from-purple-500/20 to-blue-500/20"},{icon:T.jsx(ure,{className:"w-8 h-8 text-pink-400"}),title:"Physics",desc:"Laws of the Universe",color:"from-pink-500/20 to-rose-500/20"},{icon:T.jsx(are,{className:"w-8 h-8 text-sky-400"}),title:"Aerospace",desc:"Aviation & Flight Dynamics",color:"from-sky-500/20 to-indigo-500/20"}];return T.jsxs("section",{id:"about",className:"min-h-screen py-20 bg-black text-white relative overflow-hidden",children:[T.jsxs("div",{className:"absolute top-0 left-0 w-full h-full overflow-hidden pointer-events-none",children:[T.jsx("div",{className:"absolute top-[-10%] right-[-10%] w-[500px] h-[500px] bg-purple-900/20 rounded-full blur-[120px]"}),T.jsx("div",{className:"absolute bottom-[-10%] left-[-10%] w-[500px] h-[500px] bg-blue-900/20 rounded-full blur-[120px]"})]}),T.jsx("div",{className:"container mx-auto px-4 sm:px-6 relative z-10",children:T.jsx(Wi.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.8},className:"max-w-7xl mx-auto",children:T.jsxs("div",{className:"relative bg-black/80 border border-white/10 rounded-3xl backdrop-blur-2xl overflow-hidden shadow-[0_0_50px_rgba(0,0,0,0.5)]",children:[T.jsxs("div",{className:"bg-gradient-to-r from-white/5 to-transparent border-b border-white/10 p-3 sm:p-5 flex justify-between items-center sm:pr-8",children:[T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs("div",{className:"flex gap-2",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80 shadow-[0_0_10px_rgba(239,68,68,0.5)]"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/80 shadow-[0_0_10px_rgba(234,179,8,0.5)]"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/80 shadow-[0_0_10px_rgba(34,197,94,0.5)] animate-pulse"})]}),T.jsx("h3",{className:"font-mono text-xs sm:text-sm tracking-[0.2em] text-gray-400 hidden sm:block",children:"VANGUARD OS v2.0 // COMMAND_INTERFACE"})]}),T.jsxs("div",{className:"font-mono text-xs text-blue-400 flex items-center gap-2",children:[T.jsxs("span",{className:"relative flex h-2 w-2",children:[T.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),T.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),"SYSTEM_ONLINE"]})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-1 p-1 bg-white/5",children:[T.jsxs("div",{className:"lg:col-span-4 bg-black/60 p-6 sm:p-8 flex flex-col justify-between",children:[T.jsxs("div",{children:[T.jsxs("div",{className:"relative group mb-8 mx-auto w-48 h-48 sm:w-64 sm:h-64 lg:w-full lg:h-auto lg:aspect-square",children:[T.jsx("div",{className:"absolute -inset-1 bg-gradient-to-tr from-blue-600/50 to-purple-600/50 rounded-2xl blur-md opacity-75 group-hover:opacity-100 transition duration-1000"}),T.jsx("img",{src:XQ,alt:"Arnav Singh",className:"relative w-full h-full rounded-2xl border border-white/20 object-cover shadow-2xl"}),T.jsx("div",{className:"absolute top-2 left-2 pb-1 border-l-2 border-t-2 border-white/30 w-8 h-8"}),T.jsx("div",{className:"absolute bottom-2 right-2 pt-1 border-r-2 border-b-2 border-white/30 w-8 h-8"})]}),T.jsx("h1",{className:"text-4xl sm:text-5xl font-bold tracking-tighter mb-2 bg-clip-text text-transparent bg-gradient-to-r from-white to-gray-400",children:"Ar
4015nav Singh"}),T.jsx("p",{className:"text-blue-400 font-mono text-sm mb-6 tracking-wider",children:"COMMANDER // ENG-SCI DIV"}),T.jsxs("div",{className:"space-y-4 text-gray-400 text-sm leading-relaxed",children:[T.jsxs("p",{children:["A ",T.jsx("span",{className:"text-white font-medium",children:"Senior at Dartmouth College"})," 🌲 fusing Physics, CS, and Math to build the future and explore the cosmos."]}),T.jsx("p",{children:"Born in Singapore, raised between the green hills of Ireland 🇮🇪 and the scenic landscapes of Upstate New York 🍁. Always looking up at the sky."})]})]}),T.jsx("div",{className:"mt-8 pt-6 border-t border-white/10",children:T.jsxs(Wi.button,{onClick:()=>{const e=document.getElementById("contact");e&&e.scrollIntoView({behavior:"smooth"})},whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full flex items-center justify-center gap-3 bg-white/10 hover:bg-white/20 border border-white/20 text-white font-mono text-sm py-3 px-6 rounded-lg transition-all",children:[T.jsx("span",{children:"CONTACT"}),T.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]})})]}),T.jsxs("div",{className:"lg:col-span-8 flex flex-col gap-1",children:[T.jsxs("div",{className:"bg-black/60 p-6 sm:p-8",children:[T.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[T.jsx("div",{className:"w-8 h-1 bg-blue-500 rounded-full"}),T.jsx("h3",{className:"font-mono text-sm tracking-[0.2em] text-gray-400",children:"MISSION_DIRECTIVES //"})]}),T.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:t.map((e,n)=>T.jsxs("div",{className:"flex flex-col items-center sm:items-start text-center sm:text-left gap-3 p-4 rounded-xl bg-white/5 border border-white/5 hover:bg-white/10 transition-colors",children:[T.jsx("div",{className:"bg-black/50 p-2 rounded-lg",children:e.icon}),T.jsxs("div",{children:[T.jsx("p",{className:"text-white font-bold text-sm",children:e.title}),T.jsx("p",{className:"text-gray-500 text-xs hidden sm:block",children:e.desc})]})]},n))})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-1 flex-1",children:[T.jsxs("div",{className:"lg:col-span-2 bg-black/60 p-6 sm:p-8 flex flex-col min-h-[350px] sm:min-h-[400px] relative overflow-hidden group",children:[T.jsx("div",{className:"absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/cubes.png')] opacity-5 pointer-events-none"}),T.jsxs("div",{className:"flex items-center justify-between mb-6 z-10 relative",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-8 h-1 bg-green-500 rounded-full"}),T.jsx("h3",{className:"font-mono text-sm tracking-[0.2em] text-gray-400 whitespace-nowrap",children:"COORDINATES //"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-ping"}),T.jsx("p",{className:"font-mono text-[10px] text-green-500 tracking-widest hidden sm:block",children:"TRACKING_ON"})]})]}),T.jsx("div",{className:"w-full flex-grow flex items-center justify-center scale-90 sm:scale-100 group-hover:scale-[1.02] transition-transform duration-700 z-10 relative",children:T.jsx(zue,{})})]}),T.jsxs("div",{className:"lg:col-span-1 bg-black/60 p-6 flex flex-col relative overflow-hidden",children:[T.jsxs("div",{className:"flex items-center gap-3 mb-6 z-10 relative",children:[T.jsx("div",{className:"w-4 h-1 bg-purple-500 rounded-full"}),T.jsx("h3",{className:"font-mono text-[10px] sm:text-xs tracking-[0.2em] text-gray-400",children:"CREDENTIALS //"})]}),T.jsxs("div",{className:"flex flex-col gap-4 items-center sm:items-start flex-grow justify-start z-10 relative",children:[T.jsxs("div",{className:"relative w-16 h-16 sm:w-20 sm:h-20 flex-shrink-0",children:[T.jsx("div",{className:"absolute inset-0 border border-purple-500/30 rounded-full animate-[spin_10s_linear_infinite]"}),T.jsx("div",{className:"absolute inset-1 border border-dashed border-blue-500/30 rounded-full animate-[spin_15s_linear_infinite_reverse]"}),T.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-3 bg-black rounded-full z-10",children:T.jsx("img",{src:l8,alt:"Dartmouth College",className:"w-full h-full object-contain drop-shadow-[0_0_10px_rgba(255,255,255,0.2)]"})})]}),T.jsxs("div",{className:"flex-1 text-center sm:text-left",children:[T.jsx("h4",{className:"text-lg font-bold text-white mb-0.5",children:"Dartmouth College"}),T.jsx("p",{className:"text-purple-400 text-[11px] sm:text-xs mb-4",children:"B.A. Physics & Math / CS, Jun 2026"}),T.jsxs("div",{className:"bg-black/50 border border-white/5 rounded-lg p-2.5 mb-4 inline-block sm:block w-full sm:w-auto text-left",children:[T.jsx("p",{className:"text-[9px] sm:text-[10px] font-mono text-gray-500 mb-0.5",children:"GPA_OVERALL"}),T.jsx("p",{className:"text-xs sm:text-sm text-green-400 font-mono",children:"3.9 / 4.0"})]}),T.jsxs("div",{className:"flex flex-wrap justify-center sm:justify-start gap-1.5 mb-4",children:[T.jsx("span",{className:"text-[8px] sm:text-[9px] font-mono bg-purple-500/10 border border-purple-500/20 text-purple-300 px-1.5 py-0.5 rounded",children:"PHYSICS"}),T.jsx("span",{className:"text-[8px] sm:text-[9px] font-mono bg-blue-500/10 border border-blue-500/20 text-blue-300 px-1.5 py-0.5 rounded",children:"CS"}),T.jsx("span",{className:"text-[8px] sm:text-[9px] font-mono bg-green-500/10 border border-green-500/20 text-green-300 px-1.5 py-0.5 rounded",children:"MATH"})]}),T.jsxs("div",{className:"border-t border-white/10 pt-3 hidden sm:block",children:[T.jsx("p",{className:"text-[8px] sm:text-[9px] font-mono text-gray-500 mb-1.5",children:"RELEVANT_COURSEWORK //"}),T.jsx("p",{className:"text-[10px] text-gray-400 leading-relaxed pr-2",children:"ML (Grad), AI (Grad), Quantum Mechanics, Security & Privacy, Software Design, App Dev."})]})]})]})]})]})]})]})]})})})]})},Gue=Qy(Hue,"about"),rL=({children:t})=>{const e=I.useRef(null),[n,i]=I.useState(!1),[r,s]=I.useState(!0),o=()=>
4015{if(e.current){const{scrollLeft:l,scrollWidth:c,clientWidth:u}=e.current;i(l>0),s(l<c-u-5)}},a=l=>{if(e.current){const c=l==="left"?-400:400;e.current.scrollBy({left:c,behavior:"smooth"})}};return T.jsxs("div",{className:"relative group/carousel",children:[n&&T.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-16 bg-gradient-to-r from-black/80 to-transparent z-40 pointer-events-none"}),n&&T.jsx("button",{onClick:()=>a("left"),className:"absolute left-0 top-1/2 -translate-y-1/2 z-50 p-3 bg-black/50 text-white hover:bg-black/80 opacity-0 group-hover/carousel:opacity-100 md:opacity-0 transition-opacity rounded-r-xl hidden md:block",children:T.jsx(dZ,{size:24})}),T.jsx("div",{ref:e,onScroll:o,className:"flex overflow-x-auto gap-6 pb-12 pt-4 px-2 snap-x snap-mandatory hide-scrollbar",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:t}),r&&T.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-16 bg-gradient-to-l from-black/80 to-transparent z-40 pointer-events-none"}),r&&T.jsx("button",{onClick:()=>a("right"),className:"absolute right-0 top-1/2 -translate-y-1/2 z-50 p-3 bg-black/50 text-white hover:bg-black/80 opacity-0 group-hover/carousel:opacity-100 md:opacity-0 transition-opacity rounded-l-xl hidden md:block",children:T.jsx(pZ,{size:24})})]})},Vue=()=>{var r;const[t,e]=I.useState(null),n=RZ.filter(s=>!s.isResearch),i=PZ;return T.jsx("section",{id:"projects",className:"py-10 relative z-10 text-white",children:T.jsxs("div",{className:"container mx-auto px-4 lg:px-8 max-w-7xl",children:[T.jsx(Wi.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:T.jsxs("div",{className:"w-full bg-black/80 border border-white/10 rounded-2xl overflow-hidden backdrop-blur-md shadow-2xl shadow-blue-900/20",children:[T.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10 bg-white/5",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("div",{className:"flex gap-1.5",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/80 animate-pulse"})]}),T.jsx("p",{className:"font-mono text-xs text-gray-400 tracking-widest ml-4 hidden sm:block",children:"VANGUARD OS v2.0 // PROJECTS_&_RESEARCH"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-ping"}),T.jsx("p",{className:"font-mono text-xs text-blue-400 tracking-widest",children:"SYSTEM_ONLINE"})]})]}),T.jsxs("div",{className:"p-6 md:p-10 lg:p-12",children:[T.jsxs("div",{className:"mb-12 text-center sm:text-left",children:[T.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-500",children:"Selected Work"}),T.jsx("p",{className:"text-gray-400 text-lg",children:"A showcase of my engineering projects and scientific research."})]}),T.jsxs("div",{className:"mb-20",children:[T.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[T.jsx("div",{className:"w-8 h-1 bg-blue-500 rounded-full"}),T.jsx("h3",{className:"font-mono text-sm tracking-[0.2em] text-gray-400",children:"ENGINEERING //"})]}),T.jsx(rL,{children:n.map((s,o)=>T.jsxs(Wi.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.4,delay:o*.1},viewport:{once:!0,margin:"-50px"},onClick:()=>e(s),className:"min-w-[280px] max-w-[280px] sm:min-w-[350px] sm:max-w-[350px] flex-shrink-0 snap-center glass-panel p-6 rounded-xl bg-white/5 hover:bg-white/10 transition-all duration-300 group cursor-pointer border border-white/5 hover:border-blue-500/50 hover:scale-105 hover:-translate-y-2 hover:shadow-2xl hover:shadow-blue-500/20 hover:z-50 relative overflow-hidden flex flex-col",children:[T.jsx("div",{className:"absolute inset-0 bg-blue-500/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none"}),T.jsx("div",{className:`w-12 h-12 rounded-lg flex items-center justify-center mb-6 ${s.theme} shadow-lg z-10`,children:typeof s.iconUrl=="string"?T.jsx("img",{src:s.iconUrl,alt:s.name,className:"w-1/2 h-1/2 object-contain"}):T.jsx(s.iconUrl,{className:"w-1/2 h-1/2 text-white"})}),T.jsx("h4",{className:"text-xl font-bold text-white mb-3 group-hover:text-blue-400 transition-colors z-10",children:s.name}),T.jsx("p",{className:"text-gray-400 text-sm leading-relaxed mb-6 line-clamp-3 z-10",children:s.description}),s.tags&&T.jsxs("div",{className:"flex flex-wrap gap-2 mb-6 mt-auto z-10",children:[s.tags.slice(0,3).map((a,l)=>T.jsx("span",{className:"text-[10px] font-mono bg-blue-500/10 text-blue-300 px-2 py-1 rounded border border-blue-500/20",children:a},l)),s.tags.length>3&&T.jsxs("span",{className:"text-[10px] font-mono text-gray-500 px-2 py-1",children:["+",s.tags.length-3]})]}),T.jsx("div",{className:"flex items-center gap-2 mt-4 pt-4 border-t border-white/10 w-full z-10",children:T.jsx("span",{className:"font-mono text-xs text-blue-400 group-hover:text-blue-300 transition-colors tracking-widest",children:"ACCESS_DATA //"})})]},s.name))})]}),T.jsxs("div",{children:[T.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[T.jsx("div",{className:"w-8 h-1 bg-purple-500 rounded-full"}),T.jsx("h3",{className:"font-mono text-sm tracking-[0.2em] text-gray-400 whitespace-nowrap",children:"RESEARCH //"})]}),T.jsx(rL,{children:i.map((s,o)=>T.jsxs(Wi.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.4,delay:o*.1},viewport:{once:!0,margin:"-50px"},className:"min-w-[280px] max-w-[280px] sm:min-w-[350px] sm:max-w-[350px] flex-shrink-0 snap-center glass-panel p-6 sm:p-8 rounded-xl bg-white/5 hover:bg-white/10 transition-all duration-300 relative overflow-hidden group hover:scale-105 hover:-translate-y-2 hover:shadow-2xl hover:shadow-
4015purple-500/20 hover:z-50 hover:border-purple-500/50 border border-white/5 flex flex-col",children:[T.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-purple-500/10 rounded-full blur-3xl -mr-16 -mt-16 transition-all group-hover:bg-purple-500/30"}),T.jsx("h4",{className:"text-2xl font-bold text-white mb-4 z-10 group-hover:text-purple-400 transition-colors",children:s.name}),T.jsx("p",{className:"text-gray-400 leading-relaxed mb-6 z-10 flex-grow",children:s.description}),T.jsx("div",{className:"flex flex-wrap gap-2 mb-6 z-10 mt-auto",children:s.tags.map((a,l)=>T.jsx("span",{className:"text-[10px] font-mono bg-purple-500/10 text-purple-300 px-3 py-1 rounded border border-purple-500/20",children:a},l))}),T.jsx("div",{className:"pt-4 border-t border-white/10 w-full z-10 mt-2",children:T.jsxs(Hf,{to:s.link,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm font-semibold text-purple-400 hover:text-purple-300 transition-colors",children:["Read Publication ",T.jsx("span",{className:"text-lg",children:"→"})]})})]},o))})]})]})]})}),T.jsx(kF,{children:t&&T.jsx(Wi.div,{initial:{opacity:0}
4015,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 sm:p-6 bg-black/60 backdrop-blur-md",onClick:()=>e(null),children:T.jsxs(Wi.div,{initial:{scale:.95,y:20},animate:{scale:1,y:0},exit:{scale:.95,y:20},onClick:s=>s.stopPropagation(),className:"w-full max-w-2xl bg-black/90 border border-blue-500/30 rounded-2xl overflow-hidden shadow-[0_0_40px_rgba(59,130,246,0.15)] flex flex-col max-h-[90vh]",children:[T.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10 bg-blue-500/5",children:[T.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[T.jsx("div",{className:"w-8 h-1 bg-blue-500 rounded-full flex-shrink-0"}),T.jsxs("p",{className:"font-mono text-[10px] sm:text-xs text-blue-400 tracking-widest truncate",children:["DATABANK_ACCESS // ",t.name.toUpperCase()]})]}),T.jsx("button",{onClick:()=>e(null),className:"w-8 h-8 flex-shrink-0 flex items-center justify-center rounded-full bg-white/5 hover:bg-white/10 text-gray-400 hover:text-white transition-colors",children:"✕"})]}),T.jsxs("div",{className:"p-6 md:p-8 overflow-y-auto custom-scrollbar",children:[T.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-6 mb-8",children:[T.jsx("div",{className:`w-16 h-16 rounded-xl flex-shrink-0 flex items-center justify-center ${t.theme} shadow-lg`,children:typeof t.iconUrl=="string"?T.jsx("img",{src:t.iconUrl,alt:t.name,className:"w-1/2 h-1/2 object-contain"}):T.jsx(t.iconUrl,{className:"w-1/2 h-1/2 text-white"})}),T.jsxs("div",{children:[T.jsx("h3",{className:"text-2xl md:text-3xl font-bold text-white mb-3",children:t.name}),T.jsx("div",{className:"flex flex-wrap gap-2",children:(r=t.tags)==null?void 0:r.map((s,o)=>T.jsx("span",{className:"text-[10px] font-mono bg-blue-500/10 text-blue-300 px-2 py-1 rounded border border-blue-500/20",children:s},o))})]})]}),T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{children:[T.jsx("h4",{className:"font-mono text-xs tracking-[0.2em] text-gray-500 mb-3",children:"MISSION_SUMMARY //"}),T.jsx("p",{className:"text-gray-300 leading-relaxed text-sm lg:text-base",children:t.longDescription||t.description})]}),T.jsx("div",{className:"pt-8 flex justify-end",children:T.jsxs(Hf,{to:t.link,target:t.link.startsWith("http")?"_blank":void 0,rel:t.link.startsWith("http")?"noopener noreferrer":void 0,className:"group flex items-center justify-center gap-3 bg-white/10 border border-white/20 hover:bg-blue-600 hover:border-blue-500 text-white font-mono text-sm px-6 py-3 rounded-lg transition-all w-full sm:w-auto",onClick:()=>e(null),children:[T.jsx("span",{children:"INITIATE_LINK"}),T.jsx("img",{src:tT,alt:"arrow",className:"w-4 h-4 object-contain brightness-200 group-hover:translate-x-1 transition-transform"})]})})]})]})]})})})]})})},jue=Qy(Vue,"projects"),jp={_origin:"https://api.emailjs.com"},Wue=(t,e="https://api.emailjs.com")=>{jp._userID=t,jp._origin=e},B9=(t,e,n)=>{if(!t)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!n)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class sL{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const L9=(t,e,n={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new sL(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new sL(o))}),s.open("POST",jp._origin+t,!0),Object.keys(n).forEach(o=>{s.setRequestHeader(o,n[o])}),s.send(e)}),Xue=(t,e,n,i)=>{const r=i||jp._userID;return B9(r,t,e),L9("/api/v1.0/email/send",JSON.stringify({lib_version:"3.12.1",user_id:r,service_id:t,template_id:e,template_params:n}),{"Content-type":"application/json"})},Jue=t=>{let e;if(typeof t=="string"?e=document.querySelector(t):e=t,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},Kue=(t,e,n,i)=>{const r=i||jp._userID,s=Jue(n);B9(r,t,e);const o=new FormData(s);return o.append("lib_version","3.12.1"),o.append("service_id",t),o.append("template_id",e),o.append("user_id",r),L9("/api/v1.0/email/send-form",o)},Yue={init:Wue,send:Xue,sendForm:Kue},Que=()=>{const[t,e]=I.useState({show:!1,text:"",type:"danger"});return{alert:t,showAlert:({text:r,type:s="danger"})=>e({show:!0,text:r,type:s}),hideAlert:()=>e({show:!1,text:"",type:"danger"})}},Zue=()=>{const t=I.useRef(),[e,n]=I.useState({name:"",email:"",message:""}),{alert:i,showAlert:r,hideAlert:s}=Que(),[o,a]=I.useState(!1),[l,c]=I.useState(!1),u=({target:{name:v,value:w}})=>{n({...e,[v]:w})},f=()=>c(!0),p=()=>c(!1),m=v=>{v.preventDefault(),a(!0),c(!0);const w="service_0j22ijs",x="template_erakz9g",g="V2s55BPW8JTKzPLgM";Yue.send(w,x,{name:e.name,title:e.email,message:e.message},g).then(()=>
4015{a(!1),r({show:!0,text:"Thank you for your message 😃",type:"success"}),setTimeout(()=>{s(!1),n({name:"",email:"",message:""})},3e3)},_=>{a(!1),console.error(_),r({show:!0,text:"I didn't receive your message 😢",type:"danger"})}).finally(()=>{c(!1)})};return T.jsx("section",{id:"contact",className:"relative z-10 text-white min-h-screen py-20",children:T.jsx("div",{className:"container mx-auto px-4 lg:px-8 max-w-7xl",children:T.jsxs(Wi.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"w-full bg-black/80 border border-white/10 rounded-2xl overflow-hidden backdrop-blur-md shadow-2xl shadow-blue-900/20",children:[T.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10 bg-white/5",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("div",{className:"flex gap-1.5",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/80 animate-pulse"})]}),T.jsx("p",{className:"font-mono text-xs text-gray-400 tracking-widest ml-4 hidden sm:block",children:"VANGUARD OS v2.0 // COMMUNICATIONS"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-ping"}),T.jsx("p",{className:"font-mono text-xs text-blue-400 tracking-widest",children:"UPLINK_READY"})]})]}),T.jsxs("div",{className:"flex lg:flex-row flex-col",children:[T.jsxs("div",{className:"flex-1 p-6 md:p-8 lg:p-12 border-b lg:border-b-0 lg:border-r border-white/10 bg-white/5 relative",children:[i.show&&T.jsx("div",{className:"absolute top-0 left-0 w-full z-50",children:T.jsx(iH,{...i})}),T.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-500",children:"Establish Comm Link"}),T.jsx("p",{className:"text-gray-400 mb-10 text-lg",children:"Looking to add a new rover to your fleet, have a mission in mind, or just want to transmit a signal? I'm ready to receive your telemetry!"}),T.jsxs("form",{ref:t,onSubmit:m,className:"w-full flex flex-col gap-6",children:[T.jsxs("label",{className:"flex flex-col",children:[T.jsx("span",{className:"font-semibold text-gray-300 mb-2",children:"Name"}),T.jsx("input",{type:"text",name:"name",className:"bg-black/50 border border-white/10 rounded-lg p-3 text-white placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all duration-300 resize-none",placeholder:"Enter pilot designation...",required:!0,value:e.name,onChange:u,onFocus:f,onBlur:p})]}),T.jsxs("label",{className:"flex flex-col",children:[T.jsx("span",{className:"font-semibold text-gray-300 mb-2",children:"Email"}),T.jsx("input",{type:"email",name:"email",className:"bg-black/50 border border-white/10 rounded-lg p-3 text-white placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all duration-300 resize-none",placeholder:"Ex. [email protected]",required:!0,value:e.email,onChange:u,onFocus:f,onBlur:p})]}),T.jsxs("label",{className:"flex flex-col",children:[T.jsx("span",{className:"font-semibold text-gray-300 mb-2",children:"Message"}),T.jsx("textarea",{name:"message",rows:"4",className:"bg-black/50 border border-white/10 rounded-lg p-3 text-white placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all duration-300 resize-none",placeholder:"Transmit your mission parameters...",required:!0,value:e.message,onChange:u,onFocus:f,onBlur:p})]}),T.jsx("button",{type:"submit",disabled:o,className:"btn font-mono bg-blue-600/20 border border-blue-500/30 hover:bg-blue-600 text-white font-bold py-3 px-6 rounded-lg transition-all duration-300 w-full sm:w-auto mt-4",onFocus:f,onBlur:p,children:o?"TRANSMITTING...":"SEND_TRANSMISSION"})]})]}),T.jsxs("div",{className:"lg:w-1/2 w-full h-[400px] md:h-[550px] lg:h-auto relative overflow-hidden bg-black/40",children:[T.jsx("div",{className:"absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/cubes.png')] opacity-5 pointer-events-none z-0"}),T.jsx("div",{className:"absolute inset-0 border border-blue-500/10 rounded-full w-[150%] h-[150%] 
4015-top-[25%] -left-[25%] pointer-events-none opacity-20"}),T.jsx("div",{className:"absolute inset-0 border border-blue-500/10 rounded-full w-[100%] h-[100%] top-0 left-0 pointer-events-none opacity-20"}),T.jsx("div",{className:"absolute inset-0 w-px h-full bg-blue-500/10 left-1/2 pointer-events-none"}),T.jsx("div",{className:"absolute inset-0 h-px w-full bg-blue-500/10 top-1/2 pointer-events-none"}),T.jsxs("div",{className:"absolute top-4 right-4 z-10 flex items-center gap-2",children:[T.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-ping"}),T.jsx("p",{className:"font-mono text-[10px] text-green-500 tracking-widest",children:"RADAR_ACTIVE"})]}),T.jsxs(qE,{dpr:[1,2],camera:{position:[0,0,5],fov:75,near:.1,far:1e3},className:"z-10 relative",children:[T.jsx("directionalLight",{position:[0,0,1],intensity:2.5}),T.jsx("ambientLight",{intensity:.5}),T.jsx("pointLight",{position:[5,10,0],intensity:2}),T.jsx("spotLight",{position:[10,10,10],angle:.15,penumbra:1,intensity:2}),T.jsx(I.Suspense,{fallback:T.jsx(a8,{}),children:T.jsx(sre,{isRotating:l,position:[0,0,0],rotation:[0,0,0],scale:[.1,.1,.1]})})]})]})]})]})})})};function que(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M22.394 6c-.167-.29-.398-.543-.652-.69L12.926.22c-.509-.294-1.34-.294-1.848 0L2.26 5.31c-.508.293-.923 1.013-.923 1.6v10.18c0 .294.104.62.271.91.167.29.398.543.652.69l8.816 5.09c.508.293 1.34.293 1.848 0l8.816-5.09c.254-.147.485-.4.652-.69.167-.29.27-.616.27-.91V6.91c.003-.294-.1-.62-.268-.91zM12 19.11c-3.92 0-7.109-3.19-7.109-7.11 0-3.92 3.19-7.11 7.11-7.11a7.133 7.133 0 016.156 3.553l-3.076 1.78a3.567 3.567 0 00-3.08-1.78A3.56 3.56 0 008.444 12 3.56 3.56 0 0012 15.555a3.57 3.57 0 003.08-1.778l3.078 1.78A7.135 7.135 0 0112 19.11zm7.11-6.715h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79zm2.962 0h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79z"},child:[]}]})(t)}function $ue(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z"},child:[]}]})(t)}function efe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12.002 0a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.54 4.931a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm0 9.862a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm-8.54 4.931a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.276zm-8.542-4.93a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.277zm0-9.863a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.542-3.378L2.953 6.777v10.448l9.049 5.224 9.047-5.224V6.777zm0 1.601 7.66 13.27H4.34zm-1.387.371L3.97 15.037V7.363zm2.774 0 6.646 3.838v7.674zM5.355 17.44h13.293l-6.646 3.836z"},child:[]}]})(t)}function tfe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10.315 4.876L6.3048 2.8517l-4.401 2.1965 4.1186 2.0683zm1.8381.9277l4.2045 2.1223-4.3622 2.1906-4.125-2.0718zm5.6153-2.9213l4.3193 2.1658-3.863 1.9402-4.2131-2.1252zm-1.859-.9329L12.021 0 8.1742 1.9193l4.0068 2.0208zm-3.0401 16.7443V24l4.7107-2.3507-.0053-5.3085zm4.7037-4.2057l-.0052-5.2528-4.6985 2.3356v5.2546zm5.6553-.9845v5.327l-4.0178 2.0052-.0029-5.3028zm0-1.8626V6.4214l-4.0253 2.001.0034 5.2633zM11.2062 11.571L8.0333 9.9756v6.895s-3.8804-8.2564-4.2399-8.998c-.0463-.0957-.2371-.2007-.2858-.2262C2.8118 7.2812.773 6.2485.773 6.2485V18.43l2.8204 1.5076v-6.3674s3.8392 7.3775 3.878 7.458c.0389.0807.4245.8582.8362 1.1314.5485.363 2.8992 1.7766 2.8992 1.7766z"},child:[]}]})(t)}function nfe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.922 0h2.623v18.104h-2.623zm-4.126 12.94h2.623v2.57h-2.623zm0-7.037h2.623v5.446h-2.623zm0 11.197h2.623v5.446h-2.623zM4.456 5.896h2.622V24H4.455zm4.213 2.559h2.623v2.57H8.67zm0 4.151h2.623v5.447H8.67zm0-11.187h2.623v5.446H8.67Z"},child:[]}]})(t)}function ife(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.43
401502-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698zM2.371 11.8765c-.7435-2.4358-1.1779-4.8851-1.2123-5.5719-.1086-2.1714.4171-3.6829 1.5623-4.4927 1.8367-1.2986 4.8398-.5408 6.108-.13-.0032.0032-.0066.0061-.0098.0094-2.0238 2.044-1.9758 5.536-1.9708 5.7495-.0002.0823.0066.1989.0162.3593.0348.5873.0996 1.6804-.0735 2.9184-.1609 1.1504.1937 2.2764.9728 3.0892.0806.0841.1648.1631.2518.2374-.3468.3714-1.1004 1.1926-1.9025 2.1576-.5677.6825-.9597.5517-1.0886.5087-.3919-.1307-.813-.5871-1.2381-1.3223-.4796-.839-.9635-2.0317-1.4155-3.5126zm6.0072 5.0871c-.1711-.0428-.3271-.1132-.4322-.1772.0889-.0394.2374-.0902.4833-.1409 1.2833-.2641 1.4815-.4506 1.9143-1.0002.0992-.126.2116-.2687.3673-.4426a.3549.3549 0 0 0 .0737-.1298c.1708-.1513.2724-.1099.4369-.0417.156.0646.3078.26.3695.4752.0291.1016.0619.2945-.0452.4444-.9043 1.2658-2.2216 1.2494-3.1676 1.0128zm2.094-3.988-.0525.141c-.133.3566-.2567.6881-.3334 1.003-.6674-.0021-1.3168-.2872-1.8105-.8024-.6279-.6551-.9131-1.5664-.7825-2.5004.1828-1.3079.1153-2.4468.079-3.0586-.005-.0857-.0095-.1607-.0122-.2199.2957-.2621 1.6659-.9962 2.6429-.7724.4459.1022.7176.4057.8305.928.5846 2.7038.0774 3.8307-.3302 4.7363-.084.1866-.1633.3629-.2311.5454zm7.3637 4.5725c-.0169.1768-.0358.376-.0618.5959l-.146.4383a.3547.3547 0 0 0-.0182.1077c-.0059.4747-.054.6489-.115.8693-.0634.2292-.1353.4891-.1794 1.0575-.11 1.4143-.8782 2.2267-2.4172 2.5565-1.5155.3251-1.7843-.4968-2.0212-1.2217a6.5824 6.5824 0 0 0-.0769-.2266c-.2154-.5858-.1911-1.4119-.1574-2.5551.0165-.5612-.0249-1.9013-.3302-2.6462.0044-.2932.0106-.5909.019-.8918a.3529.3529 0 0 0-.0153-.1126 1.4927 1.4927 0 0 0-.0439-.208c-.1226-.4283-.4213-.7866-.7797-.9351-.1424-.059-.4038-.1672-.7178-.0869.067-.276.1831-.5875.309-.9249l.0529-.142c.0595-.16.134-.3257.213-.5012.4265-.9476 1.0106-2.2453.3766-5.1772-.2374-1.0981-1.0304-1.6343-2.2324-1.5098-.7207.0746-1.3799.3654-1.7088.5321a5.6716 5.6716 0 0 0-.1958.1041c.0918-1.1064.4386-3.1741 1.7357-4.4823a4.0306 4.0306 0 0 1 .3033-.276.3532.3532 0 0 0 .1447-.0644c.7524-.5706 1.6945-.8506 2.802-.8325.4091.0067.8017.0339 1.1742.081 1.939.3544 3.2439 1.4468 4.0359 2.3827.8143.9623 1.2552 1.9315 1.4312 2.4543-1.3232-.1346-2.2234.1268-2.6797.779-.9926 1.4189.543 4.1729 1.2811 5.4964.1353.2426.2522.4522.2889.5413.2403.5825.5515.9713.7787 1.2552.0696.087.1372.1714.1885.245-.4008.1155-1.1208.3825-1.0552 1.717-.0123.1563-.0423.4469-.0834.8148-.0461.2077-.0702.4603-.0994.7662zm.8905-1.6211c-.0405-.8316.2691-.9185.5967-1.0105a2.8566 2.8566 0 0 0 .135-.0406 1.202 1.202 0 0 0 .1342.103c.5703.3765 1.5823.4213 3.0068.1344-.2016.1769-.5189.3994-.9533.6011-.4098.1903-1.0957.333-1.7473.3636-.7197.0336-1.0859-.0807-1.1721-.151zm.5695-9.2712c-.0059.3508-.0542.6692-.1054 1.0017-.055.3576-.112.7274-.1264 1.1762-.0142.4368.0404.8909.0932 1.3301.1066.887.216 1.8003-.2075 2.7014a3.5272 3.5272 0 0 1-.1876-.3856c-.0527-.1276-.1669-.3326-.3251-.6162-.6156-1.1041-2.0574-3.6896-1.3193-4.7446.3795-.5427 1.3408-.5661 2.1781-.463zm.2284 7.0137a12.3762 12.3762 0 0 0-.0853-.1074l-.0355-.0444c.7262-1.1995.5842-2.3862.4578-3.4385-.0519-.4318-.1009-.8396-.0885-1.2226.0129-.4061.0666-.7543.1185-1.0911.0639-.415.1288-.8443.1109-1.3505.0134-.0531.0188-.1158.0118-.1902-.0457-.4855-.5999-1.938-1.7294-3.253-.6076-.7073-1.4896-1.4972-2.6889-2.0395.5251-.1066 1.2328-.2035 2.0244-.1859 2.0515.0456 3.6746.8135 4.8242 2.2824a.908.908 0 0 1 .0667.1002c.7231 1.3556-.2762 6.2751-2.9867 10.5405zm-8.8166-6.1162c-.025.1794-.3089.4225-.6211.4225a.5821.5821 0 0 1-.0809-.0056c-.1873-.026-.3765-.144-.5059-.3156-.0458-.0605-.1203-.178-.1055-.2844.0055-.0401.0261-.0985.0925-.1488.1182-.0894.3518-.1226.6096-.0867.3163.0441.6426.1938.6113.4186zm7.9305-.4114c.0111.0792-.049.201-.1531.3102-.0683.0717-.212.1961-.4079.2232a.5456.5456 0 0 1-.075.0052c-.2935 0-.5414-.2344-.5607-.3717-.024-.1765.2641-.3106.5611-.352.297-.0414.6111.0088.6356.1851z"},child:[]}]})(t)}function rfe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2.746c-6.627 0-12 3.599-12 8.037 0 3.897 4.144 7.144 9.64 7.88V16.26c-2.924-.915-4.925-2.755-4.925-4.877 0-3.035 4.084-5.494 9.12-5.494 5.038 0 8.757 1.683 8.757 5.494 0 1.976-.999 3.379
4015-2.662 4.272.09.066.174.128.258.216.169.149.25.363.372.544 2.128-1.45 3.44-3.437 3.44-5.631 0-4.44-5.373-8.038-12-8.038zm-2.111 4.99v13.516l4.093-.002-.002-5.291h1.1c.225 0 .321.066.549.25.272.22.715.982.715.982l2.164 4.063 4.627-.002-2.864-4.826s-.086-.193-.265-.383a2.22 2.22 0 00-.582-.416c-.422-.214-1.149-.434-1.149-.434s3.578-.264 3.578-3.826c0-3.562-3.744-3.63-3.744-3.63zm4.127 2.93l2.478.002s1.149-.062 1.149 1.127c0 1.165-1.149 1.17-1.149 1.17h-2.478zm1.754 6.119c-.494.049-1.012.079-1.54.088v1.807a16.622 16.622 0 002.37-.473l-.471-.891s-.108-.183-.248-.394c-.039-.054-.08-.098-.111-.137z"},child:[]}]})(t)}function sfe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.634 16.504c.87-.075 1.543-.84 1.5-1.754-.047-.914-.796-1.648-1.709-1.648h-.061a1.71 1.71 0 00-1.648 1.769c.03.479.226.869.494 1.153-1.048 2.038-2.621 3.536-5.005 4.795-1.603.838-3.296 1.154-4.944.93-1.378-.195-2.456-.81-3.116-1.799-.988-1.499-1.078-3.116-.255-4.734.6-1.17 1.499-2.023 2.099-2.443a9.96 9.96 0 01-.42-1.543C-.868 14.408-.416 18.752.932 20.805c1.004 1.498 3.057 2.456 5.304 2.456.6 0 1.23-.044 1.843-.194 3.897-.749 6.848-3.086 8.541-6.532zm5.348-3.746c-2.32-2.728-5.738-4.226-9.634-4.226h-.51c-.253-.554-.837-.899-1.498-.899h-.045c-.943 0-1.678.81-1.647 1.753.03.898.794 1.648 1.708 1.648h.074a1.69 1.69 0 001.499-1.049h.555c2.309 0 4.495.674 6.488 1.992 1.527 1.005 2.622 2.323 3.237 3.897.538 1.288.509 2.547-.045 3.597-.855 1.647-2.294 2.517-4.196 2.517-1.199 0-2.367-.375-2.967-.644-.36.298-.96.793-1.394 1.093 1.318.598 2.652.943 3.94.943 2.922 0 5.094-1.647 5.919-3.236.898-1.798.824-4.824-1.47-7.416zM6.49 17.042c.03.899.793 1.648 1.708 1.648h.06a1.688 1.688 0 001.648-1.768c0-.9-.779-1.647-1.693-1.647h-.06c-.06 0-.15 0-.226.029-1.243-2.098-1.768-4.347-1.572-6.772.12-1.828.72-3.417 1.797-4.735.9-1.124 2.593-1.68 3.747-1.708 3.236-.061 4.585 3.971 4.689 5.574l1.498.45C17.741 3.197 14.686.62 11.764.62 9.02.62 6.49 2.613 5.47 5.535 4.077 9.43 4.991 13.177 6.7 16.174c-.15.195-.24.539-.21.868z"},child:[]}]})(t)}function ofe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M15.601 5.53c-1.91.035-3.981.91-5.63 2.56-2.93 2.93-2.083 8.53-1.088 9.525.805.804 6.595 1.843 9.526-1.088a9.74 9.74 0 0 0 .584-.643c.043-.292.205-.66.489-1.106a1.848 1.848 0 0 1-.537.176c-.144.265-.37.55-.676.855-.354.335-.607.554-.76.656a.795.795 0 0 1-.437.152c-.35 0-.514-.308-.494-.924-.22.316-.425.549-.612.7a.914.914 0 0 1-.578.224c-.194 0-.36-.09-.496-.273a1.03 1.03 0 0 1-.193-.507 4.016 4.016 0 0 1-.726.583c-.224.132-.47.197-.74.197-.3 0-.543-.096-.727-.288a.978.978 0 0 1-.257-.524v.004c-.3.276-.564.48-.79.611a1.295 1.295 0 0 1-.649.197.693.693 0 0 1-.571-.275c-.145-.183-.218-.43-.218-.739 0-.464.101-1.02.302-1.67.201-.65.445-1.25.733-1.797l.842-.312a.21.21 0 0 1 .06-.013c.063 0 .116.047.157.14.04.095.061.221.061.38 0 .451-.104.888-.312 1.31-.207.422-.532.873-.974 1.352-.018.23-.027.388-.027.474 0 .193.036.345.106.458.071.113.165.169.282.169a.71.71 0 0 0 .382-.13c.132-.084.333-.26.602-.523.028-.418.187-.798.482-1.142.324-.38.685-.569 1.08-.569.206 0 .37.054.494.16a.524.524 0 0 1 .186.417c0 .458-.486.829-1.459 1.114.088.43.32.646.693.646a.807.807 0 0 0 .417-.117c.129-.076.321-.243.575-.497.032-.252.118-.495.259-.728.182-.3.416-.544.701-.73.285-.185.537-.278.756-.278.276 0 .47.127.58.381l.677-.374h.186l-.292.971c-.15.488-.226.823-.226 1.004 0 .19.067.285.202.285.086 0 .181-.045.285-.137.104-.092.25-.232.437-.42v.001c.143-.155.274-.32.392-.494-.19-.084-.285-.21-.285-.375 0-.17.058-.352.174-.545.116-.194.275-.29.479-.29.172 0 .258.088.258.265 0 .139-.05.338-.149.596.367-.04.687-.32.961-.842l.228-.01c1.059-2.438.828-5.075-.83-6.732-1.019-1.02-2.408-1.5-3.895-1.471zm4.725 8.203a8.938 8.938 0 0 1-1.333 2.151 1.09 1.09 0 0 0-.012.147c0 .168.047.309.14.423.092.113.206.17.34.17.296 0 .714-.264 1.254-.787-.001.04-.003.08-.003.121 0 .146.012.368.036.666l.733-.172c0-.2.003-.357.01-.474.01-.157.033-.33.066-.517.02-.11.07-.216.152-.315l.186-.216a5.276 5.276 0 0 1 .378-.397c.062-.055.116-.099.162-.13a.26.26 0 0 1 .123-.046c.055 0 .083.035.083.106 0 .07-.052.236-.156.497-.194.486-.292.848-.292 
40151.084 0 .175.046.314.136.418a.45.45 0 0 0 .358.155c.365 0 .803-.269 1.313-.808v-.381c-.361.426-.623.64-.784.64-.109 0-.163-.067-.163-.2 0-.1.065-.316.195-.65.19-.486.285-.836.285-1.048a.464.464 0 0 0-.112-.319.36.36 0 0 0-.282-.127c-.165 0-.354.077-.567.233-.213.156-.5.436-.863.84.053-.262.165-.622.335-1.08l-.809.156a6.54 6.54 0 0 0-.399 1.074c-.04.156-.07.316-.092.48a7.447 7.447 0 0 1-.49.45.38.38 0 0 1-.229.08.208.208 0 0 1-.174-.082.352.352 0 0 1-.064-.222c0-.1.019-.214.056-.343.038-.13.12-.373.249-.731l.308-.849zm-17.21-2.927c-.863-.016-1.67.263-2.261.854-1.352 1.352-1.07 3.827.631 5.527 1.7 1.701 4.95 1.21 5.527.632.467-.466 1.07-3.827-.631-5.527-.957-.957-2.158-1.465-3.267-1.486zm12.285.358h.166v.21H15.4zm.427 0h.166v.865l.46-.455h.195l-.364.362.428.684h-.198l-.357-.575-.164.166v.41h-.166zm1.016 0h.166v.21h-.166zm.481.122h.166v.288h.172v.135h-.172v.717c0 .037.006.062.02.075.012.013.037.02.074.02a.23.23 0 0 0 .078-.01v.141a.802.802 0 0 1-.136.014.23.23 0 0 1-.15-.043.15.15 0 0 1-.052-.123v-.79h-.141v-.136h.141zm-3.562.258c.081 0 .15.012.207.038.057.024.1.061.13.11s.045.106.045.173h-.176c-.006-.111-.075-.167-.208-.167a.285.285 0 0 0-.164.041.134.134 0 0 0-.06.117c0 .035.015.065.045.088.03.024.08.044.15.06l.16.039a.47.47 0 0 1 .224.105c.047.046.07.108.07.186a.3.3 0 0 1-.052.175.327.327 0 0 1-.152.116.585.585 0 0 1-.226.041c-.136 0-.24-.03-.309-.088-.069-.059-.105-.149-.109-.269h.176c.004.037.01.065.017.084a.166.166 0 0 0 .034.054c.044.043.112.065.204.065a.31.31 0 0 0 .177-.045.139.139 0 0 0 .067-.119.116.116 0 0 0-.038-.09.287.287 0 0 0-.124-.055l-.156-.038a1.248 1.248 0 0 1-.159-.05.359.359 0 0 1-.098-.061.22.22 0 0 1-.058-.083.32.32 0 0 1-.016-.108c0-.096.036-.174.109-.232a.45.45 0 0 1 .29-.087zm1.035 0a.46.46 0 0 1 .202.043.351.351 0 0 1 .187.212.577.577 0 0 1 .023.126h-.168a.256.256 0 0 0-.078-.168.242.242 0 0 0-.17-.06.248.248 0 0 0-.155.05.306.306 0 0 0-.1.144.662.662 0 0 0-.034.224.58.58 0 0 0 .035.214.299.299 0 0 0 .101.135.261.261 0 0 0 .157.048c.142 0 .227-.084.256-.252h.167a.519.519 0 0 1-.065.22.35.35 0 0 1-.146.138.464.464 0 0 1-.216.048.448.448 0 0 1-.246-.066.441.441 0 0 1-.161-.192.703.703 0 0 1-.057-.293c0-.085.01-.163.032-.233a.522.522 0 0 1 .095-.182.403.403 0 0 1 .15-.117.453.453 0 0 1 .191-.04zm.603.03h.166v1.046H15.4zm1.443 0h.166v1.046h-.166zm-5.05.618c-.08 0-.2.204-.356.611-.155.407-.308.977-.459 1.71.281-.312.509-.662.683-1.05.175-.387.262-.72.262-.999a.455.455 0 0 0-.036-.197c-.025-.05-.056-.075-.093-.075zm4.662 1.797c-.221 0-.431.188-.629.563-.197.376-.296.722-.296 1.038 0 .12.029.216.088.29a.273.273 0 0 0 .223.111c.221 0 .43-.188.625-.565.196-.377.294-.725.294-1.043a.457.457 0 0 0-.083-.29.269.269 0 0 0-.222-.104zm-2.848.007c-.146 0-.285.11-.417.333-.133.222-.2.51-.2.866.566-.159.849-.452.849-.881 0-.212-.077-.318-.232-.318Z"},child:[]}]})(t)}function afe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.292 5.856L11.54 0v24l-4.095-2.378V7.603l-6.168 3.564.015-5.31zm21.43 5.311l-.014-5.31L12.46 0v24l4.095-2.378V14.87l3.092 1.788-.018-4.618-3.074-1.756V7.603l6.168 3.564z"},child:[]}]})(t)}function lfe(t){return Ht({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},child:[]}]})(t)}const cfe=()=>{const t=[{title:"Core Propulsion (Languages)",icon:T.jsx(R2,{className:"text-blue-400"}),skills:[{name:"Python",icon:T.jsx(cZ,{className:"text-yellow-300"})},{name:"TypeScript",icon:T.jsx(lfe,{className:"text-blue-500"})},{name:"JavaScript",icon:T.jsx(vP,{className:"text-yellow-400"})},{name:"Go",icon:T.jsx($ue,{className:"text-cyan-400"})},{name:"Java",icon:T.jsx(aZ,{className:"text-red-400"})},{name:"C/C++",icon:T.jsx(que,{className:"text-blue-600"})},{name:"SQL",icon:T.jsx(ife,{className:"text-blue-300"})},{name:"Bash",icon:T.jsx(gP,{className:"text-gray-400"})},{name:"R",icon:T.jsx(rfe,{className:"text-blue-500"})},{name:"MATLAB",icon:T.jsx(R2,{className:"text-orange-500"})},{name:"PHP",icon:T.jsx(lZ,{className:"text-indigo-400"})}]},{title:"Navigational Systems (Frameworks & Libraries)",icon:T.jsx(vZ,{className:"text-purple-400"}),skills:[{name:"React",icon:T.jsx(uZ,{className:"text-cyan-400"})},{name:"Angular",icon:T.jsx(iZ,{className:"text-red-500"})},{name:"Vue",icon:T.jsx(fZ,{className:"text-green-500"})},{name:"Node.js",icon:T.jsx(vP,{className:"text-green-600"})},{name:"Redux",icon:T.jsx(sfe,{className:"text-purple-500"})},{name:"GraphQL",icon:T.jsx(efe,{className:"text-pink-500"})},{name:"TensorFlow",icon:T.jsx(afe,{className:"text-orange-500"})},{name:"Pandas",icon:T.jsx(nfe,{className:"text-purple-500"})},{name:"NumPy",icon:T.jsx(tfe,{className:"text-blue-400"})},{name:"Scikit-learn",icon:T.jsx(ofe,{className:"text-orange-300"})}]},{title:"Mission Equipment (Tools & Platforms)",icon:T.jsx(_Z,{className:"text-green-400"}),skills:[{name:"AWS (WAF/Shield)",icon:T.jsx(rZ,{className:"text-orange-400"})},{name:"Docker",icon:T.jsx(sZ,{className:"text-blue-500"})},{name:"Git",icon:T.jsx(oZ,{className:"text-red-500"})},{name:"Linux",icon:T.jsx(gP,{className:"text-yellow-100"})},{name:"REST APIs",icon:T.jsx(R2,{className:"text-gray-300"})}]}];return T.jsx("section",{className:"py-10 bg-black text-white relative z-10",children:T.jsx("div",{className:"container mx-auto px-4 lg:px-8 max-w-7xl",children:T.jsx(Wi.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:T.jsxs("div",{className:"w-full bg-black/80 border border-white/10 rounded-2xl overflow-hidden backdrop-blur-md shadow-2xl shadow-blue-900/20",children:[T.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10 bg-white/5",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("div",{className:"flex gap-1.5",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/80 animate-pulse"})]}),T.jsx("p",{className:"font-mono text-xs text-gray-400 tracking-widest ml-4 hidden sm:block",children:"VANGUARD OS v2.0 // LOADOUT"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-ping"}),T.jsx("p",{className:"font-mono text-xs text-blue-400 tracking-widest",children:"SYSTEM_ONLINE"})]})]}),T.jsxs("div",{className:"p-6 md:p-10 lg:p-12",children:[T.jsxs("div",{className:"mb-12 text-center sm:text-left",children:[T.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-500",children:"Rover Loadout"}),T.jsx("p",{className:"text-gray-400 text-lg",children:"The onboard systems, navigational frameworks, and mission-critical tools powering my expeditions."})]}),T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:t.map((e,n)=>T.jsxs(Wi.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:n*.2},className:"glass-panel p-8 hover:bg-white/5 transition-all duration-300",children:[T.jsxs("div",{className:"flex items-center gap-3 mb-8 pb-3 border-b border-white/10",children:[T.jsx("div",{className:"w-6 h-1 bg-blue-500 rounded-full"}),T.jsxs("h3",{className:"text-xs font-mono tracking-widest text-gray-400",children:[e.title.toUpperCase()," //"]})]}),T.jsx("div",{className:"grid grid-cols-2 gap-4",children:e.skills.map((i,r)=>T.jsxs(Wi.div,{whileHover:{scale:1.05,backgroundColor:"rgba(255,255,255,0.1)"},className:"flex items-center gap-3 p-3 rounded-lg bg-white/5 transition-colors cursor-default",children:[T.jsx("div",{className:"text-xl",children:i.icon}),T.jsx("span",{className:"text-sm font-medium text-gray-300",children:i.name})]},r))})]},n))})]})]})})})})},ufe=Qy(cfe,"skills"),ffe=()=>T.jsx("section",{id:"experience",className:"py-10 relative z-10 text-white",children:T.jsx("div",{className:"container mx-auto px-4 lg:px-8 max-w-7xl",children:T.jsx(Wi.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:T.jsxs("div",{className:"w-full bg-black/80 border border-white/10 rounded-2xl overflow-hidden backdrop-blur-md shadow-2xl shadow-blue-900/20",children:[T.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10 bg-white/5",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("div",{className:"flex gap-1.5",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500/80"}),T.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500/80 animate-pulse"})]}),T.jsx("p",{className:"font-mono text-xs text-gray-400 tracking-widest ml-4 hidden sm:block",children:"VANGUARD OS v2.0 // MISSION_LOG"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-ping"}),T.jsx("p",{className:"font-mono text-xs text-blue-400 tracking-widest",children:"SYSTEM_ONLINE"})]})]}),T.jsxs("div",{className:"p-6 md:p-10 lg:p-12",children:[T.jsxs("div",{className:"mb-12 text-center sm:text-left",children:[T.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-500",children:"My Journey"}),T.jsx("p",{className:"text-gray-400 text-lg",children:"A timeline of my professional growth and academic milestones."})]}
4015),T.jsx("div",{className:"max-w-4xl mx-auto sm:ml-0",children:T.jsxs("div",{className:"space-y-8",children:[T.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[T.jsx("div",{className:"w-8 h-1 bg-blue-500 rounded-full"}),T.jsx("h3",{className:"font-mono text-sm tracking-[0.2em] text-gray-400",children:"CAREER_TRAJECTORY //"})]}),bZ.map((t,e)=>T.jsxs(Wi.div,{initial:{opacity:0,x:-50},whileInView:{opacity:1,x:0},transition:{duration:.5,delay:e*.1},className:"group relative pl-8 border-l-2 border-white/10 hover:border-blue-500 transition-colors duration-300",children:[T.jsx("div",{className:"absolute -left-[9px] top-0 w-4 h-4 rounded-full bg-black border-2 border-white/30 group-hover:border-blue-500 transition-colors duration-300"}),T.jsxs("div",{className:"glass-panel p-6 transform transition-all duration-300 hover:bg-white/5 hover:translate-x-2",children:[T.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 sm:gap-0 mb-4",children:[T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsx("div",{className:"w-12 h-12 rounded-lg bg-white/10 p-2 flex items-center justify-center",children:T.jsx("img",{src:t.logo,alt:t.company,className:"w-full h-full object-contain"})}),T.jsxs("div",{children:[T.jsx("h4",{className:"text-lg font-bold text-white",children:t.role}),T.jsx("p",{className:"text-blue-400 text-sm",children:t.company})]})]}),T.jsx("span",{className:"text-xs font-mono text-gray-500 border border-white/10 px-2 py-1 rounded-full",children:t.duration})]}),T.jsx("p",{className:"text-gray-400 text-sm leading-relaxed",children:t.desc})]})]},e))]})})]})]})})})}),hfe=Qy(ffe,"experience"),dfe=new om(1),pfe=new No({color:"#2d2f36",roughness:1}),mfe=new ah(.8,0),gfe=new No({color:"#00ffff",emissive:"#00ffff",emissiveIntensity:1.5,roughness:.1,metalness:.8}),vfe=new Aa(.6,.6,.5,12),yfe=new No({color:"#1a1a1a",roughness:1}),xfe=new Aa(.3,.3,.05,6),_fe=new No({color:"#888",metalness:.8,roughness:.2}),Sfe=new Aa(.08,.08,.8,6),wfe=new No({color:"#333",metalness:.6,roughness:.4}),Afe=({count:t,onCollect:e,roverPositionRef:n})=>{const[i,r]=I.useState(()=>{const a=[];for(let l=0;l<t;l++){const c=Math.random()*Math.PI*2,u=20+Math.random()*300,f=Math.cos(c)*u,p=Math.sin(c)*u;a.push({id:l,position:new G(f,1,p),collected:!1,offset:Math.random()*100})}return a}),s=I.useRef(),o=I.useMemo(()=>new Kt,[]);return ro(a=>{if(!n.current||!s.current)return;const l=a.clock.elapsedTime;let c=!1;const u=i.map(f=>f.collected?f:f.position.distanceTo(n.current)<3?(c=!0,e(),{...f,collected:!0}):f);c&&r(u),i.forEach((f,p)=>{f.collected?o.scale.set(0,0,0):(o.position.copy(f.position),o.position.y=1+Math.sin(l*2+f.offset)*.5,o.rotation.y=l,o.rotation.x=l*.5,o.scale.set(1,1,1)),o.updateMatrix(),s.current.setMatrixAt(p,o.matrix)}),s.current.instanceMatrix.needsUpdate=!0}),T.jsx("instancedMesh",{ref:s,args:[mfe,gfe,t],castShadow:!0})},Mfe=()=>{const t=I.useRef(),e=I.useRef(),n=300,i=(r,s)=>{let o=Math.sin(r*.05)*Math.cos(s*.05)*5;o+=Math.sin(r*.01)*Math.cos(s*.01)*15;const a=Math.sqrt(r*r+s*s);return a<30&&(o*=a/30),o};return I.useEffect(()=>{if(!t.current)return;const r=t.current.geometry,s=r.attributes.position,o=new G;for(let a=0;a<s.count;a++)o.fromBufferAttribute(s,a),s.setZ(a,i(o.x,o.y));r.computeVertexNormals(),s.needsUpdate=!0},[]),I.useEffect(()=>{if(!e.current)return;const r=new Kt;for(let s=0;s<n;s++){const o=Math.random()*Math.PI*2,a=20+Math.random()*800,l=Math.cos(o)*a,c=Math.sin(o)*a,u=i(l,c),f=Math.random()*3+.5;r.position.set(l,u+f/2-.2,-c),r.rotation.set(Math.random()*Math.PI,Math.random()*Math.PI,Math.random()*Math.PI),r.scale.set(f,f,f),r.updateMatrix(),e.current.setMatrixAt(s,r.matrix)}e.current.instanceMatrix.needsUpdate=!0},[]),T.jsxs("group",{children:[T.jsxs("mesh",{ref:t,rotation:[-Math.PI/2,0,0],receiveShadow:!0,children:[T.jsx("planeGeometry",{args:[2e3,2e3,125,125]}),T.jsx("meshStandardMaterial",{color:"#3a3c42",roughness:.9,metalness:.1,flatShading:!1})]}),T.jsx("instancedMesh",{ref:e,args:[dfe,pfe,n],castShadow:!0,receiveShadow:!0})]})},Wu=({actionKey:t,label:e,className:n,roverRef:i})=>T.jsx("button",{onContextMenu:r=>r.preventDefault(),onPointerDown:r=>{var s;r.preventDefault(),(s=i.current)==null||s.setKey(t,!0)},onPointerUp:r=>{var s;r.preventDefault(),(s=i.current)==null||s.setKey(t,!1)},onPointerLeave:r=>{var s;r.preventDefault(),(s=i.current)==null||s.setKey(t,!1)},className:`bg-white/10 border border-white/20 backdrop-blur-md text-white font-mono active:bg-blue-500/50 active:scale-95 transition-all shadow-lg flex items-center justify-center touch-none select-none ${n}`,children:e}),I9=zt.forwardRef(({position:t,setHudData:e,roverPositionRef:n},i)=>{const r=I.useRef(),s=I.useRef([]),[o,a]=I.useState({w:!1,a:!1,s:!1,d:!1,shift:!1,c:!1});zt.useImperativeHandle(i,()=>({setKey:(x,g)=>{a(_=>_[x]===g?_:{..._,[x]:g})}}));const l=I.useRef(0),c=I.useRef(0),u=I.useRef(100),f=I.useRef(0),p=I.useRef(!1);I.useEffect(()=>{const x=_=>{const y=_.key.toLowerCase();(y==="w"||_.key==="ArrowUp")&&a(M=>({...M,w:!0})),(y==="s"||_.key==="ArrowDown")&&a(M=>({...M,s:!0})),(y==="a"||_.key==="ArrowLeft")&&a(M=>({...M,a:!0})),(y==="d"||_.key==="ArrowRight")&&a(M=>({...M,d:!0})),_.shiftKey&&a(M=>({...M,shift:!0})),y==="c"&&a(M=>({...M,c:!0}))},g=_=>{const y=_.key.toLowerCase();(y==="w"||_.key==="ArrowUp")&&a(M=>({...M,w:!1})),(y==="s"||_.key==="ArrowDown")&&a(M=>({...M,s:!1})),(y==="a"||_.key==="ArrowLeft")&&a(M=>({...M,a:!1})),(y==="d"||_.key==="ArrowRight")&&a(M=>({...M,d:!1})),y==="shift"&&a(M=>({...M,shift:!1})),y==="c"&&a(M=>({...M,c:!1}))};return window.addEventListener("keydown",x),window.addEventListener("keyup",g),()=>{window.removeEventListener("keydown",x),window.removeEventListener("keyup",g)}},[]);const m=I.useRef(new G(0,1,0)),v=I.useRef(new G),w=I.useRef(new G);return ro((x,g)=>{if(!r.current)return;o.c&&!p.current&&(f.current=(f.current+1)%2),p.current=o.c;const _=o.shift&&u.current>0&&o.w;_?u.current=Math.max(0,u.current-20*g):u.current=Math.min(100,u.current+5*g);const y=_?30:15;o.w&&(l.current+=y*g),o.s&&(l.current-=15*g),l.current*=.95;const M=Math.min(Math.abs(l.current)/5,1),E=2*g*M*(l.current>.1?1:l.current<-.1?-1:0);o.a&&(c.current+=E),o.d&&(c.current-=E),r.current.rotation.order="YXZ",r.current.rotation.y=c.current;const C=(z,Y)=>{let O=Math.sin(z*.05)*Math.cos(Y*.05)*5;O+=Math.sin(z*.01)*Math.cos(Y*.01)*15;const H=Math.sqrt(z*z+Y*Y);return H<30&&(O*=H/30),O},P=r.current.position.x+Math.sin(c.current)*l.current*g,N=r.current.position.z+Math.cos(c.current)*l.current*g,R=C(P,-N);r.current.position.x=P,r.current.position.z=N,r.current.position.y=Ec.lerp(r.current.position.y,R,.25);const L=C(P+Math.sin(c.current)*1.5,-(N+Math.cos(c.current)*1.5)),k=C(P-Math.sin(c.current)*1.5,-(N-Math.cos(c.current)*1.5)),$=C(P+Math.cos(c.current)*1,-(N-Math.sin(c.current)*1)),ee=C(P-Math.cos(c.current)*1,-(N+Math.sin(c.current)*1)),D=Math.atan2(L-k,3),U=Math.atan2($-ee,2);if(r.current.rotation.x=Ec.lerp(r.current.rotation.x,-D,.25),r.current.rotation.z=Ec.lerp(r.current.rotation.z,U,.25),n&&n.current.copy(r.current.position),s.current.forEach(z=>{z&&(z.rotation.x+=l.current*g/.6)}),Math.round(x.clock.elapsedTime*10)%2===0&&e({speed:Math.abs(l.current).toFixed(1),battery:u.current.toFixed(0),camera:f.current===0?"EXT":"MAST",boosting:_}),f.current===0)w.current.set(0,6,-14),w.current.applyAxisAngle(m.current,c.current),w.current.add(r.current.position),x.camera.position.lerp(w.current,.1),v.current.copy(r.current.position).add(new G(0,Math.abs(l.current)*.1+1,0)),x.camera.lookAt(v.current);else{w.current.set(0,3,.5),w.current.applyEuler(r.current.rotation),w.current.add(r.current.position),x.camera.position.copy(w.current);const z=new G(0,2.5,10);z.applyEuler(r.current.rotation),z.add(r.current.position),x.camera.lookAt(z)}
4015}),T.jsxs("group",{ref:r,position:t,children:[T.jsxs("mesh",{position:[0,1.2,0],castShadow:!0,children:[T.jsx("boxGeometry",{args:[2.4,.6,4]}),T.jsx("meshStandardMaterial",{color:"#d4af37",metalness:.8,roughness:.2})]}),T.jsxs("mesh",{position:[0,1.6,-.5],castShadow:!0,children:[T.jsx("boxGeometry",{args:[2.2,.2,2.5]}),T.jsx("meshStandardMaterial",{color:"#111",metalness:.5,roughness:.8})]}),[-1.5,0,1.5].map((x,g)=>[-1.5,1.5].map((_,y)=>{const M=g*2+y;return T.jsxs("group",{position:[_,.6,x],children:[T.jsx("mesh",{ref:E=>s.current[M]=E,rotation:[0,0,Math.PI/2],castShadow:!0,geometry:vfe,material:yfe,children:T.jsx("mesh",{position:[0,_>0?.26:-.26,0],rotation:[Math.PI/2,0,0],geometry:xfe,material:_fe})}),T.jsx("mesh",{position:[_>0?-.2:.2,.3,0],rotation:[0,0,_>0?Math.PI/4:-Math.PI/4],geometry:Sfe,material:wfe})]},M)})),T.jsxs("mesh",{position:[0,2.2,1.2],castShadow:!0,children:[T.jsx("cylinderGeometry",{args:[.05,.05,1.5]}),T.jsx("meshStandardMaterial",{color:"#ddd",metalness:.6,roughness:.4})]}),T.jsxs("mesh",{position:[0,3,1.2],castShadow:!0,children:[T.jsx("boxGeometry",{args:[.4,.3,.5]}),T.jsx("meshStandardMaterial",{color:"#fff",metalness:.2,roughness:.5})]}),[-.8,.8].map((x,g)=>T.jsxs("mesh",{position:[x,1.75,-1],rotation:[-.1,0,0],castShadow:!0,children:[T.jsx("boxGeometry",{args:[1.2,.05,1.8]}),T.jsx("meshStandardMaterial",{color:"#0A1045",metalness:.9,roughness:.1})]},g)),T.jsxs("mesh",{position:[1,1.8,-1.8],castShadow:!0,children:[T.jsx("cylinderGeometry",{args:[.02,.02,1.5]}),T.jsx("meshStandardMaterial",{color:"#555"})]}),T.jsxs("mesh",{position:[1,2.5,-1.8],children:[T.jsx("sphereGeometry",{args:[.08]}),T.jsx("meshStandardMaterial",{color:"#ff3333",emissive:"#ff0000",emissiveIntensity:2})]}),T.jsx("spotLight",{position:[0,1.4,2],angle:.6,penumbra:.5,intensity:3,distance:60,castShadow:!0,color:"#e0f7fa","target-position":[0,0,10]}),T.jsx("group",{position:[0,0,-2],children:T.jsx(kQ,{count:30,scale:3,size:10,speed:.4,opacity:.2,color:"#a09a8a"})})]})});I9.displayName="Rover";const Efe=()=>{const[t,e]=I.useState({speed:"0.0",battery:"100",camera:"EXT",boosting:!1}),[n,i]=I.useState(0),r=I.useRef(new G(0,0,0)),s=I.useRef(),o=()=>{i(a=>a+1)};return T.jsxs("div",{className:"w-full h-screen relative bg-black overflow-hidden",children:[T.jsxs("div",{className:"absolute top-0 left-0 w-full p-4 sm:p-10 z-10 pointer-events-none flex flex-col sm:flex-row justify-between items-start gap-2 sm:gap-4",children:[T.jsxs("div",{children:[T.jsx("h1",{className:"text-lg sm:text-3xl font-bold font-mono text-blue-400 tracking-widest drop-shadow-[0_0_10px_rgba(59,130,246,0.5)]",children:"VANGUARD OS // LUNAR_ROVER_SIM"}),T.jsxs("div",{className:"hidden sm:block text-gray-300 font-mono text-xs sm:text-sm mt-3 bg-black/60 p-3 sm:p-4 rounded border border-blue-500/30 backdrop-blur-md max-w-[80vw] sm:max-w-sm pointer-events-auto",children:[T.jsx("span",{className:"text-blue-400 mb-1 sm:mb-2 block font-bold border-b border-blue-500/30 pb-1",children:"MISSION DIRECTIVE:"}),"Navigate the lunar surface. Collect anomalous energy crystals.",T.jsx("br",{}),T.jsx("br",{}),T.jsx("span",{className:"text-blue-400 block border-b border-blue-500/30 pb-1 mt-1 sm:mt-2 mb-1 sm:mb-2",children:"CONTROLS:"}),T.jsxs("div",{children:["[W] Accelerate | [S] Brake/Rev",T.jsx("br",{}),"[A/D] Steer | [Shift] Boost",T.jsx("br",{}),"[C] Toggle Camera"]})]})]}),T.jsxs("div",{className:"text-left flex flex-col items-start sm:items-end sm:text-right bg-black/60 p-3 sm:p-5 rounded border border-blue-500/30 backdrop-blur-md w-[80vw] sm:w-64 max-w-[200px] sm:max-w-none pointer-events-auto mt-1 sm:mt-0",children:[T.jsxs("p",{className:"text-green-400 font-mono text-[10px] sm:text-sm tracking-wider flex items-center justify-start sm:justify-end gap-1.5 sm:gap-2 mb-1.5 sm:mb-3",children:[T.jsx("span",{className:"w-1.5 h-1.5 sm:w-2 sm:h-2 rounded-full bg-green-500 animate-pulse"}),"SYSTEM ONLINE"]}),T.jsxs("div",{className:"space-y-1 sm:space-y-2 mt-1 sm:mt-4 w-full",children:[T.jsxs("div",{className:"flex justify-between text-[10px] sm:text-xs font-mono text-blue-300",children:[T.jsx("span",{children:"VELOCITY:"}),T.jsxs("span",{className:parseFloat(t.speed)>20?"text-yellow-400":"",children:[t.speed," m/s"]})]}),T.jsxs("div",{className:"flex justify-between text-[10px] sm:text-xs font-mono text-blue-300 items-center",children:[T.jsx("span",{children:"POWER:"}),T.jsx("div",{className:"w-16 sm:w-24 h-1.5 sm:h-2 bg-gray-800 rounded overflow-hidden shadow-[inset_0_0_5px_rgba(0,0,0,0.5)]",children:T.jsx("div",{className:`h-full flex-none ${parseFloat(t.battery)>20?t.boosting?"bg-yellow-400":"bg-blue-500":"bg-red-500 animate-pulse"}`,style:{width:`${t.battery}%`,transition:"width 0.1s linear"}})})]}),T.jsxs("div",{className:"flex justify-between text-[10px] sm:text-xs font-mono text-blue-300 mt-1 sm:mt-2",children:[T.jsx("span",{children:"CAM MODE:"}),T.jsxs("span",{className:"text-green-400",children:["[",t.camera,"]"]})]}),T.jsxs("div",{className:"flex justify-between text-[10px] sm:text-xs font-mono text-blue-300 pt-1 sm:pt-2 border-t border-blue-500/30 mt-1 sm:mt-2",children:[T.jsx("span",{children:"ANOMALIES:"}),T.jsx("span",{className:"text-cyan-400 font-bold text-[10px] sm:text-sm",children:n})]})]}),T.jsx("a",{href:"/#projects",className:"pointer-events-auto mt-3 sm:mt-6 w-full block text-center px-4 sm:px-6 py-1.5 
4015sm:py-2 border border-red-500/50 bg-red-500/10 text-red-400 font-mono text-[10px] sm:text-sm hover:bg-red-500/30 hover:shadow-[0_0_15px_rgba(239,68,68,0.4)] transition-all",children:"[ ABORT MISSION ]"})]})]}),t.camera==="MAST"&&T.jsx("div",{className:"absolute inset-0 pointer-events-none flex items-center justify-center z-10 opacity-50",children:T.jsxs("div",{className:"w-[30vw] h-[30vw] max-w-[400px] max-h-[400px] border border-cyan-500/40 rounded-full flex items-center justify-center",children:[T.jsx("div",{className:"w-[15%] h-[1px] bg-cyan-500 absolute left-0"}),T.jsx("div",{className:"w-[15%] h-[1px] bg-cyan-500 absolute right-0"}),T.jsx("div",{className:"h-[15%] w-[1px] bg-cyan-500 absolute top-0"}),T.jsx("div",{className:"h-[15%] w-[1px] bg-cyan-500 absolute bottom-0"}),T.jsx("div",{className:"w-1 h-1 rounded-full bg-cyan-400 shadow-[0_0_5px_#0ff]"})]})}),T.jsxs("div",{className:"absolute bottom-6 left-2 right-2 sm:hidden z-20 flex justify-between items-end pointer-events-none",children:[T.jsxs("div",{className:"flex flex-col gap-1 pointer-events-auto",children:[T.jsx("div",{className:"flex justify-center",children:T.jsx(Wu,{actionKey:"w",label:"W",className:"w-12 h-12 rounded-t-lg",roverRef:s})}),T.jsxs("div",{className:"flex justify-center gap-1",children:[T.jsx(Wu,{actionKey:"a",label:"A",className:"w-12 h-12 rounded-l-lg",roverRef:s}),T.jsx(Wu,{actionKey:"s",label:"S",className:"w-12 h-12 rounded-b-lg",roverRef:s}),T.jsx(Wu,{actionKey:"d",label:"D",className:"w-12 h-12 rounded-r-lg",roverRef:s})]})]}),T.jsxs("div",{className:"flex flex-col gap-3 pointer-events-auto items-end",children:[T.jsx(Wu,{actionKey:"c",label:"CAM",className:"w-12 h-12 rounded-full text-[10px] font-bold",roverRef:s}),T.jsx(Wu,{actionKey:"shift",label:"BOOST",className:"w-14 h-14 rounded-full text-xs font-bold bg-blue-600/40 border-blue-400/50",roverRef:s})]})]}),T.jsxs(qE,{dpr:[1,1.5],shadows:!0,camera:{position:[0,5,-12],fov:60},performance:{min:.5},children:[T.jsx("color",{attach:"background",args:["#000002"]}),T.jsx("fog",{attach:"fog",args:["#000002",20,200]}),T.jsx("ambientLight",{intensity:.4}),T.jsx("directionalLight",{position:[100,50,-50],intensity:2.8,castShadow:!0,"shadow-mapSize":1024,"shadow-camera-left":-80,"shadow-camera-right":80,"shadow-camera-top":80,"shadow-camera-bottom":-80,"shadow-bias":-5e-4}),T.jsx(i8,{radius:200,depth:50,count:5e3,factor:6,saturation:0,fade:!0,speed:.5}),T.jsxs(I.Suspense,{fallback:null,children:[T.jsx(Mfe,{}),T.jsx(I9,{ref:s,position:[0,0,0],setHudData:e,roverPositionRef:r}),T.jsx(Afe,{count:30,onCollect:o,roverPositionRef:r})]})]})]})},Tfe=Object.freeze(Object.defineProperty({__proto__:null,default:Efe},Symbol.toStringTag,{value:"Module"})),bfe=I.lazy(()=>_N(()=>import("./PlainView-785591d9.js"),[])),Cfe=I.lazy(()=>_N(()=>Promise.resolve().then(()=>Tfe),void 0)),Rfe=()=>T.jsxs("main",{className:"bg-black min-h-screen w-full overflow-x-hidden",children:[T.jsx(bne,{}),T.jsx($z,{children:T.jsx(I.Suspense,{fallback:T.jsx(jQ,{}),children:T.jsxs(Xz,{children:[T.jsx(ev,{path:"/plain",element:T.jsx(bfe,{})}),T.jsx(ev,{path:"/lunar-rover",element:T.jsx(Cfe,{})}),T.jsx(ev,{path:"/",element:T.jsxs(T.Fragment,{children:[T.jsx(YQ,{}),T.jsxs("div",{className:"relative z-0",children:[T.jsx(ore,{})," ",T.jsx(Gue,{}),T.jsx(hfe,{})," ",T.jsx(jue,{})," ",T.jsx(ufe,{}),T.jsx(Zue,{}),T.jsx(BZ,{})]})]})})]})})})]});lS.createRoot(document.getElementById("root")).render(T.jsx(zt.StrictMode,{children:T.jsx(Rfe,{})}));export{Hf as L,RZ as a,T as j,XQ as m,PZ as p,CZ as s};

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.