PageSourceSearch

https://novastack-demo.vercel.app/assets/index-DXBcvJf-.js

js novastack-demo.vercel.app collected 2026-10-03 07:24:32 UTC 1,186,887 bytes, 4,193 lines download raw bytes

vendor: 5,696 bytes, lines 1-9
1var Nw=t=>{throw TypeError(t)};var gm=(t,e,n)=>e.has(t)||Nw("Cannot "+n);var te=(t,e,n)=>(gm(t,e,"read from private field"),n?n.call(t):e.get(t)),lt=(t,e,n)=>e.has(t)?Nw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ke=(t,e,n,i)=>(gm(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),wn=(t,e,n)=>(gm(t,e,"access private method"),n);var Bd=(t,e,n,i)=>({set _(r){Ke(t,e,r,n)},get _(){return te(t,e,i)}});function dN(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 uT(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dT={exports:{}},Mp={},fT={exports:{}},tt={};/**
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 vd=Symbol.for("react.element"),fN=Symbol.for("react.portal"),hN=Symbol.for("react.fragment"),pN=Symbol.for("react.strict_mode"),mN=Symbol.for("react.profiler"),gN=Symbol.for("react.provider"),vN=Symbol.for("react.context"),yN=Symbol.for("react.forward_ref"),xN=Symbol.for("react.suspense"),_N=Symbol.for("react.memo"),wN=Symbol.for("react.lazy"),Iw=Symbol.iterator;function bN(t){return t===null||typeof t!="object"?null:(t=Iw&&t[Iw]||t["@@iterator"],typeof t=="function"?t:null)}var hT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pT=Object.assign,mT={};function Mc(t,e,n){this.props=t,this.context=e,this.refs=mT,this.updater=n||hT}Mc.prototype.isReactComponent={};Mc.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")};Mc.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function gT(){}gT.prototype=Mc.prototype;function tx(t,e,n){this.props=t,this.context=e,this.refs=mT,this.updater=n||hT}var nx=tx.prototype=new gT;nx.constructor=tx;pT(nx,Mc.prototype);nx.isPureReactComponent=!0;var kw=Array.isArray,vT=Object.prototype.hasOwnProperty,ix={current:null},yT={key:!0,ref:!0,__self:!0,__source:!0};function xT(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)vT.call(e,i)&&!yT.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:vd,type:t,key:s,ref:o,props:r,_owner:ix.current}}function SN(t,e){return{$$typeof:vd,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function rx(t){return typeof t=="object"&&t!==null&&t.$$typeof===vd}function EN(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Ow=/\/+/g;function vm(t,e){return typeof t=="object"&&t!==null&&t.key!=null?EN(""+t.key):e.toString(36)}function Qf(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 vd:case fN:o=!0}}if(o)return o=t,r=r(o),t=i===""?"."+vm(o,0):i,kw(r)?(n="",t!=null&&(n=t.replace(Ow,"$&/")+"/"),Qf(r,e,n,"",function(c){return c})):r!=null&&(rx(r)&&(r=SN(r,n+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(Ow,"$&/")+"/")+t)),e.push(r)),1;if(o=0,i=i===""?".":i+":",kw(t))for(var a=0;a<t.length;a++){s=t[a];var l=i+vm(s,a);o+=Qf(s,e,n,l,r)}else if(l=bN(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=i+vm(s,a++),o+=Qf(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 Vd(t,e,n){if(t==null)return t;var i=[],r=0;return Qf(t,i,"","",function(s){return e.call(n,s,r++)}),i}function MN(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 $n={current:null},Jf={transition:null},TN={ReactCurrentDispatcher:$n,ReactCurrentBatchConfig:Jf,ReactCurrentOwner:ix};function _T(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 4,183 bytes, lines 9-25
9tt.Children={map:Vd,forEach:function(t,e,n){Vd(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Vd(t,function(){e++}),e},toArray:function(t){return Vd(t,function(e){return e})||[]},only:function(t){if(!rx(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};tt.Component=Mc;tt.Fragment=hN;tt.Profiler=mN;tt.PureComponent=tx;tt.StrictMode=pN;tt.Suspense=xN;tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=TN;tt.act=_T;tt.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=pT({},t.props),r=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=ix.current),e.key!==void 0&&(r=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)vT.call(e,l)&&!yT.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:vd,type:t.type,key:r,ref:s,props:i,_owner:o}};tt.createContext=function(t){return t={$$typeof:vN,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:gN,_context:t},t.Consumer=t};tt.createElement=xT;tt.createFactory=function(t){var e=xT.bind(null,t);return e.type=t,e};tt.createRef=function(){return{current:null}};tt.forwardRef=function(t){return{$$typeof:yN,render:t}};tt.isValidElement=rx;tt.lazy=function(t){return{$$typeof:wN,_payload:{_status:-1,_result:t},_init:MN}};tt.memo=function(t,e){return{$$typeof:_N,type:t,compare:e===void 0?null:e}};tt.startTransition=function(t){var e=Jf.transition;Jf.transition={};try{t()}finally{Jf.transition=e}};tt.unstable_act=_T;tt.useCallback=function(t,e){return $n.current.useCallback(t,e)};tt.useContext=function(t){return $n.current.useContext(t)};tt.useDebugValue=function(){};tt.useDeferredValue=function(t){return $n.current.useDeferredValue(t)};tt.useEffect=function(t,e){return $n.current.useEffect(t,e)};tt.useId=function(){return $n.current.useId()};tt.useImperativeHandle=function(t,e,n){return $n.current.useImperativeHandle(t,e,n)};tt.useInsertionEffect=function(t,e){return $n.current.useInsertionEffect(t,e)};tt.useLayoutEffect=function(t,e){return $n.current.useLayoutEffect(t,e)};tt.useMemo=function(t,e){return $n.current.useMemo(t,e)};tt.useReducer=function(t,e,n){return $n.current.useReducer(t,e,n)};tt.useRef=function(t){return $n.current.useRef(t)};tt.useState=function(t){return $n.current.useState(t)};tt.useSyncExternalStore=function(t,e,n){return $n.current.useSyncExternalStore(t,e,n)};tt.useTransition=function(){return $n.current.useTransition()};tt.version="18.3.1";fT.exports=tt;var b=fT.exports;const fe=uT(b),sx=dN({__proto__:null,default:fe},[b]);/**
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 CN=b,AN=Symbol.for("react.element"),RN=Symbol.for("react.fragment"),PN=Object.prototype.hasOwnProperty,DN=CN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,LN={key:!0,ref:!0,__self:!0,__source:!0};function wT(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)PN.call(e,i)&&!LN.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:AN,type:t,key:s,ref:o,props:r,_owner:DN.current}}Mp.Fragment=RN;Mp.jsx=wT;Mp.jsxs=wT;dT.exports=Mp;var _=dT.exports,bT={exports:{}},wi={},ST={exports:{}},ET={};/**
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(L,O){var j=L.length;L.push(O);e:for(;0<j;){var J=j-1>>>1,ne=L[J];if(0<r(ne,O))L[J]=O,L[j]=ne,j=J;else break e}}function n(L){return L.length===0?null:L[0]}
vendor: 10,476 bytes, lines 25-34
25function i(L){if(L.length===0)return null;var O=L[0],j=L.pop();if(j!==O){L[0]=j;e:for(var J=0,ne=L.length,pe=ne>>>1;J<pe;){var he=2*(J+1)-1,Ne=L[he],K=he+1,Z=L[K];if(0>r(Ne,j))K<ne&&0>r(Z,Ne)?(L[J]=Z,L[K]=j,J=K):(L[J]=Ne,L[he]=j,J=he);else if(K<ne&&0>r(Z,j))L[J]=Z,L[K]=j,J=K;else break e}}return O}function r(L,O){var j=L.sortIndex-O.sortIndex;return j!==0?j:L.id-O.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,d=null,f=3,h=!1,v=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(L){for(var O=n(c);O!==null;){if(O.callback===null)i(c);else if(O.startTime<=L)i(c),O.sortIndex=O.expirationTime,e(l,O);else break;O=n(c)}}function w(L){if(g=!1,x(L),!v)if(n(l)!==null)v=!0,H(S);else{var O=n(c);O!==null&&W(w,O.startTime-L)}}function S(L,O){v=!1,g&&(g=!1,p(P),P=-1),h=!0;var j=f;try{for(x(O),d=n(l);d!==null&&(!(d.expirationTime>O)||L&&!N());){var J=d.callback;if(typeof J=="function"){d.callback=null,f=d.priorityLevel;var ne=J(d.expirationTime<=O);O=t.unstable_now(),typeof ne=="function"?d.callback=ne:d===n(l)&&i(l),x(O)}else i(l);d=n(l)}if(d!==null)var pe=!0;else{var he=n(c);he!==null&&W(w,he.startTime-O),pe=!1}return pe}finally{d=null,f=j,h=!1}}var T=!1,C=null,P=-1,E=5,M=-1;function N(){return!(t.unstable_now()-M<E)}function k(){if(C!==null){var L=t.unstable_now();M=L;var O=!0;try{O=C(!0,L)}finally{O?z():(T=!1,C=null)}}else T=!1}var z;if(typeof y=="function")z=function(){y(k)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,$=F.port2;F.port1.onmessage=k,z=function(){$.postMessage(null)}}else z=function(){m(k,0)};function H(L){C=L,T||(T=!0,z())}function W(L,O){P=m(function(){L(t.unstable_now())},O)}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(L){L.callback=null},t.unstable_continueExecution=function(){v||h||(v=!0,H(S))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(L){switch(f){case 1:case 2:case 3:var O=3;break;default:O=f}var j=f;f=O;try{return L()}finally{f=j}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,O){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var j=f;f=L;try{return O()}finally{f=j}},t.unstable_scheduleCallback=function(L,O,j){var J=t.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?J+j:J):j=J,L){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=j+ne,L={id:u++,callback:O,priorityLevel:L,startTime:j,expirationTime:ne,sortIndex:-1},j>J?(L.sortIndex=j,e(c,L),n(l)===null&&L===n(c)&&(g?(p(P),P=-1):g=!0,W(w,j-J))):(L.sortIndex=ne,e(l,L),v||h||(v=!0,H(S))),L},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(L){var O=f;return function(){var j=f;f=O;try{return L.apply(this,arguments)}finally{f=j}}}})(ET);ST.exports=ET;var NN=ST.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var IN=b,_i=NN;function ae(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 MT=new Set,Ru={};function La(t,e){nc(t,e),nc(t+"Capture",e)}function nc(t,e){for(Ru[t]=e,t=0;t<e.length;t++)MT.add(e[t])}var ps=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wv=Object.prototype.hasOwnProperty,kN=/^[: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]*$/,Fw={},Uw={};function ON(t){return wv.call(Uw,t)?!0:wv.call(Fw,t)?!1:kN.test(t)?Uw[t]=!0:(Fw[t]=!0,!1)}function FN(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 UN(t,e,n,i){if(e===null||typeof e>"u"||FN(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 Xn(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 _n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_n[t]=new Xn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];_n[e]=new Xn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_n[t]=new Xn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_n[t]=new Xn(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){_n[t]=new Xn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_n[t]=new Xn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_n[t]=new Xn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_n[t]=new Xn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_n[t]=new Xn(t,5,!1,t.toLowerCase(),null,!1,!1)});var ox=/[\-:]([a-z])/g;function ax(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-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(ox,ax);_n[e]=new Xn(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(ox,ax);_n[e]=new Xn(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(ox,ax);_n[e]=new Xn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_n[t]=new Xn(t,1,!1,t.toLowerCase(),null,!1,!1)});_n.xlinkHref=new Xn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_n[t]=new Xn(t,1,!1,t.toLowerCase(),null,!0,!0)});function lx(t,e,n,i){var r=_n.hasOwnProperty(e)?_n[e]:null;(r!==null?r.type!==0:i||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(UN(e,n,r,i)&&(n=null),i||r===null?ON(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 Es=IN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Hd=Symbol.for("react.element"),ll=Symbol.for("react.portal"),cl=Symbol.for("react.fragment"),cx=Symbol.for("react.strict_mode"),bv=Symbol.for("react.profiler"),TT=Symbol.for("react.provider"),CT=Symbol.for("react.context"),ux=Symbol.for("react.forward_ref"),Sv=Symbol.for("react.suspense"),Ev=Symbol.for("react.suspense_list"),dx=Symbol.for("react.memo"),Us=Symbol.for("react.lazy"),AT=Symbol.for("react.offscreen"),zw=Symbol.iterator;function Bc(t){return t===null||typeof t!="object"?null:(t=zw&&t[zw]||t["@@iterator"],typeof t=="function"?t:null)}var Ut=Object.assign,ym;function su(t){if(ym===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ym=e&&e[1]||""}return`
34`+ym+t}var xm=!1;function _m(t,e){if(!t||xm)return"";xm=!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()}}
vendor: 6,812 bytes, lines 34-37
34catch(c){if(c&&i&&typeof c.stack=="string"){for(var r=c.stack.split(`
35`),s=i.stack.split(`
36`),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||r[o]!==s[a]){var l=`
37`+r[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{xm=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?su(t):""}function zN(t){switch(t.tag){case 5:return su(t.type);case 16:return su("Lazy");case 13:return su("Suspense");case 19:return su("SuspenseList");case 0:case 2:case 15:return t=_m(t.type,!1),t;case 11:return t=_m(t.type.render,!1),t;case 1:return t=_m(t.type,!0),t;default:return""}}function Mv(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 cl:return"Fragment";case ll:return"Portal";case bv:return"Profiler";case cx:return"StrictMode";case Sv:return"Suspense";case Ev:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case CT:return(t.displayName||"Context")+".Consumer";case TT:return(t._context.displayName||"Context")+".Provider";case ux:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case dx:return e=t.displayName||null,e!==null?e:Mv(t.type)||"Memo";case Us:e=t._payload,t=t._init;try{return Mv(t(e))}catch{}}return null}function BN(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 Mv(e);case 8:return e===cx?"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 mo(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function RT(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function VN(t){var e=RT(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 jd(t){t._valueTracker||(t._valueTracker=VN(t))}function PT(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=RT(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function Rh(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 Tv(t,e){var n=e.checked;return Ut({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Bw(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=mo(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 DT(t,e){e=e.checked,e!=null&&lx(t,"checked",e,!1)}function Cv(t,e){DT(t,e);var n=mo(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")?Av(t,e.type,n):e.hasOwnProperty("defaultValue")&&Av(t,e.type,mo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Vw(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 Av(t,e,n){(e!=="number"||Rh(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ou=Array.isArray;function Pl(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=""+mo(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 Rv(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(ae(91));return Ut({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Hw(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(ae(92));if(ou(n)){if(1<n.length)throw Error(ae(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:mo(n)}}function LT(t,e){var n=mo(e.value),i=mo(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 jw(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function NT(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 Pv(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?NT(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Gd,IT=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(Gd=Gd||document.createElement("div"),Gd.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Gd.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Pu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}
vendor: 2,187 bytes, line 37
37var du={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},HN=["Webkit","ms","Moz","O"];Object.keys(du).forEach(function(t){HN.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),du[e]=du[t]})});function kT(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||du.hasOwnProperty(t)&&du[t]?(""+e).trim():e+"px"}function OT(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=kT(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var jN=Ut({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 Dv(t,e){if(e){if(jN[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ae(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ae(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ae(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ae(62))}}function Lv(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 Nv=null;function fx(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Iv=null,Dl=null,Ll=null;function Gw(t){if(t=_d(t)){if(typeof Iv!="function")throw Error(ae(280));var e=t.stateNode;e&&(e=Pp(e),Iv(t.stateNode,t.type,e))}}
vendor: 9,194 bytes, line 37
37function FT(t){Dl?Ll?Ll.push(t):Ll=[t]:Dl=t}function UT(){if(Dl){var t=Dl,e=Ll;if(Ll=Dl=null,Gw(t),e)for(t=0;t<e.length;t++)Gw(e[t])}}function zT(t,e){return t(e)}function BT(){}var wm=!1;function VT(t,e,n){if(wm)return t(e,n);wm=!0;try{return zT(t,e,n)}finally{wm=!1,(Dl!==null||Ll!==null)&&(BT(),UT())}}function Du(t,e){var n=t.stateNode;if(n===null)return null;var i=Pp(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(ae(231,e,typeof n));return n}var kv=!1;if(ps)try{var Vc={};Object.defineProperty(Vc,"passive",{get:function(){kv=!0}}),window.addEventListener("test",Vc,Vc),window.removeEventListener("test",Vc,Vc)}catch{kv=!1}function GN(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 fu=!1,Ph=null,Dh=!1,Ov=null,WN={onError:function(t){fu=!0,Ph=t}};function $N(t,e,n,i,r,s,o,a,l){fu=!1,Ph=null,GN.apply(WN,arguments)}function XN(t,e,n,i,r,s,o,a,l){if($N.apply(this,arguments),fu){if(fu){var c=Ph;fu=!1,Ph=null}else throw Error(ae(198));Dh||(Dh=!0,Ov=c)}}function Na(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 HT(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 Ww(t){if(Na(t)!==t)throw Error(ae(188))}function qN(t){var e=t.alternate;if(!e){if(e=Na(t),e===null)throw Error(ae(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 Ww(r),t;if(s===i)return Ww(r),e;s=s.sibling}throw Error(ae(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(ae(189))}}if(n.alternate!==i)throw Error(ae(190))}if(n.tag!==3)throw Error(ae(188));return n.stateNode.current===n?t:e}function jT(t){return t=qN(t),t!==null?GT(t):null}function GT(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=GT(t);if(e!==null)return e;t=t.sibling}return null}var WT=_i.unstable_scheduleCallback,$w=_i.unstable_cancelCallback,YN=_i.unstable_shouldYield,KN=_i.unstable_requestPaint,Xt=_i.unstable_now,ZN=_i.unstable_getCurrentPriorityLevel,hx=_i.unstable_ImmediatePriority,$T=_i.unstable_UserBlockingPriority,Lh=_i.unstable_NormalPriority,QN=_i.unstable_LowPriority,XT=_i.unstable_IdlePriority,Tp=null,Ir=null;function JN(t){if(Ir&&typeof Ir.onCommitFiberRoot=="function")try{Ir.onCommitFiberRoot(Tp,t,void 0,(t.current.flags&128)===128)}catch{}}var ur=Math.clz32?Math.clz32:nI,eI=Math.log,tI=Math.LN2;function nI(t){return t>>>=0,t===0?32:31-(eI(t)/tI|0)|0}var Wd=64,$d=4194304;function au(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 Nh(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=au(a):(s&=o,s!==0&&(i=au(s)))}else o=n&~r,o!==0?i=au(o):s!==0&&(i=au(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-ur(e),r=1<<n,i|=t[n],e&=~r;return i}function iI(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 rI(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-ur(s),a=1<<o,l=r[o];l===-1?(!(a&n)||a&i)&&(r[o]=iI(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Fv(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function qT(){var t=Wd;return Wd<<=1,!(Wd&4194240)&&(Wd=64),t}function bm(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function yd(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ur(e),t[e]=n}function sI(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-ur(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}function px(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-ur(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var gt=0;function YT(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var KT,mx,ZT,QT,JT,Uv=!1,Xd=[],no=null,io=null,ro=null,Lu=new Map,Nu=new Map,Bs=[],oI="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 Xw(t,e){switch(t){case"focusin":case"focusout":no=null;break;case"dragenter":case"dragleave":io=null;break;case"mouseover":case"mouseout":ro=null;break;case"pointerover":case"pointerout":Lu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nu.delete(e.pointerId)}}function Hc(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=_d(e),e!==null&&mx(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function aI(t,e,n,i,r){switch(e){case"focusin":return no=Hc(no,t,e,n,i,r),!0;case"dragenter":return io=Hc(io,t,e,n,i,r),!0;case"mouseover":return ro=Hc(ro,t,e,n,i,r),!0;case"pointerover":var s=r.pointerId;return Lu.set(s,Hc(Lu.get(s)||null,t,e,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,Nu.set(s,Hc(Nu.get(s)||null,t,e,n,i,r)),!0}return!1}function eC(t){var e=Ko(t.target);if(e!==null){var n=Na(e);if(n!==null){if(e=n.tag,e===13){if(e=HT(n),e!==null){t.blockedOn=e,JT(t.priority,function(){ZT(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 eh(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=zv(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);Nv=i,n.target.dispatchEvent(i),Nv=null}else return e=_d(n),e!==null&&mx(e),t.blockedOn=n,!1;e.shift()}return!0}function qw(t,e,n){eh(t)&&n.delete(e)}function lI(){Uv=!1,no!==null&&eh(no)&&(no=null),io!==null&&eh(io)&&(io=null),ro!==null&&eh(ro)&&(ro=null),Lu.forEach(qw),Nu.forEach(qw)}function jc(t,e){t.blockedOn===e&&(t.blockedOn=null,Uv||(Uv=!0,_i.unstable_scheduleCallback(_i.unstable_NormalPriority,lI)))}function Iu(t){function e(r){return jc(r,t)}if(0<Xd.length){jc(Xd[0],t);for(var n=1;n<Xd.length;n++){var i=Xd[n];i.blockedOn===t&&(i.blockedOn=null)}}for(no!==null&&jc(no,t),io!==null&&jc(io,t),ro!==null&&jc(ro,t),Lu.forEach(e),Nu.forEach(e),n=0;n<Bs.length;n++)i=Bs[n],i.blockedOn===t&&(i.blockedOn=null);for(;0<Bs.length&&(n=Bs[0],n.blockedOn===null);)eC(n),n.blockedOn===null&&Bs.shift()}var Nl=Es.ReactCurrentBatchConfig,Ih=!0;function cI(t,e,n,i){var r=gt,s=Nl.transition;Nl.transition=null;try{gt=1,gx(t,e,n,i)}finally{gt=r,Nl.transition=s}}function uI(t,e,n,i){var r=gt,s=Nl.transition;Nl.transition=null;try{gt=4,gx(t,e,n,i)}finally{gt=r,Nl.transition=s}}function gx(t,e,n,i){if(Ih){var r=zv(t,e,n,i);if(r===null)Lm(t,e,i,kh,n),Xw(t,i);else if(aI(r,t,e,n,i))i.stopPropagation();else if(Xw(t,i),e&4&&-1<oI.indexOf(t)){for(;r!==null;){var s=_d(r);if(s!==null&&KT(s),s=zv(t,e,n,i),s===null&&Lm(t,e,i,kh,n),s===r)break;r=s}r!==null&&i.stopPropagation()}else Lm(t,e,i,null,n)}}var kh=null;function zv(t,e,n,i){if(kh=null,t=fx(i),t=Ko(t),t!==null)if(e=Na(t),e===null)t=null;else if(n=e.tag,n===13){if(t=HT(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 kh=t,null}
vendor: 10,401 bytes, line 37
37function tC(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(ZN()){case hx:return 1;case $T:return 4;case Lh:case QN:return 16;case XT:return 536870912;default:return 16}default:return 16}}var Ks=null,vx=null,th=null;function nC(){if(th)return th;var t,e=vx,n=e.length,i,r="value"in Ks?Ks.value:Ks.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 th=r.slice(t,1<i?1-i:void 0)}function nh(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 qd(){return!0}function Yw(){return!1}function bi(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)?qd:Yw,this.isPropagationStopped=Yw,this}return Ut(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=qd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qd)},persist:function(){},isPersistent:qd}),e}var Tc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yx=bi(Tc),xd=Ut({},Tc,{view:0,detail:0}),dI=bi(xd),Sm,Em,Gc,Cp=Ut({},xd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xx,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!==Gc&&(Gc&&t.type==="mousemove"?(Sm=t.screenX-Gc.screenX,Em=t.screenY-Gc.screenY):Em=Sm=0,Gc=t),Sm)},movementY:function(t){return"movementY"in t?t.movementY:Em}}),Kw=bi(Cp),fI=Ut({},Cp,{dataTransfer:0}),hI=bi(fI),pI=Ut({},xd,{relatedTarget:0}),Mm=bi(pI),mI=Ut({},Tc,{animationName:0,elapsedTime:0,pseudoElement:0}),gI=bi(mI),vI=Ut({},Tc,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),yI=bi(vI),xI=Ut({},Tc,{data:0}),Zw=bi(xI),_I={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wI={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"},bI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SI(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=bI[t])?!!e[t]:!1}function xx(){return SI}var EI=Ut({},xd,{key:function(t){if(t.key){var e=_I[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=nh(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?wI[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xx,charCode:function(t){return t.type==="keypress"?nh(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?nh(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),MI=bi(EI),TI=Ut({},Cp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qw=bi(TI),CI=Ut({},xd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xx}),AI=bi(CI),RI=Ut({},Tc,{propertyName:0,elapsedTime:0,pseudoElement:0}),PI=bi(RI),DI=Ut({},Cp,{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}),LI=bi(DI),NI=[9,13,27,32],_x=ps&&"CompositionEvent"in window,hu=null;ps&&"documentMode"in document&&(hu=document.documentMode);var II=ps&&"TextEvent"in window&&!hu,iC=ps&&(!_x||hu&&8<hu&&11>=hu),Jw=" ",eb=!1;function rC(t,e){switch(t){case"keyup":return NI.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sC(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ul=!1;function kI(t,e){switch(t){case"compositionend":return sC(e);case"keypress":return e.which!==32?null:(eb=!0,Jw);case"textInput":return t=e.data,t===Jw&&eb?null:t;default:return null}}function OI(t,e){if(ul)return t==="compositionend"||!_x&&rC(t,e)?(t=nC(),th=vx=Ks=null,ul=!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 iC&&e.locale!=="ko"?null:e.data;default:return null}}var FI={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 tb(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!FI[t.type]:e==="textarea"}function oC(t,e,n,i){FT(i),e=Oh(e,"onChange"),0<e.length&&(n=new yx("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var pu=null,ku=null;function UI(t){vC(t,0)}function Ap(t){var e=hl(t);if(PT(e))return t}function zI(t,e){if(t==="change")return e}var aC=!1;if(ps){var Tm;if(ps){var Cm="oninput"in document;if(!Cm){var nb=document.createElement("div");nb.setAttribute("oninput","return;"),Cm=typeof nb.oninput=="function"}Tm=Cm}else Tm=!1;aC=Tm&&(!document.documentMode||9<document.documentMode)}function ib(){pu&&(pu.detachEvent("onpropertychange",lC),ku=pu=null)}function lC(t){if(t.propertyName==="value"&&Ap(ku)){var e=[];oC(e,ku,t,fx(t)),VT(UI,e)}}function BI(t,e,n){t==="focusin"?(ib(),pu=e,ku=n,pu.attachEvent("onpropertychange",lC)):t==="focusout"&&ib()}function VI(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ap(ku)}function HI(t,e){if(t==="click")return Ap(e)}function jI(t,e){if(t==="input"||t==="change")return Ap(e)}function GI(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pr=typeof Object.is=="function"?Object.is:GI;function Ou(t,e){if(pr(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(!wv.call(e,r)||!pr(t[r],e[r]))return!1}return!0}function rb(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function sb(t,e){var n=rb(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=rb(n)}}function cC(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?cC(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function uC(){for(var t=window,e=Rh();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Rh(t.document)}return e}function wx(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 WI(t){var e=uC(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&cC(n.ownerDocument.documentElement,n)){if(i!==null&&wx(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=sb(n,s);var o=sb(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}}var $I=ps&&"documentMode"in document&&11>=document.documentMode,dl=null,Bv=null,mu=null,Vv=!1;function ob(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vv||dl==null||dl!==Rh(i)||(i=dl,"selectionStart"in i&&wx(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:i.focusNode,focusOffset:i.focusOffset}),mu&&Ou(mu,i)||(mu=i,i=Oh(Bv,"onSelect"),0<i.length&&(e=new yx("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=dl)))}function Yd(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var fl={animationend:Yd("Animation","AnimationEnd"),animationiteration:Yd("Animation","AnimationIteration"),animationstart:Yd("Animation","AnimationStart"),transitionend:Yd("Transition","TransitionEnd")},Am={},dC={};ps&&(dC=document.createElement("div").style,"AnimationEvent"in window||(delete fl.animationend.animation,delete fl.animationiteration.animation,delete fl.animationstart.animation),"TransitionEvent"in window||delete fl.transitionend.transition);function Rp(t){if(Am[t])return Am[t];if(!fl[t])return t;var e=fl[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in dC)return Am[t]=e[n];return t}var fC=Rp("animationend"),hC=Rp("animationiteration"),pC=Rp("animationstart"),mC=Rp("transitionend"),gC=new Map,ab="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 Mo(t,e){gC.set(t,e),La(e,[t])}for(var Rm=0;Rm<ab.length;Rm++){var Pm=ab[Rm],XI=Pm.toLowerCase(),qI=Pm[0].toUpperCase()+Pm.slice(1);Mo(XI,"on"+qI)}Mo(fC,"onAnimationEnd");Mo(hC,"onAnimationIteration");Mo(pC,"onAnimationStart");Mo("dblclick","onDoubleClick");Mo("focusin","onFocus");Mo("focusout","onBlur");Mo(mC,"onTransitionEnd");nc("onMouseEnter",["mouseout","mouseover"]);nc("onMouseLeave",["mouseout","mouseover"]);nc("onPointerEnter",["pointerout","pointerover"]);nc("onPointerLeave",["pointerout","pointerover"]);La("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));La("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));La("onBeforeInput",["compositionend","keypress","textInput","paste"]);La("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));La("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));La("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lu="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(" "),YI=new Set("cancel close invalid load scroll toggle".split(" ").concat(lu));function lb(t,e,n){var i=t.type||"unknown-event";t.currentTarget=n,XN(i,e,void 0,t),t.currentTarget=null}function vC(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;lb(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;lb(r,a,c),s=l}}}if(Dh)throw t=Ov,Dh=!1,Ov=null,t}function Ct(t,e){var n=e[$v];n===void 0&&(n=e[$v]=new Set);var i=t+"__bubble";n.has(i)||(yC(e,t,2,!1),n.add(i))}function Dm(t,e,n){var i=0;e&&(i|=4),yC(n,t,i,e)}var Kd="_reactListening"+Math.random().toString(36).slice(2);function Fu(t){if(!t[Kd]){t[Kd]=!0,MT.forEach(function(n){n!=="selectionchange"&&(YI.has(n)||Dm(n,!1,t),Dm(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Kd]||(e[Kd]=!0,Dm("selectionchange",!1,e))}}function yC(t,e,n,i){switch(tC(e)){case 1:var r=cI;break;case 4:r=uI;break;default:r=gx}n=r.bind(null,e,n,t),r=void 0,!kv||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 Lm(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: 2,527 bytes, line 37
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=Ko(a),o===null)return;if(l=o.tag,l===5||l===6){i=s=o;continue e}a=a.parentNode}}i=i.return}VT(function(){var c=s,u=fx(n),d=[];e:{var f=gC.get(t);if(f!==void 0){var h=yx,v=t;switch(t){case"keypress":if(nh(n)===0)break e;case"keydown":case"keyup":h=MI;break;case"focusin":v="focus",h=Mm;break;case"focusout":v="blur",h=Mm;break;case"beforeblur":case"afterblur":h=Mm;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":h=Kw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=hI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=AI;break;case fC:case hC:case pC:h=gI;break;case mC:h=PI;break;case"scroll":h=dI;break;case"wheel":h=LI;break;case"copy":case"cut":case"paste":h=yI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Qw}var g=(e&4)!==0,m=!g&&t==="scroll",p=g?f!==null?f+"Capture":null:f;g=[];for(var y=c,x;y!==null;){x=y;var w=x.stateNode;if(x.tag===5&&w!==null&&(x=w,p!==null&&(w=Du(y,p),w!=null&&g.push(Uu(y,w,x)))),m)break;y=y.return}0<g.length&&(f=new h(f,v,null,n,u),d.push({event:f,listeners:g}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==Nv&&(v=n.relatedTarget||n.fromElement)&&(Ko(v)||v[ms]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=c,v=v?Ko(v):null,v!==null&&(m=Na(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=c),h!==v)){if(g=Kw,w="onMouseLeave",p="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(g=Qw,w="onPointerLeave",p="onPointerEnter",y="pointer"),m=h==null?f:hl(h),x=v==null?f:hl(v),f=new g(w,y+"leave",h,n,u),f.target=m,f.relatedTarget=x,w=null,Ko(u)===c&&(g=new g(p,y+"enter",v,n,u),g.target=x,g.relatedTarget=m,w=g),m=w,h&&v)t:{for(g=h,p=v,y=0,x=g;x;x=za(x))y++;for(x=0,w=p;w;w=za(w))x++;for(;0<y-x;)g=za(g),y--;for(;0<x-y;)p=za(p),x--;for(;y--;){if(g===p||p!==null&&g===p.alternate)break t;g=za(g),p=za(p)}g=null}else g=null;h!==null&&cb(d,f,h,g,!1),v!==null&&m!==null&&cb(d,m,v,g,!0)}}
vendor: 4,719 bytes, lines 37-38
37e:{if(f=c?hl(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=zI;else if(tb(f))if(aC)S=jI;else{S=VI;var T=BI}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=HI);if(S&&(S=S(t,c))){oC(d,S,n,u);break e}T&&T(t,f,c),t==="focusout"&&(T=f._wrapperState)&&T.controlled&&f.type==="number"&&Av(f,"number",f.value)}switch(T=c?hl(c):window,t){case"focusin":(tb(T)||T.contentEditable==="true")&&(dl=T,Bv=c,mu=null);break;case"focusout":mu=Bv=dl=null;break;case"mousedown":Vv=!0;break;case"contextmenu":case"mouseup":case"dragend":Vv=!1,ob(d,n,u);break;case"selectionchange":if($I)break;case"keydown":case"keyup":ob(d,n,u)}var C;if(_x)e:{switch(t){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else ul?rC(t,n)&&(P="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(iC&&n.locale!=="ko"&&(ul||P!=="onCompositionStart"?P==="onCompositionEnd"&&ul&&(C=nC()):(Ks=u,vx="value"in Ks?Ks.value:Ks.textContent,ul=!0)),T=Oh(c,P),0<T.length&&(P=new Zw(P,t,null,n,u),d.push({event:P,listeners:T}),C?P.data=C:(C=sC(n),C!==null&&(P.data=C)))),(C=II?kI(t,n):OI(t,n))&&(c=Oh(c,"onBeforeInput"),0<c.length&&(u=new Zw("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}vC(d,e)})}function Uu(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Oh(t,e){for(var n=e+"Capture",i=[];t!==null;){var r=t,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=Du(t,n),s!=null&&i.unshift(Uu(t,s,r)),s=Du(t,e),s!=null&&i.push(Uu(t,s,r))),t=t.return}return i}function za(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function cb(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=Du(n,s),l!=null&&o.unshift(Uu(n,l,a))):r||(l=Du(n,s),l!=null&&o.push(Uu(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var KI=/\r\n?/g,ZI=/\u0000|\uFFFD/g;function ub(t){return(typeof t=="string"?t:""+t).replace(KI,`
38`).replace(ZI,"")}function Zd(t,e,n){if(e=ub(e),ub(t)!==e&&n)throw Error(ae(425))}function Fh(){}var Hv=null,jv=null;function Gv(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 Wv=typeof setTimeout=="function"?setTimeout:void 0,QI=typeof clearTimeout=="function"?clearTimeout:void 0,db=typeof Promise=="function"?Promise:void 0,JI=typeof queueMicrotask=="function"?queueMicrotask:typeof db<"u"?function(t){return db.resolve(null).then(t).catch(ek)}:Wv;function ek(t){setTimeout(function(){throw t})}function Nm(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),Iu(e);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);Iu(e)}function so(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 fb(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 Cc=Math.random().toString(36).slice(2),Ar="__reactFiber$"+Cc,zu="__reactProps$"+Cc,ms="__reactContainer$"+Cc,$v="__reactEvents$"+Cc,tk="__reactListeners$"+Cc,nk="__reactHandles$"+Cc;function Ko(t){var e=t[Ar];if(e)return e;for(var n=t.parentNode;n;){if(e=n[ms]||n[Ar]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=fb(t);t!==null;){if(n=t[Ar])return n;t=fb(t)}return e}t=n,n=t.parentNode}return null}function _d(t){return t=t[Ar]||t[ms],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function hl(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(ae(33))}function Pp(t){return t[zu]||null}var Xv=[],pl=-1;function To(t){return{current:t}}function At(t){0>pl||(t.current=Xv[pl],Xv[pl]=null,pl--)}function St(t,e){pl++,Xv[pl]=t.current,t.current=e}var go={},In=To(go),ti=To(!1),xa=go;function ic(t,e){var n=t.type.contextTypes;if(!n)return go;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 ni(t){return t=t.childContextTypes,t!=null}function Uh(){At(ti),At(In)}function hb(t,e,n){if(In.current!==go)throw Error(ae(168));
vendor: 15,469 bytes, line 38
38St(In,e),St(ti,n)}function xC(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(ae(108,BN(t)||"Unknown",r));return Ut({},n,i)}function zh(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||go,xa=In.current,St(In,t),St(ti,ti.current),!0}function pb(t,e,n){var i=t.stateNode;if(!i)throw Error(ae(169));n?(t=xC(t,e,xa),i.__reactInternalMemoizedMergedChildContext=t,At(ti),At(In),St(In,t)):At(ti),St(ti,n)}var ns=null,Dp=!1,Im=!1;function _C(t){ns===null?ns=[t]:ns.push(t)}function ik(t){Dp=!0,_C(t)}function Co(){if(!Im&&ns!==null){Im=!0;var t=0,e=gt;try{var n=ns;for(gt=1;t<n.length;t++){var i=n[t];do i=i(!0);while(i!==null)}ns=null,Dp=!1}catch(r){throw ns!==null&&(ns=ns.slice(t+1)),WT(hx,Co),r}finally{gt=e,Im=!1}}return null}var ml=[],gl=0,Bh=null,Vh=0,Ni=[],Ii=0,_a=null,os=1,as="";function Ho(t,e){ml[gl++]=Vh,ml[gl++]=Bh,Bh=t,Vh=e}function wC(t,e,n){Ni[Ii++]=os,Ni[Ii++]=as,Ni[Ii++]=_a,_a=t;var i=os;t=as;var r=32-ur(i)-1;i&=~(1<<r),n+=1;var s=32-ur(e)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,os=1<<32-ur(e)+r|n<<r|i,as=s+t}else os=1<<s|n<<r|i,as=t}function bx(t){t.return!==null&&(Ho(t,1),wC(t,1,0))}function Sx(t){for(;t===Bh;)Bh=ml[--gl],ml[gl]=null,Vh=ml[--gl],ml[gl]=null;for(;t===_a;)_a=Ni[--Ii],Ni[Ii]=null,as=Ni[--Ii],Ni[Ii]=null,os=Ni[--Ii],Ni[Ii]=null}var mi=null,hi=null,Dt=!1,rr=null;function bC(t,e){var n=ki(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 mb(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,mi=t,hi=so(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,mi=t,hi=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=_a!==null?{id:os,overflow:as}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ki(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,mi=t,hi=null,!0):!1;default:return!1}}function qv(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Yv(t){if(Dt){var e=hi;if(e){var n=e;if(!mb(t,e)){if(qv(t))throw Error(ae(418));e=so(n.nextSibling);var i=mi;e&&mb(t,e)?bC(i,n):(t.flags=t.flags&-4097|2,Dt=!1,mi=t)}}else{if(qv(t))throw Error(ae(418));t.flags=t.flags&-4097|2,Dt=!1,mi=t}}}function gb(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;mi=t}function Qd(t){if(t!==mi)return!1;if(!Dt)return gb(t),Dt=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Gv(t.type,t.memoizedProps)),e&&(e=hi)){if(qv(t))throw SC(),Error(ae(418));for(;e;)bC(t,e),e=so(e.nextSibling)}if(gb(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(ae(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){hi=so(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}hi=null}}else hi=mi?so(t.stateNode.nextSibling):null;return!0}function SC(){for(var t=hi;t;)t=so(t.nextSibling)}function rc(){hi=mi=null,Dt=!1}function Ex(t){rr===null?rr=[t]:rr.push(t)}var rk=Es.ReactCurrentBatchConfig;function Wc(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(ae(309));var i=n.stateNode}if(!i)throw Error(ae(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(ae(284));if(!n._owner)throw Error(ae(290,t))}return t}function Jd(t,e){throw t=Object.prototype.toString.call(e),Error(ae(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function vb(t){var e=t._init;return e(t._payload)}function EC(t){function e(p,y){if(t){var x=p.deletions;x===null?(p.deletions=[y],p.flags|=16):x.push(y)}}function n(p,y){if(!t)return null;for(;y!==null;)e(p,y),y=y.sibling;return null}function i(p,y){for(p=new Map;y!==null;)y.key!==null?p.set(y.key,y):p.set(y.index,y),y=y.sibling;return p}function r(p,y){return p=co(p,y),p.index=0,p.sibling=null,p}function s(p,y,x){return p.index=x,t?(x=p.alternate,x!==null?(x=x.index,x<y?(p.flags|=2,y):x):(p.flags|=2,y)):(p.flags|=1048576,y)}function o(p){return t&&p.alternate===null&&(p.flags|=2),p}function a(p,y,x,w){return y===null||y.tag!==6?(y=Vm(x,p.mode,w),y.return=p,y):(y=r(y,x),y.return=p,y)}function l(p,y,x,w){var S=x.type;return S===cl?u(p,y,x.props.children,w,x.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Us&&vb(S)===y.type)?(w=r(y,x.props),w.ref=Wc(p,y,x),w.return=p,w):(w=ch(x.type,x.key,x.props,null,p.mode,w),w.ref=Wc(p,y,x),w.return=p,w)}function c(p,y,x,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Hm(x,p.mode,w),y.return=p,y):(y=r(y,x.children||[]),y.return=p,y)}function u(p,y,x,w,S){return y===null||y.tag!==7?(y=pa(x,p.mode,w,S),y.return=p,y):(y=r(y,x),y.return=p,y)}function d(p,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Vm(""+y,p.mode,x),y.return=p,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Hd:return x=ch(y.type,y.key,y.props,null,p.mode,x),x.ref=Wc(p,null,y),x.return=p,x;case ll:return y=Hm(y,p.mode,x),y.return=p,y;case Us:var w=y._init;return d(p,w(y._payload),x)}if(ou(y)||Bc(y))return y=pa(y,p.mode,x,null),y.return=p,y;Jd(p,y)}return null}function f(p,y,x,w){var S=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(p,y,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Hd:return x.key===S?l(p,y,x,w):null;case ll:return x.key===S?c(p,y,x,w):null;case Us:return S=x._init,f(p,y,S(x._payload),w)}if(ou(x)||Bc(x))return S!==null?null:u(p,y,x,w,null);Jd(p,x)}return null}function h(p,y,x,w,S){if(typeof w=="string"&&w!==""||typeof w=="number")return p=p.get(x)||null,a(y,p,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Hd:return p=p.get(w.key===null?x:w.key)||null,l(y,p,w,S);case ll:return p=p.get(w.key===null?x:w.key)||null,c(y,p,w,S);case Us:var T=w._init;return h(p,y,x,T(w._payload),S)}if(ou(w)||Bc(w))return p=p.get(x)||null,u(y,p,w,S,null);Jd(y,w)}return null}function v(p,y,x,w){for(var S=null,T=null,C=y,P=y=0,E=null;C!==null&&P<x.length;P++){C.index>P?(E=C,C=null):E=C.sibling;var M=f(p,C,x[P],w);if(M===null){C===null&&(C=E);break}t&&C&&M.alternate===null&&e(p,C),y=s(M,y,P),T===null?S=M:T.sibling=M,T=M,C=E}if(P===x.length)return n(p,C),Dt&&Ho(p,P),S;if(C===null){for(;P<x.length;P++)C=d(p,x[P],w),C!==null&&(y=s(C,y,P),T===null?S=C:T.sibling=C,T=C);return Dt&&Ho(p,P),S}for(C=i(p,C);P<x.length;P++)E=h(C,p,P,x[P],w),E!==null&&(t&&E.alternate!==null&&C.delete(E.key===null?P:E.key),y=s(E,y,P),T===null?S=E:T.sibling=E,T=E);return t&&C.forEach(function(N){return e(p,N)}),Dt&&Ho(p,P),S}function g(p,y,x,w){var S=Bc(x);if(typeof S!="function")throw Error(ae(150));if(x=S.call(x),x==null)throw Error(ae(151));for(var T=S=null,C=y,P=y=0,E=null,M=x.next();C!==null&&!M.done;P++,M=x.next()){C.index>P?(E=C,C=null):E=C.sibling;var N=f(p,C,M.value,w);if(N===null){C===null&&(C=E);break}t&&C&&N.alternate===null&&e(p,C),y=s(N,y,P),T===null?S=N:T.sibling=N,T=N,C=E}if(M.done)return n(p,C),Dt&&Ho(p,P),S;if(C===null){for(;!M.done;P++,M=x.next())M=d(p,M.value,w),M!==null&&(y=s(M,y,P),T===null?S=M:T.sibling=M,T=M);return Dt&&Ho(p,P),S}for(C=i(p,C);!M.done;P++,M=x.next())M=h(C,p,P,M.value,w),M!==null&&(t&&M.alternate!==null&&C.delete(M.key===null?P:M.key),y=s(M,y,P),T===null?S=M:T.sibling=M,T=M);return t&&C.forEach(function(k){return e(p,k)}),Dt&&Ho(p,P),S}function m(p,y,x,w){if(typeof x=="object"&&x!==null&&x.type===cl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Hd:e:{for(var S=x.key,T=y;T!==null;){if(T.key===S){if(S=x.type,S===cl){if(T.tag===7){n(p,T.sibling),y=r(T,x.props.children),y.return=p,p=y;break e}}else if(T.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Us&&vb(S)===T.type){n(p,T.sibling),y=r(T,x.props),y.ref=Wc(p,T,x),y.return=p,p=y;break e}n(p,T);break}else e(p,T);T=T.sibling}x.type===cl?(y=pa(x.props.children,p.mode,w,x.key),y.return=p,p=y):(w=ch(x.type,x.key,x.props,null,p.mode,w),w.ref=Wc(p,y,x),w.return=p,p=w)}return o(p);case ll:e:{for(T=x.key;y!==null;){if(y.key===T)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(p,y.sibling),y=r(y,x.children||[]),y.return=p,p=y;break e}else{n(p,y);break}else e(p,y);y=y.sibling}y=Hm(x,p.mode,w),y.return=p,p=y}return o(p);case Us:return T=x._init,m(p,y,T(x._payload),w)}if(ou(x))return v(p,y,x,w);if(Bc(x))return g(p,y,x,w);Jd(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(p,y.sibling),y=r(y,x),y.return=p,p=y):(n(p,y),y=Vm(x,p.mode,w),y.return=p,p=y),o(p)):n(p,y)}return m}var sc=EC(!0),MC=EC(!1),Hh=To(null),jh=null,vl=null,Mx=null;function Tx(){Mx=vl=jh=null}function Cx(t){var e=Hh.current;At(Hh),t._currentValue=e}function Kv(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 Il(t,e){jh=t,Mx=vl=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Jn=!0),t.firstContext=null)}function Vi(t){var e=t._currentValue;if(Mx!==t)if(t={context:t,memoizedValue:e,next:null},vl===null){if(jh===null)throw Error(ae(308));vl=t,jh.dependencies={lanes:0,firstContext:t}}else vl=vl.next=t;return e}var Zo=null;function Ax(t){Zo===null?Zo=[t]:Zo.push(t)}function TC(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,Ax(e)):(n.next=r.next,r.next=n),e.interleaved=n,gs(t,i)}function gs(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 zs=!1;function Rx(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function CC(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 us(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function oo(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,st&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,gs(t,n)}return r=i.interleaved,r===null?(e.next=e,Ax(i)):(e.next=r.next,r.next=e),i.interleaved=e,gs(t,n)}function ih(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,px(t,n)}}function yb(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 Gh(t,e,n,i){var r=t.updateQueue;zs=!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 d=r.baseState;o=0,u=c=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((i&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,g=a;switch(f=e,h=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){d=v.call(h,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(h,d,f):v,f==null)break e;d=Ut({},d,f);break e;case 2:zs=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=r.effects,f===null?r.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,o|=f;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;f=a,a=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);if(u===null&&(l=d),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);ba|=o,t.lanes=o,t.memoizedState=d}}function xb(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(ae(191,r));r.call(i)}}}var wd={},kr=To(wd),Bu=To(wd),Vu=To(wd);function Qo(t){if(t===wd)throw Error(ae(174));return t}function Px(t,e){switch(St(Vu,e),St(Bu,t),St(kr,wd),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Pv(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Pv(e,t)}At(kr),St(kr,e)}function oc(){At(kr),At(Bu),At(Vu)}function AC(t){Qo(Vu.current);var e=Qo(kr.current),n=Pv(e,t.type);e!==n&&(St(Bu,t),St(kr,n))}function Dx(t){Bu.current===t&&(At(kr),At(Bu))}var kt=To(0);function Wh(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 km=[];function Lx(){for(var t=0;t<km.length;t++)km[t]._workInProgressVersionPrimary=null;km.length=0}var rh=Es.ReactCurrentDispatcher,Om=Es.ReactCurrentBatchConfig,wa=0,Ft=null,sn=null,hn=null,$h=!1,gu=!1,Hu=0,sk=0;function bn(){throw Error(ae(321))}function Nx(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!pr(t[n],e[n]))return!1;return!0}function Ix(t,e,n,i,r,s){if(wa=s,Ft=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,rh.current=t===null||t.memoizedState===null?ck:uk,t=n(i,r),gu){s=0;do{if(gu=!1,Hu=0,25<=s)throw Error(ae(301));s+=1,hn=sn=null,e.updateQueue=null,rh.current=dk,t=n(i,r)}while(gu)}if(rh.current=Xh,e=sn!==null&&sn.next!==null,wa=0,hn=sn=Ft=null,$h=!1,e)throw Error(ae(300));return t}function kx(){var t=Hu!==0;return Hu=0,t}function br(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hn===null?Ft.memoizedState=hn=t:hn=hn.next=t,hn}function Hi(){if(sn===null){var t=Ft.alternate;t=t!==null?t.memoizedState:null}else t=sn.next;var e=hn===null?Ft.memoizedState:hn.next;if(e!==null)hn=e,sn=t;else{if(t===null)throw Error(ae(310));sn=t,t={memoizedState:sn.memoizedState,baseState:sn.baseState,baseQueue:sn.baseQueue,queue:sn.queue,next:null},hn===null?Ft.memoizedState=hn=t:hn=hn.next=t}return hn}function ju(t,e){return typeof e=="function"?e(t):e}function Fm(t){var e=Hi(),n=e.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=t;var i=sn,r=i.baseQueue,s=n.pending;if(s!==null){if(r!==null){var o=r.next;
vendor: 4,577 bytes, line 38
38r.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((wa&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 d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=i):l=l.next=d,Ft.lanes|=u,ba|=u}c=c.next}while(c!==null&&c!==s);l===null?o=i:l.next=a,pr(i,e.memoizedState)||(Jn=!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,Ft.lanes|=s,ba|=s,r=r.next;while(r!==t)}else r===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Um(t){var e=Hi(),n=e.queue;if(n===null)throw Error(ae(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);pr(s,e.memoizedState)||(Jn=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,i]}function RC(){}function PC(t,e){var n=Ft,i=Hi(),r=e(),s=!pr(i.memoizedState,r);if(s&&(i.memoizedState=r,Jn=!0),i=i.queue,Ox(NC.bind(null,n,i,t),[t]),i.getSnapshot!==e||s||hn!==null&&hn.memoizedState.tag&1){if(n.flags|=2048,Gu(9,LC.bind(null,n,i,r,e),void 0,null),pn===null)throw Error(ae(349));wa&30||DC(n,e,r)}return r}function DC(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Ft.updateQueue,e===null?(e={lastEffect:null,stores:null},Ft.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function LC(t,e,n,i){e.value=n,e.getSnapshot=i,IC(e)&&kC(t)}function NC(t,e,n){return n(function(){IC(e)&&kC(t)})}function IC(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!pr(t,n)}catch{return!0}}function kC(t){var e=gs(t,1);e!==null&&dr(e,t,1,-1)}function _b(t){var e=br();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ju,lastRenderedState:t},e.queue=t,t=t.dispatch=lk.bind(null,Ft,t),[e.memoizedState,t]}function Gu(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},e=Ft.updateQueue,e===null?(e={lastEffect:null,stores:null},Ft.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 OC(){return Hi().memoizedState}function sh(t,e,n,i){var r=br();Ft.flags|=t,r.memoizedState=Gu(1|e,n,void 0,i===void 0?null:i)}function Lp(t,e,n,i){var r=Hi();i=i===void 0?null:i;var s=void 0;if(sn!==null){var o=sn.memoizedState;if(s=o.destroy,i!==null&&Nx(i,o.deps)){r.memoizedState=Gu(e,n,s,i);return}}Ft.flags|=t,r.memoizedState=Gu(1|e,n,s,i)}function wb(t,e){return sh(8390656,8,t,e)}function Ox(t,e){return Lp(2048,8,t,e)}function FC(t,e){return Lp(4,2,t,e)}function UC(t,e){return Lp(4,4,t,e)}function zC(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 BC(t,e,n){return n=n!=null?n.concat([t]):null,Lp(4,4,zC.bind(null,e,t),n)}function Fx(){}function VC(t,e){var n=Hi();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&Nx(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function HC(t,e){var n=Hi();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&Nx(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function jC(t,e,n){return wa&21?(pr(n,e)||(n=qT(),Ft.lanes|=n,ba|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Jn=!0),t.memoizedState=n)}function ok(t,e){var n=gt;gt=n!==0&&4>n?n:4,t(!0);var i=Om.transition;Om.transition={};try{t(!1),e()}finally{gt=n,Om.transition=i}}function GC(){return Hi().memoizedState}function ak(t,e,n){var i=lo(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},WC(t))$C(e,n);else if(n=TC(t,e,n,i),n!==null){var r=Gn();dr(n,t,i,r),XC(n,e,i)}}function lk(t,e,n){var i=lo(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(WC(t))$C(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,pr(a,o)){var l=e.interleaved;l===null?(r.next=r,Ax(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=TC(t,e,r,i),n!==null&&(r=Gn(),dr(n,t,i,r),XC(n,e,i))}}function WC(t){var e=t.alternate;return t===Ft||e!==null&&e===Ft}function $C(t,e){gu=$h=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function XC(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,px(t,n)}}var Xh={readContext:Vi,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useInsertionEffect:bn,useLayoutEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useMutableSource:bn,useSyncExternalStore:bn,useId:bn,unstable_isNewReconciler:!1},ck={readContext:Vi,useCallback:function(t,e){return br().memoizedState=[t,e===void 0?null:e],t},useContext:Vi,useEffect:wb,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,sh(4194308,4,zC.bind(null,e,t),n)},useLayoutEffect:function(t,e){return sh(4194308,4,t,e)},useInsertionEffect:function(t,e){return sh(4,2,t,e)},useMemo:function(t,e){var n=br();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=br();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=ak.bind(null,Ft,t),[i.memoizedState,t]},useRef:function(t){var e=br();return t={current:t},e.memoizedState=t},useState:_b,useDebugValue:Fx,useDeferredValue:function(t){return br().memoizedState=t},useTransition:function(){var t=_b(!1),e=t[0];return t=ok.bind(null,t[1]),br().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=Ft,r=br();if(Dt){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=e(),pn===null)throw Error(ae(349));wa&30||DC(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,wb(NC.bind(null,i,s,t),[t]),i.flags|=2048,Gu(9,LC.bind(null,i,s,n,e),void 0,null),n},useId:function(){var t=br(),e=pn.identifierPrefix;if(Dt){var n=as,i=os;n=(i&~(1<<32-ur(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=Hu++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=sk++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},uk={readContext:Vi,useCallback:VC,useContext:Vi,useEffect:Ox,useImperativeHandle:BC,useInsertionEffect:FC,useLayoutEffect:UC,useMemo:HC,useReducer:Fm,useRef:OC,useState:function(){return Fm(ju)},useDebugValue:Fx,useDeferredValue:function(t){var e=Hi();return jC(e,sn.memoizedState,t)},useTransition:function(){var t=Fm(ju)[0],e=Hi().memoizedState;return[t,e]},useMutableSource:RC,useSyncExternalStore:PC,useId:GC,unstable_isNewReconciler:!1},dk={readContext:Vi,useCallback:VC,useContext:Vi,useEffect:Ox,useImperativeHandle:BC,useInsertionEffect:FC,useLayoutEffect:UC,useMemo:HC,useReducer:Um,useRef:OC,useState:function(){return Um(ju)},useDebugValue:Fx,useDeferredValue:function(t){var e=Hi();return sn===null?e.memoizedState=t:jC(e,sn.memoizedState,t)},useTransition:function(){var t=Um(ju)[0],e=Hi().memoizedState;return[t,e]},useMutableSource:RC,useSyncExternalStore:PC,useId:GC,unstable_isNewReconciler:!1};function Qi(t,e){if(t&&t.defaultProps){e=Ut({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Zv(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:Ut({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Np={isMounted:function(t){return(t=t._reactInternals)?Na(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=Gn(),r=lo(t),s=us(i,r);s.payload=e,n!=null&&(s.callback=n),e=oo(t,s,r),e!==null&&(dr(e,t,r,i),ih(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=Gn(),r=lo(t),s=us(i,r);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=oo(t,s,r),e!==null&&(dr(e,t,r,i),ih(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Gn(),i=lo(t),r=us(n,i);r.tag=2,e!=null&&(r.callback=e),e=oo(t,r,i),e!==null&&(dr(e,t,i,n),ih(e,t,i))}};function bb(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?!Ou(n,i)||!Ou(r,s):!0}function qC(t,e,n){var i=!1,r=go,s=e.contextType;return typeof s=="object"&&s!==null?s=Vi(s):(r=ni(e)?xa:In.current,i=e.contextTypes,s=(i=i!=null)?ic(t,r):go),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Np,t.stateNode=e,e._reactInternals=t,i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function Sb(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&&Np.enqueueReplaceState(e,e.state,null)}function Qv(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},Rx(t);var s=e.contextType;typeof s=="object"&&s!==null?r.context=Vi(s):(s=ni(e)?xa:In.current,r.context=ic(t,s)),r.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Zv(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&&Np.enqueueReplaceState(r,r.state,null),Gh(t,n,r,i),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308)}function ac(t,e){try{var n="",i=e;do n+=zN(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 zm(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Jv(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var fk=typeof WeakMap=="function"?WeakMap:Map;function YC(t,e,n){n=us(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){Yh||(Yh=!0,cy=i),Jv(t,e)},n}function KC(t,e,n){n=us(-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(){Jv(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Jv(t,e),typeof i!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Eb(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new fk;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=Tk.bind(null,t,e,n),e.then(t,t))}function Mb(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 Tb(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=us(-1,1),e.tag=2,oo(n,e,1))),n.lanes|=1),t)}var hk=Es.ReactCurrentOwner,Jn=!1;function Bn(t,e,n,i){e.child=t===null?MC(e,null,n,i):sc(e,t.child,n,i)}function Cb(t,e,n,i,r){n=n.render;var s=e.ref;return Il(e,r),i=Ix(t,e,n,i,s,r),n=kx(),t!==null&&!Jn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,vs(t,e,r)):(Dt&&n&&bx(e),e.flags|=1,Bn(t,e,i,r),e.child)}function Ab(t,e,n,i,r){if(t===null){var s=n.type;return typeof s=="function"&&!Wx(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,ZC(t,e,s,i,r)):(t=ch(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:Ou,n(o,i)&&t.ref===e.ref)return vs(t,e,r)}return e.flags|=1,t=co(s,i),t.ref=e.ref,t.return=e,e.child=t}function ZC(t,e,n,i,r){if(t!==null){var s=t.memoizedProps;if(Ou(s,i)&&t.ref===e.ref)if(Jn=!1,e.pendingProps=i=s,(t.lanes&r)!==0)t.flags&131072&&(Jn=!0);else return e.lanes=t.lanes,vs(t,e,r)}return ey(t,e,n,i,r)}function QC(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},St(xl,di),di|=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,St(xl,di),di|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:n,St(xl,di),di|=i}else s!==null?(i=s.baseLanes|n,e.memoizedState=null):i=n,St(xl,di),di|=i;return Bn(t,e,r,n),e.child}function JC(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 6,316 bytes, line 40
40function ey(t,e,n,i,r){var s=ni(n)?xa:In.current;return s=ic(e,s),Il(e,r),n=Ix(t,e,n,i,s,r),i=kx(),t!==null&&!Jn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,vs(t,e,r)):(Dt&&i&&bx(e),e.flags|=1,Bn(t,e,n,r),e.child)}function Rb(t,e,n,i,r){if(ni(n)){var s=!0;zh(e)}else s=!1;if(Il(e,r),e.stateNode===null)oh(t,e),qC(e,n,i),Qv(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=Vi(c):(c=ni(n)?xa:In.current,c=ic(e,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==c)&&Sb(e,o,i,c),zs=!1;var f=e.memoizedState;o.state=f,Gh(e,i,o,r),l=e.memoizedState,a!==i||f!==l||ti.current||zs?(typeof u=="function"&&(Zv(e,n,u,i),l=e.memoizedState),(a=zs||bb(e,n,a,i,f,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,CC(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Qi(e.type,a),o.props=c,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Vi(l):(l=ni(n)?xa:In.current,l=ic(e,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Sb(e,o,i,l),zs=!1,f=e.memoizedState,o.state=f,Gh(e,i,o,r);var v=e.memoizedState;a!==d||f!==v||ti.current||zs?(typeof h=="function"&&(Zv(e,n,h,i),v=e.memoizedState),(c=zs||bb(e,n,c,i,f,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&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===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&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),i=!1)}return ty(t,e,n,i,s,r)}function ty(t,e,n,i,r,s){JC(t,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&pb(e,n,!1),vs(t,e,s);i=e.stateNode,hk.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&o?(e.child=sc(e,t.child,null,s),e.child=sc(e,null,a,s)):Bn(t,e,a,s),e.memoizedState=i.state,r&&pb(e,n,!0),e.child}function eA(t){var e=t.stateNode;e.pendingContext?hb(t,e.pendingContext,e.pendingContext!==e.context):e.context&&hb(t,e.context,!1),Px(t,e.containerInfo)}function Pb(t,e,n,i,r){return rc(),Ex(r),e.flags|=256,Bn(t,e,n,i),e.child}var ny={dehydrated:null,treeContext:null,retryLane:0};function iy(t){return{baseLanes:t,cachePool:null,transitions:null}}function tA(t,e,n){var i=e.pendingProps,r=kt.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),St(kt,r&1),t===null)return Yv(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=Op(o,i,0,null),t=pa(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=iy(n),e.memoizedState=ny,t):Ux(e,o));if(r=t.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return pk(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=co(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=co(a,s):(s=pa(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?iy(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=ny,i}return s=t.child,t=s.sibling,i=co(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 Ux(t,e){return e=Op({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function ef(t,e,n,i){return i!==null&&Ex(i),sc(e,t.child,null,n),t=Ux(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function pk(t,e,n,i,r,s,o){if(n)return e.flags&256?(e.flags&=-257,i=zm(Error(ae(422))),ef(t,e,o,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=Op({mode:"visible",children:i.children},r,0,null),s=pa(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&sc(e,t.child,null,o),e.child.memoizedState=iy(o),e.memoizedState=ny,s);if(!(e.mode&1))return ef(t,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(ae(419)),i=zm(s,i,void 0),ef(t,e,o,i)}if(a=(o&t.childLanes)!==0,Jn||a){if(i=pn,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,g
vendor: 5,474 bytes, line 40
40s(t,r),dr(i,t,r,-1))}return Gx(),i=zm(Error(ae(421))),ef(t,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=Ck.bind(null,t),r._reactRetry=e,null):(t=s.treeContext,hi=so(r.nextSibling),mi=e,Dt=!0,rr=null,t!==null&&(Ni[Ii++]=os,Ni[Ii++]=as,Ni[Ii++]=_a,os=t.id,as=t.overflow,_a=e),e=Ux(e,i.children),e.flags|=4096,e)}function Db(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),Kv(t.return,e,n)}function Bm(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 nA(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(Bn(t,e,i.children,n),i=kt.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&&Db(t,n,e);else if(t.tag===19)Db(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(St(kt,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&&Wh(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),Bm(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&&Wh(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}Bm(e,!0,n,null,s);break;case"together":Bm(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function oh(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function vs(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ba|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ae(153));if(e.child!==null){for(t=e.child,n=co(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=co(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function mk(t,e,n){switch(e.tag){case 3:eA(e),rc();break;case 5:AC(e);break;case 1:ni(e.type)&&zh(e);break;case 4:Px(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;St(Hh,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(St(kt,kt.current&1),e.flags|=128,null):n&e.child.childLanes?tA(t,e,n):(St(kt,kt.current&1),t=vs(t,e,n),t!==null?t.sibling:null);St(kt,kt.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return nA(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),St(kt,kt.current),i)break;return null;case 22:case 23:return e.lanes=0,QC(t,e,n)}return vs(t,e,n)}var iA,ry,rA,sA;iA=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}};ry=function(){};rA=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,Qo(kr.current);var s=null;switch(n){case"input":r=Tv(t,r),i=Tv(t,i),s=[];break;case"select":r=Ut({},r,{value:void 0}),i=Ut({},i,{value:void 0}),s=[];break;case"textarea":r=Rv(t,r),i=Rv(t,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=Fh)}Dv(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"&&(Ru.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"&&(Ru.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ct("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)}};sA=function(t,e,n,i){n!==i&&(e.flags|=4)};function $c(t,e){if(!Dt)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 Sn(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 gk(t,e,n){var i=e.pendingProps;switch(Sx(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sn(e),null;case 1:return ni(e.type)&&Uh(),Sn(e),null;
vendor: 33,671 bytes, line 40
40case 3:return i=e.stateNode,oc(),At(ti),At(In),Lx(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Qd(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,rr!==null&&(fy(rr),rr=null))),ry(t,e),Sn(e),null;case 5:Dx(e);var r=Qo(Vu.current);if(n=e.type,t!==null&&e.stateNode!=null)rA(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(ae(166));return Sn(e),null}if(t=Qo(kr.current),Qd(e)){i=e.stateNode,n=e.type;var s=e.memoizedProps;switch(i[Ar]=e,i[zu]=s,t=(e.mode&1)!==0,n){case"dialog":Ct("cancel",i),Ct("close",i);break;case"iframe":case"object":case"embed":Ct("load",i);break;case"video":case"audio":for(r=0;r<lu.length;r++)Ct(lu[r],i);break;case"source":Ct("error",i);break;case"img":case"image":case"link":Ct("error",i),Ct("load",i);break;case"details":Ct("toggle",i);break;case"input":Bw(i,s),Ct("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},Ct("invalid",i);break;case"textarea":Hw(i,s),Ct("invalid",i)}Dv(n,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?i.textContent!==a&&(s.suppressHydrationWarning!==!0&&Zd(i.textContent,a,t),r=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Zd(i.textContent,a,t),r=["children",""+a]):Ru.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ct("scroll",i)}switch(n){case"input":jd(i),Vw(i,s,!0);break;case"textarea":jd(i),jw(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=Fh)}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=NT(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[Ar]=e,t[zu]=i,iA(t,e,!1,!1),e.stateNode=t;e:{switch(o=Lv(n,i),n){case"dialog":Ct("cancel",t),Ct("close",t),r=i;break;case"iframe":case"object":case"embed":Ct("load",t),r=i;break;case"video":case"audio":for(r=0;r<lu.length;r++)Ct(lu[r],t);r=i;break;case"source":Ct("error",t),r=i;break;case"img":case"image":case"link":Ct("error",t),Ct("load",t),r=i;break;case"details":Ct("toggle",t),r=i;break;case"input":Bw(t,i),r=Tv(t,i),Ct("invalid",t);break;case"option":r=i;break;case"select":t._wrapperState={wasMultiple:!!i.multiple},r=Ut({},i,{value:void 0}),Ct("invalid",t);break;case"textarea":Hw(t,i),r=Rv(t,i),Ct("invalid",t);break;default:r=i}Dv(n,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?OT(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&IT(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Pu(t,l):typeof l=="number"&&Pu(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ru.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ct("scroll",t):l!=null&&lx(t,s,l,o))}switch(n){case"input":jd(t),Vw(t,i,!1);break;case"textarea":jd(t),jw(t);break;case"option":i.value!=null&&t.setAttribute("value",""+mo(i.value));break;case"select":t.multiple=!!i.multiple,s=i.value,s!=null?Pl(t,!!i.multiple,s,!1):i.defaultValue!=null&&Pl(t,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(t.onclick=Fh)}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 Sn(e),null;case 6:if(t&&e.stateNode!=null)sA(t,e,t.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(ae(166));if(n=Qo(Vu.current),Qo(kr.current),Qd(e)){if(i=e.stateNode,n=e.memoizedProps,i[Ar]=e,(s=i.nodeValue!==n)&&(t=mi,t!==null))switch(t.tag){case 3:Zd(i.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Zd(i.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ar]=e,e.stateNode=i}return Sn(e),null;case 13:if(At(kt),i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Dt&&hi!==null&&e.mode&1&&!(e.flags&128))SC(),rc(),e.flags|=98560,s=!1;else if(s=Qd(e),i!==null&&i.dehydrated!==null){if(t===null){if(!s)throw Error(ae(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ae(317));s[Ar]=e}else rc(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Sn(e),s=!1}else rr!==null&&(fy(rr),rr=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||kt.current&1?an===0&&(an=3):Gx())),e.updateQueue!==null&&(e.flags|=4),Sn(e),null);case 4:return oc(),ry(t,e),t===null&&Fu(e.stateNode.containerInfo),Sn(e),null;case 10:return Cx(e.type._context),Sn(e),null;case 17:return ni(e.type)&&Uh(),Sn(e),null;case 19:if(At(kt),s=e.memoizedState,s===null)return Sn(e),null;if(i=(e.flags&128)!==0,o=s.rendering,o===null)if(i)$c(s,!1);else{if(an!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Wh(t),o!==null){for(e.flags|=128,$c(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 St(kt,kt.current&1|2),e.child}t=t.sibling}s.tail!==null&&Xt()>lc&&(e.flags|=128,i=!0,$c(s,!1),e.lanes=4194304)}else{if(!i)if(t=Wh(o),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),$c(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Dt)return Sn(e),null}else 2*Xt()-s.renderingStartTime>lc&&n!==1073741824&&(e.flags|=128,i=!0,$c(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=Xt(),e.sibling=null,n=kt.current,St(kt,i?n&1|2:n&1),e):(Sn(e),null);case 22:case 23:return jx(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?di&1073741824&&(Sn(e),e.subtreeFlags&6&&(e.flags|=8192)):Sn(e),null;case 24:return null;case 25:return null}throw Error(ae(156,e.tag))}function vk(t,e){switch(Sx(e),e.tag){case 1:return ni(e.type)&&Uh(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return oc(),At(ti),At(In),Lx(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Dx(e),null;case 13:if(At(kt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ae(340));rc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At(kt),null;case 4:return oc(),null;case 10:return Cx(e.type._context),null;case 22:case 23:return jx(),null;case 24:return null;default:return null}}var tf=!1,An=!1,yk=typeof WeakSet=="function"?WeakSet:Set,Me=null;function yl(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){jt(t,e,i)}else n.current=null}function sy(t,e,n){try{n()}catch(i){jt(t,e,i)}}var Lb=!1;function xk(t,e){if(Hv=Ih,t=uC(),wx(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,d=t,f=null;t:for(;;){for(var h;d!==n||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++c===r&&(a=o),f===s&&++u===i&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(jv={focusedElem:t,selectionRange:n},Ih=!1,Me=e;Me!==null;)if(e=Me,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Me=t;else for(;Me!==null;){e=Me;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 g=v.memoizedProps,m=v.memoizedState,p=e.stateNode,y=p.getSnapshotBeforeUpdate(e.elementType===e.type?g:Qi(e.type,g),m);p.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(w){jt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,Me=t;break}Me=e.return}return v=Lb,Lb=!1,v}function vu(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&&sy(e,n,s)}r=r.next}while(r!==i)}}function Ip(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 oy(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 oA(t){var e=t.alternate;e!==null&&(t.alternate=null,oA(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Ar],delete e[zu],delete e[$v],delete e[tk],delete e[nk])),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 aA(t){return t.tag===5||t.tag===3||t.tag===4}function Nb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||aA(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 ay(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=Fh));else if(i!==4&&(t=t.child,t!==null))for(ay(t,e,n),t=t.sibling;t!==null;)ay(t,e,n),t=t.sibling}function ly(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(ly(t,e,n),t=t.sibling;t!==null;)ly(t,e,n),t=t.sibling}var gn=null,ir=!1;function Ms(t,e,n){for(n=n.child;n!==null;)lA(t,e,n),n=n.sibling}function lA(t,e,n){if(Ir&&typeof Ir.onCommitFiberUnmount=="function")try{Ir.onCommitFiberUnmount(Tp,n)}catch{}switch(n.tag){case 5:An||yl(n,e);case 6:var i=gn,r=ir;gn=null,Ms(t,e,n),gn=i,ir=r,gn!==null&&(ir?(t=gn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):gn.removeChild(n.stateNode));break;case 18:gn!==null&&(ir?(t=gn,n=n.stateNode,t.nodeType===8?Nm(t.parentNode,n):t.nodeType===1&&Nm(t,n),Iu(t)):Nm(gn,n.stateNode));break;case 4:i=gn,r=ir,gn=n.stateNode.containerInfo,ir=!0,Ms(t,e,n),gn=i,ir=r;break;case 0:case 11:case 14:case 15:if(!An&&(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)&&sy(n,e,o),r=r.next}while(r!==i)}Ms(t,e,n);break;case 1:if(!An&&(yl(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){jt(n,e,a)}Ms(t,e,n);break;case 21:Ms(t,e,n);break;case 22:n.mode&1?(An=(i=An)||n.memoizedState!==null,Ms(t,e,n),An=i):Ms(t,e,n);break;default:Ms(t,e,n)}}function Ib(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new yk),e.forEach(function(i){var r=Ak.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function $i(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:gn=a.stateNode,ir=!1;break e;case 3:gn=a.stateNode.containerInfo,ir=!0;break e;case 4:gn=a.stateNode.containerInfo,ir=!0;break e}a=a.return}if(gn===null)throw Error(ae(160));lA(s,o,r),gn=null,ir=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(c){jt(r,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)cA(e,t),e=e.sibling}function cA(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if($i(e,t),wr(t),i&4){try{vu(3,t,t.return),Ip(3,t)}catch(g){jt(t,t.return,g)}try{vu(5,t,t.return)}catch(g){jt(t,t.return,g)}}break;case 1:$i(e,t),wr(t),i&512&&n!==null&&yl(n,n.return);break;case 5:if($i(e,t),wr(t),i&512&&n!==null&&yl(n,n.return),t.flags&32){var r=t.stateNode;try{Pu(r,"")}catch(g){jt(t,t.return,g)}}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&&DT(r,s),Lv(a,o);var c=Lv(a,s);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?OT(r,d):u==="dangerouslySetInnerHTML"?IT(r,d):u==="children"?Pu(r,d):lx(r,u,d,c)}switch(a){case"input":Cv(r,s);break;case"textarea":LT(r,s);break;case"select":var f=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Pl(r,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Pl(r,!!s.multiple,s.defaultValue,!0):Pl(r,!!s.multiple,s.multiple?[]:"",!1))}r[zu]=s}catch(g){jt(t,t.return,g)}}break;case 6:if($i(e,t),wr(t),i&4){if(t.stateNode===null)throw Error(ae(162));r=t.stateNode,s=t.memoizedProps;try{r.nodeValue=s}catch(g){jt(t,t.return,g)}}break;case 3:if($i(e,t),wr(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Iu(e.containerInfo)}catch(g){jt(t,t.return,g)}break;case 4:$i(e,t),wr(t);break;case 13:$i(e,t),wr(t),r=t.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(Vx=Xt())),i&4&&Ib(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(An=(c=An)||u,$i(e,t),An=c):$i(e,t),wr(t),i&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(Me=t,u=t.child;u!==null;){for(d=Me=u;Me!==null;){switch(f=Me,h=f.child,f.tag){case 0:case 11:case 14:case 15:vu(4,f,f.return);break;case 1:yl(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){i=f,n=f.return;try{e=i,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(g){jt(i,n,g)}}break;case 5:yl(f,f.return);break;case 22:if(f.memoizedState!==null){Ob(d);continue}}h!==null?(h.return=f,Me=h):Ob(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{r=d.stateNode,c?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=kT("display",o))}catch(g){jt(t,t.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){jt(t,t.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:$i(e,t),wr(t),i&4&&Ib(t);break;case 21:break;default:$i(e,t),wr(t)}}function wr(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(aA(n)){var i=n;break e}n=n.return}throw Error(ae(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(Pu(r,""),i.flags&=-33);var s=Nb(t);ly(t,s,r);break;case 3:case 4:var o=i.stateNode.containerInfo,a=Nb(t);ay(t,a,o);break;default:throw Error(ae(161))}}catch(l){jt(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function _k(t,e,n){Me=t,uA(t)}function uA(t,e,n){for(var i=(t.mode&1)!==0;Me!==null;){var r=Me,s=r.child;if(r.tag===22&&i){var o=r.memoizedState!==null||tf;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||An;a=tf;var c=An;if(tf=o,(An=l)&&!c)for(Me=r;Me!==null;)o=Me,l=o.child,o.tag===22&&o.memoizedState!==null?Fb(r):l!==null?(l.return=o,Me=l):Fb(r);for(;s!==null;)Me=s,uA(s),s=s.sibling;Me=r,tf=a,An=c}kb(t)}else r.subtreeFlags&8772&&s!==null?(s.return=r,Me=s):kb(t)}}function kb(t){for(;Me!==null;){var e=Me;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:An||Ip(5,e);break;case 1:var i=e.stateNode;if(e.flags&4&&!An)if(n===null)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:Qi(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&xb(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}xb(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 d=u.dehydrated;d!==null&&Iu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ae(163))}An||e.flags&512&&oy(e)}catch(f){jt(e,e.return,f)}}if(e===t){Me=null;break}if(n=e.sibling,n!==null){n.return=e.return,Me=n;break}Me=e.return}}function Ob(t){for(;Me!==null;){var e=Me;if(e===t){Me=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Me=n;break}Me=e.return}}function Fb(t){for(;Me!==null;){var e=Me;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Ip(4,e)}catch(l){jt(e,n,l)}break;case 1:var i=e.stateNode;if(typeof i.componentDidMount=="function"){var r=e.return;try{i.componentDidMount()}catch(l){jt(e,r,l)}}var s=e.return;try{oy(e)}catch(l){jt(e,s,l)}break;case 5:var o=e.return;try{oy(e)}catch(l){jt(e,o,l)}}}catch(l){jt(e,e.return,l)}if(e===t){Me=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Me=a;break}Me=e.return}}var wk=Math.ceil,qh=Es.ReactCurrentDispatcher,zx=Es.ReactCurrentOwner,Bi=Es.ReactCurrentBatchConfig,st=0,pn=null,Jt=null,xn=0,di=0,xl=To(0),an=0,Wu=null,ba=0,kp=0,Bx=0,yu=null,Qn=null,Vx=0,lc=1/0,ts=null,Yh=!1,cy=null,ao=null,nf=!1,Zs=null,Kh=0,xu=0,uy=null,ah=-1,lh=0;function Gn(){return st&6?Xt():ah!==-1?ah:ah=Xt()}function lo(t){return t.mode&1?st&2&&xn!==0?xn&-xn:rk.transition!==null?(lh===0&&(lh=qT()),lh):(t=gt,t!==0||(t=window.event,t=t===void 0?16:tC(t.type)),t):1}function dr(t,e,n,i){if(50<xu)throw xu=0,uy=null,Error(ae(185));yd(t,n,i),(!(st&2)||t!==pn)&&(t===pn&&(!(st&2)&&(kp|=n),an===4&&Vs(t,xn)),ii(t,i),n===1&&st===0&&!(e.mode&1)&&(lc=Xt()+500,Dp&&Co()))}function ii(t,e){var n=t.callbackNode;rI(t,e);var i=Nh(t,t===pn?xn:0);if(i===0)n!==null&&$w(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(n!=null&&$w(n),e===1)t.tag===0?ik(Ub.bind(null,t)):_C(Ub.bind(null,t)),JI(function(){!(st&6)&&Co()}),n=null;else{switch(YT(i)){case 1:n=hx;break;case 4:n=$T;break;case 16:n=Lh;break;case 536870912:n=XT;break;default:n=Lh}n=yA(n,dA.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function dA(t,e){if(ah=-1,lh=0,st&6)throw Error(ae(327));var n=t.callbackNode;if(kl()&&t.callbackNode!==n)return null;var i=Nh(t,t===pn?xn:0);if(i===0)return null;if(i&30||i&t.expiredLanes||e)e=Zh(t,i);else{e=i;var r=st;st|=2;var s=hA();(pn!==t||xn!==e)&&(ts=null,lc=Xt()+500,ha(t,e));do try{Ek();break}catch(a){fA(t,a)}while(!0);Tx(),qh.current=s,st=r,Jt!==null?e=0:(pn=null,xn=0,e=an)}if(e!==0){if(e===2&&(r=Fv(t),r!==0&&(i=r,e=dy(t,r))),e===1)throw n=Wu,ha(t,0),Vs(t,i),ii(t,Xt()),n;if(e===6)Vs(t,i);else{if(r=t.current.alternate,!(i&30)&&!bk(r)&&(e=Zh(t,i),e===2&&(s=Fv(t),s!==0&&(i=s,e=dy(t,s))),e===1))throw n=Wu,ha(t,0),Vs(t,i),ii(t,Xt()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(ae(345));case 2:jo(t,Qn,ts);break;case 3:if(Vs(t,i),(i&130023424)===i&&(e=Vx+500-Xt(),10<e)){if(Nh(t,0)!==0)break;if(r=t.suspendedLanes,(r&i)!==i){Gn(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=Wv(jo.bind(null,t,Qn,ts),e);break}jo(t,Qn,ts);break;case 4:if(Vs(t,i),(i&4194240)===i)break;for(e=t.eventTimes,r=-1;0<i;){var o=31-ur(i);s=1<<o,o=e[o],o>r&&(r=o),i&=~s}if(i=r,i=Xt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*wk(i/1960))-i,10<i){t.timeoutHandle=Wv(jo.bind(null,t,Qn,ts),i);break}jo(t,Qn,ts);break;case 5:jo(t,Qn,ts);break;default:throw Error(ae(329))}}}return ii(t,Xt()),t.callbackNode===n?dA.bind(null,t):null}function dy(t,e){var n=yu;return t.current.memoizedState.isDehydrated&&(ha(t,e).flags|=256),t=Zh(t,e),t!==2&&(e=Qn,Qn=n,e!==null&&fy(e)),t}function fy(t){Qn===null?Qn=t:Qn.push.apply(Qn,t)}function bk(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(!pr(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 Vs(t,e){for(e&=~Bx,e&=~kp,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-ur(e),i=1<<n;t[n]=-1,e&=~i}}function Ub(t){if(st&6)throw Error(ae(327));kl();var e=Nh(t,0);if(!(e&1))return ii(t,Xt()),null;var n=Zh(t,e);if(t.tag!==0&&n===2){var i=Fv(t);i!==0&&(e=i,n=dy(t,i))}if(n===1)throw n=Wu,ha(t,0),Vs(t,e),ii(t,Xt()),n;if(n===6)throw Error(ae(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,jo(t,Qn,ts),ii(t,Xt()),null}function Hx(t,e){var n=st;st|=1;try{return t(e)}finally{st=n,st===0&&(lc=Xt()+500,Dp&&Co())}}function Sa(t){Zs!==null&&Zs.tag===0&&!(st&6)&&kl();var e=st;st|=1;var n=Bi.transition,i=gt;try{if(Bi.transition=null,gt=1,t)return t()}finally{gt=i,Bi.transition=n,st=e,!(st&6)&&Co()}}function jx(){di=xl.current,At(xl)}function ha(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,QI(n)),Jt!==null)for(n=Jt.return;n!==null;){var i=n;switch(Sx(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Uh();break;case 3:oc(),At(ti),At(In),Lx();break;case 5:Dx(i);break;case 4:oc();break;case 13:At(kt);break;case 19:At(kt);break;case 10:Cx(i.type._context);break;case 22:case 23:jx()}n=n.return}if(pn=t,Jt=t=co(t.current,null),xn=di=e,an=0,Wu=null,Bx=kp=ba=0,Qn=yu=null,Zo!==null){for(e=0;e<Zo.length;e++)if(n=Zo[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}Zo=null}return t}function fA(t,e){do{var n=Jt;try{if(Tx(),rh.current=Xh,$h){for(var i=Ft.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}$h=!1}if(wa=0,hn=sn=Ft=null,gu=!1,Hu=0,zx.current=null,n===null||n.return===null){an=1,Wu=e,Jt=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=xn,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=Mb(o);if(h!==null){h.flags&=-257,Tb(h,o,a,s,e),h.mode&1&&Eb(s,c,e),e=h,l=c;var v=e.updateQueue;if(v===null){var g=new Set;g.add(l),e.updateQueue=g}else v.add(l);break e}else{if(!(e&1)){Eb(s,c,e),Gx();break e}l=Error(ae(426))}}else if(Dt&&a.mode&1){var m=Mb(o);if(m!==null){!(m.flags&65536)&&(m.flags|=256),Tb(m,o,a,s,e),Ex(ac(l,a));break e}}s=l=ac(l,a),an!==4&&(an=2),yu===null?yu=[s]:yu.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var p=YC(s,l,e);yb(s,p);break e;case 1:a=l;var y=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ao===null||!ao.has(x)))){s.flags|=65536,e&=-e,s.lanes|=e;var w=KC(s,a,e);yb(s,w);break e}}s=s.return}while(s!==null)}mA(n)}catch(S){e=S,Jt===n&&n!==null&&(Jt=n=n.return);continue}break}while(!0)}function hA(){var t=qh.current;return qh.current=Xh,t===null?Xh:t}function Gx(){(an===0||an===3||an===2)&&(an=4),pn===null||!(ba&268435455)&&!(kp&268435455)||Vs(pn,xn)}function Zh(t,e){var n=st;st|=2;var i=hA();(pn!==t||xn!==e)&&(ts=null,ha(t,e));do try{Sk();break}catch(r){fA(t,r)}while(!0);if(Tx(),st=n,qh.current=i,Jt!==null)throw Error(ae(261));return pn=null,xn=0,an}function Sk(){for(;Jt!==null;)pA(Jt)}function Ek(){for(;Jt!==null&&!YN();)pA(Jt)}function pA(t){var e=vA(t.alternate,t,di);t.memoizedProps=t.pendingProps,e===null?mA(t):Jt=e,zx.current=null}function mA(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=vk(n,e),n!==null){n.flags&=32767,Jt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{an=6,Jt=null;return}}else if(n=gk(n,e,di),n!==null){Jt=n;return}if(e=e.sibling,e!==null){Jt=e;return}Jt=e=t}while(e!==null);an===0&&(an=5)}function jo(t,e,n){var i=gt,r=Bi.transition;try{Bi.transition=null,gt=1,Mk(t,e,n,i)}finally{Bi.transition=r,gt=i}return null}function Mk(t,e,n,i){do kl();while(Zs!==null);if(st&6)throw Error(ae(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(ae(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(sI(t,s),t===pn&&(Jt=pn=null,xn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||nf||(nf=!0,yA(Lh,function(){return kl(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Bi.transition,Bi.transition=null;var o=gt;gt=1;var a=st;st|=4,zx.current=null,xk(t,n),cA(n,t),WI(jv),Ih=!!Hv,jv=Hv=null,t.current=n,_k(n),KN(),st=a,gt=o,Bi.transition=s}else t.current=n;if(nf&&(nf=!1,Zs=t,Kh=r),s=t.pendingLanes,s===0&&(ao=null),JN(n.stateNode),ii(t,Xt()),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(Yh)throw Yh=!1,t=cy,cy=null,t;return Kh&1&&t.tag!==0&&kl(),s=t.pendingLanes,s&1?t===uy?xu++:(xu=0,uy=t):xu=0,Co(),null}function kl(){if(Zs!==null){var t=YT(Kh),e=Bi.transition,n=gt;try{if(Bi.transition=null,gt=16>t?16:t,Zs===null)var i=!1;else{if(t=Zs,Zs=null,Kh=0,st&6)throw Error(ae(331));var r=st;for(st|=4,Me=t.current;Me!==null;){var s=Me,o=s.child;if(Me.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Me=c;Me!==null;){var u=Me;switch(u.tag){case 0:case 11:case 15:vu(8,u,s)}var d=u.child;if(d!==null)d.return=u,Me=d;else for(;Me!==null;){u=Me;var f=u.sibling,h=u.return;if(oA(u),u===c){Me=null;break}if(f!==null){f.return=h,Me=f;break}Me=h}}}var v=s.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(g!==null)}}Me=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Me=o;else e:for(;Me!==null;){if(s=Me,s.flags&2048)switch(s.tag){case 0:case 11:case 15:vu(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,Me=p;break e}Me=s.return}}var y=t.current;for(Me=y;Me!==null;){o=Me;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,Me=x;else e:for(o=y;Me!==null;){if(a=Me,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ip(9,a)}}catch(S){jt(a,a.return,S)}if(a===o){Me=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,Me=w;break e}Me=a.return}}if(st=r,Co(),Ir&&typeof Ir.onPostCommitFiberRoot=="function")try{Ir.onPostCommitFiberRoot(Tp,t)}catch{}i=!0}return i}finally{gt=n,Bi.transition=e}}return!1}function zb(t,e,n){e=ac(n,e),e=YC(t,e,1),t=oo(t,e,1),e=Gn(),t!==null&&(yd(t,1,e),ii(t,e))}function jt(t,e,n){if(t.tag===3)zb(t,t,n);else for(;e!==null;){if(e.tag===3){zb(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ao===null||!ao.has(i))){t=ac(n,t),t=KC(e,t,1),e=oo(e,t,1),t=Gn(),e!==null&&(yd(e,1,t),ii(e,t));break}}e=e.return}}function Tk(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),e=Gn(),t.pingedLanes|=t.suspendedLanes&n,pn===t&&(xn&n)===n&&(an===4||an===3&&(xn&130023424)===xn&&500>Xt()-Vx?ha(t,0):Bx|=n),ii(t,e)}function gA(t,e){e===0&&(t.mode&1?(e=$d,$d<<=1,!($d&130023424)&&($d=4194304)):e=1);var n=Gn();t=gs(t,e),t!==null&&(yd(t,e,n),ii(t,n))}function Ck(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),gA(t,n)}function Ak(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(ae(314))}i!==null&&i.delete(e),gA(t,n)}var vA;vA=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ti.current)Jn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Jn=!1,mk(t,e,n);Jn=!!(t.flags&131072)}else Jn=!1,Dt&&e.flags&1048576&&wC(e,Vh,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;oh(t,e),t=e.pendingProps;var r=ic(e,In.current);Il(e,n),r=Ix(null,e,i,t,r,n);var s=kx();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,ni(i)?(s=!0,zh(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Rx(e),r.updater=Np,e.stateNode=r,r._reactInternals=e,Qv(e,i,t,n),e=ty(null,e,i,!0,s,n)):(e.tag=0,Dt&&s&&bx(e),Bn(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(oh(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=Pk(i),t=Qi(i,t),r){case 0:e=ey(null,e,i,t,n);break e;case 1:e=Rb(null,e,i,t,n);break e;case 11:e=Cb(null,e,i,t,n);break e;case 14:e=Ab(null,e,i,Qi(i.type,t),n);break e}throw Error(ae(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Qi(i,r),ey(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Qi(i,r),Rb(t,e,i,r,n);case 3:e:{if(eA(e),t===null)throw Error(ae(387));i=e.pendingProps,s=e.memoizedState,r=s.element,CC(t,e),Gh(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=ac(Error(ae(423)),e),e=Pb(t,e,i,n,r);break e}else if(i!==r){r=ac(Error(ae(424)),e),e=Pb(t,e,i,n,r);break e}else for(hi=so(e.stateNode.containerInfo.firstChild),mi=e,Dt=!0,rr=null,n=MC(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rc(),i===r){e=vs(t,e,n);break e}Bn(t,e,i,n)}e=e.child}return e;case 5:return AC(e),t===null&&Yv(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,o=r.children,Gv(i,r)?o=null:s!==null&&Gv(i,s)&&(e.flags|=32),JC(t,e),Bn(t,e,o,n),e.child;case 6:return t===null&&Yv(e),null;case 13:return tA(t,e,n);case 4:return Px(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=sc(e,null,i,n):Bn(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Qi(i,r),Cb(t,e,i,r,n);case 7:return Bn(t,e,e.pendingProps,n),e.child;case 8:return Bn(t,e,e.pendingProps.children,n),e.child;case 12:return Bn(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,St(Hh,i._currentValue),i._currentValue=o,s!==null)if(pr(s.value,o)){if(s.children===r.children&&!ti.current){e=vs(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=us(-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),Kv(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(ae(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Kv(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}Bn(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Il(e,n),r=Vi(r),i=i(r),e.flags|=1,Bn(t,e,i,n),e.child;case 14:return i=e.type,r=Qi(i,e.pendingProps),r=Qi(i.type,r),Ab(t,e,i,r,n);case 15:return ZC(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Qi(i,r),oh(t,e),e.tag=1,ni(i)?(t=!0,zh(e)):t=!1,Il(e,n),qC(e,i,r),Qv(e,i,r,n),ty(null,e,i,!0,t,n);case 19:return nA(t,e,n);case 22:return QC(t,e,n)}throw Error(ae(156,e.tag))};function yA(t,e){return WT(t,e)}function Rk(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 ki(t,e,n,i){return new Rk(t,e,n,i)}function Wx(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Pk(t){if(typeof t=="function")return Wx(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ux)return 11;if(t===dx)return 14}return 2}function co(t,e){var n=t.alternate;return n===null?(n=ki(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: 6,830 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 ch(t,e,n,i,r,s){var o=2;if(i=t,typeof t=="function")Wx(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case cl:return pa(n.children,r,s,e);case cx:o=8,r|=8;break;case bv:return t=ki(12,n,e,r|2),t.elementType=bv,t.lanes=s,t;case Sv:return t=ki(13,n,e,r),t.elementType=Sv,t.lanes=s,t;case Ev:return t=ki(19,n,e,r),t.elementType=Ev,t.lanes=s,t;case AT:return Op(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case TT:o=10;break e;case CT:o=9;break e;case ux:o=11;break e;case dx:o=14;break e;case Us:o=16,i=null;break e}throw Error(ae(130,t==null?t:typeof t,""))}return e=ki(o,n,e,r),e.elementType=t,e.type=i,e.lanes=s,e}function pa(t,e,n,i){return t=ki(7,t,i,e),t.lanes=n,t}function Op(t,e,n,i){return t=ki(22,t,i,e),t.elementType=AT,t.lanes=n,t.stateNode={isHidden:!1},t}function Vm(t,e,n){return t=ki(6,t,null,e),t.lanes=n,t}function Hm(t,e,n){return e=ki(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Dk(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=bm(0),this.expirationTimes=bm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bm(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function $x(t,e,n,i,r,s,o,a,l){return t=new Dk(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=ki(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rx(s),t}function Lk(t,e,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ll,key:i==null?null:""+i,children:t,containerInfo:e,implementation:n}}function xA(t){if(!t)return go;t=t._reactInternals;e:{if(Na(t)!==t||t.tag!==1)throw Error(ae(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(ni(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(ae(171))}if(t.tag===1){var n=t.type;if(ni(n))return xC(t,n,e)}return e}function _A(t,e,n,i,r,s,o,a,l){return t=$x(n,i,!0,t,r,s,o,a,l),t.context=xA(null),n=t.current,i=Gn(),r=lo(n),s=us(i,r),s.callback=e??null,oo(n,s,r),t.current.lanes=r,yd(t,r,i),ii(t,i),t}function Fp(t,e,n,i){var r=e.current,s=Gn(),o=lo(r);return n=xA(n),e.context===null?e.context=n:e.pendingContext=n,e=us(s,o),e.payload={element:t},i=i===void 0?null:i,i!==null&&(e.callback=i),t=oo(r,e,o),t!==null&&(dr(t,r,o,s),ih(t,r,o)),o}function Qh(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 Bb(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Xx(t,e){Bb(t,e),(t=t.alternate)&&Bb(t,e)}function Nk(){return null}var wA=typeof reportError=="function"?reportError:function(t){console.error(t)};function qx(t){this._internalRoot=t}Up.prototype.render=qx.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(ae(409));Fp(t,e,null,null)};Up.prototype.unmount=qx.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Sa(function(){Fp(null,t,null,null)}),e[ms]=null}};function Up(t){this._internalRoot=t}Up.prototype.unstable_scheduleHydration=function(t){if(t){var e=QT();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Bs.length&&e!==0&&e<Bs[n].priority;n++);Bs.splice(n,0,t),n===0&&eC(t)}};function Yx(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function zp(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Vb(){}function Ik(t,e,n,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var c=Qh(o);s.call(c)}}var o=_A(e,i,t,0,null,!1,!1,"",Vb);return t._reactRootContainer=o,t[ms]=o.current,Fu(t.nodeType===8?t.parentNode:t),Sa(),o}for(;r=t.lastChild;)t.removeChild(r);if(typeof i=="function"){var a=i;i=function(){var c=Qh(l);a.call(c)}}var l=$x(t,0,!1,null,null,!1,!1,"",Vb);return t._reactRootContainer=l,t[ms]=l.current,Fu(t.nodeType===8?t.parentNode:t),Sa(function(){Fp(e,l,n,i)}),l}function Bp(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=Qh(o);a.call(l)}}Fp(e,o,t,r)}else o=Ik(n,e,t,r,i);return Qh(o)}KT=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=au(e.pendingLanes);n!==0&&(px(e,n|1),ii(e,Xt()),!(st&6)&&(lc=Xt()+500,Co()))}break;case 13:Sa(function(){var i=gs(t,1);if(i!==null){var r=Gn();dr(i,t,1,r)}}),Xx(t,1)}};mx=function(t){if(t.tag===13){var e=gs(t,134217728);if(e!==null){var n=Gn();dr(e,t,134217728,n)}Xx(t,134217728)}};ZT=function(t){if(t.tag===13){var e=lo(t),n=gs(t,e);if(n!==null){var i=Gn();dr(n,t,e,i)}Xx(t,e)}};QT=function(){return gt};JT=function(t,e){var n=gt;try{return gt=t,e()}finally{gt=n}};Iv=function(t,e,n){switch(e){case"input":if(Cv(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=Pp(i);if(!r)throw Error(ae(90));PT(i),Cv(i,r)}}}break;case"textarea":LT(t,n);break;case"select":e=n.value,e!=null&&Pl(t,!!n.multiple,e,!1)}};zT=Hx;BT=Sa;var kk={usingClientEntryPoint:!1,Events:[_d,hl,Pp,FT,UT,Hx]},Xc={findFiberByHostInstance:Ko,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ok={bundleType:Xc.bundleType,version:Xc.version,rendererPackageName:Xc.rendererPackageName,rendererConfig:Xc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Es.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=jT(t),t===null?null:t.stateNode},findFiberByHostInstance:Xc.findFiberByHostInstance||Nk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rf.isDisabled&&rf.supportsFiber)try{Tp=rf.inject(Ok),Ir=rf}catch{}}wi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kk;wi.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Yx(e))throw Error(ae(200));return Lk(t,e,null,n)};wi.createRoot=function(t,e){if(!Yx(t))throw Error(ae(299));var n=!1,i="",r=wA;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=$x(t,1,!1,null,null,n,!1,i,r),t[ms]=e.current,Fu(t.nodeType===8?t.parentNode:t),new qx(e)};wi.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(ae(188)):(t=Object.keys(t).join(","),Error(ae(268,t)));return t=jT(e),t=t===null?null:t.stateNode,t};wi.flushSync=function(t){return Sa(t)};wi.hydrate=function(t,e,n){if(!zp(e))throw Error(ae(200));return Bp(null,t,e,!0,n)};wi.hydrateRoot=function(t,e,n){if(!Yx(t))throw Error(ae(405));var i=n!=null&&n.hydratedSources||null,r=!1,s="",o=wA;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=_A(e,null,t,1,n??null,r,!1,s,o),t[ms]=e.current,Fu(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 Up(e)};wi.render=function(t,e,n){if(!zp(e))throw Error(ae(200));return Bp(null,t,e,!1,n)};wi.unmountComponentAtNode=function(t){if(!zp(t))throw Error(ae(40));return t._reactRootContainer?(Sa(function(){Bp(null,null,t,!1,function(){t._reactRootContainer=null,t[ms]=null})}),!0):!1};wi.unstable_batchedUpdates=Hx;wi.unstable_renderSubtreeIntoContainer=function(t,e,n,i){if(!zp(n))throw Error(ae(200));if(t==null||t._reactInternals===void 0)throw Error(ae(38));return Bp(t,e,n,!1,i)};wi.version="18.3.1-next-f1338f8080-20240426";function bA(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bA)}catch(t){console.error(t)}}bA(),bT.exports=wi;var bd=bT.exports;const SA=uT(bd);var EA,Hb=bd;EA=Hb.createRoot,Hb.hydrateRoot;const Fk=1,Uk=1e6;let jm=0;function zk(){return jm=(jm+1)%Number.MAX_SAFE_INTEGER,jm.toString()}const Gm=new Map,jb=t=>{if(Gm.has(t))return;const e=setTimeout(()=>{Gm.delete(t),_u({type:"REMOVE_TOAST",toastId:t})},Uk);Gm.set(t,e)},Bk=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,Fk)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?jb(n):t.toasts.forEach(i=>{jb(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},uh=[];let dh={toasts:[]};function _u(t){dh=Bk(dh,t),uh.forEach(e=>{e(dh)})}function Vk({...t}){const e=zk(),n=r=>_u({type:"UPDATE_TOAST",toast:{...r,id:e}}),i=()=>_u({type:"DISMISS_TOAST",toastId:e});return _u({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:r=>{r||i()}}}),{id:e,dismiss:i,update:n}}function Hk(){const[t,e]=b.useState(dh);return b.useEffect(()=>(uh.push(e),()=>{const n=uh.indexOf(e);n>-1&&uh.splice(n,1)}),[t]),{...t,toast:Vk,dismiss:n=>_u({type:"DISMISS_TOAST",toastId:n})}}function dt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function Gb(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function MA(...t){return e=>{let n=!1;const i=t.map(r=>{const s=Gb(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():Gb(t[r],null)}}}}function Yt(...t){return b.useCallback(MA(...t),t)}function jk(t,e){const n=b.createContext(e),i=s=>{const{children:o,...a}=s,l=b.useMemo(()=>a,Object.values(a));return _.jsx(n.Provider,{value:l,children:o})};i.displayName=t+"Provider";function r(s){const o=b.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[i,r]}function Ac(t,e=[]){let n=[];function i(s,o){const a=b.createContext(o),l=n.length;n=[...n,o];const c=d=>{var p;const{scope:f,children:h,...v}=d,g=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,m=b.useMemo(()=>v,Object.values(v));return _.jsx(g.Provider,{value:m,children:h})};c.displayName=s+"Provider";function u(d,f){var g;const h=((g=f==null?void 0:f[t])==null?void 0:g[l])||a,v=b.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const r=()=>{const s=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return r.scopeName=t,[i,Gk(r,...e)]}function Gk(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const o=i.reduce((a,{useScope:l,scopeName:c}
vendor: 9,296 bytes, line 40
40)=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function $u(t){const e=$k(t),n=b.forwardRef((i,r)=>{const{children:s,...o}=i,a=b.Children.toArray(s),l=a.find(qk);if(l){const c=l.props.children,u=a.map(d=>d===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:d);return _.jsx(e,{...o,ref:r,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return _.jsx(e,{...o,ref:r,children:s})});return n.displayName=`${t}.Slot`,n}var Wk=$u("Slot");function $k(t){const e=b.forwardRef((n,i)=>{const{children:r,...s}=n;if(b.isValidElement(r)){const o=Kk(r),a=Yk(s,r.props);return r.type!==b.Fragment&&(a.ref=i?MA(i,o):o),b.cloneElement(r,a)}return b.Children.count(r)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var TA=Symbol("radix.slottable");function Xk(t){const e=({children:n})=>_.jsx(_.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=TA,e}function qk(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===TA}function Yk(t,e){const n={...e};for(const i in e){const r=t[i],s=e[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...a)=>{const l=s(...a);return r(...a),l}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...t,...n}}function Kk(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Zk(t){const e=t+"CollectionProvider",[n,i]=Ac(e),[r,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:m,children:p}=g,y=fe.useRef(null),x=fe.useRef(new Map).current;return _.jsx(r,{scope:m,itemMap:x,collectionRef:y,children:p})};o.displayName=e;const a=t+"CollectionSlot",l=$u(a),c=fe.forwardRef((g,m)=>{const{scope:p,children:y}=g,x=s(a,p),w=Yt(m,x.collectionRef);return _.jsx(l,{ref:w,children:y})});c.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=$u(u),h=fe.forwardRef((g,m)=>{const{scope:p,children:y,...x}=g,w=fe.useRef(null),S=Yt(m,w),T=s(u,p);return fe.useEffect(()=>(T.itemMap.set(w,{ref:w,...x}),()=>void T.itemMap.delete(w))),_.jsx(f,{[d]:"",ref:S,children:y})});h.displayName=u;function v(g){const m=s(t+"CollectionConsumer",g);return fe.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((T,C)=>x.indexOf(T.ref.current)-x.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},v,i]}var Qk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Et=Qk.reduce((t,e)=>{const n=$u(`Primitive.${e}`),i=b.forwardRef((r,s)=>{const{asChild:o,...a}=r,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(l,{...a,ref:s})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function CA(t,e){t&&bd.flushSync(()=>t.dispatchEvent(e))}function yn(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)},[])}function Jk(t,e=globalThis==null?void 0:globalThis.document){const n=yn(t);b.useEffect(()=>{const i=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",i,{capture:!0}),()=>e.removeEventListener("keydown",i,{capture:!0})},[n,e])}var eO="DismissableLayer",hy="dismissableLayer.update",tO="dismissableLayer.pointerDownOutside",nO="dismissableLayer.focusOutside",Wb,AA=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vp=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,c=b.useContext(AA),[u,d]=b.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),v=Yt(e,C=>d(C)),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(m),y=u?g.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=p,S=rO(C=>{const P=C.target,E=[...c.branches].some(M=>M.contains(P));!w||E||(r==null||r(C),o==null||o(C),C.defaultPrevented||a==null||a())},f),T=sO(C=>{const P=C.target;[...c.branches].some(M=>M.contains(P))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},f);return Jk(C=>{y===c.layers.size-1&&(i==null||i(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),b.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Wb=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),$b(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Wb)}},[u,f,n,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),$b())},[u,c]),b.useEffect(()=>{const C=()=>h({});return document.addEventListener(hy,C),()=>document.removeEventListener(hy,C)},[]),_.jsx(Et.div,{...l,ref:v,style:{pointerEvents:x?w?"auto":"none":void 0,...t.style},onFocusCapture:dt(t.onFocusCapture,T.onFocusCapture),onBlurCapture:dt(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:dt(t.onPointerDownCapture,S.onPointerDownCapture)})});Vp.displayName=eO;var iO="DismissableLayerBranch",RA=b.forwardRef((t,e)=>{const n=b.useContext(AA),i=b.useRef(null),r=Yt(e,i);return b.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),_.jsx(Et.div,{...t,ref:r})});RA.displayName=iO;function rO(t,e=globalThis==null?void 0:globalThis.document){const n=yn(t),i=b.useRef(!1),r=b.useRef(()=>{});return b.useEffect(()=>{const s=a=>{if(a.target&&!i.current){let l=function(){PA(tO,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=l,e.addEventListener("click",r.current,{once:!0})):l()}else e.removeEventListener("click",r.current);i.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",r.current)}},[e,n]),{onPointerDownCapture:()=>i.current=!0}}function sO(t,e=globalThis==null?void 0:globalThis.document){const n=yn(t),i=b.useRef(!1);return b.useEffect(()=>{const r=s=>{s.target&&!i.current&&PA(nO,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function $b(){const t=new CustomEvent(hy);document.dispatchEvent(t)}function PA(t,e,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?CA(r,s):r.dispatchEvent(s)}var oO=Vp,aO=RA,zr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},lO="Portal",Kx=b.forwardRef((t,e)=>{var a;const{container:n,...i}=t,[r,s]=b.useState(!1);zr(()=>s(!0),[]);const o=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?SA.createPortal(_.jsx(Et.div,{...i,ref:e}),o):null});Kx.displayName=lO;function cO(t,e){return b.useReducer((n,i)=>e[n][i]??n,t)}var Hr=t=>{const{present:e,children:n}=t,i=uO(e),r=typeof n=="function"?n({present:i.isPresent}):b.Children.only(n),s=Yt(i.ref,dO(r));return typeof n=="function"||i.isPresent?b.cloneElement(r,{ref:s}):null};Hr.displayName="Presence";function uO(t){const[e,n]=b.useState(),i=b.useRef(null),r=b.useRef(t),s=b.useRef("none"),o=t?"mounted":"unmounted",[a,l]=cO(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=sf(i.current);s.current=a==="mounted"?c:"none"},[a]),zr(()=>{const c=i.current,u=r.current;if(u!==t){const f=s.current,h=sf(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,l]),zr(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=h=>{const g=sf(i.current).includes(h.animationName);if(h.target===e&&g&&(l("ANIMATION_END"),!r.current)){const m=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=m)})}},f=h=>{h.target===e&&(s.current=sf(i.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{i.current=c?getComputedStyle(c):null,n(c)},[])}}function sf(t){return(t==null?void 0:t.animationName)||"none"}function dO(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.
40isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var fO=sx[" useInsertionEffect ".trim().toString()]||zr;function DA({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[r,s,o]=hO({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:r;{const u=b.useRef(t!==void 0);b.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${i} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,i])}const c=b.useCallback(u=>{var d;if(a){const f=pO(u)?u(t):u;f!==t&&((d=o.current)==null||d.call(o,f))}else s(u)},[a,t,s,o]);return[l,c]}function hO({defaultProp:t,onChange:e}){const[n,i]=b.useState(t),r=b.useRef(n),s=b.useRef(e);return fO(()=>{s.current=e},[e]),b.useEffect(()=>{var o;r.current!==n&&((o=s.current)==null||o.call(s,n),r.current=n)},[n,r]),[n,i,s]}function pO(t){return typeof t=="function"}var mO=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gO="VisuallyHidden",Hp=b.forwardRef((t,e)=>_.jsx(Et.span,{...t,ref:e,style:{...mO,...t.style}}));Hp.displayName=gO;var vO=Hp,Zx="ToastProvider",[Qx,yO,xO]=Zk("Toast"),[LA,Jee]=Ac("Toast",[xO]),[_O,jp]=LA(Zx),NA=t=>{const{__scopeToast:e,label:n="Notification",duration:i=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:o}=t,[a,l]=b.useState(null),[c,u]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zx}\`. Expected non-empty \`string\`.`),_.jsx(Qx.Provider,{scope:e,children:_.jsx(_O,{scope:e,label:n,duration:i,swipeDirection:r,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>u(h=>h+1),[]),onToastRemove:b.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};NA.displayName=Zx;var IA="ToastViewport",wO=["F8"],py="toast.viewportPause",my="toast.viewportResume",kA=b.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:i=wO,label:r="Notifications ({hotkey})",...s}=t,o=jp(IA,n),a=yO(n),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),f=Yt(e,d,o.onViewportChange),h=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;b.useEffect(()=>{const m=p=>{var x;i.length!==0&&i.every(w=>p[w]||p.code===w)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i]),b.useEffect(()=>{const m=l.current,p=d.current;if(v&&m&&p){const y=()=>{if(!o.isClosePausedRef.current){const T=new CustomEvent(py);p.dispatchEvent(T),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const T=new CustomEvent(my);p.dispatchEvent(T),o.isClosePausedRef.current=!1}},w=T=>{!m.contains(T.relatedTarget)&&x()},S=()=>{m.contains(document.activeElement)||x()};return m.addEventListener("focusin",y),m.addEventListener("focusout",w),m.addEventListener("pointermove",y),m.addEventListener("pointerleave",S),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{m.removeEventListener("focusin",y),m.removeEventListener("focusout",w),m.removeEventListener("pointermove",y),m.removeEventListener("pointerleave",S),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[v,o.isClosePausedRef]);const g=b.useCallback(({tabbingDirection:m})=>{const y=a().map(x=>{const w=x.ref.current,S=[w,...IO(w)];return m==="forwards"?S:S.reverse()});return(m==="forwards"?y.reverse():y).flat()},[a]);return b.useEffect(()=>{const m=d.current;if(m){const p=y=>{var S,T,C;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const P=document.activeElement,E=y.shiftKey;if(y.target===m&&E){(S=c.current)==null||S.focus();return}const k=g({tabbingDirection:E?"backwards":"forwards"}),z=k.findIndex(F=>F===P);Wm(k.slice(z+1))?y.preventDefault():E?(T=c.current)==null||T.focus():(C=u.current)==null||C.focus()}};return m.addEventListener("keydown",p),()=>m.removeEventListener("keydown",p)}},[a,g]),_.jsxs(aO,{ref:l,role:"region","aria-label":r.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&_.jsx(gy,{ref:c,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});Wm(m)}}),_.jsx(Qx.Slot,{scope:n,children:_.jsx(Et.ol,{tabIndex:-1,...s,ref:f})}),v&&_.jsx(gy,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});Wm(m)}})]})});kA.displayName=IA;var OA="ToastFocusProxy",gy=b.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...r}=t,s=jp(OA,n);return _.jsx(Hp,{"aria-hidden":!0,tabIndex:0,...r,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&i()}})});gy.displayName=OA;var Sd="Toast",bO="toast.swipeStart",SO="toast.swipeMove",EO="toast.swipeCancel",MO="toast.swipeEnd",FA=b.forwardRef((t,e)=>{const{forceMount:n,open:i,defaultOpen:r,onOpenChange:s,...o}=t,[a,l]=DA({prop:i,defaultProp:r??!0,onChange:s,caller:Sd});return _.jsx(Hr,{present:n||a,children:_.jsx(AO,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:yn(t.onPause),onResume:yn(t.onResume),onSwipeStart:dt(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:dt(t.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:dt(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:dt(t.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});FA.displayName=Sd;var[TO,CO]=LA(Sd,{onClose(){}}),AO=b.forwardRef((t,e)=>{const{__scopeToast:n,type:i="foreground",duration:r,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=t,g=jp(Sd,n),[m,p]=b.useState(null),y=Yt(e,F=>p(F)),x=b.useRef(null),w=b.useRef(null),S=r||g.duration,T=b.useRef(0),C=b.useRef(S),P=b.useRef(0),{onToastAdd:E,onToastRemove:M}=g,N=yn(()=>{var $;(m==null?void 0:m.contains(document.activeElement))&&(($=g.viewport)==null||$.focus()),o()}),k=b.useCallback(F=>
40{!F||F===1/0||(window.clearTimeout(P.current),T.current=new Date().getTime(),P.current=window.setTimeout(N,F))},[N]);b.useEffect(()=>{const F=g.viewport;if(F){const $=()=>{k(C.current),c==null||c()},H=()=>{const W=new Date().getTime()-T.current;C.current=C.current-W,window.clearTimeout(P.current),l==null||l()};return F.addEventListener(py,H),F.addEventListener(my,$),()=>{F.removeEventListener(py,H),F.removeEventListener(my,$)}}},[g.viewport,S,l,c,k]),b.useEffect(()=>{s&&!g.isClosePausedRef.current&&k(S)},[s,S,g.isClosePausedRef,k]),b.useEffect(()=>(E(),()=>M()),[E,M]);const z=b.useMemo(()=>m?GA(m):null,[m]);return g.viewport?_.jsxs(_.Fragment,{children:[z&&_.jsx(RO,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),_.jsx(TO,{scope:n,onClose:N,children:bd.createPortal(_.jsx(Qx.ItemSlot,{scope:n,children:_.jsx(oO,{asChild:!0,onEscapeKeyDown:dt(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||N(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:_.jsx(Et.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection,...v,ref:y,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:dt(t.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:dt(t.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:dt(t.onPointerMove,F=>{if(!x.current)return;const $=F.clientX-x.current.x,H=F.clientY-x.current.y,W=!!w.current,L=["left","right"].includes(g.swipeDirection),O=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,j=L?O(0,$):0,J=L?0:O(0,H),ne=F.pointerType==="touch"?10:2,pe={x:j,y:J},he={originalEvent:F,delta:pe};W?(w.current=pe,of(SO,d,he,{discrete:!1})):Xb(pe,g.swipeDirection,ne)?(w.current=pe,of(bO,u,he,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs($)>ne||Math.abs(H)>ne)&&(x.current=null)}),onPointerUp:dt(t.onPointerUp,F=>{const $=w.current,H=F.target;if(H.hasPointerCapture(F.pointerId)&&H.releasePointerCapture(F.pointerId),w.current=null,x.current=null,$){const W=F.currentTarget,L={originalEvent:F,delta:$};Xb($,g.swipeDirection,g.swipeThreshold)?of(MO,h,L,{discrete:!0}):of(EO,f,L,{discrete:!0}),W.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),RO=t=>{const{__scopeToast:e,children:n,...i}=t,r=jp(Sd,e),[s,o]=b.useState(!1),[a,l]=b.useState(!1);return LO(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:_.jsx(Kx,{asChild:!0,children:_.jsx(Hp,{...i,children:s&&_.jsxs(_.Fragment,{children:[r.label," ",n]})})})},PO="ToastTitle",UA=b.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t;return _.jsx(Et.div,{...i,ref:e})});UA.displayName=PO;var DO="ToastDescription",zA=b.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t;return _.jsx(Et.div,{...i,ref:e})});zA.displayName=DO;var BA="ToastAction",VA=b.forwardRef((t,e)=>{const{altText:n,...i}=t;return n.trim()?_.jsx(jA,{altText:n,asChild:!0,children:_.jsx(Jx,{...i,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${BA}\`. Expected non-empty \`string\`.`),null)});VA.displayName=BA;var HA="ToastClose",Jx=b.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t,r=CO(HA,n);return _.jsx(jA,{asChild:!0,children:_.jsx(Et.button,{type:"button",...i,ref:e,onClick:dt(t.onClick,r.onClose)})})});Jx.displayName=HA;var jA=b.forwardRef((t,e)=>{const{__scopeToast:n,altText:i,...r}=t;return _.jsx(Et.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...r,ref:e})});function GA(t){const e=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&e.push(i.textContent),NO(i)){const r=i.ariaHidden||i.hidden||i.style.display==="none",s=i.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const o=i.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...GA(i))}}),e}function of(t,e,n,{discrete:i}){const r=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?CA(r,s):r.dispatchEvent(s)}var Xb=(t,e,n=0)=>{const i=Math.abs(t.x),r=Math.abs(t.y),s=i>r;return e==="left"||e==="right"?s&&i>n:!s&&r>n};function LO(t=()=>{}){const e=yn(t);zr(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[e])}function NO(t){return t.nodeType===t.ELEMENT_NODE}function IO(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Wm(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var kO=NA,WA=kA,$A=FA,XA=UA,qA=zA,YA=VA,KA=Jx;function ZA(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=ZA(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function QA(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=ZA(t))&&(i&&(i+=" "),i+=e);return i}const qb=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Yb=QA,e_=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return Yb(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=e,o=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=qb(u)||qb(d);return r[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(v=>{let[g,m]=v;return Array.isArray(m)?m.includes({...s,...a}[g]):{...s,...a}[g]===m})?[...c,d,f]:c},[]);return Yb(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const OO=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JA=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var FO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const UO=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:s,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...FO,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:JA("lucide",r),...a},[...o.map(([c,u])=>b.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const ht=(t,e)=>{const n=b.forwardRef(({className:i,...r},s)=>b.createElement(UO,{ref:s,iconNode:e,className:JA(`lucide-${OO(t)}`,i),...r}));return n.displayName=`${t}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const zO=ht("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const BO=ht("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const VO=ht("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const HO=ht("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const eR=ht("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const jO=ht("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const GO=ht("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const Kb=ht("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const Zb=ht("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const WO=ht("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const $O=ht("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const vy=ht("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const XO=ht("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const tR=ht("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const qO=ht("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const YO=ht("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const Gp=ht("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const KO=ht("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const ZO=ht("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const QO=ht("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const $m=ht("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const JO=ht("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const Jh=ht("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 9,915 bytes, lines 175-210
175y:"oel41y"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const e3=ht("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const t3=ht("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const n3=ht("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const i3=ht("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const t_=ht("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const n_=ht("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const nR=ht("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),i_="-",r3=t=>{const e=o3(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const a=o.split(i_);return a[0]===""&&a.length!==1&&a.shift(),iR(a,e)||s3(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},iR=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?iR(t.slice(1),i):void 0;if(r)return r;if(e.validators.length===0)return;const s=t.join(i_);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Qb=/^\[(.+)\]$/,s3=t=>{if(Qb.test(t)){const e=Qb.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},o3=t=>{const{theme:e,prefix:n}=t,i={nextPart:new Map,validators:[]};return l3(Object.entries(t.classGroups),n).forEach(([s,o])=>{yy(o,i,s,e)}),i},yy=(t,e,n,i)=>{t.forEach(r=>{if(typeof r=="string"){const s=r===""?e:Jb(e,r);s.classGroupId=n;return}if(typeof r=="function"){if(a3(r)){yy(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,o])=>{yy(o,Jb(e,s),n,i)})})},Jb=(t,e)=>{let n=t;return e.split(i_).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},a3=t=>t.isThemeGetter,l3=(t,e)=>e?t.map(([n,i])=>{const r=i.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,r]}):t,c3=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=i.get(s))!==void 0)return r(s,o),o},set(s,o){n.has(s)?n.set(s,o):r(s,o)}}},rR="!",u3=t=>{const{separator:e,experimentalParseClassName:n}=t,i=e.length===1,r=e[0],s=e.length,o=a=>{const l=[];let c=0,u=0,d;for(let m=0;m<a.length;m++){let p=a[m];if(c===0){if(p===r&&(i||a.slice(m,m+s)===e)){l.push(a.slice(u,m)),u=m+s;continue}if(p==="/"){d=m;continue}}p==="["?c++:p==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(rR),v=h?f.substring(1):f,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},d3=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(i=>{i[0]==="["?(e.push(...n.sort(),i),n=[]):n.push(i)}),e.push(...n.sort()),e},f3=t=>({cache:c3(t.cacheSize),parseClassName:u3(t),...r3(t)}),h3=/\s+/,p3=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r}=e,s=[],o=t.trim().split(h3);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let v=!!h,g=i(v?f.substring(0,h):f);if(!g){if(!v){a=c+(a.length>0?" "+a:a);continue}if(g=i(f),!g){a=c+(a.length>0?" "+a:a);continue}v=!1}const m=d3(u).join(":"),p=d?m+rR:m,y=p+g;if(s.includes(y))continue;s.push(y);const x=r(g,v);for(let w=0;w<x.length;++w){const S=x[w];s.push(p+S)}a=c+(a.length>0?" "+a:a)}return a};function m3(){let t=0,e,n,i="";for(;t<arguments.length;)(e=arguments[t++])&&(n=sR(e))&&(i&&(i+=" "),i+=n);return i}const sR=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=sR(t[i]))&&(n&&(n+=" "),n+=e);return n};function g3(t,...e){let n,i,r,s=o;function o(l){const c=e.reduce((u,d)=>d(u),t());return n=f3(c),i=n.cache.get,r=n.cache.set,s=a,a(l)}function a(l){const c=i(l);if(c)return c;const u=p3(l,n);return r(l,u),u}return function(){return s(m3.apply(null,arguments))}}const Tt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},oR=/^\[(?:([a-z-]+):)?(.+)\]$/i,v3=/^\d+\/\d+$/,y3=new Set(["px","full","screen"]),x3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,w3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,b3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xr=t=>Ol(t)||y3.has(t)||v3.test(t),Ts=t=>Rc(t,"length",D3),Ol=t=>!!t&&!Number.isNaN(Number(t)),Xm=t=>Rc(t,"number",Ol),qc=t=>!!t&&Number.isInteger(Number(t)),E3=t=>t.endsWith("%")&&Ol(t.slice(0,-1)),Qe=t=>oR.test(t),Cs=t=>x3.test(t),M3=new Set(["length","size","percentage"]),T3=t=>Rc(t,M3,aR),C3=t=>Rc(t,"position",aR),A3=new Set(["image","url"]),R3=t=>Rc(t,A3,N3),P3=t=>Rc(t,"",L3),Yc=()=>!0,Rc=(t,e,n)=>{const i=oR.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):n(i[2]):!1},D3=t=>_3.test(t)&&!w3.test(t),aR=()=>!1,L3=t=>b3.test(t),N3=t=>S3.test(t),I3=()=>{const t=Tt("colors"),e=Tt("spacing"),n=Tt("blur"),i=Tt("brightness"),r=Tt("borderColor"),s=Tt("borderRadius"),o=Tt("borderSpacing"),a=Tt("borderWidth"),l=Tt("contrast"),c=Tt("grayscale"),u=Tt("hueRotate"),d=Tt("invert"),f=Tt("gap"),h=Tt("gradientColorStops"),v=Tt("gradientColorStopPositions"),g=Tt("inset"),m=Tt("margin"),p=Tt("opacity"),y=Tt("padding"),x=Tt("saturate"),w=Tt("scale"),S=Tt("sepia"),T=Tt("skew"),C=Tt("space"),P=Tt("translate"),E=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",Qe,e],k=()=>[Qe,e],z=()=>["",Xr,Ts],F=()=>["auto",Ol,Qe],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",Qe],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Ol,Qe];return{cacheSize:500,separator:":",theme:{colors:[Yc],spacing:[Xr,Ts],blur:["none","",Cs,Qe],brightness:J(),borderColor:[t],borderRadius:["none","","full",Cs,Qe],borderSpacing:k(),borderWidth:z(),contrast:J(),grayscale:O(),hueRotate:J(),invert:O(),gap:k(),gradientColorStops:[t],gradientColorStopPositions:[E3,Ts],inset:N(),margin:N(),opacity:J(),padding:k(),saturate:J(),scale:J(),sepia:O(),skew:J(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",Qe]}],container:["container"],columns:[{columns:[Cs]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),Qe]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}
vendor: 8,691 bytes, line 210
210],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qc,Qe]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Qe]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",qc,Qe]}],"grid-cols":[{"grid-cols":[Yc]}],"col-start-end":[{col:["auto",{span:["full",qc,Qe]},Qe]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[Yc]}],"row-start-end":[{row:["auto",{span:[qc,Qe]},Qe]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Qe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Qe,e]}],"min-w":[{"min-w":[Qe,e,"min","max","fit"]}],"max-w":[{"max-w":[Qe,e,"none","full","min","max","fit","prose",{screen:[Cs]},Cs]}],h:[{h:[Qe,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Qe,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Qe,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Qe,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Cs,Ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xm]}],"font-family":[{font:[Yc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Qe]}],"line-clamp":[{"line-clamp":["none",Ol,Xm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xr,Qe]}],"list-image":[{"list-image":["none",Qe]}],"list-style-type":[{list:["none","disc","decimal",Qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xr,Ts]}],"underline-offset":[{"underline-offset":["auto",Xr,Qe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),C3]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",T3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},R3]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:H()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Xr,Qe]}],"outline-w":[{outline:[Xr,Ts]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Xr,Ts]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Cs,P3]}],"shadow-color":[{shadow:[Yc]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Cs,Qe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Qe]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",Qe]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",Qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[qc,Qe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Qe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","
210none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Qe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Qe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Xr,Ts,Xm]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},k3=g3(I3);function ot(...t){return k3(QA(t))}const O3=kO,lR=b.forwardRef(({className:t,...e},n)=>_.jsx(WA,{ref:n,className:ot("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));lR.displayName=WA.displayName;const F3=e_("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),cR=b.forwardRef(({className:t,variant:e,...n},i)=>_.jsx($A,{ref:i,className:ot(F3({variant:e}),t),...n}));cR.displayName=$A.displayName;const U3=b.forwardRef(({className:t,...e},n)=>_.jsx(YA,{ref:n,className:ot("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));U3.displayName=YA.displayName;const uR=b.forwardRef(({className:t,...e},n)=>_.jsx(KA,{ref:n,className:ot("absolute right-2 top-2 rounded-md p-1 text-foreground
210/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:_.jsx(n_,{className:"h-4 w-4"})}));uR.displayName=KA.displayName;const dR=b.forwardRef(({className:t,...e},n)=>_.jsx(XA,{ref:n,className:ot("text-sm font-semibold",t),...e}));dR.displayName=XA.displayName;const fR=b.forwardRef(({className:t,...e},n)=>_.jsx(qA,{ref:n,className:ot("text-sm opacity-90",t),...e}));fR.displayName=qA.displayName;function z3(){const{toasts:t}=Hk();return _.jsxs(O3,{children:[t.map(function({id:e,title:n,description:i,action:r,...s}){return _.jsxs(cR,{...s,children:[_.jsxs("div",{className:"grid gap-1",children:[n&&_.jsx(dR,{children:n}),i&&_.jsx(fR,{children:i})]}),r,_.jsx(uR,{})]},e)}),_.jsx(lR,{})]})}var eS=["light","dark"],B3="(prefers-color-scheme: dark)",V3=b.createContext(void 0),H3={setTheme:t=>{},themes:[]},j3=()=>{var t;return(t=b.useContext(V3))!=null?t:H3};b.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:i,enableColorScheme:r,defaultTheme:s,value:o,attrs:a,nonce:l})=>{let c=s==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;
210${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=r?eS.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(v,g=!1,m=!0)=>{let p=o?o[v]:v,y=g?v+"|| ''":`'${p}'`,x="";return r&&m&&!g&&eS.includes(v)&&(x+=`d.style.colorScheme = '${v}';`),n==="class"?g||p?x+=`c.add(${y})`:x+="null":p&&(x+=`d[s](n,${y})`),x},h=t?`!function(){${u}${f(t)}}()`:i?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${B3}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${c?"":"else{"+f(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(s,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var G3=t=>{switch(t){case"success":return X3;case"info":return Y3;case"warning":return q3;case"error":return K3;default:return null}},W3=Array(12).fill(0),$3=({visible:t,className:e})=>fe.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},fe.createElement("div",{className:"sonner-spinner"},W3.map((n,i)=>fe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),X3=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),q3=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Y3=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),K3=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Z3=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},fe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Q3=()=>{let[t,e]=fe.useState(document.hidden);return fe.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},xy=1,J3=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...i}=t,r=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:xy++,s=this.toasts.find(a=>a.id===r),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),s?this.toasts=this.toasts.map(a=>a.id===r?(this.publish({...a,...t,id:r,title:n}),{...a,...t,id:r,dismissible:o,title:n}):a):this.addToast({title:n,...i,dismissible:o,id:r}),r},this.dismiss=t=>
210(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let i=t instanceof Promise?t:t(),r=n!==void 0,s,o=i.then(async l=>{if(s=["resolve",l],fe.isValidElement(l))r=!1,this.create({id:n,type:"default",message:l});else if(tF(l)&&!l.ok){r=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:u})}else if(e.success!==void 0){r=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],e.error!==void 0){r=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||xy++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Zn=new J3,eF=(t,e)=>{let n=(e==null?void 0:e.id)||xy++;return Zn.addToast({title:t,...e,id:n}),n},tF=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",nF=eF,iF=()=>Zn.toasts,rF=()=>Zn.getActiveToasts(),ds=Object.assign(nF,{success:Zn.success,info:Zn.info,warning:Zn.warning,error:Zn.error,custom:Zn.custom,message:Zn.message,promise:Zn.promise,dismiss:Zn.dismiss,loading:Zn.loading},{getHistory:iF,getToasts:rF});function sF(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}sF(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
210left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
210:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
210--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
211`);function af(t){return t.label!==void 0}var oF=3,aF="32px",lF="16px",tS=4e3,cF=356,uF=14,dF=20,fF=200;function Xi(...t){return t.filter(Boolean).join(" ")}function hF(t){let[e,n]=t.split("-"),i=[];return e&&i.push(e),n&&i.push(n),i}var pF=t=>{var e,n,i,r,s,o,a,l,c,u,d;let{invert:f,toast:h,unstyled:v,interacting:g,setHeights:m,visibleToasts:p,heights:y,index:x,toasts:w,expanded:S,removeToast:T,defaultRichColors:C,closeButton:P,style:E,cancelButtonStyle:M,actionButtonStyle:N,className:k="",descriptionClassName:z="",duration:F,position:$,gap:H,loadingIcon:W,expandByDefault:L,classNames:O,icons:j,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:ne}=t,[pe,he]=fe.useState(null),[Ne,K]=fe.useState(null),[Z,be]=fe.useState(!1),[Oe,Ae]=fe.useState(!1),[Xe,Lt]=fe.useState(!1),[I,pt]=fe.useState(!1),[$e,Ue]=fe.useState(!1),[Re,ft]=fe.useState(0),[Ee,qe]=fe.useState(0),Rt=fe.useRef(h.duration||F||tS),Pt=fe.useRef(null),D=fe.useRef(null),A=x===0,G=x+1<=p,Q=h.type,re=h.dismissible!==!1,ee=h.className||"",Ie=h.descriptionClassName||"",de=fe.useMemo(()=>y.findIndex(se=>se.toastId===h.id)||0,[y,h.id]),De=fe.useMemo(()=>{var se;return(se=h.closeButton)!=null?se:P},[h.closeButton,P]),Le=fe.useMemo(()=>h.duration||F||tS,[h.duration,F]),le=fe.useRef(0),ve=fe.useRef(0),Be=fe.useRef(0),Ce=fe.useRef(null),[ye,Ye]=$.split("-"),U=fe.useMemo(()=>y.reduce((se,_e,Ve)=>Ve>=de?se:se+_e.height,0),[y,de]),ce=Q3(),ge=h.invert||f,Se=Q==="loading";ve.current=fe.useMemo(()=>de*H+U,[de,U]),fe.useEffect(()=>{Rt.current=Le},[Le]),fe.useEffect(()=>{be(!0)},[]),fe.useEffect(()=>{let se=D.current;if(se){let _e=se.getBoundingClientRect().height;return qe(_e),m(Ve=>[{toastId:h.id,height:_e,position:h.position},...Ve]),()=>m(Ve=>Ve.filter(Ze=>Ze.toastId!==h.id))}},[m,h.id]),fe.useLayoutEffect(()=>{if(!Z)return;let se=D.current,_e=se.style.height;se.style.height="auto";let Ve=se.getBoundingClientRect().height;se.style.height=_e,qe(Ve),m(Ze=>Ze.find(Wt=>Wt.toastId===h.id)?Ze.map(Wt=>Wt.toastId===h.id?{...Wt,height:Ve}:Wt):[{toastId:h.id,height:Ve,position:h.position},...Ze])},[Z,h.title,h.description,m,h.id]);let oe=fe.useCallback(()=>{Ae(!0),ft(ve.current),m(se=>se.filter(_e=>_e.toastId!==h.id)),setTimeout(()=>{T(h)},fF)},[h,T,m,ve]);fe.useEffect(()=>{if(h.promise&&Q==="loading"||h.duration===1/0||h.type==="loading")return;let se;return S||g||ne&&ce?(()=>{if(Be.current<le.current){let _e=new Date().getTime()-le.current;Rt.current=Rt.current-_e}
211Be.current=new Date().getTime()})():Rt.current!==1/0&&(le.current=new Date().getTime(),se=setTimeout(()=>{var _e;(_e=h.onAutoClose)==null||_e.call(h,h),oe()},Rt.current)),()=>clearTimeout(se)},[S,g,h,Q,ne,ce,oe]),fe.useEffect(()=>{h.delete&&oe()},[oe,h.delete]);function ie(){var se,_e,Ve;return j!=null&&j.loading?fe.createElement("div",{className:Xi(O==null?void 0:O.loader,(se=h==null?void 0:h.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":Q==="loading"},j.loading):W?fe.createElement("div",{className:Xi(O==null?void 0:O.loader,(_e=h==null?void 0:h.classNames)==null?void 0:_e.loader,"sonner-loader"),"data-visible":Q==="loading"},W):fe.createElement($3,{className:Xi(O==null?void 0:O.loader,(Ve=h==null?void 0:h.classNames)==null?void 0:Ve.loader),visible:Q==="loading"})}return fe.createElement("li",{tabIndex:0,ref:D,className:Xi(k,ee,O==null?void 0:O.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,O==null?void 0:O.default,O==null?void 0:O[Q],(n=h==null?void 0:h.classNames)==null?void 0:n[Q]),"data-sonner-toast":"","data-rich-colors":(i=h.richColors)!=null?i:C,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":Z,"data-promise":!!h.promise,"data-swiped":$e,"data-removed":Oe,"data-visible":G,"data-y-position":ye,"data-x-position":Ye,"data-index":x,"data-front":A,"data-swiping":Xe,"data-dismissible":re,"data-type":Q,"data-invert":ge,"data-swipe-out":I,"data-swipe-direction":Ne,"data-expanded":!!(S||L&&Z),style:{"--index":x,"--toasts-before":x,"--z-index":w.length-x,"--offset":`${Oe?Re:ve.current}px`,"--initial-height":L?"auto":`${Ee}px`,...E,...h.style},onDragEnd:()=>{Lt(!1),he(null),Ce.current=null},onPointerDown:se=>{Se||!re||(Pt.current=new Date,ft(ve.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(Lt(!0),Ce.current={x:se.clientX,y:se.clientY}))},onPointerUp:()=>{var se,_e,Ve,Ze;if(I||!re)return;Ce.current=null;let Wt=Number(((se=D.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),nn=Number(((_e=D.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),_r=new Date().getTime()-((Ve=Pt.current)==null?void 0:Ve.getTime()),rn=pe==="x"?Wt:nn,Ei=Math.abs(rn)/_r;if(Math.abs(rn)>=dF||Ei>.11){ft(ve.current),(Ze=h.onDismiss)==null||Ze.call(h,h),K(pe==="x"?Wt>0?"right":"left":nn>0?"down":"up"),oe(),pt(!0),Ue(!1);return}Lt(!1),he(null)},onPointerMove:se=>{var _e,Ve,Ze,Wt;if(!Ce.current||!re||((_e=window.getSelection())==null?void 0:_e.toString().length)>0)return;let nn=se.clientY-Ce.current.y,_r=se.clientX-Ce.current.x,rn=(Ve=t.swipeDirections)!=null?Ve:hF($);!pe&&(Math.abs(_r)>1||Math.abs(nn)>1)&&he(Math.abs(_r)>Math.abs(nn)?"x":"y");let Ei={x:0,y:0};pe==="y"?(rn.includes("top")||rn.includes("bottom"))&&(rn.includes("top")&&nn<0||rn.includes("bottom")&&nn>0)&&(Ei.y=nn):pe==="x"&&(rn.includes("left")||rn.includes("right"))&&(rn.includes("left")&&_r<0||rn.includes("right")&&_r>0)&&(Ei.x=_r),(Math.abs(Ei.x)>0||Math.abs(Ei.y)>0)&&Ue(!0),(Ze=D.current)==null||Ze.style.setProperty("--swipe-amount-x",`${Ei.x}px`),(Wt=D.current)==null||Wt.style.setProperty("--swipe-amount-y",`${Ei.y}px`)}},De&&!h.jsx?fe.createElement("button",{"aria-label":J,"data-disabled":Se,"data-close-button":!0,onClick:Se||!re?()=>{}:()=>{var se;oe(),(se=h.onDismiss)==null||se.call(h,h)},className:Xi(O==null?void 0:O.closeButton,(r=h==null?void 0:h.classNames)==null?void 0:r.closeButton)},(s=j==null?void 0:j.close)!=null?s:Z3):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:fe.createElement(fe.Fragment,null,Q||h.icon||h.promise?fe.createElement("div",{"data-icon":"",className:Xi(O==null?void 0:O.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||ie():null,h.type!=="loading"?h.icon||(j==null?void 0:j[Q])||G3(Q):null):null,fe.createElement("div",{"data-content":"",className:Xi(O==null?void 0:O.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},fe.createElement("div",{"data-title":"",className:Xi(O==null?void 0:O.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?fe.createElement("div",{"data-description":"",className:Xi(z,Ie,O==null?void 0:O.de
vendor: 6,259 bytes, line 211
211scription,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),b.isValidElement(h.cancel)?h.cancel:h.cancel&&af(h.cancel)?fe.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||M,onClick:se=>{var _e,Ve;af(h.cancel)&&re&&((Ve=(_e=h.cancel).onClick)==null||Ve.call(_e,se),oe())},className:Xi(O==null?void 0:O.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,b.isValidElement(h.action)?h.action:h.action&&af(h.action)?fe.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||N,onClick:se=>{var _e,Ve;af(h.action)&&((Ve=(_e=h.action).onClick)==null||Ve.call(_e,se),!se.defaultPrevented&&oe())},className:Xi(O==null?void 0:O.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function nS(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function mF(t,e){let n={};return[t,e].forEach((i,r)=>{let s=r===1,o=s?"--mobile-offset":"--offset",a=s?lF:aF;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof i=="number"||typeof i=="string"?l(i):typeof i=="object"?["top","right","bottom","left"].forEach(c=>{i[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof i[c]=="number"?`${i[c]}px`:i[c]}):l(a)}),n}var gF=b.forwardRef(function(t,e){let{invert:n,position:i="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:h,visibleToasts:v=oF,toastOptions:g,dir:m=nS(),gap:p=uF,loadingIcon:y,icons:x,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:S}=t,[T,C]=fe.useState([]),P=fe.useMemo(()=>Array.from(new Set([i].concat(T.filter(ne=>ne.position).map(ne=>ne.position)))),[T,i]),[E,M]=fe.useState([]),[N,k]=fe.useState(!1),[z,F]=fe.useState(!1),[$,H]=fe.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=fe.useRef(null),L=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=fe.useRef(null),j=fe.useRef(!1),J=fe.useCallback(ne=>{C(pe=>{var he;return(he=pe.find(Ne=>Ne.id===ne.id))!=null&&he.delete||Zn.dismiss(ne.id),pe.filter(({id:Ne})=>Ne!==ne.id)})},[]);return fe.useEffect(()=>Zn.subscribe(ne=>{if(ne.dismiss){C(pe=>pe.map(he=>he.id===ne.id?{...he,delete:!0}:he));return}setTimeout(()=>{SA.flushSync(()=>{C(pe=>{let he=pe.findIndex(Ne=>Ne.id===ne.id);return he!==-1?[...pe.slice(0,he),{...pe[he],...ne},...pe.slice(he+1)]:[ne,...pe]})})})}),[]),fe.useEffect(()=>{if(u!=="system"){H(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:pe})=>{H(pe?"dark":"light")})}catch{ne.addListener(({matches:he})=>{try{H(he?"dark":"light")}catch(Ne){console.error(Ne)}})}},[u]),fe.useEffect(()=>{T.length<=1&&k(!1)},[T]),fe.useEffect(()=>{let ne=pe=>{var he,Ne;r.every(K=>pe[K]||pe.code===K)&&(k(!0),(he=W.current)==null||he.focus()),pe.code==="Escape"&&(document.activeElement===W.current||(Ne=W.current)!=null&&Ne.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[r]),fe.useEffect(()=>{if(W.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,j.current=!1)}},[W.current]),fe.createElement("section",{ref:e,"aria-label":`${w} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((ne,pe)=>{var he;let[Ne,K]=ne.split("-");return T.length?fe.createElement("ol",{key:ne,dir:m==="auto"?nS():m,tabIndex:-1,ref:W,className:a,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":Ne,"data-lifted":N&&T.length>1&&!s,"data-x-position":K,style:{"--front-toast-height":`${((he=E[0])==null?void 0:he.height)||0}px`,"--width":`${cF}px`,"--gap":`${p}px`,...h,...mF(l,c)},onBlur:Z=>{j.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(j.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||j.current||(j.current=!0,O.current=Z.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{z||k(!1)},onDragEnd:()=>k(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},T.filter(Z=>!Z.position&&pe===0||Z.position===ne).map((Z,be)=>{var Oe,Ae;return fe.createElement(pF,{key:Z.id,icons:x,index:be,toast:Z,defaultRichColors:d,duration:(Oe=g==null?void 0:g.duration)!=null?Oe:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Ae=g==null?void 0:g.closeButton)!=null?Ae:o,interacting:z,position:ne,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:J,toasts:T.filter(Xe=>Xe.position==Z.position),heights:E.filter(Xe=>Xe.position==Z.position),setHeights:M,expandByDefault:s,gap:p,loadingIcon:y,expanded:N,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const vF=({...t})=>{const{theme:e="system"}=j3();return _.jsx(gF,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var yF=sx[" useId ".trim().toString()]||(()=>{}),xF=0;function qm(t){const[e,n]=b.useState(yF());return zr(()=>{t||n(i=>i??String(xF++))},[t]),t||(e?`radix-${e}
211`:"")}const _F=["top","right","bottom","left"],vo=Math.min,fi=Math.max,ep=Math.round,lf=Math.floor,yo=t=>({x:t,y:t}),wF={left:"right",right:"left",bottom:"top",top:"bottom"},bF={start:"end",end:"start"};function _y(t,e,n){return fi(t,vo(e,n))}function ys(t,e){return typeof t=="function"?t(e):t}function xs(t){return t.split("-")[0]}function Pc(t){return t.split("-")[1]}function r_(t){return t==="x"?"y":"x"}function s_(t){return t==="y"?"height":"width"}function xo(t){return["top","bottom"].includes(xs(t))?"y":"x"}function o_(t){return r_(xo(t))}function SF(t,e,n){n===void 0&&(n=!1);const i=Pc(t),r=o_(t),s=s_(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=tp(o)),[o,tp(o)]}function EF(t){const e=tp(t);return[wy(t),e,wy(e)]}function wy(t){return t.replace(/start|end/g,e=>bF[e])}function MF(t,e,n){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function TF(t,e,n,i){const r=Pc(t);let s=MF(xs(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(wy)))),s}function tp(t){return t.replace(/left|right|bottom|top/g,e=>wF[e])}function CF(t){return{top:0,right:0,bottom:0,left:0,...t}}function hR(t){return typeof t!="number"?CF(t):{top:t,right:t,bottom:t,left:t}}function np(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 iS(t,e,n){let{reference:i,floating:r}=t;const s=xo(e),o=o_(e),a=s_(o),l=xs(e),c=s==="y",u=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let h;switch(l){case"top":h={x:u,y:i.y-r.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-r.width,y:d};break;default:h={x:i.x,y:i.y}}switch(Pc(e)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}const AF=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:d}=iS(c,i,l),f=i,h={},v=0;for(let g=0;g<a.length;g++){const{name:m,fn:p}=a[g],{x:y,y:x,data:w,reset:S}=await p({x:u,y:d,initialPlacement:i,placement:f,strategy:r,middlewareData:h,rects:c,platform:o,elements:{reference:t,floating:e}});u=y??u,d=x??d,h={...h,[m]:{...h[m],...w}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):S.rects),{x:u,y:d}=iS(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:h}};async function Xu(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:d="floating",altBoundary:f=!1,padding:h=0}=ys(e,t),v=hR(h),m=a[f?d==="floating"?"reference":"floating":d],p=np(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(m)))==null||n?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=np(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(p.top-S.top+v.top)/w.y,bottom:(S.bottom-p.bottom+v.bottom)/w.y,left:(p.left-S.left+v.left)/w.x,right:(S.right-p.right+v.right)/w.x}}const RF=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}=ys(t,e)||{};if(c==null)return{};const d=hR(u),f={x:n,y:i},h=o_(r),v=s_(h),g=await o.getDimensions(c),m=h==="y",p=m?"top":"left",y=m?"bottom":"right",x=m?"clientHeight":"clientWidth",w=s.reference[v]+s.reference[h]-f[h]-s.floating[v],S=f[h]-s.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=T?T[x]:0;(!C||!await(o.isElement==null?void 0:o.isElement(T)))&&(C=a.floating[x]||s.floating[v]);const P=w/2-S/2,E=C/2-g[v]/2-1,M=vo(d[p],E),N=vo(d[y],E),k=M,z=C-g[v]-N,F=C/2-g[v]/2+P,$=_y(k,F,z),H=!l.arrow&&Pc(r)!=null&&F!==$&&s.reference[v]/2-(F<k?M:N)-g[v]/2<0,W=H?F<k?F-k:F-z:0;return{[h]:f[h]+W,data:{[h]:$,centerOffset:F-$-W,...H&&{alignmentOffset:W}},reset:H}}}),PF=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:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...m}=ys(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=xs(r),y=xo(a),x=xs(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(x||!g?[tp(a)]:EF(a)),T=v!=="none";!f&&T&&S.push(...TF(a,g,v,w));const C=[a,...S],P=await Xu(e,m),E=[];let M=((i=s.flip)==null?void 0:i.overflows)||[];if(u&&E.push(P[p]),d){const F=SF(r,o,w);E.push(P[F[0]],P[F[1]])}if(M=[...M,{placement:r,overflows:E}],!E.every(F=>F<=0)){var N,k;const F=(((N=s.flip)==null?void 0:N.index)||0)+1,$=C[F];if($)return{data:{index:F,overflows:M},reset:{placement:$}};let H=(k=M.filter(W=>W.overflows[0]<=0).sort((W,L)=>W.overflows[1]-L.overflows[1])[0])==null?void 0:k.placement;if(!H)switch(h){case"bestFit":{var z;const W=(z=M.filter(L=>{if(T){const O=xo(L.placement);return O===y||O==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(O=>O>0).reduce((O,j)=>O+j,0)]).sort((L,O)=>L[1]-O[1])[0])==null?void 0:z[0];W&&(H=W);break}case"initialPlacement":H=a;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function rS(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function sS(t){return _F.some(e=>t[e]>=0)}const DF=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=ys(t,e);switch(i){case"referenceHidden":{const s=await Xu(e,{...r,elementContext:"reference"}),o=rS(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:sS(o)}}}case"escaped":{const s=await Xu(e,{...r,altBoundary:!0}),o=rS(s,n.floating);return{data:{escapedOffsets:o,escaped:sS(o)}}}default:return{}}}}};async function LF(t,e){const{placement:n,platform:i,elements:r}
vendor: 5,112 bytes, line 211
211=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=xs(n),a=Pc(n),l=xo(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,d=ys(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const NF=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 LF(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}}}}},IF=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:p,y}=m;return{x:p,y}}},...l}=ys(t,e),c={x:n,y:i},u=await Xu(e,l),d=xo(xs(r)),f=r_(d);let h=c[f],v=c[d];if(s){const m=f==="y"?"top":"left",p=f==="y"?"bottom":"right",y=h+u[m],x=h-u[p];h=_y(y,h,x)}if(o){const m=d==="y"?"top":"left",p=d==="y"?"bottom":"right",y=v+u[m],x=v-u[p];v=_y(y,v,x)}const g=a.fn({...e,[f]:h,[d]:v});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[f]:s,[d]:o}}}}}},kF=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ys(t,e),u={x:n,y:i},d=xo(r),f=r_(d);let h=u[f],v=u[d];const g=ys(a,e),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=f==="y"?"height":"width",w=s.reference[f]-s.floating[x]+m.mainAxis,S=s.reference[f]+s.reference[x]-m.mainAxis;h<w?h=w:h>S&&(h=S)}if(c){var p,y;const x=f==="y"?"width":"height",w=["top","left"].includes(xs(r)),S=s.reference[d]-s.floating[x]+(w&&((p=o.offset)==null?void 0:p[d])||0)+(w?0:m.crossAxis),T=s.reference[d]+s.reference[x]+(w?0:((y=o.offset)==null?void 0:y[d])||0)-(w?m.crossAxis:0);v<S?v=S:v>T&&(v=T)}return{[f]:h,[d]:v}}}},OF=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=ys(t,e),u=await Xu(e,c),d=xs(r),f=Pc(r),h=xo(r)==="y",{width:v,height:g}=s.floating;let m,p;d==="top"||d==="bottom"?(m=d,p=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(p=d,m=f==="end"?"top":"bottom");const y=g-u.top-u.bottom,x=v-u.left-u.right,w=vo(g-u[m],y),S=vo(v-u[p],x),T=!e.middlewareData.shift;let C=w,P=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(C=y),T&&!f){const M=fi(u.left,0),N=fi(u.right,0),k=fi(u.top,0),z=fi(u.bottom,0);h?P=v-2*(M!==0||N!==0?M+N:fi(u.left,u.right)):C=g-2*(k!==0||z!==0?k+z:fi(u.top,u.bottom))}await l({...e,availableWidth:P,availableHeight:C});const E=await o.getDimensions(a.floating);return v!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}};function Wp(){return typeof window<"u"}function Dc(t){return pR(t)?(t.nodeName||"").toLowerCase():"#document"}function gi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function jr(t){var e;return(e=(pR(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pR(t){return Wp()?t instanceof Node||t instanceof gi(t).Node:!1}function mr(t){return Wp()?t instanceof Element||t instanceof gi(t).Element:!1}function Br(t){return Wp()?t instanceof HTMLElement||t instanceof gi(t).HTMLElement:!1}function oS(t){return!Wp()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof gi(t).ShadowRoot}function Ed(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=gr(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function FF(t){return["table","td","th"].includes(Dc(t))}function $p(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function a_(t){const e=l_(),n=mr(t)?gr(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function UF(t){let e=_o(t);for(;Br(e)&&!cc(e);){if(a_(e))return e;if($p(e))return null;e=_o(e)}return null}function l_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cc(t){return["html","body","#document"].includes(Dc(t))}function gr(t){return gi(t).getComputedStyle(t)}function Xp(t){return mr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _o(t){if(Dc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||oS(t)&&t.host||jr(t);return oS(e)?e.host:e}function mR(t){const e=_o(t);return cc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Br(e)&&Ed(e)?e:mR(e)}function qu(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=mR(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=gi(r);if(s){const a=by(o);
vendor: 1,666 bytes, line 211
211return e.concat(o,o.visualViewport||[],Ed(r)?r:[],a&&n?qu(a):[])}return e.concat(r,qu(r,[],n))}function by(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function gR(t){const e=gr(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Br(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=ep(n)!==s||ep(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function c_(t){return mr(t)?t:t.contextElement}function Fl(t){const e=c_(t);if(!Br(e))return yo(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=gR(e);let o=(s?ep(n.width):n.width)/i,a=(s?ep(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const zF=yo(0);function vR(t){const e=gi(t);return!l_()||!e.visualViewport?zF:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function BF(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==gi(t)?!1:e}function Ea(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=c_(t);let o=yo(1);e&&(i?mr(i)&&(o=Fl(i)):o=Fl(t));const a=BF(s,n,i)?vR(s):yo(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,d=r.height/o.y;if(s){const f=gi(s),h=i&&mr(i)?gi(i):i;let v=f,g=by(v);for(;g&&i&&h!==v;){const m=Fl(g),p=g.getBoundingClientRect(),y=gr(g),x=p.left+(g.clientLeft+parseFloat(y.paddingLeft))*m.x,w=p.top+(g.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=w,v=gi(g),g=by(v)}}return np({width:u,height:d,x:l,y:c})}function VF(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=jr(i),a=e?$p(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=yo(1);const u=yo(0),d=Br(i);
vendor: 5,212 bytes, line 211
211if((d||!d&&!s)&&((Dc(i)!=="body"||Ed(o))&&(l=Xp(i)),Br(i))){const f=Ea(i);c=Fl(i),u.x=f.x+i.clientLeft,u.y=f.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function HF(t){return Array.from(t.getClientRects())}function Sy(t,e){const n=Xp(t).scrollLeft;return e?e.left+n:Ea(jr(t)).left+n}function jF(t){const e=jr(t),n=Xp(t),i=t.ownerDocument.body,r=fi(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=fi(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Sy(t);const a=-n.scrollTop;return gr(i).direction==="rtl"&&(o+=fi(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function GF(t,e){const n=gi(t),i=jr(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=l_();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function WF(t,e){const n=Ea(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=Br(t)?Fl(t):yo(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 aS(t,e,n){let i;if(e==="viewport")i=GF(t,n);else if(e==="document")i=jF(jr(t));else if(mr(e))i=WF(e,n);else{const r=vR(t);i={...e,x:e.x-r.x,y:e.y-r.y}}return np(i)}function yR(t,e){const n=_o(t);return n===e||!mr(n)||cc(n)?!1:gr(n).position==="fixed"||yR(n,e)}function $F(t,e){const n=e.get(t);if(n)return n;let i=qu(t,[],!1).filter(a=>mr(a)&&Dc(a)!=="body"),r=null;const s=gr(t).position==="fixed";let o=s?_o(t):t;for(;mr(o)&&!cc(o);){const a=gr(o),l=a_(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ed(o)&&!l&&yR(t,o))?i=i.filter(u=>u!==o):r=a,o=_o(o)}return e.set(t,i),i}function XF(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?$p(e)?[]:$F(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const d=aS(e,u,r);return c.top=fi(d.top,c.top),c.right=vo(d.right,c.right),c.bottom=vo(d.bottom,c.bottom),c.left=fi(d.left,c.left),c},aS(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qF(t){const{width:e,height:n}=gR(t);return{width:e,height:n}}function YF(t,e,n){const i=Br(e),r=jr(e),s=n==="fixed",o=Ea(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=yo(0);if(i||!i&&!s)if((Dc(e)!=="body"||Ed(r))&&(a=Xp(e)),i){const h=Ea(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else r&&(l.x=Sy(r));let c=0,u=0;if(r&&!i&&!s){const h=r.getBoundingClientRect();u=h.top+a.scrollTop,c=h.left+a.scrollLeft-Sy(r,h)}const d=o.left+a.scrollLeft-l.x-c,f=o.top+a.scrollTop-l.y-u;return{x:d,y:f,width:o.width,height:o.height}}function Ym(t){return gr(t).position==="static"}function lS(t,e){if(!Br(t)||gr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return jr(t)===n&&(n=n.ownerDocument.body),n}function xR(t,e){const n=gi(t);if($p(t))return n;if(!Br(t)){let r=_o(t);for(;r&&!cc(r);){if(mr(r)&&!Ym(r))return r;r=_o(r)}return n}let i=lS(t,e);for(;i&&FF(i)&&Ym(i);)i=lS(i,e);return i&&cc(i)&&Ym(i)&&!a_(i)?n:i||UF(t)||n}const KF=async function(t){const e=this.getOffsetParent||xR,n=this.getDimensions,i=await n(t.floating);return{reference:YF(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function ZF(t){return gr(t).direction==="rtl"}const QF={convertOffsetParentRelativeRectToViewportRelativeRect:VF,getDocumentElement:jr,getClippingRect:XF,getOffsetParent:xR,getElementRects:KF,getClientRects:HF,getDimensions:qF,getScale:Fl,isElement:mr,isRTL:ZF};function JF(t,e){let n=null,i;const r=jr(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{left:c,top:u,width:d,height:f}=t.getBoundingClientRect();if(a||e(),!d||!f)return;const h=lf(u),v=lf(r.clientWidth-(c+d)),g=lf(r.clientHeight-(u+f)),m=lf(c),y={rootMargin:-h+"px "+-v+"px "+-g+"px "+-m+"px",threshold:fi(0,vo(1,l))||1};let x=!0;function w(S){const T=S[0].intersectionRatio;if(T!==l){if(!x)return o();T?o(!1,T):i=setTimeout(()=>{o(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(t)}return o(!0),s}function eU(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=c_(t),u=r||s?[...c?qu(c):[],...qu(e)]:[];u.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const d=c&&a?JF(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(p=>{let[y]=p;y&&y.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let v,g=l?Ea(t):null;l&&m();function m(){const p=Ea(t);g&&(p.x!==g.x||p.y!==g.y||p.width!==g.width||p.height!==g.height)&&n(),g=p,v=requestAnimationFrame(m)}return n(),()=>{var p;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(p=h)==null||p.disconnect(),h=null,l&&cancelAnimationFrame(v)}}
vendor: 4,380 bytes, line 211
211const tU=NF,nU=IF,iU=PF,rU=OF,sU=DF,cS=RF,oU=kF,aU=(t,e,n)=>{const i=new Map,r={platform:QF,...n},s={...r.platform,_c:i};return AF(t,e,{...r,platform:s})};var fh=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ip(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!ip(t[i],e[i]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&t.$$typeof)&&!ip(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function _R(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function uS(t,e){const n=_R(t);return Math.round(e*n)/n}function Km(t){const e=b.useRef(t);return fh(()=>{e.current=t}),e}function lU(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=b.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(i);ip(f,i)||h(i);const[v,g]=b.useState(null),[m,p]=b.useState(null),y=b.useCallback(L=>{L!==T.current&&(T.current=L,g(L))},[]),x=b.useCallback(L=>{L!==C.current&&(C.current=L,p(L))},[]),w=s||v,S=o||m,T=b.useRef(null),C=b.useRef(null),P=b.useRef(u),E=l!=null,M=Km(l),N=Km(r),k=Km(c),z=b.useCallback(()=>{if(!T.current||!C.current)return;const L={placement:e,strategy:n,middleware:f};N.current&&(L.platform=N.current),aU(T.current,C.current,L).then(O=>{const j={...O,isPositioned:k.current!==!1};F.current&&!ip(P.current,j)&&(P.current=j,bd.flushSync(()=>{d(j)}))})},[f,e,n,N,k]);fh(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const F=b.useRef(!1);fh(()=>(F.current=!0,()=>{F.current=!1}),[]),fh(()=>{if(w&&(T.current=w),S&&(C.current=S),w&&S){if(M.current)return M.current(w,S,z);z()}},[w,S,z,M,E]);const $=b.useMemo(()=>({reference:T,floating:C,setReference:y,setFloating:x}),[y,x]),H=b.useMemo(()=>({reference:w,floating:S}),[w,S]),W=b.useMemo(()=>{const L={position:n,left:0,top:0};if(!H.floating)return L;const O=uS(H.floating,u.x),j=uS(H.floating,u.y);return a?{...L,transform:"translate("+O+"px, "+j+"px)",..._R(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:j}},[n,a,H.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:z,refs:$,elements:H,floatingStyles:W}),[u,z,$,H,W])}const cU=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:r}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?cS({element:i.current,padding:r}).fn(n):{}:i?cS({element:i,padding:r}).fn(n):{}}}},uU=(t,e)=>({...tU(t),options:[t,e]}),dU=(t,e)=>({...nU(t),options:[t,e]}),fU=(t,e)=>({...oU(t),options:[t,e]}),hU=(t,e)=>({...iU(t),options:[t,e]}),pU=(t,e)=>({...rU(t),options:[t,e]}),mU=(t,e)=>({...sU(t),options:[t,e]}),gU=(t,e)=>({...cU(t),options:[t,e]});var vU="Arrow",wR=b.forwardRef((t,e)=>{const{children:n,width:i=10,height:r=5,...s}=t;return _.jsx(Et.svg,{...s,ref:e,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});wR.displayName=vU;var yU=wR;function xU(t){const[e,n]=b.useState(void 0);return zr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}var bR="Popper",[SR,ER]=Ac(bR),[ete,MR]=SR(bR),TR="PopperAnchor",CR=b.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...r}=t,s=MR(TR,n),o=b.useRef(null),a=Yt(e,o);return b.useEffect(()=>{s.onAnchorChange((i==null?void 0:i.current)||o.current)}),i?null:_.jsx(Et.div,{...r,ref:a})});CR.displayName=TR;var u_="PopperContent",[_U,wU]=SR(u_),AR=b.forwardRef((t,e)=>{var Z,be,Oe,Ae,Xe,Lt;const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l
vendor: 9,902 bytes, line 211
211=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=t,m=MR(u_,n),[p,y]=b.useState(null),x=Yt(e,I=>y(I)),[w,S]=b.useState(null),T=xU(w),C=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,E=i+(s!=="center"?"-"+s:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},N=Array.isArray(c)?c:[c],k=N.length>0,z={padding:M,boundary:N.filter(SU),altBoundary:k},{refs:F,floatingStyles:$,placement:H,isPositioned:W,middlewareData:L}=lU({strategy:"fixed",placement:E,whileElementsMounted:(...I)=>eU(...I,{animationFrame:h==="always"}),elements:{reference:m.anchor},middleware:[uU({mainAxis:r+P,alignmentAxis:o}),l&&dU({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?fU():void 0,...z}),l&&hU({...z}),pU({...z,apply:({elements:I,rects:pt,availableWidth:$e,availableHeight:Ue})=>{const{width:Re,height:ft}=pt.reference,Ee=I.floating.style;Ee.setProperty("--radix-popper-available-width",`${$e}px`),Ee.setProperty("--radix-popper-available-height",`${Ue}px`),Ee.setProperty("--radix-popper-anchor-width",`${Re}px`),Ee.setProperty("--radix-popper-anchor-height",`${ft}px`)}}),w&&gU({element:w,padding:a}),EU({arrowWidth:C,arrowHeight:P}),f&&mU({strategy:"referenceHidden",...z})]}),[O,j]=DR(H),J=yn(v);zr(()=>{W&&(J==null||J())},[W,J]);const ne=(Z=L.arrow)==null?void 0:Z.x,pe=(be=L.arrow)==null?void 0:be.y,he=((Oe=L.arrow)==null?void 0:Oe.centerOffset)!==0,[Ne,K]=b.useState();return zr(()=>{p&&K(window.getComputedStyle(p).zIndex)},[p]),_.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:W?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(Ae=L.transformOrigin)==null?void 0:Ae.x,(Xe=L.transformOrigin)==null?void 0:Xe.y].join(" "),...((Lt=L.hide)==null?void 0:Lt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:_.jsx(_U,{scope:n,placedSide:O,onArrowChange:S,arrowX:ne,arrowY:pe,shouldHideArrow:he,children:_.jsx(Et.div,{"data-side":O,"data-align":j,...g,ref:x,style:{...g.style,animation:W?void 0:"none"}})})})});AR.displayName=u_;var RR="PopperArrow",bU={top:"bottom",right:"left",bottom:"top",left:"right"},PR=b.forwardRef(function(e,n){const{__scopePopper:i,...r}=e,s=wU(RR,i),o=bU[s.placedSide];return _.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:_.jsx(yU,{...r,ref:n,style:{...r.style,display:"block"}})})});PR.displayName=RR;function SU(t){return t!==null}var EU=t=>({name:"transformOrigin",options:t,fn(e){var m,p,y;const{placement:n,rects:i,middlewareData:r}=e,o=((m=r.arrow)==null?void 0:m.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=DR(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((p=r.arrow)==null?void 0:p.x)??0)+a/2,h=(((y=r.arrow)==null?void 0:y.y)??0)+l/2;let v="",g="";return c==="bottom"?(v=o?d:`${f}px`,g=`${-l}px`):c==="top"?(v=o?d:`${f}px`,g=`${i.floating.height+l}px`):c==="right"?(v=`${-l}px`,g=o?d:`${h}px`):c==="left"&&(v=`${i.floating.width+l}px`,g=o?d:`${h}px`),{data:{x:v,y:g}}}});function DR(t){const[e,n="center"]=t.split("-");return[e,n]}var MU=CR,TU=AR,CU=PR,[qp,tte]=Ac("Tooltip",[ER]),d_=ER(),LR="TooltipProvider",AU=700,dS="tooltip.open",[RU,NR]=qp(LR),IR=t=>{const{__scopeTooltip:e,delayDuration:n=AU,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:s}=t,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),_.jsx(RU,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:r,children:s})};IR.displayName=LR;var kR="Tooltip",[nte,Yp]=qp(kR),Ey="TooltipTrigger",PU=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=Yp(Ey,n),s=NR(Ey,n),o=d_(n),a=b.useRef(null),l=Yt(e,a,r.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),_.jsx(MU,{asChild:!0,...o,children:_.jsx(Et.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:l,onPointerMove:dt(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:dt(t.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:dt(t.onPointerDown,()=>{r.open&&r.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:dt(t.onFocus,()=>{c.current||r.onOpen()}),onBlur:dt(t.onBlur,r.onClose),onClick:dt(t.onClick,r.onClose)})})});PU.displayName=Ey;var DU="TooltipPortal",[ite,LU]=qp(DU,{forceMount:void 0}),uc="TooltipContent",OR=b.forwardRef((t,e)=>{const n=LU(uc,t.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...s}=t,o=Yp(uc,t.__scopeTooltip);return _.jsx(Hr,{present:i||o.open,children:o.disableHoverableContent?_.jsx(FR,{side:r,...s,ref:e}):_.jsx(NU,{side:r,...s,ref:e})})}),NU=b.forwardRef((t,e)=>{const n=Yp(uc,t.__scopeTooltip),i=NR(uc,t.__scopeTooltip),r=b.useRef(null),s=Yt(e,r),[o,a]=b.useState(null),{trigger:l,onClose:c}=n,u=r.current,{onPointerInTransitChange:d}=i,f=b.useCallback(()=>{a(null),d(!1)},[d]),h=b.useCallback((v,g)=>{const m=v.currentTarget,p={x:v.clientX,y:v.clientY},y=UU(p,m.getBoundingClientRect()),x=zU(p,y),w=BU(g.getBoundingClientRect()),S=HU([...x,...w]);a(S),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&u){const v=m=>h(m,u),g=m=>h(m,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",g)}}},[l,u,h,f]),b.useEffect(()=>{if(o){const v=g=>{const m=g.target,p={x:g.clientX,y:g.clientY},y=(l==null?void 0:l.contains(m))||(u==null?void 0:u.contains(m)),x=!VU(p,o);y?f():x&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,o,c,f]),_.jsx(FR,{...t,ref:s})}),[IU,kU]=qp(kR,{isInside:!1}),OU=Xk("TooltipContent"),FR=b.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=t,l=Yp(uc,n),c=d_(n),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(dS,u),()=>document.removeEventListener(dS,u)),[u]),b.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),_.jsx(Vp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:_.jsxs(TU,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[_.jsx(OU,{children:i}),_.jsx(IU,{scope:n,isInside:!0,children:_.jsx(vO,{id:l.contentId,role:"tooltip",children:r||i})})]})})});OR.displayName=uc;var UR="TooltipArrow",FU=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=d_(n);return kU(UR,n).isInside?null:_.jsx(CU,{...r,...i,ref:e})});FU.displayName=UR;function UU(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function zU(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function BU(t){const{top:e,right:n,bottom:i,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:i},{x:r,y:i}]}function VU(t,e){const{x:n,y:i}=t;let r=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,d=l.x,f=l.y;u>i!=f>i&&n<(d-c)*(i-u)/(f-u)+c&&(r=!r)}return r}function HU(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),jU(e)}function jU(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const r=t[i];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const r=t[i];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var GU=IR,zR=OR;const WU=GU,$U=b.forwardRef(({className:t,sideOffset:e=4,...n},i)=>_.jsx(zR,{ref:i,sideOffset:e,className:ot("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
211de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));$U.displayName=zR.displayName;var Kp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Zp=typeof window>"u"||"Deno"in globalThis;function Ji(){}function XU(t,e){return typeof t=="function"?t(e):t}function qU(t){return typeof t=="number"&&t>=0&&t!==1/0}function YU(t,e){return Math.max(t+(e||0)-Date.now(),0)}function My(t,e){return typeof t=="function"?t(e):t}function KU(t,e){return typeof t=="function"?t(e):t}function fS(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=t;if(o){if(i){if(e.queryHash!==f_(o,e.options))return!1}else if(!Ku(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||r&&r!==e.state.fetchStatus||s&&!s(e))}function hS(t,e){const{exact:n,status:i,predicate:r,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Yu(e.options.mutationKey)!==Yu(s))return!1}else if(!Ku(e.options.mutationKey,s))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function f_(t,e){return((e==null?void 0:e.queryKeyHashFn)||Yu)(t)}function Yu(t){return JSON.stringify(t,(e,n)=>Ty(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function Ku(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ku(t[n],e[n])):!1}function BR(t,e){if(t===e)return t;const n=pS(t)&&pS(e);if(n||Ty(t)&&Ty(e)){const i=n?t:Object.keys(t),r=i.length,s=n?e:Object.keys(e),o=s.length,a=n?[]:{},l=new Set(i);let c=0;for(let u=0;u<o;u++){const d=n?u:s[u];(!n&&l.has(d)||n)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,c++):(a[d]=BR(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&c++)}return r===o&&c===r?t:a}return e}function pS(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ty(t){if(!mS(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!mS(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function mS(t){return Object.prototype.toString.call(t)==="[object Object]"}function ZU(t){return new Promise(e=>{setTimeout(e,t)})}function QU(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?BR(t,e):e}function JU(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function ez(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var h_=Symbol();function VR(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===h_?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var aa,Ws,ql,nT,tz=(nT=class extends Kp{constructor(){super();lt(this,aa);lt(this,Ws);lt(this,ql);Ke(this,ql,e=>{if(!Zp&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){te(this,Ws)||this.setEventListener(te(this,ql))}onUnsubscribe(){var e;this.hasListeners()||((e=te(this,Ws))==null||e.call(this),Ke(this,Ws,void 0))}setEventListener(e){var n;Ke(this,ql,e),(n=te(this,Ws))==null||n.call(this),Ke(this,Ws,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){te(this,aa)!==e&&(Ke(this,aa,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof te(this,aa)=="boolean"?te(this,aa):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},aa=new WeakMap,Ws=new WeakMap,ql=new WeakMap,nT),HR=new tz,Yl,$s,Kl,iT,nz=(iT=class extends Kp{constructor(){super();lt(this,Yl,!0);lt(this,$s);lt(this,Kl);Ke(this,Kl,e=>{if(!Zp&&window.addEventListener){const n=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){te(this,$s)||this.setEventListener(te(this,Kl))}onUnsubscribe(){var e;this.hasListeners()||((e=te(this,$s))==null||e.call(this),Ke(this,$s,void 0))}setEventListener(e){var n;Ke(this,Kl,e),(n=te(this,$s))==null||n.call(this),Ke(this,$s,e(this.setOnline.bind(this)))}setOnline(e){te(this,Yl)!==e&&(Ke(this,Yl,e),this.listeners.forEac
vendor: 19,229 bytes, line 211
211h(i=>{i(e)}))}isOnline(){return te(this,Yl)}},Yl=new WeakMap,$s=new WeakMap,Kl=new WeakMap,iT),rp=new nz;function iz(){let t,e;const n=new Promise((r,s)=>{t=r,e=s});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},n.reject=r=>{i({status:"rejected",reason:r}),e(r)},n}function rz(t){return Math.min(1e3*2**t,3e4)}function jR(t){return(t??"online")==="online"?rp.isOnline():!0}var GR=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Zm(t){return t instanceof GR}function WR(t){let e=!1,n=0,i=!1,r;const s=iz(),o=g=>{var m;i||(f(new GR(g)),(m=t.abort)==null||m.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>HR.isFocused()&&(t.networkMode==="always"||rp.isOnline())&&t.canRun(),u=()=>jR(t.networkMode)&&t.canRun(),d=g=>{var m;i||(i=!0,(m=t.onSuccess)==null||m.call(t,g),r==null||r(),s.resolve(g))},f=g=>{var m;i||(i=!0,(m=t.onError)==null||m.call(t,g),r==null||r(),s.reject(g))},h=()=>new Promise(g=>{var m;r=p=>{(i||c())&&g(p)},(m=t.onPause)==null||m.call(t)}).then(()=>{var g;r=void 0,i||(g=t.onContinue)==null||g.call(t)}),v=()=>{if(i)return;let g;const m=n===0?t.initialPromise:void 0;try{g=m??t.fn()}catch(p){g=Promise.reject(p)}Promise.resolve(g).then(d).catch(p=>{var T;if(i)return;const y=t.retry??(Zp?0:3),x=t.retryDelay??rz,w=typeof x=="function"?x(n,p):x,S=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,p);if(e||!S){f(p);return}n++,(T=t.onFail)==null||T.call(t,n,p),ZU(w).then(()=>c()?void 0:h()).then(()=>{e?f(p):v()})})};return{promise:s,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?v():h().then(v),s)}}var sz=t=>setTimeout(t,0);function oz(){let t=[],e=0,n=a=>{a()},i=a=>{a()},r=sz;const s=a=>{e?t.push(a):r(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&r(()=>{i(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{i=a},setScheduler:a=>{r=a}}}var Hn=oz(),la,rT,$R=(rT=class{constructor(){lt(this,la)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qU(this.gcTime)&&Ke(this,la,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Zp?1/0:5*60*1e3))}clearGcTimeout(){te(this,la)&&(clearTimeout(te(this,la)),Ke(this,la,void 0))}},la=new WeakMap,rT),Zl,ca,Di,ua,Tn,md,da,tr,Jr,sT,az=(sT=class extends $R{constructor(e){super();lt(this,tr);lt(this,Zl);lt(this,ca);lt(this,Di);lt(this,ua);lt(this,Tn);lt(this,md);lt(this,da);Ke(this,da,!1),Ke(this,md,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ke(this,ua,e.client),Ke(this,Di,te(this,ua).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ke(this,Zl,cz(this.options)),this.state=e.state??te(this,Zl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=te(this,Tn))==null?void 0:e.promise}setOptions(e){this.options={...te(this,md),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&te(this,Di).remove(this)}setData(e,n){const i=QU(this.state.data,e,this.options);return wn(this,tr,Jr).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(e,n){wn(this,tr,Jr).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var i,r;const n=(i=te(this,Tn))==null?void 0:i.promise;return(r=te(this,Tn))==null||r.cancel(e),n?n.then(Ji).catch(Ji):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(te(this,Zl))}isActive(){return this.observers.some(e=>KU(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===h_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>My(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!YU(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=te(this,Tn))==null||n.continue()}onOnline(){var n;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=te(this,Tn))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),te(this,Di).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(te(this,Tn)&&(te(this,da)?te(this,Tn).cancel({revert:!0}):te(this,Tn).cancelRetry()),this.scheduleGc()),te(this,Di).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||wn(this,tr,Jr).call(this,{type:"invalidate"})}fetch(e,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(te(this,Tn))return te(this,Tn).continueRetry(),te(this,Tn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const i=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Ke(this,da,!0),i.signal)})},s=()=>{const f=VR(this.options,n),v=(()=>{const g={client:te(this,ua),queryKey:this.queryKey,meta:this.meta};return r(g),g})();return Ke(this,da,!1),this.options.persister?this.options.persister(f,v,this):f(v)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:te(this,ua),state:this.state,fetchFn:s};return r(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),Ke(this,ca,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&wn(this,tr,Jr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,v,g,m;Zm(f)&&f.silent||wn(this,tr,Jr).call(this,{type:"error",error:f}),Zm(f)||((v=(h=te(this,Di).config).onError)==null||v.call(h,f,this),(m=(g=te(this,Di).config).onSettled)==null||m.call(g,this.state.data,f,this)),this.scheduleGc()};return Ke(this,Tn,WR({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:i.abort.bind(i),onSuccess:f=>{var h,v,g,m;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(p){l(p);return}(v=(h=te(this,Di).config).onSuccess)==null||v.call(h,f,this),(m=(g=te(this,Di).config).onSettled)==null||m.call(g,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{wn(this,tr,Jr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{wn(this,tr,Jr).call(this,{type:"pause"})},onContinue:()=>{wn(this,tr,Jr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),te(this,Tn).start()}},Zl=new WeakMap,ca=new WeakMap,Di=new WeakMap,ua=new WeakMap,Tn=new WeakMap,md=new WeakMap,da=new WeakMap,tr=new WeakSet,Jr=function(e){const n=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...lz(i.data,this.options),fetchMeta:e.meta??null};case"success":return Ke(this,ca,void 0),{...i,data:e.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Zm(r)&&r.revert&&te(this,ca)?{...te(this,ca),fetchStatus:"idle"}:{...i,error:r,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=n(this.state),Hn.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),te(this,Di).notify({query:this,type:"updated",action:e})})},sT);function lz(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jR(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function cz(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Er,oT,uz=(oT=class extends Kp{constructor(e={}){super();lt(this,Er);this.config=e,Ke(this,Er,new Map)}build(e,n,i){const r=n.queryKey,s=n.queryHash??f_(r,n);let o=this.get(s);return o||(o=new az({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){te(this,Er).has(e.queryHash)||(te(this,Er).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=te(this,Er).get(e.queryHash);n&&(e.destroy(),n===e&&te(this,Er).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Hn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return te(this,Er).get(e)}getAll(){return[...te(this,Er).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(i=>fS(n,i))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(i=>fS(e,i)):n}notify(e){Hn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Hn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Hn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Er=new WeakMap,oT),Mr,zn,fa,Tr,Is,aT,dz=(aT=class extends $R{constructor(e){super();lt(this,Tr);lt(this,Mr);lt(this,zn);lt(this,fa);this.mutationId=e.mutationId,Ke(this,zn,e.mutationCache),Ke(this,Mr,[]),this.state=e.state||fz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){te(this,Mr).includes(e)||(te(this,Mr).push(e),this.clearGcTimeout(),te(this,zn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ke(this,Mr,te(this,Mr).filter(n=>n!==e)),this.scheduleGc(),te(this,zn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){te(this,Mr).length||(this.state.status==="pending"?this.scheduleGc():te(this,zn).remove(this))}continue(){var e;return((e=te(this,fa))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,o,a,l,c,u,d,f,h,v,g,m,p,y,x,w,S,T,C,P;const n=()=>{wn(this,Tr,Is).call(this,{type:"continue"})};Ke(this,fa,WR({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(E,M)=>{wn(this,Tr,Is).call(this,{type:"failed",failureCount:E,error:M})},onPause:()=>{wn(this,Tr,Is).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>te(this,zn).canRun(this)}));const i=this.state.status==="pending",r=!te(this,fa).canStart();try{if(i)n();else{wn(this,Tr,Is).call(this,{type:"pending",variables:e,isPaused:r}),await((o=(s=te(this,zn).config).onMutate)==null?void 0:o.call(s,e,this));const M=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));M!==this.state.context&&wn(this,Tr,Is).call(this,{type:"pending",context:M,variables:e,isPaused:r})}const E=await te(this,fa).start();return await((u=(c=te(this,zn).config).onSuccess)==null?void 0:u.call(c,E,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,E,e,this.state.context)),await((v=(h=te(this,zn).config).onSettled)==null?void 0:v.call(h,E,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,E,null,e,this.state.context)),wn(this,Tr,Is).call(this,{type:"success",data:E}),E}catch(E){try{throw await((y=(p=te(this,zn).config).onError)==null?void 0:y.call(p,E,e,this.state.context,this)),await((w=(x=this.options).onError)==null?void 0:w.call(x,E,e,this.state.context)),await((T=(S=te(this,zn).config).onSettled)==null?void 0:T.call(S,void 0,E,this.state.variables,this.state.context,this)),await((P=(C=this.options).onSettled)==null?void 0:P.call(C,void 0,E,e,this.state.context)),E}finally{wn(this,Tr,Is).call(this,{type:"error",error:E})}}finally{te(this,zn).runNext(this)}}},Mr=new WeakMap,zn=new WeakMap,fa=new WeakMap,Tr=new WeakSet,Is=function(e){const n=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Hn.batch(()=>{te(this,Mr).forEach(i=>{i.onMutationUpdate(e)}),te(this,zn).notify({mutation:this,type:"updated",action:e})})},aT);function fz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var is,nr,gd,lT,hz=(lT=class extends Kp{constructor(e={}){super();lt(this,is);lt(this,nr);lt(this,gd);this.config=e,Ke(this,is,new Set),Ke(this,nr,new Map),Ke(this,gd,0)}build(e,n,i){const r=new dz({mutationCache:this,mutationId:++Bd(this,gd)._,options:e.defaultMutationOptions(n),state:i});return this.add(r),r}add(e){te(this,is).add(e);const n=cf(e);if(typeof n=="string"){const i=te(this,nr).get(n);i?i.push(e):te(this,nr).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(te(this,is).delete(e)){const n=cf(e);if(typeof n=="string"){const i=te(this,nr).get(n);if(i)if(i.length>1){const r=i.indexOf(e);r!==-1&&i.splice(r,1)}else i[0]===e&&te(this,nr).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=cf(e);if(typeof n=="string"){const i=te(this,nr).get(n),r=i==null?void 0:i.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){var i;const n=cf(e);if(typeof n=="string"){const r=(i=te(this,nr).get(n))==null?void 0:i.find(s=>s!==e&&s.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Hn.batch(()=>{te(this,is).forEach(e=>{this.notify({type:"removed",mutation:e})}),te(this,is).clear(),te(this,nr).clear()})}getAll(){return Array.from(te(this,is))}find(e){const n={exact:!0,...e};return this.getAll().find(i=>hS(n,i))}findAll(e={}){return this.getAll().filter(n=>hS(e,n))}notify(e){Hn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Hn.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ji))))}},is=new WeakMap,nr=new WeakMap,gd=new WeakMap,lT);function cf(t){var e;return(e=t.options.scope)==null?void 0:e.id}function gS(t){return{onFetch:(e,n)=>{var u,d,f,h,v;const i=e.options,r=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=e.state.data)==null?void 0:h.pages)||[],o=((v=e.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const m=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?g=!0:e.signal.addEventListener("abort",()=>{g=!0}),e.signal)})},p=VR(e.options,e.fetchOptions),y=async(x,w,S)=>{if(g)return Promise.reject();if(w==null&&x.pages.length)return Promise.resolve(x);const C=(()=>{const N={client:e.client,queryKey:e.queryKey,pageParam:w,direction:S?"backward":"forward",meta:e.options.meta};return m(N),N})(),P=await p(C),{maxPages:E}=e.options,M=S?ez:JU;return{pages:M(x.pages,P,E),pageParams:M(x.pageParams,w,E)}};if(r&&s.length){const x=r==="backward",w=x?pz:vS,S={pages:s,pageParams:o},T=w(i,S);a=await y(S,T,x)}else{const x=t??s.length;do{const w=l===0?o[0]??i.initialPageParam:vS(i,a);if(l>0&&w==null)break;a=await y(a,w),l++}while(l<x)}return a};e.options.persister?e.fetchFn=()=>{var g,m;return(m=(g=e.options).persister)==null?void 0:m.call(g,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function vS(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function pz(t,{pages:e,pageParams:n}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,n[0],n):void 0}var Vt,Xs,qs,Ql,Jl,Ys,ec,tc,cT,mz=(cT=class{constructor(t={}){lt(this,Vt);lt(this,Xs);lt(this,qs);lt(this,Ql);lt(this,Jl);lt(this,Ys);lt(this,ec);lt(this,tc);Ke(this,Vt,t.queryCache||new uz),Ke(this,Xs,t.mutationCache||new hz),Ke(this,qs,t.defaultOptions||{}),Ke(this,Ql,new Map),Ke(this,Jl,new Map),Ke(this,Ys,0)}mount(){Bd(this,Ys)._++,te(this,Ys)===1&&(Ke(this,ec,HR.subscribe(async t=>{t&&(await this.resumePausedMutations(),te(this,Vt).onFocus())})),Ke(this,tc,rp.subscribe(async t=>{t&&(await this.resumePausedMutations(),te(this,Vt).onOnline())})))}unmount(){var t,e;Bd(this,Ys)._--,te(this,Ys)===0&&((t=te(this,ec))==null||t.call(this),Ke(this,ec,void 0),(e=te(this,tc))==null||e.call(this),Ke(this,tc,void 0))}isFetching(t){return te(this,Vt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return te(this,Xs).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=te(this,Vt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=te(this,Vt).build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(My(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return te(this,Vt).findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),r=te(this,Vt).get(i.queryHash),s=r==null?void 0:r.state.data,o=XU(e,s);if(o!==void 0)return te(this,Vt).build(this,i).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Hn.batch(()=>te(this,Vt).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=te(this,Vt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=te(this,Vt);Hn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=te(this,Vt);return Hn.batch(()=>(n.findAll(t).forEach(i=>
211{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},i=Hn.batch(()=>te(this,Vt).findAll(t).map(r=>r.cancel(n)));return Promise.all(i).then(Ji).catch(Ji)}invalidateQueries(t,e={}){return Hn.batch(()=>(te(this,Vt).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=Hn.batch(()=>te(this,Vt).findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ji)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(Ji)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=te(this,Vt).build(this,e);return n.isStaleByTime(My(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ji).catch(Ji)}fetchInfiniteQuery(t){return t.behavior=gS(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ji).catch(Ji)}ensureInfiniteQueryData(t){return t.behavior=gS(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return rp.isOnline()?te(this,Xs).resumePausedMutations():Promise.resolve()}getQueryCache(){return te(this,Vt)}getMutationCache(){return te(this,Xs)}getDefaultOptions(){return te(this,qs)}setDefaultOptions(t){Ke(this,qs,t)}setQueryDefaults(t,e){te(this,Ql).set(Yu(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...te(this,Ql).values()],n={};return e.forEach(i=>{Ku(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){te(this,Jl).set(Yu(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...te(this,Jl).values()],n={};return e.forEach(i=>{Ku(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...te(this,qs).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=f_(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===h_&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...te(this,qs).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){te(this,Vt).clear(),te(this,Xs).clear()}},Vt=new WeakMap,Xs=new WeakMap,qs=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,Ys=new WeakMap,ec=new WeakMap,tc=new WeakMap,cT),gz=b.createContext(void 0),vz=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),_.jsx(gz.Provider,{value:t,children:e}));/**
212 * @remix-run/router v1.23.0
213 *
214 * Copyright (c) Remix Software Inc.
215 *
216 * This source code is licensed under the MIT license found in the
217 * LICENSE.md file in the root directory of this source tree.
218 *
219 * @license MIT
220 */function Zu(){return Zu=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},Zu.apply(this,arguments)}var Qs;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Qs||(Qs={}));const yS="popstate";function yz(t){t===void 0&&(t={});function e(i,r){let{pathname:s,search:o,hash:a}=i.location;return Cy("",{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:sp(r)}return _z(e,n,null,t)}function tn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function XR(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function xz(){return Math.random().toString(36).substr(2,8)}function xS(t,e){return{usr:t.state,key:t.key,idx:e}}function Cy(t,e,n,i){return n===void 0&&(n=null),Zu({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Lc(e):e,{state:n,key:e&&e.key||i||xz()})}function sp(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 Lc(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 _z(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=Qs.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Zu({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Qs.Pop;let m=u(),p=m==null?null:m-c;c=m,l&&l({action:a,location:g.location,delta:p})}function f(m,p){a=Qs.Push;let y=Cy(g.location,m,p);c=u()+1;let x=xS(y,c),w=g.createHref(y);try{o.pushState(x,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;r.location.assign(w)}s&&l&&l({action:a,location:g.location,delta:1})}function h(m,p){a=Qs.Replace;let y=Cy(g.location,m,p);c=u();let x=xS(y,c),w=g.createHref(y);o.replaceState(x,"",w),s&&l&&l({action:a,location:g.location,delta:0})}function v(m){let p=r.location.origin!=="null"?r.location.origin:r.location.href,y=typeof m=="string"?m:sp(m);return y=y.replace(/ $/,"%20"),tn(p,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,p)}let g={get action(){return a},get location(){return t(r,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(yS,d),l=m,()=>{r.removeEventListener(yS,d),l=null}},createHref(m){return e(r,m)},createURL:v,encodeLocation(m){let p=v(m);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:f,replace:h,go(m){return o.go(m)}};return g}var _S;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(_S||(_S={}));function wz(t,e,n){return n===void 0&&(n="/"),bz(t,e,n,!1)}function bz(t,e,n,i){let r=typeof e=="string"?Lc(e):e,s=p_(r.pathname||"/",n);if(s==null)return null;let o=qR(t);Sz(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Iz(s);a=Lz(o[l],c,i)}return a}function qR(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("/")&&(tn(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not val
220id. 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=uo([i,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(tn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),qR(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:Pz(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 YR(s.path))r(s,o,l)}),e}function YR(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=YR(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 Sz(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:Dz(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Ez=/^:[\w-]+$/,Mz=3,Tz=2,Cz=1,Az=10,Rz=-2,wS=t=>t==="*";function Pz(t,e){let n=t.split("/"),i=n.length;return n.some(wS)&&(i+=Rz),e&&(i+=Tz),n.filter(r=>!wS(r)).reduce((r,s)=>r+(Ez.test(s)?Mz:s===""?Cz:Az),i)}function Dz(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 Lz(t,e,n){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)||"/",d=bS({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&n&&!i[i.length-1].route.index&&(d=bS({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 9,180 bytes, lines 220-229
220Object.assign(r,d.params),o.push({params:r,pathname:uo([s,d.pathname]),pathnameBase:Uz(uo([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=uo([s,d.pathnameBase]))}return o}function bS(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=Nz(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,d)=>{let{paramName:f,isOptional:h}=u;if(f==="*"){let g=a[d]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const v=a[d];return h&&!v?c[f]=void 0:c[f]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function Nz(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),XR(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 Iz(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return XR(!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 p_(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)||"/"}function kz(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?Lc(t):t;return{pathname:n?n.startsWith("/")?n:Oz(n,e):e,search:zz(i),hash:Bz(r)}}function Oz(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 Qm(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 Fz(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function KR(t,e){let n=Fz(t);return e?n.map((i,r)=>r===n.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function ZR(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=Lc(t):(r=Zu({},t),tn(!r.pathname||!r.pathname.includes("?"),Qm("?","pathname","search",r)),tn(!r.pathname||!r.pathname.includes("#"),Qm("#","pathname","hash",r)),tn(!r.search||!r.search.includes("#"),Qm("#","search","hash",r)));let s=t===""||r.pathname==="",o=s?"/":r.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!i&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;r.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=kz(r,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const uo=t=>t.join("/").replace(/\/\/+/g,"/"),Uz=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),zz=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Bz=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Vz(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const QR=["post","put","patch","delete"];new Set(QR);const Hz=["get",...QR];new Set(Hz);/**
221 * React Router v6.30.1
222 *
223 * Copyright (c) Remix Software Inc.
224 *
225 * This source code is licensed under the MIT license found in the
226 * LICENSE.md file in the root directory of this source tree.
227 *
228 * @license MIT
229 */function Qu(){return Qu=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},Qu.apply(this,arguments)}const m_=b.createContext(null),jz=b.createContext(null),Ia=b.createContext(null),Qp=b.createContext(null),ka=b.createContext({outlet:null,matches:[],isDataRoute:!1}),JR=b.createContext(null);function Gz(t,e){let{relative:n}=e===void 0?{}:e;Md()||tn(!1);let{basename:i,navigator:r}=b.useContext(Ia),{hash:s,pathname:o,search:a}=tP(t,{relative:n}),l=o;return i!=="/"&&(l=o==="/"?i:uo([i,o])),r.createHref({pathname:l,search:a,hash:s})}function Md(){return b.useContext(Qp)!=null}function Nc(){return Md()||tn(!1),b.useContext(Qp).location}function eP(t){b.useContext(Ia).static||b.useLayoutEffect(t)}function Wz(){let{isDataRoute:t}=b.useContext(ka);return t?rB():$z()}function $z(){Md()||tn(!1);let t=b.useContext(m_),{basename:e,future:n,navigator:i}=b.useContext(Ia),{matches:r}=b.useContext(ka),{pathname:s}=Nc(),o=JSON.stringify(KR(r,n.v7_relativeSplatPath)),a=b.useRef(!1);return eP(()=>{a.current=!0}),b.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){i.go(c);return}let d=ZR(c,JSON.parse(o),s,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:uo([e,d.pathname])),(u.replace?i.replace:i.push)(d,u.state,u)},[e,i,o,s,t])}function tP(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=b.useContext(Ia),{matches:r}=b.useContext(ka),{pathname:s}=Nc(),o=JSON.stringify(KR(r,i.v7_relativeSplatPath));return b.useMemo(()=>ZR(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function Xz(t,e){return qz(t,e)}function qz(t,e,n,i){Md()||tn(!1);let{navigator:r}=b.useContext(Ia),{matches:s}=b.useContext(ka),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Nc(),u;if(e){var d;let m=typeof e=="string"?Lc(e):e;l==="/"||(d=m.pathname)!=null&&d.startsWith(l)||tn(!1),u=m}else u=c;let f=u.pathname||"/",h=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=wz(t,{pathname:h}),g=Jz(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:uo([l,r.encodeLocation?r.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:uo([l,r.encodeLocation?r.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),s,n,i);return e&&g?b.createElement(Qp.Provider,{value:{location:Qu({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qs.Pop}},g):g}function Yz(){let t=iB(),e=Vz(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)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),n?b.createElement("pre",{style:r},n):null,null)}const Kz=b.createElement(Yz,null);class Zz extends b.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?b.createElement(ka.Provider,{value:this.props.routeContext},b.createElement(JR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Qz(t){let{routeContext:e,match:n,children:i}=t,r=b.useContext(m_);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(ka.Provider,{value:e},i)}function Jz(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(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||tn(!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 d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:h}=n,v=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||v){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,f)=>{let h,v=!1,g=null,m=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||Kz,l&&(c<0&&f===0?(v=!0,m=null):c===f&&(v=!0,m=d.route.hydrateFallbackElement||null)));let p=e.concat(o.slice(0,f+1)),y=()=>{let x;return h?x=g:v?x=m:d.route.Component?x=b.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=u,b.createElement(Qz,{match:d,routeC
229ontext:{outlet:u,matches:p,isDataRoute:n!=null},children:x})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(Zz,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:y(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):y()},null)}var nP=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(nP||{}),op=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}(op||{});function eB(t){let e=b.useContext(m_);return e||tn(!1),e}function tB(t){let e=b.useContext(jz);return e||tn(!1),e}function nB(t){let e=b.useContext(ka);return e||tn(!1),e}function iP(t){let e=nB(),n=e.matches[e.matches.length-1];return n.route.id||tn(!1),n.route.id}function iB(){var t;let e=b.useContext(JR),n=tB(op.UseRouteError),i=iP(op.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function rB(){let{router:t}=eB(nP.UseNavigateStable),e=iP(op.UseNavigateStable),n=b.useRef(!1);return eP(()=>{n.current=!0}),b.useCallback(function(r,s){s===void 0&&(s={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,Qu({fromRouteId:e},s)))},[t,e])}function sB(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function al(t){tn(!1)}function oB(t){let{basename:e="/",children:n=null,location:i,navigationType:r=Qs.Pop,navigator:s,static:o=!1,future:a}=t;Md()&&tn(!1);let l=e.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:s,static:o,future:Qu({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof i=="string"&&(i=Lc(i));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:v="default"}=i,g=b.useMemo(()=>{let m=p_(u,l);return m==null?null:{location:{pathname:m,search:d,hash:f,state:h,key:v},navigationType:r}},[l,u,d,f,h,v,r]);return g==null?null:b.createElement(Ia.Provider,{value:c},b.createElement(Qp.Provider,{children:n,value:g}))}function aB(t){let{children:e,location:n}=t;return Xz(Ay(e),n)}new Promise(()=>{});function Ay(t,e){e===void 0&&(e=[]);let n=[];return b.Children.forEach(t,(i,r)=>{if(!b.isValidElement(i))return;let s=[...e,r];if(i.type===b.Fragment){n.push.apply(n,Ay(i.props.children,s));return}i.type!==al&&tn(!1),!i.props.index||!i.props.children||tn(!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=Ay(i.props.children,s)),n.push(o)}),n}/**
230 * React Router DOM v6.30.1
231 *
232 * Copyright (c) Remix Software Inc.
233 *
234 * This source code is licensed under the MIT license found in the
235 * LICENSE.md file in the root directory of this source tree.
236 *
237 * @license MIT
238 */function Ry(){return Ry=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},Ry.apply(this,arguments)}function lB(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 cB(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function uB(t,e){return t.button===0&&(!e||e==="_self")&&!cB(t)}const dB=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],fB="6";try{window.__reactRouterVersion=fB}catch{}const hB="startTransition",SS=sx[hB];function pB(t){let{basename:e,children:n,future:i,window:r}=t,s=b.useRef();s.current==null&&(s.current=yz({window:r,v5Compat:!0}));let o=s.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},u=b.useCallback(d=>{c&&SS?SS(()=>l(d)):l(d)},[l,c]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>sB(i),[i]),b.createElement(oB,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:i})}const mB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jo=b.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,f=lB(e,dB),{basename:h}=b.useContext(Ia),v,g=!1;if(typeof c=="string"&&gB.test(c)&&(v=c,mB))try{let x=new URL(window.location.href),w=c.startsWith("//")?new URL(x.protocol+c):new URL(c),S=p_(w.pathname,h);w.origin===x.origin&&S!=null?c=S+w.search+w.hash:g=!0}catch{}let m=Gz(c,{relative:r}),p=vB(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:r,viewTransition:d});function y(x){i&&i(x),x.defaultPrevented||p(x)}return b.createElement("a",Ry({},f,{href:v||m,onClick:g||s?i:y,ref:n,target:l}))});var ES;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(ES||(ES={}));var MS;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(MS||(MS={}));function vB(t,e){let{target:n,replace:i,state:r,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=Wz(),c=Nc(),u=tP(t,{relative:o});return b.useCallback(d=>
vendor: 2,649 bytes, line 238
238{if(uB(d,n)){d.preventDefault();let f=i!==void 0?i:sp(c)===sp(u);l(t,{replace:f,state:r,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,u,i,r,n,t,s,o,a])}const rP=b.createContext({});function Td(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const g_=typeof window<"u",Jp=g_?b.useLayoutEffect:b.useEffect,v_=b.createContext(null);function y_(t,e){t.indexOf(e)===-1&&t.push(e)}function x_(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Vr=(t,e,n)=>n>e?e:n<t?t:n;let dc=()=>{};const _s={},sP=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function oP(t){return typeof t=="object"&&t!==null}const aP=t=>/^0[^.\s]+$/u.test(t);function __(t){let e;return()=>(e===void 0&&(e=t()),e)}const ri=t=>t,yB=(t,e)=>n=>e(t(n)),Cd=(...t)=>t.reduce(yB),fc=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class w_{constructor(){this.subscriptions=[]}add(e){return y_(this.subscriptions,e),()=>x_(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 Or=t=>t*1e3,Oi=t=>t/1e3;function b_(t,e){return e?t*(1e3/e):0}const lP=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,xB=1e-7,_B=12;function wB(t,e,n,i,r){let s,o,a=0;do o=e+(n-e)/2,s=lP(o,i,r)-t,s>0?n=o:e=o;while(Math.abs(s)>xB&&++a<_B);return o}function Ad(t,e,n,i){if(t===e&&n===i)return ri;const r=s=>wB(s,0,1,t,n);return s=>s===0||s===1?s:lP(r(s),e,i)}const cP=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,uP=t=>e=>1-t(1-e),dP=Ad(.33,1.53,.69,.99),S_=uP(dP),fP=cP(S_),hP=t=>(t*=2)<1?.5*S_(t):.5*(2-Math.pow(2,-10*(t-1))),E_=t=>1-Math.sin(Math.acos(t)),pP=uP(E_),mP=cP(E_),bB=Ad(.42,0,1,1),SB=Ad(0,0,.58,1),gP=Ad(.42,0,.58,1),EB=t=>Array.isArray(t)&&typeof t[0]!="number",vP=t=>Array.isArray(t)&&typeof t[0]=="number",TS={linear:ri,easeIn:bB,easeInOut:gP,easeOut:SB,circIn:E_,circInOut:mP,circOut:pP,backIn:S_,backInOut:fP,backOut:dP,anticipate:hP},MB=t=>typeof t=="string",CS=t=>{if(vP(t)){dc(t.length===4);const[e,n,i,r]=t;return Ad(e,n,i,r)}else if(MB(t))return dc(TS[t]!==void 0),TS[t];return t},uf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],AS={value:null,addProjectionMetrics:null};function TB(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(d){o.has(d)&&(u.schedule(d),t()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const g=h&&r?n:i;return f&&o.add(d),g.has(d)||g.add(d),d},cancel:d=>{i.delete(d),o.delete(d)},process:d=>{if(a=d,r){s=!0;return}
vendor: 4,902 bytes, line 238
238r=!0,[n,i]=[i,n],n.forEach(c),e&&AS.value&&AS.value.frameloop[e].push(l),l=0,n.clear(),r=!1,s&&(s=!1,u.process(d))}};return u}const CB=40;function yP(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=uf.reduce((x,w)=>(x[w]=TB(s,e?w:void 0),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:v}=o,g=()=>{const x=_s.useManualTiming?r.timestamp:performance.now();n=!1,_s.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(x-r.timestamp,CB),1)),r.timestamp=x,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),h.process(r),v.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(g))},m=()=>{n=!0,i=!0,r.isProcessing||t(g)};return{schedule:uf.reduce((x,w)=>{const S=o[w];return x[w]=(T,C=!1,P=!1)=>(n||m(),S.schedule(T,C,P)),x},{}),cancel:x=>{for(let w=0;w<uf.length;w++)o[uf[w]].cancel(x)},state:r,steps:o}}const{schedule:mt,cancel:vr,state:fn,steps:Jm}=yP(typeof requestAnimationFrame<"u"?requestAnimationFrame:ri,!0);let hh;function AB(){hh=void 0}const ei={now:()=>(hh===void 0&&ei.set(fn.isProcessing||_s.useManualTiming?fn.timestamp:performance.now()),hh),set:t=>{hh=t,queueMicrotask(AB)}},xP=t=>e=>typeof e=="string"&&e.startsWith(t),M_=xP("--"),RB=xP("var(--"),T_=t=>RB(t)?PB.test(t.split("/*")[0].trim()):!1,PB=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ic={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ju={...Ic,transform:t=>Vr(0,1,t)},df={...Ic,default:1},wu=t=>Math.round(t*1e5)/1e5,C_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DB(t){return t==null}const LB=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,A_=(t,e)=>n=>!!(typeof n=="string"&&LB.test(n)&&n.startsWith(t)||e&&!DB(n)&&Object.prototype.hasOwnProperty.call(n,e)),_P=(t,e,n)=>i=>{if(typeof i!="string")return i;const[r,s,o,a]=i.match(C_);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},NB=t=>Vr(0,255,t),eg={...Ic,transform:t=>Math.round(NB(t))},ea={test:A_("rgb","red"),parse:_P("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+eg.transform(t)+", "+eg.transform(e)+", "+eg.transform(n)+", "+wu(Ju.transform(i))+")"};function IB(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 Py={test:A_("#"),parse:IB,transform:ea.transform},Rd=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ks=Rd("deg"),Fr=Rd("%"),Ge=Rd("px"),kB=Rd("vh"),OB=Rd("vw"),RS={...Fr,parse:t=>Fr.parse(t)/100,transform:t=>Fr.transform(t*100)},_l={test:A_("hsl","hue"),parse:_P("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Fr.transform(wu(e))+", "+Fr.transform(wu(n))+", "+wu(Ju.transform(i))+")"},Zt={test:t=>ea.test(t)||Py.test(t)||_l.test(t),parse:t=>ea.test(t)?ea.parse(t):_l.test(t)?_l.parse(t):Py.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ea.transform(t):_l.transform(t),getAnimatableNone:t=>{const e=Zt.parse(t);return e.alpha=0,Zt.transform(e)}},FB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function UB(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(C_))==null?void 0:e.length)||0)+(((n=t.match(FB))==null?void 0:n.length)||0)>0}const wP="number",bP="color",zB="var",BB="var(",PS="${}",VB=/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 ed(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const a=e.replace(VB,l=>(Zt.test(l)?(i.color.push(s),r.push(bP),n.push(Zt.parse(l))):l.startsWith(BB)?(i.var.push(s),r.push(zB),n.push(l)):(i.number.push(s),r.push(wP),n.push(parseFloat(l))),++s,PS)).split(PS);return{values:n,split:a,indexes:i,types:r}}function SP(t){return ed(t).values}function EP(t){const{split:e,types:n}=ed(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===wP?s+=wu(r[o]):a===bP?s+=Zt.transform(r[o]):s+=r[o]}return s}}const HB=t=>typeof t=="number"?0:Zt.test(t)?Zt.getAnimatableNone(t):t;function jB(t){const e=SP(t);return EP(t)(e.map(HB))}const wo={test:UB,parse:SP,createTransformer:EP,getAnimatableNone:jB};function tg(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 GB({hue:t,saturation:e,lightness:n,alpha:i}
vendor: 15,970 bytes, line 238
238){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=tg(l,a,t+1/3),s=tg(l,a,t),o=tg(l,a,t-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}function ap(t,e){return n=>n>0?e:t}const Ot=(t,e,n)=>t+(e-t)*n,ng=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},WB=[Py,ea,_l],$B=t=>WB.find(e=>e.test(t));function DS(t){const e=$B(t);if(!e)return!1;let n=e.parse(t);return e===_l&&(n=GB(n)),n}const LS=(t,e)=>{const n=DS(t),i=DS(e);if(!n||!i)return ap(t,e);const r={...n};return s=>(r.red=ng(n.red,i.red,s),r.green=ng(n.green,i.green,s),r.blue=ng(n.blue,i.blue,s),r.alpha=Ot(n.alpha,i.alpha,s),ea.transform(r))},Dy=new Set(["none","hidden"]);function XB(t,e){return Dy.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function qB(t,e){return n=>Ot(t,e,n)}function R_(t){return typeof t=="number"?qB:typeof t=="string"?T_(t)?ap:Zt.test(t)?LS:ZB:Array.isArray(t)?MP:typeof t=="object"?Zt.test(t)?LS:YB:ap}function MP(t,e){const n=[...t],i=n.length,r=t.map((s,o)=>R_(s)(s,e[o]));return s=>{for(let o=0;o<i;o++)n[o]=r[o](s);return n}}function YB(t,e){const n={...t,...e},i={};for(const r in n)t[r]!==void 0&&e[r]!==void 0&&(i[r]=R_(t[r])(t[r],e[r]));return r=>{for(const s in i)n[s]=i[s](r);return n}}function KB(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 ZB=(t,e)=>{const n=wo.createTransformer(e),i=ed(t),r=ed(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?Dy.has(t)&&!r.values.length||Dy.has(e)&&!i.values.length?XB(t,e):Cd(MP(KB(i,r),r.values),n):ap(t,e)};function TP(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Ot(t,e,n):R_(t)(t,e)}const QB=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>mt.update(e,n),stop:()=>vr(e),now:()=>fn.isProcessing?fn.timestamp:ei.now()}},CP=(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)})`},lp=2e4;function P_(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<lp;)e+=n,i=t.next(e);return e>=lp?1/0:e}function JB(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(P_(i),lp);return{type:"keyframes",ease:s=>i.next(r*s).value/e,duration:Oi(r)}}const e4=5;function AP(t,e,n){const i=Math.max(e-e4,0);return b_(n-t(i),e-i)}const Ht={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},ig=.001;function t4({duration:t=Ht.duration,bounce:e=Ht.bounce,velocity:n=Ht.velocity,mass:i=Ht.mass}){let r,s,o=1-e;o=Vr(Ht.minDamping,Ht.maxDamping,o),t=Vr(Ht.minDuration,Ht.maxDuration,Oi(t)),o<1?(r=c=>{const u=c*o,d=u*t,f=u-n,h=Ly(c,o),v=Math.exp(-d);return ig-f/h*v},s=c=>{const d=c*o*t,f=d*n+n,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-d),g=Ly(Math.pow(c,2),o);return(-r(c)+ig>0?-1:1)*((f-h)*v)/g}):(r=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-ig+u*d},s=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=i4(r,s,a);if(t=Or(t),isNaN(l))return{stiffness:Ht.stiffness,damping:Ht.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}const n4=12;function i4(t,e,n){let i=n;for(let r=1;r<n4;r++)i=i-t(i)/e(i);return i}function Ly(t,e){return t*Math.sqrt(1-e*e)}const r4=["duration","bounce"],s4=["stiffness","damping","mass"];function NS(t,e){return e.some(n=>t[n]!==void 0)}function o4(t){let e={velocity:Ht.velocity,stiffness:Ht.stiffness,damping:Ht.damping,mass:Ht.mass,isResolvedFromDuration:!1,...t};if(!NS(t,s4)&&NS(t,r4))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*Vr(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Ht.mass,stiffness:r,damping:s}}else{const n=t4(t);e={...e,...n,mass:Ht.mass},e.isResolvedFromDuration=!0}return e}function cp(t=Ht.visualDuration,e=Ht.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:d,velocity:f,isResolvedFromDuration:h}=o4({...n,velocity:-Oi(n.velocity||0)}),v=f||0,g=c/(2*Math.sqrt(l*u)),m=o-s,p=Oi(Math.sqrt(l/u)),y=Math.abs(m)<5;i||(i=y?Ht.restSpeed.granular:Ht.restSpeed.default),r||(r=y?Ht.restDelta.granular:Ht.restDelta.default);let x;if(g<1){const S=Ly(p,g);x=T=>{const C=Math.exp(-g*p*T);return o-C*((v+g*p*m)/S*Math.sin(S*T)+m*Math.cos(S*T))}}else if(g===1)x=S=>o-Math.exp(-p*S)*(m+(v+p*m)*S);else{const S=p*Math.sqrt(g*g-1);x=T=>{const C=Math.exp(-g*p*T),P=Math.min(S*T,300);return o-C*((v+g*p*m)*Math.sinh(P)+S*m*Math.cosh(P))/S}}const w={calculatedDuration:h&&d||null,next:S=>{const T=x(S);if(h)a.done=S>=d;else{let C=S===0?v:0;g<1&&(C=S===0?Or(v):AP(x,S,T));const P=Math.abs(C)<=i,E=Math.abs(o-T)<=r;a.done=P&&E}return a.value=a.done?o:T,a},toString:()=>{const S=Math.min(P_(w),lp),T=CP(C=>w.next(S*C).value,S,30);return S+"ms "+T},toTransition:()=>{}};return w}cp.applyToOptions=t=>{const e=JB(t,100,cp);return t.ease=e.ease,t.duration=Or(e.duration),t.type="keyframes",t};function Ny({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 d=t[0],f={done:!1,value:d},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,v=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let g=n*e;const m=d+g,p=o===void 0?m:o(m);p!==m&&(g=p-d);const y=P=>-g*Math.exp(-P/i),x=P=>p+y(P),w=P=>{const E=y(P),M=x(P);f.done=Math.abs(E)<=c,f.value=f.done?p:M};let S,T;const C=P=>{h(f.value)&&(S=P,T=cp({keyframes:[f.value,v(f.value)],velocity:AP(x,P,f.value),damping:r,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:P=>{let E=!1;return!T&&S===void 0&&(E=!0,w(P),C(P)),S!==void 0&&P>=S?T.next(P-S):(!E&&w(P),f)}}}function a4(t,e,n){const i=[],r=n||_s.mix||TP,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]||ri:e;a=Cd(l,a)}i.push(a)}return i}function D_(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(dc(s===e.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=a4(e,i,r),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=fc(t[d],t[d+1],u);return a[d](f)};return n?u=>c(Vr(t[0],t[s-1],u)):c}function l4(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=fc(0,e,i);t.push(Ot(n,1,r))}}function RP(t){const e=[0];return l4(e,t.length-1),e}function c4(t,e){return t.map(n=>n*e)}function u4(t,e){return t.map(()=>e||gP).splice(0,t.length-1)}function bu({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=EB(i)?i.map(CS):CS(i),s={done:!1,value:e[0]},o=c4(n&&n.length===e.length?n:RP(e),t),a=D_(o,e,{ease:Array.isArray(r)?r:u4(e,r)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const d4=t=>t!==null;function L_(t,{repeat:e,repeatType:n="loop"},i,r=1){const s=t.filter(d4),a=r<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!a||i===void 0?s[a]:i}const f4={decay:Ny,inertia:Ny,tween:bu,keyframes:bu,spring:cp};function PP(t){typeof t.type=="string"&&(t.type=f4[t.type])}class N_{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 h4=t=>t/100;class I_ extends N_{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!==ei.now()&&this.tick(ei.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;PP(e);const{type:n=bu,repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=n||bu;l!==bu&&typeof a[0]!="number"&&(this.mixKeyframes=Cd(h4,TP(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=P_(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:d,repeatType:f,repeatDelay:h,type:v,onUpdate:g,finalKeyframe:m}=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 p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?p<0:p>r;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,w=i;if(d){const P=Math.min(this.currentTime,r)/a;let E=Math.floor(P),M=P%1;!M&&P>=1&&(M=1),M===1&&E--,E=Math.min(E,d+1),!!(E%2)&&(f==="reverse"?(M=1-M,h&&(M-=h/a)):f==="mirror"&&(w=o)),x=Vr(0,1,M)*a}const S=y?{done:!1,value:u[0]}:w.next(x);s&&(S.value=s(S.value));let{done:T}=S;!y&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&v!==Ny&&(S.value=L_(u,this.options,m,this.speed)),g&&g(S.value),C&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return Oi(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Oi(e)}get time(){return Oi(this.currentTime)}set time(e){var n;e=Or(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(ei.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Oi(this.currentTime))}play(){var r,s;if(this.isStopped)return;const{driver:e=QB,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(ei.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 p4(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ta=t=>t*180/Math.PI,Iy=t=>{const e=ta(Math.atan2(t[1],t[0]));return ky(e)},m4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Iy,rotateZ:Iy,skewX:t=>ta(Math.atan(t[1])),skewY:t=>ta(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ky=t=>(t=t%360,t<0&&(t+=360),t),IS=Iy,kS=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),OS=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),g4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kS,scaleY:OS,scale:t=>(kS(t)+OS(t))/2,rotateX:t=>ky(ta(Math.atan2(t[6],t[5]))),rotateY:t=>ky(ta(Math.atan2(-t[2],t[0]))),rotateZ:IS,rotate:IS,skewX:t=>ta(Math.atan(t[4])),skewY:t=>ta(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Oy(t){return t.includes("scale")?1:0}function Fy(t,e){if(!t||t==="none")return Oy(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=g4,r=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=m4,r=a}if(!r)return Oy(e);const s=i[e],o=r[1].split(",").map(y4);return typeof s=="function"?s(o):o[s]}const v4=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fy(n,e)};function y4(t){return parseFloat(t.trim())}const kc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oc=new Set(kc),FS=t=>t===Ic||t===Ge,x4=new Set(["x","y","z"]),_4=kc.filter(t=>!x4.has(t));function w4(t){const e=[];return _4.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const ma={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})=>Fy(e,"x"),y:(t,{transform:e})=>Fy(e,"y")};ma.translateX=ma.x;ma.translateY=ma.y;const ga=new Set;let Uy=!1,zy=!1,By=!1;function DP(){if(zy){const t=Array.from(ga).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const r=w4(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)})}zy=!1,Uy=!1,ga.forEach(t=>t.complete(By)),ga.clear()}function LP(){ga.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(zy=!0)})}function b4(){By=!0,LP(),DP(),By=!1}class k_{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?(ga.add(this),Uy||(Uy=!0,mt.read(LP),mt.resolveKeyframes(DP))):(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])}p4(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ga.delete(this)}cancel(){this.state==="scheduled"&&(ga.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const S4=t=>t.startsWith("--");function E4(t,e,n){S4(e)?t.style.setProperty(e,n):t.style[e]=n}const NP=__(()=>window.ScrollTimeline!==void 0),M4={};function T4(t,e){const n=__(t);return()=>M4[e]??n()}const IP=T4(()=>{try{document.createElement("div").animate({opacity:0}
238,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cu=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,US={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cu([0,.65,.55,1]),circOut:cu([.55,0,1,.45]),backIn:cu([.31,.01,.66,-.59]),backOut:cu([.33,1.53,.69,.99])};function kP(t,e){if(t)return typeof t=="function"?IP()?CP(t,e):"ease-out":vP(t)?cu(t):Array.isArray(t)?t.map(n=>kP(n,e)||US.easeOut):US[t]}function C4(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 d=kP(a,r);Array.isArray(d)&&(u.easing=d);const f={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function OP(t){return typeof t=="function"&&"applyToOptions"in t}function A4({type:t,...e}){return OP(t)&&IP()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class R4 extends N_{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!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,dc(typeof e.type!="string");const c=A4(e);this.animation=C4(n,i,r,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=L_(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):E4(n,i,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(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 e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}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 Oi(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Oi(e)}get time(){return Oi(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Or(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 Number(this.animation.startTime)}set startTime(e){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&&NP()?(this.animation.timeline=e,ri):n(this)}}const FP={anticipate:hP,backInOut:fP,circInOut:mP};function P4(t){return t in FP}function D4(t){typeof t.ease=="string"&&P4(t.ease)&&(t.ease=FP[t.ease])}const zS=10;class L4 extends R4{constructor(e){D4(e),PP(e),super(e),e.startTime&&(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 I_({...o,autoplay:!1}),l=Or(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-zS).value,a.sample(l).value,zS),a.stop()}}const BS=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wo.test(t)||t==="0")&&!t.startsWith("url("));function N4(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 I4(t,e,n,i){const r=t[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=BS(r,e),a=BS(s,e);return!o||!a?!1:N4(t)||(n==="spring"||OP(n))&&i}function Vy(t){t.duration=0,t.type="keyframes"}const k4=new Set(["opacity","clipPath","filter","transform"]),O4=__(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));
238function F4(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 O4()&&n&&k4.has(n)&&(n!=="transform"||!c)&&!l&&!i&&r!=="mirror"&&s!==0&&o!=="inertia"}const U4=40;class z4 extends N_{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,...d}){var v;super(),this.stop=()=>{var g,m;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(m=this.keyframeResolver)==null||m.cancel()},this.createdAt=ei.now();const f={autoplay:e,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||k_;this.keyframeResolver=new h(a,(g,m,p)=>this.onKeyframesResolved(g,m,f,!p),l,c,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,i,r){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=ei.now(),I4(e,s,o,a)||((_s.instantAnimations||!l)&&(u==null||u(L_(e,i,n))),e[0]=e[e.length-1],Vy(i),i.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>U4?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},h=!c&&F4(f)?new L4({...f,element:f.motionValue.owner.current}):new I_(f);h.finished.then(()=>this.notifyFinished()).catch(ri),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}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(),b4()),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()}}const B4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function V4(t){const e=B4.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}function UP(t,e,n=1){const[i,r]=V4(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return sP(o)?parseFloat(o):o}return T_(r)?UP(r,e,n+1):r}function O_(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const zP=new Set(["width","height","top","left","right","bottom",...kc]),H4={test:t=>t==="auto",parse:t=>t},BP=t=>e=>e.test(t),VP=[Ic,Ge,Fr,ks,OB,kB,H4],VS=t=>VP.find(BP(t));function j4(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||aP(t):!0}const G4=new Set(["brightness","contrast","saturate","opacity"]);function W4(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(C_)||[];if(!i)return t;const r=n.replace(i,"");let s=G4.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const $4=/\b([a-z-]*)\(.*?\)/gu,Hy={...wo,getAnimatableNone:t=>{const e=t.match($4);return e?e.map(W4).join(" "):t}},HS={...Ic,transform:Math.round},X4={rotate:ks,rotateX:ks,rotateY:ks,rotateZ:ks,scale:df,scaleX:df,scaleY:df,scaleZ:df,skew:ks,skewX:ks,skewY:ks,distance:Ge,translateX:Ge,translateY:Ge,translateZ:Ge,x:Ge,y:Ge,z:Ge,perspective:Ge,transformPerspective:Ge,opacity:Ju,originX:RS,originY:RS,originZ:Ge},F_={borderWidth:Ge,borderTopWidth:Ge,borderRightWidth:Ge,borderBottomWidth:Ge,borderLeftWidth:Ge,borderRadius:Ge,radius:Ge,borderTopLeftRadius:Ge,borderTopRightRadius:Ge,borderBottomRightRadius:Ge,borderBottomLeftRadius:Ge,width:Ge,maxWidth:Ge,height:Ge,maxHeight:Ge,top:Ge,right:Ge,bottom:Ge,left:Ge,padding:Ge,paddingTop:Ge,paddingRight:Ge,paddingBottom:Ge,paddingLeft:Ge,margin:Ge,marginTop:Ge,marginRight:Ge,marginBottom:Ge,marginLeft:Ge,backgroundPositionX:Ge,backgroundPositionY:Ge,...X4,zIndex:HS,fillOpacity:Ju,strokeOpacity:Ju,numOctaves:HS},q4={...F_,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:Hy,WebkitFilter:Hy},HP=t=>q4[t];function jP(t,e){let n=HP(t);return n!==Hy&&(n=wo),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 1,652 bytes, line 238
238const Y4=new Set(["auto","none","0"]);function K4(t,e,n){let i=0,r;for(;i<t.length&&!r;){const s=t[i];typeof s=="string"&&!Y4.has(s)&&ed(s).values.length&&(r=t[i]),i++}if(r&&n)for(const s of e)t[s]=jP(n,r)}class Z4 extends k_{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 l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),T_(c))){const u=UP(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!zP.has(i)||e.length!==2)return;const[r,s]=e,o=VS(r),a=VS(s);if(o!==a)if(FS(o)&&FS(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else ma[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let r=0;r<e.length;r++)(e[r]===null||j4(e[r]))&&i.push(r);i.length&&K4(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=ma[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]=ma[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: 9,863 bytes, line 238
238h(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function GP(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const r=document.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}const WP=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function $P(t){return oP(t)&&"offsetHeight"in t}const jS=30,Q4=t=>!isNaN(parseFloat(t)),Su={current:void 0};class J4{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var s;const r=ei.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=ei.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Q4(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 w_);const i=this.events[e].add(n);return e==="change"?()=>{i(),mt.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 Su.current&&Su.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=ei.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>jS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,jS);return b_(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 lr(t,e){return new J4(t,e)}const{schedule:U_,cancel:rte}=yP(queueMicrotask,!1),Zi={x:!1,y:!1};function XP(){return Zi.x||Zi.y}function eV(t){return t==="x"||t==="y"?Zi[t]?null:(Zi[t]=!0,()=>{Zi[t]=!1}):Zi.x||Zi.y?null:(Zi.x=Zi.y=!0,()=>{Zi.x=Zi.y=!1})}function qP(t,e){const n=GP(t),i=new AbortController,r={passive:!0,...e,signal:i.signal};return[n,r,()=>i.abort()]}function GS(t){return!(t.pointerType==="touch"||XP())}function tV(t,e,n={}){const[i,r,s]=qP(t,n),o=a=>{if(!GS(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{GS(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return i.forEach(a=>{a.addEventListener("pointerenter",o,r)}),s}const YP=(t,e)=>e?t===e?!0:YP(t,e.parentElement):!1,z_=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,nV=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iV(t){return nV.has(t.tagName)||t.tabIndex!==-1}const ph=new WeakSet;function WS(t){return e=>{e.key==="Enter"&&t(e)}}function rg(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const rV=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=WS(()=>{if(ph.has(n))return;rg(n,"down");const r=WS(()=>{rg(n,"up")}),s=()=>rg(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 $S(t){return z_(t)&&!XP()}function sV(t,e,n={}){const[i,r,s]=qP(t,n),o=a=>{const l=a.currentTarget;if(!$S(a))return;ph.add(l);const c=e(l,a),u=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ph.has(l)&&ph.delete(l),$S(h)&&typeof c=="function"&&c(h,{success:v})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||YP(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",f,r)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),$P(a)&&(a.addEventListener("focus",c=>rV(c,r)),!iV(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function B_(t){return oP(t)&&"ownerSVGElement"in t}const mh=new WeakMap;let Os;const KP=(t,e,n)=>(i,r)=>r&&r[0]?r[0][t+"Size"]:B_(i)&&"getBBox"in i?i.getBBox()[e]:i[n],oV=KP("inline","width","offsetWidth"),aV=KP("block","height","offsetHeight");function lV({target:t,borderBoxSize:e}){var n;(n=mh.get(t))==null||n.forEach(i=>{i(t,{get width(){return oV(t,e)},get height(){return aV(t,e)}})})}function cV(t){t.forEach(lV)}function uV(){typeof ResizeObserver>"u"||(Os=new ResizeObserver(cV))}function dV(t,e){Os||uV();const n=GP(t);return n.forEach(i=>{let r=mh.get(i);r||(r=new Set,mh.set(i,r)),r.add(e),Os==null||Os.observe(i)}),()=>{n.forEach(i=>{const r=mh.get(i);r==null||r.delete(e),r!=null&&r.size||Os==null||Os.unobserve(i)})}}const gh=new Set;let wl;function fV(){wl=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};gh.forEach(e=>e(t))},window.addEventListener("resize",wl)}function hV(t){return gh.add(t),wl||fV(),()=>{gh.delete(t),!gh.size&&typeof wl=="function"&&(window.removeEventListener("resize",wl),wl=void 0)}}function pV(t,e){return typeof t=="function"?hV(t):dV(t,e)}function ZP(t,e){let n;const i=()=>{const{currentTime:r}=e,o=(r===null?0:r.value)/100;n!==o&&t(o),n=o};return mt.preUpdate(i,!0),()=>vr(i)}function mV(t){return B_(t)&&t.tagName==="svg"}function gV(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],r=t[1+n],s=t[2+n],o=t[3+n],a=D_(r,s,o);return e?a(i):a}const Rn=t=>!!(t&&t.getVelocity),vV=[...VP,Zt,wo],yV=t=>vV.find(BP(t)),V_=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function xV(t=!0){const e=b.useContext(v_);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,s=b.useId();b.useEffect(()=>{if(t)return r(s)},[t]);const o=b.useCallback(()=>t&&i&&i(s),[s,i,t]);return!n&&i?[!1,o]:[!0]}const QP=b.createContext({strict:!1}),XS={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"]},hc={};for(const t in XS)hc[t]={isEnabled:e=>XS[t].some(n=>!!e[n])};function _V(t){for(const e in t)hc[e]={...hc[e],...t[e]}}const wV=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","ignoreStrict","viewport"]);function up(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||wV.has(t)}let JP=t=>!up(t);function bV(t){typeof t=="function"&&(JP=e=>e.startsWith("on")?!up(e):t(e))}try{bV(require("@emotion/is-prop-valid").default)}catch{}function SV(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(JP(r)||n===!0&&up(r)||!e&&!up(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}const em=b.createContext({});function tm(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function td(t){return typeof t=="string"||Array.isArray(t)}const H_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],j_=["initial",...H_];function nm(t){return tm(t.animate)||j_.some(e=>td(t[e]))}function e2(t){return!!(nm(t)||t.variants)}function EV(t,e){if(nm(t)){const{initial:n,animate:i}=t;return{initial:n===!1||td(n)?n:void 0,animate:td(i)?i:void 0}}return t.inherit!==!1?e:{}}function MV(t){const{initial:e,animate:n}=EV(t,b.useContext(em));return b.useMemo(()=>({initial:e,animate:n}),[qS(e),qS(n)])}function qS(t){return Array.isArray(t)?t.join(" "):t}const nd={};function TV(t){for(const e in t)nd[e]=t[e],M_(e)&&(nd[e].isCSSVariable=!0)}function t2(t,{layout:e,layoutId:n}){return Oc.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!nd[t]||t==="opacity")}const CV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},AV=kc.length;function RV(t,e,n){let i="",r=!0;for(let s=0;s<AV;s++){const o=kc[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=WP(a,F_[o]);if(!l){r=!1;const u=CV[o]||o;i+=`${u}(${c}) `}n&&(e[o]=c)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}function G_(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];
vendor: 7,204 bytes, line 238
238if(Oc.has(l)){o=!0;continue}else if(M_(l)){r[l]=c;continue}else{const u=WP(c,F_[l]);l.startsWith("origin")?(a=!0,s[l]=u):i[l]=u}}if(e.transform||(o||n?i.transform=RV(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}`}}const W_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function n2(t,e,n){for(const i in e)!Rn(e[i])&&!t2(i,n)&&(t[i]=e[i])}function PV({transformTemplate:t},e){return b.useMemo(()=>{const n=W_();return G_(n,e,t),Object.assign({},n.vars,n.style)},[e])}function DV(t,e){const n=t.style||{},i={};return n2(i,n,t),Object.assign(i,PV(t,e)),i}function LV(t,e){const n={},i=DV(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 NV={offset:"stroke-dashoffset",array:"stroke-dasharray"},IV={offset:"strokeDashoffset",array:"strokeDasharray"};function kV(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?NV:IV;t[s.offset]=Ge.transform(-i);const o=Ge.transform(e),a=Ge.transform(n);t[s.array]=`${o} ${a}`}function i2(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(G_(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),r!==void 0&&kV(d,r,s,o,!1)}const r2=()=>({...W_(),attrs:{}}),s2=t=>typeof t=="string"&&t.toLowerCase()==="svg";function OV(t,e,n,i){const r=b.useMemo(()=>{const s=r2();return i2(s,e,s2(i),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};n2(s,t.style,t),r.style={...s,...r.style}}return r}const FV=["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 $_(t){return typeof t!="string"||t.includes("-")?!1:!!(FV.indexOf(t)>-1||/[A-Z]/u.test(t))}function UV(t,e,n,{latestValues:i},r,s=!1){const a=($_(t)?OV:LV)(e,i,r,t),l=SV(e,typeof t=="string",s),c=t!==b.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=b.useMemo(()=>Rn(u)?u.get():u,[u]);return b.createElement(t,{...c,children:d})}function YS(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function X_(t,e,n,i){if(typeof e=="function"){const[r,s]=YS(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]=YS(i);e=e(n!==void 0?n:t.custom,r,s)}return e}function vh(t){return Rn(t)?t.get():t}function zV({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:BV(n,i,r,t),renderState:e()}}function BV(t,e,n,i){const r={},s=i(t,{});for(const f in s)r[f]=vh(s[f]);let{initial:o,animate:a}=t;const l=nm(t),c=e2(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 d=u?a:o;if(d&&typeof d!="boolean"&&!tm(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const v=X_(t,f[h]);if(v){const{transitionEnd:g,transition:m,...p}=v;for(const y in p){let x=p[y];if(Array.isArray(x)){const w=u?x.length-1:0;x=x[w]}x!==null&&(r[y]=x)}for(const y in g)r[y]=g[y]}}}return r}const o2=t=>(e,n)=>{const i=b.useContext(em),r=b.useContext(v_),s=()=>zV(t,e,i,r);return n?s():Td(s)};function q_(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(Rn(i[o])||e.style&&Rn(e.style[o])||t2(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}const VV=o2({scrapeMotionValuesFromProps:q_,createRenderState:W_});function a2(t,e,n){const i=q_(t,e,n);for(const r in t)if(Rn(t[r])||Rn(e[r])){const s=kc.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=t[r]}return i}const HV=o2({scrapeMotionValuesFromProps:a2,createRenderState:r2}),jV=Symbol.for("motionComponentSymbol");function bl(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function GV(t,e,n){return b.useCallback(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):bl(n)&&(n.current=i))},[e])}const Y_=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),WV="framerAppearId",l2="data-"+Y_(WV),c2=b.createContext({});function $V(t,e,n,i,r){var g,m;const{visualElement:s}=b.useContext(em),o=b.useContext(QP),a=b.useContext(v_),l=b.useContext(V_).reducedMotion,c=b.useRef(null);i=i||o.renderer,!c.current&&i&&(c.current=i(t,{visualState:e,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(c2);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&XV(c.current,n,r,d);const f=b.useRef(!1);b.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[l2],v=b.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((m=window.MotionHasOptimisedAnimation)==null?void 0:m.call(window,h)));return Jp(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),v.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!v.current&&u.animationState&&u.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),v.current=!1),u.enteringChildren=void 0)}),u}function XV(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:u2(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&bl(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function u2(t){if(t)return t.options.allowProjection!==!1?t.projection:u2(t.parent)}function sg(t,{forwardMotionProps:e=!1}={},n,i){n&&_V(n);const r=$_(t)?HV:VV;function s(a,l){let c;const u={...b.useContext(V_),...a,layoutId:qV(a)},{isStatic:d}=u,f=MV(a),h=r(a,d);if(!d&&g_){YV();const v=KV(u);c=v.MeasureLayout,f.visualElement=$V(t,h,u,i,v.ProjectionNode)}return _.jsxs(em.Provider,{value:f,children:[c&&f.visualElement?_.jsx(c,{visualElement:f.visualElement,...u}):null,UV(t,a,GV(h,f.visualElement,l),h,d,e)]})}s.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=b.forwardRef(s);return o[jV]=t,o}function qV({layoutId:t}){const e=b.useContext(rP).id;return e&&t!==void 0?e+"-"+t:t}function YV(t,e){b.useContext(QP).strict}function KV(t){const{drag:e,layout:n}=hc;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}
vendor: 4,445 bytes, line 238
238function ZV(t,e){if(typeof Proxy>"u")return sg;const n=new Map,i=(s,o)=>sg(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,sg(o,void 0,t,e)),n.get(o))})}function d2({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function QV({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function JV(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 og(t){return t===void 0||t===1}function jy({scale:t,scaleX:e,scaleY:n}){return!og(t)||!og(e)||!og(n)}function Go(t){return jy(t)||f2(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function f2(t){return KS(t.x)||KS(t.y)}function KS(t){return t&&t!=="0%"}function dp(t,e,n){const i=t-n,r=e*i;return n+r}function ZS(t,e,n,i,r){return r!==void 0&&(t=dp(t,r,i)),dp(t,n,i)+e}function Gy(t,e=0,n=1,i,r){t.min=ZS(t.min,e,n,i,r),t.max=ZS(t.max,e,n,i,r)}function h2(t,{x:e,y:n}){Gy(t.x,e.translate,e.scale,e.originPoint),Gy(t.y,n.translate,n.scale,n.originPoint)}const QS=.999999999999,JS=1.0000000000001;function e5(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&&El(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,h2(t,o)),i&&Go(s.latestValues)&&El(t,s.latestValues))}e.x<JS&&e.x>QS&&(e.x=1),e.y<JS&&e.y>QS&&(e.y=1)}function Sl(t,e){t.min=t.min+e,t.max=t.max+e}function eE(t,e,n,i,r=.5){const s=Ot(t.min,t.max,r);Gy(t,e,n,s,i)}function El(t,e){eE(t.x,e.x,e.scaleX,e.scale,e.originX),eE(t.y,e.y,e.scaleY,e.scale,e.originY)}function p2(t,e){return d2(JV(t.getBoundingClientRect(),e))}function t5(t,e,n){const i=p2(t,n),{scroll:r}=e;return r&&(Sl(i.x,r.offset.x),Sl(i.y,r.offset.y)),i}const tE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ml=()=>({x:tE(),y:tE()}),nE=()=>({min:0,max:0}),$t=()=>({x:nE(),y:nE()}),Wy={current:null},m2={current:!1};function n5(){if(m2.current=!0,!!g_)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wy.current=t.matches;t.addEventListener("change",e),e()}else Wy.current=!1}const i5=new WeakMap;function r5(t,e,n){for(const i in e){const r=e[i],s=n[i];if(Rn(r))t.addValue(i,r);else if(Rn(s))t.addValue(i,lr(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,lr(o!==void 0?o:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const iE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class s5{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=k_,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 f=ei.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,mt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=nm(n),this.isVariantNode=e2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&Rn(h)&&h.set(l[f])}}mount(e){var n;this.current=e,i5.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.forEac
vendor: 7,368 bytes, line 238
238h((i,r)=>this.bindToMotionValue(r,i)),m2.current||n5(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wy.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),vr(this.notifyUpdate),vr(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){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=Oc.has(e);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&mt.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;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 hc){const n=hc[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):$t()}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<iE.length;i++){const r=iE[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=r5(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}addVariantChild(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=lr(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"&&(sP(i)||aP(i))?i=parseFloat(i):!yV(i)&&wo.test(n)&&(i=jP(e,n)),this.setBaseTarget(e,Rn(i)?i.get():i)),Rn(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=X_(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&&!Rn(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 w_),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){U_.render(this.render)}}class g2 extends s5{constructor(){super(...arguments),this.KeyframeResolver=Z4}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[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;Rn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function v2(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 o5(t){return window.getComputedStyle(t)}class a5 extends g2{constructor(){super(...arguments),this.type="html",this.renderInstance=v2}readValueFromInstance(e,n){var i;if(Oc.has(n))return(i=this.projection)!=null&&i.isProjecting?Oy(n):v4(e,n);{const r=o5(e),s=(M_(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return p2(e,n)}build(e,n,i){G_(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return q_(e,n,i)}}const y2=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"]);function l5(t,e,n,i){v2(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(y2.has(r)?r:Y_(r),e.attrs[r])}class c5 extends g2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$t}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Oc.has(n)){const i=HP(n);return i&&i.default||0}return n=y2.has(n)?n:Y_(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return a2(e,n,i)}build(e,n,i){i2(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,r){l5(e,n,i,r)}mount(e){this.isSVGTag=s2(e.tagName),super.mount(e)}}const u5=(t,e)=>$_(t)?new c5(e):new a5(e,{allowProjection:t!==b.Fragment});function Ul(t,e,n){const i=t.getProps();return X_(i,e,n!==void 0?n:i.custom,t)}const $y=t=>Array.isArray(t);function d5(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,lr(n))}function f5(t){return $y(t)?t[t.length-1]||0:t}function K_(t,e){const n=Ul(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const o in s){const a=f5(s[o]);d5(t,o,a)}}function h5(t){return!!(Rn(t)&&t.add)}function Xy(t,e){const n=t.getValue("willChange");if(h5(n))return n.add(e);if(!n&&_s.WillChange){const i=new _s.WillChange("auto");
vendor: 11,228 bytes, line 238
238t.addValue("willChange",i),i.add(e)}}function x2(t){return t.props[l2]}const p5=t=>t!==null;function m5(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(p5),s=e&&n!=="loop"&&e%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}const g5={type:"spring",stiffness:500,damping:25,restSpeed:10},v5=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),y5={type:"keyframes",duration:.8},x5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_5=(t,{keyframes:e})=>e.length>2?y5:Oc.has(t)?t.startsWith("scale")?v5(e[1]):g5:x5;function w5({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Z_=(t,e,n,i={},r,s)=>o=>{const a=O_(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-Or(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r};w5(a)||Object.assign(u,_5(t,u)),u.duration&&(u.duration=Or(u.duration)),u.repeatDelay&&(u.repeatDelay=Or(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Vy(u),u.delay===0&&(d=!0)),(_s.instantAnimations||_s.skipAnimations)&&(d=!0,Vy(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&e.get()!==void 0){const f=m5(u.keyframes,a);if(f!==void 0){mt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new I_(u):new z4(u)};function b5({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function _2(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(s=i);const l=[],c=r&&t.animationState&&t.animationState.getState()[r];for(const u in a){const d=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&b5(c,u))continue;const h={delay:n,...O_(s||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const p=x2(t);if(p){const y=window.MotionHandoffAnimation(p,u,mt);y!==null&&(h.startTime=y,g=!0)}}Xy(t,u),d.start(Z_(u,d,f,t.shouldReduceMotion&&zP.has(u)?{type:!1}:h,t,g));const m=d.animation;m&&l.push(m)}return o&&Promise.all(l).then(()=>{mt.update(()=>{o&&K_(t,o)})}),l}function w2(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}function qy(t,e,n={}){var l;const i=Ul(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(_2(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=r;return S5(t,e,c,u,d,f,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 S5(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(qy(l,e,{...o,delay:n+(typeof i=="function"?0:i)+w2(t.variantChildren,l,i,r,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function b2(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>qy(t,s,n));i=Promise.all(r)}else if(typeof e=="string")i=qy(t,e,n);else{const r=typeof e=="function"?Ul(t,e,n.custom):e;i=Promise.all(_2(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function S2(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 E5=j_.length;function E2(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?E2(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<E5;n++){const i=j_[n],r=t.props[i];(td(r)||r===!1)&&(e[i]=r)}return e}const M5=[...H_].reverse(),T5=H_.length;function C5(t){return e=>Promise.all(e.map(({animation:n,options:i})=>b2(t,n,i)))}function A5(t){let e=C5(t),n=rE(),i=!0;const r=l=>(c,u)=>{var f;const d=Ul(t,u,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:v,...g}=d;c={...c,...g,...v}}return c};function s(l){e=l(t)}function o(l){const{props:c}=t,u=E2(t.parent)||{},d=[],f=new Set;let h={},v=1/0;for(let m=0;m<T5;m++){const p=M5[m],y=n[p],x=c[p]!==void 0?c[p]:u[p],w=td(x),S=p===l?y.isActive:null;S===!1&&(v=m);let T=x===u[p]&&x!==c[p]&&w;if(T&&i&&t.manuallyAnimateOnMount&&(T=!1),y.protectedKeys={...h},!y.isActive&&S===null||!x&&!y.prevProp||tm(x)||typeof x=="boolean")continue;const C=R5(y.prevProp,x);let P=C||p===l&&y.isActive&&!T&&w||m>v&&w,E=!1;const M=Array.isArray(x)?x:[x];let N=M.reduce(r(p),{});S===!1&&(N={});const{prevResolvedValues:k={}}=y,z={...k,...N},F=W=>{P=!0,f.has(W)&&(E=!0,f.delete(W)),y.needsAnimating[W]=!0;const L=t.getValue(W);L&&(L.liveStyle=!1)};for(const W in z){const L=N[W],O=k[W];if(h.hasOwnProperty(W))continue;let j=!1;$y(L)&&$y(O)?j=!S2(L,O):j=L!==O,j?L!=null?F(W):f.add(W):L!==void 0&&f.has(W)?F(W):y.protectedKeys[W]=!0}y.prevProp=x,y.prevResolvedValues=N,y.isActive&&(h={...h,...N}),i&&t.blockInitialAnimation&&(P=!1);const $=T&&C;P&&(!$||E)&&d.push(...M.map(W=>{const L={type:p};if(typeof W=="string"&&i&&!$&&t.manuallyAnimateOnMount&&t.parent){const{parent:O}=t,j=Ul(O,W);if(O.enteringChildren&&j){const{delayChildren:J}=j.transition||{};L.delay=w2(O.enteringChildren,t,J)}}return{animation:W,options:L}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const p=Ul(t,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(m.transition=p.transition)}f.forEach(p=>{const y=t.getBaseTarget(p),x=t.getValue(p);x&&(x.liveStyle=!0),m[p]=y??null}),d.push({animation:m})}let g=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,g?e(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=rE()}}}function R5(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!S2(e,t):!1}function Po(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rE(){return{animate:Po(!0),whileInView:Po(),whileHover:Po(),whileTap:Po(),whileDrag:Po(),whileFocus:Po(),exit:Po()}}class Ao{constructor(e){this.isMounted=!1,this.node=e}update(){}}class P5 extends Ao{constructor(e){super(e),e.animationState||(e.animationState=A5(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();tm(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 D5=0;class L5 extends Ao{constructor(){super(...arguments),this.id=D5++}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||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const N5={animation:{Feature:P5},exit:{Feature:L5}};function id(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Pd(t){return{point:{x:t.pageX,y:t.pageY}}}const I5=t=>e=>z_(e)&&t(e,Pd(e));function Eu(t,e,n,i){return id(t,e,I5(n),i)}const M2=1e-4,k5=1-M2,O5=1+M2,T2=.01,F5=0-T2,U5=0+T2;function jn(t){return t.max-t.min}function z5(t,e,n){return Math.abs(t-e)<=n}function sE(t,e,n,i=.5){t.origin=i,t.originPoint=Ot(e.min,e.max,t.origin),t.scale=jn(n)/jn(e),t.translate=Ot(n.min,n.max,t.origin)-t.originPoint,(t.scale>=k5&&t.scale<=O5||isNaN(t.scale))&&(t.scale=1),(t.translate>=F5&&t.translate<=U5||isNaN(t.translate))&&(t.translate=0)}function Mu(t,e,n,i){sE(t.x,e.x,n.x,i?i.originX:void 0),sE(t.y,e.y,n.y,i?i.originY:void 0)}function oE(t,e,n){t.min=n.min+e.min,t.max=t.min+jn(e)}function B5(t,e,n){oE(t.x,e.x,n.x),oE(t.y,e.y,n.y)}function aE(t,e,n){t.min=e.min-n.min,t.max=t.min+jn(e)}function Tu(t,e,n){aE(t.x,e.x,n.x),aE(t.y,e.y,n.y)}function Pi(t){return[t("x"),t("y")]}const C2=({current:t})=>t?t.ownerDocument.defaultView:null,lE=(t,e)=>Math.abs(t-e);function V5(t,e){const n=lE(t.x,e.x),i=lE(t.y,e.y);return Math.sqrt(n**2+i**2)}class A2{constructor(e,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=lg(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,v=V5(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!v)return;const{point:g}=f,{timestamp:m}=fn;this.history.push({...g,timestamp:m});const{onStart:p,onMove:y}=this.handlers;h||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ag(h,this.transformPagePoint),mt.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:v,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=lg(f.type==="pointercancel"?this.lastMoveEventInfo:ag(h,this.transformPagePoint),this.history);this.startEvent&&v&&v(f,p),g&&g(f,p)},!z_(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=r||window;const a=Pd(e),l=ag(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=fn;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(e,lg(l,this.history)),this.removeListeners=Cd(Eu(this.contextWindow,"pointermove",this.handlePointerMove),Eu(this.contextWindow,"pointerup",this.handlePointerUp),Eu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),vr(this.updatePoint)}}function ag(t,e){return e?{point:e(t.point)}:t}function cE(t,e){return{x:t.x-e.x,y:t.y-e.y}}function lg({point:t},e){return{point:t,delta:cE(t,R2(e)),offset:cE(t,H5(e)),velocity:j5(e,.1)}}function H5(t){return t[0]}function R2(t){return t[t.length-1]}function j5(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=R2(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Or(e)));)n--;if(!i)return{x:0,y:0};const s=Oi(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}
vendor: 15,912 bytes, line 238
238;return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function G5(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?Ot(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?Ot(n,t,i.max):Math.min(t,n)),t}function uE(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 W5(t,{top:e,left:n,bottom:i,right:r}){return{x:uE(t.x,n,r),y:uE(t.y,e,i)}}function dE(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 $5(t,e){return{x:dE(t.x,e.x),y:dE(t.y,e.y)}}function X5(t,e){let n=.5;const i=jn(t),r=jn(e);return r>i?n=fc(e.min,e.max-i,t.min):i>r&&(n=fc(t.min,t.max-r,e.min)),Vr(0,1,n)}function q5(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 Yy=.35;function Y5(t=Yy){return t===!1?t=0:t===!0&&(t=Yy),{x:fE(t,"left","right"),y:fE(t,"top","bottom")}}function fE(t,e,n){return{min:hE(t,e),max:hE(t,n)}}function hE(t,e){return typeof t=="number"?t:t[e]||0}const K5=new WeakMap;class Z5{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=$t(),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=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Pd(d).point)},o=(d,f)=>{const{drag:h,dragPropagation:v,onDragStart:g}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eV(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pi(p=>{let y=this.getAxisMotionValue(p).get()||0;if(Fr.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[p];w&&(y=jn(w)*(parseFloat(y)/100))}}this.originPoint[p]=y}),g&&mt.postRender(()=>g(d,f)),Xy(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:g,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=f;if(v&&this.currentDirection===null){this.currentDirection=Q5(p),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Pi(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new A2(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:C2(this.visualElement)})}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&&mt.postRender(()=>a(i,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!ff(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=G5(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&&bl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=W5(i.layoutBox,e):this.constraints=!1,this.elastic=Y5(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Pi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=q5(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bl(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=t5(i,r.root,this.visualElement.getTransformPagePoint());let o=$5(r.layout.layoutBox,s);if(n){const a=n(QV(o));this.hasMutatedConstraints=!!a,a&&(o=d2(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Pi(u=>{if(!ff(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const f=r?200:1e6,h=r?40:1e7,v={type:"inertia",velocity:i?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return Xy(this.visualElement,e),i.start(Z_(e,i,0,n,this.visualElement,!1))}stopAnimation(){Pi(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Pi(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}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){Pi(n=>{const{drag:i}=this.getProps();if(!ff(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];s.set(e[n]-Ot(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!bl(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Pi(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=X5({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.resolveConstraints(),Pi(o=>{if(!ff(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Ot(l,c,r[o]))})}addListeners(){if(!this.visualElement.current)return;K5.set(this.visualElement,this);const e=this.visualElement.current,n=Eu(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();bl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),mt.read(i);const o=id(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Pi(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Yy,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ff(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Q5(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class J5 extends Ao{constructor(e){super(e),this.removeGroupControls=ri,this.removeListeners=ri,this.controls=new Z5(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ri}unmount(){this.removeGroupControls(),this.removeListeners()}}const pE=t=>(e,n)=>{t&&mt.postRender(()=>t(e,n))};class eH extends Ao{constructor(){super(...arguments),this.removePointerDownListener=ri}onPointerDown(e){this.session=new A2(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:C2(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:pE(e),onStart:pE(n),onMove:i,onEnd:(s,o)=>{delete this.session,r&&mt.postRender(()=>r(s,o))}}}mount(){this.removePointerDownListener=Eu(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const yh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mE(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Kc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ge.test(t))t=parseFloat(t);else return t;const n=mE(t,e.target.x),i=mE(t,e.target.y);return`${n}% ${i}%`}},tH={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=wo.parse(t);if(r.length>5)return i;const s=wo.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=Ot(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=c),typeof r[3+o]=="number"&&(r[3+o]/=c),s(r)}};let cg=!1;class nH extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;TV(iH),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),cg&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),yh.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,{projection:o}=i;return o&&(o.isPresent=s,cg=!0,r||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||mt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),U_.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;cg=!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 P2(t){const[e,n]=xV(),i=b.useContext(rP);return _.jsx(nH,{...t,layoutGroup:i,switchLayoutGroup:b.useContext(c2),isPresent:e,safeToRemove:n})}const iH={borderRadius:{...Kc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kc,borderTopRightRadius:Kc,borderBottomLeftRadius:Kc,borderBottomRightRadius:Kc,boxShadow:tH};function rH(t,e,n){const i=Rn(t)?t:lr(t);return i.start(Z_("",i,e,n)),i.animation}const sH=(t,e)=>t.depth-e.depth;class oH{constructor(){this.children=[],this.isDirty=!1}add(e){y_(this.children,e),this.isDirty=!0}remove(e){x_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sH),this.isDirty=!1,this.children.forEach(e)}}function aH(t,e){const n=ei.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(vr(i),t(s-e))};return mt.setup(i,!0),()=>vr(i)}const D2=["TopLeft","TopRight","BottomLeft","BottomRight"],lH=D2.length,gE=t=>typeof t=="string"?parseFloat(t):t,vE=t=>typeof t=="number"||Ge.test(t);function cH(t,e,n,i,r,s){r?(t.opacity=Ot(0,n.opacity??1,uH(i)),t.opacityExit=Ot(e.opacity??1,0,dH(i))):s&&(t.opacity=Ot(e.opacity??1,n.opacity??1,i));for(let o=0;o<lH;o++){const a=`border${D2[o]}Radius`;let l=yE(e,a),c=yE(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||vE(l)===vE(c)?(t[a]=Math.max(Ot(gE(l),gE(c),i),0),(Fr.test(c)||Fr.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Ot(e.rotate||0,n.rotate||0,i))}function yE(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const uH=L2(0,.5,pP),dH=L2(.5,.95,ri);function L2(t,e,n){return i=>i<t?0:i>e?1:n(fc(t,e,i))}function xE(t,e){t.min=e.min,t.max=e.max}function Ci(t,e){xE(t.x,e.x),xE(t.y,e.y)}function _E(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function wE(t,e,n,i,r){return t-=e,t=dp(t,1/n,i),r!==void 0&&(t=dp(t,1/r,i)),t}function fH(t,e=0,n=1,i=.5,r,s=t,o=t){if(Fr.test(e)&&(e=parseFloat(e),e=Ot(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Ot(s.min,s.max,i);t===s&&(a-=e),t.min=wE(t.min,e,n,a,r),t.max=wE(t.max,e,n,a,r)}function bE(t,e,[n,i,r],s,o){fH(t,e[n],e[i],e[r],e.scale,s,o)}const hH=["x","scaleX","originX"],pH=["y","scaleY","originY"];function SE(t,e,n,i){bE(t.x,e,hH,n?n.x:void 0,i?i.x:void 0),bE(t.y,e,pH,n?n.y:void 0,i?i.y:void 0)}function EE(t){return t.translate===0&&t.scale===1}function N2(t){return EE(t.x)&&EE(t.y)}function ME(t,e){return t.min===e.min&&t.max===e.max}function mH(t,e){return ME(t.x,e.x)&&ME(t.y,e.y)}function TE(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function I2(t,e){return TE(t.x,e.x)&&TE(t.y,e.y)}function CE(t){return jn(t.x)/jn(t.y)}function AE(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class gH{constructor(){this.members=[]}add(e){y_(this.members,e),e.scheduleRender()}remove(e){if(x_(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];if(s.isPresent!==!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(),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:r}=e.options;r===!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)}}function vH(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:d,rotateY:f,skewX:h,skewY:v}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}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 ug=["","X","Y","Z"],yH=1e3;let xH=0;function dg(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function k2(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=x2(e);
vendor: 4,292 bytes, line 238
238if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",mt,!(r||s))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&k2(i)}function O2({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=xH++,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.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(bH),this.nodes.forEach(TH),this.nodes.forEach(CH),this.nodes.forEach(SH)},this.resolvedRelativeTargetAt=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 oH)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new w_),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=B_(o)&&!mV(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,d=0;const f=()=>this.root.updateBlockedByResize=!1;mt.read(()=>{d=window.innerWidth}),t(o,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=aH(f,250),yh.hasAnimatedSinceResize&&(yh.hasAnimatedSinceResize=!1,this.nodes.forEach(DE)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||LH,{onLayoutAnimationStart:g,onLayoutAnimationComplete:m}=c.getProps(),p=!this.targetLayout||!I2(this.targetLayout,h),y=!d&&f;if(this.options.layoutRoot||this.resumeFrom||y||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...O_(v,"layout"),onPlay:g,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||DE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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(),vr(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(AH),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&&k2(this),!this.root.isUpdating&&this.root.startUpd
vendor: 12,575 bytes, line 238
238ate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.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(RE);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(PE);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(MH),this.nodes.forEach(_H),this.nodes.forEach(wH)):this.nodes.forEach(PE),this.clearAllSnapshots();const a=ei.now();fn.delta=Vr(0,1e3/60,a-fn.timestamp),fn.timestamp=a,fn.isProcessing=!0,Jm.update.process(fn),Jm.preRender.process(fn),Jm.render.process(fn),fn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,U_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(EH),this.sharedNodes.forEach(RH)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jn(this.snapshot.measuredBox.x)&&!jn(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.layoutCorrected=$t(),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&&!N2(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Go(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)),NH(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return $t();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(IH))){const{scroll:u}=this.root;u&&(Sl(a.x,u.offset.x),Sl(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=$t();if(Ci(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:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Ci(a,o),Sl(a.x,d.offset.x),Sl(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=$t();Ci(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&&El(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Go(u.latestValues)&&El(l,u.latestValues)}return Go(this.latestValues)&&El(l,this.latestValues),l}removeTransform(o){const a=$t();Ci(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Go(c.latestValues))continue;jy(c.latestValues)&&c.updateSnapshot();const u=$t(),d=c.measurePageBox();Ci(u,d),SE(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Go(this.latestValues)&&SE(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!==fn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;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||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=fn.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Tu(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Ci(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$t(),this.targetWithTransforms=$t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),B5(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ci(this.target,this.layout.layoutBox),h2(this.target,this.targetDelta)):Ci(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Tu(this.relativeTargetOrigin,this.target,h.target),Ci(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||jy(this.parent.latestValues)||f2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var v;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===fn.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;Ci(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;e5(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=$t());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_E(this.prevProjectionDelta.x,this.projectionDelta.x),_E(this.prevProjectionDelta.y,this.projectionDelta.y)),Mu(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!AE(this.projectionDelta.x,this.prevProjectionDelta.x)||!AE(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}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=Ml(),this.projectionDelta=Ml(),this.projectionDeltaWithTransform=Ml()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ml();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=$t(),h=l?l.source:void 0,v=this.layout?this.layout.source:void 0,g=h!==v,m=this.getStack(),p=!m||m.members.length<=1,y=!!(g&&!p&&this.options.crossfade===!0&&!this.path.some(DH));this.animationProgress=0;let x;this.mixTargetDelta=w=>{const S=w/1e3;LE(d.x,o.x,S),LE(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),PH(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&mH(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=$t()),Ci(x,this.relativeTarget)),g&&(this.animationValues=u,cH(u,c,this.latestValues,S,y,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},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&&(vr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mt.update(()=>{yh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=lr(0)),this.currentAnimation=rH(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(yH),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&&F2(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||$t();const d=jn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=jn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Ci(a,l),El(a,u),Mu(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new gH),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: 4,211 bytes, line 238
238resetSkewAndRotation(){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&&dg("z",o,c,this.animationValues);for(let u=0;u<ug.length;u++)dg(`rotate${ug[u]}`,o,c,this.animationValues),dg(`skew${ug[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=vh(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=vh(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Go(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=vH(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:f,y:h}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${h.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 nd){if(u[v]===void 0)continue;const{correct:g,applyTo:m,isCSSVariable:p}=nd[v],y=d==="none"?u[v]:g(u[v],c);if(m){const x=m.length;for(let w=0;w<x;w++)o[m[w]]=y}else p?this.options.visualElement.renderState.vars[v]=y:o[v]=y}this.options.layoutId&&(o.pointerEvents=c===this?vh(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(RE),this.root.sharedNodes.clear()}}}function _H(t){t.updateLayout()}function wH(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"?Pi(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=jn(f);f.min=i[d].min,f.max=f.min+h}):F2(s,e.layoutBox,i)&&Pi(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=jn(i[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=Ml();Mu(a,i,e.layoutBox);const l=Ml();o?Mu(l,t.applyTransform(r,!0),e.measuredBox):Mu(l,i,e.layoutBox);const c=!N2(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const v=$t();Tu(v,e.layoutBox,f.layoutBox);const g=$t();Tu(g,i,h.layoutBox),I2(v,g)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=v,t.relativeParent=d)}}}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 bH(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 SH(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function EH(t){t.clearSnapshot()}function RE(t){t.clearMeasurements()}function PE(t){t.isLayoutDirty=!1}function MH(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function DE(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function TH(t){t.resolveTargetDelta()}function CH(t){t.calcProjection()}
238function AH(t){t.resetSkewAndRotation()}function RH(t){t.removeLeadSnapshot()}function LE(t,e,n){t.translate=Ot(e.translate,0,n),t.scale=Ot(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function NE(t,e,n,i){t.min=Ot(e.min,n.min,i),t.max=Ot(e.max,n.max,i)}function PH(t,e,n,i){NE(t.x,e.x,n.x,i),NE(t.y,e.y,n.y,i)}function DH(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const LH={duration:.45,ease:[.4,0,.1,1]},IE=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),kE=IE("applewebkit/")&&!IE("chrome/")?Math.round:ri;function OE(t){t.min=kE(t.min),t.max=kE(t.max)}function NH(t){OE(t.x),OE(t.y)}function F2(t,e,n){return t==="position"||t==="preserve-aspect"&&!z5(CE(e),CE(n),.2)}function IH(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const kH=O2({attachResizeListener:(t,e)=>id(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fg={current:void 0},U2=O2({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!fg.current){const t=new kH({});t.mount(window),t.setOptions({layoutScroll:!0}),fg.current=t}return fg.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),OH={pan:{Feature:eH},drag:{Feature:J5,ProjectionNode:U2,MeasureLayout:P2}};function FE(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&&mt.postRender(()=>s(e,Pd(e)))}class FH extends Ao{mount(){const{current:e}=this.node;e&&(this.unmount=tV(e,(n,i)=>(FE(this.node,i,"Start"),r=>FE(this.node,r,"End"))))}unmount(){}}class UH extends Ao{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=Cd(id(this.node.current,"focus",()=>this.onFocus()),id(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function UE(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&&mt.postRender(()=>s(e,Pd(e)))}class zH extends Ao{mount(){const{current:e}=this.node;e&&(this.unmount=sV(e,(n,i)=>(UE(this.node,i,"Start"),(r,{success:s})=>UE(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ky=new WeakMap,hg=new WeakMap,BH=t=>{const e=Ky.get(t.target);e&&e(t)},VH=t=>{t.forEach(BH)};function HH({root:t,...e}){const n=t||document;hg.has(n)||hg.set(n,{});const i=hg.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(VH,{root:t,...e})),i[r]}function jH(t,e,n){const i=HH(e);return Ky.set(t,n),i.observe(t),()=>{Ky.delete(t),i.unobserve(t)}}const GH={some:0,all:1};class WH extends Ao{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:GH[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:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return jH(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($H(e,n))&&this.startObserver()}unmount(){}}function $H({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const XH={inView:{Feature:WH},tap:{Feature:zH},focus:{Feature:UH},hover:{Feature:FH}},qH={layout:{ProjectionNode:U2,MeasureLayout:P2}},YH={...N5,...XH,...OH,...qH},ze=ZV(YH,u5),KH=50,zE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ZH=()=>({time:0,x:zE(),y:zE()}),QH={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function BE(t,e,n,i){const r=n[e],{length:s,position:o}=QH[e],a=r.current,l=n.time;r.current=t[`scroll${o}`],r.scrollLength=t[`scroll${s}`]-t[`client${s}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=fc(0,r.scrollLength,r.current);const c=i-l;r.velocity=c>KH?0:b_(r.current-a,c)}function JH(t,e,n){BE(t,"x",e,n),BE(t,"y",e,n),e.time=n}function ej(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if($P(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if(i.tagName==="svg"){const r=i.getBoundingClientRect();i=i.parentElement;const s=i.getBoundingClientRect();n.x+=r.left-s.left,n.y+=r.top-s.top}else if(i instanceof SVGGraphicsElement){const{x:r,y:s}=i.getBBox();n.x+=r,n.y+=s;let o=null,a=i.parentNode;for(;!o;)a.tagName==="svg"&&(o=a),a=i.parentNode;i=o}else break;return n}const Zy={start:0,center:.5,end:1};function VE(t,e,n=0){let i=0;if(t in Zy&&(t=Zy[t]),typeof t=="string"){const r=parseFloat(t);t.endsWith("px")?i=r:t.endsWith("%")?t=r/100:t.endsWith("vw")?i=r/100*document.documentElement.clientWidth:t.endsWith("vh")?i=r/100*document.documentElement.clientHeight:t=r}return typeof t=="number"&&(i=e*t),n+i}const tj=[0,0];function nj(t,e,n,i){let r=Array.isArray(t)?t:tj,s=0,o=0;return typeof t=="number"?r=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?r=t.split(" "):r=[t,Zy[t]?t:"0"]),s=VE(r[0],n,i),o=VE(r[1],e),s-o}const ij={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},rj={x:0,y:0};function sj(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function oj(t,e,n){const{offset:i=ij.All}=n,{target:r=t,axis:s="y"}=n,o=s==="y"?"height":"width",a=r!==t?ej(r,t):rj,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:sj(r),c={width:t.clientWidth,height:t.clientHeight};e[s].offset.length=0;let u=!e[s].interpolate;const d=i.length;for(let f=0;f<d;f++){const h=nj(i[f],c[o],l[o],a[s]);
238!u&&h!==e[s].interpolatorOffsets[f]&&(u=!0),e[s].offset[f]=h}u&&(e[s].interpolate=D_(e[s].offset,RP(i),{clamp:!1}),e[s].interpolatorOffsets=[...e[s].offset]),e[s].progress=Vr(0,1,e[s].interpolate(e[s].current))}function aj(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}function lj(t,e,n,i={}){return{measure:r=>{aj(t,i.target,n),JH(t,n,r),(i.offset||i.target)&&oj(t,n,i)},notify:()=>e(n)}}const Zc=new WeakMap,HE=new WeakMap,pg=new WeakMap,jE=t=>t===document.scrollingElement?window:t;function z2(t,{container:e=document.scrollingElement,...n}={}){if(!e)return ri;let i=pg.get(e);i||(i=new Set,pg.set(e,i));const r=ZH(),s=lj(e,t,r,n);if(i.add(s),!Zc.has(e)){const a=()=>{for(const d of i)d.measure(fn.timestamp);mt.preUpdate(l)},l=()=>{for(const d of i)d.notify()},c=()=>mt.read(a);Zc.set(e,c);const u=jE(e);window.addEventListener("resize",c,{passive:!0}),e!==document.documentElement&&HE.set(e,pV(e,c)),u.addEventListener("scroll",c,{passive:!0}),c()}const o=Zc.get(e);return mt.read(o,!1,!0),()=>{var c;vr(o);const a=pg.get(e);if(!a||(a.delete(s),a.size))return;const l=Zc.get(e);Zc.delete(e),l&&(jE(e).removeEventListener("scroll",l),(c=HE.get(e))==null||c(),window.removeEventListener("resize",l))}}const GE=new Map;function cj(t){const e={value:0},n=z2(i=>{e.value=i[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function B2({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const r=GE.get(e)??new Map;GE.set(e,r);const s=n.target??"self",o=r.get(s)??{},a=i+(n.offset??[]).join(",");return o[a]||(o[a]=!n.target&&NP()?new ScrollTimeline({source:e,axis:i}):cj({container:e,...n})),o[a]}function uj(t,e){const n=B2(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:i=>(i.pause(),ZP(r=>{i.time=i.iterationDuration*r},n))})}function dj(t){return t.length===2}function fj(t,e){return dj(t)?z2(n=>{t(n[e.axis].progress,n)},e):ZP(t,B2(e))}function hj(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return ri;const r={axis:e,container:n,...i};return typeof t=="function"?fj(t,r):uj(t,r)}const pj=()=>({scrollX:lr(0),scrollY:lr(0),scrollXProgress:lr(0),scrollYProgress:lr(0)}),hf=t=>t?!t.current:!1;function V2({container:t,target:e,...n}={}){const i=Td(pj),r=b.useRef(null),s=b.useRef(!1),o=b.useCallback(()=>(r.current=hj((a,{x:l,y:c})=>{i.scrollX.set(l.current),i.scrollXProgress.set(l.progress),i.scrollY.set(c.current),i.scrollYProgress.set(c.progress)},{...n,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var a;(a=r.current)==null||a.call(r)}),[t,e,JSON.stringify(n.offset)]);return Jp(()=>{if(s.current=!1,hf(t)||hf(e)){s.current=!0;return}else return o()},[o]),b.useEffect(()=>{if(s.current)return dc(!hf(t)),dc(!hf(e)),o()},[o]),i}function mj(t){const e=Td(()=>lr(t)),{isStatic:n}=b.useContext(V_);if(n){const[,i]=b.useState(t);b.useEffect(()=>e.on("change",i),[])}return e}function H2(t,e){const n=mj(e()),i=()=>n.set(e());return i(),Jp(()=>{const r=()=>mt.preRender(i,!1,!0),s=t.map(o=>o.on("change",r));return()=>{s.forEach(o=>o()),vr(i)}}),n}function gj(t){Su.current=[],t();const e=H2(Su.current,t);return Su.current=void 0,e}function j2(t,e,n,i){if(typeof t=="function")return gj(t);const r=typeof e=="function"?e:gV(e,n,i);return Array.isArray(t)?WE(t,r):WE([t],([s])=>r(s))}function WE(t,e){const n=Td(()=>[]);return H2(t,()=>{n.length=0;const i=t.length;for(let r=0;r<i;r++)n[r]=t[r].get();return e(n)})}function vj(t){t.values.forEach(e=>e.stop())}function Qy(t,e){[...e].reverse().forEach(i=>{const r=t.getVariant(i);r&&K_(t,r),t.variantChildren&&t.variantChildren.forEach(s=>{Qy(s,e)})})}function yj(t,e){if(Array.isArray(e))return Qy(t,e);if(typeof e=="string")return Qy(t,[e]);K_(t,e)}function xj(){const t=new Set,e={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,i){const r=[];return t.forEach(s=>{r.push(b2(s,n,{transitionOverride:i}))}),Promise.all(r)},set(n){return t.forEach(i=>
238{yj(i,n)})},stop(){t.forEach(n=>{vj(n)})},mount(){return()=>{e.stop()}}};return e}function _j(){const t=Td(xj);return Jp(t.mount,[]),t}const wj=_j,bj=e_("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",nova:"bg-foreground text-background hover:bg-foreground/90 transition-all duration-300","nova-outline":"border border-foreground
238/20 text-foreground hover:bg-foreground/10 hover:border-foreground/40 transition-all duration-300"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Cu=b.forwardRef(({className:t,variant:e,size:n,asChild:i=!1,...r},s)=>{const o=i?Wk:"button";return _.jsx(o,{className:ot(bj({variant:e,size:n,className:t})),ref:s,...r})});Cu.displayName="Button";const Sj=()=>{const[t,e]=b.useState(!1);return b.useEffect(()=>{if(typeof window>"u")return;const n=window.matchMedia("(prefers-color-scheme: dark)");e(n.matches);const i=r=>e(r.matches);return n.addEventListener("change",i),()=>n.removeEventListener("change",i)},[]),t},Ej=()=>b.useMemo(()=>{if(typeof window>"u")return{svgFilters:!1,backdropFilter:!1};const t=/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent),e=/Firefox/.test(navigator.userAgent),n=!t&&!e&&(()=>{const r=document.createElement("div");return r.style.backdropFilter="url(#test)",r.style.backdropFilter!==""})(),i=CSS.supports("backdrop-filter","blur(10px)");return{svgFilters:n,backdropFilter:i}},[]),Mj=fe.memo(({children:t,width:e=200,height:n=80,borderRadius:i=20,borderWidth:r=.07,brightness:s=50,opacity:o=.93,blur:a=11,displace:l=0,backgroundOpacity:c=0,saturation:u=1,distortionScale:d=-180,redOffset:f=0,greenOffset:h=10,blueOffset:v=20,xChannel:g="R",yChannel:m="G",mixBlendMode:p="difference",className:y="",style:x={}})=>{const w=b.useId().replace(/:/g,"-"),S=b.useMemo(()=>`glass-filter-${w}`,[w]),T=b.useMemo(()=>`red-grad-${w}`,[w]),C=b.useMemo(()=>`blue-grad-${w}`,[w]),P=b.useRef(null),E=b.useRef(null),M=b.useRef(null),N=b.useRef(null),k=b.useRef(null),z=b.useRef(null),F=Sj(),{svgFilters:$,backdropFilter:H}=Ej(),W=b.useCallback(()=>{var K;const J=(K=P.current)==null?void 0:K.getBoundingClientRect(),ne=(J==null?void 0:J.width)||400,pe=(J==null?void 0:J.height)||200,he=Math.min(ne,pe)*(r*.5),Ne=`<svg viewBox="0 0 ${ne} ${pe}" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="${T}" x1="100%" y1="0%" x2="0%" y2="0%"><stop offset="0%" stop-color="#0000"/><stop offset="100%" stop-color="red"/></linearGradient><linearGradient id="${C}" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="#0000"/><stop offset="100%" stop-color="blue"/></linearGradient></defs><rect x="0" y="0" width="${ne}" height="${pe}" fill="black"/><rect x="0" y="0" width="${ne}" height="${pe}" rx="${i}" fill="url(#${T})"/><rect x="0" y="0" width="${ne}" height="${pe}" rx="${i}" fill="url(#${C})" style="mix-blend-mode: ${p}"/><rect x="${he}" y="${he}" width="${ne-he*2}" height="${pe-he*2}" rx="${i}" fill="hsl(0 0% ${s}% / ${o})" style="filter:blur(${a}px)"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(Ne)}`},[i,r,s,o,a,p,T,C]),L=b.useCallback(()=>{E.current&&E.current.setAttribute("href",W())},[W]);b.useEffect(()=>{L(),[{ref:M,offset:f},{ref:N,offset:h},{ref:k,offset:v}].forEach(({ref:ne,offset:pe})=>{const he=ne.current;he&&(he.setAttribute("scale",(d+pe).toString()),he.setAttribute("xChannelSelector",g),he.setAttribute("yChannelSelector",m))}),z.current&&z.current.setAttribute("stdDeviation",l.toString())},[L,d,f,h,v,g,m,l]),b.useEffect(()=>{const J=P.current;if(!J)return;const ne=new ResizeObserver(()=>{requestAnimationFrame(L)});return ne.observe(J),()=>{ne.disconnect()}},[L]);const O=b.useMemo(()=>{const J={...x,width:typeof e=="number"?`${e}px`:e,height:typeof n=="number"?`${n}px`:n,borderRadius:`${i}px`,"--glass-frost":c,"--glass-saturation":u};return $?{...J,background:F?`hsl(0 0% 0% / ${c})`:`hsl(0 0% 100% / ${c})`,backdropFilter:`url(#${S}) saturate(${u})`,boxShadow:F?`0 0 2px 1px color-mix(in oklch, white, transparent 65%) inset,
239             0 0 10px 4px color-mix(in oklch, white, transparent 85%) inset,
240             0px 4px 16px rgba(17, 17, 26, 0.05),
241             0px 8px 24px rgba(17, 17, 26, 0.05),
242             0px 16px 56px rgba(17, 17, 26, 0.05),
243             0px 4px 16px rgba(17, 17, 26, 0.05) inset,
244             0px 8px 24px rgba(17, 17, 26, 0.05) inset,
245             0px 16px 56px rgba(17, 17, 26, 0.05) inset`:`0 0 2px 1px color-mix(in oklch, black, transparent 85%) inset,
246             0 0 10px 4px color-mix(in oklch, black, transparent 90%) inset,
247             0px 4px 16px rgba(17, 17, 26, 0.05),
248             0px 8px 24px rgba(17, 17, 26, 0.05),
249             0px 16px 56px rgba(17, 17, 26, 0.05),
250             0px 4px 16px rgba(17, 17, 26, 0.05) inset,
251             0px 8px 24px rgba(17, 17, 26, 0.05) inset,
252             0px 16px 56px rgba(17, 17, 26, 0.05) inset`}:F?H?{...J,background:"rgba(255, 255, 255, 0.1)",backdropFilter:"blur(12px) saturate(1.8) brightness(1.2)",WebkitBackdropFilter:"blur(12px) saturate(1.8) brightness(1.2)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:`inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
253                    inset 0 -1px 0 0 rgba(255, 255, 255, 0.1)`}:{...J,background:"rgba(0, 0, 0, 0.4)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:`inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
254                      inset 0 -1px 0 0 rgba(255, 255, 255, 0.1)`}:H?{...J,background:"rgba(255, 255, 255, 0.25)",backdropFilter:"blur(12px) saturate(1.8) brightness(1.1)",WebkitBackdropFilter:"blur(12px) saturate(1.8) brightness(1.1)",border:"1px solid rgba(255, 255, 255, 0.3)",boxShadow:`0 8px 32px 0 rgba(31, 38, 135, 0.2),
255                  0 2px 16px 0 rgba(31, 38, 135, 0.1),
256                  inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
257                  inset 0 -1px 0 0 rgba(255, 255, 255, 0.2)`}:{...J,background:"rgba(255, 255, 255, 0.4)",border:"1px solid rgba(255, 255, 255, 0.3)",boxShadow:`inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
258                    inset 0 -1px 0 0 rgba(255, 255, 255, 0.3)`}},[x,e,n,i,c,u,$,H,F,S]),j=b.useMemo(()=>`relative flex items-center justify-center overflow-hidden transition-opacity duration-[260ms] ease-out ${F?"focus-visible:outline-2 focus-visible:outline-[#0A84FF] focus-visible:outline-offset-2":"focus-visible:outline-2 focus-visible:outline-[#007AFF] focus-visible:outline-offset-2"} ${y}`,[F,y]);return _.jsxs("div",{ref:P,className:j,style:O,children:[_.jsx("svg",{className:"w-full h-full pointer-events-none absolute inset-0 opacity-0 -z-10",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("defs",{children:_.jsxs("filter",{id:S,colorInterpolationFilters:"sRGB",x:"0%",y:"0%",width:"100%",height:"100%",children:[_.jsx("feImage",{ref:E,x:"0",y:"0",width:"100%",height:"100%",preserveAspectRatio:"none",result:"map"}),_.jsx("feDisplacementMap",{ref:M,in:"SourceGraphic",in2:"map",id:"redchannel",result:"dispRed"}),_.jsx("feColorMatrix",{in:"dispRed",type:"matrix",values:`1 0 0 0 0
259                      0 0 0 0 0
260                      0 0 0 0 0
261                      0 0 0 1 0`,result:"red"}),_.jsx("feDisplacementMap",{ref:N,in:"SourceGraphic",in2:"map",id:"greenchannel",result:"dispGreen"}),_.jsx("feColorMatrix",{in:"dispGreen",type:"matrix",values:`0 0 0 0 0
262                      0 1 0 0 0
263                      0 0 0 0 0
264                      0 0 0 1 0`,result:"green"}),_.jsx("feDisplacementMap",{ref:k,in:"SourceGraphic",in2:"map",id:"bluechannel",result:"dispBlue"}),_.jsx("feColorMatrix",{in:"dispBlue",type:"matrix",values:`0 0 0 0 0
265                      0 0 0 0 0
266                      0 0 1 0 0
267                      0 0 0 1 0`,result:"blue"}),_.jsx("feBlend",{in:"red",in2:"green",mode:"screen",result:"rg"}),_.jsx("feBlend",{in:"rg",in2:"blue",mode:"screen",result:"output"}),_.jsx("feGaussianBlur",{ref:z,in:"output",stdDeviation:"0.7"})]})})}),_.jsx("div",{className:"w-full h-full flex items-center justify-center p-2 rounded-[inherit] relative z-10",children:t})]})}),G2=b.forwardRef(({className:t,children:e,...n},i)=>_.jsx(Mj,{className:ot("w-full h-auto",t),width:"100%",height:"auto",...n,children:_.jsx("div",{className:"w-full",children:e})}));G2.displayName="GlassCard";const Tj=b.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:ot("flex flex-col space-y-1.5 p-6",t),...e}));Tj.displayName="GlassCardHeader";const Cj=b.forwardRef(({className:t,...e},n)=>_.jsx("h3",{ref:n,className:ot("text-2xl font-semibold leading-none tracking-tight text-foreground",t),...e}));Cj.displayName="GlassCardTitle";const Aj=b.forwardRef(({className:t,...e},n)=>_.jsx("p",{ref:n,className:ot("text-sm text-muted-foreground",t),...e}));Aj.displayName="GlassCardDescription";const Rj=b.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:ot("p-6 pt-0",t),...e}));Rj.displayName="GlassCardContent";const Pj=b.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:ot("flex items-center p-6 pt-0",t),...e}));Pj.displayName="GlassCardFooter";function im(){const[t,e]=b.useState(!1),n=Nc(),i=[{label:"Services",href:"#services"},{label:"About",href:"#about"},{label:"Contact",href:"#contact"}],r=o=>{const a=document.querySelector(o);a&&(a.scrollIntoView({behavior:"smooth"}),e(!1))},s=n.pathname==="/";return _.jsx(ze.nav,{initial:{opacity:0,y:-20}
267,animate:{opacity:1,y:0},transition:{duration:.8},className:"fixed top-0 left-0 right-0 z-50 p-6",children:_.jsx(G2,{className:"max-w-7xl mx-auto p-0",children:_.jsxs("div",{className:"w-full rounded-2xl border border-border/50 backdrop-blur-md",children:[_.jsxs("div",{className:"flex items-center justify-between px-6 py-4",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-hero flex items-center justify-center",children:_.jsx("img",{src:"./logo.png",alt:"logo",className:"rounded-xl"})}),_.jsx("span",{className:"text-xl font-bold text-foreground",children:"Nova Stack"})]}),_.jsx("div",{className:"hidden md:flex items-center gap-8",children:i.map(o=>o.href.startsWith("#")?s?_.jsx("button",{onClick:()=>r(o.href),className:"text-muted-foreground hover:text-nova-purple transition-colors font-medium",children:o.label},o.label):_.jsx(Jo,{to:`/${o.href}`,className:"text-muted-foreground hover:text-nova-purple transition-colors font-medium",onClick:()=>e(!1),children:o.label},o.label):_.jsx(Jo,{to:o.href,className:"text-muted-foreground hover:text-nova-purple transition-colors font-medium",onClick:()=>e(!1),children:o.label},o.label))}),_.jsx("button",{onClick:()=>e(!t),className:"md:hidden text-foreground hover:text-nova-purple transition-colors",children:t?_.jsx(n_,{className:"w-6 h-6"}):_.jsx(ZO,{className:"w-6 h-6"})})]}),t&&_.jsx(ze.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden border-t border-border/50",children:_.jsx("div",{className:"p-6 space-y-4",children:i.map(o=>o.href.startsWith("#")?s?_.jsx(Cu,{variant:"outline",onClick:()=>r(o.href),className:"block w-full text-left transition-colors font-medium py-2",children:o.label},o.label):_.jsx(Jo,{to:`/${o.href}`,className:"block w-full text-left transition-colors font-medium py-2",onClick:()=>e(!1),children:_.jsx(Cu,{variant:"outline",className:"w-full justify-start",children:o.label})},o.label):_.jsx(Jo,{to:o.href,className:"block w-full text-left transition-colors font-medium py-2",onClick:()=>e(!1),children:_.jsx(Cu,{variant:"outline",className:"w-full justify-start",children:o.label})},o.label))})})]})})})}const Dj="modulepreload",Lj=function(t){return"/"+t},$E={},Nj=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(l=>{if(l=Lj(l),l in $E)return;$E[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Dj,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},Ij=fe.lazy(()=>Nj(()=>import("./GradientBlinds-GvPCu98T.js"),[])),kj=t=>_.jsx(b.Suspense,{fallback:_.jsx("div",{className:"w-full h-full bg-background"}),children:_.jsx(Ij,{...t})}),rd=({children:t,onClick:e,className:n="",disabled:i=!1,glowColor:r="#b55333",backgroundColor:s="#080808",textColor:o="#ffffff",hoverTextColor:a="#d1d1d1",type:l="button"})=>{const c=b.useRef(null),[u,d]=b.useState({x:50,y:50}),[f,h]=b.useState(!1),v=p=>{if(c.current){const y=c.current.getBoundingClientRect(),x=p.clientX-y.left,w=p.clientY-y.top;d({x,y:w})}},g=()=>{h(!0)},m=()=>{h(!1)};return _.jsxs("button",{ref:c,onClick:e,disabled:i,onMouseMove:v,onMouseEnter:g,onMouseLeave:m,type:l,className:`
268        relative inline-block px-8 py-4
269        cursor-pointer overflow-hidden transition-colors duration-300 
270        text-xl rounded-lg z-10 font-sans
271        border-[0.5px] border-secondary-foreground/20
272        ${i?"opacity-50 cursor-not-allowed":""}
273        ${n}
274      `,style:{backgroundColor:s,color:f?a:o},children:[_.jsx("div",{className:`
275          absolute w-[200px] h-[200px] rounded-full opacity-50 pointer-events-none 
276          transition-transform duration-400 ease-out -translate-x-1/2 -translate-y-1/2
277          ${f?"scale-120":"scale-0"}
278        `,style:{left:`${u.x}px`,top:`${u.y}px`,background:`radial-gradient(circle, ${r} 10%, transparent 70%)`,zIndex:0}}),_.jsx("span",{className:"relative z-10",children:t})]})};var mg="focusScope.autoFocusOnMount",gg="focusScope.autoFocusOnUnmount",XE={bubbles:!1,cancelable:!0},Oj="FocusScope",W2=b.forwardRef((t,e)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...o}=t,[a,l]=b.useState(null),c=yn(r),u=yn(s),d=b.useRef(null),f=Yt(e,g=>l(g)),h=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let g=function(x){if(h.paused||!a)return;const w=x.target;a.contains(w)?d.current=w:Fs(d.current,{select:!0})},m=function(x){if(h.paused||!a)return;const w=x.relatedTarget;w!==null&&(a.contains(w)||Fs(d.current,{select:!0}))},p=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&Fs(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",m);const y=new MutationObserver(p);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",m),y.disconnect()}}},[i,a,h.paused]),b.useEffect(()=>{if(a){YE.add(h);const g=document.activeElement;if(!a.contains(g)){const p=new CustomEvent(mg,XE);a.addEventListener(mg,c),a.dispatchEvent(p),p.defaultPrevented||(Fj(Hj($2(a)),{select:!0}),document.activeElement===g&&Fs(a))}return()=>{a.removeEventListener(mg,c),setTimeout(()=>{const p=new CustomEvent(gg,XE);a.addEventListener(gg,u),a.dispatchEvent(p),p.defaultPrevented||Fs(g??document.body,{select:!0}),a.removeEventListener(gg,u),YE.remove(h)},0)}}},[a,c,u,h]);const v=b.useCallback(g=>{if(!n&&!i||h.paused)return;const m=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,p=document.activeElement;if(m&&p){const y=g.currentTarget,[x,w]=Uj(y);x&&w?!g.shiftKey&&p===w?(g.preventDefault(),n&&Fs(x,{select:!0})):g.shiftKey&&p===x&&(g.preventDefault(),n&&Fs(w,{select:!0})):p===y&&g.preventDefault()}},[n,i,h.paused]);return _.jsx(Et.div,{tabIndex:-1,...o,ref:f,onKeyDown:v})});W2.displayName=Oj;function Fj(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(Fs(i,{select:e}),document.activeElement!==n)return}function Uj(t){const e=$2(t),n=qE(e,t),i=qE(e.reverse(),t);return[n,i]}function $2(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function qE(t,e){for(const n of t)if(!zj(n,{upTo:e}))return n}function zj(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Bj(t){return t instanceof HTMLInputElement&&"select"in t}function Fs(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Bj(t)&&e&&t.select()}}var YE=Vj();function Vj(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=KE(t,e),t.unshift(e)},remove(e){var n;t=KE(t,e),(n=t[0])==null||n.resume()}}}function KE(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function Hj(t){return t.filter(e=>e.tagName!=="A")}var vg=0;function jj(){b.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ZE()),document.body.insertAdjacentElement("beforeend",t[1]??ZE()),vg++,()=>{vg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),vg--}},[])}function ZE(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Hs=function(){return Hs=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Hs.apply(this,arguments)};function Gj(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function Wj(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,s;i<r;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))}var xh="right-scroll-bar-position",_h="width-before-scroll-bar",$j="with-scroll-bars-hidden",Xj="--removed-body-scroll-bar-size";function yg(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function qj(t,e){var n=b.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(i){var r=n.value;r!==i&&(n.value=i,n.callback(i,r))}}}})[0];return n.callback=e,n.facade}var Yj=typeof window<"u"?b.useLayoutEffect:b.useEffect,QE=new WeakMap;function Kj(t,e){var n=qj(null,function(i){return t.forEach(function(r){return yg(r,i)})});return Yj(function(){var i=QE.get(n);if(i){var r=new Set(i),s=new Set(t),o=n.current;r.forEach(function(a){s.has(a)||yg(a,null)}
vendor: 4,702 bytes, lines 278-293
278),s.forEach(function(a){r.has(a)||yg(a,o)})}QE.set(n,t)},[t]),n}var fp=function(){return fp=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},fp.apply(this,arguments)};function Zj(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function Qj(t){return t}function Jj(t,e){e===void 0&&(e=Qj);var n=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,i);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(i=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){i=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var u=o;o=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return r}function e6(t){t===void 0&&(t={});var e=Jj(null);return e.options=fp({async:!0,ssr:!1},t),e}var X2=function(t){var e=t.sideCar,n=Zj(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,fp({},n))};X2.isSideCarExport=!0;function t6(t,e){return t.useMedium(e),X2}var q2=e6(),xg=function(){},rm=b.forwardRef(function(t,e){var n=b.useRef(null),i=b.useState({onScrollCapture:xg,onWheelCapture:xg,onTouchMoveCapture:xg}),r=i[0],s=i[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,h=t.noRelative,v=t.noIsolation,g=t.inert,m=t.allowPinchZoom,p=t.as,y=p===void 0?"div":p,x=t.gapMode,w=Gj(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,T=Kj([n,e]),C=Hs(Hs({},w),r);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:q2,removeScrollBar:c,shards:d,noRelative:h,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:x}),o?b.cloneElement(b.Children.only(a),Hs(Hs({},C),{ref:T})):b.createElement(y,Hs({},C,{className:l,ref:T}),a))});rm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rm.classNames={fullWidth:_h,zeroRight:xh};var n6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function i6(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=n6();return e&&t.setAttribute("nonce",e),t}function r6(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function s6(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var o6=function(){var t=0,e=null;return{add:function(n){t==0&&(e=i6())&&(r6(e,n),s6(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},a6=function(){var t=o6();return function(e,n){b.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Y2=function(){var t=a6(),e=function(n){var i=n.styles,r=n.dynamic;return t(i,r),null};return e},l6={left:0,top:0,right:0,gap:0},_g=function(t){return parseInt(t||"",10)||0},c6=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],i=e[t==="padding"?"paddingTop":"marginTop"],r=e[t==="padding"?"paddingRight":"marginRight"];return[_g(n),_g(i),_g(r)]},u6=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return l6;var e=c6(t),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-n+e[2]-e[0])}},d6=Y2(),zl="data-scroll-locked",f6=function(t,e,n,i){var r=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),`
279  .`.concat($j,` {
280   overflow: hidden `).concat(i,`;
281   padding-right: `).concat(a,"px ").concat(i,`;
282  }
283  body[`).concat(zl,`] {
284    overflow: hidden `).concat(i,`;
285    overscroll-behavior: contain;
286    `).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&`
287    padding-left: `.concat(r,`px;
288    padding-top: `).concat(s,`px;
289    padding-right: `).concat(o,`px;
290    margin-left:0;
291    margin-top:0;
292    margin-right: `).concat(a,"px ").concat(i,`;
293    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";
293")].filter(Boolean).join(""),`
294  }
295  
296  .`).concat(xh,` {
297    right: `).concat(a,"px ").concat(i,`;
298  }
299  
300  .`).concat(_h,` {
301    margin-right: `).concat(a,"px ").concat(i,`;
302  }
303  
304  .`).concat(xh," .").concat(xh,` {
305    right: 0 `).concat(i,`;
306  }
307  
308  .`).concat(_h," .").concat(_h,` {
309    margin-right: 0 `).concat(i,`;
310  }
311  
312  body[`).concat(zl,`] {
313    `).concat(Xj,": ").concat(a,`px;
314  }
315`)},JE=function(){var t=parseInt(document.body.getAttribute(zl)||"0",10);return isFinite(t)?t:0},h6=function(){b.useEffect(function(){return document.body.setAttribute(zl,(JE()+1).toString()),function(){var t=JE()-1;t<=0?document.body.removeAttribute(zl):document.body.setAttribute(zl,t.toString())}},[])},p6=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,r=i===void 0?"margin":i;h6();var s=b.useMemo(function(){return u6(r)},[r]);return b.createElement(d6,{styles:f6(s,!e,r,n?"":"!important")})},Jy=!1;if(typeof window<"u")try{var pf=Object.defineProperty({},"passive",{get:function(){return Jy=!0,!0}});window.addEventListener("test",pf,pf),window.removeEventListener("test",pf,pf)}catch{Jy=!1}var Ba=Jy?{passive:!1}:!1,m6=function(t){return t.tagName==="TEXTAREA"},K2=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!m6(t)&&n[e]==="visible")},g6=function(t){return K2(t,"overflowY")},v6=function(t){return K2(t,"overflowX")},e1=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=Z2(t,i);if(r){var s=Q2(t,i),o=s[1],a=s[2];if(o>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},y6=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},x6=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},Z2=function(t,e){return t==="v"?g6(e):v6(e)},Q2=function(t,e){return t==="v"?y6(e):x6(e)},_6=function(t,e){return t==="h"&&e==="rtl"?-1:1},w6=function(t,e,n,i,r){var s=_6(t,window.getComputedStyle(e).direction),o=s*i,a=n.target,l=e.contains(a),c=!1,u=o>0,d=0,f=0;do{if(!a)break;var h=Q2(t,a),v=h[0],g=h[1],m=h[2],p=g-m-s*v;(v||p)&&Z2(t,a)&&(d+=p,f+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(d)<1||!r)||!u&&(Math.abs(f)<1||!r))&&(c=!0),c},mf=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},t1=function(t){return[t.deltaX,t.deltaY]},n1=function(t){return t&&"current"in t?t.current:t},b6=function(t,e){return t[0]===e[0]&&t[1]===e[1]},S6=function(t){return`
316  .block-interactivity-`.concat(t,` {pointer-events: none;}
317  .allow-interactivity-`).concat(t,` {pointer-events: all;}
318`)},E6=0,Va=[];function M6(t){var e=b.useRef([]),n=b.useRef([0,0]),i=b.useRef(),r=b.useState(E6++)[0],s=b.useState(Y2)[0],o=b.useRef(t);b.useEffect(function(){o.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(r));var g=Wj([t.lockRef.current],(t.shards||[]).map(n1),!0).filter(Boolean);return g.forEach(function(m){return m.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),g.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(r))})}}},[t.inert,t.lockRef.current,t.shards]);var a=b.useCallback(function(g,m){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var p=mf(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-p[0],w="deltaY"in g?g.deltaY:y[1]-p[1],S,T=g.target,C=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&C==="h"&&T.type==="range")return!1;var P=e1(C,T);if(!P)return!0;if(P?S=C:(S=C==="v"?"h":"v",P=e1(C,T)),!P)return!1;if(!i.current&&"changedTouches"in g&&(x||w)&&(i.current=S),!S)return!0;var E=i.current||S;return w6(E,m,g,E==="h"?x:w,!0)},[]),l=b.useCallback(function(g){var m=g;if(!(!Va.length||Va[Va.length-1]!==s)){var p="deltaY"in m?t1(m):mf(m),y=e.current.filter(function(S){return S.name===m.type&&(S.target===m.target||m.target===S.shadowParent)&&b6(S.delta,p)})[0];if(y&&y.should){m.cancelable&&m.preventDefault();return}
vendor: 4,919 bytes, line 318
318if(!y){var x=(o.current.shards||[]).map(n1).filter(Boolean).filter(function(S){return S.contains(m.target)}),w=x.length>0?a(m,x[0]):!o.current.noIsolation;w&&m.cancelable&&m.preventDefault()}}},[]),c=b.useCallback(function(g,m,p,y){var x={name:g,delta:m,target:p,should:y,shadowParent:T6(p)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(w){return w!==x})},1)},[]),u=b.useCallback(function(g){n.current=mf(g),i.current=void 0},[]),d=b.useCallback(function(g){c(g.type,t1(g),g.target,a(g,t.lockRef.current))},[]),f=b.useCallback(function(g){c(g.type,mf(g),g.target,a(g,t.lockRef.current))},[]);b.useEffect(function(){return Va.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ba),document.addEventListener("touchmove",l,Ba),document.addEventListener("touchstart",u,Ba),function(){Va=Va.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,Ba),document.removeEventListener("touchmove",l,Ba),document.removeEventListener("touchstart",u,Ba)}},[]);var h=t.removeScrollBar,v=t.inert;return b.createElement(b.Fragment,null,v?b.createElement(s,{styles:S6(r)}):null,h?b.createElement(p6,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function T6(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const C6=t6(q2,M6);var J2=b.forwardRef(function(t,e){return b.createElement(rm,Hs({},t,{ref:e,sideCar:C6}))});J2.classNames=rm.classNames;var A6=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ha=new WeakMap,gf=new WeakMap,vf={},wg=0,eD=function(t){return t&&(t.host||eD(t.parentNode))},R6=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=eD(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},P6=function(t,e,n,i){var r=R6(e,Array.isArray(t)?t:[t]);vf[n]||(vf[n]=new WeakMap);var s=vf[n],o=[],a=new Set,l=new Set(r),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};r.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var h=f.getAttribute(i),v=h!==null&&h!=="false",g=(Ha.get(f)||0)+1,m=(s.get(f)||0)+1;Ha.set(f,g),s.set(f,m),o.push(f),g===1&&v&&gf.set(f,!0),m===1&&f.setAttribute(n,"true"),v||f.setAttribute(i,"true")}catch(p){console.error("aria-hidden: cannot operate on ",f,p)}})};return u(e),a.clear(),wg++,function(){o.forEach(function(d){var f=Ha.get(d)-1,h=s.get(d)-1;Ha.set(d,f),s.set(d,h),f||(gf.has(d)||d.removeAttribute(i),gf.delete(d)),h||d.removeAttribute(n)}),wg--,wg||(Ha=new WeakMap,Ha=new WeakMap,gf=new WeakMap,vf={})}},D6=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),r=A6(t);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live]"))),P6(i,r,n,"aria-hidden")):function(){return null}},sm="Dialog",[tD,ote]=Ac(sm),[L6,xr]=tD(sm),nD=t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:o=!0}=t,a=b.useRef(null),l=b.useRef(null),[c,u]=DA({prop:i,defaultProp:r??!1,onChange:s,caller:sm});return _.jsx(L6,{scope:e,triggerRef:a,contentRef:l,contentId:qm(),titleId:qm(),descriptionId:qm(),open:c,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(d=>!d),[u]),modal:o,children:n})};nD.displayName=sm;var iD="DialogTrigger",rD=b.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=xr(iD,n),s=Yt(e,r.triggerRef);return _.jsx(Et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ew(r.open),...i,ref:s,onClick:dt(t.onClick,r.onOpenToggle)})});rD.displayName=iD;var Q_="DialogPortal",[N6,sD]=tD(Q_,{forceMount:void 0}),oD=t=>{const{__scopeDialog:e,forceMount:n,children:i,container:r}=t,s=xr(Q_,e);return _.jsx(N6,{scope:e,forceMount:n,children:b.Children.map(i,o=>_.jsx(Hr,{present:n||s.open,children:_.jsx(Kx,{asChild:!0,container:r,children:o})}))})};oD.displayName=Q_;var hp="DialogOverlay",aD=b.forwardRef((t,e)=>{const n=sD(hp,t.__scopeDialog),{forceMount:i=n.forceMount,...r}=t,s=xr(hp,t.__scopeDialog);return s.modal?_.jsx(Hr,{present:i||s.open,children:_.jsx(k6,{...r,ref:e})}):null});aD.displayName=hp;var I6=$u("DialogOverlay.RemoveScroll"),k6=b.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=xr(hp,n);return _.jsx(J2,{as:I6,allowPinchZoom:!0,shards:[r.contentRef],children:_.jsx(Et.div,{"data-state":ew(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),Ma="DialogContent",lD=b.forwardRef((t,e)=>{const n=sD(Ma,t.__scopeDialog),{forceMount:i=n.forceMount,...r}=t,s=xr(Ma,t.__scopeDialog);return _.jsx(Hr,{present:i||s.open,children:s.modal?_.jsx(O6,{...r,ref:e}):_.jsx(F6,{...r,ref:e})})});lD.displayName=Ma;var O6=b.forwardRef((t,e)=>{const n=xr(Ma,t.__scopeDialog),i=b.useRef(null),r=Yt(e,n.contentRef,i);return b.useEffect(()=>
vendor: 4,135 bytes, lines 318-322
318{const s=i.current;if(s)return D6(s)},[]),_.jsx(cD,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dt(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:dt(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:dt(t.onFocusOutside,s=>s.preventDefault())})}),F6=b.forwardRef((t,e)=>{const n=xr(Ma,t.__scopeDialog),i=b.useRef(!1),r=b.useRef(!1);return _.jsx(cD,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const o=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),cD=b.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,...o}=t,a=xr(Ma,n),l=b.useRef(null),c=Yt(e,l);return jj(),_.jsxs(_.Fragment,{children:[_.jsx(W2,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:_.jsx(Vp,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ew(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),_.jsxs(_.Fragment,{children:[_.jsx(U6,{titleId:a.titleId}),_.jsx(B6,{contentRef:l,descriptionId:a.descriptionId})]})]})}),J_="DialogTitle",uD=b.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=xr(J_,n);return _.jsx(Et.h2,{id:r.titleId,...i,ref:e})});uD.displayName=J_;var dD="DialogDescription",fD=b.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=xr(dD,n);return _.jsx(Et.p,{id:r.descriptionId,...i,ref:e})});fD.displayName=dD;var hD="DialogClose",pD=b.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,r=xr(hD,n);return _.jsx(Et.button,{type:"button",...i,ref:e,onClick:dt(t.onClick,()=>r.onOpenChange(!1))})});pD.displayName=hD;function ew(t){return t?"open":"closed"}var mD="DialogTitleWarning",[ate,gD]=jk(mD,{contentName:Ma,titleName:J_,docsSlug:"dialog"}),U6=({titleId:t})=>{const e=gD(mD),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
319
320If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
321
322For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},z6="DialogDescriptionWarning",B6=({contentRef:t,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gD(z6).contentName}}.`;return b.useEffect(()=>{var s;const r=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&r&&(document.getElementById(e)||console.warn(i))},[i,t,e]),null},V6=nD,H6=rD,j6=oD,vD=aD,yD=lD,xD=uD,_D=fD,G6=pD;const W6=V6,$6=H6,X6=j6,wD=b.forwardRef(({className:t,...e},n)=>_.jsx(vD,{ref:n,className:ot("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));wD.displayName=vD.displayName;const bD=b.forwardRef(({className:t,children:e,...n},i)=>_.jsxs(X6,{children:[_.jsx(wD,{}),_.jsxs(yD,{ref:i,className:ot("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:[e,_.jsxs(G6,{className:"absolute right-4 top-4 roun
322ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[_.jsx(n_,{className:"h-4 w-4"}),_.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bD.displayName=yD.displayName;const SD=({className:t,...e})=>_.jsx("div",{className:ot("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});SD.displayName="DialogHeader";const ED=b.forwardRef(({className:t,...e},n)=>_.jsx(xD,{ref:n,className:ot("text-lg font-semibold leading-none tracking-tight",t),...e}));ED.displayName=xD.displayName;const MD=b.forwardRef(({className:t,...e},n)=>_.jsx(_D,{ref:n,className:ot("text-sm text-muted-foreground",t),...e}));MD.displayName=_D.displayName;function q6({calLink:t}){return b.useEffect(()=>{(function(e,n,i){let r=function(o,a){o.q.push(a)},s=e.document;e.Cal=e.Cal||function(){let o=e.Cal,a=arguments;if(o.loaded||(o.ns={},o.q=o.q||[],s.head.appendChild(s.createElement("script")).src=n,o.loaded=!0),a[0]===i){const l=function(){r(l,arguments)},c=a[1];l.q=l.q||[],typeof c=="string"?(o.ns[c]=o.ns[c]||l,r(o.ns[c],a),r(o,["initNamespace",c])):r(o,a);return}r(o,a)}})(window,"https://app.cal.com/embed/embed.js","init"),Cal("init","15min",{origin:"https://app.cal.com"}),Cal.ns["15min"]("inline",{elementOrSelector:"#my-cal-inline-15min",config:{layout:"month_view"},calLink:t}),Cal.ns["15min"]("ui",{hideEventTypeDetails:!1,layout:"month_view"})},[t]),_.jsx("div",{id:"my-cal-inline-15min",style:{width:"100%",height:"100%",overflow:"scroll"}})}var Y6=b.createContext(void 0);function K6(t){const e=b.useContext(Y6);return t||e||"ltr"}function Z6(t,[e,n]){return Math.min(n,Math.max(e,t))}function Q6(t,e){return b.useReducer((n,i)=>e[n][i]??n,t)}var tw="ScrollArea",[TD,lte]=Ac(tw),[J6,Wi]=TD(tw),CD=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:i="hover",dir:r,scrollHideDelay:s=600,...o}=t,[a,l]=b.useState(null),[c,u]=b.useState(null),[d,f]=b.useState(null),[h,v]=b.useState(null),[g,m]=b.useState(null),[p,y]=b.useState(0),[x,w]=b.useState(0),[S,T]=b.useState(!1),[C,P]=b.useState(!1),E=Yt(e,N=>l(N)),M=K6(r);return _.jsx(J6,{scope:n,type:i,dir:M,scrollHideDelay:s,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:S,onScrollbarXEnabledChange:T,scrollbarY:g,onScrollbarYChange:m,scrollbarYEnabled:C,onScrollbarYEnabledChange:P,onCornerWidthChange:y,onCornerHeightChange:w,children:_.jsx(Et.div,{dir:M,...o,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});CD.displayName=tw;var AD="ScrollAreaViewport",RD=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:i,nonce:r,...s}=t,o=Wi(AD,n),a=b.useRef(null),l=Yt(e,a,o.onViewportChange);return _.jsxs(_.Fragment,{children:[_.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),_.jsx(Et.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style},children:_.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});RD.displayName=AD;var Gr="ScrollAreaScrollbar",nw=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=Wi(Gr,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=r,a=t.orientation==="horizontal";return b.useEffect(()=>(a?s(!0):o(!0),()=>{a?s(!1):o(!1)}),[a,s,o]),r.type==="hover"?_.jsx(eG,{...i,ref:e,forceMount:n}):r.type==="scroll"?_.jsx(tG,{...i,ref:e,forceMount:n}):r.type==="auto"?_.jsx(PD,{...i,ref:e,forceMount:n}):r.type==="always"?_.jsx(iw,{...i,ref:e}):null});nw.displayName=Gr;var eG=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=Wi(Gr,t.__scopeScrollArea),[s,o]=b.useState(!1);return b.useEffect(()=>{const a=r.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),o(!0)},u=()=>{l=window.setTimeout(()=>
vendor: 7,528 bytes, line 322
322o(!1),r.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[r.scrollArea,r.scrollHideDelay]),_.jsx(Hr,{present:n||s,children:_.jsx(PD,{"data-state":s?"visible":"hidden",...i,ref:e})})}),tG=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=Wi(Gr,t.__scopeScrollArea),s=t.orientation==="horizontal",o=am(()=>l("SCROLL_END"),100),[a,l]=Q6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,r.scrollHideDelay,l]),b.useEffect(()=>{const c=r.viewport,u=s?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(l("SCROLL"),o()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[r.viewport,s,l,o]),_.jsx(Hr,{present:n||a!=="hidden",children:_.jsx(iw,{"data-state":a==="hidden"?"hidden":"visible",...i,ref:e,onPointerEnter:dt(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:dt(t.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),PD=b.forwardRef((t,e)=>{const n=Wi(Gr,t.__scopeScrollArea),{forceMount:i,...r}=t,[s,o]=b.useState(!1),a=t.orientation==="horizontal",l=am(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?c:u)}},10);return pc(n.viewport,l),pc(n.content,l),_.jsx(Hr,{present:i||s,children:_.jsx(iw,{"data-state":s?"visible":"hidden",...r,ref:e})})}),iw=b.forwardRef((t,e)=>{const{orientation:n="vertical",...i}=t,r=Wi(Gr,t.__scopeScrollArea),s=b.useRef(null),o=b.useRef(0),[a,l]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=kD(a.viewport,a.content),u={...i,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>s.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function d(f,h){return aG(f,o.current,a,h)}return n==="horizontal"?_.jsx(nG,{...u,ref:e,onThumbPositionChange:()=>{if(r.viewport&&s.current){const f=r.viewport.scrollLeft,h=i1(f,a,r.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{r.viewport&&(r.viewport.scrollLeft=f)},onDragScroll:f=>{r.viewport&&(r.viewport.scrollLeft=d(f,r.dir))}}):n==="vertical"?_.jsx(iG,{...u,ref:e,onThumbPositionChange:()=>{if(r.viewport&&s.current){const f=r.viewport.scrollTop,h=i1(f,a);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{r.viewport&&(r.viewport.scrollTop=f)},onDragScroll:f=>{r.viewport&&(r.viewport.scrollTop=d(f))}}):null}),nG=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...r}=t,s=Wi(Gr,t.__scopeScrollArea),[o,a]=b.useState(),l=b.useRef(null),c=Yt(e,l,s.onScrollbarXChange);return b.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),_.jsx(LD,{"data-orientation":"horizontal",...r,ref:c,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":om(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.x),onDragScroll:u=>t.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(s.viewport){const f=s.viewport.scrollLeft+u.deltaX;t.onWheelScroll(f),FD(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:mp(o.paddingLeft),paddingEnd:mp(o.paddingRight)}})}})}),iG=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...r}=t,s=Wi(Gr,t.__scopeScrollArea),[o,a]=b.useState(),l=b.useRef(null),c=Yt(e,l,s.onScrollbarYChange);return b.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),_.jsx(LD,{"data-orientation":"vertical",...r,ref:c,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":om(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.y),onDragScroll:u=>t.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(s.viewport){const f=s.viewport.scrollTop+u.deltaY;t.onWheelScroll(f),FD(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:mp(o.paddingTop),paddingEnd:mp(o.paddingBottom)}})}})}),[rG,DD]=TD(Gr),LD=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:r,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=t,h=Wi(Gr,n),[v,g]=b.useState(null),m=Yt(e,E=>g(E)),p=b.useRef(null),y=b.useRef(""),x=h.viewport,w=i.content-i.viewport,S=yn(u),T=yn(l),C=am(d,10);function P(E){if(p.current){const M=E.clientX-p.current.left,N=E.clientY-p.current.top;c({x:M,y:N})}}return b.useEffect(()=>{const E=M=>{const N=M.target;(v==null?void 0:v.contains(N))&&S(M,w)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[x,v,w,S]),b.useEffect(T,[i,T]),pc(v,C),pc(h.content,C),_.jsx(rG,{scope:n,scrollbar:v,hasThumb:r,onThumbChange:yn(s),onThumbPointerUp:yn(o),onThumbPositionChange:T,onThumbPointerDown:yn(a),children:_.jsx(Et.div,{...f,ref:m,style:{position:"absolute",...f.style},onPointerDown:dt(t.onPointerDown,E=>{E.button===0&&(E.target.setPointerCapture(E.pointerId),p.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),P(E))}),onPointerMove:dt(t.onPointerMove,P),onPointerUp:dt(t.onPointerUp,E=>{const M=E.target;M.hasPointerCapture(E.pointerId)&&M.releasePointerCapture(E.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),p.current=null})})})}),pp="ScrollAreaThumb",ND=b.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=DD(pp,t.__scopeScrollArea);return _.jsx(Hr,{present:n||r.hasThumb,children:_.jsx(sG,{ref:e,...i})})}),sG=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:i,...r}=t,s=Wi(pp,n),o=DD(pp,n),{onThumbPositionChange:a}=o,l=Yt(e,d=>o.onThumbChange(d)),c=b.useRef(void 0),u=am(()=>{c.current&&(c.current(),c.current=void 0)},100);return b.useEffect(()=>{const d=s.viewport;if(d){const f=()=>{if(u(),!c.current){const h=lG(d,a);c.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[s.viewport,u,a]),_.jsx(Et.div,{"data-state":o.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:dt(t.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),v=d.clientX-h.left,g=d.clientY-h.top;o.onThumbPointerDown({x:v,y:g})}),onPointerUp:dt(t.onPointerUp,o.onThumbPointerUp)})});ND.displayName=pp;var rw="ScrollAreaCorner",ID=b.forwardRef((t,e)=>{const n=Wi(rw,t.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?_.jsx(oG,{...t,ref:e}):null});ID.displayName=rw;var oG=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,...i}=t,r=Wi(rw,n),[s,o]=b.useState(0),[a,l]=b.useState(0),c=!!(s&&a);return pc(r.scrollbarX,()=>{var d;const u=((d=r.scrollbarX)==null?void 0:d.offsetHeight)||0;
322r.onCornerHeightChange(u),l(u)}),pc(r.scrollbarY,()=>{var d;const u=((d=r.scrollbarY)==null?void 0:d.offsetWidth)||0;r.onCornerWidthChange(u),o(u)}),c?_.jsx(Et.div,{...i,ref:e,style:{width:s,height:a,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function mp(t){return t?parseInt(t,10):0}function kD(t,e){const n=t/e;return isNaN(n)?0:n}function om(t){const e=kD(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-n)*e;return Math.max(i,18)}function aG(t,e,n,i="ltr"){const r=om(n),s=r/2,o=e||s,a=r-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=i==="ltr"?[0,u]:[u*-1,0];return OD([l,c],d)(t)}function i1(t,e,n="ltr"){const i=om(e),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-r,o=e.content-e.viewport,a=s-i,l=n==="ltr"?[0,o]:[o*-1,0],c=Z6(t,l);return OD([0,o],[0,a])(c)}function OD(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const i=(e[1]-e[0])/(t[1]-t[0]);return e[0]+i*(n-t[0])}}function FD(t,e){return t>0&&t<e}var lG=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},i=0;return function r(){const s={left:t.scrollLeft,top:t.scrollTop},o=n.left!==s.left,a=n.top!==s.top;(o||a)&&e(),n=s,i=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(i)};function am(t,e){const n=yn(t),i=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),b.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,e)},[n,e])}function pc(t,e){const n=yn(e);zr(()=>{let i=0;if(t){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return r.observe(t),()=>{window.cancelAnimationFrame(i),r.unobserve(t)}}},[t,n])}var UD=CD,cG=RD,uG=ID;const zD=b.forwardRef(({className:t,children:e,...n},i)=>_.jsxs(UD,{ref:i,className:ot("relative overflow-hidden",t),...n,children:[_.jsx(cG,{className:"h-full w-full rounded-[inherit]",children:e}),_.jsx(BD,{}),_.jsx(uG,{})]}));zD.displayName=UD.displayName;const BD=b.forwardRef(({className:t,orientation:e="vertical",...n},i)=>_.jsx(nw,{ref:i,orientation:e,className:ot("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:_.jsx(ND,{className:"relative flex-1 rounded-full bg-border"})}));BD.displayName=nw.displayName;function VD({children:t}){return _.jsxs(W6,{children:[_.jsx($6,{asChild:!0,children:t}),_.jsxs(bD,{className:"max-w-5xl",children:[_.jsxs(SD,{children:[_.jsx(ED,{children:"Book a Call"}),_.jsx(MD,{children:"Choose a time that works for you."})]}),_.jsx("div",{className:"h-[80vh] md:h-auto",children:_.jsx(zD,{className:"h-full",children:_.jsx(q6,{calLink:"novastack/15min"})})})]})]})}const dG={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.2,delayChildren:.3}}},bg={hidden:{y:50,opacity:0},visible:{y:0,opacity:1,transition:{duration:.8,ease:"easeOut"}}};function fG(){return _.jsxs("section",{className:"relative min-h-screen mt-12 md:mt-0 flex items-center justify-center overflow-hidden",children:[_.jsx("div",{className:"w-full h-full absolute top-0 left-0 opacity-70",children:_.jsx(kj,{gradientColors:["#807e7f","#b55333"],angle:35,noise:.15,blindCount:16,blindMinWidth:60,spotlightRadius:.18,spotlightSoftness:1,spotlightOpacity:.2,mouseDampening:.8,distortAmount:43,shineDirection:"left",mixBlendMode:"lighten"})}),_.jsxs(ze.div,{className:"relative z-10 px-6 max-w-6xl mx-auto space-y-9",variants:dG,initial:"hidden",animate:"visible",children:[_.jsxs(ze.h1,{variants:bg,className:"text-5xl md:text-7xl lg:text-8xl mb-8 leading-tight w-full",children:[_.jsx(ze.span,{className:"text-foreground text-start text-9xl",animate:{opacity:[1,.7,1]},transition:{duration:3,repeat:1/0,ease:"easeInOut"},children:"Nova Stack"}),_.jsx("br",{}),_.jsx("span",{className:"text-foreground/80 text-start",children:"Shapes Tomorrow."})]}),_.jsxs(ze.div,{variants:bg,className:"flex flex-col sm:flex-row gap-6 items-center",children:[_.jsx(ze.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:_.jsx(VD,{children:_.jsx(rd,{className:"text-lg px-8 py-4 h-auto",children:"Book a Call"})})}),_.jsx(ze.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:_.jsx(rd,{glowColor:"#d1d1d1",hoverTextColor:"#ffffff",className:"text-lg px-8 py-4 h-auto",children:"View Our Work"})})]}),_.jsx(ze.p,{variants:bg,className:"text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:"We craft cutting-edge digital experiences with AI, Web3, and future technologies. From MVPs to enterprise solutions, we turn ambitious ideas into reality."})]})]})}const Qc={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5};class hG{constructor(e){this.value=e}toString(){return this.value}valueOf(){return Qc[this.value]}equals(e){return this.value===e}lessThan(e){return this.valueOf()<Qc[e]}greaterThan(e){return this.valueOf()>Qc[e]}lessThanOrEqual(e){return this.valueOf()<=Qc[e]}greaterThanOrEqual(e){return this.valueOf()>=Qc[e]}}const pG=()=>{const[t,e]=b.useState("xs");return b.useEffect(()=>{const n=()=>{const i=window.innerWidth;i>=1536?e("2xl"):i>=1280?e("xl"):i>=1024?e("lg"):i>=768?e("md"):i>=640?e("sm"):e("xs")};
vendor: 79,339 bytes, line 322
322return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),new hG(t)},na="generated",mG="pointerdown",gG="pointerup",e0="pointerleave",vG="pointerout",Ta="pointermove",yG="touchstart",r1="touchend",xG="touchmove",_G="touchcancel",wG="resize",bG="visibilitychange",ji="tsParticles - Error",Js=100,on=.5,Pn=1e3,Cn={x:0,y:0,z:0},yf={a:1,b:0,c:0,d:1},mc="random",wh="mid",Dn=2,SG=Math.PI*Dn,Sg=60,HD="true",s1="false",Eg="canvas",o1=0,rs=2,a1=4,EG=1,l1=1,c1=1,MG=4,jD=1,bh=255,ia=360,t0=100,n0=100,u1=0,i0=0,TG=60,CG=0,gp=.25,d1=on+gp,f1=0,AG=1,RG=0,PG=0,DG=1,sw=1,LG=1,h1=1,vp=0,GD=1,NG=0,IG=120,kG=0,OG=0,FG=1e4,UG=0,zG=1,yp=0,WD=1,BG=1,VG=0,p1=1,HG=0,jG=0,m1=-gp,g1=1.5,v1=0,GG=1,WG=0,r0=0,$D=1,$G=1,xp=1,XG=500,y1=50,qG=0,s0=1,XD=0,x1=1,YG=0,Do=255,Mg=3,Tg=6,KG=1,ZG=1,QG=0,JG=0,eW=0,tW=0;var vn;(function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"})(vn||(vn={}));function qD(t){return typeof t=="boolean"}function bo(t){return typeof t=="string"}function So(t){return typeof t=="number"}function Tl(t){return typeof t=="object"&&t!==null}function Wr(t){return Array.isArray(t)}function me(t){return t==null}class ui{constructor(e,n,i){if(this._updateFromAngle=(r,s)=>{this.x=Math.cos(r)*s,this.y=Math.sin(r)*s},!So(e)&&e){this.x=e.x,this.y=e.y;const r=e;this.z=r.z?r.z:Cn.z}else if(e!==void 0&&n!==void 0)this.x=e,this.y=n,this.z=i??Cn.z;else throw new Error(`${ji} Vector3d not initialized correctly`)}static get origin(){return ui.create(Cn.x,Cn.y,Cn.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(e){this._updateFromAngle(e,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(e){this._updateFromAngle(this.angle,e)}static clone(e){return ui.create(e.x,e.y,e.z)}static create(e,n,i){return new ui(e,n,i)}add(e){return ui.create(this.x+e.x,this.y+e.y,this.z+e.z)}addTo(e){this.x+=e.x,this.y+=e.y,this.z+=e.z}copy(){return ui.clone(this)}distanceTo(e){return this.sub(e).length}distanceToSq(e){return this.sub(e).getLengthSq()}div(e){return ui.create(this.x/e,this.y/e,this.z/e)}divTo(e){this.x/=e,this.y/=e,this.z/=e}getLengthSq(){return this.x**rs+this.y**rs}mult(e){return ui.create(this.x*e,this.y*e,this.z*e)}multTo(e){this.x*=e,this.y*=e,this.z*=e}normalize(){const e=this.length;e!=yp&&this.multTo(jD/e)}rotate(e){return ui.create(this.x*Math.cos(e)-this.y*Math.sin(e),this.x*Math.sin(e)+this.y*Math.cos(e),Cn.z)}setTo(e){this.x=e.x,this.y=e.y;const n=e;this.z=n.z?n.z:Cn.z}sub(e){return ui.create(this.x-e.x,this.y-e.y,this.z-e.z)}subFrom(e){this.x-=e.x,this.y-=e.y,this.z-=e.z}}class mn extends ui{constructor(e,n){super(e,n,Cn.z)}static get origin(){return mn.create(Cn.x,Cn.y)}static clone(e){return mn.create(e.x,e.y)}static create(e,n){return new mn(e,n)}}let nW=Math.random;const YD={nextFrame:t=>requestAnimationFrame(t),cancel:t=>cancelAnimationFrame(t)};function _t(){return Gi(nW(),0,1-Number.EPSILON)}function iW(t){return YD.nextFrame(t)}function rW(t){YD.cancel(t)}function Gi(t,e,n){return Math.min(Math.max(t,e),n)}function Cg(t,e,n,i){return Math.floor((t*n+e*i)/(n+i))}function pi(t){const e=Pr(t),n=0;let i=lm(t);return e===i&&(i=n),_t()*(e-i)+i}function ke(t){return So(t)?t:pi(t)}function lm(t){return So(t)?t:t.min}function Pr(t){return So(t)?t:t.max}function ut(t,e){if(t===e||e===void 0&&So(t))return t;const n=lm(t),i=Pr(t);return e!==void 0?{min:Math.min(n,e),max:Math.max(i,e)}:ut(n,i)}function Wn(t,e){const n=t.x-e.x,i=t.y-e.y,r=2;return{dx:n,dy:i,distance:Math.sqrt(n**r+i**r)}}function vi(t,e){return Wn(t,e).distance}function fo(t){return t*Math.PI/180}function sW(t,e,n){if(So(t))return fo(t);switch(t){case vn.top:return-Math.PI*on;case vn.topRight:return-Math.PI*gp;case vn.right:return CG;case vn.bottomRight:return Math.PI*gp;case vn.bottom:return Math.PI*on;case vn.bottomLeft:return Math.PI*d1;case vn.left:return Math.PI;case vn.topLeft:return-Math.PI*d1;case vn.inside:return Math.atan2(n.y-e.y,n.x-e.x);case vn.outside:return Math.atan2(e.y-n.y,e.x-n.x);default:return _t()*SG}}function oW(t){const e=mn.origin;return e.length=1,e.angle=t,e}function _1(t,e,n,i){return mn.create(t.x*(n-i)/(n+i)+e.x*Dn*i/(n+i),t.y)}function aW(t){var e,n;return{x:((e=t.position)==null?void 0:e.x)??_t()*t.size.width,y:((n=t.position)==null?void 0:n.y)??_t()*t.size.height}}function KD(t){return t?t.endsWith("%")?parseFloat(t)/Js:parseFloat(t):1}var ra;(function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"})(ra||(ra={}));var Qt;(function(t){t.increasing="increasing",t.decreasing="decreasing"})(Qt||(Qt={}));var Ca;(function(t){t.none="none",t.max="max",t.min="min"})(Ca||(Ca={}));var it;(function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"})(it||(it={}));var gc;(function(t){t.precise="precise",t.percent="percent"})(gc||(gc={}));var Bl;(function(t){t.max="max",t.min="min",t.random="random"})(Bl||(Bl={}));const lW={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function Aa(){return lW}function cW(t){const e=new Map;return(...n)=>{const i=JSON.stringify(n);if(e.has(i))return e.get(i);const r=t(...n);return e.set(i,r),r}}function w1(t){const e={bounced:!1},{pSide:n,pOtherSide:i,rectSide:r,rectOtherSide:s,velocity:o,factor:a}=t;return i.min<s.min||i.min>s.max||i.max<s.min||i.max>s.max||(n.max>=r.min&&n.max<=(r.max+r.min)*on&&o>f1||n.min<=r.max&&n.min>(r.max+r.min)*on&&o<f1)&&(e.velocity=o*-a,e.bounced=!0),e}function uW(t,e){const n=Si(e,i=>t.matches(i));return Wr(n)?n.some(i=>i):n}function Ra(){return typeof window>"u"||!window||typeof window.document>"u"||!window.document}function dW(){return!Ra()&&typeof matchMedia<"u"}function ZD(t){if(dW())return matchMedia(t)}function fW(t){if(!(Ra()||typeof IntersectionObserver>"u"))return new IntersectionObserver(t)}function hW(t){if(!(Ra()||typeof MutationObserver>"u"))return new MutationObserver(t)}function qt(t,e){return t===e||Wr(e)&&e.indexOf(t)>-1}async function b1(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function pW(t){return Math.floor(_t()*t.length)}function cm(t,e,n=!0){return t[e!==void 0&&n?e%t.length:pW(t)]}function ow(t,e,n,i,r){return mW(Dd(t,i??0),e,n,r)}function mW(t,e,n,i){let r=!0;return(!i||i===it.bottom)&&(r=t.top<e.height+n.x),r&&(!i||i===it.left)&&(r=t.right>n.x),r&&(!i||i===it.right)&&(r=t.left<e.width+n.y),r&&(!i||i===it.top)&&(r=t.bottom>n.y),r}function Dd(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function kn(t,...e){for(const n of e){if(n==null)continue;if(!Tl(n)){t=n;continue}const i=Array.isArray(n);i&&(Tl(t)||!t||!Array.isArray(t))?t=[]:!i&&(Tl(t)||!t||Array.isArray(t))&&(t={});for(const r in n){if(r==="__proto__")continue;const s=n,o=s[r],a=t;a[r]=Tl(o)&&Array.isArray(o)?o.map(l=>kn(a[r],l)):kn(a[r],o)}}return t}function aw(t,e){return!!eL(e,n=>n.enable&&qt(t,n.mode))}function lw(t,e,n){Si(e,i=>{const r=i.mode;i.enable&&qt(t,r)&&gW(i,n)})}function gW(t,e){const n=t.selectors;Si(n,i=>{e(i,t)})}function QD(t,e){if(!(!e||!t))return eL(t,n=>uW(e,n.selectors))}function o0(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:mn.create(ke(t.options.bounce.horizontal.value),ke(t.options.bounce.vertical.value))}}function JD(t,e){const{x:n,y:i}=t.velocity.sub(e.velocity),[r,s]=[t.position,e.position],{dx:o,dy:a}=Wn(s,r);if(n*o+i*a<0)return;const c=-Math.atan2(a,o),u=t.mass,d=e.mass,f=t.velocity.rotate(c),h=e.velocity.rotate(c),v=_1(f,h,u,d),g=_1(h,f,u,d),m=v.rotate(-c),p=g.rotate(-c);t.velocity.x=m.x*t.factor.x,t.velocity.y=m.y*t.factor.y,e.velocity.x=p.x*e.factor.x,e.velocity.y=p.y*e.factor.y}function vW(t,e){const n=t.getPosition(),i=t.getRadius(),r=Dd(n,i),s=t.options.bounce,o=w1({pSide:{min:r.left,max:r.right},pOtherSide:{min:r.top,max:r.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:ke(s.horizontal.value)});o.bounced&&(o.velocity!==void 0&&(t.velocity.x=o.velocity),o.position!==void 0&&(t.position.x=o.position));const a=w1({pSide:{min:r.top,max:r.bottom},pOtherSide:{min:r.left,max:r.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:ke(s.vertical.value)});a.bounced&&(a.velocity!==void 0&&(t.velocity.y=a.velocity),a.position!==void 0&&(t.position.y=a.position))}function Si(t,e){return Wr(t)?t.map((i,r)=>e(i,r)):e(t,0)}function Fi(t,e,n){return Wr(t)?cm(t,e,n):t}function eL(t,e){return Wr(t)?t.find((i,r)=>e(i,r)):e(t,0)?t:void 0}function tL(t,e){const n=t.value,i=t.animation,r={delayTime:ke(i.delay)*Pn,enable:i.enable,value:ke(t.value)*e,max:Pr(n)*e,min:lm(n)*e,loops:0,maxLoops:ke(i.count),time:0},s=1;if(i.enable){switch(r.decay=s-ke(i.decay),i.mode){case ra.increase:r.status=Qt.increasing;break;case ra.decrease:r.status=Qt.decreasing;break;case ra.random:r.status=_t()>=on?Qt.increasing:Qt.decreasing;break}const o=i.mode===ra.auto;switch(i.startValue){case Bl.min:r.value=r.min,o&&(r.status=Qt.increasing);break;case Bl.max:r.value=r.max,o&&(r.status=Qt.decreasing);break;case Bl.random:default:r.value=pi(r),o&&(r.status=_t()>=on?Qt.increasing:Qt.decreasing);break}}return r.initialValue=r.value,r}function yW(t,e){if(!(t.mode===gc.percent)){const{mode:r,...s}=t;return s}return"x"in t?{x:t.x/Js*e.width,y:t.y/Js*e.height}:{width:t.width/Js*e.width,height:t.height/Js*e.height}}function nL(t,e){return yW(t,e)}function xW(t,e,n,i,r){switch(e){case Ca.max:n>=r&&t.destroy();break;case Ca.min:n<=i&&t.destroy();break}}function cw(t,e,n,i,r){if(t.destroyed||!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const u=(e.velocity??0)*r.factor,d=e.min,f=e.max,h=e.decay??1;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=r.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case Qt.increasing:e.value>=f?(n?e.status=Qt.decreasing:e.value-=f,e.loops||(e.loops=0),e.loops++):e.value+=u;break;case Qt.decreasing:e.value<=d?(n?e.status=Qt.increasing:e.value+=f,e.loops||(e.loops=0),e.loops++):e.value-=u}e.velocity&&h!==1&&(e.velocity*=h),xW(t,i,e.value,d,f),t.destroyed||(e.value=Gi(e.value,d,f))}}function _W(t){var n,i,r,s;const e=document.createElement("div").style;if(!t)return e;for(const o in t){const a=t[o];if(!Object.prototype.hasOwnProperty.call(t,o)||me(a))continue;const l=(n=t.getPropertyValue)==null?void 0:n.call(t,a);if(!l)continue;const c=(i=t.getPropertyPriority)==null?void 0:i.call(t,a);c?(s=e.setProperty)==null||s.call(e,a,l,c):(r=e.setProperty)==null||r.call(e,a,l)}return e}function wW(t){const e=document.createElement("div").style,n=10,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(n),"z-index":t.toString(n),top:"0",left:"0"};for(const r in i){const s=i[r];e.setProperty(r,s)}return e}const bW=cW(wW);var a0;(function(t){t.darken="darken",t.enlighten="enlighten"})(a0||(a0={}));function SW(t,e){if(e){for(const n of t.colorManagers.values())if(e.startsWith(n.stringPrefix))return n.parseString(e)}}function fr(t,e,n,i=!0){if(!e)return;const r=bo(e)?{value:e}:e;if(bo(r.value))return iL(t,r.value,n,i);if(Wr(r.value))return fr(t,{value:cm(r.value,n,i)});for(const s of t.colorManagers.values()){const o=s.handleRangeColor(r);if(o)return o}}function iL(t,e,n,i=!0){if(!e)return;const r=bo(e)?{value:e}:e;if(bo(r.value))return r.value===mc?sL():EW(t,r.value);if(Wr(r.value))return iL(t,{value:cm(r.value,n,i)});for(const s of t.colorManagers.values()){const o=s.handleColor(r);if(o)return o}}function sd(t,e,n,i=!0){const r=fr(t,e,n,i);return r?rL(r):void 0}function rL(t){const e=t.r/bh,n=t.g/bh,i=t.b/bh,r=Math.max(e,n,i),s=Math.min(e,n,i),o={h:u1,l:(r+s)*on,s:i0};return r!==s&&(o.s=o.l<on?(r-s)/(r+s):(r-s)/(Dn-r-s),o.h=e===r?(n-i)/(r-s):o.h=n===r?Dn+(i-e)/(r-s):Dn*Dn+(e-n)/(r-s)),o.l*=n0,o.s*=t0,o.h*=TG,o.h<u1&&(o.h+=ia),o.h>=ia&&(o.h-=ia),o}function EW(t,e){return SW(t,e)}function vc(t){const e=(t.h%ia+ia)%ia,n=Math.max(i0,Math.min(t0,t.s)),i=Math.max(YG,Math.min(n0,t.l)),r=e/ia,s=n/t0,o=i/n0;if(n===i0){const v=Math.round(o*Do);return{r:v,g:v,b:v}}const a=(v,g,m)=>{if(m<0&&m++,m>1&&m--,m*Tg<1)return v+(g-v)*Tg*m;if(m*Dn<1)return g;if(m*Mg<1*Dn){const x=Dn/Mg;return v+(g-v)*(x-m)*Tg}return v},l=o<on?o*(KG+s):o+s-o*s,c=Dn*o-l,u=ZG/Mg,d=Math.min(Do,Do*a(c,l,r+u)),f=Math.min(Do,Do*a(c,l,r)),h=Math.min(Do,Do*a(c,l,r-u));return{r:Math.round(d),g:Math.round(f),b:Math.round(h)}}function MW(t){const e=vc(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function sL(t){const e=QG,n=bh+s0;return{b:Math.floor(pi(ut(e,n))),g:Math.floor(pi(ut(e,n))),r:Math.floor(pi(ut(e,n)))}}function fs(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??sw})`}function od(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??sw})`}function uw(t,e,n,i){let r=t,s=e;return r.r===void 0&&(r=vc(t)),s.r===void 0&&(s=vc(e)),{b:Cg(r.b,s.b,n,i),g:Cg(r.g,s.g,n,i),r:Cg(r.r,s.r,n,i)}}function l0(t,e,n){if(n===mc)return sL();if(n===wh){const i=t.getFillColor()??t.getStrokeColor(),r=(e==null?void 0:e.getFillColor())??(e==null?void 0:e.getStrokeColor());if(i&&r&&e)return uw(i,r,t.getRadius(),e.getRadius());{const s=i??r;if(s)return vc(s)}}else return n}function oL(t,e,n,i){const r=bo(e)?e:e.value;return r===mc?i?fr(t,{value:r}):n?mc:wh:r===wh?wh:fr(t,{value:r})}function S1(t){return t!==void 0?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function aL(t,e,n){const i={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(Ag(i.h,e.h,n),Ag(i.s,e.s,n),Ag(i.l,e.l,n)),i}function Ag(t,e,n){t.enable=e.enable,t.enable?(t.velocity=ke(e.speed)/Js*n,t.decay=WD-ke(e.decay),t.status=Qt.increasing,t.loops=eW,t.maxLoops=ke(e.count),t.time=tW,t.delayTime=ke(e.delay)*Pn,e.sync||(t.velocity*=_t(),t.value*=_t()),t.initialValue=t.value,t.offset=ut(e.offset)):t.velocity=JG}function Rg(t,e,n,i){if(!t||!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0)||(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0)))return;const u=t.offset?pi(t.offset):0,d=(t.velocity??0)*i.factor+u*3.6,f=t.decay??1,h=Pr(e),v=lm(e);!n||t.status===Qt.increasing?(t.value+=d,t.value>h&&(t.loops||(t.loops=0),t.loops++,n?t.status=Qt.decreasing:t.value-=h)):(t.value-=d,t.value<0&&(t.loops||(t.loops=0),t.loops++,t.status=Qt.increasing)),t.velocity&&f!==1&&(t.velocity*=f),t.value=Gi(t.value,v,h)}function lL(t,e){if(!t)return;const{h:n,s:i,l:r}=t,s={h:{min:0,max:360},s:{min:0,max:100},l:{min:0,max:100}};n&&Rg(n,s.h,!1,e),i&&Rg(i,s.s,!0,e),r&&Rg(r,s.l,!0,e)}function Au(t,e,n){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(n.x,n.y),t.closePath()}function TW(t,e,n){t.fillStyle=n??"rgba(0,0,0,0)",t.fillRect(Cn.x,Cn.y,e.width,e.height)}function CW(t,e,n,i){n&&(t.globalAlpha=i,t.drawImage(n,Cn.x,Cn.y,e.width,e.height),t.globalAlpha=1)}function Pg(t,e){t.clearRect(Cn.x,Cn.y,e.width,e.height)}function AW(t){const{container:e,context:n,particle:i,delta:r,colorStyles:s,backgroundMask:o,composite:a,radius:l,opacity:c,shadow:u,transform:d}=t,f=i.getPosition(),h=i.rotation+(i.pathRotation?i.velocity.angle:qG),v={sin:Math.sin(h),cos:Math.cos(h)},g=!!h,m={a:v.cos*(d.a??yf.a),b:g?v.sin*(d.b??s0):d.b??yf.b,c:g?-v.sin*(d.c??s0):d.c??yf.c,d:v.cos*(d.d??yf.d)};n.setTransform(m.a,m.b,m.c,m.d,f.x,f.y),o&&(n.globalCompositeOperation=a);const p=i.shadowColor;u.enable&&p&&(n.shadowBlur=u.blur,n.shadowColor=fs(p),n.shadowOffsetX=u.offset.x,n.shadowOffsetY=u.offset.y),s.fill&&(n.fillStyle=s.fill);const y=i.strokeWidth??XD;n.lineWidth=y,s.stroke&&(n.strokeStyle=s.stroke);const x={container:e,context:n,particle:i,radius:l,opacity:c,delta:r,transformData:m,strokeWidth:y};PW(x),DW(x),RW(x),n.globalCompositeOperation="source-over",n.resetTransform()}function RW(t){const{container:e,context:n,particle:i,radius:r,opacity:s,delta:o,transformData:a}=t;if(!i.effect)return;const l=e.effectDrawers.get(i.effect);l&&l.draw({context:n,particle:i,radius:r,opacity:s,delta:o,pixelRatio:e.retina.pixelRatio,transformData:{...a}})}function PW(t){const{container:e,context:n,particle:i,radius:r,opacity:s,delta:o,strokeWidth:a,transformData:l}=t;if(!i.shape)return;const c=e.shapeDrawers.get(i.shape);c&&(n.beginPath(),c.draw({context:n,particle:i,radius:r,opacity:s,delta:o,pixelRatio:e.retina.pixelRatio,transformData:{...l}}),i.shapeClose&&n.closePath(),a>XD&&n.stroke(),i.shapeFill&&n.fill())}function DW(t){const{container:e,context:n,particle:i,radius:r,opacity:s,delta:o,transformData:a}=t;if(!i.shape)return;const l=e.shapeDrawers.get(i.shape);l!=null&&l.afterDraw&&l.afterDraw({context:n,particle:i,radius:r,opacity:s,delta:o,pixelRatio:e.retina.pixelRatio,transformData:{...a}})}function LW(t,e,n){e.draw&&e.draw(t,n)}function NW(t,e,n,i){e.drawParticle&&e.drawParticle(t,n,i)}function IW(t,e,n){return{h:t.h,s:t.s,l:t.l+(e===a0.darken?-x1:x1)*n}}function kW(t,e,n){const i=e[n];i!==void 0&&(t[n]=(t[n]??AG)*i)}function E1(t,e,n=!1){if(!e)return;const i=t;if(!i)return;const r=i.style;if(!r)return;const s=new Set;for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&s.add(r[o]);for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&s.add(e[o]);for(const o of s){const a=e.getPropertyValue(o);a?r.setProperty(o,a,n?"important":""):r.removeProperty(o)}}class OW{constructor(e,n){this.container=e,this._applyPostDrawUpdaters=s=>{var o;for(const a of this._postDrawUpdaters)(o=a.afterDraw)==null||o.call(a,s)},this._applyPreDrawUpdaters=(s,o,a,l,c,u)=>{var d;for(const f of this._preDrawUpdaters){if(f.getColorStyles){const{fill:h,stroke:v}=f.getColorStyles(o,s,a,l);h&&(c.fill=h),v&&(c.stroke=v)}if(f.getTransformValues){const h=f.getTransformValues(o);for(const v in h)kW(u,h,v)}(d=f.beforeDraw)==null||d.call(f,o)}},this._applyResizePlugins=()=>{var s;for(const o of this._resizePlugins)(s=o.resize)==null||s.call(o)},this._getPluginParticleColors=s=>{let o,a;for(const l of this._colorPlugins)if(!o&&l.particleFillColor&&(o=sd(this._engine,l.particleFillColor(s))),!a&&l.particleStrokeColor&&(a=sd(this._engine,l.particleStrokeColor(s))),o&&a)break;return[o,a]},this._initCover=async()=>{const s=this.container.actualOptions,o=s.backgroundMask.cover,a=o.color;if(a){const l=fr(this._engine,a);if(l){const c={...l,a:o.opacity};this._coverColorStyle=fs(c,c.a)}}else await new Promise((l,c)=>{if(!o.image)return;const u=document.createElement("img");u.addEventListener("load",()=>{this._coverImage={image:u,opacity:o.opacity},l()}),u.addEventListener("error",d=>{c(d.error)}),u.src=o.image})},this._initStyle=()=>{const s=this.element,o=this.container.actualOptions;if(s){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const a in o.style){if(!a||!o.style||!Object.prototype.hasOwnProperty.call(o.style,a))continue;const l=o.style[a];l&&s.style.setProperty(a,l,"important")}}},this._initTrail=async()=>{const s=this.container.actualOptions,o=s.particles.move.trail,a=o.fill;if(!o.enable)return;const l=jD/o.length;if(a.color){const c=fr(this._engine,a.color);if(!c)return;this._trailFill={color:{...c},opacity:l}}else await new Promise((c,u)=>{if(!a.image)return;const d=document.createElement("img");d.addEventListener("load",()=>{this._trailFill={image:d,opacity:l},c()}),d.addEventListener("error",f=>{u(f.error)}),d.src=a.image})},this._paintBase=s=>{this.draw(o=>TW(o,this.size,s))},this._paintImage=(s,o)=>{this.draw(a=>CW(a,this.size,s,o))},this._repairStyle=()=>{const s=this.element;if(!s)return;this._safeMutationObserver(a=>a.disconnect()),this._initStyle(),this.initBackground();const o=this._pointerEvents;s.style.pointerEvents=o,s.setAttribute("pointer-events",o),this._safeMutationObserver(a=>{!s||!(s instanceof Node)||a.observe(s,{attributes:!0})})},this._resetOriginalStyle=()=>{const s=this.element,o=this._originalStyle;!s||!o||E1(s,o,!0)},this._safeMutationObserver=s=>{this._mutationObserver&&s(this._mutationObserver)},this._setFullScreenStyle=()=>{const s=this.element;s&&E1(s,bW(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=n,this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,r=this._standardSize;this.size={height:r.height*i,width:r.width*i},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._pointerEvents="none"}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const e=this.container.actualOptions,n=e.particles.move.trail,i=this._trailFill;e.backgroundMask.enable?this.paint():n.enable&&n.length>PG&&i?i.color?this._paintBase(fs(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):e.clear&&this.draw(r=>{Pg(r,this.size)})}destroy(){if(this.stop(),this._generated){const e=this.element;e==null||e.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(e){const n=this._context;if(n)return e(n)}drawAsync(e){const n=this._context;if(n)return e(n)}drawParticle(e,n){if(e.spawning||e.destroyed)return;const i=e.getRadius();if(i<=RG)return;const r=e.getFillColor(),s=e.getStrokeColor()??r;let[o,a]=this._getPluginParticleColors(e);o||(o=r),a||(a=s),!(!o&&!a)&&this.draw(l=>{var w;const c=this.container,u=c.actualOptions,d=e.options.zIndex,f=DG-e.zIndexFactor,h=f**d.opacityRate,v=e.bubble.opacity??((w=e.opacity)==null?void 0:w.value)??sw,g=e.strokeOpacity??v,m=v*h,p=g*h,y={},x={fill:o?od(o,m):void 0};x.stroke=a?od(a,p):x.fill,this._applyPreDrawUpdaters(l,e,i,m,x,y),AW({container:c,context:l,particle:e,delta:n,colorStyles:x,backgroundMask:u.backgroundMask.enable,composite:u.backgroundMask.composite,radius:i*f**d.sizeRate,opacity:m,shadow:e.options.shadow,transform:y}),this._applyPostDrawUpdaters(e)})}drawParticlePlugin(e,n,i){this.draw(r=>NW(r,e,n,i))}drawPlugin(e,n){this.draw(i=>LW(i,e,n))}async init(){this._safeMutationObserver(e=>e.disconnect()),this._mutationObserver=hW(e=>{for(const n of e)n.type==="attributes"&&n.attributeName==="style"&&this._repairStyle()}),this.resize(),this._initStyle(),await this._initCover();try{await this._initTrail()}catch(e){Aa().error(e)}this.initBackground(),this._safeMutationObserver(e=>{!this.element||!(this.element instanceof Node)||e.observe(this.element,{attributes:!0})}),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const e=this.container.actualOptions,n=e.background,i=this.element;if(!i)return;const r=i.style;if(r){if(n.color){const s=fr(this._engine,n.color);r.backgroundColor=s?fs(s,n.opacity):""}else r.backgroundColor="";r.backgroundImage=n.image||"",r.backgroundPosition=n.position||"",r.backgroundRepeat=n.repeat||"",r.backgroundSize=n.size||""}}initPlugins(){this._resizePlugins=[];for(const e of this.container.plugins.values())e.resize&&this._resizePlugins.push(e),(e.particleFillColor??e.particleStrokeColor)&&this._colorPlugins.push(e)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const e of this.container.particles.updaters)e.afterDraw&&this._postDrawUpdaters.push(e),(e.getColorStyles??e.getTransformValues??e.beforeDraw)&&this._preDrawUpdaters.push(e)}loadCanvas(e){this._generated&&this.element&&this.element.remove(),this._generated=e.dataset&&na in e.dataset?e.dataset[na]==="true":this._generated,this.element=e,this.element.ariaHidden="true",this._originalStyle=_W(this.element.style);const n=this._standardSize;n.height=e.offsetHeight,n.width=e.offsetWidth;const i=this.container.retina.pixelRatio,r=this.size;e.height=r.height=n.height*i,e.width=r.width=n.width*i,this._context=this.element.getContext("2d"),this._safeMutationObserver(s=>s.disconnect()),this.container.retina.init(),this.initBackground(),this._safeMutationObserver(s=>{!this.element||!(this.element instanceof Node)||s.observe(this.element,{attributes:!0})})}paint(){const e=this.container.actualOptions;this.draw(n=>{e.backgroundMask.enable&&e.backgroundMask.cover?(Pg(n,this.size),this._coverImage?this._paintImage(this._coverImage.image,this._coverImage.opacity):this._coverColorStyle?this._paintBase(this._coverColorStyle):this._paintBase()):this._paintBase()})}resize(){if(!this.element)return!1;const e=this.container,n=e.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},r=e.retina.pixelRatio,s={width:i.width*r,height:i.height*r};if(i.height===n.height&&i.width===n.width&&s.height===this.element.height&&s.width===this.element.width)return!1;const o={...n};n.height=i.height,n.width=i.width;const a=this.size;return this.element.width=a.width=s.width,this.element.height=a.height=s.height,this.container.started&&e.particles.setResizeFactor({width:n.width/o.width,height:n.height/o.height}),!0}setPointerEvents(e){this.element&&(this._pointerEvents=e,this._repairStyle())}stop(){this._safeMutationObserver(e=>e.disconnect()),this._mutationObserver=void 0,this.draw(e=>Pg(e,this.size))}async windowResize(){if(!this.element||!this.resize())return;const e=this.container,n=e.updateActualOptions();e.particles.setDensity(),this._applyResizePlugins(),n&&await e.refresh()}}var Vl;(function(t){t.canvas="canvas",t.parent="parent",t.window="window"})(Vl||(Vl={}));function Ai(t,e,n,i,r){if(i){let s={passive:!0};qD(r)?s.capture=r:r!==void 0&&(s=r),t.addEventListener(e,n,s)}else{const s=r;t.removeEventListener(e,n,s)}}class FW{constructor(e){this.container=e,this._doMouseTouchClick=n=>{const i=this.container,r=i.actualOptions;if(this._canPush){const s=i.interactivity.mouse,o=s.position;if(!o)return;s.clickPosition={...o},s.clickTime=new Date().getTime();const a=r.interactivity.events.onClick;Si(a.mode,l=>this.container.handleClickMode(l))}n.type==="touchend"&&setTimeout(()=>this._mouseTouchFinish(),XG)},this._handleThemeChange=n=>{const i=n,r=this.container,s=r.options,o=s.defaultThemes,a=i.matches?o.dark:o.light,l=s.themes.find(c=>c.name===a);l!=null&&l.default.auto&&r.loadTheme(a)},this._handleVisibilityChange=()=>{const n=this.container,i=n.actualOptions;this._mouseTouchFinish(),i.pauseOnBlur&&(document!=null&&document.hidden?(n.pageHidden=!0,n.pause()):(n.pageHidden=!1,n.animationStatus?n.play(!0):n.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const n=async()=>{const i=this.container.canvas;await(i==null?void 0:i.windowResize())};this._resizeTimeout=setTimeout(()=>void n(),this.container.actualOptions.interactivity.events.resize.delay*Pn)},this._manageInteractivityListeners=(n,i)=>{const r=this._handlers,s=this.container,o=s.actualOptions,a=s.interactivity.element;if(!a)return;const l=a,c=s.canvas;c.setPointerEvents(l===c.element?"initial":"none"),(o.interactivity.events.onHover.enable||o.interactivity.events.onClick.enable)&&(Ai(a,Ta,r.mouseMove,i),Ai(a,yG,r.touchStart,i),Ai(a,xG,r.touchMove,i),o.interactivity.events.onClick.enable?(Ai(a,r1,r.touchEndClick,i),Ai(a,gG,r.mouseUp,i),Ai(a,mG,r.mouseDown,i)):Ai(a,r1,r.touchEnd,i),Ai(a,n,r.mouseLeave,i),Ai(a,_G,r.touchCancel,i))},this._manageListeners=n=>{const i=this._handlers,r=this.container,s=r.actualOptions,o=s.interactivity.detectsOn,a=r.canvas.element;let l=e0;o===Vl.window?(r.interactivity.element=window,l=vG):o===Vl.parent&&a?r.interactivity.element=a.parentElement??a.parentNode:r.interactivity.element=a,this._manageMediaMatch(n),this._manageResize(n),this._manageInteractivityListeners(l,n),document&&Ai(document,bG,i.visibilityChange,n,!1)},this._manageMediaMatch=n=>{const i=this._handlers,r=ZD("(prefers-color-scheme: dark)");if(r){if(r.addEventListener!==void 0){Ai(r,"change",i.themeChange,n);return}r.addListener!==void 0&&(n?r.addListener(i.oldThemeChange):r.removeListener(i.oldThemeChange))}},this._manageResize=n=>{const i=this._handlers,r=this.container;if(!r.actualOptions.interactivity.events.resize)return;if(typeof ResizeObserver>"u"){Ai(window,wG,i.resize,n);return}const o=r.canvas.element;this._resizeObserver&&!n?(o&&this._resizeObserver.unobserve(o),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&n&&o&&(this._resizeObserver=new ResizeObserver(a=>{a.find(c=>c.target===o)&&this._handleWindowResize()}),this._resizeObserver.observe(o))},this._mouseDown=()=>{const{interactivity:n}=this.container;if(!n)return;const{mouse:i}=n;i.clicking=!0,i.downPosition=i.position},this._mouseTouchClick=n=>{const i=this.container,r=i.actualOptions,{mouse:s}=i.interactivity;s.inside=!0;let o=!1;const a=s.position;if(!(!a||!r.interactivity.events.onClick.enable)){for(const l of i.plugins.values())if(l.clickPositionValid&&(o=l.clickPositionValid(a),o))break;o||this._doMouseTouchClick(n),s.clicking=!1}},this._mouseTouchFinish=()=>{const n=this.container.interactivity;if(!n)return;const i=n.mouse;delete i.position,delete i.clickPosition,delete i.downPosition,n.status=e0,i.inside=!1,i.clicking=!1},this._mouseTouchMove=n=>{const i=this.container,r=i.actualOptions,s=i.interactivity,o=i.canvas.element;if(!(s!=null&&s.element))return;s.mouse.inside=!0;let a;if(n.type.startsWith("pointer")){this._canPush=!0;const c=n;if(s.element===window){if(o){const u=o.getBoundingClientRect();a={x:c.clientX-u.left,y:c.clientY-u.top}}}else if(r.interactivity.detectsOn===Vl.parent){const u=c.target,d=c.currentTarget;if(u&&d&&o){const f=u.getBoundingClientRect(),h=d.getBoundingClientRect(),v=o.getBoundingClientRect();a={x:c.offsetX+Dn*f.left-(h.left+v.left),y:c.offsetY+Dn*f.top-(h.top+v.top)}}else a={x:c.offsetX??c.clientX,y:c.offsetY??c.clientY}}else c.target===o&&(a={x:c.offsetX??c.clientX,y:c.offsetY??c.clientY})}else if(this._canPush=n.type!=="touchmove",o){const c=n,u=c.touches[c.touches.length-$D],d=o.getBoundingClientRect();a={x:u.clientX-(d.left??vp),y:u.clientY-(d.top??vp)}}const l=i.retina.pixelRatio;a&&(a.x*=l,a.y*=l),s.mouse.position=a,s.status=Ta},this._touchEnd=n=>{const i=n,r=Array.from(i.changedTouches);for(const s of r)this._touches.delete(s.identifier);this._mouseTouchFinish()},this._touchEndClick=n=>{const i=n,r=Array.from(i.changedTouches);for(const s of r)this._touches.delete(s.identifier);this._mouseTouchClick(n)},this._touchStart=n=>{const i=n,r=Array.from(i.changedTouches);for(const s of r)this._touches.set(s.identifier,performance.now());this._mouseTouchMove(n)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:n=>this._mouseTouchMove(n),mouseUp:n=>this._mouseTouchClick(n),touchStart:n=>this._touchStart(n),touchMove:n=>this._mouseTouchMove(n),touchEnd:n=>this._touchEnd(n),touchCancel:n=>this._touchEnd(n),touchEndClick:n=>this._touchEndClick(n),visibilityChange:()=>this._handleVisibilityChange(),themeChange:n=>this._handleThemeChange(n),oldThemeChange:n=>this._handleThemeChange(n),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}var Vn;(function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"})(Vn||(Vn={}));class On{constructor(){this.value=""}static create(e,n){const i=new On;return i.load(e),n!==void 0&&(bo(n)||Wr(n)?i.load({value:n}):i.load(n)),i}load(e){me(e)||me(e.value)||(this.value=e.value)}}class UW{constructor(){this.color=new On,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(e){me(e)||(e.color!==void 0&&(this.color=On.create(this.color,e.color)),e.image!==void 0&&(this.image=e.image),e.position!==void 0&&(this.position=e.position),e.repeat!==void 0&&(this.repeat=e.repeat),e.size!==void 0&&(this.size=e.size),e.opacity!==void 0&&(this.opacity=e.opacity))}}class zW{constructor(){this.opacity=1}load(e){me(e)||(e.color!==void 0&&(this.color=On.create(this.color,e.color)),e.image!==void 0&&(this.image=e.image),e.opacity!==void 0&&(this.opacity=e.opacity))}}class BW{constructor(){this.composite="destination-out",this.cover=new zW,this.enable=!1}load(e){if(!me(e)){if(e.composite!==void 0&&(this.composite=e.composite),e.cover!==void 0){const n=e.cover,i=bo(e.cover)?{color:e.cover}:e.cover;this.cover.load(n.color!==void 0||n.image!==void 0?n:{color:i})}e.enable!==void 0&&(this.enable=e.enable)}}}class VW{constructor(){this.enable=!0,this.zIndex=0}load(e){me(e)||(e.enable!==void 0&&(this.enable=e.enable),e.zIndex!==void 0&&(this.zIndex=e.zIndex))}}class HW{constructor(){this.enable=!1,this.mode=[]}load(e){me(e)||(e.enable!==void 0&&(this.enable=e.enable),e.mode!==void 0&&(this.mode=e.mode))}}var yc;(function(t){t.circle="circle",t.rectangle="rectangle"})(yc||(yc={}));class M1{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=yc.circle}load(e){me(e)||(e.selectors!==void 0&&(this.selectors=e.selectors),e.enable!==void 0&&(this.enable=e.enable),e.mode!==void 0&&(this.mode=e.mode),e.type!==void 0&&(this.type=e.type))}}class jW{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(e){me(e)||(e.enable!==void 0&&(this.enable=e.enable),e.force!==void 0&&(this.force=e.force),e.smooth!==void 0&&(this.smooth=e.smooth))}}class GW{constructor(){this.enable=!1,this.mode=[],this.parallax=new jW}load(e){me(e)||(e.enable!==void 0&&(this.enable=e.enable),e.mode!==void 0&&(this.mode=e.mode),this.parallax.load(e.parallax))}}class WW{constructor(){this.delay=.5,this.enable=!0}load(e){me(e)||(e.delay!==void 0&&(this.delay=e.delay),e.enable!==void 0&&(this.enable=e.enable))}}class $W{constructor(){this.onClick=new HW,this.onDiv=new M1,this.onHover=new GW,this.resize=new WW}load(e){if(me(e))return;this.onClick.load(e.onClick);const n=e.onDiv;n!==void 0&&(this.onDiv=Si(n,i=>{const r=new M1;return r.load(i),r})),this.onHover.load(e.onHover),this.resize.load(e.resize)}}class XW{constructor(e,n){this._engine=e,this._container=n}load(e){if(me(e)||!this._container)return;const n=this._engine.interactors.get(this._container);if(n)for(const i of n)i.loadModeOptions&&i.loadModeOptions(this,e)}}class cL{constructor(e,n){this.detectsOn=Vl.window,this.events=new $W,this.modes=new XW(e,n)}load(e){if(me(e))return;const n=e.detectsOn;n!==void 0&&(this.detectsOn=n),this.events.load(e.events),this.modes.load(e.modes)}}class qW{load(e){me(e)||(e.position&&(this.position={x:e.position.x??y1,y:e.position.y??y1,mode:e.position.mode??gc.percent}),e.options&&(this.options=kn({},e.options)))}}var sa;(function(t){t.screen="screen",t.canvas="canvas"})(sa||(sa={}));class YW{constructor(){this.maxWidth=1/0,this.options={},this.mode=sa.canvas}load(e){me(e)||(me(e.maxWidth)||(this.maxWidth=e.maxWidth),me(e.mode)||(e.mode===sa.screen?this.mode=sa.screen:this.mode=sa.canvas),me(e.options)||(this.options=kn({},e.options)))}}var js;(function(t){t.any="any",t.dark="dark",t.light="light"})(js||(js={}));class KW{constructor(){this.auto=!1,this.mode=js.any,this.value=!1}load(e){me(e)||(e.auto!==void 0&&(this.auto=e.auto),e.mode!==void 0&&(this.mode=e.mode),e.value!==void 0&&(this.value=e.value))}}class ZW{constructor(){this.name="",this.default=new KW}load(e){me(e)||(e.name!==void 0&&(this.name=e.name),this.default.load(e.default),e.options!==void 0&&(this.options=kn({},e.options)))}}class dw{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(e){me(e)||(e.count!==void 0&&(this.count=ut(e.count)),e.enable!==void 0&&(this.enable=e.enable),e.speed!==void 0&&(this.speed=ut(e.speed)),e.decay!==void 0&&(this.decay=ut(e.decay)),e.delay!==void 0&&(this.delay=ut(e.delay)),e.sync!==void 0&&(this.sync=e.sync))}}class fw extends dw{constructor(){super(),this.mode=ra.auto,this.startValue=Bl.random}load(e){super.load(e),!me(e)&&(e.mode!==void 0&&(this.mode=e.mode),e.startValue!==void 0&&(this.startValue=e.startValue))}}class Dg extends dw{constructor(){super(),this.offset=0,this.sync=!0}load(e){super.load(e),!me(e)&&e.offset!==void 0&&(this.offset=ut(e.offset))}}class QW{constructor(){this.h=new Dg,this.s=new Dg,this.l=new Dg}load(e){me(e)||(this.h.load(e.h),this.s.load(e.s),this.l.load(e.l))}}class ad extends On{constructor(){super(),this.animation=new QW}static create(e,n){const i=new ad;return i.load(e),n!==void 0&&(bo(n)||Wr(n)?i.load({value:n}):i.load(n)),i}load(e){if(super.load(e),me(e))return;const n=e.animation;n!==void 0&&(n.enable!==void 0?this.animation.h.load(n):this.animation.load(e.animation))}}var Hl;(function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"})(Hl||(Hl={}));class JW{constructor(){this.speed=2}load(e){me(e)||e.speed!==void 0&&(this.speed=e.speed)}}class e8{constructor(){this.enable=!0,this.retries=0}load(e){me(e)||(e.enable!==void 0&&(this.enable=e.enable),e.retries!==void 0&&(this.retries=e.retries))}}class Oa{constructor(){this.value=0}load(e){me(e)||me(e.value)||(this.value=ut(e.value))}}class t8 extends Oa{constructor(){super(),this.animation=new dw}load(e){if(super.load(e),me(e))return;const n=e.animation;n!==void 0&&this.animation.load(n)}}class uL extends t8{constructor(){super(),this.animation=new fw}load(e){super.load(e)}}class T1 extends Oa{constructor(){super(),this.value=1}}class dL{constructor(){this.horizontal=new T1,this.vertical=new T1}load(e){me(e)||(this.horizontal.load(e.horizontal),this.vertical.load(e.vertical))}}class n8{constructor(){this.absorb=new JW,this.bounce=new dL,this.enable=!1,this.maxSpeed=50,this.mode=Hl.bounce,this.overlap=new e8}load(e){me(e)||(this.absorb.load(e.absorb),this.bounce.load(e.bounce),e.enable!==void 0&&(this.enable=e.enable),e.maxSpeed!==void 0&&(this.maxSpeed=ut(e.maxSpeed)),e.mode!==void 0&&(this.mode=e.mode),this.overlap.load(e.overlap))}}class i8{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(e){if(me(e))return;const n=e.options;if(n!==void 0)for(const i in n){const r=n[i];r&&(this.options[i]=kn(this.options[i]??{},r))}e.close!==void 0&&(this.close=e.close),e.fill!==void 0&&(this.fill=e.fill),e.type!==void 0&&(this.type=e.type)}}class r8{constructor(){this.offset=0,this.value=90}load(e){me(e)||(e.offset!==void 0&&(this.offset=ut(e.offset)),e.value!==void 0&&(this.value=ut(e.value)))}}class s8{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(e){if(!me(e)&&(e.distance!==void 0&&(this.distance=ut(e.distance)),e.enable!==void 0&&(this.enable=e.enable),e.rotate)){const n=e.rotate.x;n!==void 0&&(this.rotate.x=n);const i=e.rotate.y;i!==void 0&&(this.rotate.y=i)}}}class o8{constructor(){this.x=50,this.y=50,this.mode=gc.percent,this.radius=0}load(e){me(e)||(e.x!==void 0&&(this.x=e.x),e.y!==void 0&&(this.y=e.y),e.mode!==void 0&&(this.mode=e.mode),e.radius!==void 0&&(this.radius=e.radius))}}class a8{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(e){me(e)||(e.acceleration!==void 0&&(this.acceleration=ut(e.acceleration)),e.enable!==void 0&&(this.enable=e.enable),e.inverse!==void 0&&(this.inverse=e.inverse),e.maxSpeed!==void 0&&(this.maxSpeed=ut(e.maxSpeed)))}}class l8{constructor(){this.clamp=!0,this.delay=new Oa,this.enable=!1,this.options={}}load(e){me(e)||(e.clamp!==void 0&&(this.clamp=e.clamp),this.delay.load(e.delay),e.enable!==void 0&&(this.enable=e.enable),this.generator=e.generator,e.options&&(this.options=kn(this.options,e.options)))}}class c8{load(e){me(e)||(e.color!==void 0&&(this.color=On.create(this.color,e.color)),e.image!==void 0&&(this.image=e.image))}}class u8{constructor(){this.enable=!1,this.length=10,this.fill=new c8}load(e){me(e)||(e.enable!==void 0&&(this.enable=e.enable),e.fill!==void 0&&this.fill.load(e.fill),e.length!==void 0&&(this.length=e.length))}}var en;(function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"})(en||(en={}));class d8{constructor(){this.default=en.out}load(e){me(e)||(e.default!==void 0&&(this.default=e.default),this.bottom=e.bottom??e.default,this.left=e.left??e.default,this.right=e.right??e.default,this.top=e.top??e.default)}}class f8{constructor(){this.acceleration=0,this.enable=!1}load(e){me(e)||(e.acceleration!==void 0&&(this.acceleration=ut(e.acceleration)),e.enable!==void 0&&(this.enable=e.enable),e.position&&(this.position=kn({},e.position)))}}class h8{constructor(){this.angle=new r8,this.attract=new s8,this.center=new o8,this.decay=0,this.distance={},this.direction=vn.none,this.drift=0,this.enable=!1,this.gravity=new a8,this.path=new l8,this.outModes=new d8,this.random=!1,this.size=!1,this.speed=2,this.spin=new f8,this.straight=!1,this.trail=new u8,this.vibrate=!1,this.warp=!1}load(e){if(me(e))return;this.angle.load(So(e.angle)?{value:e.angle}:e.angle),this.attract.load(e.attract),this.center.load(e.center),e.decay!==void 0&&(this.decay=ut(e.decay)),e.direction!==void 0&&(this.direction=e.direction),e.distance!==void 0&&(this.distance=So(e.distance)?{horizontal:e.distance,vertical:e.distance}:{...e.distance}),e.drift!==void 0&&(this.drift=ut(e.drift)),e.enable!==void 0&&(this.enable=e.enable),this.gravity.load(e.gravity);const n=e.outModes;n!==void 0&&(Tl(n)?this.outModes.load(n):this.outModes.load({default:n})),this.path.load(e.path),e.random!==void 0&&(this.random=e.random),e.size!==void 0&&(this.size=e.size),e.speed!==void 0&&(this.speed=ut(e.speed)),this.spin.load(e.spin),e.straight!==void 0&&(this.straight=e.straight),this.trail.load(e.trail),e.vibrate!==void 0&&(this.vibrate=e.vibrate),e.warp!==void 0&&(this.warp=e.warp)}}class p8 extends fw{constructor(){super(),this.destroy=Ca.none,this.speed=2}load(e){super.load(e),!me(e)&&e.destroy!==void 0&&(this.destroy=e.destroy)}}class m8 extends uL{constructor(){super(),this.animation=new p8,this.value=1}load(e){if(me(e))return;super.load(e);const n=e.animation;n!==void 0&&this.animation.load(n)}}class g8{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(e){if(me(e))return;e.enable!==void 0&&(this.enable=e.enable);const n=e.width;n!==void 0&&(this.width=n);const i=e.height;i!==void 0&&(this.height=i)}}var ld;(function(t){t.delete="delete",t.wait="wait"})(ld||(ld={}));class v8{constructor(){this.mode=ld.delete,this.value=0}load(e){me(e)||(e.mode!==void 0&&(this.mode=e.mode),e.value!==void 0&&(this.value=e.value))}}class y8{constructor(){this.density=new g8,this.limit=new v8,this.value=0}load(e){me(e)||(this.density.load(e.density),this.limit.load(e.limit),e.value!==void 0&&(this.value=e.value))}}class x8{constructor(){this.blur=0,this.color=new On,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(e){me(e)||(e.blur!==void 0&&(this.blur=e.blur),this.color=On.create(this.color,e.color),e.enable!==void 0&&(this.enable=e.enable),e.offset!==void 0&&(e.offset.x!==void 0&&(this.offset.x=e.offset.x),e.offset.y!==void 0&&(this.offset.y=e.offset.y)))}}class _8{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(e){if(me(e))return;const n=e.options;if(n!==void 0)for(const i in n){const r=n[i];r&&(this.options[i]=kn(this.options[i]??{},r))}e.close!==void 0&&(this.close=e.close),e.fill!==void 0&&(this.fill=e.fill),e.type!==void 0&&(this.type=e.type)}}class w8 extends fw{constructor(){super(),this.destroy=Ca.none,this.speed=5}load(e){super.load(e),!me(e)&&e.destroy!==void 0&&(this.destroy=e.destroy)}}class b8 extends uL{constructor(){super(),this.animation=new w8,this.value=3}load(e){if(super.load(e),me(e))return;const n=e.animation;n!==void 0&&this.animation.load(n)}}class C1{constructor(){this.width=0}load(e){me(e)||(e.color!==void 0&&(this.color=ad.create(this.color,e.color)),e.width!==void 0&&(this.width=ut(e.width)),e.opacity!==void 0&&(this.opacity=ut(e.opacity)))}}class S8 extends Oa{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(e){super.load(e),!me(e)&&(e.opacityRate!==void 0&&(this.opacityRate=e.opacityRate),e.sizeRate!==void 0&&(this.sizeRate=e.sizeRate),e.velocityRate!==void 0&&(this.velocityRate=e.velocityRate))}}class E8{constructor(e,n){this._engine=e,this._container=n,this.bounce=new dL,this.collisions=new n8,this.color=new ad,this.color.value="#fff",this.effect=new i8,this.groups={},this.move=new h8,this.number=new y8,this.opacity=new m8,this.reduceDuplicates=!1,this.shadow=new x8,this.shape=new _8,this.size=new b8,this.stroke=new C1,this.zIndex=new S8}load(e){if(me(e))return;if(e.groups!==void 0)for(const i of Object.keys(e.groups)){if(!Object.hasOwn(e.groups,i))continue;const r=e.groups[i];r!==void 0&&(this.groups[i]=kn(this.groups[i]??{},r))}e.reduceDuplicates!==void 0&&(this.reduceDuplicates=e.reduceDuplicates),this.bounce.load(e.bounce),this.color.load(ad.create(this.color,e.color)),this.effect.load(e.effect),this.move.load(e.move),this.number.load(e.number),this.opacity.load(e.opacity),this.shape.load(e.shape),this.size.load(e.size),this.shadow.load(e.shadow),this.zIndex.load(e.zIndex),this.collisions.load(e.collisions),e.interactivity!==void 0&&(this.interactivity=kn({},e.interactivity));const n=e.stroke;if(n&&(this.stroke=Si(n,i=>{const r=new C1;return r.load(i),r})),this._container){const i=this._engine.updaters.get(this._container);if(i)for(const s of i)s.loadOptions&&s.loadOptions(this,e);const r=this._engine.interactors.get(this._container);if(r)for(const s of r)s.loadParticlesOptions&&s.loadParticlesOptions(this,e)}}}function fL(t,...e){for(const n of e)t.load(n)}function hL(t,e,...n){const i=new E8(t,e);return fL(i,...n),i}class M8{constructor(e,n){this._findDefaultTheme=i=>this.themes.find(r=>r.default.value&&r.default.mode===i)??this.themes.find(r=>r.default.value&&r.default.mode===js.any),this._importPreset=i=>{this.load(this._engine.getPreset(i))},this._engine=e,this._container=n,this.autoPlay=!0,this.background=new UW,this.backgroundMask=new BW,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new VW,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new cL(e,n),this.manualParticles=[],this.particles=hL(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(e){var o,a;if(me(e))return;e.preset!==void 0&&Si(e.preset,l=>this._importPreset(l)),e.autoPlay!==void 0&&(this.autoPlay=e.autoPlay),e.clear!==void 0&&(this.clear=e.clear),e.key!==void 0&&(this.key=e.key),e.name!==void 0&&(this.name=e.name),e.delay!==void 0&&(this.delay=ut(e.delay));const n=e.detectRetina;n!==void 0&&(this.detectRetina=n),e.duration!==void 0&&(this.duration=ut(e.duration));const i=e.fpsLimit;i!==void 0&&(this.fpsLimit=i),e.pauseOnBlur!==void 0&&(this.pauseOnBlur=e.pauseOnBlur),e.pauseOnOutsideViewport!==void 0&&(this.pauseOnOutsideViewport=e.pauseOnOutsideViewport),e.zLayers!==void 0&&(this.zLayers=e.zLayers),this.background.load(e.background);const r=e.fullScreen;qD(r)?this.fullScreen.enable=r:this.fullScreen.load(r),this.backgroundMask.load(e.backgroundMask),this.interactivity.load(e.interactivity),e.manualParticles&&(this.manualParticles=e.manualParticles.map(l=>{const c=new qW;return c.load(l),c})),this.particles.load(e.particles),this.style=kn(this.style,e.style),this._engine.loadOptions(this,e),e.smooth!==void 0&&(this.smooth=e.smooth);const s=this._engine.interactors.get(this._container);if(s)for(const l of s)l.loadOptions&&l.loadOptions(this,e);if(e.responsive!==void 0)for(const l of e.responsive){const c=new YW;c.load(l),this.responsive.push(c)}if(this.responsive.sort((l,c)=>l.maxWidth-c.maxWidth),e.themes!==void 0)for(const l of e.themes){const c=this.themes.find(u=>u.name===l.name);if(c)c.load(l);else{const u=new ZW;u.load(l),this.themes.push(u)}}this.defaultThemes.dark=(o=this._findDefaultTheme(js.dark))==null?void 0:o.name,this.defaultThemes.light=(a=this._findDefaultTheme(js.light))==null?void 0:a.name}setResponsive(e,n,i){this.load(i);const r=this.responsive.find(s=>s.mode===sa.screen&&screen?s.maxWidth>screen.availWidth:s.maxWidth*n>e);return this.load(r==null?void 0:r.options),r==null?void 0:r.maxWidth}setTheme(e){if(e){const n=this.themes.find(i=>i.name===e);n&&this.load(n.options)}else{const n=ZD("(prefers-color-scheme: dark)"),i=n==null?void 0:n.matches,r=this._findDefaultTheme(i?js.dark:js.light);r&&this.load(r.options)}}}var xc;(function(t){t.external="external",t.particles="particles"})(xc||(xc={}));class T8{constructor(e,n){this.container=n,this._engine=e,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(e){for(const n of this._externalInteractors)n.isEnabled()&&n.interact(e)}handleClickMode(e){var n;for(const i of this._externalInteractors)(n=i.handleClickMode)==null||n.call(i,e)}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(const e of this._interactors){switch(e.type){case xc.external:this._externalInteractors.push(e);break;case xc.particles:this._particleInteractors.push(e);break}e.init()}}particlesInteract(e,n){for(const i of this._externalInteractors)i.clear(e,n);for(const i of this._particleInteractors)i.isEnabled(e)&&i.interact(e,n)}reset(e){for(const n of this._externalInteractors)n.isEnabled()&&n.reset(e);for(const n of this._particleInteractors)n.isEnabled(e)&&n.reset(e)}}var hr;(function(t){t.normal="normal",t.inside="inside",t.outside="outside"})(hr||(hr={}));function C8(t,e,n,i){const r=e.options[t];if(r)return kn({close:e.close,fill:e.fill},Fi(r,n,i))}function A8(t,e,n,i){const r=e.options[t];if(r)return kn({close:e.close,fill:e.fill},Fi(r,n,i))}function A1(t){if(!qt(t.outMode,t.checkModes))return;const e=t.radius*Dn;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class R8{constructor(e,n){this.container=n,this._calcPosition=(i,r,s,o=o1)=>{for(const v of i.plugins.values()){const g=v.particlePosition!==void 0?v.particlePosition(r,this):void 0;if(g)return ui.create(g.x,g.y,s)}const a=i.canvas.size,l=aW({size:a,position:r}),c=ui.create(l.x,l.y,s),u=this.getRadius(),d=this.options.move.outModes,f=v=>{A1({outMode:v,checkModes:[en.bounce],coord:c.x,maxCoord:i.canvas.size.width,setCb:g=>c.x+=g,radius:u})},h=v=>{A1({outMode:v,checkModes:[en.bounce],coord:c.y,maxCoord:i.canvas.size.height,setCb:g=>c.y+=g,radius:u})};return f(d.left??d.default),f(d.right??d.default),h(d.top??d.default),h(d.bottom??d.default),this._checkOverlap(c,o)?this._calcPosition(i,void 0,s,o+BG):c},this._calculateVelocity=()=>{const i=oW(this.direction),r=i.copy(),s=this.options.move;if(s.direction===vn.inside||s.direction===vn.outside)return r;const o=fo(ke(s.angle.value)),a=fo(ke(s.angle.offset)),l={left:a-o*on,right:a+o*on};return s.straight||(r.angle+=pi(ut(l.left,l.right))),s.random&&typeof s.speed=="number"&&(r.length*=_t()),r},this._checkOverlap=(i,r=o1)=>{const s=this.options.collisions,o=this.getRadius();if(!s.enable)return!1;const a=s.overlap;if(a.enable)return!1;const l=a.retries;if(l>=VG&&r>l)throw new Error(`${ji} particle is overlapping and can't be placed`);return!!this.container.particles.find(c=>vi(i,c.position)<o+c.getRadius())},this._getRollColor=i=>{if(!i||!this.roll||!this.backColor&&!this.roll.alter)return i;const r=this.roll.horizontal&&this.roll.vertical?Dn*p1:p1,s=this.roll.horizontal?Math.PI*on:yp;return Math.floor(((this.roll.angle??yp)+s)/(Math.PI/r))%Dn?this.backColor?this.backColor:this.roll.alter?IW(i,this.roll.alter.type,this.roll.alter.value):i:i},this._initPosition=i=>{const r=this.container,s=ke(this.options.zIndex.value);this.position=this._calcPosition(r,i,Gi(s,HG,r.zLayers)),this.initialPosition=this.position.copy();const o=r.canvas.size;switch(this.moveCenter={...nL(this.options.move.center,o),radius:this.options.move.center.radius??jG,mode:this.options.move.center.mode??gc.percent},this.direction=sW(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case vn.inside:this.outType=hr.inside;break;case vn.outside:this.outType=hr.outside;break}this.offset=mn.origin},this._engine=e}destroy(e){var s,o,a;if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const n=this.container,i=this.pathGenerator,r=n.shapeDrawers.get(this.shape);(s=r==null?void 0:r.particleDestroy)==null||s.call(r,this);for(const l of n.plugins.values())(o=l.particleDestroyed)==null||o.call(l,this,e);for(const l of n.particles.updaters)(a=l.particleDestroyed)==null||a.call(l,this,e);i==null||i.reset(this),this._engine.dispatchEvent(Vn.particleDestroyed,{container:this.container,data:{particle:this}})}draw(e){const n=this.container,i=n.canvas;for(const r of n.plugins.values())i.drawParticlePlugin(r,this,e);i.drawParticle(this,e)}getFillColor(){return this._getRollColor(this.bubble.color??S1(this.color))}getMass(){return this.getRadius()**rs*Math.PI*on}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??S1(this.strokeColor))}init(e,n,i,r){var C,P,E,M,N,k;const s=this.container,o=this._engine;this.id=e,this.group=r,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=hr.normal,this.ignoresResizeRatio=!0;const a=s.retina.pixelRatio,l=s.actualOptions,c=hL(this._engine,s,l.particles),{reduceDuplicates:u}=c,d=c.effect.type,f=c.shape.type;this.effect=Fi(d,this.id,u),this.shape=Fi(f,this.id,u);const h=c.effect,v=c.shape;if(i){if((C=i.effect)!=null&&C.type){const z=i.effect.type,F=Fi(z,this.id,u);F&&(this.effect=F,h.load(i.effect))}if((P=i.shape)!=null&&P.type){const z=i.shape.type,F=Fi(z,this.id,u);F&&(this.shape=F,v.load(i.shape))}}if(this.effect===mc){const z=[...this.container.effectDrawers.keys()];this.effect=z[Math.floor(_t()*z.length)]}if(this.shape===mc){const z=[...this.container.shapeDrawers.keys()];this.shape=z[Math.floor(_t()*z.length)]}this.effectData=C8(this.effect,h,this.id,u),this.shapeData=A8(this.shape,v,this.id,u),c.load(i);const g=this.effectData;g&&c.load(g.particles);const m=this.shapeData;m&&c.load(m.particles);const p=new cL(o,s);p.load(s.actualOptions.interactivity),p.load(c.interactivity),this.interactivity=p,this.effectFill=(g==null?void 0:g.fill)??c.effect.fill,this.effectClose=(g==null?void 0:g.close)??c.effect.close,this.shapeFill=(m==null?void 0:m.fill)??c.shape.fill,this.shapeClose=(m==null?void 0:m.close)??c.shape.close,this.options=c;const y=this.options.move.path;this.pathDelay=ke(y.delay.value)*Pn,y.generator&&(this.pathGenerator=this._engine.getPathGenerator(y.generator),this.pathGenerator&&s.addPath(y.generator,this.pathGenerator)&&this.pathGenerator.init(s)),s.retina.initParticle(this),this.size=tL(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(n),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=WD-ke(this.options.move.decay);const x=s.particles;x.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/s.zLayers,this.sides=24;let w=s.effectDrawers.get(this.effect);w||(w=this._engine.getEffectDrawer(this.effect),w&&s.effectDrawers.set(this.effect,w)),w!=null&&w.loadEffect&&w.loadEffect(this);let S=s.shapeDrawers.get(this.shape);S||(S=this._engine.getShapeDrawer(this.shape),S&&s.shapeDrawers.set(this.shape,S)),S!=null&&S.loadShape&&S.loadShape(this);const T=S==null?void 0:S.getSidesCount;T&&(this.sides=T(this)),this.spawning=!1,this.shadowColor=fr(this._engine,this.options.shadow.color);for(const z of x.updaters)z.init(this);for(const z of x.movers)(E=z.init)==null||E.call(z,this);(M=w==null?void 0:w.particleInit)==null||M.call(w,s,this),(N=S==null?void 0:S.particleInit)==null||N.call(S,s,this);for(const z of s.plugins.values())(k=z.particleCreated)==null||k.call(z,this)}isInsideCanvas(){const e=this.getRadius(),n=this.container.canvas.size,i=this.position;return i.x>=-e&&i.y>=-e&&i.y<=n.height+e&&i.x<=n.width+e}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){var e;for(const n of this.container.particles.updaters)(e=n.reset)==null||e.call(n,this)}}class P8{constructor(e,n){this.position=e,this.particle=n}}var jl;(function(t){t.circle="circle",t.rectangle="rectangle"})(jl||(jl={}));class pL{constructor(e,n,i){this.position={x:e,y:n},this.type=i}}class Ln extends pL{constructor(e,n,i){super(e,n,jl.circle),this.radius=i}contains(e){return vi(e,this.position)<=this.radius}intersects(e){const n=this.position,i=e.position,r={x:Math.abs(i.x-n.x),y:Math.abs(i.y-n.y)},s=this.radius;if(e instanceof Ln||e.type===jl.circle){const o=e,a=s+o.radius,l=Math.sqrt(r.x**rs+r.y**rs);return a>l}else if(e instanceof yr||e.type===jl.rectangle){const o=e,{width:a,height:l}=o.size;return Math.pow(r.x-a,rs)+Math.pow(r.y-l,rs)<=s**rs||r.x<=s+a&&r.y<=s+l||r.x<=a||r.y<=l}return!1}}class yr extends pL{constructor(e,n,i,r){super(e,n,jl.rectangle),this.size={height:r,width:i}}contains(e){const n=this.size.width,i=this.size.height,r=this.position;return e.x>=r.x&&e.x<=r.x+n&&e.y>=r.y&&e.y<=r.y+i}intersects(e){if(e instanceof Ln)return e.intersects(this);const n=this.size.width,i=this.size.height,r=this.position,s=e.position,o=e instanceof yr?e.size:{width:0,height:0},a=o.width,l=o.height;return s.x<r.x+n&&s.x+a>r.x&&s.y<r.y+i&&s.y+l>r.y}}class _p{constructor(e,n){this.rectangle=e,this.capacity=n,this._subdivide=()=>{const{x:i,y:r}=this.rectangle.position,{width:s,height:o}=this.rectangle.size,{capacity:a}=this;for(let l=0;l<MG;l++){const c=l%Dn;this._subs.push(new _p(new yr(i+s*on*c,r+o*on*(Math.round(l*on)-c),s*on,o*on),a))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(e){return this.rectangle.contains(e.position)?this._points.length<this.capacity?(this._points.push(e),!0):(this._divided||this._subdivide(),this._subs.some(n=>n.insert(e))):!1}query(e,n){const i=[];if(!e.intersects(this.rectangle))return[];for(const r of this._points)!e.contains(r.position)&&vi(e.position,r.position)>r.particle.getRadius()&&(!n||n(r.particle))||i.push(r.particle);if(this._divided)for(const r of this._subs)i.push(...r.query(e,n));return i}queryCircle(e,n,i){return this.query(new Ln(e.x,e.y,n),i)}queryRectangle(e,n,i){return this.query(new yr(e.x,e.y,n.width,n.height),i)}}const R1=t=>{const{height:e,width:n}=t;return new yr(m1*n,m1*e,g1*n,g1*e)};class D8{constructor(e,n){this._addToPool=(...r)=>{this._pool.push(...r)},this._applyDensity=(r,s,o,a)=>{var v,g,m;const l=r.number;if(!((v=r.number.density)!=null&&v.enable)){o===void 0?this._limit=l.limit.value:(((g=a==null?void 0:a.number.limit)==null?void 0:g.value)??l.limit.value)&&this._groupLimits.set(o,((m=a==null?void 0:a.number.limit)==null?void 0:m.value)??l.limit.value);return}const c=this._initDensityFactor(l.density),u=l.value,d=l.limit.value>v1?l.limit.value:u,f=Math.min(u,d)*c+s,h=Math.min(this.count,this.filter(p=>p.group===o).length);o===void 0?this._limit=l.limit.value*c:this._groupLimits.set(o,l.limit.value*c),h<f?this.push(Math.abs(f-h),void 0,r,o):h>f&&this.removeQuantity(h-f,o)},this._initDensityFactor=r=>{const s=this._container;if(!s.canvas.element||!r.enable)return $G;const o=s.canvas.element,a=s.retina.pixelRatio;return o.width*o.height/(r.height*r.width*a**rs)},this._pushParticle=(r,s,o,a)=>{try{let l=this._pool.pop();l||(l=new R8(this._engine,this._container)),l.init(this._nextId,r,s,o);let c=!0;return a&&(c=a(l)),c?(this._array.push(l),this._zArray.push(l),this._nextId++,this._engine.dispatchEvent(Vn.particleAdded,{container:this._container,data:{particle:l}}),l):void 0}catch(l){Aa().warning(`${ji} adding particle: ${l}`)}},this._removeParticle=(r,s,o)=>{const a=this._array[r];if(!a||a.group!==s)return!1;const l=this._zArray.indexOf(a);return this._array.splice(r,xp),this._zArray.splice(l,xp),a.destroy(o),this._engine.dispatchEvent(Vn.particleRemoved,{container:this._container,data:{particle:a}}),this._addToPool(a),!0},this._engine=e,this._container=n,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new T8(e,n),this._pluginsInitialized=!1;const i=n.canvas.size;this.quadTree=new _p(R1(i),a1),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const e=this._container;e.actualOptions.manualParticles.forEach(i=>this.addParticle(i.position?nL(i.position,e.canvas.size):void 0,i.options))}addParticle(e,n,i,r){const s=this._container.actualOptions.particles.number.limit.mode,o=i===void 0?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(o>v1)switch(s){case ld.delete:{const l=a+GG-o;l>WG&&this.removeQuantity(l);break}case ld.wait:if(a>=o)return;break}return this._pushParticle(e,n,i,r)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}draw(e){const n=this._container,i=n.canvas;i.clear(),this.update(e);for(const r of n.plugins.values())i.drawPlugin(r,e);for(const r of this._zArray)r.draw(e)}filter(e){return this._array.filter(e)}find(e){return this._array.find(e)}get(e){return this._array[e]}handleClickMode(e){this._interactionManager.handleClickMode(e)}async init(){var r,s;const e=this._container,n=e.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let i=!1;for(const o of e.plugins.values())if(i=((r=o.particlesInitialization)==null?void 0:r.call(o))??i,i)break;if(this.addManualParticles(),!i){const o=n.particles,a=o.groups;for(const l in a){const c=a[l];for(let u=this.count,d=0;d<((s=c.number)==null?void 0:s.value)&&u<o.number.value;u++,d++)this.addParticle(void 0,c,l)}for(let l=this.count;l<o.number.value;l++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const e=this._container;this.movers=await this._engine.getMovers(e,!0),this.updaters=await this._engine.getUpdaters(e,!0),await this._interactionManager.init();for(const n of e.pathGenerators.values())n.init(e)}push(e,n,i,r){for(let s=0;s<e;s++)this.addParticle(n==null?void 0:n.position,i,r)}async redraw(){this.clear(),await this.init(),this.draw({value:0,factor:0})}remove(e,n,i){this.removeAt(this._array.indexOf(e),void 0,n,i)}removeAt(e,n=EG,i,r){if(e<r0||e>this.count)return;let s=0;for(let o=e;s<n&&o<this.count;o++)this._removeParticle(o,i,r)&&(o--,s++)}removeQuantity(e,n){this.removeAt(r0,e,n)}setDensity(){const e=this._container.actualOptions,n=e.particles.groups,i=e.manualParticles.length;for(const r in n)this._applyDensity(n[r],i,r);this._applyDensity(e.particles,i)}setLastZIndex(e){this._lastZIndex=e,this._needsSort=this._needsSort||this._lastZIndex<e}setResizeFactor(e){this._resizeFactor=e}update(e){var s,o;const n=this._container,i=new Set;this.quadTree=new _p(R1(n.canvas.size),a1);for(const a of n.pathGenerators.values())a.update();for(const a of n.plugins.values())(s=a.update)==null||s.call(a,e);const r=this._resizeFactor;for(const a of this._array){r&&!a.ignoresResizeRatio&&(a.position.x*=r.width,a.position.y*=r.height,a.initialPosition.x*=r.width,a.initialPosition.y*=r.height),a.ignoresResizeRatio=!1,this._interactionManager.reset(a);for(const l of this._container.plugins.values()){if(a.destroyed)break;(o=l.particleUpdate)==null||o.call(l,a,e)}for(const l of this.movers)l.isEnabled(a)&&l.move(a,e);if(a.destroyed){i.add(a);continue}this.quadTree.insert(new P8(a.getPosition(),a))}if(i.size){const a=l=>!i.has(l);this._array=this.filter(a),this._zArray=this._zArray.filter(a);for(const l of i)this._engine.dispatchEvent(Vn.particleRemoved,{container:this._container,data:{particle:l}});this._addToPool(...i)}this._interactionManager.externalInteract(e);for(const a of this._array){for(const l of this.updaters)l.update(a,e);!a.destroyed&&!a.spawning&&this._interactionManager.particlesInteract(a,e)}if(delete this._resizeFactor,this._needsSort){const a=this._zArray;a.sort((l,c)=>c.position.z-l.position.z||l.id-c.id),this._lastZIndex=a[a.length-$D].position.z,this._needsSort=!1}}}class L8{constructor(e){this.container=e,this.pixelRatio=l1,this.reduceFactor=c1}init(){const e=this.container,n=e.actualOptions;this.pixelRatio=!n.detectRetina||Ra()?l1:devicePixelRatio,this.reduceFactor=c1;const i=this.pixelRatio,r=e.canvas;if(r.element){const a=r.element;r.size.width=a.offsetWidth*i,r.size.height=a.offsetHeight*i}const s=n.particles,o=s.move;this.maxSpeed=ke(o.gravity.maxSpeed)*i,this.sizeAnimationSpeed=ke(s.size.animation.speed)*i}initParticle(e){const n=e.options,i=this.pixelRatio,r=n.move,s=r.distance,o=e.retina;o.moveDrift=ke(r.drift)*i,o.moveSpeed=ke(r.speed)*i,o.sizeAnimationSpeed=ke(n.size.animation.speed)*i;const a=o.maxDistance;a.horizontal=s.horizontal!==void 0?s.horizontal*i:void 0,a.vertical=s.vertical!==void 0?s.vertical*i:void 0,o.maxSpeed=ke(r.gravity.maxSpeed)*i}}function Bt(t){return t&&!t.destroyed}function N8(t,e=Sg,n=!1){return{value:t,factor:n?Sg/e:Sg*t/Pn}}function ja(t,e,...n){const i=new M8(t,e);return fL(i,...n),i}class I8{constructor(e,n,i){this._intersectionManager=r=>{if(!(!Bt(this)||!this.actualOptions.pauseOnOutsideViewport))for(const s of r)s.target===this.interactivity.element&&(s.isIntersecting?this.play():this.pause())},this._nextFrame=r=>{try{if(!this._smooth&&this._lastFrameTime!==void 0&&r<this._lastFrameTime+Pn/this.fpsLimit){this.draw(!1);return}this._lastFrameTime??(this._lastFrameTime=r);const s=N8(r-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(s.value),this._lastFrameTime=r,s.value>Pn){this.draw(!1);return}if(this.particles.draw(s),!this.alive()){this.destroy();return}this.animationStatus&&this.draw(!1)}catch(s){Aa().error(`${ji} in animation loop`,s)}},this._engine=e,this.id=Symbol(n),this.fpsLimit=120,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=i,this._initialSourceOptions=i,this.retina=new L8(this),this.canvas=new OW(this,this._engine),this.particles=new D8(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=ja(this._engine,this),this.actualOptions=ja(this._engine,this),this._eventListeners=new FW(this),this._intersectionObserver=fW(r=>this._intersectionManager(r)),this._engine.dispatchEvent(Vn.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&Bt(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(e){if(!Bt(this))return;const n=this.interactivity.element;if(!n)return;const i=(d,f,h)=>{if(!Bt(this))return;const v=this.retina.pixelRatio,g={x:f.x*v,y:f.y*v},m=this.particles.quadTree.queryCircle(g,h*v);e(d,m)},r=d=>{if(!Bt(this))return;const f=d,h={x:f.offsetX||f.clientX,y:f.offsetY||f.clientY};i(d,h,LG)},s=()=>{Bt(this)&&(c=!0,u=!1)},o=()=>{Bt(this)&&(u=!0)},a=d=>{if(Bt(this)){if(c&&!u){const f=d;let h=f.touches[f.touches.length-h1];if(!h&&(h=f.changedTouches[f.changedTouches.length-h1],!h))return;const v=this.canvas.element,g=v?v.getBoundingClientRect():void 0,m={x:h.clientX-(g?g.left:vp),y:h.clientY-(g?g.top:vp)};i(d,m,Math.max(h.radiusX,h.radiusY))}c=!1,u=!1}},l=()=>{Bt(this)&&(c=!1,u=!1)};let c=!1,u=!1;this._clickHandlers.set("click",r),this._clickHandlers.set("touchstart",s),this._clickHandlers.set("touchmove",o),this._clickHandlers.set("touchend",a),this._clickHandlers.set("touchcancel",l);for(const[d,f]of this._clickHandlers)n.addEventListener(d,f)}addLifeTime(e){this._lifeTime+=e}addPath(e,n,i=!1){return!Bt(this)||!i&&this.pathGenerators.has(e)?!1:(this.pathGenerators.set(e,n),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){var e;if(Bt(this)){for(const[n,i]of this._clickHandlers)(e=this.interactivity.element)==null||e.removeEventListener(n,i);this._clickHandlers.clear()}}destroy(e=!0){var n,i;if(Bt(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const r of this.effectDrawers.values())(n=r.destroy)==null||n.call(r,this);for(const r of this.shapeDrawers.values())(i=r.destroy)==null||i.call(r,this);for(const r of this.effectDrawers.keys())this.effectDrawers.delete(r);for(const r of this.shapeDrawers.keys())this.shapeDrawers.delete(r);if(this._engine.clearPlugins(this),this.destroyed=!0,e){const r=this._engine.items,s=r.findIndex(o=>o===this);s>=NG&&r.splice(s,GD)}this._engine.dispatchEvent(Vn.containerDestroyed,{container:this})}}draw(e){if(!Bt(this))return;let n=e;const i=r=>{n&&(this._lastFrameTime=void 0,n=!1),this._nextFrame(r)};this._drawAnimationFrame=iW(r=>i(r))}async export(e,n={}){for(const i of this.plugins.values()){if(!i.export)continue;const r=await i.export(e,n);if(r.supported)return r.blob}Aa().error(`${ji} - Export plugin with type ${e} not found`)}handleClickMode(e){var n;if(Bt(this)){this.particles.handleClickMode(e);for(const i of this.plugins.values())(n=i.handleClickMode)==null||n.call(i,e)}}async init(){var c,u,d,f;if(!Bt(this))return;const e=this._engine.getSupportedEffects();for(const h of e){const v=this._engine.getEffectDrawer(h);v&&this.effectDrawers.set(h,v)}const n=this._engine.getSupportedShapes();for(const h of n){const v=this._engine.getShapeDrawer(h);v&&this.shapeDrawers.set(h,v)}await this.particles.initPlugins(),this._options=ja(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=ja(this._engine,this,this._options);const i=await this._engine.getAvailablePlugins(this);for(const[h,v]of i)this.plugins.set(h,v);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{zLayers:r,duration:s,delay:o,fpsLimit:a,smooth:l}=this.actualOptions;this.zLayers=r,this._duration=ke(s)*Pn,this._delay=ke(o)*Pn,this._lifeTime=0,this.fpsLimit=a>kG?a:IG,this._smooth=l;for(const h of this.effectDrawers.values())await((c=h.init)==null?void 0:c.call(h,this));for(const h of this.shapeDrawers.values())await((u=h.init)==null?void 0:u.call(h,this));for(const h of this.plugins.values())await((d=h.init)==null?void 0:d.call(h));this._engine.dispatchEvent(Vn.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const h of this.plugins.values())(f=h.particlesSetup)==null||f.call(h);this._engine.dispatchEvent(Vn.particlesSetup,{container:this})}async loadTheme(e){Bt(this)&&(this._currentTheme=e,await this.refresh())}pause(){var e;if(Bt(this)&&(this._drawAnimationFrame!==void 0&&(rW(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const n of this.plugins.values())(e=n.pause)==null||e.call(n);this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(Vn.containerPaused,{container:this})}}play(e){if(!Bt(this))return;const n=this._paused||e;if(this._firstStart&&!this.actualOptions.autoPlay){this._firstStart=!1;return}if(this._paused&&(this._paused=!1),n)for(const i of this.plugins.values())i.play&&i.play();this._engine.dispatchEvent(Vn.containerPlay,{container:this}),this.draw(n??!1)}async refresh(){if(Bt(this))return this.stop(),this.start()}async reset(e){if(Bt(this))return this._initialSourceOptions=e,this._sourceOptions=e,this._options=ja(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=ja(this._engine,this,this._options),this.refresh()}async start(){!Bt(this)||this.started||(await this.init(),this.started=!0,await new Promise(e=>{const n=async()=>{var i;this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const r of this.plugins.values())await((i=r.start)==null?void 0:i.call(r));this._engine.dispatchEvent(Vn.containerStarted,{container:this}),this.play(),e()};this._delayTimeout=setTimeout(()=>void n(),this._delay)}))}stop(){var e;if(!(!Bt(this)||!this.started)){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const n of this.plugins.values())(e=n.stop)==null||e.call(n);for(const n of this.plugins.keys())this.plugins.delete(n);this._sourceOptions=this._options,this._engine.dispatchEvent(Vn.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const e=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth===e?!1:(this._responsiveMaxWidth=e,!0)}}let k8=class{constructor(){this._listeners=new Map}addEventListener(e,n){this.removeEventListener(e,n);let i=this._listeners.get(e);i||(i=[],this._listeners.set(e,i)),i.push(n)}dispatchEvent(e,n){const i=this._listeners.get(e);i==null||i.forEach(r=>r(n))}hasEventListener(e){return!!this._listeners.get(e)}removeAllEventListeners(e){e?this._listeners.delete(e):this._listeners=new Map}removeEventListener(e,n){const i=this._listeners.get(e);if(!i)return;const r=i.length,s=i.indexOf(n);s<r0||(r===xp?this._listeners.delete(e):i.splice(s,xp))}};async function Lg(t,e,n,i=!1){let r=e.get(t);return(!r||i)&&(r=await Promise.all([...n.values()].map(s=>s(t))),e.set(t,r)),r}async function O8(t){const e=Fi(t.url,t.index);if(!e)return t.fallback;const n=await fetch(e);return n.ok?await n.json():(Aa().error(`${ji} ${n.status} while retrieving config file`),t.fallback)}const F8=t=>{let e;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===Eg)e=t,e.dataset[na]||(e.dataset[na]=s1);else{const i=t.getElementsByTagName(Eg);i.length?(e=i[OG],e.dataset[na]=s1):(e=document.createElement(Eg),e.dataset[na]=HD,t.appendChild(e))}const n="100%";return e.style.width||(e.style.width=n),e.style.height||(e.style.height=n),e},U8=(t,e)=>{let n=e??document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.dataset[na]=HD,document.body.append(n),n)};class z8{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new k8,this._initialized=!1,this.plugins=[],this.colorManagers=new Map,this.easingFunctions=new Map,this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){const e={};for(const[n,i]of this._configs)e[n]=i;return e}get items(){return this._domArray}get version(){return"3.9.1"}async addColorManager(e,n=!0){this.colorManagers.set(e.key,e),await this.refresh(n)}addConfig(e){const n=e.key??e.name??"default";this._configs.set(n,e),this._eventDispatcher.dispatchEvent(Vn.configAdded,{data:{name:n,config:e}})}async addEasing(e,n,i=!0){this.getEasing(e)||(this.easingFunctions.set(e,n),await this.refresh(i))}async addEffect(e,n,i=!0){Si(e,r=>{this.getEffectDrawer(r)||this.effectDrawers.set(r,n)}),await this.refresh(i)}addEventListener(e,n){this._eventDispatcher.addEventListener(e,n)}async addInteractor(e,n,i=!0){this._initializers.interactors.set(e,n),await this.refresh(i)}async addMover(e,n,i=!0){this._initializers.movers.set(e,n),await this.refresh(i)}async addParticleUpdater(e,n,i=!0){this._initializers.updaters.set(e,n),await this.refresh(i)}async addPathGenerator(e,n,i=!0){this.getPathGenerator(e)||this.pathGenerators.set(e,n),await this.refresh(i)}async addPlugin(e,n=!0){this.getPlugin(e.id)||this.plugins.push(e),await this.refresh(n)}async addPreset(e,n,i=!1,r=!0){(i||!this.getPreset(e))&&this.presets.set(e,n),await this.refresh(r)}async addShape(e,n=!0){for(const i of e.validTypes)this.getShapeDrawer(i)||this.shapeDrawers.set(i,e);await this.refresh(n)}checkVersion(e){if(this.version!==e)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${e}`)}clearPlugins(e){this.updaters.delete(e),this.movers.delete(e),this.interactors.delete(e)}dispatchEvent(e,n){this._eventDispatcher.dispatchEvent(e,n)}dom(){return this.items}domItem(e){return this.item(e)}async getAvailablePlugins(e){const n=new Map;for(const i of this.plugins)i.needsPlugin(e.actualOptions)&&n.set(i.id,await i.getPlugin(e));return n}getEasing(e){return this.easingFunctions.get(e)??(n=>n)}getEffectDrawer(e){return this.effectDrawers.get(e)}async getInteractors(e,n=!1){return Lg(e,this.interactors,this._initializers.interactors,n)}async getMovers(e,n=!1){return Lg(e,this.movers,this._initializers.movers,n)}getPathGenerator(e){return this.pathGenerators.get(e)}getPlugin(e){return this.plugins.find(n=>n.id===e)}getPreset(e){return this.presets.get(e)}getShapeDrawer(e){return this.shapeDrawers.get(e)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}async getUpdaters(e,n=!1){return Lg(e,this.updaters,this._initializers.updaters,n)}init(){this._initialized||(this._initialized=!0)}item(e){const{items:n}=this,i=n[e];if(!i||i.destroyed){n.splice(e,GD);return}return i}async load(e){var f;const n=e.id??((f=e.element)==null?void 0:f.id)??`tsparticles${Math.floor(_t()*FG)}`,{index:i,url:r}=e,s=r?await O8({fallback:e.options,url:r,index:i}):e.options,o=Fi(s,i),{items:a}=this,l=a.findIndex(h=>h.id.description===n),c=new I8(this,n,o);if(l>=UG){const h=this.item(l),v=h?zG:yp;h&&!h.destroyed&&h.destroy(!1),a.splice(l,v,c)}else a.push(c);const u=U8(n,e.element),d=F8(u);return c.canvas.loadCanvas(d),await c.start(),c}loadOptions(e,n){this.plugins.forEach(i=>{var r;return(r=i.loadOptions)==null?void 0:r.call(i,e,n)})}loadParticlesOptions(e,n,...i){const r=this.updaters.get(e);r&&r.forEach(s=>{var o;return(o=s.loadOptions)==null?void 0:o.call(s,n,...i)})}async refresh(e=!0){e&&await Promise.all(this.items.map(n=>n.refresh()))}removeEventListener(e,n){this._eventDispatcher.removeEventListener(e,n)}setOnClickHandler(e){const{items:n}=this;if(!n.length)throw new Error(`${ji} can only set click handlers after calling tsParticles.load()`);n.forEach(i=>i.addClickHandler(e))}}function B8(){const t=new z8;return t.init(),t}class $r{constructor(e){this.type=xc.external,this.container=e}}class hw{constructor(e){this.type=xc.particles,this.container=e}}var or;(function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"})(or||(or={}));var P1;(function(t){t.linear="linear",t.radial="radial",t.random="random"})(P1||(P1={}));var va;(function(t){t.easeInBack="ease-in-back",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInExpo="ease-in-expo",t.easeInSine="ease-in-sine",t.easeOutBack="ease-
322out-back",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutExpo="ease-out-expo",t.easeOutSine="ease-out-sine",t.easeInOutBack="ease-in-out-back",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutExpo="ease-in-out-expo",t.easeInOutSine="ease-in-out-sine"})(va||(va={}));const pw=B8();Ra()||(window.tsParticles=pw);const V8=t=>{const e=t.id??"tsparticles";return b.useEffect(()=>{let n;return pw.load({id:e,url:t.url,options:t.options}).then(i=>{var r;n=i,(r=t.particlesLoaded)==null||r.call(t,i)}),()=>{n==null||n.destroy()}},[e,t,t.url,t.options]),_.jsx("div",{id:e,className:t.className})};async function H8(t){await t(pw)}const c0=.5,j8=2,eo=0,cr=1,D1=60,L1=0,G8=.01,W8=Math.PI*j8;function $8(t){const e=t.initialPosition,{dx:n,dy:i}=Wn(e,t.position),r=Math.abs(n),s=Math.abs(i),{maxDistance:o}=t.retina,a=o.horizontal,l=o.vertical;if(!a&&!l)return;const c=(a&&r>=a)??!1,u=(l&&s>=l)??!1;if((c||u)&&!t.misplaced)t.misplaced=!!a&&r>a||!!l&&s>l,a&&(t.velocity.x=t.velocity.y*c0-t.velocity.x),l&&(t.velocity.y=t.velocity.x*c0-t.velocity.y);else if((!a||r<a)&&(!l||s<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const d=t.position,f=t.velocity;a&&(d.x<e.x&&f.x<eo||d.x>e.x&&f.x>eo)&&(f.x*=-_t()),l&&(d.y<e.y&&f.y<eo||d.y>e.y&&f.y>eo)&&(f.y*=-_t())}}function X8(t,e,n,i,r,s,o){Y8(t,o);const a=t.gravity,l=a!=null&&a.enable&&a.inverse?-cr:cr;r&&n&&(t.velocity.x+=r*o.factor/(D1*n)),a!=null&&a.enable&&n&&(t.velocity.y+=l*(a.acceleration*o.factor)/(D1*n));const c=t.moveDecay;t.velocity.multTo(c);const u=t.velocity.mult(n);a!=null&&a.enable&&i>eo&&(!a.inverse&&u.y>=eo&&u.y>=i||a.inverse&&u.y<=eo&&u.y<=-i)&&(u.y=l*i,n&&(t.velocity.y=u.y/n));const d=t.options.zIndex,f=(cr-t.zIndexFactor)**d.velocityRate;u.multTo(f),u.multTo(s);const{position:h}=t;h.addTo(u),e.vibrate&&(h.x+=Math.sin(h.x*Math.cos(h.y))*s,h.y+=Math.cos(h.y*Math.sin(h.x))*s)}function q8(t,e,n){const i=t.container;if(!t.spin)return;const r=t.spin.direction===or.clockwise,s={x:r?Math.cos:Math.sin,y:r?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*s.x(t.spin.angle)*n,t.position.y=t.spin.center.y+t.spin.radius*s.y(t.spin.angle)*n,t.spin.radius+=t.spin.acceleration*n;const o=Math.max(i.canvas.size.width,i.canvas.size.height),a=o*c0;t.spin.radius>a?(t.spin.radius=a,t.spin.acceleration*=-cr):t.spin.radius<L1&&(t.spin.radius=L1,t.spin.acceleration*=-cr),t.spin.angle+=e*G8*(cr-t.spin.radius/o)}function Y8(t,e){var o;const n=t.options,i=n.move.path;if(!i.enable)return;if(t.lastPathTime<=t.pathDelay){t.lastPathTime+=e.value;return}const s=(o=t.pathGenerator)==null?void 0:o.generate(t,e);s&&t.velocity.addTo(s),i.clamp&&(t.velocity.x=Gi(t.velocity.x,-cr,cr),t.velocity.y=Gi(t.velocity.y,-cr,cr)),t.lastPathTime-=t.pathDelay}function K8(t){return t.slow.inRange?t.slow.factor:cr}function Z8(t){const e=t.container,n=t.options,i=n.move.spin;if(!i.enable)return;const r=i.position??{x:50,y:50},s=.01,o={x:r.x*s*e.canvas.size.width,y:r.y*s*e.canvas.size.height},a=t.getPosition(),l=vi(a,o),c=ke(i.acceleration);t.retina.spinAcceleration=c*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=eo?or.clockwise:or.counterClockwise,angle:_t()*W8,radius:l,acceleration:t.retina.spinAcceleration}}const Q8=2,J8=1,e9=1;class t9{init(e){const n=e.options,i=n.move.gravity;e.gravity={enable:i.enable,acceleration:ke(i.acceleration),inverse:i.inverse},Z8(e)}isEnabled(e){return!e.destroyed&&e.options.move.enable}move(e,n){var m,p;const i=e.options,r=i.move;if(!r.enable)return;const s=e.container,o=s.retina.pixelRatio;(m=e.retina).moveSpeed??(m.moveSpeed=ke(r.speed)*o),(p=e.retina).moveDrift??(p.moveDrift=ke(e.options.move.drift)*o);const a=K8(e),l=s.retina.reduceFactor,c=e.retina.moveSpeed,u=e.retina.moveDrift,d=Pr(i.size.value)*o,f=r.size?e.getRadius()/d:J8,h=n.factor||e9,v=c*f*a*h/Q8,g=e.retina.maxSpeed??s.retina.maxSpeed;r.spin.enable?q8(e,v,l):X8(e,r,v,g,u,l,n),$8(e)}}async function n9(t,e=!0){t.checkVersion("3.9.1"),await t.addMover("base",()=>Promise.resolve(new t9),e)}const i9=2,r9=Math.PI*i9,s9=0,N1={x:0,y:0};function o9(t){const{context:e,particle:n,radius:i}=t;n.circleRange||(n.circleRange={min:s9,max:r9});const r=n.circleRange;e.arc(N1.x,N1.y,i,r.min,r.max,!1)}const a9=12,l9=360,I1=0;class c9{constructor(){this.validTypes=["circle"]}draw(e){o9(e)}getSidesCount(){return a9}particleInit(e,n){const i=n.shapeData,r=(i==null?void 0:i.angle)??{max:l9,min:I1};n.circleRange=Tl(r)?{min:fo(r.min),max:fo(r.max)}:{min:I1,max:fo(r)}}}async function u9(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new c9,e)}class d9{constructor(e,n){this._container=e,this._engine=n}
vendor: 64,695 bytes, line 322
322init(e){const n=sd(this._engine,e.options.color,e.id,e.options.reduceDuplicates);n&&(e.color=aL(n,e.options.color.animation,this._container.retina.reduceFactor))}isEnabled(e){const{h:n,s:i,l:r}=e.options.color.animation,{color:s}=e;return!e.destroyed&&!e.spawning&&((s==null?void 0:s.h.value)!==void 0&&n.enable||(s==null?void 0:s.s.value)!==void 0&&i.enable||(s==null?void 0:s.l.value)!==void 0&&r.enable)}update(e,n){lL(e.color,n)}}async function f9(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("color",n=>Promise.resolve(new d9(n,t)),e)}var Xo;(function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"})(Xo||(Xo={}));const h9=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,p9=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,xf=16,m9=1,g9=255;class v9{constructor(){this.key="hex",this.stringPrefix="#"}handleColor(e){return this._parseString(e.value)}handleRangeColor(e){return this._parseString(e.value)}parseString(e){return this._parseString(e)}_parseString(e){if(typeof e!="string"||!(e!=null&&e.startsWith(this.stringPrefix)))return;const n=e.replace(h9,(r,s,o,a,l)=>s+s+o+o+a+a+(l!==void 0?l+l:"")),i=p9.exec(n);return i?{a:i[Xo.a]!==void 0?parseInt(i[Xo.a],xf)/g9:m9,b:parseInt(i[Xo.b],xf),g:parseInt(i[Xo.g],xf),r:parseInt(i[Xo.r],xf)}:void 0}}async function y9(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new v9,e)}var Cl;(function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"})(Cl||(Cl={}));class x9{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(e){const n=e.value,i=n.hsl??e.value;if(i.h!==void 0&&i.s!==void 0&&i.l!==void 0)return vc(i)}handleRangeColor(e){const n=e.value,i=n.hsl??e.value;if(i.h!==void 0&&i.l!==void 0)return vc({h:ke(i.h),l:ke(i.l),s:ke(i.s)})}parseString(e){if(!e.startsWith("hsl"))return;const n=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i,i=n.exec(e),r=4,s=1,o=10;return i?MW({a:i.length>r?KD(i[Cl.a]):s,h:parseInt(i[Cl.h],o),l:parseInt(i[Cl.l],o),s:parseInt(i[Cl.s],o)}):void 0}}async function _9(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new x9,e)}class w9{constructor(e){this.container=e}init(e){const n=e.options.opacity,i=1;e.opacity=tL(n,i);const r=n.animation;r.enable&&(e.opacity.velocity=ke(r.speed)/Js*this.container.retina.reduceFactor,r.sync||(e.opacity.velocity*=_t()))}isEnabled(e){return!e.destroyed&&!e.spawning&&!!e.opacity&&e.opacity.enable&&((e.opacity.maxLoops??0)<=0||(e.opacity.maxLoops??0)>0&&(e.opacity.loops??0)<(e.opacity.maxLoops??0))}reset(e){e.opacity&&(e.opacity.time=0,e.opacity.loops=0)}update(e,n){!this.isEnabled(e)||!e.opacity||cw(e,e.opacity,!0,e.options.opacity.animation.destroy,n)}}async function b9(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("opacity",n=>Promise.resolve(new w9(n)),e)}const wp=0,Gl=0;function S9(t){if(t.outMode!==en.bounce&&t.outMode!==en.split||t.direction!==it.left&&t.direction!==it.right)return;t.bounds.right<Gl&&t.direction===it.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===it.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let n=!1;if(t.direction===it.right&&t.bounds.right>=t.canvasSize.width&&e>wp||t.direction===it.left&&t.bounds.left<=Gl&&e<wp){const r=ke(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-r,n=!0}if(!n)return;const i=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===it.right?t.particle.position.x=t.canvasSize.width-i:t.bounds.left<=Gl&&t.direction===it.left&&(t.particle.position.x=i),t.outMode===en.split&&t.particle.destroy()}function E9(t){if(t.outMode!==en.bounce&&t.outMode!==en.split||t.direction!==it.bottom&&t.direction!==it.top)return;t.bounds.bottom<Gl&&t.direction===it.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===it.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let n=!1;if(t.direction===it.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>wp||t.direction===it.top&&t.bounds.top<=Gl&&e<wp){const r=ke(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-r,n=!0}if(!n)return;const i=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===it.bottom?t.particle.position.y=t.canvasSize.height-i:t.bounds.top<=Gl&&t.direction===it.top&&(t.particle.position.y=i),t.outMode===en.split&&t.particle.destroy()}class M9{constructor(e){this.container=e,this.modes=[en.bounce,en.split]}update(e,n,i,r){if(!this.modes.includes(r))return;const s=this.container;let o=!1;for(const f of s.plugins.values())if(f.particleBounce!==void 0&&(o=f.particleBounce(e,i,n)),o)break;if(o)return;const a=e.getPosition(),l=e.offset,c=e.getRadius(),u=Dd(a,c),d=s.canvas.size;S9({particle:e,outMode:r,direction:n,bounds:u,canvasSize:d,offset:l,size:c}),E9({particle:e,outMode:r,direction:n,bounds:u,canvasSize:d,offset:l,size:c})}}const _f=0;class T9{constructor(e){this.container=e,this.modes=[en.destroy]}update(e,n,i,r){if(!this.modes.includes(r))return;const s=this.container;switch(e.outType){case hr.normal:case hr.outside:if(ow(e.position,s.canvas.size,mn.origin,e.getRadius(),n))return;break;case hr.inside:{const{dx:o,dy:a}=Wn(e.position,e.moveCenter),{x:l,y:c}=e.velocity;if(l<_f&&o>e.moveCenter.radius||c<_f&&a>e.moveCenter.radius||l>=_f&&o<-e.moveCenter.radius||c>=_f&&a<-e.moveCenter.radius)return;break}}s.particles.remove(e,e.group,!0)}}const wf=0;class C9{constructor(e){this.container=e,this.modes=[en.none]}update(e,n,i,r){if(!this.modes.includes(r)||((e.options.move.distance.horizontal&&(n===it.left||n===it.right))??(e.options.move.distance.vertical&&(n===it.top||n===it.bottom))))return;const s=e.options.move.gravity,o=this.container,a=o.canvas.size,l=e.getRadius();if(s.enable){const c=e.position;(!s.inverse&&c.y>a.height+l&&n===it.bottom||s.inverse&&c.y<-l&&n===it.top)&&o.particles.remove(e)}else{if(e.velocity.y>wf&&e.position.y<=a.height+l||e.velocity.y<wf&&e.position.y>=-l||e.velocity.x>wf&&e.position.x<=a.width+l||e.velocity.x<wf&&e.position.x>=-l)return;ow(e.position,o.canvas.size,mn.origin,l,n)||o.particles.remove(e)}}}const bf=0,Sf=0;class A9{constructor(e){this.container=e,this.modes=[en.out]}update(e,n,i,r){if(!this.modes.includes(r))return;const s=this.container;switch(e.outType){case hr.inside:{const{x:o,y:a}=e.velocity,l=mn.origin;l.length=e.moveCenter.radius,l.angle=e.velocity.angle+Math.PI,l.addTo(mn.create(e.moveCenter));const{dx:c,dy:u}=Wn(e.position,l);if(o<=bf&&c>=Sf||a<=bf&&u>=Sf||o>=bf&&c<=Sf||a>=bf&&u<=Sf)return;e.position.x=Math.floor(pi({min:0,max:s.canvas.size.width})),e.position.y=Math.floor(pi({min:0,max:s.canvas.size.height}));const{dx:d,dy:f}=Wn(e.position,e.moveCenter);e.direction=Math.atan2(-f,-d),e.velocity.angle=e.direction;break}default:{if(ow(e.position,s.canvas.size,mn.origin,e.getRadius(),n))return;switch(e.outType){case hr.outside:{e.position.x=Math.floor(pi({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(pi({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:o,dy:a}=Wn(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(a,o),e.velocity.angle=e.direction);break}case hr.normal:{const o=e.options.move.warp,a=s.canvas.size,l={bottom:a.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:a.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},c=e.getRadius(),u=Dd(e.position,c);n===it.right&&u.left>a.width+e.offset.x?(e.position.x=l.left,e.initialPosition.x=e.position.x,o||(e.position.y=_t()*a.height,e.initialPosition.y=e.position.y)):n===it.left&&u.right<-e.offset.x&&(e.position.x=l.right,e.initialPosition.x=e.position.x,o||(e.position.y=_t()*a.height,e.initialPosition.y=e.position.y)),n===it.bottom&&u.top>a.height+e.offset.y?(o||(e.position.x=_t()*a.width,e.initialPosition.x=e.position.x),e.position.y=l.top,e.initialPosition.y=e.position.y):n===it.top&&u.bottom<-e.offset.y&&(o||(e.position.x=_t()*a.width,e.initialPosition.x=e.position.x),e.position.y=l.bottom,e.initialPosition.y=e.position.y);break}}break}}}}const R9=(t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e;class P9{constructor(e){this._addUpdaterIfMissing=(n,i,r)=>{const s=n.options.move.outModes;!this.updaters.has(i)&&R9(s,i)&&this.updaters.set(i,r(this.container))},this._updateOutMode=(n,i,r,s)=>{for(const o of this.updaters.values())o.update(n,s,i,r)},this.container=e,this.updaters=new Map}init(e){this._addUpdaterIfMissing(e,en.bounce,n=>new M9(n)),this._addUpdaterIfMissing(e,en.out,n=>new A9(n)),this._addUpdaterIfMissing(e,en.destroy,n=>new T9(n)),this._addUpdaterIfMissing(e,en.none,n=>new C9(n))}isEnabled(e){return!e.destroyed&&!e.spawning}update(e,n){const i=e.options.move.outModes;this._updateOutMode(e,n,i.bottom??i.default,it.bottom),this._updateOutMode(e,n,i.left??i.default,it.left),this._updateOutMode(e,n,i.right??i.default,it.right),this._updateOutMode(e,n,i.top??i.default,it.top)}}async function D9(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("outModes",n=>Promise.resolve(new P9(n)),e)}var Al;(function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"})(Al||(Al={}));class L9{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(e){const n=e.value,i=n.rgb??e.value;if(i.r!==void 0)return i}handleRangeColor(e){const n=e.value,i=n.rgb??e.value;if(i.r!==void 0)return{r:ke(i.r),g:ke(i.g),b:ke(i.b)}}parseString(e){if(!e.startsWith(this.stringPrefix))return;const n=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i,i=n.exec(e),r=10;return i?{a:i.length>4?KD(i[Al.a]):1,b:parseInt(i[Al.b],r),g:parseInt(i[Al.g],r),r:parseInt(i[Al.r],r)}:void 0}}async function N9(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new L9,e)}const Lo=0;class I9{init(e){const n=e.container,i=e.options.size,r=i.animation;r.enable&&(e.size.velocity=(e.retina.sizeAnimationSpeed??n.retina.sizeAnimationSpeed)/Js*n.retina.reduceFactor,r.sync||(e.size.velocity*=_t()))}isEnabled(e){return!e.destroyed&&!e.spawning&&e.size.enable&&((e.size.maxLoops??Lo)<=Lo||(e.size.maxLoops??Lo)>Lo&&(e.size.loops??Lo)<(e.size.maxLoops??Lo))}reset(e){e.size.loops=Lo}update(e,n){this.isEnabled(e)&&cw(e,e.size,!0,e.options.size.animation.destroy,n)}}async function k9(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("size",()=>Promise.resolve(new I9),e)}async function O9(t,e=!0){t.checkVersion("3.9.1"),await y9(t,!1),await _9(t,!1),await N9(t,!1),await n9(t,!1),await u9(t,!1),await f9(t,!1),await b9(t,!1),await D9(t,!1),await k9(t,!1),await t.refresh(e)}async function F9(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(va.easeInQuad,n=>n**2,!1),await t.addEasing(va.easeOutQuad,n=>1-(1-n)**2,!1),await t.addEasing(va.easeInOutQuad,n=>n<.5?2*n**2:1-(-2*n+2)**2/2,!1),await t.refresh(e)}function U9(t,e){const{context:n,opacity:i}=t,r=.5,s=n.globalAlpha;if(!e)return;const o=e.width,a=o*r;n.globalAlpha=i,n.drawImage(e,-a,-a,o,o),n.globalAlpha=s}const Ng='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"',k1=0;class z9{constructor(){this.validTypes=["emoji"],this._emojiShapeDict=new Map}destroy(){for(const[e,n]of this._emojiShapeDict)n instanceof ImageBitmap&&(n==null||n.close()),this._emojiShapeDict.delete(e)}draw(e){const n=e.particle.emojiDataKey;if(!n)return;const i=this._emojiShapeDict.get(n);i&&U9(e,i)}async init(e){const n=e.actualOptions,{validTypes:i}=this;if(!i.find(o=>qt(o,n.particles.shape.type)))return;const r=[b1(Ng)],s=i.map(o=>n.particles.shape.options[o]).find(o=>!!o);s&&Si(s,o=>{o.font&&r.push(b1(o.font))}),await Promise.all(r)}particleDestroy(e){e.emojiDataKey=void 0}particleInit(e,n){const r=n.shapeData;if(!(r!=null&&r.value))return;const s=Fi(r.value,n.randomIndexData);if(!s)return;const o=typeof s=="string"?{font:r.font??Ng,padding:r.padding??k1,value:s}:{font:Ng,padding:k1,...r,...s},a=o.font,l=o.value,c=`${l}_${a}`;if(this._emojiShapeDict.has(c)){n.emojiDataKey=c;return}const u=o.padding*2,d=Pr(n.size.value),f=d+u,h=f*2;let v;if(typeof OffscreenCanvas<"u"){const g=new OffscreenCanvas(h,h),m=g.getContext("2d");if(!m)return;m.font=`400 ${d*2}px ${a}`,m.textBaseline="middle",m.textAlign="center",m.fillText(l,f,f),v=g.transferToImageBitmap()}else{const g=document.createElement("canvas");g.width=h,g.height=h;const m=g.getContext("2d");if(!m)return;m.font=`400 ${d*2}px ${a}`,m.textBaseline="middle",m.textAlign="center",m.fillText(l,f,f),v=g}this._emojiShapeDict.set(c,v),n.emojiDataKey=c}}async function B9(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new z9,e)}const V9=1,H9=1,mL=0;function gL(t,e,n,i,r,s){const o=e.actualOptions.interactivity.modes.attract;if(!o)return;const a=e.particles.quadTree.query(r,s);for(const l of a){const{dx:c,dy:u,distance:d}=Wn(l.position,n),f=o.speed*o.factor,h=Gi(t.getEasing(o.easing)(H9-d/i)*f,V9,o.maxSpeed),v=mn.create(d?c/d*h:f,d?u/d*h:f);l.position.subFrom(v)}}function j9(t,e,n){e.attract||(e.attract={particles:[]});const{attract:i}=e;if(i.finish||(i.count||(i.count=0),i.count++,i.count===e.particles.count&&(i.finish=!0)),i.clicking){const r=e.interactivity.mouse.clickPosition,s=e.retina.attractModeDistance;if(!s||s<mL||!r)return;gL(t,e,r,s,new Ln(r.x,r.y,s),o=>n(o))}else i.clicking===!1&&(i.particles=[])}function G9(t,e,n){const i=e.interactivity.mouse.position,r=e.retina.attractModeDistance;!r||r<mL||!i||gL(t,e,i,r,new Ln(i.x,i.y,r),s=>n(s))}class W9{constructor(){this.distance=200,this.duration=.4,this.easing=va.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1}load(e){me(e)||(e.distance!==void 0&&(this.distance=e.distance),e.duration!==void 0&&(this.duration=e.duration),e.easing!==void 0&&(this.easing=e.easing),e.factor!==void 0&&(this.factor=e.factor),e.maxSpeed!==void 0&&(this.maxSpeed=e.maxSpeed),e.speed!==void 0&&(this.speed=e.speed))}}const Jc="attract";let $9=class extends $r{constructor(e,n){super(n),this._engine=e,n.attract||(n.attract={particles:[]}),this.handleClickMode=i=>{const r=this.container.actualOptions,s=r.interactivity.modes.attract;if(!(!s||i!==Jc)){n.attract||(n.attract={particles:[]}),n.attract.clicking=!0,n.attract.count=0;for(const o of n.attract.particles)this.isEnabled(o)&&o.velocity.setTo(o.initialVelocity);n.attract.particles=[],n.attract.finish=!1,setTimeout(()=>{n.destroyed||(n.attract||(n.attract={particles:[]}),n.attract.clicking=!1)},s.duration*Pn)}}}clear(){}init(){const e=this.container,n=e.actualOptions.interactivity.modes.attract;n&&(e.retina.attractModeDistance=n.distance*e.retina.pixelRatio)}interact(){const e=this.container,n=e.actualOptions,i=e.interactivity.status===Ta,r=n.interactivity.events,{enable:s,mode:o}=r.onHover,{enable:a,mode:l}=r.onClick;i&&s&&qt(Jc,o)?G9(this._engine,this.container,c=>this.isEnabled(c)):a&&qt(Jc,l)&&j9(this._engine,this.container,c=>this.isEnabled(c))}isEnabled(e){const n=this.container,i=n.actualOptions,r=n.interactivity.mouse,s=((e==null?void 0:e.interactivity)??i.interactivity).events;if((!r.position||!s.onHover.enable)&&(!r.clickPosition||!s.onClick.enable))return!1;const o=s.onHover.mode,a=s.onClick.mode;return qt(Jc,o)||qt(Jc,a)}loadModeOptions(e,...n){e.attract||(e.attract=new W9);for(const i of n)e.attract.load(i==null?void 0:i.attract)}reset(){}};async function X9(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalAttract",n=>Promise.resolve(new $9(t,n)),e)}const q9=2,Sh=.5,Y9=Math.PI*Sh,O1=2,vL=10,K9=0;function yL(t,e,n,i,r){const s=t.particles.quadTree.query(i,r);for(const o of s)i instanceof Ln?JD(o0(o),{position:e,radius:n,mass:n**q9*Y9,velocity:mn.origin,factor:mn.origin}):i instanceof yr&&vW(o,Dd(e,n))}function Z9(t,e,n,i){const r=document.querySelectorAll(e);r.length&&r.forEach(s=>{const o=s,a=t.retina.pixelRatio,l={x:(o.offsetLeft+o.offsetWidth*Sh)*a,y:(o.offsetTop+o.offsetHeight*Sh)*a},c=o.offsetWidth*Sh*a,u=vL*a,d=n.type===yc.circle?new Ln(l.x,l.y,c+u):new yr(o.offsetLeft*a-u,o.offsetTop*a-u,o.offsetWidth*a+u*O1,o.offsetHeight*a+u*O1);i(l,c,d)})}function Q9(t,e,n,i){lw(n,e,(r,s)=>Z9(t,r,s,(o,a,l)=>yL(t,o,a,l,i)))}function J9(t,e){const n=t.retina.pixelRatio,i=vL*n,r=t.interactivity.mouse.position,s=t.retina.bounceModeDistance;!s||s<K9||!r||yL(t,r,s,new Ln(r.x,r.y,s+i),e)}class e${constructor(){this.distance=200}load(e){me(e)||e.distance!==void 0&&(this.distance=e.distance)}}const Ef="bounce";class t$ extends $r{constructor(e){super(e)}clear(){}init(){const e=this.container,n=e.actualOptions.interactivity.modes.bounce;n&&(e.retina.bounceModeDistance=n.distance*e.retina.pixelRatio)}interact(){const e=this.container,n=e.actualOptions,i=n.interactivity.events,r=e.interactivity.status===Ta,s=i.onHover.enable,o=i.onHover.mode,a=i.onDiv;r&&s&&qt(Ef,o)?J9(this.container,l=>this.isEnabled(l)):Q9(this.container,a,Ef,l=>this.isEnabled(l))}isEnabled(e){const n=this.container,i=n.actualOptions,r=n.interactivity.mouse,s=((e==null?void 0:e.interactivity)??i.interactivity).events,o=s.onDiv;return!!r.position&&s.onHover.enable&&qt(Ef,s.onHover.mode)||aw(Ef,o)}loadModeOptions(e,...n){e.bounce||(e.bounce=new e$);for(const i of n)e.bounce.load(i==null?void 0:i.bounce)}reset(){}}async function n$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalBounce",n=>Promise.resolve(new t$(n)),e)}class xL{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(e){if(!me(e)){if(e.distance!==void 0&&(this.distance=e.distance),e.duration!==void 0&&(this.duration=e.duration),e.mix!==void 0&&(this.mix=e.mix),e.opacity!==void 0&&(this.opacity=e.opacity),e.color!==void 0){const n=Wr(this.color)?void 0:this.color;this.color=Si(e.color,i=>On.create(n,i))}e.size!==void 0&&(this.size=e.size)}}}class i$ extends xL{constructor(){super(),this.selectors=[]}load(e){super.load(e),!me(e)&&e.selectors!==void 0&&(this.selectors=e.selectors)}}class r$ extends xL{load(e){super.load(e),!me(e)&&(this.divs=Si(e.divs,n=>{const i=new i$;return i.load(n),i}))}}var Sr;(function(t){t.color="color",t.opacity="opacity",t.size="size"})(Sr||(Sr={}));function F1(t,e,n,i){if(e>=n){const r=t+(e-n)*i;return Gi(r,t,e)}else if(e<n){const r=t-(n-e)*i;return Gi(r,e,t)}}const No="bubble",Ig=0,s$=0,o$=2,U1=1,z1=1,a$=0,l$=0,kg=.5,Og=1;class c$ extends $r{constructor(e,n){super(e),this._clickBubble=()=>{var u;const i=this.container,r=i.actualOptions,s=i.interactivity.mouse.clickPosition,o=r.interactivity.modes.bubble;if(!o||!s)return;i.bubble||(i.bubble={});const a=i.retina.bubbleModeDistance;if(!a||a<Ig)return;const l=i.particles.quadTree.queryCircle(s,a,d=>this.isEnabled(d)),{bubble:c}=i;for(const d of l){if(!c.clicking)continue;d.bubble.inRange=!c.durationEnd;const f=d.getPosition(),h=vi(f,s),v=(new Date().getTime()-(i.interactivity.mouse.clickTime??s$))/Pn;v>o.duration&&(c.durationEnd=!0),v>o.duration*o$&&(c.clicking=!1,c.durationEnd=!1);const g={bubbleObj:{optValue:i.retina.bubbleModeSize,value:d.bubble.radius},particlesObj:{optValue:Pr(d.options.size.value)*i.retina.pixelRatio,value:d.size.value},type:Sr.size};this._process(d,h,v,g);const m={bubbleObj:{optValue:o.opacity,value:d.bubble.opacity},particlesObj:{optValue:Pr(d.options.opacity.value),value:((u=d.opacity)==null?void 0:u.value)??U1},type:Sr.opacity};this._process(d,h,v,m),!c.durationEnd&&h<=a?this._hoverBubbleColor(d,h):delete d.bubble.color}},this._hoverBubble=()=>{const i=this.container,r=i.interactivity.mouse.position,s=i.retina.bubbleModeDistance;if(!s||s<Ig||!r)return;const o=i.particles.quadTree.queryCircle(r,s,a=>this.isEnabled(a));for(const a of o){a.bubble.inRange=!0;const l=a.getPosition(),c=vi(l,r),u=z1-c/s;c<=s?u>=l$&&i.interactivity.status===Ta&&(this._hoverBubbleSize(a,u),this._hoverBubbleOpacity(a,u),this._hoverBubbleColor(a,u)):this.reset(a),i.interactivity.status===e0&&this.reset(a)}},this._hoverBubbleColor=(i,r,s)=>{const o=this.container.actualOptions,a=s??o.interactivity.modes.bubble;if(a){if(!i.bubble.finalColor){const l=a.color;if(!l)return;const c=Fi(l);i.bubble.finalColor=sd(this._engine,c)}if(i.bubble.finalColor)if(a.mix){i.bubble.color=void 0;const l=i.getFillColor();i.bubble.color=l?rL(uw(l,i.bubble.finalColor,z1-r,r)):i.bubble.finalColor}else i.bubble.color=i.bubble.finalColor}},this._hoverBubbleOpacity=(i,r,s)=>{var f,h;const o=this.container,a=o.actualOptions,l=(s==null?void 0:s.opacity)??((f=a.interactivity.modes.bubble)==null?void 0:f.opacity);if(!l)return;const c=i.options.opacity.value,u=((h=i.opacity)==null?void 0:h.value)??U1,d=F1(u,l,Pr(c),r);d!==void 0&&(i.bubble.opacity=d)},this._hoverBubbleSize=(i,r,s)=>{const o=this.container,a=s!=null&&s.size?s.size*o.retina.pixelRatio:o.retina.bubbleModeSize;if(a===void 0)return;const l=Pr(i.options.size.value)*o.retina.pixelRatio,c=i.size.value,u=F1(c,a,l,r);u!==void 0&&(i.bubble.radius=u)},this._process=(i,r,s,o)=>{const a=this.container,l=o.bubbleObj.optValue,c=a.actualOptions,u=c.interactivity.modes.bubble;if(!u||l===void 0)return;const d=u.duration,f=a.retina.bubbleModeDistance,h=o.particlesObj.optValue,v=o.bubbleObj.value,g=o.particlesObj.value??a$,m=o.type;if(!(!f||f<Ig||l===h))if(a.bubble||(a.bubble={}),a.bubble.durationEnd)v&&(m===Sr.size&&delete i.bubble.radius,m===Sr.opacity&&delete i.bubble.opacity);else if(r<=f){if((v??g)!==l){const y=g-s*(g-l)/d;m===Sr.size&&(i.bubble.radius=y),m===Sr.opacity&&(i.bubble.opacity=y)}}else m===Sr.size&&delete i.bubble.radius,m===Sr.opacity&&delete i.bubble.opacity},this._singleSelectorHover=(i,r,s)=>{const o=this.container,a=document.querySelectorAll(r),l=o.actualOptions.interactivity.modes.bubble;!l||!a.length||a.forEach(c=>{const u=c,d=o.retina.pixelRatio,f={x:(u.offsetLeft+u.offsetWidth*kg)*d,y:(u.offsetTop+u.offsetHeight*kg)*d},h=u.offsetWidth*kg*d,v=s.type===yc.circle?new Ln(f.x,f.y,h):new yr(u.offsetLeft*d,u.offsetTop*d,u.offsetWidth*d,u.offsetHeight*d),g=o.particles.quadTree.query(v,m=>this.isEnabled(m));for(const m of g){if(!v.contains(m.getPosition()))continue;m.bubble.inRange=!0;const p=l.divs,y=QD(p,u);(!m.bubble.div||m.bubble.div!==u)&&(this.clear(m,i,!0),m.bubble.div=u),this._hoverBubbleSize(m,Og,y),this._hoverBubbleOpacity(m,Og,y),this._hoverBubbleColor(m,Og,y)}})},this._engine=n,e.bubble||(e.bubble={}),this.handleClickMode=i=>{i===No&&(e.bubble||(e.bubble={}),e.bubble.clicking=!0)}}clear(e,n,i){e.bubble.inRange&&!i||(delete e.bubble.div,delete e.bubble.opacity,delete e.bubble.radius,delete e.bubble.color)}init(){const e=this.container,n=e.actualOptions.interactivity.modes.bubble;n&&(e.retina.bubbleModeDistance=n.distance*e.retina.pixelRatio,n.size!==void 0&&(e.retina.bubbleModeSize=n.size*e.retina.pixelRatio))}interact(e){const n=this.container.actualOptions,i=n.interactivity.events,r=i.onHover,s=i.onClick,o=r.enable,a=r.mode,l=s.enable,c=s.mode,u=i.onDiv;o&&qt(No,a)?this._hoverBubble():l&&qt(No,c)?this._clickBubble():lw(No,u,(d,f)=>this._singleSelectorHover(e,d,f))}isEnabled(e){const n=this.container,i=n.actualOptions,r=n.interactivity.mouse,s=((e==null?void 0:e.interactivity)??i.interactivity).events,{onClick:o,onDiv:a,onHover:l}=s,c=aw(No,a);return c||l.enable&&r.position||o.enable&&r.clickPosition?qt(No,l.mode)||qt(No,o.mode)||c:!1}loadModeOptions(e,...n){e.bubble||(e.bubble=new r$);for(const i of n)e.bubble.load(i==null?void 0:i.bubble)}reset(e){e.bubble.inRange=!1}}async function u$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalBubble",n=>Promise.resolve(new c$(n,t)),e)}class d${constructor(){this.opacity=.5}load(e){me(e)||e.opacity!==void 0&&(this.opacity=e.opacity)}}class f${constructor(){this.distance=80,this.links=new d$,this.radius=60}load(e){me(e)||(e.distance!==void 0&&(this.distance=e.distance),this.links.load(e.links),e.radius!==void 0&&(this.radius=e.radius))}}const B1=0,V1=1,h$=0;function p$(t,e,n,i){const r=Math.floor(n.getRadius()/e.getRadius()),s=e.getFillColor(),o=n.getFillColor();if(!s||!o)return;const a=e.getPosition(),l=n.getPosition(),c=uw(s,o,e.getRadius(),n.getRadius()),u=t.createLinearGradient(a.x,a.y,l.x,l.y);return u.addColorStop(B1,od(s,i)),u.addColorStop(Gi(r,B1,V1),fs(c,i)),u.addColorStop(V1,od(o,i)),u}function m$(t,e,n,i,r){Au(t,i,r),t.lineWidth=e,t.strokeStyle=n,t.stroke()}function g$(t,e,n,i){const r=t.actualOptions,s=r.interactivity.modes.connect;if(s)return p$(e,n,i,s.links.opacity)}function v$(t,e,n){t.canvas.draw(i=>{const r=g$(t,i,e,n);if(!r)return;const s=e.getPosition(),o=n.getPosition();m$(i,e.retina.linksWidth??h$,r,s,o)})}const y$="connect",H1=0;class x$ extends $r{constructor(e){super(e)}clear(){}init(){const e=this.container,n=e.actualOptions.interactivity.modes.connect;n&&(e.retina.connectModeDistance=n.distance*e.retina.pixelRatio,e.retina.connectModeRadius=n.radius*e.retina.pixelRatio)}interact(){const e=this.container;if(e.actualOptions.interactivity.events.onHover.enable&&e.interactivity.status==="pointermove"){const i=e.interactivity.mouse.position,{connectModeDistance:r,connectModeRadius:s}=e.retina;if(!r||r<H1||!s||s<H1||!i)return;const o=Math.abs(s),a=e.particles.quadTree.queryCircle(i,o,l=>this.isEnabled(l));a.forEach((l,c)=>{const u=l.getPosition(),d=1;for(const f of a.slice(c+d)){const h=f.getPosition(),v=Math.abs(r),g=Math.abs(u.x-h.x),m=Math.abs(u.y-h.y);g<v&&m<v&&v$(e,l,f)}})}}isEnabled(e){const n=this.container,i=n.interactivity.mouse,r=((e==null?void 0:e.interactivity)??n.actualOptions.interactivity).events;return r.onHover.enable&&i.position?qt(y$,r.onHover.mode):!1}loadModeOptions(e,...n){e.connect||(e.connect=new f$);for(const i of n)e.connect.load(i==null?void 0:i.connect)}reset(){}}async function _$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalConnect",n=>Promise.resolve(new x$(n)),e)}class w${constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(e){me(e)||(e.blink!==void 0&&(this.blink=e.blink),e.color!==void 0&&(this.color=On.create(this.color,e.color)),e.consent!==void 0&&(this.consent=e.consent),e.opacity!==void 0&&(this.opacity=e.opacity))}}class b${constructor(){this.distance=100,this.links=new w$}load(e){me(e)||(e.distance!==void 0&&(this.distance=e.distance),this.links.load(e.links))}}const S$=0;function E$(t,e,n,i,r,s){Au(t,n,i),t.strokeStyle=fs(r,s),t.lineWidth=e,t.stroke()}function M$(t,e,n,i,r){t.canvas.draw(s=>{const o=e.getPosition();E$(s,e.retina.linksWidth??S$,o,r,n,i)})}const T$="grab",C$=0,A$=0;class R$ extends $r{constructor(e,n){super(e),this._engine=n}clear(){}init(){const e=this.container,n=e.actualOptions.interactivity.modes.grab;n&&(e.retina.grabModeDistance=n.distance*e.retina.pixelRatio)}interact(){var a;const e=this.container,n=e.actualOptions,i=n.interactivity;if(!i.modes.grab||!i.events.onHover.enable||e.interactivity.status!==Ta)return;const r=e.interactivity.mouse.position;if(!r)return;const s=e.retina.grabModeDistance;if(!s||s<C$)return;const o=e.particles.quadTree.queryCircle(r,s,l=>this.isEnabled(l));for(const l of o){const c=l.getPosition(),u=vi(c,r);if(u>s)continue;const d=i.modes.grab.links,f=d.opacity,h=f-u*f/s;if(h<=A$)continue;const v=d.color??((a=l.options.links)==null?void 0:a.color);if(!e.particles.grabLineColor&&v){const m=i.modes.grab.links;e.particles.grabLineColor=oL(this._engine,v,m.blink,m.consent)}const g=l0(l,void 0,e.particles.grabLineColor);g&&M$(e,l,g,h,r)}}isEnabled(e){const n=this.container,i=n.interactivity.mouse,r=((e==null?void 0:e.interactivity)??n.actualOptions.interactivity).events;return r.onHover.enable&&!!i.position&&qt(T$,r.onHover.mode)}loadModeOptions(e,...n){e.grab||(e.grab=new b$);for(const i of n)e.grab.load(i==null?void 0:i.grab)}reset(){}}async function P$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalGrab",n=>Promise.resolve(new R$(n,t)),e)}const D$="pause";class L$ extends $r{constructor(e){super(e),this.handleClickMode=n=>{if(n!==D$)return;const i=this.container;i.animationStatus?i.pause():i.play()}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}}async function N$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalPause",n=>Promise.resolve(new L$(n)),e)}class I${constructor(){this.default=!0,this.groups=[],this.quantity=4}load(e){if(me(e))return;e.default!==void 0&&(this.default=e.default),e.groups!==void 0&&(this.groups=e.groups.map(i=>i)),this.groups.length||(this.default=!0);const n=e.quantity;n!==void 0&&(this.quantity=ut(n)),this.particles=Si(e.particles,i=>kn({},i))}}const k$="push",O$=0;class F$ extends $r{constructor(e){super(e),this.handleClickMode=n=>{if(n!==k$)return;const i=this.container,r=i.actualOptions,s=r.interactivity.modes.push;if(!s)return;const o=ke(s.quantity);if(o<=O$)return;const a=cm([void 0,...s.groups]),l=a!==void 0?i.actualOptions.particles.groups[a]:void 0,c=Fi(s.particles),u=kn(l,c);i.particles.push(o,i.interactivity.mouse,u,a)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...n){e.push||(e.push=new I$);for(const i of n)e.push.load(i==null?void 0:i.push)}reset(){}}async function U$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalPush",n=>Promise.resolve(new F$(n)),e)}class z${constructor(){this.quantity=2}load(e){if(me(e))return;const n=e.quantity;n!==void 0&&(this.quantity=ut(n))}}const B$="remove";class V$ extends $r{constructor(e){super(e),this.handleClickMode=n=>{const i=this.container,r=i.actualOptions;if(!r.interactivity.modes.remove||n!==B$)return;const s=ke(r.interactivity.modes.remove.quantity);i.particles.removeQuantity(s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...n){e.remove||(e.remove=new z$);for(const i of n)e.remove.load(i==null?void 0:i.remove)}reset(){}}async function H$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalRemove",n=>Promise.resolve(new V$(n)),e)}class _L{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=va.easeOutQuad}load(e){me(e)||(e.distance!==void 0&&(this.distance=e.distance),e.duration!==void 0&&(this.duration=e.duration),e.easing!==void 0&&(this.easing=e.easing),e.factor!==void 0&&(this.factor=e.factor),e.speed!==void 0&&(this.speed=e.speed),e.maxSpeed!==void 0&&(this.maxSpeed=e.maxSpeed))}}class j$ extends _L{constructor(){super(),this.selectors=[]}load(e){super.load(e),!me(e)&&e.selectors!==void 0&&(this.selectors=e.selectors)}}class G$ extends _L{load(e){super.load(e),!me(e)&&(this.divs=Si(e.divs,n=>{const i=new j$;return i.load(n),i}))}}const Io="repulse",W$=0,$$=6,X$=3,q$=2,Y$=0,K$=0,Z$=1,Fg=.5;class Q$ extends $r{constructor(e,n){super(n),this._clickRepulse=()=>{const i=this.container,r=i.actualOptions.interactivity.modes.repulse;if(!r)return;const s=i.repulse??{particles:[]};if(s.finish||(s.count||(s.count=0),s.count++,s.count===i.particles.count&&(s.finish=!0)),s.clicking){const o=i.retina.repulseModeDistance;if(!o||o<W$)return;const a=Math.pow(o/$$,X$),l=i.interactivity.mouse.clickPosition;if(l===void 0)return;const c=new Ln(l.x,l.y,a),u=i.particles.quadTree.query(c,d=>this.isEnabled(d));for(const d of u){const{dx:f,dy:h,distance:v}=Wn(l,d.position),g=v**q$,m=r.speed,p=-a*m/g;if(g<=a){s.particles.push(d);const y=mn.create(f,h);y.length=p,d.velocity.setTo(y)}}}else if(s.clicking===!1){for(const o of s.particles)o.velocity.setTo(o.initialVelocity);s.particles=[]}},this._hoverRepulse=()=>{const i=this.container,r=i.interactivity.mouse.position,s=i.retina.repulseModeDistance;!s||s<Y$||!r||this._processRepulse(r,s,new Ln(r.x,r.y,s))},this._processRepulse=(i,r,s,o)=>{const a=this.container,l=a.particles.quadTree.query(s,m=>this.isEnabled(m)),c=a.actualOptions.interactivity.modes.repulse;if(!c)return;const{easing:u,speed:d,factor:f,maxSpeed:h}=c,v=this._engine.getEasing(u),g=((o==null?void 0:o.speed)??d)*f;for(const m of l){const{dx:p,dy:y,distance:x}=Wn(m.position,i),w=Gi(v(Z$-x/r)*g,K$,h),S=mn.create(x?p/x*w:g,x?y/x*w:g);m.position.addTo(S)}},this._singleSelectorRepulse=(i,r)=>{const s=this.container,o=s.actualOptions.interactivity.modes.repulse;if(!o)return;const a=document.querySelectorAll(i);a.length&&a.forEach(l=>{const c=l,u=s.retina.pixelRatio,d={x:(c.offsetLeft+c.offsetWidth*Fg)*u,y:(c.offsetTop+c.offsetHeight*Fg)*u},f=c.offsetWidth*Fg*u,h=r.type===yc.circle?new Ln(d.x,d.y,f):new yr(c.offsetLeft*u,c.offsetTop*u,c.offsetWidth*u,c.offsetHeight*u),v=o.divs,g=QD(v,c);this._processRepulse(d,f,h,g)})},this._engine=e,n.repulse||(n.repulse={particles:[]}),this.handleClickMode=i=>{const r=this.container.actualOptions,s=r.interactivity.modes.repulse;if(!s||i!==Io)return;n.repulse||(n.repulse={particles:[]});const o=n.repulse;o.clicking=!0,o.count=0;for(const a of n.repulse.particles)this.isEnabled(a)&&a.velocity.setTo(a.initialVelocity);o.particles=[],o.finish=!1,setTimeout(()=>{n.destroyed||(o.clicking=!1)},s.duration*Pn)}}clear(){}init(){const e=this.container,n=e.actualOptions.interactivity.modes.repulse;n&&(e.retina.repulseModeDistance=n.distance*e.retina.pixelRatio)}interact(){const e=this.container,n=e.actualOptions,i=e.interactivity.status===Ta,r=n.interactivity.events,s=r.onHover,o=s.enable,a=s.mode,l=r.onClick,c=l.enable,u=l.mode,d=r.onDiv;i&&o&&qt(Io,a)?this._hoverRepulse():c&&qt(Io,u)?this._clickRepulse():lw(Io,d,(f,h)=>this._singleSelectorRepulse(f,h))}isEnabled(e){const n=this.container,i=n.actualOptions,r=n.interactivity.mouse,s=((e==null?void 0:e.interactivity)??i.interactivity).events,o=s.onDiv,a=s.onHover,l=s.onClick,c=aw(Io,o);if(!(c||a.enable&&r.position||l.enable&&r.clickPosition))return!1;const u=a.mode,d=l.mode;return qt(Io,u)||qt(Io,d)||c}loadModeOptions(e,...n){e.repulse||(e.repulse=new G$);for(const i of n)e.repulse.load(i==null?void 0:i.repulse)}reset(){}}async function J$(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalRepulse",n=>Promise.resolve(new Q$(t,n)),e)}class e7{constructor(){this.factor=3,this.radius=200}load(e){me(e)||(e.factor!==void 0&&(this.factor=e.factor),e.radius!==void 0&&(this.radius=e.radius))}}const t7="slow",n7=0;class i7 extends $r{constructor(e){super(e)}clear(e,n,i){e.slow.inRange&&!i||(e.slow.factor=1)}init(){const e=this.container,n=e.actualOptions.interactivity.modes.slow;n&&(e.retina.slowModeRadius=n.radius*e.retina.pixelRatio)}interact(){}isEnabled(e){const n=this.container,i=n.interactivity.mouse,r=((e==null?void 0:e.interactivity)??n.actualOptions.interactivity).events;return r.onHover.enable&&!!i.position&&qt(t7,r.onHover.mode)}loadModeOptions(e,...n){e.slow||(e.slow=new e7);for(const i of n)e.slow.load(i==null?void 0:i.slow)}reset(e){e.slow.inRange=!1;const n=this.container,i=n.actualOptions,r=n.interactivity.mouse.position,s=n.retina.slowModeRadius,o=i.interactivity.modes.slow;if(!o||!s||s<n7||!r)return;const a=e.getPosition(),l=vi(r,a),c=l/s,u=o.factor,{slow:d}=e;l>s||(d.inRange=!0,d.factor=c/u)}}async function r7(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalSlow",n=>Promise.resolve(new i7(n)),e)}const s7=0,o7=1,a7=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;function l7(t,e,n){const{svgData:i}=t;if(!i)return"";const r=od(e,n);if(i.includes("fill"))return i.replace(a7,()=>r);const s=i.indexOf(">");return`${i.substring(s7,s)} fill="${r}"${i.substring(s)}`}async function um(t){return new Promise(e=>{t.loading=!0;const n=new Image;t.element=n,n.addEventListener("load",()=>{t.loading=!1,e()}),n.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Aa().error(`${ji} loading image: ${t.source}`),e()}),n.src=t.source})}async function c7(t){if(t.type!=="svg"){await um(t);return}t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Aa().error(`${ji} Image not found`),t.error=!0),t.loading=!1}function u7(t,e,n,i){var o;const r=l7(t,n,((o=i.opacity)==null?void 0:o.value)??o7),s={color:n,gif:e.gif,data:{...t,svgData:r},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(a=>{const l=new Blob([r],{type:"image/svg+xml"}),c=URL||window.URL||window.webkitURL||window,u=c.createObjectURL(l),d=new Image;d.addEventListener("load",()=>{s.loaded=!0,s.element=d,a(s),c.revokeObjectURL(u)});const f=async()=>{c.revokeObjectURL(u);const h={...t,error:!1,loading:!0};await um(h),s.loaded=!0,s.element=h.element,a(s)};d.addEventListener("error",()=>void f()),d.src=u})}const Ug=[0,4,2,1],j1=[8,8,4,2];class d7{constructor(e){this.pos=0,this.data=new Uint8ClampedArray(e)}getString(e){const n=this.data.slice(this.pos,this.pos+e);return this.pos+=n.length,n.reduce((i,r)=>i+String.fromCharCode(r),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let e="",n=0;const i=0,r=0;do{n=this.data[this.pos++];for(let s=n;--s>=i;e+=String.fromCharCode(this.data[this.pos++]));}while(n!==r);return e}readSubBlocksBin(){let e=this.data[this.pos],n=0;const i=0,r=1;for(let o=0;e!==i;o+=e+r,e=this.data[this.pos+o])n+=e;const s=new Uint8Array(n);e=this.data[this.pos++];for(let o=0;e!==i;e=this.data[this.pos++])for(let a=e;--a>=i;s[o++]=this.data[this.pos++]);return s}skipSubBlocks(){for(const e=1,n=0;this.data[this.pos]!==n;this.pos+=this.data[this.pos]+e);this.pos++}}var er;(function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"})(er||(er={}));var ls;(function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"})(ls||(ls={}));const Yn={x:0,y:0},f7=0,G1=.5,h7=0,W1=0,u0=0;function wL(t,e){const n=[];for(let i=0;i<e;i++)n.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return n}function p7(t,e,n,i){switch(t.nextByte()){case ls.GraphicsControlExtension:{const r=e.frames[n(!1)];t.pos++;const s=t.nextByte();r.GCreserved=(s&224)>>>5,r.disposalMethod=(s&28)>>>2,r.userInputDelayFlag=(s&2)===2;const o=(s&1)===1;r.delayTime=t.nextTwoBytes()*10;const a=t.nextByte();o&&i(a),t.pos++;break}case ls.ApplicationExtension:{t.pos++;const r={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(r);break}case ls.CommentExtension:{e.comments.push([n(!1),t.readSubBlocks()]);break}case ls.PlainTextExtension:{if(e.globalColorTable.length===0)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[n(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break}default:t.skipSubBlocks();break}}async function m7(t,e,n,i,r,s){const o=e.frames[i(!0)];o.left=t.nextTwoBytes(),o.top=t.nextTwoBytes(),o.width=t.nextTwoBytes(),o.height=t.nextTwoBytes();const a=t.nextByte(),l=(a&128)===128,c=(a&64)===64;o.sortFlag=(a&32)===32,o.reserved=(a&24)>>>3;const u=1<<(a&7)+1;l&&(o.localColorTable=wL(t,u));const d=p=>{const{r:y,g:x,b:w}=(l?o.localColorTable:e.globalColorTable)[p];return p!==r(null)?{r:y,g:x,b:w,a:255}:{r:y,g:x,b:w,a:n?~~((y+x+w)/3):0}},f=(()=>{try{return new ImageData(o.width,o.height,{colorSpace:"srgb"})}catch(p){if(p instanceof DOMException&&p.name==="IndexSizeError")return null;throw p}})();if(f==null)throw new EvalError("GIF frame size is to large");const h=t.nextByte(),v=t.readSubBlocksBin(),g=1<<h,m=(p,y)=>{const x=p>>>3,w=p&7;return(v[x]+(v[x+1]<<8)+(v[x+2]<<16)&(1<<y)-1<<w)>>>w};if(c){for(let p=0,y=h+1,x=0,w=[[0]],S=0;S<4;S++)if(Ug[S]<o.height){let T=0,C=0,P=!1;for(;!P;){const E=p;if(p=m(x,y),x+=y+1,p===g){y=h+1,w.length=g+2;for(let M=0;M<w.length;M++)w[M]=M<g?[M]:[]}else{p>=w.length?w.push(w[E].concat(w[E][0])):E!==g&&w.push(w[E].concat(w[p][0]));for(const M of w[p]){const{r:N,g:k,b:z,a:F}=d(M);f.data.set([N,k,z,F],Ug[S]*o.width+j1[S]*C+T%(o.width*4)),T+=4}w.length===1<<y&&y<12&&y++}T===o.width*4*(C+1)&&(C++,Ug[S]+j1[S]*C>=o.height&&(P=!0))}}o.image=f,o.bitmap=await createImageBitmap(f)}else{let p=0,y=h+1,x=0,w=-4,S=!1;const T=[[0]];for(;!S;){const C=p;if(p=m(x,y),x+=y,p===g){y=h+1,T.length=g+2;for(let P=0;P<T.length;P++)T[P]=P<g?[P]:[]}else{if(p===g+1){S=!0;break}p>=T.length?T.push(T[C].concat(T[C][0])):C!==g&&T.push(T[C].concat(T[p][0]));for(const P of T[p]){const{r:E,g:M,b:N,a:k}=d(P);f.data.set([E,M,N,k],w+=4)}T.length>=1<<y&&y<12&&y++}}o.image=f,o.bitmap=await createImageBitmap(f)}}async function g7(t,e,n,i,r,s){switch(t.nextByte()){case ls.EndOfFile:return!0;case ls.Image:await m7(t,e,n,i,r);break;case ls.Extension:p7(t,e,i,r);break;default:throw new EvalError("undefined block found")}return!1}function v7(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return NaN}async function y7(t,e,n){n||(n=!1);const i=await fetch(t);if(!i.ok&&i.status===404)throw new EvalError("file not found");const r=await i.arrayBuffer(),s={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},o=new d7(new Uint8ClampedArray(r));if(o.getString(6)!=="GIF89a")throw new Error("not a supported GIF file");s.width=o.nextTwoBytes(),s.height=o.nextTwoBytes();const a=o.nextByte(),l=(a&128)===128;s.colorRes=(a&112)>>>4,s.sortFlag=(a&8)===8;const c=1<<(a&7)+1,u=o.nextByte();s.pixelAspectRatio=o.nextByte(),s.pixelAspectRatio!==0&&(s.pixelAspectRatio=(s.pixelAspectRatio+15)/64),l&&(s.globalColorTable=wL(o,c));const d=(()=>{try{return new ImageData(s.width,s.height,{colorSpace:"srgb"})}catch(w){if(w instanceof DOMException&&w.name==="IndexSizeError")return null;throw w}})();if(d==null)throw new Error("GIF frame size is to large");const{r:f,g:h,b:v}=s.globalColorTable[u];d.data.set(l?[f,h,v,255]:[0,0,0,0]);for(let w=4;w<d.data.length;w*=2)d.data.copyWithin(w,0,w);s.backgroundImage=d;let g=-1,m=!0,p=-1;const y=w=>(w&&(m=!0),g),x=w=>(w!=null&&(p=w),p);try{do m&&(s.frames.push({left:0,top:0,width:0,height:0,disposalMethod:er.Replace,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),g++,p=-1,m=!1);while(!await g7(o,s,n,y,x,e));s.frames.length--;for(const w of s.frames){if(w.userInputDelayFlag&&w.delayTime===0){s.totalTime=1/0;break}s.totalTime+=w.delayTime}return s}catch(w){throw w instanceof EvalError?new Error(`error while parsing frame ${g} "${w.message}"`):w}}function x7(t){const{context:e,radius:n,particle:i,delta:r}=t,s=i.image;if(!(s!=null&&s.gifData)||!s.gif)return;const o=new OffscreenCanvas(s.gifData.width,s.gifData.height),a=o.getContext("2d");if(!a)throw new Error("could not create offscreen canvas context");a.imageSmoothingQuality="low",a.imageSmoothingEnabled=!1,a.clearRect(Yn.x,Yn.y,o.width,o.height),i.gifLoopCount===void 0&&(i.gifLoopCount=s.gifLoopCount??u0);let l=i.gifFrame??f7;const c={x:-s.gifData.width*G1,y:-s.gifData.height*G1},u=s.gifData.frames[l];if(i.gifTime===void 0&&(i.gifTime=h7),!!u.bitmap){switch(e.scale(n/s.gifData.width,n/s.gifData.height),u.disposalMethod){case er.UndefinedA:case er.UndefinedB:case er.UndefinedC:case er.UndefinedD:case er.Replace:a.drawImage(u.bitmap,u.left,u.top),e.drawImage(o,c.x,c.y),a.clearRect(Yn.x,Yn.y,o.width,o.height);break;case er.Combine:a.drawImage(u.bitmap,u.left,u.top),e.drawImage(o,c.x,c.y);break;case er.RestoreBackground:a.drawImage(u.bitmap,u.left,u.top),e.drawImage(o,c.x,c.y),a.clearRect(Yn.x,Yn.y,o.width,o.height),s.gifData.globalColorTable.length?a.putImageData(s.gifData.backgroundImage,c.x,c.y):a.putImageData(s.gifData.frames[W1].image,c.x+u.left,c.y+u.top);break;case er.RestorePrevious:{const d=a.getImageData(Yn.x,Yn.y,o.width,o.height);a.drawImage(u.bitmap,u.left,u.top),e.drawImage(o,c.x,c.y),a.clearRect(Yn.x,Yn.y,o.width,o.height),a.putImageData(d,Yn.x,Yn.y)}break}if(i.gifTime+=r.value,i.gifTime>u.delayTime){if(i.gifTime-=u.delayTime,++l>=s.gifData.frames.length){if(--i.gifLoopCount<=u0)return;l=W1,a.clearRect(Yn.x,Yn.y,o.width,o.height)}i.gifFrame=l}e.scale(s.gifData.width/n,s.gifData.height/n)}}async function _7(t){if(t.type!=="gif"){await um(t);return}t.loading=!0;try{t.gifData=await y7(t.source),t.gifLoopCount=v7(t.gifData)??u0,t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}const w7=2,b7=1,S7=12,E7=1;class M7{constructor(e){this.validTypes=["image","images"],this.loadImageShape=async n=>{if(!this._engine.loadImage)throw new Error(`${ji} image shape not initialized`);await this._engine.loadImage({gif:n.gif,name:n.name,replaceColor:n.replaceColor??!1,src:n.src})},this._engine=e}addImage(e){this._engine.images||(this._engine.images=[]),this._engine.images.push(e)}draw(e){const{context:n,radius:i,particle:r,opacity:s}=e,o=r.image,a=o==null?void 0:o.element;if(o){if(n.globalAlpha=s,o.gif&&o.gifData)x7(e);else if(a){const l=o.ratio,c={x:-i,y:-i},u=i*w7;n.drawImage(a,c.x,c.y,u,u/l)}n.globalAlpha=b7}}getSidesCount(){return S7}async init(e){const n=e.actualOptions;if(!(!n.preload||!this._engine.loadImage))for(const i of n.preload)await this._engine.loadImage(i)}loadShape(e){if(e.shape!=="image"&&e.shape!=="images")return;this._engine.images||(this._engine.images=[]);const n=e.shapeData;if(!n)return;this._engine.images.find(r=>r.name===n.name||r.source===n.src)||this.loadImageShape(n).then(()=>{this.loadShape(e)})}particleInit(e,n){if(n.shape!=="image"&&n.shape!=="images")return;this._engine.images||(this._engine.images=[]);const i=this._engine.images,r=n.shapeData;if(!r)return;const s=n.getFillColor(),o=i.find(l=>l.name===r.name||l.source===r.src);if(!o)return;const a=r.replaceColor??o.replaceColor;if(o.loading){setTimeout(()=>{this.particleInit(e,n)});return}(async()=>{let l;o.svgData&&s?l=await u7(o,r,s,n):l={color:s,data:o,element:o.element,gif:o.gif,gifData:o.gifData,gifLoopCount:o.gifLoopCount,loaded:!0,ratio:r.width&&r.height?r.width/r.height:o.ratio??E7,replaceColor:a,source:r.src},l.ratio||(l.ratio=1);const c=r.fill??n.shapeFill,u=r.close??n.shapeClose,d={image:l,fill:c,close:u};n.image=d.image,n.shapeFill=d.fill,n.shapeClose=d.close})()}}class T7{constructor(){this.src="",this.gif=!1}load(e){me(e)||(e.gif!==void 0&&(this.gif=e.gif),e.height!==void 0&&(this.height=e.height),e.name!==void 0&&(this.name=e.name),e.replaceColor!==void 0&&(this.replaceColor=e.replaceColor),e.src!==void 0&&(this.src=e.src),e.width!==void 0&&(this.width=e.width))}}class C7{constructor(e){this.id="imagePreloader",this._engine=e}async getPlugin(){return await Promise.resolve(),{}}loadOptions(e,n){if(!(n!=null&&n.preload))return;e.preload||(e.preload=[]);const i=e.preload;for(const r of n.preload){const s=i.find(o=>o.name===r.name||o.src===r.src);if(s)s.load(r);else{const o=new T7;o.load(r),i.push(o)}}}needsPlugin(){return!0}}const A7=3;function R7(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${ji} no image source provided`);if(t.images||(t.images=[]),!t.images.find(n=>n.name===e.name||n.source===e.src))try{const n={gif:e.gif??!1,name:e.name??e.src,source:e.src,type:e.src.substring(e.src.length-A7),error:!1,loading:!0,replaceColor:e.replaceColor,ratio:e.width&&e.height?e.width/e.height:void 0};t.images.push(n);let i;e.gif?i=_7:i=e.replaceColor?c7:um,await i(n)}catch{throw new Error(`${ji} ${e.name??e.src} not found`)}})}async function P7(t,e=!0){t.checkVersion("3.9.1"),R7(t);const n=new C7(t);await t.addPlugin(n,e),await t.addShape(new M7(t),e)}class D7 extends Oa{constructor(){super(),this.sync=!1}load(e){me(e)||(super.load(e),e.sync!==void 0&&(this.sync=e.sync))}}class L7 extends Oa{constructor(){super(),this.sync=!1}load(e){me(e)||(super.load(e),e.sync!==void 0&&(this.sync=e.sync))}}class N7{constructor(){this.count=0,this.delay=new D7,this.duration=new L7}load(e){me(e)||(e.count!==void 0&&(this.count=e.count),this.delay.load(e.delay),this.duration.load(e.duration))}}const Ga=0,I7=-1,$1=0,X1=0;function k7(t,e,n){if(!t.life)return;const i=t.life;let r=!1;if(t.spawning)if(i.delayTime+=e.value,i.delayTime>=t.life.delay)r=!0,t.spawning=!1,i.delayTime=Ga,i.time=Ga;else return;if(i.duration===I7||t.spawning||(r?i.time=Ga:i.time+=e.value,i.time<i.duration))return;if(i.time=Ga,t.life.count>$1&&t.life.count--,t.life.count===$1){t.destroy();return}const s=ut(X1,n.width),o=ut(X1,n.width);t.position.x=pi(s),t.position.y=pi(o),t.spawning=!0,i.delayTime=Ga,i.time=Ga,t.reset();const a=t.options.life;a&&(i.delay=ke(a.delay.value)*Pn,i.duration=ke(a.duration.value)*Pn)}const ko=0,q1=1,Y1=-1;class O7{constructor(e){this.container=e}init(e){const n=this.container,i=e.options,r=i.life;r&&(e.life={delay:n.retina.reduceFactor?ke(r.delay.value)*(r.delay.sync?q1:_t())/n.retina.reduceFactor*Pn:ko,delayTime:ko,duration:n.retina.reduceFactor?ke(r.duration.value)*(r.duration.sync?q1:_t())/n.retina.reduceFactor*Pn:ko,time:ko,count:r.count},e.life.duration<=ko&&(e.life.duration=Y1),e.life.count<=ko&&(e.life.count=Y1),e.life&&(e.spawning=e.life.delay>ko))}isEnabled(e){return!e.destroyed}loadOptions(e,...n){e.life||(e.life=new N7);for(const i of n)e.life.load(i==null?void 0:i.life)}update(e,n){!this.isEnabled(e)||!e.life||k7(e,n,this.container.canvas.size)}}async function F7(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("life",async n=>Promise.resolve(new O7(n)),e)}function U7(t){const{context:e,particle:n,radius:i}=t,r=n.shapeData,s=0;e.moveTo(-i,s),e.lineTo(i,s),e.lineCap=(r==null?void 0:r.cap)??"butt"}const z7=1;class B7{constructor(){this.validTypes=["line"]}draw(e){U7(e)}getSidesCount(){return z7}}async function V7(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new B7,e)}const K1=.5;class H7{init(){}isEnabled(e){return!Ra()&&!e.destroyed&&e.container.actualOptions.interactivity.events.onHover.parallax.enable}move(e){const n=e.container,i=n.actualOptions,r=i.interactivity.events.onHover.parallax;if(Ra()||!r.enable)return;const s=r.force,o=n.interactivity.mouse.position;if(!o)return;const a=n.canvas.size,l={x:a.width*K1,y:a.height*K1},c=r.smooth,u=e.getRadius()/s,d={x:(o.x-l.x)*u,y:(o.y-l.y)*u},{offset:f}=e;f.x+=(d.x-f.x)/c,f.y+=(d.y-f.y)/c}}async function j7(t,e=!0){t.checkVersion("3.9.1"),await t.addMover("parallax",()=>Promise.resolve(new H7),e)}const Z1=1e3,G7=1;class W7 extends hw{constructor(e){super(e)}clear(){}init(){}interact(e){const n=this.container;e.attractDistance===void 0&&(e.attractDistance=ke(e.options.move.attract.distance)*n.retina.pixelRatio);const i=e.attractDistance,r=e.getPosition(),s=n.particles.quadTree.queryCircle(r,i);for(const o of s){if(e===o||!o.options.move.attract.enable||o.destroyed||o.spawning)continue;const a=o.getPosition(),{dx:l,dy:c}=Wn(r,a),u=e.options.move.attract.rotate,d=l/(u.x*Z1),f=c/(u.y*Z1),h=o.size.value/e.size.value,v=G7/h;e.velocity.x-=d*h,e.velocity.y-=f*h,o.velocity.x+=d*v,o.velocity.y+=f*v}}isEnabled(e){return e.options.move.attract.enable}reset(){}}async function $7(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("particlesAttract",n=>Promise.resolve(new W7(n)),e)}const X7=.5,q7=10,Y7=0;function Q1(t,e,n,i,r,s){const o=Gi(t.options.collisions.absorb.speed*r.factor/q7,Y7,i);t.size.value+=o*X7,n.size.value-=o,i<=s&&(n.size.value=0,n.destroy())}function K7(t,e,n,i){const r=t.getRadius(),s=e.getRadius();r===void 0&&s!==void 0?t.destroy():r!==void 0&&s===void 0?e.destroy():r!==void 0&&s!==void 0&&(r>=s?Q1(t,r,e,s,n,i):Q1(e,s,t,r,n,i))}const J1=t=>{t.collisionMaxSpeed===void 0&&(t.collisionMaxSpeed=ke(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function bL(t,e){JD(o0(t),o0(e)),J1(t),J1(e)}function Z7(t,e){!t.unbreakable&&!e.unbreakable&&bL(t,e),t.getRadius()===void 0&&e.getRadius()!==void 0?t.destroy():t.getRadius()!==void 0&&e.getRadius()===void 0?e.destroy():t.getRadius()!==void 0&&e.getRadius()!==void 0&&(t.getRadius()>=e.getRadius()?e:t).destroy()}function Q7(t,e,n,i){switch(t.options.collisions.mode){case Hl.absorb:{K7(t,e,n,i);break}case Hl.bounce:{bL(t,e);break}case Hl.destroy:{Z7(t,e);break}}}const J7=2;class eX extends hw{constructor(e){super(e)}clear(){}init(){}interact(e,n){if(e.destroyed||e.spawning)return;const i=this.container,r=e.getPosition(),s=e.getRadius(),o=i.particles.quadTree.queryCircle(r,s*J7);for(const a of o){if(e===a||!a.options.collisions.enable||e.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;const l=a.getPosition(),c=a.getRadius();if(Math.abs(Math.round(r.z)-Math.round(l.z))>s+c)continue;const u=vi(r,l),d=s+c;u>d||Q7(e,a,n,i.retina.pixelRatio)}}isEnabled(e){return e.options.collisions.enable}reset(){}}async function tX(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("particlesCollisions",n=>Promise.resolve(new eX(n)),e)}const zg=2;class nX extends Ln{constructor(e,n,i,r){super(e,n,i),this.canvasSize=r,this.canvasSize={...r}}contains(e){const{width:n,height:i}=this.canvasSize,{x:r,y:s}=e;return super.contains(e)||super.contains({x:r-n,y:s})||super.contains({x:r-n,y:s-i})||super.contains({x:r,y:s-i})}intersects(e){if(super.intersects(e))return!0;const n=e,i=e,r={x:e.position.x-this.canvasSize.width,y:e.position.y-this.canvasSize.height};if(i.radius!==void 0){const s=new Ln(r.x,r.y,i.radius*zg);return super.intersects(s)}else if(n.size!==void 0){const s=new yr(r.x,r.y,n.size.width*zg,n.size.height*zg);return super.intersects(s)}return!1}}class iX{constructor(){this.blur=5,this.color=new On,this.color.value="#000",this.enable=!1}load(e){me(e)||(e.blur!==void 0&&(this.blur=e.blur),this.color=On.create(this.color,e.color),e.enable!==void 0&&(this.enable=e.enable))}}class rX{constructor(){this.enable=!1,this.frequency=1}load(e){me(e)||(e.color!==void 0&&(this.color=On.create(this.color,e.color)),e.enable!==void 0&&(this.enable=e.enable),e.frequency!==void 0&&(this.frequency=e.frequency),e.opacity!==void 0&&(this.opacity=e.opacity))}}class sX{constructor(){this.blink=!1,this.color=new On,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new iX,this.triangles=new rX,this.width=1,this.warp=!1}load(e){me(e)||(e.id!==void 0&&(this.id=e.id),e.blink!==void 0&&(this.blink=e.blink),this.color=On.create(this.color,e.color),e.consent!==void 0&&(this.consent=e.consent),e.distance!==void 0&&(this.distance=e.distance),e.enable!==void 0&&(this.enable=e.enable),e.frequency!==void 0&&(this.frequency=e.frequency),e.opacity!==void 0&&(this.opacity=e.opacity),this.shadow.load(e.shadow),this.triangles.load(e.triangles),e.width!==void 0&&(this.width=e.width),e.warp!==void 0&&(this.warp=e.warp))}}const eM=2,oX=1,Mf={x:0,y:0},aX=0;function lX(t,e,n,i,r){const{dx:s,dy:o,distance:a}=Wn(t,e);if(!r||a<=n)return a;const l={x:Math.abs(s),y:Math.abs(o)},c={x:Math.min(l.x,i.width-l.x),y:Math.min(l.y,i.height-l.y)};return Math.sqrt(c.x**eM+c.y**eM)}class cX extends hw{constructor(e,n){super(e),this._setColor=i=>{if(!i.options.links)return;const r=this._linkContainer,s=i.options.links;let o=s.id===void 0?r.particles.linksColor:r.particles.linksColors.get(s.id);if(o)return;const a=s.color;o=oL(this._engine,a,s.blink,s.consent),s.id===void 0?r.particles.linksColor=o:r.particles.linksColors.set(s.id,o)},this._linkContainer=e,this._engine=n}clear(){}init(){this._linkContainer.particles.linksColor=void 0,this._linkContainer.particles.linksColors=new Map}interact(e){if(!e.options.links)return;e.links=[];const n=e.getPosition(),i=this.container,r=i.canvas.size;if(n.x<Mf.x||n.y<Mf.y||n.x>r.width||n.y>r.height)return;const s=e.options.links,o=s.opacity,a=e.retina.linksDistance??aX,l=s.warp;let c;l?c=new nX(n.x,n.y,a,r):c=new Ln(n.x,n.y,a);const u=i.particles.quadTree.query(c);for(const d of u){const f=d.options.links;if(e===d||!(f!=null&&f.enable)||s.id!==f.id||d.spawning||d.destroyed||!d.links||e.links.some(m=>m.destination===d)||d.links.some(m=>m.destination===e))continue;const h=d.getPosition();if(h.x<Mf.x||h.y<Mf.y||h.x>r.width||h.y>r.height)continue;const v=lX(n,h,a,r,l&&f.warp);if(v>a)continue;const g=(oX-v/a)*o;this._setColor(e),e.links.push({destination:d,opacity:g})}}isEnabled(e){var n;return!!((n=e.options.links)!=null&&n.enable)}loadParticlesOptions(e,...n){e.links||(e.links=new sX);for(const i of n)e.links.load(i==null?void 0:i.links)}reset(){}}async function uX(t,e=!0){await t.addInteractor("particlesLinks",async n=>Promise.resolve(new cX(n,t)),e)}function dX(t,e,n,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(n.x,n.y),t.lineTo(i.x,i.y),t.closePath()}function fX(t){let e=!1;const{begin:n,end:i,engine:r,maxDistance:s,context:o,canvasSize:a,width:l,backgroundMask:c,colorLine:u,opacity:d,links:f}=t;if(vi(n,i)<=s)Au(o,n,i),e=!0;else if(f.warp){let v,g;const m={x:i.x-a.width,y:i.y},p=Wn(n,m);if(p.distance<=s){const y=n.y-p.dy/p.dx*n.x;v={x:0,y},g={x:a.width,y}}else{const y={x:i.x,y:i.y-a.height},x=Wn(n,y);if(x.distance<=s){const S=-(n.y-x.dy/x.dx*n.x)/(x.dy/x.dx);v={x:S,y:0},g={x:S,y:a.height}}else{const w={x:i.x-a.width,y:i.y-a.height},S=Wn(n,w);if(S.distance<=s){const T=n.y-S.dy/S.dx*n.x;v={x:-T/(S.dy/S.dx),y:T},g={x:v.x+a.width,y:v.y+a.height}}}}v&&g&&(Au(o,n,v),Au(o,i,g),e=!0)}if(!e)return;o.lineWidth=l,c.enable&&(o.globalCompositeOperation=c.composite),o.strokeStyle=fs(u,d);const{shadow:h}=f;if(h.enable){const v=fr(r,h.color);v&&(o.shadowBlur=h.blur,o.shadowColor=fs(v))}o.stroke()}function hX(t){const{context:e,pos1:n,pos2:i,pos3:r,backgroundMask:s,colorTriangle:o,opacityTriangle:a}=t;dX(e,n,i,r),s.enable&&(e.globalCompositeOperation=s.composite),e.fillStyle=fs(o,a),e.fill()}function pX(t){return t.sort((e,n)=>e-n),t.join("_")}function tM(t,e){const n=pX(t.map(r=>r.id));let i=e.get(n);return i===void 0&&(i=_t(),e.set(n,i)),i}const nM=0,Bg=0,iM=0,mX=.5,gX=1;class vX{constructor(e,n){this._drawLinkLine=(i,r)=>{const s=i.options.links;if(!(s!=null&&s.enable))return;const o=this._container,a=o.actualOptions,l=r.destination,c=i.getPosition(),u=l.getPosition();let d=r.opacity;o.canvas.draw(f=>{var y;let h;const v=(y=i.options.twinkle)==null?void 0:y.lines;if(v!=null&&v.enable){const x=v.frequency,w=fr(this._engine,v.color);_t()<x&&w&&(h=w,d=ke(v.opacity))}if(!h){const x=s.id!==void 0?o.particles.linksColors.get(s.id):o.particles.linksColor;h=l0(i,l,x)}if(!h)return;const g=i.retina.linksWidth??Bg,m=i.retina.linksDistance??iM,{backgroundMask:p}=a;fX({context:f,width:g,begin:c,end:u,engine:this._engine,maxDistance:m,canvasSize:o.canvas.size,links:s,backgroundMask:p,colorLine:h,opacity:d})})},this._drawLinkTriangle=(i,r,s)=>{const o=i.options.links;if(!(o!=null&&o.enable))return;const a=o.triangles;if(!a.enable)return;const l=this._container,c=l.actualOptions,u=r.destination,d=s.destination,f=a.opacity??(r.opacity+s.opacity)*mX;f<=nM||l.canvas.draw(h=>{const v=i.getPosition(),g=u.getPosition(),m=d.getPosition(),p=i.retina.linksDistance??iM;if(vi(v,g)>p||vi(m,g)>p||vi(m,v)>p)return;let y=fr(this._engine,a.color);if(!y){const x=o.id!==void 0?l.particles.linksColors.get(o.id):l.particles.linksColor;y=l0(i,u,x)}y&&hX({context:h,pos1:v,pos2:g,pos3:m,backgroundMask:c.backgroundMask,colorTriangle:y,opacityTriangle:f})})},this._drawTriangles=(i,r,s,o)=>{var c,u,d;const a=s.destination;if(!((c=i.links)!=null&&c.triangles.enable&&((u=a.options.links)!=null&&u.triangles.enable)))return;const l=(d=a.links)==null?void 0:d.filter(f=>{const h=this._getLinkFrequency(a,f.destination);return a.options.links&&h<=a.options.links.frequency&&o.findIndex(g=>g.destination===f.destination)>=0});if(l!=null&&l.length)for(const f of l){const h=f.destination;this._getTriangleFrequency(r,a,h)>i.links.triangles.frequency||this._drawLinkTriangle(r,s,f)}},this._getLinkFrequency=(i,r)=>tM([i,r],this._freqs.links),this._getTriangleFrequency=(i,r,s)=>tM([i,r,s],this._freqs.triangles),this._container=e,this._engine=n,this._freqs={links:new Map,triangles:new Map}}drawParticle(e,n){const{links:i,options:r}=n;if(!(i!=null&&i.length))return;const s=i.filter(o=>r.links&&(r.links.frequency>=gX||this._getLinkFrequency(n,o.destination)<=r.links.frequency));for(const o of s)this._drawTriangles(r,n,o,s),o.opacity>nM&&(n.retina.linksWidth??Bg)>Bg&&this._drawLinkLine(n,o)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map,await Promise.resolve()}particleCreated(e){if(e.links=[],!e.options.links)return;const n=this._container.retina.pixelRatio,{retina:i}=e,{distance:r,width:s}=e.options.links;i.linksDistance=r*n,i.linksWidth=s*n}particleDestroyed(e){e.links=[]}}class yX{constructor(e){this.id="links",this._engine=e}getPlugin(e){return Promise.resolve(new vX(e,this._engine))}loadOptions(){}needsPlugin(){return!0}}async function xX(t,e=!0){const n=new yX(t);await t.addPlugin(n,e)}async function _X(t,e=!0){t.checkVersion("3.9.1"),await uX(t,e),await xX(t,e)}const wX=180,Tf={x:0,y:0},bX=2;function SX(t,e,n){const{context:i}=t,r=n.count.numerator*n.count.denominator,s=n.count.numerator/n.count.denominator,o=wX*(s-bX)/s,a=Math.PI-fo(o);if(i){i.beginPath(),i.translate(e.x,e.y),i.moveTo(Tf.x,Tf.y);for(let l=0;l<r;l++)i.lineTo(n.length,Tf.y),i.translate(n.length,Tf.y),i.rotate(a)}}const EX=5;class SL{draw(e){const{particle:n,radius:i}=e,r=this.getCenter(n,i),s=this.getSidesData(n,i);SX(e,r,s)}getSidesCount(e){const n=e.shapeData;return Math.round(ke((n==null?void 0:n.sides)??EX))}}const rM=3.5,sM=2.66,MX=3;class TX extends SL{constructor(){super(...arguments),this.validTypes=["polygon"]}getCenter(e,n){return{x:-n/(e.sides/rM),y:-n/(sM/rM)}}getSidesData(e,n){const i=e.sides;return{count:{denominator:1,numerator:i},length:n*sM/(i/MX)}}}const CX=1.66,AX=3,RX=2;class PX extends SL{constructor(){super(...arguments),this.validTypes=["triangle"]}getCenter(e,n){return{x:-n,y:n/CX}}getSidesCount(){return AX}getSidesData(e,n){const i=n*RX;return{count:{denominator:2,numerator:3},length:i}}}async function DX(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new TX,e)}async function LX(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new PX,e)}async function NX(t,e=!0){t.checkVersion("3.9.1"),await DX(t,e),await LX(t,e)}class IX{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(e){me(e)||(e.enable!==void 0&&(this.enable=e.enable),e.speed!==void 0&&(this.speed=ut(e.speed)),e.decay!==void 0&&(this.decay=ut(e.decay)),e.sync!==void 0&&(this.sync=e.sync))}}class kX extends Oa{constructor(){super(),this.animation=new IX,this.direction=or.clockwise,this.path=!1,this.value=0}load(e){me(e)||(super.load(e),e.direction!==void 0&&(this.direction=e.direction),this.animation.load(e.animation),e.path!==void 0&&(this.path=e.path))}}const EL=2,OX=Math.PI*EL,FX=1,UX=360;class zX{constructor(e){this.container=e}init(e){const n=e.options.rotate;if(!n)return;e.rotate={enable:n.animation.enable,value:fo(ke(n.value)),min:0,max:OX},e.pathRotation=n.path;let i=n.direction;switch(i===or.random&&(i=Math.floor(_t()*EL)>0?or.counterClockwise:or.clockwise),i){case or.counterClockwise:case"counterClockwise":e.rotate.status=Qt.decreasing;break;case or.clockwise:e.rotate.status=Qt.increasing;break}const r=n.animation;r.enable&&(e.rotate.decay=FX-ke(r.decay),e.rotate.velocity=ke(r.speed)/UX*this.container.retina.reduceFactor,r.sync||(e.rotate.velocity*=_t())),e.rotation=e.rotate.value}isEnabled(e){const n=e.options.rotate;return n?!e.destroyed&&!e.spawning&&(!!n.value||n.animation.enable||n.path):!1}loadOptions(e,...n){e.rotate||(e.rotate=new kX);for(const i of n)e.rotate.load(i==null?void 0:i.rotate)}update(e,n){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(cw(e,e.rotate,!1,Ca.none,n),e.rotation=e.rotate.value))}}async function BX(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("rotate",n=>Promise.resolve(new zX(n)),e)}const VX=2,HX=Math.sqrt(VX),jX=2;function GX(t){const{context:e,radius:n}=t,i=n/HX,r=i*jX;e.rect(-i,-i,r,r)}const WX=4;class $X{constructor(){this.validTypes=["edge","square"]}draw(e){GX(e)}getSidesCount(){return WX}}async function XX(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new $X,e)}const qX=2,Wa={x:0,y:0};function YX(t){const{context:e,particle:n,radius:i}=t,r=n.sides,s=n.starInset??qX;e.moveTo(Wa.x,Wa.y-i);for(let o=0;o<r;o++)e.rotate(Math.PI/r),e.lineTo(Wa.x,Wa.y-i*s),e.rotate(Math.PI/r),e.lineTo(Wa.x,Wa.y-i)}const KX=2,ZX=5;class QX{constructor(){this.validTypes=["star"]}draw(e){YX(e)}getSidesCount(e){const n=e.shapeData;return Math.round(ke((n==null?void 0:n.sides)??ZX))}particleInit(e,n){const i=n.shapeData;n.starInset=ke((i==null?void 0:i.inset)??KX)}}async function JX(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new QX,e)}const eq=1;class tq{constructor(e,n){this._container=e,this._engine=n}
322init(e){var o;const n=this._container,i=e.options,r=Fi(i.stroke,e.id,i.reduceDuplicates);e.strokeWidth=ke(r.width)*n.retina.pixelRatio,e.strokeOpacity=ke(r.opacity??eq),e.strokeAnimation=(o=r.color)==null?void 0:o.animation;const s=sd(this._engine,r.color)??e.getFillColor();s&&(e.strokeColor=aL(s,e.strokeAnimation,n.retina.reduceFactor))}isEnabled(e){const n=e.strokeAnimation,{strokeColor:i}=e;return!e.destroyed&&!e.spawning&&!!n&&((i==null?void 0:i.h.value)!==void 0&&i.h.enable||(i==null?void 0:i.s.value)!==void 0&&i.s.enable||(i==null?void 0:i.l.value)!==void 0&&i.l.enable)}update(e,n){this.isEnabled(e)&&lL(e.strokeColor,n)}}async function nq(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("strokeColor",n=>Promise.resolve(new tq(n,t)),e)}async function iq(t,e=!0){t.checkVersion("3.9.1"),await j7(t,!1),await X9(t,!1),await n$(t,!1),await u$(t,!1),await _$(t,!1),await P$(t,!1),await N$(t,!1),await U$(t,!1),await H$(t,!1),await J$(t,!1),await r7(t,!1),await $7(t,!1),await tX(t,!1),await _X(t,!1),await F9(t,!1),await B9(t,!1),await P7(t,!1),await V7(t,!1),await NX(t,!1),await XX(t,!1),await JX(t,!1),await F7(t,!1),await BX(t,!1),await nq(t,!1),await O9(t,e)}const rq=t=>{const{id:e,className:n,background:i,minSize:r,maxSize:s,speed:o,particleColor:a,particleDensity:l}=t,[c,u]=b.useState(!1);b.useEffect(()=>{H8(async v=>{await iq(v)}).then(()=>{u(!0)})},[]);const d=wj(),f=async v=>{v&&d.start({opacity:1,transition:{duration:1}})},h=b.useId();return _.jsx(ze.div,{animate:d,className:ot("opacity-0",n),children:c&&_.jsx(V8,{id:e||h,className:ot("h-full w-full"),particlesLoaded:f,options:{background:{color:{value:i||"#0d47a1"}},fullScreen:{enable:!1,zIndex:1},fpsLimit:120,interactivity:{events:{onClick:{enable:!0,mode:"push"},onHover:{enable:!1,mode:"repulse"},resize:!0},modes:{push:{quantity:4},repulse:{distance:200,duration:.4}}},particles:{bounce:{horizontal:{value:1},vertical:{value:1}},collisions:{absorb:{speed:2},bounce:{horizontal:{value:1},vertical:{value:1}},enable:!1,maxSpeed:50,mode:"bounce",overlap:{enable:!0,retries:0}},color:{value:a||"#ffffff",animation:{h:{count:0,enable:!1,speed:1,decay:0,delay:0,sync:!0,offset:0},s:{count:0,enable:!1,speed:1,decay:0,delay:0,sync:!0,offset:0},l:{count:0,enable:!1,speed:1,decay:0,delay:0,sync:!0,offset:0}}},effect:{close:!0,fill:!0,options:{},type:{}},groups:{},move:{angle:{offset:0,value:90},attract:{distance:200,enable:!1,rotate:{x:3e3,y:3e3}},center:{x:50,y:50,mode:"percent",radius:0},decay:0,distance:{},direction:"none",drift:0,enable:!0,gravity:{acceleration:9.81,enable:!1,inverse:!1,maxSpeed:50},path:{clamp:!0,delay:{value:0},enable:!1,options:{}},outModes:{default:"out"},random:!1,size:!1,speed:{min:.1,max:1},spin:{acceleration:0,enable:!1},straight:!1,trail:{enable:!1,length:10,fill:{}},vibrate:!1,warp:!1},number:{density:{enable:!0,width:400,height:400},limit:{mode:"delete",value:0},value:l||120},opacity:{value:{min:.1,max:1},animation:{count:0,enable:!0,speed:o||4,decay:0,delay:0,sync:!1,mode:"auto",startValue:"random",destroy:"none"}},reduceDuplicates:!1,shadow:{blur:0,color:{value:"#000"},enable:!1,offset:{x:0,y:0}},shape:{close:!0,fill:!0,options:{},type:"circle"},size:{value:{min:r||1,max:s||3},animation:{count:0,enable:!1,speed:5,decay:0,delay:0,sync:!1,mode:"auto",startValue:"random",destroy:"none"}},stroke:{width:0},zIndex:{value:0,opacityRate:1,sizeRate:1,velocityRate:1},destroy:{bounds:{},mode:"none",split:{count:1,factor:{value:3},rate:{value:{min:4,max:9}},sizeOffset:!0}}
322,roll:{darken:{enable:!1,value:0},enable:!1,enlighten:{enable:!1,value:0},mode:"vertical",speed:25},tilt:{value:0,animation:{enable:!1,speed:0,decay:0,sync:!1},direction:"clockwise",enable:!1},twinkle:{lines:{enable:!1,frequency:.05,opacity:1},particles:{enable:!1,frequency:.05,opacity:1}},wobble:{distance:5,enable:!1,speed:{angle:50,move:10}},life:{count:0,delay:{value:0,sync:!1},duration:{value:0,sync:!1}},rotate:{value:0,animation:{enable:!1,speed:0,decay:0,sync:!1},direction:"clockwise",path:!1},orbit:{animation:{count:0,enable:!1,speed:1,decay:0,delay:0,sync:!1},enable:!1,opacity:1,rotation:{value:45},width:1},links:{blink:!1,color:{value:"#fff"},consent:!1,distance:100,enable:!1,frequency:1,opacity:1,shadow:{blur:5,color:{value:"#000"},enable:!1},triangles:{enable:!1,frequency:1},width:1,warp:!1},repulse:{value:0,enabled:!1,distance:1,duration:1,factor:1,speed:1}},detectRetina:!0}})})};function sq(){return pG(),_.jsxs("section",{className:"py-24 px-6 my-20 relative overflow-hidden min-h-screen flex items-center justify-center",children:[_.jsx("div",{className:"absolute inset-0 z-0",children:_.jsx(rq,{background:"transparent",minSize:.4,maxSize:.8,particleDensity:60,className:"w-full h-full",particleColor:"#FFFFFF"})}),_.jsx("div",{className:"max-w-6xl mx-auto relative z-10",children:_.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[_.jsxs(ze.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},transition:{duration:.8},viewport:{once:!0},className:"flex flex-col justify-center",children:[_.jsxs("div",{className:"inline-flex w-[200px] justify-center items-center gap-2 px-4 py-2 rounded-full glass border border-nova-cyan/30 mb-8",children:[_.jsx(e3,{className:"w-4 h-4 text-nova-cyan"}),_.jsx("span",{className:"text-sm text-nova-cyan font-medium",children:"About Nova Stack"})]}),_.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 leading-tight",children:[_.jsx("span",{className:"text-gradient",children:"Innovation-First"}),_.jsx("br",{}),"Development Agency"]}),_.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"Nova Stack emerged from a vision to bridge the gap between cutting-edge technology and practical business solutions. We don't just build applications – we architect the future."}),_.jsxs("div",{className:"space-y-6 mb-10",children:[_.jsxs("div",{className:"flex items-start gap-4",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-nova-purple/10 flex items-center justify-center flex-shrink-0",children:_.jsx(t_,{className:"w-6 h-6 text-nova-purple"})}),_.jsxs("div",{children:[_.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Expert Team"}),_.jsx("p",{className:"text-muted-foreground",children:"Seasoned engineers and designers with experience at top tech companies"})]})]}),_.jsxs("div",{className:"flex items-start gap-4",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-nova-cyan/10 flex items-center justify-center flex-shrink-0",children:_.jsx(tR,{className:"w-6 h-6 text-nova-cyan"})}),_.jsxs("div",{children:[_.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Future-Focused"}),_.jsx("p",{className:"text-muted-foreground",children:"We embrace emerging technologies and methodologies to stay ahead of the curve"})]})]})]})]}),_.jsx(ze.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},transition:{duration:.8,delay:.2},viewport:{once:!0},className:"relative",children:_.jsxs("div",{className:"relative md:p-8",children:[_.jsx("div",{className:"glass rounded-3xl p-8 border border-nova-purple/30 hover:border-nova-purple/50 transition-all duration-300",children:_.jsxs("div",{className:"space-y-6",children:[_.jsxs("div",{className:"flex items-center gap-4",children:[_.jsx("div",{className:"w-3 h-3 rounded-full bg-nova-purple animate-pulse-glow"}),_.jsx("span",{className:"text-sm text-muted-foreground",children:"Mission-Driven Development"})]}),_.jsx("h3",{className:"text-2xl font-bold text-foreground",children:"Transforming Ideas Into Reality"}),_.jsx("p",{className:"text-muted-foreground",children:"Every project is an opportunity to push boundaries and create something extraordinary. We combine technical excellence with creative vision to deliver solutions that matter."}),_.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-6",children:[_.jsxs("div",{className:"text-center p-4 rounded-xl bg-nova-purple/5",children:[_.jsx("div",{className:"text-2xl font-bold text-nova-purple mb-1",children:"5+"}),_.jsx("div",{className:"text-xs text-muted-foreground",children:"Years Experience"})]}),_.jsxs("div",{className:"text-center p-4 rounded-xl bg-nova-cyan/5",children:[_.jsx("div",{className:"text-2xl font-bold text-nova-cyan mb-1",children:"100%"}),_.jsx("div",{className:"text-xs text-muted-foreground",children:"Passion Driven"})]})]})]})}),_.jsx("div",{className:"absolute -top-4 -right-4 w-8 h-8 rounded-full bg-nova-cyan/20 animate-float"}),_.jsx("div",{className:"absolute -bottom-4 -left-4 w-6 h-6 rounded-full bg-nova-purple/20 animate-float",style:{animationDelay:"1s"}}),_.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-nova-purple/10 via-trans
322parent to-nova-cyan/10 rounded-3xl blur-xl -z-10"})]})})]})})]})}const Vg=768;function oq(){const[t,e]=b.useState(void 0);return b.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Vg-1}px)`),i=()=>{e(window.innerWidth<Vg)};return n.addEventListener("change",i),e(window.innerWidth<Vg),()=>n.removeEventListener("change",i)},[]),!!t}var d0=new Map,Cf=new WeakMap,oM=0,aq=void 0;function lq(t){return t?(Cf.has(t)||(oM+=1,Cf.set(t,oM.toString())),Cf.get(t)):"0"}function cq(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?lq(t.root):t[e]}`).toString()}function uq(t){const e=cq(t);let n=d0.get(e);if(!n){const i=new Map;let r;const s=new IntersectionObserver(o=>{o.forEach(a=>{var l;const c=a.isIntersecting&&r.some(u=>a.intersectionRatio>=u);t.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=c),(l=i.get(a.target))==null||l.forEach(u=>{u(c,a)})})},t);r=s.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:s,elements:i},d0.set(e,n)}return n}function dq(t,e,n={},i=aq){if(typeof window.IntersectionObserver>"u"&&i!==void 0){const l=t.getBoundingClientRect();return e(i,{isIntersecting:i,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:r,observer:s,elements:o}=uq(n),a=o.get(t)||[];return o.has(t)||o.set(t,a),a.push(e),s.observe(t),function(){a.splice(a.indexOf(e),1),a.length===0&&(o.delete(t),s.unobserve(t)),o.size===0&&(s.disconnect(),d0.delete(r))}}function mw({threshold:t,delay:e,trackVisibility:n,rootMargin:i,root:r,triggerOnce:s,skip:o,initialInView:a,fallbackInView:l,onChange:c}={}){var u;const[d,f]=b.useState(null),h=b.useRef(c),[v,g]=b.useState({inView:!!a,entry:void 0});h.current=c,b.useEffect(()=>{if(o||!d)return;let x;return x=dq(d,(w,S)=>{g({inView:w,entry:S}),h.current&&h.current(w,S),S.isIntersecting&&s&&x&&(x(),x=void 0)},{root:r,rootMargin:i,threshold:t,trackVisibility:n,delay:e},l),()=>{x&&x()}},[Array.isArray(t)?t.toString():t,d,r,i,s,o,n,l,e]);const m=(u=v.entry)==null?void 0:u.target,p=b.useRef(void 0);!d&&m&&!s&&!o&&p.current!==m&&(p.current=m,g({inView:!!a,entry:void 0}));const y=[f,v.inView,v.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}const fq=({service:t})=>{const e=t.imagePosition==="right",n=b.useRef(null),{ref:i,inView:r}=mw({threshold:0,triggerOnce:!1}),{scrollYProgress:s}=V2({target:n,offset:["start end","end start"]}),o=j2(s,[0,1],r?["-20%","20%"]:["0%","0%"]);return _.jsx("div",{className:"h-screen flex items-center bg-background",ref:a=>{i(a),n.current=a},children:_.jsxs("div",{className:"w-full h-full flex flex-col md:flex-row",children:[_.jsx("div",{className:`${e?"md:order-1":"md:order-2"} h-full w-full md:w-1/2 flex items-center justify-center px-8 md:px-16 py-16 md:py-0`,children:_.jsxs("div",{className:"space-y-8 max-w-lg",children:[_.jsxs("div",{className:"space-y-4",children:[_.jsx("span",{className:"text-muted-foreground text-sm font-semibold tracking-wider uppercase",children:t.subtitle}),_.jsx("h2",{className:"text-5xl lg:text-6xl font-bold text-foreground leading-tight",children:t.title}),_.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed",children:t.description})]}),_.jsxs("div",{className:"space-y-4",children:[_.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Key Technologies"}),_.jsx("div",{className:"grid grid-cols-1 gap-3",children:t.features.map(a=>_.jsxs("div",{className:"flex items-center space-x-3",children:[_.jsx("div",{className:"w-1.5 h-1.5 bg-accent rounded-full"}),_.jsx("span",{className:"text-muted-foreground font-medium",children:a})]},a))})]})]})}),_.jsx("div",{className:`${e?"md:order-2":"md:order-1"} hidden md:block md:w-1/2 relative`,children:_.jsxs("div",{className:"relative h-full overflow-hidden",children:[_.jsx(ze.div,{style:{y:o},className:"absolute inset-0",children:_.jsx("img",{src:t.image,alt:t.title,className:"w-full h-full object-cover grayscale"})}),_.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-background/10 to-transparent"})]})})]})})};/**
323 * @license
324 * Copyright 2010-2025 Three.js Authors
325 * SPDX-License-Identifier: MIT
vendor: 5,133 bytes, line 326
326 */const gw="180",hq=0,aM=1,pq=2,ML=1,mq=2,es=3,Eo=0,si=1,Rr=2,ho=0,Wl=1,lM=2,cM=3,uM=4,gq=5,qo=100,vq=101,yq=102,xq=103,_q=104,wq=200,bq=201,Sq=202,Eq=203,f0=204,h0=205,Mq=206,Tq=207,Cq=208,Aq=209,Rq=210,Pq=211,Dq=212,Lq=213,Nq=214,p0=0,m0=1,g0=2,_c=3,v0=4,y0=5,x0=6,_0=7,TL=0,Iq=1,kq=2,po=0,Oq=1,Fq=2,Uq=3,zq=4,Bq=5,Vq=6,Hq=7,CL=300,wc=301,bc=302,w0=303,b0=304,dm=306,S0=1e3,cs=1001,E0=1002,yi=1003,jq=1004,Af=1005,Ui=1006,Hg=1007,oa=1008,ws=1009,AL=1010,RL=1011,cd=1012,vw=1013,Pa=1014,Dr=1015,Ld=1016,yw=1017,xw=1018,ud=1020,PL=35902,DL=35899,LL=1021,NL=1022,zi=1023,dd=1026,fd=1027,IL=1028,_w=1029,kL=1030,ww=1031,bw=1033,Eh=33776,Mh=33777,Th=33778,Ch=33779,M0=35840,T0=35841,C0=35842,A0=35843,R0=36196,P0=37492,D0=37496,L0=37808,N0=37809,I0=37810,k0=37811,O0=37812,F0=37813,U0=37814,z0=37815,B0=37816,V0=37817,H0=37818,j0=37819,G0=37820,W0=37821,$0=36492,X0=36494,q0=36495,Y0=36283,K0=36284,Z0=36285,Q0=36286,Gq=3200,Wq=3201,$q=0,Xq=1,Gs="",Li="srgb",Sc="srgb-linear",bp="linear",yt="srgb",$a=7680,dM=519,qq=512,Yq=513,Kq=514,OL=515,Zq=516,Qq=517,Jq=518,eY=519,fM=35044,hM="300 es",Lr=2e3,Sp=2001;class Fc{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){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){const i=this._listeners;if(i===void 0)return;const r=i[e];if(r!==void 0){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}}dispatchEvent(e){const n=this._listeners;if(n===void 0)return;const i=n[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 En=["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"],jg=Math.PI/180,J0=180/Math.PI;function Nd(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(En[t&255]+En[t>>8&255]+En[t>>16&255]+En[t>>24&255]+"-"+En[e&255]+En[e>>8&255]+"-"+En[e>>16&15|64]+En[e>>24&255]+"-"+En[n&63|128]+En[n>>8&255]+"-"+En[n>>16&255]+En[n>>24&255]+En[i&255]+En[i>>8&255]+En[i>>16&255]+En[i>>24&255]).toLowerCase()}function rt(t,e,n){return Math.max(e,Math.min(n,t))}function tY(t,e){return(t%e+e)%e}function Gg(t,e,n){return(1-n)*t+n*e}function eu(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 Kn(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.")}}class wt{constructor(e=0,n=0){wt.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}
vendor: 5,148 bytes, line 326
326sub(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=rt(this.x,e.x,n.x),this.y=rt(this.y,e.y,n.y),this}clampScalar(e,n){return this.x=rt(this.x,e,n),this.y=rt(this.y,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(rt(i,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(rt(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 Id{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],d=i[r+3];const f=s[o+0],h=s[o+1],v=s[o+2],g=s[o+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d;return}if(a===1){e[n+0]=f,e[n+1]=h,e[n+2]=v,e[n+3]=g;return}if(d!==g||l!==f||c!==h||u!==v){let m=1-a;const p=l*f+c*h+u*v+d*g,y=p>=0?1:-1,x=1-p*p;if(x>Number.EPSILON){const S=Math.sqrt(x),T=Math.atan2(S,p*y);m=Math.sin(m*T)/S,a=Math.sin(a*T)/S}const w=a*y;if(l=l*m+f*w,c=c*m+h*w,u=u*m+v*w,d=d*m+g*w,m===1-a){const S=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=S,c*=S,u*=S,d*=S}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],d=s[o],f=s[o+1],h=s[o+2],v=s[o+3];return e[n]=a*v+u*d+l*h-c*f,e[n+1]=l*v+u*f+c*d-a*h,e[n+2]=c*v+u*h+a*f-l*d,e[n+3]=u*v-a*d-l*f-c*h,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=!0){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),d=a(s/2),f=l(i/2),h=l(r/2),v=l(s/2);switch(o){case"XYZ":this._x=f*u*d+c*h*v,this._y=c*h*d-f*u*v,this._z=c*u*v+f*h*d,this._w=c*u*d-f*h*v;break;case"YXZ":this._x=f*u*d+c*h*v,this._y=c*h*d-f*u*v,this._z=c*u*v-f*h*d,this._w=c*u*d+f*h*v;break;case"ZXY":this._x=f*u*d-c*h*v,this._y=c*h*d+f*u*v,this._z=c*u*v+f*h*d,this._w=c*u*d-f*h*v;break;case"ZYX":this._x=f*u*d-c*h*v,this._y=c*h*d+f*u*v,this._z=c*u*v-f*h*d,this._w=c*u*d+f*h*v;break;case"YZX":this._x=f*u*d+c*h*v,this._y=c*h*d+f*u*v,this._z=c*u*v-f*h*d,this._w=c*u*d-f*h*v;break;case"XZY":this._x=f*u*d-c*h*v,this._y=c*h*d-f*u*v,this._z=c*u*v+f*h*d,this._w=c*u*d+f*h*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&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],d=n[10],f=i+a+d;if(f>0){const h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(u-l)*h,this._y=(s-c)*h,this._z=(o-r)*h}else if(i>
vendor: 4,167 bytes, line 326
326a&&i>d){const h=2*Math.sqrt(1+i-a-d);this._w=(u-l)/h,this._x=.25*h,this._y=(r+o)/h,this._z=(s+c)/h}else if(a>d){const h=2*Math.sqrt(1+a-i-d);this._w=(s-c)/h,this._x=(r+o)/h,this._y=.25*h,this._z=(l+u)/h}else{const h=2*Math.sqrt(1+d-i-a);this._w=(o-r)/h,this._x=(s+c)/h,this._y=(l+u)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return i<1e-8?(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(rt(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 h=1-n;return this._w=h*o+n*this._w,this._x=h*i+n*this._x,this._y=h*r+n*this._y,this._z=h*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,f=Math.sin(n*u)/c;return this._w=o*d+this._w*f,this._x=i*d+this._x*f,this._y=r*d+this._y*f,this._z=s*d+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}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._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class q{constructor(e=0,n=0,i=0){q.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}
vendor: 9,245 bytes, line 326
326sub(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(pM.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(pM.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=2*(o*r-a*i),u=2*(a*n-s*r),d=2*(s*i-o*n);return this.x=n+l*c+o*d-a*u,this.y=i+l*u+a*c-s*d,this.z=r+l*d+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const 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=rt(this.x,e.x,n.x),this.y=rt(this.y,e.y,n.y),this.z=rt(this.z,e.z,n.z),this}clampScalar(e,n){return this.x=rt(this.x,e,n),this.y=rt(this.y,e,n),this.z=rt(this.z,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(rt(i,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,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 Wg.copy(this).projectOnVector(e),this.sub(Wg)}reflect(e){return this.sub(Wg.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(rt(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()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(e),this.y=n,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Wg=new q,pM=new Id;class Je{constructor(e,n,i,r,s,o,a,l,c){Je.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],d=i[7],f=i[2],h=i[5],v=i[8],g=r[0],m=r[3],p=r[6],y=r[1],x=r[4],w=r[7],S=r[2],T=r[5],C=r[8];return s[0]=o*g+a*y+l*S,s[3]=o*m+a*x+l*T,s[6]=o*p+a*w+l*C,s[1]=c*g+u*y+d*S,s[4]=c*m+u*x+d*T,s[7]=c*p+u*w+d*C,s[2]=f*g+h*y+v*S,s[5]=f*m+h*x+v*T,s[8]=f*p+h*w+v*C,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],d=u*o-a*c,f=a*l-u*s,h=c*s-o*l,v=n*d+i*f+r*h;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/v;return e[0]=d*g,e[1]=(r*c-u*i)*g,e[2]=(a*i-r*o)*g,e[3]=f*g,e[4]=(u*n-r*l)*g,e[5]=(r*s-a*n)*g,e[6]=h*g,e[7]=(i*l-c*n)*g,e[8]=(o*n-i*s)*g,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($g.makeScale(e,n)),this}rotate(e){return this.premultiply($g.makeRotation(-e)),this}translate(e,n){return this.premultiply($g.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 $g=new Je;function FL(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function hd(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function nY(){const t=hd("canvas");return t.style.display="block",t}const mM={};function pd(t){t in mM||(mM[t]=!0,console.warn(t))}function iY(t,e,n){return new Promise(function(i,r){function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:r();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:i()}}setTimeout(s,n)})}const gM=new Je().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),vM=new Je().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.20397
vendor: 27,416 bytes, line 326
3267,1.0569715);function rY(){const t={enabled:!0,workingColorSpace:Sc,spaces:{},convert:function(r,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===yt&&(r.r=hs(r.r),r.g=hs(r.g),r.b=hs(r.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===yt&&(r.r=$l(r.r),r.g=$l(r.g),r.b=$l(r.b))),r},workingToColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},colorSpaceToWorking:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Gs?bp:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,o){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,s){return pd("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),t.workingToColorSpace(r,s)},toWorkingColorSpace:function(r,s){return pd("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),t.colorSpaceToWorking(r,s)}},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],i=[.3127,.329];return t.define({[Sc]:{primaries:e,whitePoint:i,transfer:bp,toXYZ:gM,fromXYZ:vM,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Li},outputColorSpaceConfig:{drawingBufferColorSpace:Li}},[Li]:{primaries:e,whitePoint:i,transfer:yt,toXYZ:gM,fromXYZ:vM,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Li}}}),t}const ct=rY();function hs(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function $l(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Xa;class sY{static getDataURL(e,n="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Xa===void 0&&(Xa=hd("canvas")),Xa.width=e.width,Xa.height=e.height;const r=Xa.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=Xa}return i.toDataURL(n)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=hd("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]=hs(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(hs(n[i]/255)*255):n[i]=hs(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 oY=0;class Sw{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:oY++}),this.uuid=Nd(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const n=this.data;return typeof HTMLVideoElement<"u"&&n instanceof HTMLVideoElement?e.set(n.videoWidth,n.videoHeight,0):n instanceof VideoFrame?e.set(n.displayHeight,n.displayWidth,0):n!==null?e.set(n.width,n.height,n.depth||0):e.set(0,0,0),e}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(Xg(r[o].image)):s.push(Xg(r[o]))}else s=Xg(r);i.url=s}return n||(e.images[this.uuid]=i),i}}function Xg(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?sY.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 aY=0;const qg=new q;class Nn extends Fc{constructor(e=Nn.DEFAULT_IMAGE,n=Nn.DEFAULT_MAPPING,i=cs,r=cs,s=Ui,o=oa,a=zi,l=ws,c=Nn.DEFAULT_ANISOTROPY,u=Gs){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:aY++}),this.uuid=Nd(),this.name="",this.source=new Sw(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 wt(0,0),this.repeat=new wt(1,1),this.center=new wt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Je,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(qg).x}get height(){return this.source.getSize(qg).y}get depth(){return this.source.getSize(qg).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${n}' has value of undefined.`);continue}const r=this[n];if(r===void 0){console.warn(`THREE.Texture.setValues(): property '${n}' does not exist.`);continue}r&&i&&r.isVector2&&i.isVector2||r&&i&&r.isVector3&&i.isVector3||r&&i&&r.isMatrix3&&i.isMatrix3?r.copy(i):this[n]=i}}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.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==CL)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case S0:e.x=e.x-Math.floor(e.x);break;case cs:e.x=e.x<0?0:1;break;case E0: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 S0:e.y=e.y-Math.floor(e.y);break;case cs:e.y=e.y<0?0:1;break;case E0:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Nn.DEFAULT_IMAGE=null;Nn.DEFAULT_MAPPING=CL;Nn.DEFAULT_ANISOTROPY=1;class Gt{constructor(e=0,n=0,i=0,r=1){Gt.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}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const 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],d=l[8],f=l[1],h=l[5],v=l[9],g=l[2],m=l[6],p=l[10];if(Math.abs(u-f)<.01&&Math.abs(d-g)<.01&&Math.abs(v-m)<.01){if(Math.abs(u+f)<.1&&Math.abs(d+g)<.1&&Math.abs(v+m)<.1&&Math.abs(c+h+p-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const x=(c+1)/2,w=(h+1)/2,S=(p+1)/2,T=(u+f)/4,C=(d+g)/4,P=(v+m)/4;return x>w&&x>S?x<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(x),r=T/i,s=C/i):w>S?w<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(w),i=T/r,s=P/r):S<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(S),i=C/s,r=P/s),this.set(i,r,s,n),this}let y=Math.sqrt((m-v)*(m-v)+(d-g)*(d-g)+(f-u)*(f-u));return Math.abs(y)<.001&&(y=1),this.x=(m-v)/y,this.y=(d-g)/y,this.z=(f-u)/y,this.w=Math.acos((c+h+p-1)/2),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=rt(this.x,e.x,n.x),this.y=rt(this.y,e.y,n.y),this.z=rt(this.z,e.z,n.z),this.w=rt(this.w,e.w,n.w),this}clampScalar(e,n){return this.x=rt(this.x,e,n),this.y=rt(this.y,e,n),this.z=rt(this.z,e,n),this.w=rt(this.w,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(rt(i,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,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 lY extends Fc{constructor(e=1,n=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Ui,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=i.depth,this.scissor=new Gt(0,0,e,n),this.scissorTest=!1,this.viewport=new Gt(0,0,e,n);const r={width:e,height:n,depth:i.depth},s=new Nn(r);this.textures=[];const o=i.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}_setTextureOptions(e={}){const n={minFilter:Ui,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(n.mapping=e.mapping),e.wrapS!==void 0&&(n.wrapS=e.wrapS),e.wrapT!==void 0&&(n.wrapT=e.wrapT),e.wrapR!==void 0&&(n.wrapR=e.wrapR),e.magFilter!==void 0&&(n.magFilter=e.magFilter),e.minFilter!==void 0&&(n.minFilter=e.minFilter),e.format!==void 0&&(n.format=e.format),e.type!==void 0&&(n.type=e.type),e.anisotropy!==void 0&&(n.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(n.colorSpace=e.colorSpace),e.flipY!==void 0&&(n.flipY=e.flipY),e.generateMipmaps!==void 0&&(n.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(n.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(n)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,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.textures.length;r<s;r++)this.textures[r].image.width=e,this.textures[r].image.height=n,this.textures[r].image.depth=i,this.textures[r].isArrayTexture=this.textures[r].image.depth>1;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.textures.length=0;for(let n=0,i=e.textures.length;n<i;n++){this.textures[n]=e.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0,this.textures[n].renderTarget=this;const r=Object.assign({},e.textures[n].image);this.textures[n].source=new Sw(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Da extends lY{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class UL extends Nn{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=yi,this.minFilter=yi,this.wrapR=cs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class cY extends Nn{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=yi,this.minFilter=yi,this.wrapR=cs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class kd{constructor(e=new q(1/0,1/0,1/0),n=new q(-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(qi.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,i=e.count;n<i;n++)this.expandByPoint(qi.fromBufferAttribute(e,n));return 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=qi.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){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(n===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,qi):qi.fromBufferAttribute(s,o),qi.applyMatrix4(e.matrixWorld),this.expandByPoint(qi);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Rf.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Rf.copy(i.boundingBox)),Rf.applyMatrix4(e.matrixWorld),this.union(Rf)}const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],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,qi),qi.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(tu),Pf.subVectors(this.max,tu),qa.subVectors(e.a,tu),Ya.subVectors(e.b,tu),Ka.subVectors(e.c,tu),As.subVectors(Ya,qa),Rs.subVectors(Ka,Ya),Oo.subVectors(qa,Ka);let n=[0,-As.z,As.y,0,-Rs.z,Rs.y,0,-Oo.z,Oo.y,As.z,0,-As.x,Rs.z,0,-Rs.x,Oo.z,0,-Oo.x,-As.y,As.x,0,-Rs.y,Rs.x,0,-Oo.y,Oo.x,0];return!Yg(n,qa,Ya,Ka,Pf)||(n=[1,0,0,0,1,0,0,0,1],!Yg(n,qa,Ya,Ka,Pf))?!1:(Df.crossVectors(As,Rs),n=[Df.x,Df.y,Df.z],Yg(n,qa,Ya,Ka,Pf))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,qi).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(qi).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:(qr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),qr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),qr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),qr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),qr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),qr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),qr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),qr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(qr),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const qr=[new q,new q,new q,new q,new q,new q,new q,new q],qi=new q,Rf=new kd,qa=new q,Ya=new q,Ka=new q,As=new q,Rs=new q,Oo=new q,tu=new q,Pf=new q,Df=new q,Fo=new q;function Yg(t,e,n,i,r){for(let s=0,o=t.length-3;s<=o;s+=3){Fo.fromArray(t,s);const a=r.x*Math.abs(Fo.x)+r.y*Math.abs(Fo.y)+r.z*Math.abs(Fo.z),l=e.dot(Fo),c=n.dot(Fo),u=i.dot(Fo);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const uY=new kd,nu=new q,Kg=new q;class Ew{constructor(e=new q,n=-1){this.isSphere=!0,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):uY.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;nu.subVectors(e,this.center);const n=nu.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),r=(i-this.radius)*.5;this.center.addScaledVector(nu,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):(Kg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(nu.copy(e.center).add(Kg)),this.expandByPoint(nu.copy(e.center).sub(Kg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const Yr=new q,Zg=new q,Lf=new q,Ps=new q,Qg=new q,Nf=new q,Jg=new q;class dY{constructor(e=new q,n=new q(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,Yr)),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=Yr.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Yr.copy(this.origin).addScaledVector(this.direction,n),Yr.distanceToSquared(e))}distanceSqToSegment(e,n,i,r){Zg.copy(e).add(n).multiplyScalar(.5),Lf.copy(n).sub(e).normalize(),Ps.copy(this.origin).sub(Zg);const s=e.distanceTo(n)*.5,o=-this.direction.dot(Lf),a=Ps.dot(this.direction),l=-Ps.dot(Lf),c=Ps.lengthSq(),u=Math.abs(1-o*o);let d,f,h,v;if(u>0)if(d=o*l-a,f=o*a-l,v=s*u,d>=0)if(f>=-v)if(f<=v){const g=1/u;d*=g,f*=g,h=d*(d+o*f+2*a)+f*(o*d+f+2*l)+c}else f=s,d=Math.max(0,-(o*f+a)),h=-d*d+f*(f+2*l)+c;else f=-s,d=Math.max(0,-(o*f+a)),h=-d*d+f*(f+2*l)+c;else f<=-v?(d=Math.max(0,-(-o*s+a)),f=d>0?-s:Math.min(Math.max(-s,-l),s),h=-d*d+f*(f+2*l)+c):f<=v?(d=0,f=Math.min(Math.max(-s,-l),s),h=f*(f+2*l)+c):(d=Math.max(0,-(o*s+a)),f=d>0?s:Math.min(Math.max(-s,-l),s),h=-d*d+f*(f+2*l)+c);else f=o>0?-s:s,d=Math.max(0,-(o*f+a)),h=-d*d+f*(f+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Zg).addScaledVector(Lf,f),h}intersectSphere(e,n){Yr.subVectors(e.center,this.origin);const i=Yr.dot(this.direction),r=Yr.dot(Yr)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radiu
vendor: 9,224 bytes, line 326
326s}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,d=1/this.direction.z,f=this.origin;return c>=0?(i=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(i=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),u>=0?(s=(e.min.y-f.y)*u,o=(e.max.y-f.y)*u):(s=(e.max.y-f.y)*u,o=(e.min.y-f.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),d>=0?(a=(e.min.z-f.z)*d,l=(e.max.z-f.z)*d):(a=(e.max.z-f.z)*d,l=(e.min.z-f.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,n)}intersectsBox(e){return this.intersectBox(e,Yr)!==null}intersectTriangle(e,n,i,r,s){Qg.subVectors(n,e),Nf.subVectors(i,e),Jg.crossVectors(Qg,Nf);let o=this.direction.dot(Jg),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Ps.subVectors(this.origin,e);const l=a*this.direction.dot(Nf.crossVectors(Ps,Nf));if(l<0)return null;const c=a*this.direction.dot(Qg.cross(Ps));if(c<0||l+c>o)return null;const u=-a*Ps.dot(Jg);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 ln{constructor(e,n,i,r,s,o,a,l,c,u,d,f,h,v,g,m){ln.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,d,f,h,v,g,m)}set(e,n,i,r,s,o,a,l,c,u,d,f,h,v,g,m){const p=this.elements;return p[0]=e,p[4]=n,p[8]=i,p[12]=r,p[1]=s,p[5]=o,p[9]=a,p[13]=l,p[2]=c,p[6]=u,p[10]=d,p[14]=f,p[3]=h,p[7]=v,p[11]=g,p[15]=m,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 ln().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/Za.setFromMatrixColumn(e,0).length(),s=1/Za.setFromMatrixColumn(e,1).length(),o=1/Za.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),d=Math.sin(s);if(e.order==="XYZ"){const f=o*u,h=o*d,v=a*u,g=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=h+v*c,n[5]=f-g*c,n[9]=-a*l,n[2]=g-f*c,n[6]=v+h*c,n[10]=o*l}else if(e.order==="YXZ"){const f=l*u,h=l*d,v=c*u,g=c*d;n[0]=f+g*a,n[4]=v*a-h,n[8]=o*c,n[1]=o*d,n[5]=o*u,n[9]=-a,n[2]=h*a-v,n[6]=g+f*a,n[10]=o*l}else if(e.order==="ZXY"){const f=l*u,h=l*d,v=c*u,g=c*d;n[0]=f-g*a,n[4]=-o*d,n[8]=v+h*a,n[1]=h+v*a,n[5]=o*u,n[9]=g-f*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const f=o*u,h=o*d,v=a*u,g=a*d;n[0]=l*u,n[4]=v*c-h,n[8]=f*c+g,n[1]=l*d,n[5]=g*c+f,n[9]=h*c-v,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const f=o*l,h=o*c,v=a*l,g=a*c;n[0]=l*u,n[4]=g-f*d,n[8]=v*d+h,n[1]=d,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=h*d+v,n[10]=f-g*d}else if(e.order==="XZY"){const f=o*l,h=o*c,v=a*l,g=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=f*d+g,n[5]=o*u,n[9]=h*d-v,n[2]=v*d-h,n[6]=a*u,n[10]=g*d+f}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(fY,e,hY)}lookAt(e,n,i){const r=this.elements;return li.subVectors(e,n),li.lengthSq()===0&&(li.z=1),li.normalize(),Ds.crossVectors(i,li),Ds.lengthSq()===0&&(Math.abs(i.z)===1?li.x+=1e-4:li.z+=1e-4,li.normalize(),Ds.crossVectors(i,li)),Ds.normalize(),If.crossVectors(li,Ds),r[0]=Ds.x,r[4]=If.x,r[8]=li.x,r[1]=Ds.y,r[5]=If.y,r[9]=li.y,r[2]=Ds.z,r[6]=If.z,r[10]=li.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],d=i[5],f=i[9],h=i[13],v=i[2],g=i[6],m=i[10],p=i[14],y=i[3],x=i[7],w=i[11],S=i[15],T=r[0],C=r[4],P=r[8],E=r[12],M=r[1],N=r[5],k=r[9],z=r[13],F=r[2],$=r[6],H=r[10],W=r[14],L=r[3],O=r[7],j=r[11],J=r[15];return s[0]=o*T+a*M+l*F+c*L,s[4]=o*C+a*N+l*$+c*O,s[8]=o*P+a*k+l*H+c*j,s[12]=o*E+a*z+l*W+c*J,s[1]=u*T+d*M+f*F+h*L,s[5]=u*C+d*N+f*$+h*O,s[9]=u*P+d*k+f*H+h*j,s[13]=u*E+d*z+f*W+h*J,s[2]=v*T+g*M+m*F+p*L,s[6]=v*C+g*N+m*$+p*O,s[10]=v*P+g*k+m*H+p*j,s[14]=v*E+g*z+m*W+p*J,s[3]=y*T+x*M+w*F+S*L,s[7]=y*C+x*N+w*$+S*O,s[11]=y*P+x*k+w*H+S*j,s[15]=y*E+x*z+w*W+S*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],d=e[6],f=e[10],h=e[14],v=e[3],g=e[7],m=e[11],p=e[15];return v*(+s*l*d-r*c*d-s*a*f+i*c*f+r*a*h-i*l*h)+g*(+n*l*h-n*c*f+s*o*f-r*o*h+r*c*u-s*l*u)+m*(+n*c*d-n*a*h-s*o*d+i*o*h+s*a*u-i*c*u)+p*(-r*a*u-n*l*d+n*a*f+r*o*d-i*o*f+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],d=e[9],f=e[10],h=e[11],v=e[12],g=e[13],m=e[14],p=e[15],y=d*m*c-g*f*c+g*l*h-a*m*h-d*l*p+a*f*p,x=v*f*c-u*m*c-v*l*h+o*m*h+u*l*p-o*f*p,w=u*g*c-v*d*c+v*a*h-o*g*h-u*a*p+o*d*p,S=v*d*l-u*g*l-v*a*f+o*g*f+u*a*m-o*d*m,T=n*y+i*x+r*w+s*S;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const C=1/T;return e[0]=y*C,e[1]=(g*f*s-d*m*s-g*r*h+i*m*h+d*r*p-i*f*p)*C,e[2]=(a*m*s-g*l*s+g*r*c-i*m*c-a*r*p+i*l*p)*C,e[3]=(d*l*s-a*f*s-d*r*c+i*f*c+a*r*h-i*l*h)*C,e[4]=x*C,e[5]=(u*m*s-v*f*s+v*r*h-n*m*h-u*r*p+n*f*p)*C,e[6]=(v*l*s-o*m*s-v*r*c+n*m*c+o*r*p-n*l*p)*C,e[7]=(o*f*s-u*l*s+u*r*c-n*f*c-o*r*h+n*l*h)*C,e[8]=w*C,e[9]=(v*d*s-u*g*s-v*i*h+n*g*h+u*i*p-n*d*p)*C,e[10]=(o*g*s-v*a*s+v*i*c-n*g*c-o*i*p+n*a*p)*C,e[11]=(u*a*s-o*d*s-u*i*c+n*d*c+o*i*h-n*a*h)*C,e[12]=S*C,e[13]=(u*g*r-v*d*r+v*i*f-n*g*f-u*i*m+n*d*m)*C,e[14]=(v*a*r-o*g*r-v*i*l+n*g*l+o*i*m-n*a*m)*C,e[15]=(o*d*r-u*a*r+u*i*l-n*d*l-o*i*f+n*a*f)*C,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,d=a+a,f=s*c,h=s*u,v=s*d,g=o*u,m=o*d,p=a*d,y=l*c,x=l*u,w=l*d,S=i.x,T=i.y,C=i.z;return r[0]=(1-(g+p))*S,r[1]=(h+w)*S,r[2]=(v-x)*S,r[3]=0,r[4]=(h-w)*T,r[5]=(1-(f+p))*T,r[6]=(m+y)*T,r[7]=0,r[8]=(v+x)*C,r[9]=(m-y)*C,r[10]=(1-(f+g))*C,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=Za.set(r[0],r[1],r[2]).length();const o=Za.set(r[4],r[5],r[6]).length(),a=Za.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],Yi.copy(this);const c=1/s,u=1/o,d=1/a;return Yi.elements[0]*=c,Yi.elements[1]*=c,Yi.elements[2]*=c,Yi.elements[4]*=u,Yi.elements[5]*=u,Yi.elements[6]*=u,Yi.elements[8]*=d,Yi.elements[9]*=d,Yi.elements[10]*=d,n.setFromRotationMatrix(Yi),i.x=s,i.y=o,i.z=a,this}makePerspective(e,n,i,r,s,o,a=Lr,l=!1){const c=this.elements,u=2*s/(n-e),d=2*s/(i-r),f=(n+e)/(n-e),h=(i+r)/(i-r);let v,g;
vendor: 4,149 bytes, line 326
326if(l)v=s/(o-s),g=o*s/(o-s);else if(a===Lr)v=-(o+s)/(o-s),g=-2*o*s/(o-s);else if(a===Sp)v=-o/(o-s),g=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=d,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=v,c[14]=g,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,n,i,r,s,o,a=Lr,l=!1){const c=this.elements,u=2/(n-e),d=2/(i-r),f=-(n+e)/(n-e),h=-(i+r)/(i-r);let v,g;if(l)v=1/(o-s),g=o/(o-s);else if(a===Lr)v=-2/(o-s),g=-(o+s)/(o-s);else if(a===Sp)v=-1/(o-s),g=-s/(o-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=d,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=v,c[14]=g,c[3]=0,c[7]=0,c[11]=0,c[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 Za=new q,Yi=new ln,fY=new q(0,0,0),hY=new q(1,1,1),Ds=new q,If=new q,li=new q,yM=new ln,xM=new Id;class bs{constructor(e=0,n=0,i=0,r=bs.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],d=r[2],f=r[6],h=r[10];switch(n){case"XYZ":this._y=Math.asin(rt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-rt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(rt(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,h),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-rt(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,h),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(rt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-rt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,h),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 yM.makeRotationFromQuaternion(e),this.setFromRotationMatrix(yM,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return xM.setFromEuler(this),this.setFromQuaternion(xM,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}}bs.DEFAULT_ORDER="XYZ";class zL{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}
vendor: 5,642 bytes, line 326
326isEnabled(e){return(this.mask&(1<<e|0))!==0}}let pY=0;const _M=new q,Qa=new Id,Kr=new ln,kf=new q,iu=new q,mY=new q,gY=new Id,wM=new q(1,0,0),bM=new q(0,1,0),SM=new q(0,0,1),EM={type:"added"},vY={type:"removed"},Ja={type:"childadded",child:null},ev={type:"childremoved",child:null};class xi extends Fc{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:pY++}),this.uuid=Nd(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=xi.DEFAULT_UP.clone();const e=new q,n=new bs,i=new Id,r=new q(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 ln},normalMatrix:{value:new Je}}),this.matrix=new ln,this.matrixWorld=new ln,this.matrixAutoUpdate=xi.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=xi.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new zL,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,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 Qa.setFromAxisAngle(e,n),this.quaternion.multiply(Qa),this}rotateOnWorldAxis(e,n){return Qa.setFromAxisAngle(e,n),this.quaternion.premultiply(Qa),this}rotateX(e){return this.rotateOnAxis(wM,e)}rotateY(e){return this.rotateOnAxis(bM,e)}rotateZ(e){return this.rotateOnAxis(SM,e)}translateOnAxis(e,n){return _M.copy(e).applyQuaternion(this.quaternion),this.position.add(_M.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(wM,e)}translateY(e){return this.translateOnAxis(bM,e)}translateZ(e){return this.translateOnAxis(SM,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Kr.copy(this.matrixWorld).invert())}lookAt(e,n,i){e.isVector3?kf.copy(e):kf.set(e,n,i);const r=this.parent;this.updateWorldMatrix(!0,!1),iu.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Kr.lookAt(iu,kf,this.up):Kr.lookAt(kf,iu,this.up),this.quaternion.setFromRotationMatrix(Kr),r&&(Kr.extractRotation(r.matrixWorld),Qa.setFromRotationMatrix(Kr),this.quaternion.premultiply(Qa.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.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(EM),Ja.child=e,this.dispatchEvent(Ja),Ja.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(vY),ev.child=e,this.dispatchEvent(ev),ev.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Kr.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Kr.multiply(e.parent.matrixWorld)),e.applyMatrix4(Kr),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(EM),Ja.child=e,this.dispatchEvent(Ja),Ja.child=null,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,i=[]){this[e]===n&&i.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,n,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(iu,e,mY),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(iu,gY,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.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix
vendor: 5,316 bytes, line 326
326):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++)n[i].updateMatrixWorld(e)}updateWorldMatrix(e,n){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].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.7,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(a=>({...a})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.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 d=l[c];s(e.shapes,d)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(e.materials,this.material[l]));r.material=a}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];r.animations.push(s(e.animations,l))}}if(n){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),u=o(e.images),d=o(e.shapes),f=o(e.skeletons),h=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),d.length>0&&(i.shapes=d),f.length>0&&(i.skeletons=f),h.length>0&&(i.animations=h),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.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}xi.DEFAULT_UP=new q(0,1,0);xi.DEFAULT_MATRIX_AUTO_UPDATE=!0;xi.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;
vendor: 10,322 bytes, line 326
326const Ki=new q,Zr=new q,tv=new q,Qr=new q,el=new q,tl=new q,MM=new q,nv=new q,iv=new q,rv=new q,sv=new Gt,ov=new Gt,av=new Gt;class ar{constructor(e=new q,n=new q,i=new q){this.a=e,this.b=n,this.c=i}static getNormal(e,n,i,r){r.subVectors(i,n),Ki.subVectors(e,n),r.cross(Ki);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){Ki.subVectors(r,n),Zr.subVectors(i,n),tv.subVectors(e,n);const o=Ki.dot(Ki),a=Ki.dot(Zr),l=Ki.dot(tv),c=Zr.dot(Zr),u=Zr.dot(tv),d=o*c-a*a;if(d===0)return s.set(0,0,0),null;const f=1/d,h=(c*l-a*u)*f,v=(o*u-a*l)*f;return s.set(1-h-v,v,h)}static containsPoint(e,n,i,r){return this.getBarycoord(e,n,i,r,Qr)===null?!1:Qr.x>=0&&Qr.y>=0&&Qr.x+Qr.y<=1}static getInterpolation(e,n,i,r,s,o,a,l){return this.getBarycoord(e,n,i,r,Qr)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Qr.x),l.addScaledVector(o,Qr.y),l.addScaledVector(a,Qr.z),l)}static getInterpolatedAttribute(e,n,i,r,s,o){return sv.setScalar(0),ov.setScalar(0),av.setScalar(0),sv.fromBufferAttribute(e,n),ov.fromBufferAttribute(e,i),av.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(sv,s.x),o.addScaledVector(ov,s.y),o.addScaledVector(av,s.z),o}static isFrontFacing(e,n,i,r){return Ki.subVectors(i,n),Zr.subVectors(e,n),Ki.cross(Zr).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 Ki.subVectors(this.c,this.b),Zr.subVectors(this.a,this.b),Ki.cross(Zr).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ar.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return ar.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,i,r,s){return ar.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}containsPoint(e){return ar.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ar.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;el.subVectors(r,i),tl.subVectors(s,i),nv.subVectors(e,i);const l=el.dot(nv),c=tl.dot(nv);if(l<=0&&c<=0)return n.copy(i);iv.subVectors(e,r);const u=el.dot(iv),d=tl.dot(iv);if(u>=0&&d<=u)return n.copy(r);const f=l*d-u*c;if(f<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(i).addScaledVector(el,o);rv.subVectors(e,s);const h=el.dot(rv),v=tl.dot(rv);if(v>=0&&h<=v)return n.copy(s);const g=h*c-l*v;if(g<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(i).addScaledVector(tl,a);const m=u*v-h*d;if(m<=0&&d-u>=0&&h-v>=0)return MM.subVectors(s,r),a=(d-u)/(d-u+(h-v)),n.copy(r).addScaledVector(MM,a);const p=1/(m+g+f);return o=g*p,a=f*p,n.copy(i).addScaledVector(el,o).addScaledVector(tl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const BL={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},Ls={h:0,s:0,l:0},Of={h:0,s:0,l:0};function lv(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}class xt{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=Li){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ct.colorSpaceToWorking(this,n),this}setRGB(e,n,i,r=ct.workingColorSpace){return this.r=e,this.g=n,this.b=i,ct.colorSpaceToWorking(this,r),this}setHSL(e,n,i,r=ct.workingColorSpace){if(e=tY(e,1),n=rt(n,0,1),i=rt(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=lv(o,s,e+1/3),this.g=lv(o,s,e),this.b=lv(o,s,e-1/3)}return ct.colorSpaceToWorking(this,r),this}setStyle(e,n=Li){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=Li){const i=BL[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=hs(e.r),this.g=hs(e.g),this.b=hs(e.b),this}copyLinearToSRGB(e){return this.r=$l(e.r),this.g=$l(e.g),this.b=$l(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Li){return ct.workingToColorSpace(Mn.copy(this),e),Math.round(rt(Mn.r*255,0,255))*65536+Math.round(rt(Mn.g*255,0,255))*256+Math.round(rt(Mn.b*255,0,255))}getHexString(e=Li){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=ct.workingColorSpace){ct.workingToColorSpace(Mn.copy(this),n);const i=Mn.r,r=Mn.g,s=Mn.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 d=o-a;switch(c=u<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r<s?6:0);break;case r:l=(s-i)/d+2;break;case s:l=(i-r)/d+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,n=ct.workingColorSpace){return ct.workingToColorSpace(Mn.copy(this),n),e.r=Mn.r,e.g=Mn.g,e.b=Mn.b,e}getStyle(e=Li){ct.workingToColorSpace(Mn.copy(this),e);const n=Mn.r,i=Mn.g,r=Mn.b;return e!==Li?`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(Ls),this.setHSL(Ls.h+e,Ls.s+n,Ls.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(Ls),e.getHSL(Of);
vendor: 2,514 bytes, line 326
326const i=Gg(Ls.h,Of.h,n),r=Gg(Ls.s,Of.s,n),s=Gg(Ls.l,Of.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 Mn=new xt;xt.NAMES=BL;let yY=0;class fm extends Fc{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:yY++}),this.uuid=Nd(),this.name="",this.type="Material",this.blending=Wl,this.side=Eo,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=f0,this.blendDst=h0,this.blendEquation=qo,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new xt(0,0,0),this.blendAlpha=0,this.depthFunc=_c,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=dM,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=$a,this.stencilZFail=$a,this.stencilZPass=$a,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const 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.7,type:"Material",generator:"Material.toJSON"}};
vendor: 15,371 bytes, line 326
326i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Wl&&(i.blending=this.blending),this.side!==Eo&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==f0&&(i.blendSrc=this.blendSrc),this.blendDst!==h0&&(i.blendDst=this.blendDst),this.blendEquation!==qo&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==_c&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==dM&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==$a&&(i.stencilFail=this.stencilFail),this.stencilZFail!==$a&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==$a&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(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.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const 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++}}class VL extends fm{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new xt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new bs,this.combine=TL,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Kt=new q,Ff=new wt;let xY=0;class Ur{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:xY++}),this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=fM,this.updateRanges=[],this.gpuType=Dr,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,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++)Ff.fromBufferAttribute(this,n),Ff.applyMatrix3(e),this.setXY(n,Ff.x,Ff.y);else if(this.itemSize===3)for(let n=0,i=this.count;n<i;n++)Kt.fromBufferAttribute(this,n),Kt.applyMatrix3(e),this.setXYZ(n,Kt.x,Kt.y,Kt.z);return this}applyMatrix4(e){for(let n=0,i=this.count;n<i;n++)Kt.fromBufferAttribute(this,n),Kt.applyMatrix4(e),this.setXYZ(n,Kt.x,Kt.y,Kt.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)Kt.fromBufferAttribute(this,n),Kt.applyNormalMatrix(e),this.setXYZ(n,Kt.x,Kt.y,Kt.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)Kt.fromBufferAttribute(this,n),Kt.transformDirection(e),this.setXYZ(n,Kt.x,Kt.y,Kt.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=eu(i,this.array)),i}setComponent(e,n,i){return this.normalized&&(i=Kn(i,this.array)),this.array[e*this.itemSize+n]=i,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=eu(n,this.array)),n}setX(e,n){return this.normalized&&(n=Kn(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=eu(n,this.array)),n}setY(e,n){return this.normalized&&(n=Kn(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=eu(n,this.array)),n}setZ(e,n){return this.normalized&&(n=Kn(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=eu(n,this.array)),n}setW(e,n){return this.normalized&&(n=Kn(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=Kn(n,this.array),i=Kn(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=Kn(n,this.array),i=Kn(i,this.array),r=Kn(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=Kn(n,this.array),i=Kn(i,this.array),r=Kn(r,this.array),s=Kn(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!==fM&&(e.usage=this.usage),e}}class HL extends Ur{constructor(e,n,i){super(new Uint16Array(e),n,i)}}class jL extends Ur{constructor(e,n,i){super(new Uint32Array(e),n,i)}}class ya extends Ur{constructor(e,n,i){super(new Float32Array(e),n,i)}}let _Y=0;const Ri=new ln,cv=new xi,nl=new q,ci=new kd,ru=new kd,dn=new q;class Fa extends Fc{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:_Y++}),this.uuid=Nd(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(FL(e)?jL:HL)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}
vendor: 13,807 bytes, line 326
326addGroup(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 Je().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 Ri.makeRotationFromQuaternion(e),this.applyMatrix4(Ri),this}rotateX(e){return Ri.makeRotationX(e),this.applyMatrix4(Ri),this}rotateY(e){return Ri.makeRotationY(e),this.applyMatrix4(Ri),this}rotateZ(e){return Ri.makeRotationZ(e),this.applyMatrix4(Ri),this}translate(e,n,i){return Ri.makeTranslation(e,n,i),this.applyMatrix4(Ri),this}scale(e,n,i){return Ri.makeScale(e,n,i),this.applyMatrix4(Ri),this}lookAt(e){return cv.lookAt(e),cv.updateMatrix(),this.applyMatrix4(cv.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(nl).negate(),this.translate(nl.x,nl.y,nl.z),this}setFromPoints(e){const n=this.getAttribute("position");if(n===void 0){const i=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];i.push(o.x,o.y,o.z||0)}this.setAttribute("position",new ya(i,3))}else{const i=Math.min(e.length,n.count);for(let r=0;r<i;r++){const s=e[r];n.setXYZ(r,s.x,s.y,s.z||0)}e.length>n.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kd);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new q(-1/0,-1/0,-1/0),new q(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];ci.setFromBufferAttribute(s),this.morphTargetsRelative?(dn.addVectors(this.boundingBox.min,ci.min),this.boundingBox.expandByPoint(dn),dn.addVectors(this.boundingBox.max,ci.max),this.boundingBox.expandByPoint(dn)):(this.boundingBox.expandByPoint(ci.min),this.boundingBox.expandByPoint(ci.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 Ew);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new q,1/0);return}if(e){const i=this.boundingSphere.center;if(ci.setFromBufferAttribute(e),n)for(let s=0,o=n.length;s<o;s++){const a=n[s];ru.setFromBufferAttribute(a),this.morphTargetsRelative?(dn.addVectors(ci.min,ru.min),ci.expandByPoint(dn),dn.addVectors(ci.max,ru.max),ci.expandByPoint(dn)):(ci.expandByPoint(ru.min),ci.expandByPoint(ru.max))}ci.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;s++)dn.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(dn));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++)dn.fromBufferAttribute(a,c),l&&(nl.fromBufferAttribute(e,c),dn.add(nl)),r=Math.max(r,i.distanceToSquared(dn))}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=n.position,r=n.normal,s=n.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Ur(new Float32Array(4*i.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<i.count;P++)a[P]=new q,l[P]=new q;const c=new q,u=new q,d=new q,f=new wt,h=new wt,v=new wt,g=new q,m=new q;function p(P,E,M){c.fromBufferAttribute(i,P),u.fromBufferAttribute(i,E),d.fromBufferAttribute(i,M),f.fromBufferAttribute(s,P),h.fromBufferAttribute(s,E),v.fromBufferAttribute(s,M),u.sub(c),d.sub(c),h.sub(f),v.sub(f);const N=1/(h.x*v.y-v.x*h.y);isFinite(N)&&(g.copy(u).multiplyScalar(v.y).addScaledVector(d,-h.y).multiplyScalar(N),m.copy(d).multiplyScalar(h.x).addScaledVector(u,-v.x).multiplyScalar(N),a[P].add(g),a[E].add(g),a[M].add(g),l[P].add(m),l[E].add(m),l[M].add(m))}let y=this.groups;y.length===0&&(y=[{start:0,count:e.count}]);for(let P=0,E=y.length;P<E;++P){const M=y[P],N=M.start,k=M.count;for(let z=N,F=N+k;z<F;z+=3)p(e.getX(z+0),e.getX(z+1),e.getX(z+2))}const x=new q,w=new q,S=new q,T=new q;function C(P){S.fromBufferAttribute(r,P),T.copy(S);const E=a[P];x.copy(E),x.sub(S.multiplyScalar(S.dot(E))).normalize(),w.crossVectors(T,E);const N=w.dot(l[P])<0?-1:1;o.setXYZW(P,x.x,x.y,x.z,N)}for(let P=0,E=y.length;P<E;++P){const M=y[P],N=M.start,k=M.count;for(let z=N,F=N+k;z<F;z+=3)C(e.getX(z+0)),C(e.getX(z+1)),C(e.getX(z+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 Ur(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let f=0,h=i.count;f<h;f++)i.setXYZ(f,0,0,0);const r=new q,s=new q,o=new q,a=new q,l=new q,c=new q,u=new q,d=new q;if(e)for(let f=0,h=e.count;f<h;f+=3){const v=e.getX(f+0),g=e.getX(f+1),m=e.getX(f+2);r.fromBufferAttribute(n,v),s.fromBufferAttribute(n,g),o.fromBufferAttribute(n,m),u.subVectors(o,s),d.subVectors(r,s),u.cross(d),a.fromBufferAttribute(i,v),l.fromBufferAttribute(i,g),c.fromBufferAttribute(i,m),a.add(u),l.add(u),c.add(u),i.setXYZ(v,a.x,a.y,a.z),i.setXYZ(g,l.x,l.y,l.z),i.setXYZ(m,c.x,c.y,c.z)}else for(let f=0,h=n.count;f<h;f+=3)r.fromBufferAttribute(n,f+0),s.fromBufferAttribute(n,f+1),o.fromBufferAttribute(n,f+2),u.subVectors(o,s),d.subVectors(r,s),u.cross(d),i.setXYZ(f+0,u.x,u.y,u.z),i.setXYZ(f+1,u.x,u.y,u.z),i.setXYZ(f+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++)dn.fromBufferAttribute(e,n),dn.normalize(),e.setXYZ(n,dn.x,dn.y,dn.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,d=a.normalized,f=new c.constructor(l.length*u);let h=0,v=0;for(let g=0,m=l.length;g<m;g++){a.isInterleavedBufferAttribute?h=l[g]*a.data.stride+a.offset:h=l[g]*u;for(let p=0;p<u;p++)f[v++]=c[h++]}return new Ur(f,u,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new Fa,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,d=c.length;u<d;u++){const f=c[u],h=e(f,i);l.push(h)}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.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const 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 d=0,f=c.length;d<f;d++){const h=c[d];u.push(h.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=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());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=[],d=s[c];for(let f=0,h=d.length;f<h;f++)u.push(d[f].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 d=o[c];this.addGroup(d.start,d.count,d.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const TM=new ln,Uo=new dY,Uf=new Ew,CM=new q,zf=new q,Bf=new q,Vf=new q,uv=new q,Hf=new q,AM=new q,jf=new q;class Nr extends xi{constructor(e=new Fa,n=new VL){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=n,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,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){Hf.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],d=s[l];u!==0&&(uv.fromBufferAttribute(d,e),o?Hf.addScaledVector(uv,u):Hf.addScaledVector(uv.sub(n),u))}n.add(Hf)}return n}raycast(e,n){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Uf.copy(i.boundingSphere),Uf.applyMatrix4(s),Uo.copy(e.ray).recast(e.near),!(Uf.containsPoint(Uo.origin)===!1&&(Uo.intersectSphere(Uf,CM)===null||Uo.origin.distanceToSquared(CM)>(e.far-e.near)**2))&&(TM.copy(s).invert(),Uo.copy(e.ray).applyMatrix4(TM),!(i.boundingBox!==null&&Uo.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,Uo)))}_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,d=s.attributes.normal,f=s.groups,h=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,g=f.length;v<g;v++){const m=f[v],p=o[m.materialIndex],y=Math.max(m.start,h.start),x=Math.min(a.count,Math.min(m.start+m.count,h.start+h.count));for(let w=y,S=x;w<S;w+=3){const T=a.getX(w),C=a.getX(w+1),P=a.getX(w+2);r=Gf(this,p,e,i,c,u,d,T,C,P),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=m.materialIndex,n.push(r))}}else{const v=Math.max(0,h.start),g=Math.min(a.count,h.start+h.count);for(let m=v,p=g;m<p;m+=3){const y=a.getX(m),x=a.getX(m+1),w=a.getX(m+2);r=Gf(this,o,e,i,c,u,d,y,x,w),r&&(r.faceIndex=Math.floor(m/3),n.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,g=f.length;v<g;v++){const m=f[v],p=o[m.materialIndex],y=Math.max(m.start,h.start),x=Math.min(l.count,Math.min(m.start+m.count,h.start+h.count));for(let w=y,S=x;w<S;w+=3){const T=w,C=w+1,P=w+2;r=Gf(this,p,e,i,c,u,d,T,C,P),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=m.materialIndex,n.push(r))}}else{const v=Math.max(0,h.start),g=Math.min(l.count,h.start+h.count);for(let m=v,p=g;m<p;m+=3){const y=m,x=m+1,w=m+2;r=Gf(this,o,e,i,c,u,d,y,x,w),r&&(r.faceIndex=Math.floor(m/3),n.push(r))}}}}function wY(t,e,n,i,r,s,o,a){let l;if(e.side===si?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===Eo,a),l===null)return null;jf.copy(a),jf.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(jf);return c<n.near||c>n.far?null:{distance:c,point:jf.clone(),object:t}}function Gf(t,e,n,i,r,s,o,a,l,c){t.getVertexPosition(a,zf),t.getVertexPosition(l,Bf),t.getVertexPosition(c,Vf);const u=wY(t,e,n,i,zf,Bf,Vf,AM);if(u){const d=new q;ar.getBarycoord(AM,zf,Bf,Vf,d),r&&(u.uv=ar.getInterpolatedAttribute(r,a,l,c,d,new wt)),s&&(u.uv1=ar.getInterpolatedAttribute(s,a,l,c,d,new wt)),o&&(u.normal=ar.getInterpolatedAttribute(o,a,l,c,d,new q),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const f={a,b:l,c,normal:new q,materialIndex:0};ar.getNormal(zf,Bf,Vf,f.normal),u.face=f,u.barycoord=d}return u}class Od extends Fa{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=[],d=[];let f=0,h=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
vendor: 5,339 bytes, lines 326-330
326),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 ya(c,3)),this.setAttribute("normal",new ya(u,3)),this.setAttribute("uv",new ya(d,2));function v(g,m,p,y,x,w,S,T,C,P,E){const M=w/C,N=S/P,k=w/2,z=S/2,F=T/2,$=C+1,H=P+1;let W=0,L=0;const O=new q;for(let j=0;j<H;j++){const J=j*N-z;for(let ne=0;ne<$;ne++){const pe=ne*M-k;O[g]=pe*y,O[m]=J*x,O[p]=F,c.push(O.x,O.y,O.z),O[g]=0,O[m]=0,O[p]=T>0?1:-1,u.push(O.x,O.y,O.z),d.push(ne/C),d.push(1-j/P),W+=1}}for(let j=0;j<P;j++)for(let J=0;J<C;J++){const ne=f+J+$*j,pe=f+J+$*(j+1),he=f+(J+1)+$*(j+1),Ne=f+(J+1)+$*j;l.push(ne,pe,Ne),l.push(pe,he,Ne),L+=6}a.addGroup(h,L,E),h+=L,f+=W}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Od(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Ec(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 Un(t){const e={};for(let n=0;n<t.length;n++){const i=Ec(t[n]);for(const r in i)e[r]=i[r]}return e}function bY(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function GL(t){const e=t.getRenderTarget();return e===null?t.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:ct.workingColorSpace}const SY={clone:Ec,merge:Un};var EY=`void main() {
327	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
328}`,MY=`void main() {
329	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
330}`;class Ss extends fm{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=EY,this.fragmentShader=MY,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ec(e.uniforms),this.uniformsGroups=bY(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 WL extends xi{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ln,this.projectionMatrix=new ln,this.projectionMatrixInverse=new ln,this.coordinateSystem=Lr,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}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)}}const Ns=new q,RM=new wt,PM=new wt;class sr extends WL{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=J0*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(jg*.5*this.fov);return .5*this.getFilmHeight()/e}
vendor: 4,175 bytes, line 330
330getEffectiveFOV(){return J0*2*Math.atan(Math.tan(jg*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,i){Ns.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Ns.x,Ns.y).multiplyScalar(-e/Ns.z),Ns.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Ns.x,Ns.y).multiplyScalar(-e/Ns.z)}getViewSize(e,n){return this.getViewBounds(e,RM,PM),n.subVectors(PM,RM)}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(jg*.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.reversedDepth),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 il=-90,rl=1;class TY extends xi{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new sr(il,rl,e,n);r.layers=this.layers,this.add(r);const s=new sr(il,rl,e,n);s.layers=this.layers,this.add(s);const o=new sr(il,rl,e,n);o.layers=this.layers,this.add(o);const a=new sr(il,rl,e,n);a.layers=this.layers,this.add(a);const l=new sr(il,rl,e,n);l.layers=this.layers,this.add(l);const c=new sr(il,rl,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===Lr)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===Sp)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,d=e.getRenderTarget(),f=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const g=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=g,e.setRenderTarget(i,5,r),e.render(n,u),e.setRenderTarget(d,f,h),e.xr.enabled=v,i.texture.needsPMREMUpdate=!0}}class $L extends Nn{constructor(e=[],n=wc,i,r,s,o,a,l,c,u){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 CY extends Da{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];this.texture=new $L(r),this._setTextureOptions(n),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace
vendor: 7,442 bytes, lines 330-365
330=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`
331
332				varying vec3 vWorldDirection;
333
334				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
335
336					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
337
338				}
339
340				void main() {
341
342					vWorldDirection = transformDirection( position, modelMatrix );
343
344					#include <begin_vertex>
345					#include <project_vertex>
346
347				}
348			`,fragmentShader:`
349
350				uniform sampler2D tEquirect;
351
352				varying vec3 vWorldDirection;
353
354				#include <common>
355
356				void main() {
357
358					vec3 direction = normalize( vWorldDirection );
359
360					vec2 sampleUV = equirectUv( direction );
361
362					gl_FragColor = texture2D( tEquirect, sampleUV );
363
364				}
365			`},r=new Od(5,5,5),s=new Ss({name:"CubemapFromEquirect",uniforms:Ec(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:si,blending:ho});s.uniforms.tEquirect.value=n;const o=new Nr(r,s),a=n.minFilter;return n.minFilter===oa&&(n.minFilter=Ui),new TY(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n=!0,i=!0,r=!0){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,i,r);e.setRenderTarget(s)}}class Wf extends xi{constructor(){super(),this.isGroup=!0,this.type="Group"}}const AY={type:"move"};class dv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Wf,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 Wf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new q,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new q),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Wf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new q,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new q),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 g of e.hand.values()){const m=n.getJointPose(g,i),p=this._getHandJoint(c,g);m!==null&&(p.matrix.fromArray(m.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=m.radius),p.visible=m!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],f=u.position.distanceTo(d.position),h=.02,v=.005;c.inputState.pinching&&f>h+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&f<=h-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(AY)))}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 Wf;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}class RY extends xi{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new bs,this.environmentIntensity=1,this.environmentRotation=new bs,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,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const 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.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class PY extends Nn{constructor(e=null,n=1,i=1,r,s,o,a,l,c=yi,u=yi,d,f){super(null,o,a,l,c,u,r,s,d,f),this.isDataTexture=!0,this.image={data:e,width:n,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const fv=new q,DY=new q,LY=new Je;class Wo{constructor(e=new q(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=fv.subVectors(i,n).cross(DY.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(fv),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;
vendor: 14,160 bytes, lines 365-369
365const 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||LY.getNormalMatrix(e),r=this.coplanarPoint(fv).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 zo=new Ew,NY=new wt(.5,.5),$f=new q;class XL{constructor(e=new Wo,n=new Wo,i=new Wo,r=new Wo,s=new Wo,o=new Wo){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=Lr,i=!1){const r=this.planes,s=e.elements,o=s[0],a=s[1],l=s[2],c=s[3],u=s[4],d=s[5],f=s[6],h=s[7],v=s[8],g=s[9],m=s[10],p=s[11],y=s[12],x=s[13],w=s[14],S=s[15];if(r[0].setComponents(c-o,h-u,p-v,S-y).normalize(),r[1].setComponents(c+o,h+u,p+v,S+y).normalize(),r[2].setComponents(c+a,h+d,p+g,S+x).normalize(),r[3].setComponents(c-a,h-d,p-g,S-x).normalize(),i)r[4].setComponents(l,f,m,w).normalize(),r[5].setComponents(c-l,h-f,p-m,S-w).normalize();else if(r[4].setComponents(c-l,h-f,p-m,S-w).normalize(),n===Lr)r[5].setComponents(c+l,h+f,p+m,S+w).normalize();else if(n===Sp)r[5].setComponents(l,f,m,w).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(),zo.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),zo.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(zo)}intersectsSprite(e){zo.center.set(0,0,0);const n=NY.distanceTo(e.center);return zo.radius=.7071067811865476+n,zo.applyMatrix4(e.matrixWorld),this.intersectsSphere(zo)}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($f.x=r.normal.x>0?e.max.x:e.min.x,$f.y=r.normal.y>0?e.max.y:e.min.y,$f.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint($f)<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)}}class qL extends Nn{constructor(e,n,i=Pa,r,s,o,a=yi,l=yi,c,u=dd,d=1){if(u!==dd&&u!==fd)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const f={width:e,height:n,depth:d};super(f,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Sw(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class YL extends Nn{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class Fd extends Fa{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,d=e/a,f=n/l,h=[],v=[],g=[],m=[];for(let p=0;p<u;p++){const y=p*f-o;for(let x=0;x<c;x++){const w=x*d-s;v.push(w,-y,0),g.push(0,0,1),m.push(x/a),m.push(1-p/l)}}for(let p=0;p<l;p++)for(let y=0;y<a;y++){const x=y+c*p,w=y+c*(p+1),S=y+1+c*(p+1),T=y+1+c*p;h.push(x,w,T),h.push(w,S,T)}this.setIndex(h),this.setAttribute("position",new ya(v,3)),this.setAttribute("normal",new ya(g,3)),this.setAttribute("uv",new ya(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Fd(e.width,e.height,e.widthSegments,e.heightSegments)}}class IY extends fm{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Gq,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 kY extends fm{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 hv={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 OY{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.abortController=new AbortController,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,d){return c.push(u,d),this},this.removeHandler=function(u){const d=c.indexOf(u);return d!==-1&&c.splice(d,2),this},this.getHandler=function(u){for(let d=0,f=c.length;d<f;d+=2){const h=c[d],v=c[d+1];if(h.global&&(h.lastIndex=0),h.test(u))return v}return null},this.abort=function(){return this.abortController.abort(),this.abortController=new AbortController,this}}}const FY=new OY;class Mw{constructor(e){this.manager=e!==void 0?e:FY,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}abort(){return this}}Mw.DEFAULT_MATERIAL_NAME="__DEFAULT";const sl=new WeakMap;class UY extends Mw{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=hv.get(`image:${e}`);if(o!==void 0){if(o.complete===!0)s.manager.itemStart(e),setTimeout(function(){n&&n(o),s.manager.itemEnd(e)},0);else{let d=sl.get(o);d===void 0&&(d=[],sl.set(o,d)),d.push({onLoad:n,onError:r})}return o}const a=hd("img");function l(){u(),n&&n(this);const d=sl.get(this)||[];for(let f=0;f<d.length;f++){const h=d[f];h.onLoad&&h.onLoad(this)}sl.delete(this),s.manager.itemEnd(e)}function c(d){u(),r&&r(d),hv.remove(`image:${e}`);const f=sl.get(this)||[];for(let h=0;h<f.length;h++){const v=f[h];v.onError&&v.onError(d)}sl.delete(this),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),hv.add(`image:${e}`,a),s.manager.itemStart(e),a.src=e,a}}class zY extends Mw{constructor(e){super(e)}load(e,n,i,r){const s=new Nn,o=new UY(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 KL extends WL{constructor(e=-1,n=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=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.reversedDepth),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}}class BY extends sr{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}function DM(t,e,n,i){const r=VY(i);switch(n){case LL:return t*e;case IL:return t*e/r.components*r.byteLength;case _w:return t*e/r.components*r.byteLength;case kL:return t*e*2/r.components*r.byteLength;case ww:return t*e*2/r.components*r.byteLength;case NL:return t*e*3/r.components*r.byteLength;case zi:return t*e*4/r.components*r.byteLength;case bw:return t*e*4/r.components*r.byteLength;case Eh:case Mh:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Th:case Ch:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case T0:case A0:return Math.max(t,16)*Math.max(e,8)/4;case M0:case C0:return Math.max(t,8)*Math.max(e,8)/2;case R0:case P0:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case D0:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case L0:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case N0:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case I0:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case k0:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case O0:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case F0:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case U0:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case z0:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case B0:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case V0:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case H0:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case j0:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case G0:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case W0:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case $0:case X0:case q0:return Math.ceil(t/4)*Math.ceil(e/4)*16;case Y0:case K0:return Math.ceil(t/4)*Math.ceil(e/4)*8;case Z0:case Q0:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function VY(t){switch(t){case ws:case AL:return{byteLength:1,components:1};case cd:case RL:case Ld:return{byteLength:2,components:1};case yw:case xw:return{byteLength:2,components:4};case Pa:case vw:case Dr:return{byteLength:4,components:1};case PL:case DL:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:gw}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=gw);/**
366 * @license
367 * Copyright 2010-2025 Three.js Authors
368 * SPDX-License-Identifier: MIT
369 */function ZL(){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 HY(t){const e=new WeakMap;function n(a,l){const c=a.array,u=a.usage,d=c.byteLength,f=t.createBuffer();t.bindBuffer(l,f),t.bufferData(l,c,u),a.onUploadCallback();let h;if(c instanceof Float32Array)h=t.FLOAT;else if(typeof Float16Array<"u"&&c instanceof Float16Array)h=t.HALF_FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?h=t.HALF_FLOAT:h=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)h=t.SHORT;else if(c instanceof Uint32Array)h=t.UNSIGNED_INT;else if(c instanceof Int32Array)h=t.INT;else if(c instanceof Int8Array)h=t.BYTE;else if(c instanceof Uint8Array)h=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)h=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:f,type:h,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:d}}function i(a,l,c){const u=l.array,d=l.updateRanges;if(t.bindBuffer(c,a),d.length===0)t.bufferSubData(c,0,u);else{d.sort((h,v)=>h.start-v.start);let f=0;for(let h=1;h<d.length;h++){const v=d[f],g=d[h];g.start<=v.start+v.count+1?v.count=Math.max(v.count,g.start+g.count-v.start):(++f,d[f]=g)}
vendor: 5,072 bytes, lines 369-482
369d.length=f+1;for(let h=0,v=d.length;h<v;h++){const g=d[h];t.bufferSubData(c,g.start*u.BYTES_PER_ELEMENT,u,g.start,g.count)}l.clearUpdateRanges()}l.onUploadCallback()}function r(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(t.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const u=e.get(a);(!u||u.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}const c=e.get(a);if(c===void 0)e.set(a,n(a,l));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");i(c.buffer,a,l),c.version=a.version}}return{get:r,remove:s,update:o}}var jY=`#ifdef USE_ALPHAHASH
370	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
371#endif`,GY=`#ifdef USE_ALPHAHASH
372	const float ALPHA_HASH_SCALE = 0.05;
373	float hash2D( vec2 value ) {
374		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
375	}
376	float hash3D( vec3 value ) {
377		return hash2D( vec2( hash2D( value.xy ), value.z ) );
378	}
379	float getAlphaHashThreshold( vec3 position ) {
380		float maxDeriv = max(
381			length( dFdx( position.xyz ) ),
382			length( dFdy( position.xyz ) )
383		);
384		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
385		vec2 pixScales = vec2(
386			exp2( floor( log2( pixScale ) ) ),
387			exp2( ceil( log2( pixScale ) ) )
388		);
389		vec2 alpha = vec2(
390			hash3D( floor( pixScales.x * position.xyz ) ),
391			hash3D( floor( pixScales.y * position.xyz ) )
392		);
393		float lerpFactor = fract( log2( pixScale ) );
394		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
395		float a = min( lerpFactor, 1.0 - lerpFactor );
396		vec3 cases = vec3(
397			x * x / ( 2.0 * a * ( 1.0 - a ) ),
398			( x - 0.5 * a ) / ( 1.0 - a ),
399			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
400		);
401		float threshold = ( x < ( 1.0 - a ) )
402			? ( ( x < a ) ? cases.x : cases.y )
403			: cases.z;
404		return clamp( threshold , 1.0e-6, 1.0 );
405	}
406#endif`,WY=`#ifdef USE_ALPHAMAP
407	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
408#endif`,$Y=`#ifdef USE_ALPHAMAP
409	uniform sampler2D alphaMap;
410#endif`,XY=`#ifdef USE_ALPHATEST
411	#ifdef ALPHA_TO_COVERAGE
412	diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
413	if ( diffuseColor.a == 0.0 ) discard;
414	#else
415	if ( diffuseColor.a < alphaTest ) discard;
416	#endif
417#endif`,qY=`#ifdef USE_ALPHATEST
418	uniform float alphaTest;
419#endif`,YY=`#ifdef USE_AOMAP
420	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
421	reflectedLight.indirectDiffuse *= ambientOcclusion;
422	#if defined( USE_CLEARCOAT ) 
423		clearcoatSpecularIndirect *= ambientOcclusion;
424	#endif
425	#if defined( USE_SHEEN ) 
426		sheenSpecularIndirect *= ambientOcclusion;
427	#endif
428	#if defined( USE_ENVMAP ) && defined( STANDARD )
429		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
430		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
431	#endif
432#endif`,KY=`#ifdef USE_AOMAP
433	uniform sampler2D aoMap;
434	uniform float aoMapIntensity;
435#endif`,ZY=`#ifdef USE_BATCHING
436	#if ! defined( GL_ANGLE_multi_draw )
437	#define gl_DrawID _gl_DrawID
438	uniform int _gl_DrawID;
439	#endif
440	uniform highp sampler2D batchingTexture;
441	uniform highp usampler2D batchingIdTexture;
442	mat4 getBatchingMatrix( const in float i ) {
443		int size = textureSize( batchingTexture, 0 ).x;
444		int j = int( i ) * 4;
445		int x = j % size;
446		int y = j / size;
447		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
448		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
449		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
450		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
451		return mat4( v1, v2, v3, v4 );
452	}
453	float getIndirectIndex( const in int i ) {
454		int size = textureSize( batchingIdTexture, 0 ).x;
455		int x = i % size;
456		int y = i / size;
457		return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
458	}
459#endif
460#ifdef USE_BATCHING_COLOR
461	uniform sampler2D batchingColorTexture;
462	vec3 getBatchingColor( const in float i ) {
463		int size = textureSize( batchingColorTexture, 0 ).x;
464		int j = int( i );
465		int x = j % size;
466		int y = j / size;
467		return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
468	}
469#endif`,QY=`#ifdef USE_BATCHING
470	mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
471#endif`,JY=`vec3 transformed = vec3( position );
472#ifdef USE_ALPHAHASH
473	vPosition = vec3( position );
474#endif`,eK=`vec3 objectNormal = vec3( normal );
475#ifdef USE_TANGENT
476	vec3 objectTangent = vec3( tangent.xyz );
477#endif`,tK=`float G_BlinnPhong_Implicit( ) {
478	return 0.25;
479}
480float D_BlinnPhong( const in float shininess, const in float dotNH ) {
481	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
482}
483vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
484	vec3 halfDir = normalize( lightDir + viewDir );
485	float dotNH = saturate( dot( normal, halfDir ) );
486	float dotVH = saturate( dot( viewDir, halfDir ) );
487	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
488	float G = G_BlinnPhong_Implicit( );
489	float D = D_BlinnPhong( shininess, dotNH );
490	return F * ( G * D );
491} // validated`,nK=`#ifdef USE_IRIDESCENCE
492	const mat3 XYZ_TO_REC709 = mat3(
493		 3.2404542, -0.9692660,  0.0556434,
494		-1.5371385,  1.8760108, -0.2040259,
495		-0.4985314,  0.0415560,  1.0572252
496	);
497	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
498		vec3 sqrtF0 = sqrt( fresnel0 );
499		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
500	}
501	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
502		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
503	}
504	float IorToFresnel0( float transmittedIor, float incidentIor ) {
505		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
506	}
507	vec3 evalSensitivity( float OPD, vec3 shift ) {
508		float phase = 2.0 * PI * OPD * 1.0e-9;
509		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
510		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
511		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
512		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
513		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 ) );
514		xyz /= 1.0685e-7;
515		vec3 rgb = XYZ_TO_REC709 * xyz;
516		return rgb;
517	}
518	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
519		vec3 I;
520		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
521		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
522		float cosTheta2Sq = 1.0 - sinTheta2Sq;
523		if ( cosTheta2Sq < 0.0 ) {
524			return vec3( 1.0 );
525		}
526		float cosTheta2 = sqrt( cosTheta2Sq );
527		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
528		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
529		float T121 = 1.0 - R12;
530		float phi12 = 0.0;
531		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
532		float phi21 = PI - phi12;
533		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
534		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
535		vec3 phi23 = vec3( 0.0 );
536		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
537		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
538		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
539		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
540		vec3 phi = vec3( phi21 ) + phi23;
541		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
542		vec3 r123 = sqrt( R123 );
543		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
544		vec3 C0 = R12 + Rs;
545		I = C0;
546		vec3 Cm = Rs - T121;
547		for ( int m = 1; m <= 2; ++ m ) {
548			Cm *= r123;
549			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
550			I += Cm * Sm;
551		}
552		return max( I, vec3( 0.0 ) );
553	}
554#endif`,iK=`#ifdef USE_BUMPMAP
555	uniform sampler2D bumpMap;
556	uniform float bumpScale;
557	vec2 dHdxy_fwd() {
558		vec2 dSTdx = dFdx( vBumpMapUv );
559		vec2 dSTdy = dFdy( vBumpMapUv );
560		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
561		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
562		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
563		return vec2( dBx, dBy );
564	}
565	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
566		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
567		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
568		vec3 vN = surf_norm;
569		vec3 R1 = cross( vSigmaY, vN );
570		vec3 R2 = cross( vN, vSigmaX );
571		float fDet = dot( vSigmaX, R1 ) * faceDirection;
572		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
573		return normalize( abs( fDet ) * surf_norm - vGrad );
574	}
575#endif`,rK=`#if NUM_CLIPPING_PLANES > 0
576	vec4 plane;
577	#ifdef ALPHA_TO_COVERAGE
578		float distanceToPlane, distanceGradient;
579		float clipOpacity = 1.0;
580		#pragma unroll_loop_start
581		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
582			plane = clippingPlanes[ i ];
583			distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
584			distanceGradient = fwidth( distanceToPlane ) / 2.0;
585			clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
586			if ( clipOpacity == 0.0 ) discard;
587		}
588		#pragma unroll_loop_end
589		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
590			float unionClipOpacity = 1.0;
591			#pragma unroll_loop_start
592			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
593				plane = clippingPlanes[ i ];
594				distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
595				distanceGradient = fwidth( distanceToPlane ) / 2.0;
596				unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
597			}
598			#pragma unroll_loop_end
599			clipOpacity *= 1.0 - unionClipOpacity;
600		#endif
601		diffuseColor.a *= clipOpacity;
602		if ( diffuseColor.a == 0.0 ) discard;
603	#else
604		#pragma unroll_loop_start
605		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
606			plane = clippingPlanes[ i ];
607			if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
608		}
609		#pragma unroll_loop_end
610		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
611			bool clipped = true;
612			#pragma unroll_loop_start
613			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
614				plane = clippingPlanes[ i ];
615				clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
616			}
617			#pragma unroll_loop_end
618			if ( clipped ) discard;
619		#endif
620	#endif
621#endif`,sK=`#if NUM_CLIPPING_PLANES > 0
622	varying vec3 vClipPosition;
623	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
624#endif`,oK=`#if NUM_CLIPPING_PLANES > 0
625	varying vec3 vClipPosition;
626#endif`,aK=`#if NUM_CLIPPING_PLANES > 0
627	vClipPosition = - mvPosition.xyz;
628#endif`,lK=`#if defined( USE_COLOR_ALPHA )
629	diffuseColor *= vColor;
630#elif defined( USE_COLOR )
631	diffuseColor.rgb *= vColor;
632#endif`,cK=`#if defined( USE_COLOR_ALPHA )
633	varying vec4 vColor;
634#elif defined( USE_COLOR )
635	varying vec3 vColor;
636#endif`,uK=`#if defined( USE_COLOR_ALPHA )
637	varying vec4 vColor;
638#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
639	varying vec3 vColor;
640#endif`,dK=`#if defined( USE_COLOR_ALPHA )
641	vColor = vec4( 1.0 );
642#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
643	vColor = vec3( 1.0 );
644#endif
645#ifdef USE_COLOR
646	vColor *= color;
647#endif
648#ifdef USE_INSTANCING_COLOR
649	vColor.xyz *= instanceColor.xyz;
650#endif
651#ifdef USE_BATCHING_COLOR
652	vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
653	vColor.xyz *= batchingColor.xyz;
654#endif`,fK=`#define PI 3.141592653589793
655#define PI2 6.283185307179586
656#define PI_HALF 1.5707963267948966
657#define RECIPROCAL_PI 0.3183098861837907
658#define RECIPROCAL_PI2 0.15915494309189535
659#define EPSILON 1e-6
660#ifndef saturate
661#define saturate( a ) clamp( a, 0.0, 1.0 )
662#endif
663#define whiteComplement( a ) ( 1.0 - saturate( a ) )
664float pow2( const in float x ) { return x*x; }
665vec3 pow2( const in vec3 x ) { return x*x; }
666float pow3( const in float x ) { return x*x*x; }
667float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
668float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
669float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
670highp float rand( const in vec2 uv ) {
671	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
672	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
673	return fract( sin( sn ) * c );
674}
675#ifdef HIGH_PRECISION
676	float precisionSafeLength( vec3 v ) { return length( v ); }
677#else
678	float precisionSafeLength( vec3 v ) {
679		float maxComponent = max3( abs( v ) );
680		return length( v / maxComponent ) * maxComponent;
681	}
682#endif
683struct IncidentLight {
684	vec3 color;
685	vec3 direction;
686	bool visible;
687};
688struct ReflectedLight {
689	vec3 directDiffuse;
690	vec3 directSpecular;
691	vec3 indirectDiffuse;
692	vec3 indirectSpecular;
693};
694#ifdef USE_ALPHAHASH
695	varying vec3 vPosition;
696#endif
697vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
698	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
699}
700vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
701	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
702}
703mat3 transposeMat3( const in mat3 m ) {
704	mat3 tmp;
705	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
706	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
707	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
708	return tmp;
709}
710bool isPerspectiveMatrix( mat4 m ) {
711	return m[ 2 ][ 3 ] == - 1.0;
712}
713vec2 equirectUv( in vec3 dir ) {
714	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
715	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
716	return vec2( u, v );
717}
718vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
719	return RECIPROCAL_PI * diffuseColor;
720}
721vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
722	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
723	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
724}
725float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
726	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
727	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
728} // validated`,hK=`#ifdef ENVMAP_TYPE_CUBE_UV
729	#define cubeUV_minMipLevel 4.0
730	#define cubeUV_minTileSize 16.0
731	float getFace( vec3 direction ) {
732		vec3 absDirection = abs( direction );
733		float face = - 1.0;
734		if ( absDirection.x > absDirection.z ) {
735			if ( absDirection.x > absDirection.y )
736				face = direction.x > 0.0 ? 0.0 : 3.0;
737			else
738				face = direction.y > 0.0 ? 1.0 : 4.0;
739		} else {
740			if ( absDirection.z > absDirection.y )
741				face = direction.z > 0.0 ? 2.0 : 5.0;
742			else
743				face = direction.y > 0.0 ? 1.0 : 4.0;
744		}
745		return face;
746	}
747	vec2 getUV( vec3 direction, float face ) {
748		vec2 uv;
749		if ( face == 0.0 ) {
750			uv = vec2( direction.z, direction.y ) / abs( direction.x );
751		} else if ( face == 1.0 ) {
752			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
753		} else if ( face == 2.0 ) {
754			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
755		} else if ( face == 3.0 ) {
756			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
757		} else if ( face == 4.0 ) {
758			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
759		} else {
760			uv = vec2( direction.x, direction.y ) / abs( direction.z );
761		}
762		return 0.5 * ( uv + 1.0 );
763	}
764	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
765		float face = getFace( direction );
766		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
767		mipInt = max( mipInt, cubeUV_minMipLevel );
768		float faceSize = exp2( mipInt );
769		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
770		if ( face > 2.0 ) {
771			uv.y += faceSize;
772			face -= 3.0;
773		}
774		uv.x += face * faceSize;
775		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
776		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
777		uv.x *= CUBEUV_TEXEL_WIDTH;
778		uv.y *= CUBEUV_TEXEL_HEIGHT;
779		#ifdef texture2DGradEXT
780			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
781		#else
782			return texture2D( envMap, uv ).rgb;
783		#endif
784	}
785	#define cubeUV_r0 1.0
786	#define cubeUV_m0 - 2.0
787	#define cubeUV_r1 0.8
788	#define cubeUV_m1 - 1.0
789	#define cubeUV_r4 0.4
790	#define cubeUV_m4 2.0
791	#define cubeUV_r5 0.305
792	#define cubeUV_m5 3.0
793	#define cubeUV_r6 0.21
794	#define cubeUV_m6 4.0
795	float roughnessToMip( float roughness ) {
796		float mip = 0.0;
797		if ( roughness >= cubeUV_r1 ) {
798			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
799		} else if ( roughness >= cubeUV_r4 ) {
800			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
801		} else if ( roughness >= cubeUV_r5 ) {
802			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
803		} else if ( roughness >= cubeUV_r6 ) {
804			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
805		} else {
806			mip = - 2.0 * log2( 1.16 * roughness );		}
807		return mip;
808	}
809	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
810		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
811		float mipF = fract( mip );
812		float mipInt = floor( mip );
813		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
814		if ( mipF == 0.0 ) {
815			return vec4( color0, 1.0 );
816		} else {
817			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
818			return vec4( mix( color0, color1, mipF ), 1.0 );
819		}
820	}
821#endif`,pK=`vec3 transformedNormal = objectNormal;
822#ifdef USE_TANGENT
823	vec3 transformedTangent = objectTangent;
824#endif
825#ifdef USE_BATCHING
826	mat3 bm = mat3( batchingMatrix );
827	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
828	transformedNormal = bm * transformedNormal;
829	#ifdef USE_TANGENT
830		transformedTangent = bm * transformedTangent;
831	#endif
832#endif
833#ifdef USE_INSTANCING
834	mat3 im = mat3( instanceMatrix );
835	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
836	transformedNormal = im * transformedNormal;
837	#ifdef USE_TANGENT
838		transformedTangent = im * transformedTangent;
839	#endif
840#endif
841transformedNormal = normalMatrix * transformedNormal;
842#ifdef FLIP_SIDED
843	transformedNormal = - transformedNormal;
844#endif
845#ifdef USE_TANGENT
846	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
847	#ifdef FLIP_SIDED
848		transformedTangent = - transformedTangent;
849	#endif
850#endif`,mK=`#ifdef USE_DISPLACEMENTMAP
851	uniform sampler2D displacementMap;
852	uniform float displacementScale;
853	uniform float displacementBias;
854#endif`,gK=`#ifdef USE_DISPLACEMENTMAP
855	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
855placementBias );
856#endif`,vK=`#ifdef USE_EMISSIVEMAP
857	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
858	#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
859		emissiveColor = sRGBTransferEOTF( emissiveColor );
860	#endif
861	totalEmissiveRadiance *= emissiveColor.rgb;
862#endif`,yK=`#ifdef USE_EMISSIVEMAP
863	uniform sampler2D emissiveMap;
864#endif`,xK="gl_FragColor = linearToOutputTexel( gl_FragColor );",_K=`vec4 LinearTransferOETF( in vec4 value ) {
865	return value;
866}
867vec4 sRGBTransferEOTF( in vec4 value ) {
868	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 );
869}
870vec4 sRGBTransferOETF( in vec4 value ) {
871	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 );
872}`,wK=`#ifdef USE_ENVMAP
873	#ifdef ENV_WORLDPOS
874		vec3 cameraToFrag;
875		if ( isOrthographic ) {
876			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
877		} else {
878			cameraToFrag = normalize( vWorldPosition - cameraPosition );
879		}
880		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
881		#ifdef ENVMAP_MODE_REFLECTION
882			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
883		#else
884			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
885		#endif
886	#else
887		vec3 reflectVec = vReflect;
888	#endif
889	#ifdef ENVMAP_TYPE_CUBE
890		vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
891	#else
892		vec4 envColor = vec4( 0.0 );
893	#endif
894	#ifdef ENVMAP_BLENDING_MULTIPLY
895		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
896	#elif defined( ENVMAP_BLENDING_MIX )
897		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
898	#elif defined( ENVMAP_BLENDING_ADD )
899		outgoingLight += envColor.xyz * specularStrength * reflectivity;
900	#endif
901#endif`,bK=`#ifdef USE_ENVMAP
902	uniform float envMapIntensity;
903	uniform float flipEnvMap;
904	uniform mat3 envMapRotation;
905	#ifdef ENVMAP_TYPE_CUBE
906		uniform samplerCube envMap;
907	#else
908		uniform sampler2D envMap;
909	#endif
910	
911#endif`,SK=`#ifdef USE_ENVMAP
912	uniform float reflectivity;
913	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
914		#define ENV_WORLDPOS
915	#endif
916	#ifdef ENV_WORLDPOS
917		varying vec3 vWorldPosition;
918		uniform float refractionRatio;
919	#else
920		varying vec3 vReflect;
921	#endif
922#endif`,EK=`#ifdef USE_ENVMAP
923	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
924		#define ENV_WORLDPOS
925	#endif
926	#ifdef ENV_WORLDPOS
927		
928		varying vec3 vWorldPosition;
929	#else
930		varying vec3 vReflect;
931		uniform float refractionRatio;
932	#endif
933#endif`,MK=`#ifdef USE_ENVMAP
934	#ifdef ENV_WORLDPOS
935		vWorldPosition = worldPosition.xyz;
936	#else
937		vec3 cameraToVertex;
938		if ( isOrthographic ) {
939			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
940		} else {
941			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
942		}
943		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
944		#ifdef ENVMAP_MODE_REFLECTION
945			vReflect = reflect( cameraToVertex, worldNormal );
946		#else
947			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
948		#endif
949	#endif
950#endif`,TK=`#ifdef USE_FOG
951	vFogDepth = - mvPosition.z;
952#endif`,CK=`#ifdef USE_FOG
953	varying float vFogDepth;
954#endif`,AK=`#ifdef USE_FOG
955	#ifdef FOG_EXP2
956		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
957	#else
958		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
959	#endif
960	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
961#endif`,RK=`#ifdef USE_FOG
962	uniform vec3 fogColor;
963	varying float vFogDepth;
964	#ifdef FOG_EXP2
965		uniform float fogDensity;
966	#else
967		uniform float fogNear;
968		uniform float fogFar;
969	#endif
970#endif`,PK=`#ifdef USE_GRADIENTMAP
971	uniform sampler2D gradientMap;
972#endif
973vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
974	float dotNL = dot( normal, lightDirection );
975	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
976	#ifdef USE_GRADIENTMAP
977		return vec3( texture2D( gradientMap, coord ).r );
978	#else
979		vec2 fw = fwidth( coord ) * 0.5;
980		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
981	#endif
982}`,DK=`#ifdef USE_LIGHTMAP
983	uniform sampler2D lightMap;
984	uniform float lightMapIntensity;
985#endif`,LK=`LambertMaterial material;
986material.diffuseColor = diffuseColor.rgb;
987material.specularStrength = specularStrength;`,NK=`varying vec3 vViewPosition;
988struct LambertMaterial {
989	vec3 diffuseColor;
990	float specularStrength;
991};
992void 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 ) {
993	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
994	vec3 irradiance = dotNL * directLight.color;
995	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
996}
997void 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 ) {
998	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
999}
1000#define RE_Direct				RE_Direct_Lambert
1001#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,IK=`uniform bool receiveShadow;
1002uniform vec3 ambientLightColor;
1003#if defined( USE_LIGHT_PROBES )
1004	uniform vec3 lightProbe[ 9 ];
1005#endif
1006vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
1007	float x = normal.x, y = normal.y, z = normal.z;
1008	vec3 result = shCoefficients[ 0 ] * 0.886227;
1009	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
1010	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
1011	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
1012	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
1013	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
1014	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
1015	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
1016	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
1017	return result;
1018}
1019vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
1020	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
1021	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
1022	return irradiance;
1023}
1024vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
1025	vec3 irradiance = ambientLightColor;
1026	return irradiance;
1027}
1028float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
1029	float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
1030	if ( cutoffDistance > 0.0 ) {
1031		distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
1032	}
1033	return distanceFalloff;
1034}
1035float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
1036	return smoothstep( coneCosine, penumbraCosine, angleCosine );
1037}
1038#if NUM_DIR_LIGHTS > 0
1039	struct DirectionalLight {
1040		vec3 direction;
1041		vec3 color;
1042	};
1043	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
1044	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
1045		light.color = directionalLight.color;
1046		light.direction = directionalLight.direction;
1047		light.visible = true;
1048	}
1049#endif
1050#if NUM_POINT_LIGHTS > 0
1051	struct PointLight {
1052		vec3 position;
1053		vec3 color;
1054		float distance;
1055		float decay;
1056	};
1057	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
1058	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
1059		vec3 lVector = pointLight.position - geometryPosition;
1060		light.direction = normalize( lVector );
1061		float lightDistance = length( lVector );
1062		light.color = pointLight.color;
1063		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
1064		light.visible = ( light.color != vec3( 0.0 ) );
1065	}
1066#endif
1067#if NUM_SPOT_LIGHTS > 0
1068	struct SpotLight {
1069		vec3 position;
1070		vec3 direction;
1071		vec3 color;
1072		float distance;
1073		float decay;
1074		float coneCos;
1075		float penumbraCos;
1076	};
1077	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
1078	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
1079		vec3 lVector = spotLight.position - geometryPosition;
1080		light.direction = normalize( lVector );
1081		float angleCos = dot( light.direction, spotLight.direction );
1082		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
1083		if ( spotAttenuation > 0.0 ) {
1084			float lightDistance = length( lVector );
1085			light.color = spotLight.color * spotAttenuation;
1086			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
1087			light.visible = ( light.color != vec3( 0.0 ) );
1088		} else {
1089			light.color = vec3( 0.0 );
1090			light.visible = false;
1091		}
1092	}
1093#endif
1094#if NUM_RECT_AREA_LIGHTS > 0
1095	struct RectAreaLight {
1096		vec3 color;
1097		vec3 position;
1098		vec3 halfWidth;
1099		vec3 halfHeight;
1100	};
1101	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
1102	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
1103#endif
1104#if NUM_HEMI_LIGHTS > 0
1105	struct HemisphereLight {
1106		vec3 direction;
1107		vec3 skyColor;
1108		vec3 groundColor;
1109	};
1110	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
1111	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
1112		float dotNL = dot( normal, hemiLight.direction );
1113		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
1114		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
1115		return irradiance;
1116	}
1117#endif`,kK=`#ifdef USE_ENVMAP
1118	vec3 getIBLIrradiance( const in vec3 normal ) {
1119		#ifdef ENVMAP_TYPE_CUBE_UV
1120			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
1121			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
1122			return PI * envMapColor.rgb * envMapIntensity;
1123		#else
1124			return vec3( 0.0 );
1125		#endif
1126	}
1127	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
1128		#ifdef ENVMAP_TYPE_CUBE_UV
1129			vec3 reflectVec = reflect( - viewDir, normal );
1130			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
1131			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
1132			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
1133			return envMapColor.rgb * envMapIntensity;
1134		#else
1135			return vec3( 0.0 );
1136		#endif
1137	}
1138	#ifdef USE_ANISOTROPY
1139		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
1140			#ifdef ENVMAP_TYPE_CUBE_UV
1141				vec3 bentNormal = cross( bitangent, viewDir );
1142				bentNormal = normalize( cross( bentNormal, bitangent ) );
1143				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
1144				return getIBLRadiance( viewDir, bentNormal, roughness );
1145			#else
1146				return vec3( 0.0 );
1147			#endif
1148		}
1149	#endif
1150#endif`,OK=`ToonMaterial material;
1151material.diffuseColor = diffuseColor.rgb;`,FK=`varying vec3 vViewPosition;
1152struct ToonMaterial {
1153	vec3 diffuseColor;
1154};
1155void 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 ) {
1156	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
1157	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1158}
1159void 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 ) {
1160	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1161}
1162#define RE_Direct				RE_Direct_Toon
1163#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,UK=`BlinnPhongMaterial material;
1164material.diffuseColor = diffuseColor.rgb;
1165material.specularColor = specular;
1166material.specularShininess = shininess;
1167material.specularStrength = specularStrength;`,zK=`varying vec3 vViewPosition;
1168struct BlinnPhongMaterial {
1169	vec3 diffuseColor;
1170	vec3 specularColor;
1171	float specularShininess;
1172	float specularStrength;
1173};
1174void 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 ) {
1175	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
1176	vec3 irradiance = dotNL * directLight.color;
1177	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1178	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
1179}
1180void 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 ) {
1181	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1182}
1183#define RE_Direct				RE_Direct_BlinnPhong
1184#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,BK=`PhysicalMaterial material;
1185material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
1186vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
1187float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
1188material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
1189material.roughness = min( material.roughness, 1.0 );
1190#ifdef IOR
1191	material.ior = ior;
1192	#ifdef USE_SPECULAR
1193		float specularIntensityFactor = specularIntensity;
1194		vec3 specularColorFactor = specularColor;
1195		#ifdef USE_SPECULAR_COLORMAP
1196			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
1197		#endif
1198		#ifdef USE_SPECULAR_INTENSITYMAP
1199			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
1200		#endif
1201		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
1202	#else
1203		float specularIntensityFactor = 1.0;
1204		vec3 specularColorFactor = vec3( 1.0 );
1205		material.specularF90 = 1.0;
1206	#endif
1207	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
1208#else
1209	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
1210	material.specularF90 = 1.0;
1211#endif
1212#ifdef USE_CLEARCOAT
1213	material.clearcoat = clearcoat;
1214	material.clearcoatRoughness = clearcoatRoughness;
1215	material.clearcoatF0 = vec3( 0.04 );
1216	material.clearcoatF90 = 1.0;
1217	#ifdef USE_CLEARCOATMAP
1218		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
1219	#endif
1220	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
1221		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
1222	#endif
1223	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
1224	material.clearcoatRoughness += geometryRoughness;
1225	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
1226#endif
1227#ifdef USE_DISPERSION
1228	material.dispersion = dispersion;
1229#endif
1230#ifdef USE_IRIDESCENCE
1231	material.iridescence = iridescence;
1232	material.iridescenceIOR = iridescenceIOR;
1233	#ifdef USE_IRIDESCENCEMAP
1234		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
1235	#endif
1236	#ifdef USE_IRIDESCENCE_THICKNESSMAP
1237		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
1238	#else
1239		material.iridescenceThickness = iridescenceThicknessMaximum;
1240	#endif
1241#endif
1242#ifdef USE_SHEEN
1243	material.sheenColor = sheenColor;
1244	#ifdef USE_SHEEN_COLORMAP
1245		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
1246	#endif
1247	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
1248	#ifdef USE_SHEEN_ROUGHNESSMAP
1249		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
1250	#endif
1251#endif
1252#ifdef USE_ANISOTROPY
1253	#ifdef USE_ANISOTROPYMAP
1254		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
1255		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
1256		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
1257	#else
1258		vec2 anisotropyV = anisotropyVector;
1259	#endif
1260	material.anisotropy = length( anisotropyV );
1261	if( material.anisotropy == 0.0 ) {
1262		anisotropyV = vec2( 1.0, 0.0 );
1263	} else {
1264		anisotropyV /= material.anisotropy;
1265		material.anisotropy = saturate( material.anisotropy );
1266	}
1267	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
1268	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
1269	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
1270#endif`,VK
vendor: 14,687 bytes, lines 1270-1571
1270=`struct PhysicalMaterial {
1271	vec3 diffuseColor;
1272	float roughness;
1273	vec3 specularColor;
1274	float specularF90;
1275	float dispersion;
1276	#ifdef USE_CLEARCOAT
1277		float clearcoat;
1278		float clearcoatRoughness;
1279		vec3 clearcoatF0;
1280		float clearcoatF90;
1281	#endif
1282	#ifdef USE_IRIDESCENCE
1283		float iridescence;
1284		float iridescenceIOR;
1285		float iridescenceThickness;
1286		vec3 iridescenceFresnel;
1287		vec3 iridescenceF0;
1288	#endif
1289	#ifdef USE_SHEEN
1290		vec3 sheenColor;
1291		float sheenRoughness;
1292	#endif
1293	#ifdef IOR
1294		float ior;
1295	#endif
1296	#ifdef USE_TRANSMISSION
1297		float transmission;
1298		float transmissionAlpha;
1299		float thickness;
1300		float attenuationDistance;
1301		vec3 attenuationColor;
1302	#endif
1303	#ifdef USE_ANISOTROPY
1304		float anisotropy;
1305		float alphaT;
1306		vec3 anisotropyT;
1307		vec3 anisotropyB;
1308	#endif
1309};
1310vec3 clearcoatSpecularDirect = vec3( 0.0 );
1311vec3 clearcoatSpecularIndirect = vec3( 0.0 );
1312vec3 sheenSpecularDirect = vec3( 0.0 );
1313vec3 sheenSpecularIndirect = vec3(0.0 );
1314vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
1315    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
1316    float x2 = x * x;
1317    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
1318    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
1319}
1320float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
1321	float a2 = pow2( alpha );
1322	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
1323	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
1324	return 0.5 / max( gv + gl, EPSILON );
1325}
1326float D_GGX( const in float alpha, const in float dotNH ) {
1327	float a2 = pow2( alpha );
1328	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
1329	return RECIPROCAL_PI * a2 / pow2( denom );
1330}
1331#ifdef USE_ANISOTROPY
1332	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 ) {
1333		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
1334		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
1335		float v = 0.5 / ( gv + gl );
1336		return saturate(v);
1337	}
1338	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
1339		float a2 = alphaT * alphaB;
1340		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
1341		highp float v2 = dot( v, v );
1342		float w2 = a2 / v2;
1343		return RECIPROCAL_PI * a2 * pow2 ( w2 );
1344	}
1345#endif
1346#ifdef USE_CLEARCOAT
1347	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
1348		vec3 f0 = material.clearcoatF0;
1349		float f90 = material.clearcoatF90;
1350		float roughness = material.clearcoatRoughness;
1351		float alpha = pow2( roughness );
1352		vec3 halfDir = normalize( lightDir + viewDir );
1353		float dotNL = saturate( dot( normal, lightDir ) );
1354		float dotNV = saturate( dot( normal, viewDir ) );
1355		float dotNH = saturate( dot( normal, halfDir ) );
1356		float dotVH = saturate( dot( viewDir, halfDir ) );
1357		vec3 F = F_Schlick( f0, f90, dotVH );
1358		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1359		float D = D_GGX( alpha, dotNH );
1360		return F * ( V * D );
1361	}
1362#endif
1363vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
1364	vec3 f0 = material.specularColor;
1365	float f90 = material.specularF90;
1366	float roughness = material.roughness;
1367	float alpha = pow2( roughness );
1368	vec3 halfDir = normalize( lightDir + viewDir );
1369	float dotNL = saturate( dot( normal, lightDir ) );
1370	float dotNV = saturate( dot( normal, viewDir ) );
1371	float dotNH = saturate( dot( normal, halfDir ) );
1372	float dotVH = saturate( dot( viewDir, halfDir ) );
1373	vec3 F = F_Schlick( f0, f90, dotVH );
1374	#ifdef USE_IRIDESCENCE
1375		F = mix( F, material.iridescenceFresnel, material.iridescence );
1376	#endif
1377	#ifdef USE_ANISOTROPY
1378		float dotTL = dot( material.anisotropyT, lightDir );
1379		float dotTV = dot( material.anisotropyT, viewDir );
1380		float dotTH = dot( material.anisotropyT, halfDir );
1381		float dotBL = dot( material.anisotropyB, lightDir );
1382		float dotBV = dot( material.anisotropyB, viewDir );
1383		float dotBH = dot( material.anisotropyB, halfDir );
1384		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
1385		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
1386	#else
1387		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1388		float D = D_GGX( alpha, dotNH );
1389	#endif
1390	return F * ( V * D );
1391}
1392vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
1393	const float LUT_SIZE = 64.0;
1394	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
1395	const float LUT_BIAS = 0.5 / LUT_SIZE;
1396	float dotNV = saturate( dot( N, V ) );
1397	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
1398	uv = uv * LUT_SCALE + LUT_BIAS;
1399	return uv;
1400}
1401float LTC_ClippedSphereFormFactor( const in vec3 f ) {
1402	float l = length( f );
1403	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
1404}
1405vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
1406	float x = dot( v1, v2 );
1407	float y = abs( x );
1408	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
1409	float b = 3.4175940 + ( 4.1616724 + y ) * y;
1410	float v = a / b;
1411	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
1412	return cross( v1, v2 ) * theta_sintheta;
1413}
1414vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
1415	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
1416	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
1417	vec3 lightNormal = cross( v1, v2 );
1418	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
1419	vec3 T1, T2;
1420	T1 = normalize( V - N * dot( V, N ) );
1421	T2 = - cross( N, T1 );
1422	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
1423	vec3 coords[ 4 ];
1424	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
1425	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
1426	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
1427	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
1428	coords[ 0 ] = normalize( coords[ 0 ] );
1429	coords[ 1 ] = normalize( coords[ 1 ] );
1430	coords[ 2 ] = normalize( coords[ 2 ] );
1431	coords[ 3 ] = normalize( coords[ 3 ] );
1432	vec3 vectorFormFactor = vec3( 0.0 );
1433	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
1434	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
1435	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
1436	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
1437	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
1438	return vec3( result );
1439}
1440#if defined( USE_SHEEN )
1441float D_Charlie( float roughness, float dotNH ) {
1442	float alpha = pow2( roughness );
1443	float invAlpha = 1.0 / alpha;
1444	float cos2h = dotNH * dotNH;
1445	float sin2h = max( 1.0 - cos2h, 0.0078125 );
1446	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
1447}
1448float V_Neubelt( float dotNV, float dotNL ) {
1449	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
1450}
1451vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
1452	vec3 halfDir = normalize( lightDir + viewDir );
1453	float dotNL = saturate( dot( normal, lightDir ) );
1454	float dotNV = saturate( dot( normal, viewDir ) );
1455	float dotNH = saturate( dot( normal, halfDir ) );
1456	float D = D_Charlie( sheenRoughness, dotNH );
1457	float V = V_Neubelt( dotNV, dotNL );
1458	return sheenColor * ( D * V );
1459}
1460#endif
1461float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1462	float dotNV = saturate( dot( normal, viewDir ) );
1463	float r2 = roughness * roughness;
1464	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
1465	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
1466	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
1467	return saturate( DG * RECIPROCAL_PI );
1468}
1469vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1470	float dotNV = saturate( dot( normal, viewDir ) );
1471	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
1472	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
1473	vec4 r = roughness * c0 + c1;
1474	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
1475	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
1476	return fab;
1477}
1478vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
1479	vec2 fab = DFGApprox( normal, viewDir, roughness );
1480	return specularColor * fab.x + specularF90 * fab.y;
1481}
1482#ifdef USE_IRIDESCENCE
1483void 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 ) {
1484#else
1485void 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 ) {
1486#endif
1487	vec2 fab = DFGApprox( normal, viewDir, roughness );
1488	#ifdef USE_IRIDESCENCE
1489		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
1490	#else
1491		vec3 Fr = specularColor;
1492	#endif
1493	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
1494	float Ess = fab.x + fab.y;
1495	float Ems = 1.0 - Ess;
1496	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
1497	singleScatter += FssEss;
1498	multiScatter += Fms * Ems;
1499}
1500#if NUM_RECT_AREA_LIGHTS > 0
1501	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 ) {
1502		vec3 normal = geometryNormal;
1503		vec3 viewDir = geometryViewDir;
1504		vec3 position = geometryPosition;
1505		vec3 lightPos = rectAreaLight.position;
1506		vec3 halfWidth = rectAreaLight.halfWidth;
1507		vec3 halfHeight = rectAreaLight.halfHeight;
1508		vec3 lightColor = rectAreaLight.color;
1509		float roughness = material.roughness;
1510		vec3 rectCoords[ 4 ];
1511		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
1512		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
1513		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
1514		vec2 uv = LTC_Uv( normal, viewDir, roughness );
1515		vec4 t1 = texture2D( ltc_1, uv );
1516		vec4 t2 = texture2D( ltc_2, uv );
1517		mat3 mInv = mat3(
1518			vec3( t1.x, 0, t1.y ),
1519			vec3(    0, 1,    0 ),
1520			vec3( t1.z, 0, t1.w )
1521		);
1522		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
1523		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
1524		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
1525	}
1526#endif
1527void 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 ) {
1528	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
1529	vec3 irradiance = dotNL * directLight.color;
1530	#ifdef USE_CLEARCOAT
1531		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
1532		vec3 ccIrradiance = dotNLcc * directLight.color;
1533		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
1534	#endif
1535	#ifdef USE_SHEEN
1536		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
1537	#endif
1538	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
1539	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1540}
1541void 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 ) {
1542	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1543}
1544void 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) {
1545	#ifdef USE_CLEARCOAT
1546		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
1547	#endif
1548	#ifdef USE_SHEEN
1549		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1550	#endif
1551	vec3 singleScattering = vec3( 0.0 );
1552	vec3 multiScattering = vec3( 0.0 );
1553	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
1554	#ifdef USE_IRIDESCENCE
1555		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
1556	#else
1557		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
1558	#endif
1559	vec3 totalScattering = singleScattering + multiScattering;
1560	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
1561	reflectedLight.indirectSpecular += radiance * singleScattering;
1562	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
1563	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
1564}
1565#define RE_Direct				RE_Direct_Physical
1566#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
1567#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
1568#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
1569float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
1570	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
1571}`,
1571HK=`
1572vec3 geometryPosition = - vViewPosition;
1573vec3 geometryNormal = normal;
1574vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
1575vec3 geometryClearcoatNormal = vec3( 0.0 );
1576#ifdef USE_CLEARCOAT
1577	geometryClearcoatNormal = clearcoatNormal;
1578#endif
1579#ifdef USE_IRIDESCENCE
1580	float dotNVi = saturate( dot( normal, geometryViewDir ) );
1581	if ( material.iridescenceThickness == 0.0 ) {
1582		material.iridescence = 0.0;
1583	} else {
1584		material.iridescence = saturate( material.iridescence );
1585	}
1586	if ( material.iridescence > 0.0 ) {
1587		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
1588		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
1589	}
1590#endif
1591IncidentLight directLight;
1592#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
1593	PointLight pointLight;
1594	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
1595	PointLightShadow pointLightShadow;
1596	#endif
1597	#pragma unroll_loop_start
1598	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
1599		pointLight = pointLights[ i ];
1600		getPointLightInfo( pointLight, geometryPosition, directLight );
1601		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
1602		pointLightShadow = pointLightShadows[ i ];
1603		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
1604		#endif
1605		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1606	}
1607	#pragma unroll_loop_end
1608#endif
1609#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
1610	SpotLight spotLight;
1611	vec4 spotColor;
1612	vec3 spotLightCoord;
1613	bool inSpotLightMap;
1614	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
1615	SpotLightShadow spotLightShadow;
1616	#endif
1617	#pragma unroll_loop_start
1618	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
1619		spotLight = spotLights[ i ];
1620		getSpotLightInfo( spotLight, geometryPosition, directLight );
1621		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1622		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
1623		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1624		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
1625		#else
1626		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1627		#endif
1628		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
1629			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
1630			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
1631			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
1632			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
1633		#endif
1634		#undef SPOT_LIGHT_MAP_INDEX
1635		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1636		spotLightShadow = spotLightShadows[ i ];
1637		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
1638		#endif
1639		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1640	}
1641	#pragma unroll_loop_end
1642#endif
1643#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
1644	DirectionalLight directionalLight;
1645	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
1646	DirectionalLightShadow directionalLightShadow;
1647	#endif
1648	#pragma unroll_loop_start
1649	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
1650		directionalLight = directionalLights[ i ];
1651		getDirectionalLightInfo( directionalLight, directLight );
1652		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
1653		directionalLightShadow = directionalLightShadows[ i ];
1654		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
1655		#endif
1656		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1657	}
1658	#pragma unroll_loop_end
1659#endif
1660#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
1661	RectAreaLight rectAreaLight;
1662	#pragma unroll_loop_start
1663	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
1664		rectAreaLight = rectAreaLights[ i ];
1665		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1666	}
1667	#pragma unroll_loop_end
1668#endif
1669#if defined( RE_IndirectDiffuse )
1670	vec3 iblIrradiance = vec3( 0.0 );
1671	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
1672	#if defined( USE_LIGHT_PROBES )
1673		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
1674	#endif
1675	#if ( NUM_HEMI_LIGHTS > 0 )
1676		#pragma unroll_loop_start
1677		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
1678			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
1679		}
1680		#pragma unroll_loop_end
1681	#endif
1682#endif
1683#if defined( RE_IndirectSpecular )
1684	vec3 radiance = vec3( 0.0 );
1685	vec3 clearcoatRadiance = vec3( 0.0 );
1686#endif`,jK=`#if defined( RE_IndirectDiffuse )
1687	#ifdef USE_LIGHTMAP
1688		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
1689		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
1690		irradiance += lightMapIrradiance;
1691	#endif
1692	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
1693		iblIrradiance += getIBLIrradiance( geometryNormal );
1694	#endif
1695#endif
1696#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
1697	#ifdef USE_ANISOTROPY
1698		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
1699	#else
1700		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
1701	#endif
1702	#ifdef USE_CLEARCOAT
1703		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
1704	#endif
1705#endif`,GK=`#if defined( RE_IndirectDiffuse )
1706	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1707#endif
1708#if defined( RE_IndirectSpecular )
1709	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1710#endif`,WK=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
1711	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
1712#endif`,$K=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
1713	uniform float logDepthBufFC;
1714	varying float vFragDepth;
1715	varying float vIsPerspective;
1716#endif`,XK=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
1717	varying float vFragDepth;
1718	varying float vIsPerspective;
1719#endif`,qK=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
1720	vFragDepth = 1.0 + gl_Position.w;
1721	vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
1722#endif`,YK=`#ifdef USE_MAP
1723	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
1724	#ifdef DECODE_VIDEO_TEXTURE
1725		sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
1726	#endif
1727	diffuseColor *= sampledDiffuseColor;
1728#endif`,KK=`#ifdef USE_MAP
1729	uniform sampler2D map;
1730#endif`,ZK=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1731	#if defined( USE_POINTS_UV )
1732		vec2 uv = vUv;
1733	#else
1734		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
1735	#endif
1736#endif
1737#ifdef USE_MAP
1738	diffuseColor *= texture2D( map, uv );
1739#endif
1740#ifdef USE_ALPHAMAP
1741	diffuseColor.a *= texture2D( alphaMap, uv ).g;
1742#endif`,QK=`#if defined( USE_POINTS_UV )
1743	varying vec2 vUv;
1744#else
1745	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1746		uniform mat3 uvTransform;
1747	#endif
1748#endif
1749#ifdef USE_MAP
1750	uniform sampler2D map;
1751#endif
1752#ifdef USE_ALPHAMAP
1753	uniform sampler2D alphaMap;
1754#endif`,JK=`float metalnessFactor = metalness;
1755#ifdef USE_METALNESSMAP
1756	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
1757	metalnessFactor *= texelMetalness.b;
1758#endif`,eZ=`#ifdef USE_METALNESSMAP
1759	uniform sampler2D metalnessMap;
1760#endif`,tZ=`#ifdef USE_INSTANCING_MORPH
1761	float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1762	float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
1763	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1764		morphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
1765	}
1766#endif`,nZ=`#if defined( USE_MORPHCOLORS )
1767	vColor *= morphTargetBaseInfluence;
1768	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1769		#if defined( USE_COLOR_ALPHA )
1770			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
1771		#elif defined( USE_COLOR )
1772			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
1773		#endif
1774	}
1775#endif`,iZ=`#ifdef USE_MORPHNORMALS
1776	objectNormal *= morphTargetBaseInfluence;
1777	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1778		if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
1779	}
1780#endif`,rZ=`#ifdef USE_MORPHTARGETS
1781	#ifndef USE_INSTANCING_MORPH
1782		uniform float morphTargetBaseInfluence;
1783		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1784	#endif
1785	uniform sampler2DArray morphTargetsTexture;
1786	uniform ivec2 morphTargetsTextureSize;
1787	vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
1788		int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
1789		int y = texelIndex / morphTargetsTextureSize.x;
1790		int x = texelIndex - y * morphTargetsTextureSize.x;
1791		ivec3 morphUV = ivec3( x, y, morphTargetIndex );
1792		return texelFetch( morphTargetsTexture, morphUV, 0 );
1793	}
1794#endif`,sZ=`#ifdef USE_MORPHTARGETS
1795	transformed *= morphTargetBaseInfluence;
1796	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1797		if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
1798	}
1799#endif`,oZ=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
1800#ifdef FLAT_SHADED
1801	vec3 fdx = dFdx( vViewPosition );
1802	vec3 fdy = dFdy( vViewPosition );
1803	vec3 normal = normalize( cross( fdx, fdy ) );
1804#else
1805	vec3 normal = normalize( vNormal );
1806	#ifdef DOUBLE_SIDED
1807		normal *= faceDirection;
1808	#endif
1809#endif
1810#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
1811	#ifdef USE_TANGENT
1812		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1813	#else
1814		mat3 tbn = getTangentFrame( - vViewPosition, normal,
1815		#if defined( USE_NORMALMAP )
1816			vNormalMapUv
1817		#elif defined( USE_CLEARCOAT_NORMALMAP )
1818			vClearcoatNormalMapUv
1819		#else
1820			vUv
1821		#endif
1822		);
1823	#endif
1824	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1825		tbn[0] *= faceDirection;
1826		tbn[1] *= faceDirection;
1827	#endif
1828#endif
1829#ifdef USE_CLEARCOAT_NORMALMAP
1830	#ifdef USE_TANGENT
1831		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1832	#else
1833		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
1834	#endif
1835	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1836		tbn2[0] *= faceDirection;
1837		tbn2[1] *= faceDirection;
1838	#endif
1839#endif
1840vec3 nonPerturbedNormal = normal;`,aZ=`#ifdef USE_NORMALMAP_OBJECTSPACE
1841	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1842	#ifdef FLIP_SIDED
1843		normal = - normal;
1844	#endif
1845	#ifdef DOUBLE_SIDED
1846		normal = normal * faceDirection;
1847	#endif
1848	normal = normalize( normalMatrix * normal );
1849#elif defined( USE_NORMALMAP_TANGENTSPACE )
1850	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1851	mapN.xy *= normalScale;
1852	normal = normalize( tbn * mapN );
1853#elif defined( USE_BUMPMAP )
1854	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
1855#endif`,lZ=`#ifndef FLAT_SHADED
1856	varying vec3 vNormal;
1857	#ifdef USE_TANGENT
1858		varying vec3 vTangent;
1859		varying vec3 vBitangent;
1860	#endif
1861#endif`,cZ=`#ifndef FLAT_SHADED
1862	varying vec3 vNormal;
1863	#ifdef USE_TANGENT
1864		varying vec3 vTangent;
1865		varying vec3 vBitangent;
1866	#endif
1867#endif`,uZ=`#ifndef FLAT_SHADED
1868	vNormal = normalize( transformedNormal );
1869	#ifdef USE_TANGENT
1870		vTangent = normalize( transformedTangent );
1871		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
1872	#endif
1873#endif`,dZ=`#ifdef USE_NORMALMAP
1874	uniform sampler2D normalMap;
1875	uniform vec2 normalScale;
1876#endif
1877#ifdef USE_NORMALMAP_OBJECTSPACE
1878	uniform mat3 normalMatrix;
1879#endif
1880#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
1881	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
1882		vec3 q0 = dFdx( eye_pos.xyz );
1883		vec3 q1 = dFdy( eye_pos.xyz );
1884		vec2 st0 = dFdx( uv.st );
1885		vec2 st1 = dFdy( uv.st );
1886		vec3 N = surf_norm;
1887		vec3 q1perp = cross( q1, N );
1888		vec3 q0perp = cross( N, q0 );
1889		vec3 T = q1perp * st0.x + q0perp * st1.x;
1890		vec3 B = q1perp * st0.y + q0perp * st1.y;
1891		float det = max( dot( T, T ), dot( B, B ) );
1892		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
1893		return mat3( T * scale, B * scale, N );
1894	}
1895#endif`,fZ=`#ifdef USE_CLEARCOAT
1896	vec3 clearcoatNormal = nonPerturbedNormal;
1897#endif`,hZ=`#ifdef USE_CLEARCOAT_NORMALMAP
1898	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
1899	clearcoatMapN.xy *= clearcoatNormalScale;
1900	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
1901#endif`,pZ=`#ifdef USE_CLEARCOATMAP
1902	uniform sampler2D clearcoatMap;
1903#endif
1904#ifdef USE_CLEARCOAT_NORMALMAP
1905	uniform sampler2D clearcoatNormalMap;
1906	uniform vec2 clearcoatNormalScale;
1907#endif
1908#ifdef USE_CLEARCOAT_ROUGHNESSMAP
1909	uniform sampler2D clearcoatRoughnessMap;
1910#endif`,mZ=`#ifdef USE_IRIDESCENCEMAP
1911	uniform sampler2D iridescenceMap;
1912#endif
1913#ifdef USE_IRIDESCENCE_THICKNESSMAP
1914	uniform sampler2D iridescenceThicknessMap;
1915#endif`,gZ=`#ifdef OPAQUE
1916diffuseColor.a = 1.0;
1917#endif
1918#ifdef USE_TRANSMISSION
1919diffuseColor.a *= material.transmissionAlpha;
1920#endif
1921gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,vZ=`vec3 packNormalToRGB( const in vec3 normal ) {
1922	return normalize( normal ) * 0.5 + 0.5;
1923}
1924vec3 unpackRGBToNormal( const in vec3 rgb ) {
1925	return 2.0 * rgb.xyz - 1.0;
1926}
1927const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
1928const float Inv255 = 1. / 255.;
1929const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
1930const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
1931const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
1932const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
1933vec4 packDepthToRGBA( const in float v ) {
1934	if( v <= 0.0 )
1935		return vec4( 0., 0., 0., 0. );
1936	if( v >= 1.0 )
1937		return vec4( 1., 1., 1., 1. );
1938	float vuf;
1939	float af = modf( v * PackFactors.a, vuf );
1940	float bf = modf( vuf * ShiftRight8, vuf );
1941	float gf = modf( vuf * ShiftRight8, vuf );
1942	return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
1943}
1944vec3 packDepthToRGB( const in float v ) {
1945	if( v <= 0.0 )
1946		return vec3( 0., 0., 0. );
1947	if( v >= 1.0 )
1948		return vec3( 1., 1., 1. );
1949	float vuf;
1950	float bf = modf( v * PackFactors.b, vuf );
1951	float gf = modf( vuf * ShiftRight8, vuf );
1952	return vec3( vuf * Inv255, gf * PackUpscale, bf );
1953}
1954vec2 packDepthToRG( const in float v ) {
1955	if( v <= 0.0 )
1956		return vec2( 0., 0. );
1957	if( v >= 1.0 )
1958		return vec2( 1., 1. );
1959	float vuf;
1960	float gf = modf( v * 256., vuf );
1961	return vec2( vuf * Inv255, gf );
1962}
1963float unpackRGBAToDepth( const in vec4 v ) {
1964	return dot( v, UnpackFactors4 );
1965}
1966float unpackRGBToDepth( const in vec3 v ) {
1967	return dot( v, UnpackFactors3 );
1968}
1969float unpackRGToDepth( const in vec2 v ) {
1970	return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
1971}
1972vec4 pack2HalfToRGBA( const in vec2 v ) {
1973	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
1974	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
1975}
1976vec2 unpackRGBATo2Half( const in vec4 v ) {
1977	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
1978}
1979float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
1980	return ( viewZ + near ) / ( near - far );
1981}
1982float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
1983	return depth * ( near - far ) - near;
1984}
1985float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
1986	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
1987}
1988float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
1989	return ( near * far ) / ( ( far - near ) * depth - far );
1990}`,yZ=`#ifdef PREMULTIPLIED_ALPHA
1991	gl_FragColor.rgb *= gl_FragColor.a;
1992#endif`,xZ=`vec4 mvPosition = vec4( transformed, 1.0 );
1993#ifdef USE_BATCHING
1994	mvPosition = batchingMatrix * mvPosition;
1995#endif
1996#ifdef USE_INSTANCING
1997	mvPosition = instanceMatrix * mvPosition;
1998#endif
1999mvPosition = modelViewMatrix * mvPosition;
2000gl_Position = projectionMatrix * mvPosition;`,_Z=`#ifdef DITHERING
2001	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
2002#endif`,wZ=`#ifdef DITHERING
2003	vec3 dithering( vec3 color ) {
2004		float grid_position = rand( gl_FragCoord.xy );
2005		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
2006		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
2007		return color + dither_shift_RGB;
2008	}
2009#endif`,bZ=`float roughnessFactor = roughness;
2010#ifdef USE_ROUGHNESSMAP
2011	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
2012	roughnessFactor *= texelRoughness.g;
2013#endif`,SZ=`#ifdef USE_ROUGHNESSMAP
2014	uniform sampler2D roughnessMap;
2015#endif`,EZ=`#if NUM_SPOT_LIGHT_COORDS > 0
2016	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
2017#endif
2018#if NUM_SPOT_LIGHT_MAPS > 0
2019	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
2020#endif
2021#ifdef USE_SHADOWMAP
2022	#if NUM_DIR_LIGHT_SHADOWS > 0
2023		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
2024		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
2025		struct DirectionalLightShadow {
2026			float shadowIntensity;
2027			float shadowBias;
2028			float shadowNormalBias;
2029			float shadowRadius;
2030			vec2 shadowMapSize;
2031		};
2032		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
2033	#endif
2034	#if NUM_SPOT_LIGHT_SHADOWS > 0
2035		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
2036		struct SpotLightShadow {
2037			float shadowIntensity;
2038			float shadowBias;
2039			float shadowNormalBias;
2040			float shadowRadius;
2041			vec2 shadowMapSize;
2042		};
2043		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
2044	#endif
2045	#if NUM_POINT_LIGHT_SHADOWS > 0
2046		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
2047		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
2048		struct PointLightShadow {
2049			float shadowIntensity;
2050			float shadowBias;
2051			float shadowNormalBias;
2052			float shadowRadius;
2053			vec2 shadowMapSize;
2054			float shadowCameraNear;
2055			float shadowCameraFar;
2056		};
2057		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
2058	#endif
2059	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
2060		float depth = unpackRGBAToDepth( texture2D( depths, uv ) );
2061		#ifdef USE_REVERSED_DEPTH_BUFFER
2062			return step( depth, compare );
2063		#else
2064			return step( compare, depth );
2065		#endif
2066	}
2067	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
2068		return unpackRGBATo2Half( texture2D( shadow, uv ) );
2069	}
2070	float VSMShadow( sampler2D shadow, vec2 uv, float compare ) {
2071		float occlusion = 1.0;
2072		vec2 distribution = texture2DDistribution( shadow, uv );
2073		#ifdef USE_REVERSED_DEPTH_BUFFER
2074			float hard_shadow = step( distribution.x, compare );
2075		#else
2076			float hard_shadow = step( compare, distribution.x );
2077		#endif
2078		if ( hard_shadow != 1.0 ) {
2079			float distance = compare - distribution.x
vendor: 6,963 bytes, lines 2079-2210
2079;
2080			float variance = max( 0.00000, distribution.y * distribution.y );
2081			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 );
2082		}
2083		return occlusion;
2084	}
2085	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
2086		float shadow = 1.0;
2087		shadowCoord.xyz /= shadowCoord.w;
2088		shadowCoord.z += shadowBias;
2089		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
2090		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
2091		if ( frustumTest ) {
2092		#if defined( SHADOWMAP_TYPE_PCF )
2093			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
2094			float dx0 = - texelSize.x * shadowRadius;
2095			float dy0 = - texelSize.y * shadowRadius;
2096			float dx1 = + texelSize.x * shadowRadius;
2097			float dy1 = + texelSize.y * shadowRadius;
2098			float dx2 = dx0 / 2.0;
2099			float dy2 = dy0 / 2.0;
2100			float dx3 = dx1 / 2.0;
2101			float dy3 = dy1 / 2.0;
2102			shadow = (
2103				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
2104				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
2105				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
2106				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
2107				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
2108				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
2109				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
2110				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
2111				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
2112				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
2113				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
2114				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
2115				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
2116				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
2117				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
2118				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
2119				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
2120			) * ( 1.0 / 17.0 );
2121		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
2122			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
2123			float dx = texelSize.x;
2124			float dy = texelSize.y;
2125			vec2 uv = shadowCoord.xy;
2126			vec2 f = fract( uv * shadowMapSize + 0.5 );
2127			uv -= f * texelSize;
2128			shadow = (
2129				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
2130				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
2131				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
2132				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
2133				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
2134					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
2135					 f.x ) +
2136				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
2137					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
2138					 f.x ) +
2139				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
2140					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
2141					 f.y ) +
2142				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
2143					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
2144					 f.y ) +
2145				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
2146						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
2147						  f.x ),
2148					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
2149						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
2150						  f.x ),
2151					 f.y )
2152			) * ( 1.0 / 9.0 );
2153		#elif defined( SHADOWMAP_TYPE_VSM )
2154			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
2155		#else
2156			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
2157		#endif
2158		}
2159		return mix( 1.0, shadow, shadowIntensity );
2160	}
2161	vec2 cubeToUV( vec3 v, float texelSizeY ) {
2162		vec3 absV = abs( v );
2163		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
2164		absV *= scaleToCube;
2165		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
2166		vec2 planar = v.xy;
2167		float almostATexel = 1.5 * texelSizeY;
2168		float almostOne = 1.0 - almostATexel;
2169		if ( absV.z >= almostOne ) {
2170			if ( v.z > 0.0 )
2171				planar.x = 4.0 - v.x;
2172		} else if ( absV.x >= almostOne ) {
2173			float signX = sign( v.x );
2174			planar.x = v.z * signX + 2.0 * signX;
2175		} else if ( absV.y >= almostOne ) {
2176			float signY = sign( v.y );
2177			planar.x = v.x + 2.0 * signY + 2.0;
2178			planar.y = v.z * signY - 2.0;
2179		}
2180		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
2181	}
2182	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
2183		float shadow = 1.0;
2184		vec3 lightToPosition = shadowCoord.xyz;
2185		
2186		float lightToPositionLength = length( lightToPosition );
2187		if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
2188			float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );			dp += shadowBias;
2189			vec3 bd3D = normalize( lightToPosition );
2190			vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
2191			#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
2192				vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
2193				shadow = (
2194					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
2195					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
2196					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
2197					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
2198					texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
2199					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
2200					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
2201					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
2202					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
2203				) * ( 1.0 / 9.0 );
2204			#else
2205				shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
2206			#endif
2207		}
2208		return mix( 1.0, shadow, shadowIntensity );
2209	}
2210#endif`,
2210MZ=`#if NUM_SPOT_LIGHT_COORDS > 0
2211	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
2212	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
2213#endif
2214#ifdef USE_SHADOWMAP
2215	#if NUM_DIR_LIGHT_SHADOWS > 0
2216		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
2217		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
2218		struct DirectionalLightShadow {
2219			float shadowIntensity;
2220			float shadowBias;
2221			float shadowNormalBias;
2222			float shadowRadius;
2223			vec2 shadowMapSize;
2224		};
2225		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
2226	#endif
2227	#if NUM_SPOT_LIGHT_SHADOWS > 0
2228		struct SpotLightShadow {
2229			float shadowIntensity;
2230			float shadowBias;
2231			float shadowNormalBias;
2232			float shadowRadius;
2233			vec2 shadowMapSize;
2234		};
2235		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
2236	#endif
2237	#if NUM_POINT_LIGHT_SHADOWS > 0
2238		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
2239		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
2240		struct PointLightShadow {
2241			float shadowIntensity;
2242			float shadowBias;
2243			float shadowNormalBias;
2244			float shadowRadius;
2245			vec2 shadowMapSize;
2246			float shadowCameraNear;
2247			float shadowCameraFar;
2248		};
2249		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
2250	#endif
2251#endif`,TZ=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
2252	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
2253	vec4 shadowWorldPosition;
2254#endif
2255#if defined( USE_SHADOWMAP )
2256	#if NUM_DIR_LIGHT_SHADOWS > 0
2257		#pragma unroll_loop_start
2258		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2259			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
2260			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
2261		}
2262		#pragma unroll_loop_end
2263	#endif
2264	#if NUM_POINT_LIGHT_SHADOWS > 0
2265		#pragma unroll_loop_start
2266		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2267			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
2268			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
2269		}
2270		#pragma unroll_loop_end
2271	#endif
2272#endif
2273#if NUM_SPOT_LIGHT_COORDS > 0
2274	#pragma unroll_loop_start
2275	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
2276		shadowWorldPosition = worldPosition;
2277		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
2278			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
2279		#endif
2280		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
2281	}
2282	#pragma unroll_loop_end
2283#endif`,CZ=`float getShadowMask() {
2284	float shadow = 1.0;
2285	#ifdef USE_SHADOWMAP
2286	#if NUM_DIR_LIGHT_SHADOWS > 0
2287	DirectionalLightShadow directionalLight;
2288	#pragma unroll_loop_start
2289	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2290		directionalLight = directionalLightShadows[ i ];
2291		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
2292	}
2293	#pragma unroll_loop_end
2294	#endif
2295	#if NUM_SPOT_LIGHT_SHADOWS > 0
2296	SpotLightShadow spotLight;
2297	#pragma unroll_loop_start
2298	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
2299		spotLight = spotLightShadows[ i ];
2300		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
2301	}
2302	#pragma unroll_loop_end
2303	#endif
2304	#if NUM_POINT_LIGHT_SHADOWS > 0
2305	PointLightShadow pointLight;
2306	#pragma unroll_loop_start
2307	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2308		pointLight = pointLightShadows[ i ];
2309		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
2310	}
2311	#pragma unroll_loop_end
2312	#endif
2313	#endif
2314	return shadow;
2315}`,AZ=`#ifdef USE_SKINNING
2316	mat4 boneMatX = getBoneMatrix( skinIndex.x );
2317	mat4 boneMatY = getBoneMatrix( skinIndex.y );
2318	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
2319	mat4 boneMatW = getBoneMatrix( skinIndex.w );
2320#endif`,RZ=`#ifdef USE_SKINNING
2321	uniform mat4 bindMatrix;
2322	uniform mat4 bindMatrixInverse;
2323	uniform highp sampler2D boneTexture;
2324	mat4 getBoneMatrix( const in float i ) {
2325		int size = textureSize( boneTexture, 0 ).x;
2326		int j = int( i ) * 4;
2327		int x = j % size;
2328		int y = j / size;
2329		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
2330		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
2331		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
2332		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
2333		return mat4( v1, v2, v3, v4 );
2334	}
2335#endif`,PZ=`#ifdef USE_SKINNING
2336	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
2337	vec4 skinned = vec4( 0.0 );
2338	skinned += boneMatX * skinVertex * skinWeight.x;
2339	skinned += boneMatY * skinVertex * skinWeight.y;
2340	skinned += boneMatZ * skinVertex * skinWeight.z;
2341	skinned += boneMatW * skinVertex * skinWeight.w;
2342	transformed = ( bindMatrixInverse * skinned ).xyz;
2343#endif`,DZ=`#ifdef USE_SKINNING
2344	mat4 skinMatrix = mat4( 0.0 );
2345	skinMatrix += skinWeight.x * boneMatX;
2346	skinMatrix += skinWeight.y * boneMatY;
2347	skinMatrix += skinWeight.z * boneMatZ;
2348	skinMatrix += skinWeight.w * boneMatW;
2349	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
2350	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
2351	#ifdef USE_TANGENT
2352		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
2353	#endif
2354#endif`,LZ=`float specularStrength;
2355#ifdef USE_SPECULARMAP
2356	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
2357	specularStrength = texelSpecular.r;
2358#else
2359	specularStrength = 1.0;
2360#endif`,NZ=`#ifdef USE_SPECULARMAP
2361	uniform sampler2D specularMap;
2362#endif`,IZ=`#if defined( TONE_MAPPING )
2363	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
2364#endif`,kZ=`#ifndef saturate
2365#define saturate( a ) clamp( a, 0.0, 1.0 )
2366#endif
2367uniform float toneMappingExposure;
2368vec3 LinearToneMapping( vec3 color ) {
2369	return saturate( toneMappingExposure * color );
2370}
2371vec3 ReinhardToneMapping( vec3 color ) {
2372	color *= toneMappingExposure;
2373	return saturate( color / ( vec3( 1.0 ) + color ) );
2374}
2375vec3 CineonToneMapping( vec3 color ) {
2376	color *= toneMappingExposure;
2377	color = max( vec3( 0.0 ), color - 0.004 );
2378	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
2379}
2380vec3 RRTAndODTFit( vec3 v ) {
2381	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
2382	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
2383	return a / b;
2384}
2385vec3 ACESFilmicToneMapping( vec3 color ) {
2386	const mat3 ACESInputMat = mat3(
2387		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
2388		vec3( 0.04823, 0.01566, 0.83777 )
2389	);
2390	const mat3 ACESOutputMat = mat3(
2391		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
2392		vec3( -0.07367, -0.00605,  1.07602 )
2393	);
2394	color *= toneMappingExposure / 0.6;
2395	color = ACESInputMat * color;
2396	color = RRTAndODTFit( color );
2397	color = ACESOutputMat * color;
2398	return saturate( color );
2399}
2400const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
2401	vec3( 1.6605, - 0.1246, - 0.0182 ),
2402	vec3( - 0.5876, 1.1329, - 0.1006 ),
2403	vec3( - 0.0728, - 0.0083, 1.1187 )
2404);
2405const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
2406	vec3( 0.6274, 0.0691, 0.0164 ),
2407	vec3( 0.3293, 0.9195, 0.0880 ),
2408	vec3( 0.0433, 0.0113, 0.8956 )
2409);
2410vec3 agxDefaultContrastApprox( vec3 x ) {
2411	vec3 x2 = x * x;
2412	vec3 x4 = x2 * x2;
2413	return + 15.5 * x4 * x2
2414		- 40.14 * x4 * x
2415		+ 31.96 * x4
2416		- 6.868 * x2 * x
2417		+ 0.4298 * x2
2418		+ 0.1191 * x
2419		- 0.00232;
2420}
2421vec3 AgXToneMapping( vec3 color ) {
2422	const mat3 AgXInsetMatrix = mat3(
2423		vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
2424		vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
2425		vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
2426	);
2427	const mat3 AgXOutsetMatrix = mat3(
2428		vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
2429		vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
2430		vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
2431	);
2432	const float AgxMinEv = - 12.47393;	const float AgxMaxEv = 4.026069;
2433	color *= toneMappingExposure;
2434	color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
2435	color = AgXInsetMatrix * color;
2436	color = max( color, 1e-10 );	color = log2( color );
2437	color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
2438	color = clamp( color, 0.0, 1.0 );
2439	color = agxDefaultContrastApprox( color );
2440	color = AgXOutsetMatrix * color;
2441	color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
2442	color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
2443	color = clamp( color, 0.0, 1.0 );
2444	return color;
2445}
2446vec3 NeutralToneMapping( vec3 color ) {
2447	const float StartCompression = 0.8 - 0.04;
2448	const float Desaturation = 0.15;
2449	color *= toneMappingExposure;
2450	float x = min( color.r, min( color.g, color.b ) );
2451	float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
2452	color -= offset;
2453	float peak = max( color.r, max( color.g, color.b ) );
2454	if ( peak < StartCompression ) return color;
2455	float d = 1. - StartCompression;
2456	float newPeak = 1. - d * d / ( peak + d - StartCompression );
2457	color *= newPeak / peak;
2458	float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
2459	return mix( color, vec3( newPeak ), g );
2460}
2461vec3 CustomToneMapping( vec3 color ) { return color; }`,OZ=`#ifdef USE_TRANSMISSION
2462	material.transmission = transmission;
2463	material.transmissionAlpha = 1.0;
2464	material.thickness = thickness;
2465	material.attenuationDistance = attenuationDistance;
2466	material.attenuationColor = attenuationColor;
2467	#ifdef USE_TRANSMISSIONMAP
2468		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
2469	#endif
2470	#ifdef USE_THICKNESSMAP
2471		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
2472	#endif
2473	vec3 pos = vWorldPosition;
2474	vec3 v = normalize( cameraPosition - pos );
2475	vec3 n = inverseTransformDirection( normal, viewMatrix );
2476	vec4 transmitted = getIBLVolumeRefraction(
2477		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
2478		pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
2479		material.attenuationColor, material.attenuationDistance );
2480	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
2481	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
2482#endif`,FZ=`#ifdef USE_TRANSMISSION
2483	uniform float transmission;
2484	uniform float thickness;
2485	uniform float attenuationDistance;
2486	uniform vec3 attenuationColor;
2487	#ifdef USE_TRANSMISSIONMAP
2488		uniform sampler2D transmissionMap;
2489	#endif
2490	#ifdef USE_THICKNESSMAP
2491		uniform sampler2D thicknessMap;
2492	#endif
2493	uniform vec2 transmissionSamplerSize;
2494	uniform sampler2D transmissionSamplerMap;
2495	uniform mat4 modelMatrix;
2496	uniform mat4 projectionMatrix;
2497	varying vec3 vWorldPosition;
2498	float w0( float a ) {
2499		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
2500	}
2501	float w1( float a ) {
2502		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
2503	}
2504	float w2( float a ){
2505		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
2506	}
2507	float w3( float a ) {
2508		return ( 1.0 / 6.0 ) * ( a * a * a );
2509	}
2510	float g0( float a ) {
2511		return w0( a ) + w1( a );
2512	}
2513	float g1( float a ) {
2514		return w2( a ) + w3( a );
2515	}
2516	float h0( float a ) {
2517		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
2518	}
2519	float h1( float a ) {
2520		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
2521	}
2522	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
2523		uv = uv * texelSize.zw + 0.5;
2524		vec2 iuv = floor( uv );
2525		vec2 fuv = fract( uv );
2526		float g0x = g0( fuv.x );
2527		float g1x = g1( fuv.x );
2528		float h0x = h0( fuv.x );
2529		float h1x = h1( fuv.x );
2530		float h0y = h0( fuv.y );
2531		float h1y = h1( fuv.y );
2532		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2533		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2534		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2535		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2536		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
2537			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
2538	}
2539	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
2540		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
2541		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
2542		vec2 fLodSizeInv = 1.0 / fLodSize;
2543		vec2 cLodSizeInv = 1.0 / cLodSize;
2544		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
2545		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
2546		return mix( fSample, cSample, fract( lod ) );
2547	}
2548	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
2549		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
2550		vec3 modelScale;
2551		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
2552		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
2553		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
2554		return normalize( refractionVector ) * thickness * modelScale;
2555	}
2556	float applyIorToRoughness( const in float roughness, const in float ior ) {
2557		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
2558	}
2559	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
2560		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
2561		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
2562	}
2563	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
2564		if ( isinf( attenuationDistance ) ) {
2565			return vec3( 1.0 );
2566		} else {
2567			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
2568			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
2569		}
2570	}
2571	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
2572		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
2573		const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
2574		const in vec3 attenuationColor, const in float attenuationDistance ) {
2575		vec4 transmittedLight;
2576		vec3 transmittance;
2577		#ifdef USE_DISPERSION
2578			float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
2579			vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
2580			for ( int i = 0; i < 3; i ++ ) {
2581				vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
2582				vec3 refractedRayExit = position + transmissionRay;
2583				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2584				vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2585				refractionCoords += 1.0;
2586				refractionCoords /= 2.0;
2587				vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
2588				transmittedLight[ i ] = transmissionSample[ i ];
2589				transmittedLight.a += transmissionSample.a;
2590				transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
2591			}
2592			transmittedLight.a /= 3.0;
2593		#else
2594			vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
2595			vec3 refractedRayExit = position + transmissionRay;
2596			vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2597			vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2598			refractionCoords += 1.0;
2599			refractionCoords /= 2.0;
2600			transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
2601			transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
2602		#endif
2603		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
2604		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
2605		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
2606		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
2607	}
2608#endif`,UZ=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2609	varying vec2 vUv;
2610#endif
2611#ifdef USE_MAP
2612	varying vec2 vMapUv;
2613#endif
2614#ifdef USE_ALPHAMAP
2615	varying vec2 vAlphaMapUv;
2616#endif
2617#ifdef USE_LIGHTMAP
2618	varying vec2 vLightMapUv;
2619#endif
2620#ifdef USE_AOMAP
2621	varying vec2 vAoMapUv;
2622#endif
2623#ifdef USE_BUMPMAP
2624	varying vec2 vBumpMapUv;
2625#endif
2626#ifdef USE_NORMALMAP
2627	varying vec2 vNormalMapUv;
2628#endif
2629#ifdef USE_EMISSIVEMAP
2630	varying vec2 vEmissiveMapUv;
2631#endif
2632#ifdef USE_METALNESSMAP
2633	varying vec2 vMetalnessMapUv;
2634#endif
2635#ifdef USE_ROUGHNESSMAP
2636	varying vec2 vRoughnessMapUv;
2637#endif
2638#ifdef USE_ANISOTROPYMAP
2639	varying vec2 vAnisotropyMapUv;
2640#endif
2641#ifdef USE_CLEARCOATMAP
2642	varying vec2 vClearcoatMapUv;
2643#endif
2644#ifdef USE_CLEARCOAT_NORMALMAP
2645	varying vec2 vClearcoatNormalMapUv;
2646#endif
2647#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2648	varying vec2 vClearcoatRoughnessMapUv;
2649#endif
2650#ifdef USE_IRIDESCENCEMAP
2651	varying vec2 vIridescenceMapUv;
2652#endif
2653#ifdef USE_IRIDESCENCE_THICKNESSMAP
2654	varying vec2 vIridescenceThicknessMapUv;
2655#endif
2656#ifdef USE_SHEEN_COLORMAP
2657	varying vec2 vSheenColorMapUv;
2658#endif
2659#ifdef USE_SHEEN_ROUGHNESSMAP
2660	varying vec2 vSheenRoughnessMapUv;
2661#endif
2662#ifdef USE_SPECULARMAP
2663	varying vec2 vSpecularMapUv;
2664#endif
2665#ifdef USE_SPECULAR_COLORMAP
2666	varying vec2 vSpecularColorMapUv;
2667#endif
2668#ifdef USE_SPECULAR_INTENSITYMAP
2669	varying vec2 vSpecularIntensityMapUv;
2670#endif
2671#ifdef USE_TRANSMISSIONMAP
2672	uniform mat3 transmissionMapTransform;
2673	varying vec2 vTransmissionMapUv;
2674#endif
2675#ifdef USE_THICKNESSMAP
2676	uniform mat3 thicknessMapTransform;
2677	varying vec2 vThicknessMapUv;
2678#endif`,zZ=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2679	varying vec2 vUv;
2680#endif
2681#ifdef USE_MAP
2682	uniform mat3 mapTransform;
2683	varying vec2 vMapUv;
2684#endif
2685#ifdef USE_ALPHAMAP
2686	uniform mat3 alphaMapTransform;
2687	varying vec2 vAlphaMapUv;
2688#endif
2689#ifdef USE_LIGHTMAP
2690	uniform mat3 lightMapTransform;
2691	varying vec2 vLightMapUv;
2692#endif
2693#ifdef USE_AOMAP
2694	uniform mat3 aoMapTransform;
2695	varying vec2 vAoMapUv;
2696#endif
2697#ifdef USE_BUMPMAP
2698	uniform mat3 bumpMapTransform;
2699	varying vec2 vBumpMapUv;
2700#endif
2701#ifdef USE_NORMALMAP
2702	uniform mat3 normalMapTransform;
2703	varying vec2 vNormalMapUv;
2704#endif
2705#ifdef USE_DISPLACEMENTMAP
2706	uniform mat3 displacementMapTransform;
2707	varying vec2 vDisplacementMapUv;
2708#endif
2709#ifdef USE_EMISSIVEMAP
2710	uniform mat3 emissiveMapTransform;
2711	varying vec2 vEmissiveMapUv;
2712#endif
2713#ifdef USE_METALNESSMAP
2714	uniform mat3 metalnessMapTransform;
2715	varying vec2 vMetalnessMapUv;
2716#endif
2717#ifdef USE_ROUGHNESSMAP
2718	uniform mat3 roughnessMapTransform;
2719	varying vec2 vRoughnessMapUv;
2720#endif
2721#ifdef USE_ANISOTROPYMAP
2722	uniform mat3 anisotropyMapTransform;
2723	varying vec2 vAnisotropyMapUv;
2724#endif
2725#ifdef USE_CLEARCOATMAP
2726	uniform mat3 clearcoatMapTransform;
2727	varying vec2 vClearcoatMapUv;
2728#endif
2729#ifdef USE_CLEARCOAT_NORMALMAP
2730	uniform mat3 clearcoatNormalMapTransform;
2731	varying vec2 vClearcoatNormalMapUv;
2732#endif
2733#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2734	uniform mat3 clearcoatRoughnessMapTransform;
2735	varying vec2 vClearcoatRoughnessMapUv;
2736#endif
2737#ifdef USE_SHEEN_COLORMAP
2738	uniform mat3 sheenColorMapTransform;
2739	varying vec2 vSheenColorMapUv;
2740#endif
2741#ifdef USE_SHEEN_ROUGHNESSMAP
2742	uniform mat3 sheenRoughnessMapTransform;
2743	varying vec2 vSheenRoughnessMapUv;
2744#endif
2745#ifdef USE_IRIDESCENCEMAP
2746	uniform mat3 iridescenceMapTransform;
2747	varying vec2 vIridescenceMapUv;
2748#endif
2749#ifdef USE_IRIDESCENCE_THICKNESSMAP
2750	uniform mat3 iridescenceThicknessMapTransform;
2751	varying vec2 vIridescenceThicknessMapUv;
2752#endif
2753#ifdef USE_SPECULARMAP
2754	uniform mat3 specularMapTransform;
2755	varying vec2 vSpecularMapUv;
2756#endif
2757#ifdef USE_SPECULAR_COLORMAP
2758	uniform mat3 specularColorMapTransform;
2759	varying vec2 vSpecularColorMapUv;
2760#endif
2761#ifdef USE_SPECULAR_INTENSITYMAP
2762	uniform mat3 specularIntensityMapTransform;
2763	varying vec2 vSpecularIntensityMapUv;
2764#endif
2765#ifdef USE_TRANSMISSIONMAP
2766	uniform mat3 transmissionMapTransform;
2767	varying vec2 vTransmissionMapUv;
2768#endif
2769#ifdef USE_THICKNESSMAP
2770	uniform mat3 thicknessMapTransform;
2771	varying vec2 vThicknessMapUv;
2772#endif`,BZ=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2773	vUv = vec3( uv, 1 ).xy;
2774#endif
2775#ifdef USE_MAP
2776	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
2777#endif
2778#ifdef USE_ALPHAMAP
2779	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
2780#endif
2781#ifdef USE_LIGHTMAP
2782	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
2783#endif
2784#ifdef USE_AOMAP
2785	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
2786#endif
2787#ifdef USE_BUMPMAP
2788	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
2789#endif
2790#ifdef USE_NORMALMAP
2791	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
2792#endif
2793#ifdef USE_DISPLACEMENTMAP
2794	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
2795#endif
2796#ifdef USE_EMISSIVEMAP
2797	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
2798#endif
2799#ifdef USE_METALNESSMAP
2800	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
2801#endif
2802#ifdef USE_ROUGHNESSMAP
2803	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
2804#endif
2805#ifdef USE_ANISOTROPYMAP
2806	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
2807#endif
2808#ifdef USE_CLEARCOATMAP
2809	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
2810#endif
2811#ifdef USE_CLEARCOAT_NORMALMAP
2812	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
2813#endif
2814#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2815	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
2816#endif
2817#ifdef USE_IRIDESCENCEMAP
2818	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
2819#endif
2820#ifdef USE_IRIDESCENCE_THICKNESSMAP
2821	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
2822#endif
2823#ifdef USE_SHEEN_COLORMAP
2824	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
2825#endif
2826#ifdef USE_SHEEN_ROUGHNESSMAP
2827	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
2828#endif
2829#ifdef USE_SPECULARMAP
2830	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
2831#endif
2832#ifdef USE_SPECULAR_COLORMAP
2833	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
2834#endif
2835#ifdef USE_SPECULAR_INTENSITYMAP
2836	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
2837#endif
2838#ifdef USE_TRANSMISSIONMAP
2839	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
2840#endif
2841#ifdef USE_THICKNESSMAP
2842	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
2843#endif`,VZ=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
2844	vec4 worldPosition = vec4( transformed, 1.0 );
2845	#ifdef USE_BATCHING
2846		worldPosition = batchingMatrix * worldPosition;
2847	#endif
2848	#ifdef USE_INSTANCING
2849		worldPosition = instanceMatrix * worldPosition;
2850	#endif
2851	worldPosition = modelMatrix * worldPosition;
2852#endif`;const HZ=`varying vec2 vUv;
2853uniform mat3 uvTransform;
2854void main() {
2855	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
2856	gl_Position = vec4( position.xy, 1.0, 1.0 );
2857}`,jZ=`uniform sampler2D t2D;
2858uniform float backgroundIntensity;
2859varying vec2 vUv;
2860void main() {
2861	vec4 texColor = texture2D( t2D, vUv );
2862	#ifdef DECODE_VIDEO_TEXTURE
2863		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 );
2864	#endif
2865	texColor.rgb *= backgroundIntensity;
2866	gl_FragColor = texColor;
2867	#include <tonemapping_fragment>
2868	#include <colorspace_fragment>
2869}`,GZ=`varying vec3 vWorldDirection;
2870#include <common>
2871void main() {
2872	vWorldDirection = transformDirection( position, modelMatrix );
2873	#include <begin_vertex>
2874	#include <project_vertex>
2875	gl_Position.z = gl_Position.w;
2876}`,WZ=`#ifdef ENVMAP_TYPE_CUBE
2877	uniform samplerCube envMap;
2878#elif defined( ENVMAP_TYPE_CUBE_UV )
2879	uniform sampler2D envMap;
2880#endif
2881uniform float flipEnvMap;
2882uniform float backgroundBlurriness;
2883uniform float backgroundIntensity;
2884uniform mat3 backgroundRotation;
2885varying vec3 vWorldDirection;
2886#include <cube_uv_reflection_fragment>
2887void main() {
2888	#ifdef ENVMAP_TYPE_CUBE
2889		vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
2890	#elif defined( ENVMAP_TYPE_CUBE_UV )
2891		vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
2892	#else
2893		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
2894	#endif
2895	texColor.rgb *= backgroundIntensity;
2896	gl_FragColor = texColor;
2897	#include <tonemapping_fragment>
2898	#include <colorspace_fragment>
2899}`,$Z=`varying vec3 vWorldDirection;
2900#include <common>
2901void main() {
2902	vWorldDirection = transformDirection( position, modelMatrix );
2903	#include <begin_vertex>
2904	#include <project_vertex>
2905	gl_Position.z = gl_Position.w;
2906}`,XZ=`uniform samplerCube tCube;
2907uniform float tFlip;
2908uniform float opacity;
2909varying vec3 vWorldDirection;
2910void main() {
2911	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
2912	gl_FragColor = texColor;
2913	gl_FragColor.a *= opacity;
2914	#include <tonemapping_fragment>
2915	#include <colorspace_fragment>
2916}`,qZ=`#include <common>
2917#include <batching_pars_vertex>
2918#include <uv_pars_vertex>
2919#include <displacementmap_pars_vertex>
2920#include <morphtarget_pars_vertex>
2921#include <skinning_pars_vertex>
2922#include <logdepthbuf_pars_vertex>
2923#include <clipping_planes_pars_vertex>
2924varying vec2 vHighPrecisionZW;
2925void main() {
2926	#include <uv_vertex>
2927	#include <batching_vertex>
2928	#include <skinbase_vertex>
2929	#include <morphinstance_vertex>
2930	#ifdef USE_DISPLACEMENTMAP
2931		#include <beginnormal_vertex>
2932		#include <morphnormal_vertex>
2933		#include <skinnormal_vertex>
2934	#endif
2935	#include <begin_vertex>
2936	#include <morphtarget_vertex>
2937	#include <skinning_vertex>
2938	#include <displacementmap_vertex>
2939	#include <project_vertex>
2940	#include <logdepthbuf_vertex>
2941	#include <clipping_planes_vertex>
2942	vHighPrecisionZW = gl_Position.zw;
2943}`,YZ=`#if DEPTH_PACKING == 3200
2944	uniform float opacity;
2945#endif
2946#include <common>
2947#include <packing>
2948#include <uv_pars_fragment>
2949#include <map_pars_fragment>
2950#include <alphamap_pars_fragment>
2951#include <alphatest_pars_fragment>
2952#include <alphahash_pars_fragment>
2953#include <logdepthbuf_pars_fragment>
2954#include <clipping_planes_pars_fragment>
2955varying vec2 vHighPrecisionZW;
2956void main() {
2957	vec4 diffuseColor = vec4( 1.0 );
2958	#include <clipping_planes_fragment>
2959	#if DEPTH_PACKING == 3200
2960		diffuseColor.a = opacity;
2961	#endif
2962	#include <map_fragment>
2963	#include <alphamap_fragment>
2964	#include <alphatest_fragment>
2965	#include <alphahash_fragment>
2966	#include <logdepthbuf_fragment>
2967	#ifdef USE_REVERSED_DEPTH_BUFFER
2968		float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];
2969	#else
2970		float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;
2971	#endif
2972	#if DEPTH_PACKING == 3200
2973		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
2974	#elif DEPTH_PACKING == 3201
2975		gl_FragColor = packDepthToRGBA( fragCoordZ );
2976	#elif DEPTH_PACKING == 3202
2977		gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
2978	#elif DEPTH_PACKING == 3203
2979		gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
2980	#endif
2981}`,KZ=`#define DISTANCE
2982varying vec3 vWorldPosition;
2983#include <common>
2984#include <batching_pars_vertex>
2985#include <uv_pars_vertex>
2986#include <displacementmap_pars_vertex>
2987#include <morphtarget_pars_vertex>
2988#include <skinning_pars_vertex>
2989#include <clipping_planes_pars_vertex>
2990void main() {
2991	#include <uv_vertex>
2992	#include <batching_vertex>
2993	#include <skinbase_vertex>
2994	#include <morphinstance_vertex>
2995	#ifdef USE_DISPLACEMENTMAP
2996		#include <beginnormal_vertex>
2997		#include <morphnormal_vertex>
2998		#include <skinnormal_vertex>
2999	#endif
3000	#include <begin_vertex>
3001	#include <morphtarget_vertex>
3002	#include <skinning_vertex>
3003	#include <displacementmap_vertex>
3004	#include <project_vertex>
3005	#include <worldpos_vertex>
3006	#include <clipping_planes_vertex>
3007	vWorldPosition = worldPosition.xyz;
3008}`,ZZ=`#define DISTANCE
3009uniform vec3 referencePosition;
3010uniform float nearDistance;
3011uniform float farDistance;
3012varying vec3 vWorldPosition;
3013#include <common>
3014#include <packing>
3015#include <uv_pars_fragment>
3016#include <map_pars_fragment>
3017#include <alphamap_pars_fragment>
3018#include <alphatest_pars_fragment>
3019#include <alphahash_pars_fragment>
3020#include <clipping_planes_pars_fragment>
3021void main () {
3022	vec4 diffuseColor = vec4( 1.0 );
3023	#include <clipping_planes_fragment>
3024	#include <map_fragment>
3025	#include <alphamap_fragment>
3026	#include <alphatest_fragment>
3027	#include <alphahash_fragment>
3028	float dist = length( vWorldPosition - referencePosition );
3029	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
3030	dist = saturate( dist );
3031	gl_FragColor = packDepthToRGBA( dist );
3032}`,QZ=`varying vec3 vWorldDirection;
3033#include <common>
3034void main() {
3035	vWorldDirection = transformDirection( position, modelMatrix );
3036	#include <begin_vertex>
3037	#include <project_vertex>
3038}`,JZ=`uniform sampler2D tEquirect;
3039varying vec3 vWorldDirection;
3040#include <common>
3041void main() {
3042	vec3 direction = normalize( vWorldDirection );
3043	vec2 sampleUV = equirectUv( direction );
3044	gl_FragColor = texture2D( tEquirect, sampleUV );
3045	#include <tonemapping_fragment>
3046	#include <colorspace_fragment>
3047}`,eQ=`uniform float scale;
3048attribute float lineDistance;
3049varying float vLineDistance;
3050#include <common>
3051#include <uv_pars_vertex>
3052#include <color_pars_vertex>
3053#include <fog_pars_vertex>
3054#include <morphtarget_pars_vertex>
3055#include <logdepthbuf_pars_vertex>
3056#include <clipping_planes_pars_vertex>
3057void main() {
3058	vLineDistance = scale * lineDistance;
3059	#include <uv_vertex>
3060	#include <color_vertex>
3061	#include <morphinstance_vertex>
3062	#include <morphcolor_vertex>
3063	#include <begin_vertex>
3064	#include <morphtarget_vertex>
3065	#include <project_vertex>
3066	#include <logdepthbuf_vertex>
3067	#include <clipping_planes_vertex>
3068	#include <fog_vertex>
3069}`,tQ=`uniform vec3 diffuse;
3070uniform float opacity;
3071uniform float dashSize;
3072uniform float totalSize;
3073varying float vLineDistance;
3074#include <common>
3075#include <color_pars_fragment>
3076#include <uv_pars_fragment>
3077#include <map_pars_fragment>
3078#include <fog_pars_fragment>
3079#include <logdepthbuf_pars_fragment>
3080#include <clipping_planes_pars_fragment>
3081void main() {
3082	vec4 diffuseColor = vec4( diffuse, opacity );
3083	#include <clipping_planes_fragment>
3084	if ( mod( vLineDistance, totalSize ) > dashSize ) {
3085		discard;
3086	}
3087	vec3 outgoingLight = vec3( 0.0 );
3088	#include <logdepthbuf_fragment>
3089	#include <map_fragment>
3090	#include <color_fragment>
3091	outgoingLight = diffuseColor.rgb;
3092	#include <opaque_fragment>
3093	#include <tonemapping_fragment>
3094	#include <colorspace_fragment>
3095	#include <fog_fragment>
3096	#include <premultiplied_alpha_fragment>
3097}`,nQ=`#include <common>
3098#include <batching_pars_vertex>
3099#include <uv_pars_vertex>
3100#include <envmap_pars_vertex>
3101#include <color_pars_vertex>
3102#include <fog_pars_vertex>
3103#include <morphtarget_pars_vertex>
3104#include <skinning_pars_vertex>
3105#include <logdepthbuf_pars_vertex>
3106#include <clipping_planes_pars_vertex>
3107void main() {
3108	#include <uv_vertex>
3109	#include <color_vertex>
3110	#include <morphinstance_vertex>
3111	#include <morphcolor_vertex>
3112	#include <batching_vertex>
3113	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
3114		#include <beginnormal_vertex>
3115		#include <morphnormal_vertex>
3116		#include <skinbase_vertex>
3117		#include <skinnormal_vertex>
3118		#include <defaultnormal_vertex>
3119	#endif
3120	#include <begin_vertex>
3121	#include <morphtarget_vertex>
3122	#include <skinning_vertex>
3123	#include <project_vertex>
3124	#include <logdepthbuf_vertex>
3125	#include <clipping_planes_vertex>
3126	#include <worldpos_vertex>
3127	#include <envmap_vertex>
3128	#include <fog_vertex>
3129}`,iQ=`uniform vec3 diffuse;
3130uniform float opacity;
3131#ifndef FLAT_SHADED
3132	varying vec3 vNormal;
3133#endif
3134#include <common>
3135#include <dithering_pars_fragment>
3136#include <color_pars_fragment>
3137#include <uv_pars_fragment>
3138#include <map_pars_fragment>
3139#include <alphamap_pars_fragment>
3140#include <alphatest_pars_fragment>
3141#include <alphahash_pars_fragment>
3142#include <aomap_pars_fragment>
3143#include <lightmap_pars_fragment>
3144#include <envmap_common_pars_fragment>
3145#include <envmap_pars_fragment>
3146#include <fog_pars_fragment>
3147#include <specularmap_pars_fragment>
3148#include <logdepthbuf_pars_fragment>
3149#include <clipping_planes_pars_fragment>
3150void main() {
3151	vec4 diffuseColor = vec4( diffuse, opacity );
3152	#include <clipping_planes_fragment>
3153	#include <logdepthbuf_fragment>
3154	#include <map_fragment>
3155	#include <color_fragment>
3156	#include <alphamap_fragment>
3157	#include <alphatest_fragment>
3158	#include <alphahash_fragment>
3159	#include <specularmap_fragment>
3160	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3161	#ifdef USE_LIGHTMAP
3162		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
3163		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
3164	#else
3165		reflectedLight.indirectDiffuse += vec3( 1.0 );
3166	#endif
3167	#include <aomap_fragment>
3168	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
3169	vec3 outgoingLight = reflectedLight.indirectDiffuse;
3170	#include <envmap_fragment>
3171	#include <opaque_fragment>
3172	#include <tonemapping_fragment>
3173	#include <colorspace_fragment>
3174	#include <fog_fragment>
3175	#include <premultiplied_alpha_fragment>
3176	#include <dithering_fragment>
3177}`,rQ=`#define LAMBERT
3178varying vec3 vViewPosition;
3179#include <common>
3180#include <batching_pars_vertex>
3181#include <uv_pars_vertex>
3182#include <displacementmap_pars_vertex>
3183#include <envmap_pars_vertex>
3184#include <color_pars_vertex>
3185#include <fog_pars_vertex>
3186#include <normal_pars_vertex>
3187#include <morphtarget_pars_vertex>
3188#include <skinning_pars_vertex>
3189#include <shadowmap_pars_vertex>
3190#include <logdepthbuf_pars_vertex>
3191#include <clipping_planes_pars_vertex>
3192void main() {
3193	#include <uv_vertex>
3194	#include <color_vertex>
3195	#include <morphinstance_vertex>
3196	#include <morphcolor_vertex>
3197	#include <batching_vertex>
3198	#include <beginnormal_vertex>
3199	#include <morphnormal_vertex>
3200	#include <skinbase_vertex>
3201	#include <skinnormal_vertex>
3202	#include <defaultnormal_vertex>
3203	#include <normal_vertex>
3204	#include <begin_vertex>
3205	#include <morphtarget_vertex>
3206	#include <skinning_vertex>
3207	#include <displacementmap_vertex>
3208	#include <project_vertex>
3209	#include <logdepthbuf_vertex>
3210	#include <clipping_planes_vertex>
3211	vViewPosition = - mvPosition.xyz;
3212	#include <worldpos_vertex>
3213	#include <envmap_vertex>
3214	#include <shadowmap_vertex>
3215	#include <fog_vertex>
3216}`,sQ=`#define LAMBERT
3217uniform vec3 diffuse;
3218uniform vec3 emissive;
3219uniform float opacity;
3220#include <common>
3221#include <packing>
3222#include <dithering_pars_fragment>
3223#include <color_pars_fragment>
3224#include <uv_pars_fragment>
3225#include <map_pars_fragment>
3226#include <alphamap_pars_fragment>
3227#include <alphatest_pars_fragment>
3228#include <alphahash_pars_fragment>
3229#include <aomap_pars_fragment>
3230#include <lightmap_pars_fragment>
3231#include <emissivemap_pars_fragment>
3232#include <envmap_common_pars_fragment>
3233#include <envmap_pars_fragment>
3234#include <fog_pars_fragment>
3235#include <bsdfs>
3236#include <lights_pars_begin>
3237#include <normal_pars_fragment>
3238#include <lights_lambert_pars_fragment>
3239#include <shadowmap_pars_fragment>
3240#include <bumpmap_pars_fragment>
3241#include <normalmap_pars_fragment>
3242#include <specularmap_pars_fragment>
3243#include <logdepthbuf_pars_fragment>
3244#include <clipping_planes_pars_fragment>
3245void main() {
3246	vec4 diffuseColor = vec4( diffuse, opacity );
3247	#include <clipping_planes_fragment>
3248	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3249	vec3 totalEmissiveRadiance = emissive;
3250	#include <logdepthbuf_fragment>
3251	#include <map_fragment>
3252	#include <color_fragment>
3253	#include <alphamap_fragment>
3254	#include <alphatest_fragment>
3255	#include <alphahash_fragment>
3256	#include <specularmap_fragment>
3257	#include <normal_fragment_begin>
3258	#include <normal_fragment_maps>
3259	#include <emissivemap_fragment>
3260	#include <lights_lambert_fragment>
3261	#include <lights_fragment_begin>
3262	#include <lights_fragment_maps>
3263	#include <lights_fragment_end>
3264	#include <aomap_fragment>
3265	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3266	#include <envmap_fragment>
3267	#include <opaque_fragment>
3268	#include <tonemapping_fragment>
3269	#include <colorspace_fragment>
3270	#include <fog_fragment>
3271	#include <premultiplied_alpha_fragment>
3272	#include <dithering_fragment>
3273}`,oQ=`#define MATCAP
3274varying vec3 vViewPosition;
3275#include <common>
3276#include <batching_pars_vertex>
3277#include <uv_pars_vertex>
3278#include <color_pars_vertex>
3279#include <displacementmap_pars_vertex>
3280#include <fog_pars_vertex>
3281#include <normal_pars_vertex>
3282#include <morphtarget_pars_vertex>
3283#include <skinning_pars_vertex>
3284#include <logdepthbuf_pars_vertex>
3285#include <clipping_planes_pars_vertex>
3286void main() {
3287	#include <uv_vertex>
3288	#include <color_vertex>
3289	#include <morphinstance_vertex>
3290	#include <morphcolor_vertex>
3291	#include <batching_vertex>
3292	#include <beginnormal_vertex>
3293	#include <morphnormal_vertex>
3294	#include <skinbase_vertex>
3295	#include <skinnormal_vertex>
3296	#include <defaultnormal_vertex>
3297	#include <normal_vertex>
3298	#include <begin_vertex>
3299	#include <morphtarget_vertex>
3300	#include <skinning_vertex>
3301	#include <displacementmap_vertex>
3302	#include <project_vertex>
3303	#include <logdepthbuf_vertex>
3304	#include <clipping_planes_vertex>
3305	#include <fog_vertex>
3306	vViewPosition = - mvPosition.xyz;
3307}`,aQ=`#define MATCAP
3308uniform vec3 diffuse;
3309uniform float opacity;
3310uniform sampler2D matcap;
3311varying vec3 vViewPosition;
3312#include <common>
3313#include <dithering_pars_fragment>
3314#include <color_pars_fragment>
3315#include <uv_pars_fragment>
3316#include <map_pars_fragment>
3317#include <alphamap_pars_fragment>
3318#include <alphatest_pars_fragment>
3319#include <alphahash_pars_fragment>
3320#include <fog_pars_fragment>
3321#include <normal_pars_fragment>
3322#include <bumpmap_pars_fragment>
3323#include
3323 <normalmap_pars_fragment>
3324#include <logdepthbuf_pars_fragment>
3325#include <clipping_planes_pars_fragment>
3326void main() {
3327	vec4 diffuseColor = vec4( diffuse, opacity );
3328	#include <clipping_planes_fragment>
3329	#include <logdepthbuf_fragment>
3330	#include <map_fragment>
3331	#include <color_fragment>
3332	#include <alphamap_fragment>
3333	#include <alphatest_fragment>
3334	#include <alphahash_fragment>
3335	#include <normal_fragment_begin>
3336	#include <normal_fragment_maps>
3337	vec3 viewDir = normalize( vViewPosition );
3338	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
3339	vec3 y = cross( viewDir, x );
3340	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
3341	#ifdef USE_MATCAP
3342		vec4 matcapColor = texture2D( matcap, uv );
3343	#else
3344		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
3345	#endif
3346	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
3347	#include <opaque_fragment>
3348	#include <tonemapping_fragment>
3349	#include <colorspace_fragment>
3350	#include <fog_fragment>
3351	#include <premultiplied_alpha_fragment>
3352	#include <dithering_fragment>
3353}`,lQ=`#define NORMAL
3354#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3355	varying vec3 vViewPosition;
3356#endif
3357#include <common>
3358#include <batching_pars_vertex>
3359#include <uv_pars_vertex>
3360#include <displacementmap_pars_vertex>
3361#include <normal_pars_vertex>
3362#include <morphtarget_pars_vertex>
3363#include <skinning_pars_vertex>
3364#include <logdepthbuf_pars_vertex>
3365#include <clipping_planes_pars_vertex>
3366void main() {
3367	#include <uv_vertex>
3368	#include <batching_vertex>
3369	#include <beginnormal_vertex>
3370	#include <morphinstance_vertex>
3371	#include <morphnormal_vertex>
3372	#include <skinbase_vertex>
3373	#include <skinnormal_vertex>
3374	#include <defaultnormal_vertex>
3375	#include <normal_vertex>
3376	#include <begin_vertex>
3377	#include <morphtarget_vertex>
3378	#include <skinning_vertex>
3379	#include <displacementmap_vertex>
3380	#include <project_vertex>
3381	#include <logdepthbuf_vertex>
3382	#include <clipping_planes_vertex>
3383#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3384	vViewPosition = - mvPosition.xyz;
3385#endif
3386}`,cQ=`#define NORMAL
3387uniform float opacity;
3388#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3389	varying vec3 vViewPosition;
3390#endif
3391#include <packing>
3392#include <uv_pars_fragment>
3393#include <normal_pars_fragment>
3394#include <bumpmap_pars_fragment>
3395#include <normalmap_pars_fragment>
3396#include <logdepthbuf_pars_fragment>
3397#include <clipping_planes_pars_fragment>
3398void main() {
3399	vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
3400	#include <clipping_planes_fragment>
3401	#include <logdepthbuf_fragment>
3402	#include <normal_fragment_begin>
3403	#include <normal_fragment_maps>
3404	gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
3405	#ifdef OPAQUE
3406		gl_FragColor.a = 1.0;
3407	#endif
3408}`,uQ=`#define PHONG
3409varying vec3 vViewPosition;
3410#include <common>
3411#include <batching_pars_vertex>
3412#include <uv_pars_vertex>
3413#include <displacementmap_pars_vertex>
3414#include <envmap_pars_vertex>
3415#include <color_pars_vertex>
3416#include <fog_pars_vertex>
3417#include <normal_pars_vertex>
3418#include <morphtarget_pars_vertex>
3419#include <skinning_pars_vertex>
3420#include <shadowmap_pars_vertex>
3421#include <logdepthbuf_pars_vertex>
3422#include <clipping_planes_pars_vertex>
3423void main() {
3424	#include <uv_vertex>
3425	#include <color_vertex>
3426	#include <morphcolor_vertex>
3427	#include <batching_vertex>
3428	#include <beginnormal_vertex>
3429	#include <morphinstance_vertex>
3430	#include <morphnormal_vertex>
3431	#include <skinbase_vertex>
3432	#include <skinnormal_vertex>
3433	#include <defaultnormal_vertex>
3434	#include <normal_vertex>
3435	#include <begin_vertex>
3436	#include <morphtarget_vertex>
3437	#include <skinning_vertex>
3438	#include <displacementmap_vertex>
3439	#include <project_vertex>
3440	#include <logdepthbuf_vertex>
3441	#include <clipping_planes_vertex>
3442	vViewPosition = - mvPosition.xyz;
3443	#include <worldpos_vertex>
3444	#include <envmap_vertex>
3445	#include <shadowmap_vertex>
3446	#include <fog_vertex>
3447}`,dQ=`#define PHONG
3448uniform vec3 diffuse;
3449uniform vec3 emissive;
3450uniform vec3 specular;
3451uniform float shininess;
3452uniform float opacity;
3453#include <common>
3454#include <packing>
3455#include <dithering_pars_fragment>
3456#include <color_pars_fragment>
3457#include <uv_pars_fragment>
3458#include <map_pars_fragment>
3459#include <alphamap_pars_fragment>
3460#include <alphatest_pars_fragment>
3461#include <alphahash_pars_fragment>
3462#include <aomap_pars_fragment>
3463#include <lightmap_pars_fragment>
3464#include <emissivemap_pars_fragment>
3465#include <envmap_common_pars_fragment>
3466#include <envmap_pars_fragment>
3467#include <fog_pars_fragment>
3468#include <bsdfs>
3469#include <lights_pars_begin>
3470#include <normal_pars_fragment>
3471#include <lights_phong_pars_fragment>
3472#include <shadowmap_pars_fragment>
3473#include <bumpmap_pars_fragment>
3474#include <normalmap_pars_fragment>
3475#include <specularmap_pars_fragment>
3476#include <logdepthbuf_pars_fragment>
3477#include <clipping_planes_pars_fragment>
3478void main() {
3479	vec4 diffuseColor = vec4( diffuse, opacity );
3480	#include <clipping_planes_fragment>
3481	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3482	vec3 totalEmissiveRadiance = emissive;
3483	#include <logdepthbuf_fragment>
3484	#include <map_fragment>
3485	#include <color_fragment>
3486	#include <alphamap_fragment>
3487	#include <alphatest_fragment>
3488	#include <alphahash_fragment>
3489	#include <specularmap_fragment>
3490	#include <normal_fragment_begin>
3491	#include <normal_fragment_maps>
3492	#include <emissivemap_fragment>
3493	#include <lights_phong_fragment>
3494	#include <lights_fragment_begin>
3495	#include <lights_fragment_maps>
3496	#include <lights_fragment_end>
3497	#include <aomap_fragment>
3498	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
3499	#include <envmap_fragment>
3500	#include <opaque_fragment>
3501	#include <tonemapping_fragment>
3502	#include <colorspace_fragment>
3503	#include <fog_fragment>
3504	#include <premultiplied_alpha_fragment>
3505	#include <dithering_fragment>
3506}`,fQ=`#define STANDARD
3507varying vec3 vViewPosition;
3508#ifdef USE_TRANSMISSION
3509	varying vec3 vWorldPosition;
3510#endif
3511#include <common>
3512#include <batching_pars_vertex>
3513#include <uv_pars_vertex>
3514#include <displacementmap_pars_vertex>
3515#include <color_pars_vertex>
3516#include <fog_pars_vertex>
3517#include <normal_pars_vertex>
3518#include <morphtarget_pars_vertex>
3519#include <skinning_pars_vertex>
3520#include <shadowmap_pars_vertex>
3521#include <logdepthbuf_pars_vertex>
3522#include <clipping_planes_pars_vertex>
3523void main() {
3524	#include <uv_vertex>
3525	#include <color_vertex>
3526	#include <morphinstance_vertex>
3527	#include <morphcolor_vertex>
3528	#include <batching_vertex>
3529	#include <beginnormal_vertex>
3530	#include <morphnormal_vertex>
3531	#include <skinbase_vertex>
3532	#include <skinnormal_vertex>
3533	#include <defaultnormal_vertex>
3534	#include <normal_vertex>
3535	#include <begin_vertex>
3536	#include <morphtarget_vertex>
3537	#include <skinning_vertex>
3538	#include <displacementmap_vertex>
3539	#include <project_vertex>
3540	#include <logdepthbuf_vertex>
3541	#include <clipping_planes_vertex>
3542	vViewPosition = - mvPosition.xyz;
3543	#include <worldpos_vertex>
3544	#include <shadowmap_vertex>
3545	#include <fog_vertex>
3546#ifdef USE_TRANSMISSION
3547	vWorldPosition = worldPosition.xyz;
3548#endif
3549}`,hQ=`#define STANDARD
3550#ifdef PHYSICAL
3551	#define IOR
3552	#define USE_SPECULAR
3553#endif
3554uniform vec3 diffuse;
3555uniform vec3 emissive;
3556uniform float roughness;
3557uniform float metalness;
3558uniform float opacity;
3559#ifdef IOR
3560	uniform float ior;
3561#endif
3562#ifdef USE_SPECULAR
3563	uniform float specularIntensity;
3564	uniform vec3 specularColor;
3565	#ifdef USE_SPECULAR_COLORMAP
3566		uniform sampler2D specularColorMap;
3567	#endif
3568	#ifdef USE_SPECULAR_INTENSITYMAP
3569		uniform sampler2D specularIntensityMap;
3570	#endif
3571#endif
3572#ifdef USE_CLEARCOAT
3573	uniform float clearcoat;
3574	uniform float clearcoatRoughness;
3575#endif
3576#ifdef USE_DISPERSION
3577	uniform float dispersion;
3578#endif
3579#ifdef USE_IRIDESCENCE
3580	uniform float iridescence;
3581	uniform float iridescenceIOR;
3582	uniform float iridescenceThicknessMinimum;
3583	uniform float iridescenceThicknessMaximum;
3584#endif
3585#ifdef USE_SHEEN
3586	uniform vec3 sheenColor;
3587	uniform float sheenRoughness;
3588	#ifdef USE_SHEEN_COLORMAP
3589		uniform sampler2D sheenColorMap;
3590	#endif
3591	#ifdef USE_SHEEN_ROUGHNESSMAP
3592		uniform sampler2D sheenRoughnessMap;
3593	#endif
3594#endif
3595#ifdef USE_ANISOTROPY
3596	uniform vec2 anisotropyVector;
3597	#ifdef USE_ANISOTROPYMAP
3598		uniform sampler2D anisotropyMap;
3599	#endif
3600#endif
3601varying vec3 vViewPosition;
3602#include <common>
3603#include <packing>
3604#include <dithering_pars_fragment>
3605#include <color_pars_fragment>
3606#include <uv_pars_fragment>
3607#include <map_pars_fragment>
3608#include <alphamap_pars_fragment>
3609#include <alphatest_pars_fragment>
3610#include <alphahash_pars_fragment>
3611#include <aomap_pars_fragment>
3612#include <lightmap_pars_fragment>
3613#include <emissivemap_pars_fragment>
3614#include <iridescence_fragment>
3615#include <cube_uv_reflection_fragment>
3616#include <envmap_common_pars_fragment>
3617#include <envmap_physical_pars_fragment>
3618#include <fog_pars_fragment>
3619#include <lights_pars_begin>
3620#include <normal_pars_fragment>
3621#include <lights_physical_pars_fragment>
3622#include <transmission_pars_fragment>
3623#include <shadowmap_pars_fragment>
3624#include <bumpmap_pars_fragment>
3625#include <normalmap_pars_fragment>
3626#include <clearcoat_pars_fragment>
3627#include <iridescence_pars_fragment>
3628#include <roughnessmap_pars_fragment>
3629#include <metalnessmap_pars_fragment>
3630#include <logdepthbuf_pars_fragment>
3631#include <clipping_planes_pars_fragment>
3632void main() {
3633	vec4 diffuseColor = vec4( diffuse, opacity );
3634	#include <clipping_planes_fragment>
3635	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3636	vec3 totalEmissiveRadiance = emissive;
3637	#include <logdepthbuf_fragment>
3638	#include <map_fragment>
3639	#include <color_fragment>
3640	#include <alphamap_fragment>
3641	#include <alphatest_fragment>
3642	#include <alphahash_fragment>
3643	#include <roughnessmap_fragment>
3644	#include <metalnessmap_fragment>
3645	#include <normal_fragment_begin>
3646	#include <normal_fragment_maps>
3647	#include <clearcoat_normal_fragment_begin>
3648	#include <clearcoat_normal_fragment_maps>
3649	#include <emissivemap_fragment>
3650	#include <lights_physical_fragment>
3651	#include <lights_fragment_begin>
3652	#include <lights_fragment_maps>
3653	#include <lights_fragment_end>
3654	#include <aomap_fragment>
3655	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
3656	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
3657	#include <transmission_fragment>
3658	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
3659	#ifdef USE_SHEEN
3660		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
3661		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
3662	#endif
3663	#ifdef USE_CLEARCOAT
3664		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
3665		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
3666		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
3667	#endif
3668	#include <opaque_fragment>
3669	#include <tonemapping_fragment>
3670	#include <colorspace_fragment>
3671	#include <fog_fragment>
3672	#include <premultiplied_alpha_fragment>
3673	#include <dithering_fragment>
3674}`,pQ=`#define TOON
3675varying vec3 vViewPosition;
3676#include <common>
3677#include <batching_pars_vertex>
3678#include <uv_pars_vertex>
3679#include <displacementmap_pars_vertex>
3680#include <color_pars_vertex>
3681#include <fog_pars_vertex>
3682#include <normal_pars_vertex>
3683#include <morphtarget_pars_vertex>
3684#include <skinning_pars_vertex>
3685#include <shadowmap_pars_vertex>
3686#include <logdepthbuf_pars_vertex>
3687#include <clipping_planes_pars_vertex>
3688void main() {
3689	#include <uv_vertex>
3690	#include <color_vertex>
3691	#include <morphinstance_vertex>
3692	#include <morphcolor_vertex>
3693	#include <batching_vertex>
3694	#include <beginnormal_vertex>
3695	#include <morphnormal_vertex>
3696	#include <skinbase_vertex>
3697	#include <skinnormal_vertex>
3698	#include <defaultnormal_vertex>
3699	#include <normal_vertex>
3700	#include <begin_vertex>
3701	#include <morphtarget_vertex>
3702	#include <skinning_vertex>
3703	#include <displacementmap_vertex>
3704	#include <project_vertex>
3705	#include <logdepthbuf_vertex>
3706	#include <clipping_planes_vertex>
3707	vViewPosition = - mvPosition.xyz;
3708	#include <worldpos_vertex>
3709	#include <shadowmap_vertex>
3710	#include <fog_vertex>
3711}`,mQ=`#define TOON
3712uniform vec3 diffuse;
3713uniform vec3 emissive;
3714uniform float opacity;
3715#include <common>
3716#include <packing>
3717#include <dithering_pars_fragment>
3718#include <color_pars_fragment>
3719#include <uv_pars_fragment>
3720#include <map_pars_fragment>
3721#include <alphamap_pars_fragment>
3722#include <alphatest_pars_fragment>
3723#include <alphahash_pars_fragment>
3724#include <aomap_pars_fragment>
3725#include <lightmap_pars_fragment>
3726#include <emissivemap_pars_fragment>
3727#include <gradientmap_pars_fragment>
3728#include <fog_pars_fragment>
3729#include <bsdfs>
3730#include <lights_pars_begin>
3731#include <normal_pars_fragment>
3732#include <lights_toon_pars_fragment>
3733#include <shadowmap_pars_fragment>
3734#include <bumpmap_pars_fragment>
3735#include <normalmap_pars_fragment>
3736#include <logdepthbuf_pars_fragment>
3737#include <clipping_planes_pars_fragment>
3738void main() {
3739	vec4 diffuseColor = vec4( diffuse, opacity );
3740	#include <clipping_planes_fragment>
3741	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3742	vec3 totalEmissiveRadiance = emissive;
3743	#include <logdepthbuf_fragment>
3744	#include <map_fragment>
3745	#include <color_fragment>
3746	#include <alphamap_fragment>
3747	#include <alphatest_fragment>
3748	#include <alphahash_fragment>
3749	#include <normal_fragment_begin>
3750	#include <normal_fragment_maps>
3751	#include <emissivemap_fragment>
3752	#include <lights_toon_fragment>
3753	#include <lights_fragment_begin>
3754	#include <lights_fragment_maps>
3755	#include <lights_fragment_end>
3756	#include <aomap_fragment>
3757	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3758	#include <opaque_fragment>
3759	#include <tonemapping_fragment>
3760	#include <colorspace_fragment>
3761	#include <fog_fragment>
3762	#include <premultiplied_alpha_fragment>
3763	#include <dithering_fragment>
3764}`,gQ=`uniform float size;
3765uniform float scale;
3766#include <common>
3767#include <color_pars_vertex>
3768#include <fog_pars_vertex>
3769#include <morphtarget_pars_vertex>
3770#include <logdepthbuf_pars_vertex>
3771#include <clipping_planes_pars_vertex>
3772#ifdef USE_POINTS_UV
3773	varying vec2 vUv;
3774	uniform mat3 uvTransform;
3775#endif
3776void main() {
3777	#ifdef USE_POINTS_UV
3778		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
3779	#endif
3780	#include <color_vertex>
3781	#include <morphinstance_vertex>
3782	#include <morphcolor_vertex>
3783	#include <begin_vertex>
3784	#include <morphtarget_vertex>
3785	#include <project_vertex>
3786	gl_PointSize = size;
3787	#ifdef USE_SIZEATTENUATION
3788		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3789		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
3790	#endif
3791	#include <logdepthbuf_vertex>
3792	#include <clipping_planes_vertex>
3793	#include <worldpos_vertex>
3794	#include <fog_vertex>
3795}`,vQ=`uniform vec3 diffuse;
3796uniform float opacity;
3797#include <common>
3798#include <color_pars_fragment>
3799#include <map_particle_pars_fragment>
3800#include <alphatest_pars_fragment>
3801#include <alphahash_pars_fragment>
3802#include <fog_pars_fragment>
3803#include <logdepthbuf_pars_fragment>
3804#include <clipping_planes_pars_fragment>
3805void main() {
3806	vec4 diffuseColor = vec4( diffuse, opacity );
3807	#include <clipping_planes_fragment>
3808	vec3 outgoingLight = vec3( 0.0 );
3809	#include <logdepthbuf_fragment>
3810	#include <map_particle_fragment>
3811	#include <color_fragment>
3812	#include <alphatest_fragment>
3813	#include <alphahash_fragment>
3814	outgoingLight = diffuseColor.rgb;
3815	#include <opaque_fragment>
3816	#include <tonemapping_fragment>
3817	#include <colorspace_fragment>
3818	#include <fog_fragment>
3819	#include <premultiplied_alpha_fragment>
3820}`,yQ=`#include <common>
3821#include <batching_pars_vertex>
3822#include <fog_pars_vertex>
3823#include <morphtarget_pars_vertex>
3824#include <skinning_pars_vertex>
3825#include <logdepthbuf_pars_vertex>
3826#include <shadowmap_pars_vertex>
3827void main() {
3828	#include <batching_vertex>
3829	#include <beginnormal_vertex>
3830	#include <morphinstance_vertex>
3831	#include <morphnormal_vertex>
3832	#include <skinbase_vertex>
3833	#include <skinnormal_vertex>
3834	#include <defaultnormal_vertex>
3835	#include <begin_vertex>
3836	#include <morphtarget_vertex>
3837	#include <skinning_vertex>
3838	#include <project_vertex>
3839	#include <logdepthbuf_vertex>
3840	#include <worldpos_vertex>
3841	#include <shadowmap_vertex>
3842	#include <fog_vertex>
3843}`,xQ=`uniform vec3 color;
3844uniform float opacity;
3845#include <common>
3846#include <packing>
3847#include <fog_pars_fragment>
3848#include <bsdfs>
3849#include <lights_pars_begin>
3850#include <logdepthbuf_pars_fragment>
3851#include <shadowmap_pars_fragment>
3852#include <shadowmask_pars_fragment>
3853void main() {
3854	#include <logdepthbuf_fragment>
3855	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
3856	#include <tonemapping_fragment>
3857	#include <colorspace_fragment>
3858	#include <fog_fragment>
3859}`,_Q=`uniform float rotation;
3860uniform vec2 center;
3861#include <common>
3862#include <uv_pars_vertex>
3863#include <fog_pars_vertex>
3864#include <logdepthbuf_pars_vertex>
3865#include <clipping_planes_pars_vertex>
3866void main() {
3867	#include <uv_vertex>
3868	vec4 mvPosition = modelViewMatrix[ 3 ];
3869	vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
3870	#ifndef USE_SIZEATTENUATION
3871		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3872		if ( isPerspective ) scale *= - mvPosition.z;
3873	#endif
3874	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
3875	vec2 rotatedPosition;
3876	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3877	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3878	mvPosition.xy += rotatedPosition;
3879	gl_Position = projectionMatrix * mvPosition;
3880	#include <logdepthbuf_vertex>
3881	#include <clipping_planes_vertex>
3882	#include <fog_vertex>
3883}`,wQ=`uniform vec3 diffuse;
3884uniform float opacity;
3885#include <common>
3886#include <uv_pars_fragment>
3887#include <map_pars_fragment>
3888#include <alphamap_pars_fragment>
3889#include <alphatest_pars_fragment>
3890#include <alphahash_pars_fragment>
3891#include <fog_pars_fragment>
3892#include <logdepthbuf_pars_fragment>
3893#include <clipping_planes_pars_fragment>
3894void main() {
3895	vec4 diffuseColor = vec4( diffuse, opacity );
3896	#include <clipping_planes_fragment>
3897	vec3 outgoingLight = vec3( 0.0 );
3898	#include <logdepthbuf_fragment>
3899	#include <map_fragment>
3900	#include <alphamap_fragment>
3901	#include <alphatest_fragment>
3902	#include <alphahash_fragment>
3903	outgoingLight = diffuseColor.rgb;
3904	#include <opaque_fragment>
3905	#include <tonemapping_fragment>
3906	#include <colorspace_fragment>
3907	#include <fog_fragment>
3908}`,et={alphahash_fragment:jY,alphahash_pars_fragment:GY,alphamap_fragment:WY,alphamap_pars_fragment:$Y,alphatest_fragment:XY,alphatest_pars_fragment:qY,aomap_fragment:YY,aomap_pars_fragment:KY,batching_pars_vertex:ZY,batching_vertex:QY,begin_vertex:JY,beginnormal_vertex:eK,bsdfs:tK,iridescence_fragment:nK,bumpmap_pars_fragment:iK,clipping_planes_fragment:rK,clipping_planes_pars_fragment:sK,clipping_planes_pars_vertex:oK,clipping_planes_vertex:aK,color_fragment:lK,color_pars_fragment:cK,color_pars_vertex:uK,color_vertex:dK,common:fK,cube_uv_reflection_fragment:hK,defaultnormal_vertex:pK,displacementmap_pars_vertex:mK,displacementmap_vertex:gK,emissivemap_fragment:vK,emissivemap_pars_fragment:yK,colorspace_fragment:xK,colorspace_pars_fragment:_K,envmap_fragment:wK,envmap_common_pars_fragment:bK,envmap_pars_fragment:SK,envmap_pars_vertex:EK,envmap_physical_pars_fragment:kK,envmap_vertex:MK,fog_vertex:TK,fog_pars_vertex:CK,fog_fragment:AK,fog_pars_fragment:RK,gradientmap_pars_fragment:PK,lightmap_pars_fragment:DK,lights_lambert_fragment:LK,lights_lambert_pars_fragment:NK,lights_pars_begin:IK,lights_toon_fragment:OK,lights_toon_pars_fragment:FK,lights_phong_fragment:UK,lights_phong_pars_fragment:zK,lights_physical_fragment:BK,lights_physical_pars_fragment:VK,lights_fragment_begin:HK,lights_fragment_maps:jK,lights_fragment_end:GK,logdepthbuf_fragment:WK,logdepthbuf_pars_fragment:$K,logdepthbuf_pars_vertex:XK,logdepthbuf_vertex:qK,map_fragment:YK,map_pars_fragment:KK,map_particle_fragment:ZK,map_particle_pars_fragment:QK,metalnessmap_fragment:JK,metalnessmap_pars_fragment:eZ,morphinstance_vertex:tZ,morphcolor_vertex:nZ,morphnormal_vertex:iZ,morphtarget_pars_vertex:rZ,morphtarget_vertex:sZ,normal_fragment_begin:oZ,normal_fragment_maps:aZ,normal_pars_fragment:lZ,normal_pars_vertex:cZ,normal_vertex:uZ,normalmap_pars_fragment:dZ,clearcoat_normal_fragment_begin:fZ,clearcoat_normal_fragment_maps:hZ,clearcoat_pars_fragment:pZ,iridescence_pars_fragment:mZ,opaque_fragment:gZ,packing:vZ,premultiplied_alpha_fragment:yZ,project_vertex:xZ,dithering_fragment:_Z,dithering_pars_fragment:wZ,roughnessmap_fragment:bZ,roughnessmap_pars_fragment:SZ,shadowmap_pars_fragment:EZ,shadowmap_pars_vertex:MZ,shadowmap_vertex:TZ,shadowmask_pars_fragment:CZ,skinbase_vertex:AZ,skinning_pars_vertex:RZ,skinning_vertex:PZ,skinnormal_vertex:DZ,specularmap_fragment:LZ,specularmap_pars_fragment:NZ,tonemapping_fragment:IZ,tonemapping_pars_fragment:kZ,transmission_fragment:OZ,transmission_pars_fragment:FZ,uv_pars_fragment:UZ,uv_pars_vertex:zZ,uv_vertex:BZ,worldpos_vertex:VZ,background_vert:HZ,background_frag:jZ,backgroundCube_vert:GZ,backgroundCube_frag:WZ,cube_vert:$Z,cube_frag:XZ,depth_vert:qZ,depth_frag:YZ,distanceRGBA_vert:KZ,distanceRGBA_frag:ZZ,equirect_vert:QZ,equirect_frag:JZ,linedashed_vert:eQ,linedashed_frag:tQ,meshbasic_vert:nQ,meshbasic_frag:iQ,meshlambert_vert:rQ,meshlambert_frag:sQ,meshmatcap_vert:oQ,meshmatcap_frag:aQ,meshnormal_vert:lQ,meshnormal_frag:cQ,meshphong_vert:uQ,meshphong_frag:dQ,meshphysical_vert:fQ,meshphysical_frag:hQ,meshtoon_vert:pQ,meshtoon_frag:mQ,points_vert:gQ,points_frag:vQ,shadow_vert:yQ,shadow_frag:xQ,sprite_vert:_Q,sprite_frag:wQ},xe={common:{diffuse:{value:new xt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Je},alphaMap:{value:null},alphaMapTransform:{value:new Je},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Je}},envmap:{envMap:{value:null},envMapRotation:{value:new Je},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Je}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Je}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Je},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Je},normalScale:{value:new wt(1,1)}}
vendor: 7,102 bytes, line 3908
3908,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Je},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Je}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Je}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Je}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new xt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new xt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Je},alphaTest:{value:0},uvTransform:{value:new Je}},sprite:{diffuse:{value:new xt(16777215)},opacity:{value:1},center:{value:new wt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Je},alphaMap:{value:null},alphaMapTransform:{value:new Je},alphaTest:{value:0}}},Cr={basic:{uniforms:Un([xe.common,xe.specularmap,xe.envmap,xe.aomap,xe.lightmap,xe.fog]),vertexShader:et.meshbasic_vert,fragmentShader:et.meshbasic_frag},lambert:{uniforms:Un([xe.common,xe.specularmap,xe.envmap,xe.aomap,xe.lightmap,xe.emissivemap,xe.bumpmap,xe.normalmap,xe.displacementmap,xe.fog,xe.lights,{emissive:{value:new xt(0)}}]),vertexShader:et.meshlambert_vert,fragmentShader:et.meshlambert_frag},phong:{uniforms:Un([xe.common,xe.specularmap,xe.envmap,xe.aomap,xe.lightmap,xe.emissivemap,xe.bumpmap,xe.normalmap,xe.displacementmap,xe.fog,xe.lights,{emissive:{value:new xt(0)},specular:{value:new xt(1118481)},shininess:{value:30}}]),vertexShader:et.meshphong_vert,fragmentShader:et.meshphong_frag},standard:{uniforms:Un([xe.common,xe.envmap,xe.aomap,xe.lightmap,xe.emissivemap,xe.bumpmap,xe.normalmap,xe.displacementmap,xe.roughnessmap,xe.metalnessmap,xe.fog,xe.lights,{emissive:{value:new xt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:et.meshphysical_vert,fragmentShader:et.meshphysical_frag},toon:{uniforms:Un([xe.common,xe.aomap,xe.lightmap,xe.emissivemap,xe.bumpmap,xe.normalmap,xe.displacementmap,xe.gradientmap,xe.fog,xe.lights,{emissive:{value:new xt(0)}}]),vertexShader:et.meshtoon_vert,fragmentShader:et.meshtoon_frag},matcap:{uniforms:Un([xe.common,xe.bumpmap,xe.normalmap,xe.displacementmap,xe.fog,{matcap:{value:null}}]),vertexShader:et.meshmatcap_vert,fragmentShader:et.meshmatcap_frag},points:{uniforms:Un([xe.points,xe.fog]),vertexShader:et.points_vert,fragmentShader:et.points_frag},dashed:{uniforms:Un([xe.common,xe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:et.linedashed_vert,fragmentShader:et.linedashed_frag},depth:{uniforms:Un([xe.common,xe.displacementmap]),vertexShader:et.depth_vert,fragmentShader:et.depth_frag},normal:{uniforms:Un([xe.common,xe.bumpmap,xe.normalmap,xe.displacementmap,{opacity:{value:1}}]),vertexShader:et.meshnormal_vert,fragmentShader:et.meshnormal_frag},sprite:{uniforms:Un([xe.sprite,xe.fog]),vertexShader:et.sprite_vert,fragmentShader:et.sprite_frag},background:{uniforms:{uvTransform:{value:new Je},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:et.background_vert,fragmentShader:et.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Je}},vertexShader:et.backgroundCube_vert,fragmentShader:et.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:et.cube_vert,fragmentShader:et.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:et.equirect_vert,fragmentShader:et.equirect_frag},distanceRGBA:{uniforms:Un([xe.common,xe.displacementmap,{referencePosition:{value:new q},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:et.distanceRGBA_vert,fragmentShader:et.distanceRGBA_frag},shadow:{uniforms:Un([xe.lights,xe.fog,{color:{value:new xt(0)},opacity:{value:1}}]),vertexShader:et.shadow_vert,fragmentShader:et.shadow_frag}};Cr.physical={uniforms:Un([Cr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Je},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Je},clearcoatNormalScale:{value:new wt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Je},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Je},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Je},sheen:{value:0},sheenColor:{value:new xt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Je},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Je},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Je},transmissionSamplerSize:{value:new wt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Je},attenuationDistance:{value:0},attenuationColor:{value:new xt(0)},specularColor:{value:new xt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Je},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Je},anisotropyVector:{value:new wt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Je}}]),vertexShader:et.meshphysical_vert,fragmentShader:et.meshphysical_frag};const Xf={r:0,b:0,g:0},Bo=new bs,bQ=new ln;function SQ(t,e,n,i,r,s,o){const a=new xt(0);let l=s===!0?0:1,c,u,d=null,f=0,h=null;function v(x){let w=x.isScene===!0?x.background:null;return w&&w.isTexture&&(w=(x.backgroundBlurriness>0?n:e).get(w)),w}function g(x){let w=!1;const S=v(x);S===null?p(a,l):S&&S.isColor&&(p(S,1),w=!0);const T=t.xr.getEnvironmentBlendMode();
vendor: 5,700 bytes, line 3908
3908T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||w)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function m(x,w){const S=v(w);S&&(S.isCubeTexture||S.mapping===dm)?(u===void 0&&(u=new Nr(new Od(1,1,1),new Ss({name:"BackgroundCubeMaterial",uniforms:Ec(Cr.backgroundCube.uniforms),vertexShader:Cr.backgroundCube.vertexShader,fragmentShader:Cr.backgroundCube.fragmentShader,side:si,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(T,C,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),Bo.copy(w.backgroundRotation),Bo.x*=-1,Bo.y*=-1,Bo.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(Bo.y*=-1,Bo.z*=-1),u.material.uniforms.envMap.value=S,u.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=w.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=w.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(bQ.makeRotationFromEuler(Bo)),u.material.toneMapped=ct.getTransfer(S.colorSpace)!==yt,(d!==S||f!==S.version||h!==t.toneMapping)&&(u.material.needsUpdate=!0,d=S,f=S.version,h=t.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null)):S&&S.isTexture&&(c===void 0&&(c=new Nr(new Fd(2,2),new Ss({name:"BackgroundMaterial",uniforms:Ec(Cr.background.uniforms),vertexShader:Cr.background.vertexShader,fragmentShader:Cr.background.fragmentShader,side:Eo,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!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=S,c.material.uniforms.backgroundIntensity.value=w.backgroundIntensity,c.material.toneMapped=ct.getTransfer(S.colorSpace)!==yt,S.matrixAutoUpdate===!0&&S.updateMatrix(),c.material.uniforms.uvTransform.value.copy(S.matrix),(d!==S||f!==S.version||h!==t.toneMapping)&&(c.material.needsUpdate=!0,d=S,f=S.version,h=t.toneMapping),c.layers.enableAll(),x.unshift(c,c.geometry,c.material,0,0,null))}function p(x,w){x.getRGB(Xf,GL(t)),i.buffers.color.setClear(Xf.r,Xf.g,Xf.b,w,o)}function y(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(x,w=1){a.set(x),l=w,p(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,p(a,l)},render:g,addToRenderList:m,dispose:y}}function EQ(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),i={},r=f(null);let s=r,o=!1;function a(M,N,k,z,F){let $=!1;const H=d(z,k,N);s!==H&&(s=H,c(s.object)),$=h(M,z,k,F),$&&v(M,z,k,F),F!==null&&e.update(F,t.ELEMENT_ARRAY_BUFFER),($||o)&&(o=!1,w(M,N,k,z),F!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(F).buffer))}function l(){return t.createVertexArray()}function c(M){return t.bindVertexArray(M)}function u(M){return t.deleteVertexArray(M)}function d(M,N,k){const z=k.wireframe===!0;let F=i[M.id];F===void 0&&(F={},i[M.id]=F);let $=F[N.id];$===void 0&&($={},F[N.id]=$);let H=$[z];return H===void 0&&(H=f(l()),$[z]=H),H}function f(M){const N=[],k=[],z=[];for(let F=0;F<n;F++)N[F]=0,k[F]=0,z[F]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:N,enabledAttributes:k,attributeDivisors:z,object:M,attributes:{},index:null}}function h(M,N,k,z){const F=s.attributes,$=N.attributes;let H=0;const W=k.getAttributes();for(const L in W)if(W[L].location>=0){const j=F[L];let J=$[L];if(J===void 0&&(L==="instanceMatrix"&&M.instanceMatrix&&(J=M.instanceMatrix),L==="instanceColor"&&M.instanceColor&&(J=M.instanceColor)),j===void 0||j.attribute!==J||J&&j.data!==J.data)return!0;H++}return s.attributesNum!==H||s.index!==z}function v(M,N,k,z){const F={},$=N.attributes;let H=0;const W=k.getAttributes();for(const L in W)if(W[L].location>=0){let j=$[L];j===void 0&&(L==="instanceMatrix"&&M.instanceMatrix&&(j=M.instanceMatrix),L==="instanceColor"&&M.instanceColor&&(j=M.instanceColor));const J={};J.attribute=j,j&&j.data&&(J.data=j.data),F[L]=J,H++}s.attributes=F,s.attributesNum=H,s.index=z}function g(){const M=s.newAttributes;for(let N=0,k=M.length;N<k;N++)M[N]=0}function m(M){p(M,0)}function p(M,N){const k=s.newAttributes,z=s.enabledAttributes,F=s.attributeDivisors;k[M]=1,z[M]===0&&(t.enableVertexAttribArray(M),z[M]=1),F[M]!==N&&(t.vertexAttribDivisor(M,N),F[M]=N)}function y(){const M=s.newAttributes,N=s.enabledAttributes;for(let k=0,z=N.length;k<z;k++)N[k]!==M[k]&&(t.disableVertexAttribArray(k),N[k]=0)}function x(M,N,k,z,F,$,H){H===!0?t.vertexAttribIPointer(M,N,k,F,$):t.vertexAttribPointer(M,N,k,z,F,$)}function w(M,N,k,z){g();const F=z.attributes,$=k.getAttributes(),H=N.defaultAttributeValues;for(const W in $){const L=$[W];if(L.location>=0){let O=F[W];if(O===void 0&&(W==="instanceMatrix"&&M.instanceMatrix&&(O=M.instanceMatrix),W==="instanceColor"&&M.instanceColor&&(O=M.instanceColor)),O!==void 0){const j=O.normalized,J=O.itemSize,ne=e.get(O);if(ne===void 0)continue;const pe=ne.buffer,he=ne.type,Ne=ne.bytesPerElement,K=he===t.INT||he===t.UNSIGNED_INT||O.gpuType===vw;if(O.isInterleavedBufferAttribute){const Z=O.data,be=Z.stride,Oe=O.offset;if(Z.isInstancedInterleavedBuffer){for(let Ae=0;Ae<L.locationSize;Ae++)p(L.location+Ae,Z.meshPerAttribute);M.isInstancedMesh!==!0&&z._maxInstanceCount===void 0&&(z._maxInstanceCount=Z.meshPerAttribute*Z.count)}
vendor: 2,014 bytes, line 3908
3908else for(let Ae=0;Ae<L.locationSize;Ae++)m(L.location+Ae);t.bindBuffer(t.ARRAY_BUFFER,pe);for(let Ae=0;Ae<L.locationSize;Ae++)x(L.location+Ae,J/L.locationSize,he,j,be*Ne,(Oe+J/L.locationSize*Ae)*Ne,K)}else{if(O.isInstancedBufferAttribute){for(let Z=0;Z<L.locationSize;Z++)p(L.location+Z,O.meshPerAttribute);M.isInstancedMesh!==!0&&z._maxInstanceCount===void 0&&(z._maxInstanceCount=O.meshPerAttribute*O.count)}else for(let Z=0;Z<L.locationSize;Z++)m(L.location+Z);t.bindBuffer(t.ARRAY_BUFFER,pe);for(let Z=0;Z<L.locationSize;Z++)x(L.location+Z,J/L.locationSize,he,j,J*Ne,J/L.locationSize*Z*Ne,K)}}else if(H!==void 0){const j=H[W];if(j!==void 0)switch(j.length){case 2:t.vertexAttrib2fv(L.location,j);break;case 3:t.vertexAttrib3fv(L.location,j);break;case 4:t.vertexAttrib4fv(L.location,j);break;default:t.vertexAttrib1fv(L.location,j)}}}}y()}function S(){P();for(const M in i){const N=i[M];for(const k in N){const z=N[k];for(const F in z)u(z[F].object),delete z[F];delete N[k]}delete i[M]}}function T(M){if(i[M.id]===void 0)return;const N=i[M.id];for(const k in N){const z=N[k];for(const F in z)u(z[F].object),delete z[F];delete N[k]}delete i[M.id]}function C(M){for(const N in i){const k=i[N];if(k[M.id]===void 0)continue;const z=k[M.id];for(const F in z)u(z[F].object),delete z[F];delete k[M.id]}}function P(){E(),o=!0,s!==r&&(s=r,c(s.object))}function E(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:a,reset:P,resetDefaultState:E,dispose:S,releaseStatesOfGeometry:T,releaseStatesOfProgram:C,initAttributes:g,enableAttribute:m,disableUnusedAttributes:y}}function MQ(t,e,n){let i;function r(c){i=c}function s(c,u){t.drawArrays(i,c,u),n.update(u,i,1)}function o(c,u,d){d!==0&&(t.drawArraysInstanced(i,c,u,d),n.update(u,i,d))}function a(c,u,d){if(d===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,c,0,u,0,d);let h=0;for(let v=0;v<d;v++)h+=u[v];n.update(h,i,1)}function l(c,u,d,f){if(d===0)return;const h=e.get("WEBGL_multi_draw");if(h===null)for(let v=0;v<c.length;v++)o(c[v],u[v],f[v]);
vendor: 12,668 bytes, lines 3908-3983
3908else{h.multiDrawArraysInstancedWEBGL(i,c,0,u,0,f,0,d);let v=0;for(let g=0;g<d;g++)v+=u[g]*f[g];n.update(v,i,1)}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function TQ(t,e,n,i){let r;function s(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const C=e.get("EXT_texture_filter_anisotropic");r=t.getParameter(C.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function o(C){return!(C!==zi&&i.convert(C)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(C){const P=C===Ld&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(C!==ws&&i.convert(C)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&C!==Dr&&!P)}function l(C){if(C==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const d=n.logarithmicDepthBuffer===!0,f=n.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),g=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),y=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),x=t.getParameter(t.MAX_VARYING_VECTORS),w=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),S=v>0,T=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:d,reversedDepthBuffer:f,maxTextures:h,maxVertexTextures:v,maxTextureSize:g,maxCubemapSize:m,maxAttributes:p,maxVertexUniforms:y,maxVaryings:x,maxFragmentUniforms:w,vertexTextures:S,maxSamples:T}}function CQ(t){const e=this;let n=null,i=0,r=!1,s=!1;const o=new Wo,a=new Je,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,f){const h=d.length!==0||f||i!==0||r;return r=f,i=d.length,h},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,f){n=u(d,f,0)},this.setState=function(d,f,h){const v=d.clippingPlanes,g=d.clipIntersection,m=d.clipShadows,p=t.get(d);if(!r||v===null||v.length===0||s&&!m)s?u(null):c();else{const y=s?0:i,x=y*4;let w=p.clippingState||null;l.value=w,w=u(v,f,x,h);for(let S=0;S!==x;++S)w[S]=n[S];p.clippingState=w,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=y}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(d,f,h,v){const g=d!==null?d.length:0;let m=null;if(g!==0){if(m=l.value,v!==!0||m===null){const p=h+g*4,y=f.matrixWorldInverse;a.getNormalMatrix(y),(m===null||m.length<p)&&(m=new Float32Array(p));for(let x=0,w=h;x!==g;++x,w+=4)o.copy(d[x]).applyMatrix4(y,a),o.normal.toArray(m,w),m[w+3]=o.constant}l.value=m,l.needsUpdate=!0}return e.numPlanes=g,e.numIntersection=0,m}}function AQ(t){let e=new WeakMap;function n(o,a){return a===w0?o.mapping=wc:a===b0&&(o.mapping=bc),o}function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===w0||a===b0)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 CY(l.height);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}}const Rl=4,LM=[.125,.215,.35,.446,.526,.582],Yo=20,pv=new KL,NM=new xt;let mv=null,gv=0,vv=0,yv=!1;const $o=(1+Math.sqrt(5))/2,ol=1/$o,IM=[new q(-$o,ol,0),new q($o,ol,0),new q(-ol,0,$o),new q(ol,0,$o),new q(0,$o,-ol),new q(0,$o,ol),new q(-1,1,-1),new q(1,1,-1),new q(-1,1,1),new q(1,1,1)],RQ=new q;class kM{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,s={}){const{size:o=256,position:a=RQ}=s;mv=this._renderer.getRenderTarget(),gv=this._renderer.getActiveCubeFace(),vv=this._renderer.getActiveMipmapLevel(),yv=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,r,l,a),n>0&&this._blur(l,0,0,n),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=UM(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=FM(),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(mv,gv,vv),this._renderer.xr.enabled=yv,e.scissorTest=!1,qf(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===wc||e.mapping===bc?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),mv=this._renderer.getRenderTarget(),gv=this._renderer.getActiveCubeFace(),vv=this._renderer.getActiveMipmapLevel(),yv=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;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:Ui,minFilter:Ui,generateMipmaps:!1,type:Ld,format:zi,colorSpace:Sc,depthBuffer:!1},r=OM(e,n,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=OM(e,n,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=PQ(s)),this._blurMaterial=DQ(s,e,n)}return r}_compileMaterial(e){const n=new Nr(this._lodPlanes[0],e);this._renderer.compile(n,pv)}_sceneToCubeUV(e,n,i,r,s){const l=new sr(90,1,n,i),c=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],d=this._renderer,f=d.autoClear,h=d.toneMapping;d.getClearColor(NM),d.toneMapping=po,d.autoClear=!1,d.state.buffers.depth.getReversed()&&(d.setRenderTarget(r),d.clearDepth(),d.setRenderTarget(null));const g=new VL({name:"PMREM.Background",side:si,depthWrite:!1,depthTest:!1}),m=new Nr(new Od,g);let p=!1;const y=e.background;y?y.isColor&&(g.color.copy(y),e.background=null,p=!0):(g.color.copy(NM),p=!0);for(let x=0;x<6;x++){const w=x%3;w===0?(l.up.set(0,c[x],0),l.position.set(s.x,s.y,s.z),l.lookAt(s.x+u[x],s.y,s.z)):w===1?(l.up.set(0,0,c[x]),l.position.set(s.x,s.y,s.z),l.lookAt(s.x,s.y+u[x],s.z)):(l.up.set(0,c[x],0),l.position.set(s.x,s.y,s.z),l.lookAt(s.x,s.y,s.z+u[x]));const S=this._cubeSize;qf(r,w*S,x>2?S:0,S,S),d.setRenderTarget(r),p&&d.render(m,l),d.render(e,l)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=h,d.autoClear=f,e.background=y}_textureToCubeUV(e,n){const i=this._renderer,r=e.mapping===wc||e.mapping===bc;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=UM()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=FM());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Nr(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;qf(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,pv)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s<r;s++){const o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),a=IM[(r-s-1)%IM.length];this._blur(e,s-1,s,o,a)}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,d=new Nr(this._lodPlanes[r],c),f=c.uniforms,h=this._sizeLods[i]-1,v=isFinite(s)?Math.PI/(2*h):2*Math.PI/(2*Yo-1),g=s/v,m=isFinite(s)?1+Math.floor(u*g):Yo;m>Yo&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${Yo}`);const p=[];let y=0;for(let C=0;C<Yo;++C){const P=C/g,E=Math.exp(-P*P/2);p.push(E),C===0?y+=E:C<m&&(y+=2*E)}for(let C=0;C<p.length;C++)p[C]=p[C]/y;f.envMap.value=e.texture,f.samples.value=m,f.weights.value=p,f.latitudinal.value=o==="latitudinal",a&&(f.poleAxis.value=a);const{_lodMax:x}=this;f.dTheta.value=v,f.mipInt.value=x-i;const w=this._sizeLods[r],S=3*w*(r>x-Rl?r-x+Rl:0),T=4*(this._cubeSize-w);qf(n,S,T,3*w,2*w),l.setRenderTarget(n),l.render(d,pv)}}function PQ(t){const e=[],n=[],i=[];let r=t;const s=t-Rl+1+LM.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);n.push(a);let l=1/a;o>t-Rl?l=LM[o-t+Rl-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,d=1+c,f=[u,u,d,u,d,d,u,u,d,d,u,d],h=6,v=6,g=3,m=2,p=1,y=new Float32Array(g*v*h),x=new Float32Array(m*v*h),w=new Float32Array(p*v*h);for(let T=0;T<h;T++){const C=T%3*2/3-1,P=T>2?0:-1,E=[C,P,0,C+2/3,P,0,C+2/3,P+1,0,C,P,0,C+2/3,P+1,0,C,P+1,0];y.set(E,g*v*T),x.set(f,m*v*T);const M=[T,T,T,T,T,T];w.set(M,p*v*T)}const S=new Fa;S.setAttribute("position",new Ur(y,g)),S.setAttribute("uv",new Ur(x,m)),S.setAttribute("faceIndex",new Ur(w,p)),e.push(S),r>Rl&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function OM(t,e,n){const i=new Da(t,e,n);return i.texture.mapping=dm,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function qf(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function DQ(t,e,n){const i=new Float32Array(Yo),r=new q(0,1,0);return new Ss({name:"SphericalGaussianBlur",defines:{n:Yo,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:Tw(),fragmentShader:`
3909
3910			precision mediump float;
3911			precision mediump int;
3912
3913			varying vec3 vOutputDirection;
3914
3915			uniform sampler2D envMap;
3916			uniform int samples;
3917			uniform float weights[ n ];
3918			uniform bool latitudinal;
3919			uniform float dTheta;
3920			uniform float mipInt;
3921			uniform vec3 poleAxis;
3922
3923			#define ENVMAP_TYPE_CUBE_UV
3924			#include <cube_uv_reflection_fragment>
3925
3926			vec3 getSample( float theta, vec3 axis ) {
3927
3928				float cosTheta = cos( theta );
3929				// Rodrigues' axis-angle rotation
3930				vec3 sampleDirection = vOutputDirection * cosTheta
3931					+ cross( axis, vOutputDirection ) * sin( theta )
3932					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
3933
3934				return bilinearCubeUV( envMap, sampleDirection, mipInt );
3935
3936			}
3937
3938			void main() {
3939
3940				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
3941
3942				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
3943
3944					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
3945
3946				}
3947
3948				axis = normalize( axis );
3949
3950				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
3951				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
3952
3953				for ( int i = 1; i < n; i++ ) {
3954
3955					if ( i >= samples ) {
3956
3957						break;
3958
3959					}
3960
3961					float theta = dTheta * float( i );
3962					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
3963					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
3964
3965				}
3966
3967			}
3968		`,blending:ho,depthTest:!1,depthWrite:!1})}function FM(){return new Ss({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Tw(),fragmentShader:`
3969
3970			precision mediump float;
3971			precision mediump int;
3972
3973			varying vec3 vOutputDirection;
3974
3975			uniform sampler2D envMap;
3976
3977			#include <common>
3978
3979			void main() {
3980
3981				vec3 outputDirection = normalize( vOutputDirection );
3982				vec2 uv = equirectUv( outputDirection );
3983
3984				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
3985
3986			}
3987		`,blending:ho,depthTest:!1,depthWrite:!1})}function UM(){return new Ss({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Tw(),fragmentShader:`
3988
3989			precision mediump float;
3990			precision mediump int;
3991
3992			uniform float flipEnvMap;
3993
3994			varying vec3 vOutputDirection;
3995
3996			uniform samplerCube envMap;
3997
3998			void main() {
3999
4000				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
4001
4002			}
4003		`,blending:ho,depthTest:!1,depthWrite:!1})}function Tw(){return`
4004
4005		precision mediump float;
4006		precision mediump int;
4007
4008		attribute float faceIndex;
4009
4010		varying vec3 vOutputDirection;
4011
4012		// RH coordinate system; PMREM face-indexing convention
4013		vec3 getDirection( vec2 uv, float face ) {
4014
4015			uv = 2.0 * uv - 1.0;
4016
4017			vec3 direction = vec3( uv, 1.0 );
4018
4019			if ( face == 0.0 ) {
4020
4021				direction = direction.zyx; // ( 1, v, u ) pos x
4022
4023			} else if ( face == 1.0 ) {
4024
4025				direction = direction.xzy;
4026				direction.xz *= -1.0; // ( -u, 1, -v ) pos y
4027
4028			} else if ( face == 2.0 ) {
4029
4030				direction.x *= -1.0; // ( -u, v, 1 ) pos z
4031
4032			} else if ( face == 3.0 ) {
4033
4034				direction = direction.zyx;
4035				direction.xz *= -1.0; // ( -1, v, -u ) neg x
4036
4037			} else if ( face == 4.0 ) {
4038
4039				direction = direction.xzy;
4040				direction.xy *= -1.0; // ( -u, -1, v ) neg y
4041
4042			} else if ( face == 5.0 ) {
4043
4044				direction.z *= -1.0; // ( u, v, -1 ) neg z
4045
4046			}
4047
4048			return direction;
4049
4050		}
4051
4052		void main() {
4053
4054			vOutputDirection = getDirection( uv, faceIndex );
4055			gl_Position = vec4( position, 1.0 );
4056
4057		}
4058	`}function LQ(t){let e=new WeakMap,n=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===w0||l===b0,u=l===wc||l===bc;if(c||u){let d=e.get(a);const f=d!==void 0?d.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==f)return n===null&&(n=new kM(t)),d=c?n.fromEquirectangular(a,d):n.fromCubemap(a,d),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),d.texture;if(d!==void 0)return d.texture;{const h=a.image;return c&&h&&h.height>0||u&&h&&r(h)?(n===null&&(n=new kM(t)),d=c?n.fromEquirectangular(a):n.fromCubemap(a),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),a.addEventListener("dispose",s),d.texture):null}}}return a}function r(a){let l=0;const c=6;for(let 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 NQ(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(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(i){const r=n(i);return r===null&&pd("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function IQ(t,e,n,i){const r={},s=new WeakMap;function o(d){const f=d.target;f.index!==null&&e.remove(f.index);for(const v in f.attributes)e.remove(f.attributes[v]);f.removeEventListener("dispose",o),delete r[f.id];const h=s.get(f);h&&(e.remove(h),s.delete(f)),i.releaseStatesOfGeometry(f),f.isInstancedBufferGeometry===!0&&delete f._maxInstanceCount,n.memory.geometries--}function a(d,f){return r[f.id]===!0||(f.addEventListener("dispose",o),r[f.id]=!0,n.memory.geometries++),f}function l(d){const f=d.attributes;for(const h in f)e.update(f[h],t.ARRAY_BUFFER)}function c(d){const f=[],h=d.index,v=d.attributes.position;let g=0;if(h!==null){const y=h.array;g=h.version;for(let x=0,w=y.length;x<w;x+=3){const S=y[x+0],T=y[x+1],C=y[x+2];f.push(S,T,T,C,C,S)}}else if(v!==void 0){const y=v.array;g=v.version;for(let x=0,w=y.length/3-1;x<w;x+=3){const S=x+0,T=x+1,C=x+2;f.push(S,T,T,C,C,S)}}else return;const m=new(FL(f)?jL:HL)(f,1);m.version=g;const p=s.get(d);p&&e.remove(p),s.set(d,m)}function u(d){const f=s.get(d);if(f){const h=d.index;h!==null&&f.version<h.version&&c(d)}else c(d);return s.get(d)}return{get:a,update:l,getWireframeAttribute:u}}function kQ(t,e,n){let i;function r(f){i=f}let s,o;function a(f){s=f.type,o=f.bytesPerElement}function l(f,h){t.drawElements(i,h,s,f*o),n.update(h,i,1)}function c(f,h,v){v!==0&&(t.drawElementsInstanced(i,h,s,f*o,v),n.update(h,i,v))}function u(f,h,v){if(v===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,h,0,s,f,0,v);let m=0;for(let p=0;p<v;p++)m+=h[p];n.update(m,i,1)}function d(f,h,v,g){if(v===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let p=0;p<f.length;p++)c(f[p]/o,h[p],g[p]);
vendor: 17,421 bytes, lines 4058-4093
4058else{m.multiDrawElementsInstancedWEBGL(i,h,0,s,f,0,g,0,v);let p=0;for(let y=0;y<v;y++)p+=h[y]*g[y];n.update(p,i,1)}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=u,this.renderMultiDrawInstances=d}function OQ(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 FQ(t,e,n){const i=new WeakMap,r=new Gt;function s(o,a,l){const c=o.morphTargetInfluences,u=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,d=u!==void 0?u.length:0;let f=i.get(a);if(f===void 0||f.count!==d){let E=function(){C.dispose(),i.delete(a),a.removeEventListener("dispose",E)};f!==void 0&&f.texture.dispose();const h=a.morphAttributes.position!==void 0,v=a.morphAttributes.normal!==void 0,g=a.morphAttributes.color!==void 0,m=a.morphAttributes.position||[],p=a.morphAttributes.normal||[],y=a.morphAttributes.color||[];let x=0;h===!0&&(x=1),v===!0&&(x=2),g===!0&&(x=3);let w=a.attributes.position.count*x,S=1;w>e.maxTextureSize&&(S=Math.ceil(w/e.maxTextureSize),w=e.maxTextureSize);const T=new Float32Array(w*S*4*d),C=new UL(T,w,S,d);C.type=Dr,C.needsUpdate=!0;const P=x*4;for(let M=0;M<d;M++){const N=m[M],k=p[M],z=y[M],F=w*S*4*M;for(let $=0;$<N.count;$++){const H=$*P;h===!0&&(r.fromBufferAttribute(N,$),T[F+H+0]=r.x,T[F+H+1]=r.y,T[F+H+2]=r.z,T[F+H+3]=0),v===!0&&(r.fromBufferAttribute(k,$),T[F+H+4]=r.x,T[F+H+5]=r.y,T[F+H+6]=r.z,T[F+H+7]=0),g===!0&&(r.fromBufferAttribute(z,$),T[F+H+8]=r.x,T[F+H+9]=r.y,T[F+H+10]=r.z,T[F+H+11]=z.itemSize===4?r.w:1)}}f={count:d,texture:C,size:new wt(w,S)},i.set(a,f),a.addEventListener("dispose",E)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(t,"morphTexture",o.morphTexture,n);else{let h=0;for(let g=0;g<c.length;g++)h+=c[g];const v=a.morphTargetsRelative?1:1-h;l.getUniforms().setValue(t,"morphTargetBaseInfluence",v),l.getUniforms().setValue(t,"morphTargetInfluences",c)}l.getUniforms().setValue(t,"morphTargetsTexture",f.texture,n),l.getUniforms().setValue(t,"morphTargetsTextureSize",f.size)}return{update:s}}function UQ(t,e,n,i){let r=new WeakMap;function s(l){const c=i.render.frame,u=l.geometry,d=e.get(l,u);if(r.get(d)!==c&&(e.update(d),r.set(d,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==c&&(n.update(l.instanceMatrix,t.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,t.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const f=l.skeleton;r.get(f)!==c&&(f.update(),r.set(f,c))}return d}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 QL=new Nn,zM=new qL(1,1),JL=new UL,eN=new cY,tN=new $L,BM=[],VM=[],HM=new Float32Array(16),jM=new Float32Array(9),GM=new Float32Array(4);function Uc(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=BM[r];if(s===void 0&&(s=new Float32Array(r),BM[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 cn(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 un(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function hm(t,e){let n=VM[e];n===void 0&&(n=new Int32Array(e),VM[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function zQ(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function BQ(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(cn(n,e))return;t.uniform2fv(this.addr,e),un(n,e)}}function VQ(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(cn(n,e))return;t.uniform3fv(this.addr,e),un(n,e)}}function HQ(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(cn(n,e))return;t.uniform4fv(this.addr,e),un(n,e)}}function jQ(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(cn(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),un(n,e)}else{if(cn(n,i))return;GM.set(i),t.uniformMatrix2fv(this.addr,!1,GM),un(n,i)}}function GQ(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(cn(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),un(n,e)}else{if(cn(n,i))return;jM.set(i),t.uniformMatrix3fv(this.addr,!1,jM),un(n,i)}}function WQ(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(cn(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),un(n,e)}else{if(cn(n,i))return;HM.set(i),t.uniformMatrix4fv(this.addr,!1,HM),un(n,i)}}function $Q(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function XQ(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(cn(n,e))return;t.uniform2iv(this.addr,e),un(n,e)}}function qQ(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(cn(n,e))return;t.uniform3iv(this.addr,e),un(n,e)}}function YQ(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(cn(n,e))return;t.uniform4iv(this.addr,e),un(n,e)}}function KQ(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function ZQ(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(cn(n,e))return;t.uniform2uiv(this.addr,e),un(n,e)}}function QQ(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(cn(n,e))return;t.uniform3uiv(this.addr,e),un(n,e)}}function JQ(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(cn(n,e))return;t.uniform4uiv(this.addr,e),un(n,e)}}function eJ(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r);let s;this.type===t.SAMPLER_2D_SHADOW?(zM.compareFunction=OL,s=zM):s=QL,n.setTexture2D(e||s,r)}function tJ(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||eN,r)}function nJ(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||tN,r)}function iJ(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||JL,r)}function rJ(t){switch(t){case 5126:return zQ;case 35664:return BQ;case 35665:return VQ;case 35666:return HQ;case 35674:return jQ;case 35675:return GQ;case 35676:return WQ;case 5124:case 35670:return $Q;case 35667:case 35671:return XQ;case 35668:case 35672:return qQ;case 35669:case 35673:return YQ;case 5125:return KQ;case 36294:return ZQ;case 36295:return QQ;case 36296:return JQ;case 35678:case 36198:case 36298:case 36306:case 35682:return eJ;case 35679:case 36299:case 36307:return tJ;case 35680:case 36300:case 36308:case 36293:return nJ;case 36289:case 36303:case 36311:case 36292:return iJ}}function sJ(t,e){t.uniform1fv(this.addr,e)}function oJ(t,e){const n=Uc(e,this.size,2);t.uniform2fv(this.addr,n)}function aJ(t,e){const n=Uc(e,this.size,3);t.uniform3fv(this.addr,n)}function lJ(t,e){const n=Uc(e,this.size,4);t.uniform4fv(this.addr,n)}function cJ(t,e){const n=Uc(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function uJ(t,e){const n=Uc(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function dJ(t,e){const n=Uc(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function fJ(t,e){t.uniform1iv(this.addr,e)}function hJ(t,e){t.uniform2iv(this.addr,e)}function pJ(t,e){t.uniform3iv(this.addr,e)}function mJ(t,e){t.uniform4iv(this.addr,e)}function gJ(t,e){t.uniform1uiv(this.addr,e)}function vJ(t,e){t.uniform2uiv(this.addr,e)}function yJ(t,e){t.uniform3uiv(this.addr,e)}function xJ(t,e){t.uniform4uiv(this.addr,e)}function _J(t,e,n){const i=this.cache,r=e.length,s=hm(n,r);cn(i,s)||(t.uniform1iv(this.addr,s),un(i,s));for(let o=0;o!==r;++o)n.setTexture2D(e[o]||QL,s[o])}function wJ(t,e,n){const i=this.cache,r=e.length,s=hm(n,r);cn(i,s)||(t.uniform1iv(this.addr,s),un(i,s));for(let o=0;o!==r;++o)n.setTexture3D(e[o]||eN,s[o])}function bJ(t,e,n){const i=this.cache,r=e.length,s=hm(n,r);cn(i,s)||(t.uniform1iv(this.addr,s),un(i,s));for(let o=0;o!==r;++o)n.setTextureCube(e[o]||tN,s[o])}function SJ(t,e,n){const i=this.cache,r=e.length,s=hm(n,r);cn(i,s)||(t.uniform1iv(this.addr,s),un(i,s));for(let o=0;o!==r;++o)n.setTexture2DArray(e[o]||JL,s[o])}function EJ(t){switch(t){case 5126:return sJ;case 35664:return oJ;case 35665:return aJ;case 35666:return lJ;case 35674:return cJ;case 35675:return uJ;case 35676:return dJ;case 5124:case 35670:return fJ;case 35667:case 35671:return hJ;case 35668:case 35672:return pJ;case 35669:case 35673:return mJ;case 5125:return gJ;case 36294:return vJ;case 36295:return yJ;case 36296:return xJ;case 35678:case 36198:case 36298:case 36306:case 35682:return _J;case 35679:case 36299:case 36307:return wJ;case 35680:case 36300:case 36308:case 36293:return bJ;case 36289:case 36303:case 36311:case 36292:return SJ}}class MJ{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.setValue=rJ(n.type)}}class TJ{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=EJ(n.type)}}class CJ{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 xv=/(\w+)(\])?(\[|\.)?/g;function WM(t,e){t.seq.push(e),t.map[e.id]=e}function AJ(t,e,n){const i=t.name,r=i.length;for(xv.lastIndex=0;;){const s=xv.exec(i),o=xv.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){WM(n,c===void 0?new MJ(a,t,e):new TJ(a,t,e));break}else{let d=n.map[a];d===void 0&&(d=new CJ(a),WM(n,d)),n=d}}}class Ah{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);AJ(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 $M(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}const RJ=37297;let PJ=0;function DJ(t,e){const n=t.split(`
4059`),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(`
4060`)}const XM=new Je;function LJ(t){ct._getMatrix(XM,ct.workingColorSpace,t);const e=`mat3( ${XM.elements.map(n=>n.toFixed(4))} )`;switch(ct.getTransfer(t)){case bp:return[e,"LinearTransferOETF"];case yt:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function qM(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),s=(t.getShaderInfoLog(e)||"").trim();if(i&&s==="")return"";const o=/ERROR: 0:(\d+)/.exec(s);if(o){const a=parseInt(o[1]);return n.toUpperCase()+`
4061
4062`+s+`
4063
4064`+DJ(t.getShaderSource(e),a)}else return s}function NJ(t,e){const n=LJ(e);return[`vec4 ${t}( vec4 value ) {`,`	return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join(`
4065`)}function IJ(t,e){let n;switch(e){case Oq:n="Linear";break;case Fq:n="Reinhard";break;case Uq:n="Cineon";break;case zq:n="ACESFilmic";break;case Vq:n="AgX";break;case Hq:n="Neutral";break;case Bq:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Yf=new q;function kJ(){ct.getLuminanceCoefficients(Yf);const t=Yf.x.toFixed(4),e=Yf.y.toFixed(4),n=Yf.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${t}, ${e}, ${n} );`,"	return dot( weights, rgb );","}"].join(`
4066`)}function OJ(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(uu).join(`
4067`)}function FJ(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(`
4068`)}function UJ(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 uu(t){return t!==""}function YM(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 KM(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const zJ=/^[ \t]*#include +<([\w\d./]+)>/gm;function ex(t){return t.replace(zJ,VJ)}const BJ=new Map;function VJ(t,e){let n=et[e];if(n===void 0){const i=BJ.get(e);if(i!==void 0)n=et[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 ex(n)}const HJ=/#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 ZM(t){return t.replace(HJ,jJ)}function jJ(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 QM(t){let e=`precision ${t.precision} float;
4069	precision ${t.precision} int;
4070	precision ${t.precision} sampler2D;
4071	precision ${t.precision} samplerCube;
4072	precision ${t.precision} sampler3D;
4073	precision ${t.precision} sampler2DArray;
4074	precision ${t.precision} sampler2DShadow;
4075	precision ${t.precision} samplerCubeShadow;
4076	precision ${t.precision} sampler2DArrayShadow;
4077	precision ${t.precision} isampler2D;
4078	precision ${t.precision} isampler3D;
4079	precision ${t.precision} isamplerCube;
4080	precision ${t.precision} isampler2DArray;
4081	precision ${t.precision} usampler2D;
4082	precision ${t.precision} usampler3D;
4083	precision ${t.precision} usamplerCube;
4084	precision ${t.precision} usampler2DArray;
4085	`;return t.precision==="highp"?e+=`
4086#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
4087#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
4088#define LOW_PRECISION`),e}function GJ(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===ML?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===mq?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===es&&(e="SHADOWMAP_TYPE_VSM"),e}function WJ(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case wc:case bc:e="ENVMAP_TYPE_CUBE";break;case dm:e="ENVMAP_TYPE_CUBE_UV";break}return e}function $J(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case bc:e="ENVMAP_MODE_REFRACTION";break}return e}function XJ(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case TL:e="ENVMAP_BLENDING_MULTIPLY";break;case Iq:e="ENVMAP_BLENDING_MIX";break;case kq:e="ENVMAP_BLENDING_ADD";break}return e}function qJ(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 YJ(t,e,n,i){const r=t.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=GJ(n),c=WJ(n),u=$J(n),d=XJ(n),f=qJ(n),h=OJ(n),v=FJ(s),g=r.createProgram();let m,p,y=n.glslVersion?"#version "+n.glslVersion+`
4089`:"";n.isRawShaderMaterial?(m=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(uu).join(`
4090`),m.length>0&&(m+=`
4091`),p=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(uu).join(`
4092`),p.length>0&&(p+=`
4093`)):(m=[QM(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionCl
vendor: 5,445 bytes, lines 4093-4095
4093ipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",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_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.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?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#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.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","	uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","	attribute vec2 uv1;","#endif","#ifdef USE_UV2","	attribute vec2 uv2;","#endif","#ifdef USE_UV3","	attribute vec2 uv3;","#endif","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
4094`].filter(uu).join(`
4095`),p=[QM(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.alph
vendor: 4,229 bytes, lines 4095-4102
4095aToCoverage?"#define ALPHA_TO_COVERAGE":"",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 "+d:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.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.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",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||n.batchingColor?"#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.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==po?"#define TONE_MAPPING":"",n.toneMapping!==po?et.tonemapping_pars_fragment:"",n.toneMapping!==po?IJ("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",et.colorspace_pars_fragment,NJ("linearToOutputTexel",n.outputColorSpace),kJ(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
4096`].filter(uu).join(`
4097`)),o=ex(o),o=YM(o,n),o=KM(o,n),a=ex(a),a=YM(a,n),a=KM(a,n),o=ZM(o),a=ZM(a),n.isRawShaderMaterial!==!0&&(y=`#version 300 es
4098`,m=[h,"#define attribute in","#define varying out","#define texture2D texture"].join(`
4099`)+`
4100`+m,p=["#define varying in",n.glslVersion===hM?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===hM?"":"#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(`
4101`)+`
4102`+p);const x=y+m+o,w=y+p+a,S=$M(r,r.VERTEX_SHADER,x),T=$M(r,r.FRAGMENT_SHADER,w);r.attachShader(g,S),r.attachShader(g,T),n.index0AttributeName!==void 0?r.bindAttribLocation(g,0,n.index0AttributeName):n.morphTargets===!0&&r.bindAttribLocation(g,0,"position"),r.linkProgram(g);
vendor: 4,901 bytes, lines 4102-4109
4102function C(N){if(t.debug.checkShaderErrors){const k=r.getProgramInfoLog(g)||"",z=r.getShaderInfoLog(S)||"",F=r.getShaderInfoLog(T)||"",$=k.trim(),H=z.trim(),W=F.trim();let L=!0,O=!0;if(r.getProgramParameter(g,r.LINK_STATUS)===!1)if(L=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(r,g,S,T);else{const j=qM(r,S,"vertex"),J=qM(r,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(g,r.VALIDATE_STATUS)+`
4103
4104Material Name: `+N.name+`
4105Material Type: `+N.type+`
4106
4107Program Info Log: `+$+`
4108`+j+`
4109`+J)}else $!==""?console.warn("THREE.WebGLProgram: Program Info Log:",$):(H===""||W==="")&&(O=!1);O&&(N.diagnostics={runnable:L,programLog:$,vertexShader:{log:H,prefix:m},fragmentShader:{log:W,prefix:p}})}r.deleteShader(S),r.deleteShader(T),P=new Ah(r,g),E=UJ(r,g)}let P;this.getUniforms=function(){return P===void 0&&C(this),P};let E;this.getAttributes=function(){return E===void 0&&C(this),E};let M=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=r.getProgramParameter(g,RJ)),M},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(g),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=PJ++,this.cacheKey=e,this.usedTimes=1,this.program=g,this.vertexShader=S,this.fragmentShader=T,this}let KJ=0;class ZJ{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 QJ(e),n.set(e,i)),i}}class QJ{constructor(e){this.id=KJ++,this.code=e,this.usedTimes=0}}function JJ(t,e,n,i,r,s,o){const a=new zL,l=new ZJ,c=new Set,u=[],d=r.logarithmicDepthBuffer,f=r.vertexTextures;let h=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 g(E){return c.add(E),E===0?"uv":`uv${E}`}function m(E,M,N,k,z){const F=k.fog,$=z.geometry,H=E.isMeshStandardMaterial?k.environment:null,W=(E.isMeshStandardMaterial?n:e).get(E.envMap||H),L=W&&W.mapping===dm?W.image.height:null,O=v[E.type];E.precision!==null&&(h=r.getMaxPrecision(E.precision),h!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",h,"instead."));const j=$.morphAttributes.position||$.morphAttributes.normal||$.morphAttributes.color,J=j!==void 0?j.length:0;let ne=0;$.morphAttributes.position!==void 0&&(ne=1),$.morphAttributes.normal!==void 0&&(ne=2),$.morphAttributes.color!==void 0&&(ne=3);let pe,he,Ne,K;if(O){const Ze=Cr[O];pe=Ze.vertexShader,he=Ze.fragmentShader}else pe=E.vertexShader,he=E.fragmentShader,l.update(E),Ne=l.getVertexShaderID(E),K=l.getFragmentShaderID(E);const Z=t.getRenderTarget(),be=t.state.buffers.depth.getReversed(),Oe=z.isInstancedMesh===!0,Ae=z.isBatchedMesh===!0,Xe=!!E.map,Lt=!!E.matcap,I=!!W,pt=!!E.aoMap,$e=!!E.lightMap,Ue=!!E.bumpMap,Re=!!E.normalMap,ft=!!E.displacementMap,Ee=!!E.emissiveMap,qe=!!E.metalnessMap,Rt=!!E.roughnessMap,Pt=E.anisotropy>0,D=E.clearcoat>0,A=E.dispersion>0,G=E.iridescence>0,Q=E.sheen>0,re=E.transmission>0,ee=Pt&&!!E.anisotropyMap,Ie=D&&!!E.clearcoatMap,de=D&&!!E.clearcoatNormalMap,De=D&&!!E.clearcoatRoughnessMap,Le=G&&!!E.iridescenceMap,le=G&&!!E.iridescenceThicknessMap,ve=Q&&!!E.sheenColorMap,Be=Q&&!!E.sheenRoughnessMap,Ce=!!E.specularMap,ye=!!E.specularColorMap,Ye=!!E.specularIntensityMap,U=re&&!!E.transmissionMap,ce=re&&!!E.thicknessMap,ge=!!E.gradientMap,Se=!!E.alphaMap,oe=E.alphaTest>0,ie=!!E.alphaHash,se=!!E.extensions;let _e=po;E.toneMapped&&(Z===null||Z.isXRRenderTarget===!0)&&(_e=t.toneMapping);const Ve={shaderID:O,shaderType:E.type,shaderName:E.name,vertexShader:pe,fragmentShader:he,defines:E.defines,customVertexShaderID:Ne,customFragmentShaderID:K,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:h,batching:Ae,batchingColor:Ae&&z._
vendor: 18,936 bytes, lines 4109-4137
4109colorsTexture!==null,instancing:Oe,instancingColor:Oe&&z.instanceColor!==null,instancingMorph:Oe&&z.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:Z===null?t.outputColorSpace:Z.isXRRenderTarget===!0?Z.texture.colorSpace:Sc,alphaToCoverage:!!E.alphaToCoverage,map:Xe,matcap:Lt,envMap:I,envMapMode:I&&W.mapping,envMapCubeUVHeight:L,aoMap:pt,lightMap:$e,bumpMap:Ue,normalMap:Re,displacementMap:f&&ft,emissiveMap:Ee,normalMapObjectSpace:Re&&E.normalMapType===Xq,normalMapTangentSpace:Re&&E.normalMapType===$q,metalnessMap:qe,roughnessMap:Rt,anisotropy:Pt,anisotropyMap:ee,clearcoat:D,clearcoatMap:Ie,clearcoatNormalMap:de,clearcoatRoughnessMap:De,dispersion:A,iridescence:G,iridescenceMap:Le,iridescenceThicknessMap:le,sheen:Q,sheenColorMap:ve,sheenRoughnessMap:Be,specularMap:Ce,specularColorMap:ye,specularIntensityMap:Ye,transmission:re,transmissionMap:U,thicknessMap:ce,gradientMap:ge,opaque:E.transparent===!1&&E.blending===Wl&&E.alphaToCoverage===!1,alphaMap:Se,alphaTest:oe,alphaHash:ie,combine:E.combine,mapUv:Xe&&g(E.map.channel),aoMapUv:pt&&g(E.aoMap.channel),lightMapUv:$e&&g(E.lightMap.channel),bumpMapUv:Ue&&g(E.bumpMap.channel),normalMapUv:Re&&g(E.normalMap.channel),displacementMapUv:ft&&g(E.displacementMap.channel),emissiveMapUv:Ee&&g(E.emissiveMap.channel),metalnessMapUv:qe&&g(E.metalnessMap.channel),roughnessMapUv:Rt&&g(E.roughnessMap.channel),anisotropyMapUv:ee&&g(E.anisotropyMap.channel),clearcoatMapUv:Ie&&g(E.clearcoatMap.channel),clearcoatNormalMapUv:de&&g(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:De&&g(E.clearcoatRoughnessMap.channel),iridescenceMapUv:Le&&g(E.iridescenceMap.channel),iridescenceThicknessMapUv:le&&g(E.iridescenceThicknessMap.channel),sheenColorMapUv:ve&&g(E.sheenColorMap.channel),sheenRoughnessMapUv:Be&&g(E.sheenRoughnessMap.channel),specularMapUv:Ce&&g(E.specularMap.channel),specularColorMapUv:ye&&g(E.specularColorMap.channel),specularIntensityMapUv:Ye&&g(E.specularIntensityMap.channel),transmissionMapUv:U&&g(E.transmissionMap.channel),thicknessMapUv:ce&&g(E.thicknessMap.channel),alphaMapUv:Se&&g(E.alphaMap.channel),vertexTangents:!!$.attributes.tangent&&(Re||Pt),vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!$.attributes.color&&$.attributes.color.itemSize===4,pointsUvs:z.isPoints===!0&&!!$.attributes.uv&&(Xe||Se),fog:!!F,useFog:E.fog===!0,fogExp2:!!F&&F.isFogExp2,flatShading:E.flatShading===!0&&E.wireframe===!1,sizeAttenuation:E.sizeAttenuation===!0,logarithmicDepthBuffer:d,reversedDepthBuffer:be,skinning:z.isSkinnedMesh===!0,morphTargets:$.morphAttributes.position!==void 0,morphNormals:$.morphAttributes.normal!==void 0,morphColors:$.morphAttributes.color!==void 0,morphTargetsCount:J,morphTextureStride:ne,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:t.shadowMap.enabled&&N.length>0,shadowMapType:t.shadowMap.type,toneMapping:_e,decodeVideoTexture:Xe&&E.map.isVideoTexture===!0&&ct.getTransfer(E.map.colorSpace)===yt,decodeVideoTextureEmissive:Ee&&E.emissiveMap.isVideoTexture===!0&&ct.getTransfer(E.emissiveMap.colorSpace)===yt,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===Rr,flipSided:E.side===si,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionClipCullDistance:se&&E.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(se&&E.extensions.multiDraw===!0||Ae)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()};return Ve.vertexUv1s=c.has(1),Ve.vertexUv2s=c.has(2),Ve.vertexUv3s=c.has(3),c.clear(),Ve}function p(E){const M=[];if(E.shaderID?M.push(E.shaderID):(M.push(E.customVertexShaderID),M.push(E.customFragmentShaderID)),E.defines!==void 0)for(const N in E.defines)M.push(N),M.push(E.defines[N]);return E.isRawShaderMaterial===!1&&(y(M,E),x(M,E),M.push(t.outputColorSpace)),M.push(E.customProgramCacheKey),M.join()}function y(E,M){E.push(M.precision),E.push(M.outputColorSpace),E.push(M.envMapMode),E.push(M.envMapCubeUVHeight),E.push(M.mapUv),E.push(M.alphaMapUv),E.push(M.lightMapUv),E.push(M.aoMapUv),E.push(M.bumpMapUv),E.push(M.normalMapUv),E.push(M.displacementMapUv),E.push(M.emissiveMapUv),E.push(M.metalnessMapUv),E.push(M.roughnessMapUv),E.push(M.anisotropyMapUv),E.push(M.clearcoatMapUv),E.push(M.clearcoatNormalMapUv),E.push(M.clearcoatRoughnessMapUv),E.push(M.iridescenceMapUv),E.push(M.iridescenceThicknessMapUv),E.push(M.sheenColorMapUv),E.push(M.sheenRoughnessMapUv),E.push(M.specularMapUv),E.push(M.specularColorMapUv),E.push(M.specularIntensityMapUv),E.push(M.transmissionMapUv),E.push(M.thicknessMapUv),E.push(M.combine),E.push(M.fogExp2),E.push(M.sizeAttenuation),E.push(M.morphTargetsCount),E.push(M.morphAttributeCount),E.push(M.numDirLights),E.push(M.numPointLights),E.push(M.numSpotLights),E.push(M.numSpotLightMaps),E.push(M.numHemiLights),E.push(M.numRectAreaLights),E.push(M.numDirLightShadows),E.push(M.numPointLightShadows),E.push(M.numSpotLightShadows),E.push(M.numSpotLightShadowsWithMaps),E.push(M.numLightProbes),E.push(M.shadowMapType),E.push(M.toneMapping),E.push(M.numClippingPlanes),E.push(M.numClipIntersection),E.push(M.depthPacking)}function x(E,M){a.disableAll(),M.supportsVertexTextures&&a.enable(0),M.instancing&&a.enable(1),M.instancingColor&&a.enable(2),M.instancingMorph&&a.enable(3),M.matcap&&a.enable(4),M.envMap&&a.enable(5),M.normalMapObjectSpace&&a.enable(6),M.normalMapTangentSpace&&a.enable(7),M.clearcoat&&a.enable(8),M.iridescence&&a.enable(9),M.alphaTest&&a.enable(10),M.vertexColors&&a.enable(11),M.vertexAlphas&&a.enable(12),M.vertexUv1s&&a.enable(13),M.vertexUv2s&&a.enable(14),M.vertexUv3s&&a.enable(15),M.vertexTangents&&a.enable(16),M.anisotropy&&a.enable(17),M.alphaHash&&a.enable(18),M.batching&&a.enable(19),M.dispersion&&a.enable(20),M.batchingColor&&a.enable(21),M.gradientMap&&a.enable(22),E.push(a.mask),a.disableAll(),M.fog&&a.enable(0),M.useFog&&a.enable(1),M.flatShading&&a.enable(2),M.logarithmicDepthBuffer&&a.enable(3),M.reversedDepthBuffer&&a.enable(4),M.skinning&&a.enable(5),M.morphTargets&&a.enable(6),M.morphNormals&&a.enable(7),M.morphColors&&a.enable(8),M.premultipliedAlpha&&a.enable(9),M.shadowMapEnabled&&a.enable(10),M.doubleSided&&a.enable(11),M.flipSided&&a.enable(12),M.useDepthPacking&&a.enable(13),M.dithering&&a.enable(14),M.transmission&&a.enable(15),M.sheen&&a.enable(16),M.opaque&&a.enable(17),M.pointsUvs&&a.enable(18),M.decodeVideoTexture&&a.enable(19),M.decodeVideoTextureEmissive&&a.enable(20),M.alphaToCoverage&&a.enable(21),E.push(a.mask)}function w(E){const M=v[E.type];let N;if(M){const k=Cr[M];N=SY.clone(k.uniforms)}else N=E.uniforms;return N}function S(E,M){let N;for(let k=0,z=u.length;k<z;k++){const F=u[k];if(F.cacheKey===M){N=F,++N.usedTimes;break}}return N===void 0&&(N=new YJ(t,M,E,s),u.push(N)),N}function T(E){if(--E.usedTimes===0){const M=u.indexOf(E);u[M]=u[u.length-1],u.pop(),E.destroy()}}function C(E){l.remove(E)}function P(){l.dispose()}return{getParameters:m,getProgramCacheKey:p,getUniforms:w,acquireProgram:S,releaseProgram:T,releaseShaderCache:C,programs:u,dispose:P}}function eee(){let t=new WeakMap;function e(o){return t.has(o)}function n(o){let a=t.get(o);return a===void 0&&(a={},t.set(o,a)),a}function i(o){t.delete(o)}function r(o,a,l){t.get(o)[a]=l}function s(){t=new WeakMap}return{has:e,get:n,remove:i,update:r,dispose:s}}function tee(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 JM(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 eT(){const t=[];let e=0;const n=[],i=[],r=[];function s(){e=0,n.length=0,i.length=0,r.length=0}function o(d,f,h,v,g,m){let p=t[e];return p===void 0?(p={id:d.id,object:d,geometry:f,material:h,groupOrder:v,renderOrder:d.renderOrder,z:g,group:m},t[e]=p):(p.id=d.id,p.object=d,p.geometry=f,p.material=h,p.groupOrder=v,p.renderOrder=d.renderOrder,p.z=g,p.group=m),e++,p}function a(d,f,h,v,g,m){const p=o(d,f,h,v,g,m);h.transmission>0?i.push(p):h.transparent===!0?r.push(p):n.push(p)}function l(d,f,h,v,g,m){const p=o(d,f,h,v,g,m);h.transmission>0?i.unshift(p):h.transparent===!0?r.unshift(p):n.unshift(p)}function c(d,f){n.length>1&&n.sort(d||tee),i.length>1&&i.sort(f||JM),r.length>1&&r.sort(f||JM)}function u(){for(let d=e,f=t.length;d<f;d++){const h=t[d];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:n,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:u,sort:c}}function nee(){let t=new WeakMap;function e(i,r){const s=t.get(i);let o;return s===void 0?(o=new eT,t.set(i,[o])):r>=s.length?(o=new eT,s.push(o)):o=s[r],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function iee(){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 q,color:new xt};break;case"SpotLight":n={position:new q,direction:new q,color:new xt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new q,color:new xt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new q,skyColor:new xt,groundColor:new xt};break;case"RectAreaLight":n={color:new xt,position:new q,halfWidth:new q,halfHeight:new q};break}return t[e.id]=n,n}}}function ree(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new wt};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new wt};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new wt,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let see=0;function oee(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function aee(t){const e=new iee,n=ree(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new q);const r=new q,s=new ln,o=new ln;function a(c){let u=0,d=0,f=0;for(let E=0;E<9;E++)i.probe[E].set(0,0,0);let h=0,v=0,g=0,m=0,p=0,y=0,x=0,w=0,S=0,T=0,C=0;c.sort(oee);for(let E=0,M=c.length;E<M;E++){const N=c[E],k=N.color,z=N.intensity,F=N.distance,$=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)u+=k.r*z,d+=k.g*z,f+=k.b*z;else if(N.isLightProbe){for(let H=0;H<9;H++)i.probe[H].addScaledVector(N.sh.coefficients[H],z);C++}else if(N.isDirectionalLight){const H=e.get(N);if(H.color.copy(N.color).multiplyScalar(N.intensity),N.castShadow){const W=N.shadow,L=n.get(N);L.shadowIntensity=W.intensity,L.shadowBias=W.bias,L.shadowNormalBias=W.normalBias,L.shadowRadius=W.radius,L.shadowMapSize=W.mapSize,i.directionalShadow[h]=L,i.directionalShadowMap[h]=$,i.directionalShadowMatrix[h]=N.shadow.matrix,y++}i.directional[h]=H,h++}else if(N.isSpotLight){const H=e.get(N);H.position.setFromMatrixPosition(N.matrixWorld),H.color.copy(k).multiplyScalar(z),H.distance=F,H.coneCos=Math.cos(N.angle),H.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),H.decay=N.decay,i.spot[g]=H;const W=N.shadow;if(N.map&&(i.spotLightMap[S]=N.map,S++,W.updateMatrices(N),N.castShadow&&T++),i.spotLightMatrix[g]=W.matrix,N.castShadow){const L=n.get(N);L.shadowIntensity=W.intensity,L.shadowBias=W.bias,L.shadowNormalBias=W.normalBias,L.shadowRadius=W.radius,L.shadowMapSize=W.mapSize,i.spotShadow[g]=L,i.spotShadowMap[g]=$,w++}g++}else if(N.isRectAreaLight){const H=e.get(N);H.color.copy(k).multiplyScalar(z),H.halfWidth.set(N.width*.5,0,0),H.halfHeight.set(0,N.height*.5,0),i.rectArea[m]=H,m++}else if(N.isPointLight){const H=e.get(N);if(H.color.copy(N.color).multiplyScalar(N.intensity),H.distance=N.distance,H.decay=N.decay,N.castShadow){const W=N.shadow,L=n.get(N);L.shadowIntensity=W.intensity,L.shadowBias=W.bias,L.shadowNormalBias=W.normalBias,L.shadowRadius=W.radius,L.shadowMapSize=W.mapSize,L.shadowCameraNear=W.camera.near,L.shadowCameraFar=W.camera.far,i.pointShadow[v]=L,i.pointShadowMap[v]=$,i.pointShadowMatrix[v]=N.shadow.matrix,x++}i.point[v]=H,v++}else if(N.isHemisphereLight){const H=e.get(N);H.skyColor.copy(N.color).multiplyScalar(z),H.groundColor.copy(N.groundColor).multiplyScalar(z),i.hemi[p]=H,p++}}m>0&&(t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=xe.LTC_FLOAT_1,i.rectAreaLTC2=xe.LTC_FLOAT_2):(i.rectAreaLTC1=xe.LTC_HALF_1,i.rectAreaLTC2=xe.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=d,i.ambient[2]=f;const P=i.hash;(P.directionalLength!==h||P.pointLength!==v||P.spotLength!==g||P.rectAreaLength!==m||P.hemiLength!==p||P.numDirectionalShadows!==y||P.numPointShadows!==x||P.numSpotShadows!==w||P.numSpotMaps!==S||P.numLightProbes!==C)&&(i.directional.length=h,i.spot.length=g,i.rectArea.length=m,i.point.length=v,i.hemi.length=p,i.directionalShadow.length=y,i.directionalShadowMap.length=y,i.pointShadow.length=x,i.pointShadowMap.length=x,i.spotShadow.length=w,i.spotShadowMap.length=w,i.directionalShadowMatrix.length=y,i.pointShadowMatrix.length=x,i.spotLightMatrix.length=w+S-T,i.spotLightMap.length=S,i.numSpotLightShadowsWithMaps=T,i.numLightProbes=C,P.directionalLength=h,P.pointLength=v,P.spotLength=g,P.rectAreaLength=m,P.hemiLength=p,P.numDirectionalShadows=y,P.numPointShadows=x,P.numSpotShadows=w,P.numSpotMaps=S,P.numLightProbes=C,i.version=see++)}function l(c,u){let d=0,f=0,h=0,v=0,g=0;const m=u.matrixWorldInverse;for(let p=0,y=c.length;p<y;p++){const x=c[p];if(x.isDirectionalLight){const w=i.directional[d];w.direction.setFromMatrixPosition(x.matrixWorld),r.setFromMatrixPosition(x.target.matrixWorld),w.direction.sub(r),w.direction.transformDirection(m),d++}else if(x.isSpotLight){const w=i.spot[h];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(m),w.direction.setFromMatrixPosition(x.matrixWorld),r.setFromMatrixPosition(x.target.matrixWorld),w.direction.sub(r),w.direction.transformDirection(m),h++}else if(x.isRectAreaLight){const w=i.rectArea[v];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(m),o.identity(),s.copy(x.matrixWorld),s.premultiply(m),o.extractRotation(s),w.halfWidth.set(x.width*.5,0,0),w.halfHeight.set(0,x.height*.5,0),w.halfWidth.applyMatrix4(o),w.halfHeight.applyMatrix4(o),v++}else if(x.isPointLight){const w=i.point[f];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(m),f++}else if(x.isHemisphereLight){const w=i.hemi[g];w.direction.setFromMatrixPosition(x.matrixWorld),w.direction.transformDirection(m),g++}}}return{setup:a,setupView:l,state:i}}function tT(t){const e=new aee(t),n=[],i=[];function r(u){c.camera=u,n.length=0,i.length=0}function s(u){n.push(u)}function o(u){i.push(u)}function a(){e.setup(n)}function l(u){e.setupView(n,u)}const c={lightsArray:n,shadowsArray:i,camera:null,lights:e,transmissionRenderTarget:{}};return{init:r,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function lee(t){let e=new WeakMap;function n(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new tT(t),e.set(r,[a])):s>=o.length?(a=new tT(t),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:n,dispose:i}}const cee=`void main() {
4110	gl_Position = vec4( position, 1.0 );
4111}`,uee=`uniform sampler2D shadow_pass;
4112uniform vec2 resolution;
4113uniform float radius;
4114#include <packing>
4115void main() {
4116	const float samples = float( VSM_SAMPLES );
4117	float mean = 0.0;
4118	float squared_mean = 0.0;
4119	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
4120	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
4121	for ( float i = 0.0; i < samples; i ++ ) {
4122		float uvOffset = uvStart + i * uvStride;
4123		#ifdef HORIZONTAL_PASS
4124			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
4125			mean += distribution.x;
4126			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
4127		#else
4128			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
4129			mean += depth;
4130			squared_mean += depth * depth;
4131		#endif
4132	}
4133	mean = mean / samples;
4134	squared_mean = squared_mean / samples;
4135	float std_dev = sqrt( squared_mean - mean * mean );
4136	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
4137}`;function dee(t,e,n){let i=new XL;const r=new wt,s=new wt,o=new Gt,a=new IY({depthPacking:Wq}),l=new kY,c={},u=n.maxTextureSize,d={[Eo]:si,[si]:Eo,[Rr]:Rr},f=new Ss({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new wt},radius:{value:4}},vertexShader:cee,fragmentShader:uee}),h=f.clone();h.defines.HORIZONTAL_PASS=1;const v=new Fa;v.setAttribute("position",new Ur(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const g=new Nr(v,f),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=ML;let p=this.type;this.render=function(T,C,P){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||T.length===0)return;const E=t.getRenderTarget(),M=t.getActiveCubeFace(),N=t.getActiveMipmapLevel(),k=t.state;k.setBlending(ho),k.buffers.depth.getReversed()===!0?k.buffers.color.setClear(0,0,0,0):k.buffers.color.setClear(1,1,1,1),k.buffers.depth.setTest(!0),k.setScissorTest(!1);const z=p!==es&&this.type===es,F=p===es&&this.type!==es;for(let $=0,H=T.length;$<H;$++){const W=T[$],L=W.shadow;if(L===void 0){console.warn("THREE.WebGLShadowMap:",W,"has no shadow.");continue}if(L.autoUpdate===!1&&L.needsUpdate===!1)continue;r.copy(L.mapSize);const O=L.getFrameExtents();if(r.multiply(O),s.copy(L.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/O.x),r.x=s.x*O.x,L.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/O.y),r.y=s.y*O.y,L.mapSize.y=s.y)),L.map===null||z===!0||F===!0){const J=this.type!==es?{minFilter:yi,magFilter:yi}:{};L.map!==null&&L.map.dispose(),L.map=new Da(r.x,r.y,J),L.map.texture.name=W.name+".shadowMap",L.c
vendor: 7,193 bytes, line 4137
4137amera.updateProjectionMatrix()}t.setRenderTarget(L.map),t.clear();const j=L.getViewportCount();for(let J=0;J<j;J++){const ne=L.getViewport(J);o.set(s.x*ne.x,s.y*ne.y,s.x*ne.z,s.y*ne.w),k.viewport(o),L.updateMatrices(W,J),i=L.getFrustum(),w(C,P,L.camera,W,this.type)}L.isPointLightShadow!==!0&&this.type===es&&y(L,P),L.needsUpdate=!1}p=this.type,m.needsUpdate=!1,t.setRenderTarget(E,M,N)};function y(T,C){const P=e.update(g);f.defines.VSM_SAMPLES!==T.blurSamples&&(f.defines.VSM_SAMPLES=T.blurSamples,h.defines.VSM_SAMPLES=T.blurSamples,f.needsUpdate=!0,h.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Da(r.x,r.y)),f.uniforms.shadow_pass.value=T.map.texture,f.uniforms.resolution.value=T.mapSize,f.uniforms.radius.value=T.radius,t.setRenderTarget(T.mapPass),t.clear(),t.renderBufferDirect(C,null,P,f,g,null),h.uniforms.shadow_pass.value=T.mapPass.texture,h.uniforms.resolution.value=T.mapSize,h.uniforms.radius.value=T.radius,t.setRenderTarget(T.map),t.clear(),t.renderBufferDirect(C,null,P,h,g,null)}function x(T,C,P,E){let M=null;const N=P.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(N!==void 0)M=N;else if(M=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||C.alphaToCoverage===!0){const k=M.uuid,z=C.uuid;let F=c[k];F===void 0&&(F={},c[k]=F);let $=F[z];$===void 0&&($=M.clone(),F[z]=$,C.addEventListener("dispose",S)),M=$}if(M.visible=C.visible,M.wireframe=C.wireframe,E===es?M.side=C.shadowSide!==null?C.shadowSide:C.side:M.side=C.shadowSide!==null?C.shadowSide:d[C.side],M.alphaMap=C.alphaMap,M.alphaTest=C.alphaToCoverage===!0?.5:C.alphaTest,M.map=C.map,M.clipShadows=C.clipShadows,M.clippingPlanes=C.clippingPlanes,M.clipIntersection=C.clipIntersection,M.displacementMap=C.displacementMap,M.displacementScale=C.displacementScale,M.displacementBias=C.displacementBias,M.wireframeLinewidth=C.wireframeLinewidth,M.linewidth=C.linewidth,P.isPointLight===!0&&M.isMeshDistanceMaterial===!0){const k=t.properties.get(M);k.light=P}return M}function w(T,C,P,E,M){if(T.visible===!1)return;if(T.layers.test(C.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&M===es)&&(!T.frustumCulled||i.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,T.matrixWorld);const z=e.update(T),F=T.material;if(Array.isArray(F)){const $=z.groups;for(let H=0,W=$.length;H<W;H++){const L=$[H],O=F[L.materialIndex];if(O&&O.visible){const j=x(T,O,E,M);T.onBeforeShadow(t,T,C,P,z,j,L),t.renderBufferDirect(P,null,z,j,T,L),T.onAfterShadow(t,T,C,P,z,j,L)}}}else if(F.visible){const $=x(T,F,E,M);T.onBeforeShadow(t,T,C,P,z,$,null),t.renderBufferDirect(P,null,z,$,T,null),T.onAfterShadow(t,T,C,P,z,$,null)}}const k=T.children;for(let z=0,F=k.length;z<F;z++)w(k[z],C,P,E,M)}function S(T){T.target.removeEventListener("dispose",S);for(const P in c){const E=c[P],M=T.target.uuid;M in E&&(E[M].dispose(),delete E[M])}}}const fee={[p0]:m0,[g0]:x0,[v0]:_0,[_c]:y0,[m0]:p0,[x0]:g0,[_0]:v0,[y0]:_c};function hee(t,e){function n(){let U=!1;const ce=new Gt;let ge=null;const Se=new Gt(0,0,0,0);return{setMask:function(oe){ge!==oe&&!U&&(t.colorMask(oe,oe,oe,oe),ge=oe)},setLocked:function(oe){U=oe},setClear:function(oe,ie,se,_e,Ve){Ve===!0&&(oe*=_e,ie*=_e,se*=_e),ce.set(oe,ie,se,_e),Se.equals(ce)===!1&&(t.clearColor(oe,ie,se,_e),Se.copy(ce))},reset:function(){U=!1,ge=null,Se.set(-1,0,0,0)}}}function i(){let U=!1,ce=!1,ge=null,Se=null,oe=null;return{setReversed:function(ie){if(ce!==ie){const se=e.get("EXT_clip_control");ie?se.clipControlEXT(se.LOWER_LEFT_EXT,se.ZERO_TO_ONE_EXT):se.clipControlEXT(se.LOWER_LEFT_EXT,se.NEGATIVE_ONE_TO_ONE_EXT),ce=ie;const _e=oe;oe=null,this.setClear(_e)}},getReversed:function(){return ce},setTest:function(ie){ie?Z(t.DEPTH_TEST):be(t.DEPTH_TEST)},setMask:function(ie){ge!==ie&&!U&&(t.depthMask(ie),ge=ie)},setFunc:function(ie){if(ce&&(ie=fee[ie]),Se!==ie){switch(ie){case p0:t.depthFunc(t.NEVER);break;case m0:t.depthFunc(t.ALWAYS);break;case g0:t.depthFunc(t.LESS);break;case _c:t.depthFunc(t.LEQUAL);break;case v0:t.depthFunc(t.EQUAL);break;case y0:t.depthFunc(t.GEQUAL);break;case x0:t.depthFunc(t.GREATER);break;case _0:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}Se=ie}},setLocked:function(ie){U=ie},setClear:function(ie){oe!==ie&&(ce&&(ie=1-ie),t.clearDepth(ie),oe=ie)},reset:function(){U=!1,ge=null,Se=null,oe=null,ce=!1}}}function r(){let U=!1,ce=null,ge=null,Se=null,oe=null,ie=null,se=null,_e=null,Ve=null;return{setTest:function(Ze){U||(Ze?Z(t.STENCIL_TEST):be(t.STENCIL_TEST))},setMask:function(Ze){ce!==Ze&&!U&&(t.stencilMask(Ze),ce=Ze)},setFunc:function(Ze,Wt,nn){(ge!==Ze||Se!==Wt||oe!==nn)&&(t.stencilFunc(Ze,Wt,nn),ge=Ze,Se=Wt,oe=nn)},setOp:function(Ze,Wt,nn){(ie!==Ze||se!==Wt||_e!==nn)&&(t.stencilOp(Ze,Wt,nn),ie=Ze,se=Wt,_e=nn)},setLocked:function(Ze){U=Ze},setClear:function(Ze){Ve!==Ze&&(t.clearStencil(Ze),Ve=Ze)},reset:function(){U=!1,ce=null,ge=null,Se=null,oe=null,ie=null,se=null,_e=null,Ve=null}}}const s=new n,o=new i,a=new r,l=new WeakMap,c=new WeakMap;let u={},d={},f=new WeakMap,h=[],v=null,g=!1,m=null,p=null,y=null,x=null,w=null,S=null,T=null,C=new xt(0,0,0),P=0,E=!1,M=null,N=null,k=null,z=null,F=null;const $=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let H=!1,W=0;const L=t.getParameter(t.VERSION);L.indexOf("WebGL")!==-1?(W=parseFloat(/^WebGL (\d)/.exec(L)[1]),H=W>=1):L.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),H=W>=2);let O=null,j={};const J=t.getParameter(t.SCISSOR_BOX),ne=t.getParameter(t.VIEWPORT),pe=new Gt().fromArray(J),he=new Gt().fromArray(ne);function Ne(U,ce,ge,Se){const oe=new Uint8Array(4),ie=t.createTexture();t.bindTexture(U,ie),t.texParameteri(U,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(U,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let se=0;se<ge;se++)U===t.TEXTURE_3D||U===t.TEXTURE_2D_ARRAY?t.texImage3D(ce,0,t.RGBA,1,1,Se,0,t.RGBA,t.UNSIGNED_BYTE,oe):t.texImage2D(ce+se,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,oe);return ie}const K={};K[t.TEXTURE_2D]=Ne(t.TEXTURE_2D,t.TEXTURE_2D,1),K[t.TEXTURE_CUBE_MAP]=Ne(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),K[t.TEXTURE_2D_ARRAY]=Ne(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),K[t.TEXTURE_3D]=Ne(t.TEXTURE_3D,t.TEXTURE_3D,1,1),s.setClear(0,0,0,1),o.setClear(1),a.setClear(0),Z(t.DEPTH_TEST),o.setFunc(_c),Ue(!1),Re(aM),Z(t.CULL_FACE),pt(ho);function Z(U){u[U]!==!0&&(t.enable(U),u[U]=!0)}function be(U){u[U]!==!1&&(t.disable(U),u[U]=!1)}function Oe(U,ce){return d[U]!==ce?(t.bindFramebuffer(U,ce),d[U]=ce,U===t.DRAW_FRAMEBUFFER&&(d[t.FRAMEBUFFER]=ce),U===t.FRAMEBUFFER&&(d[t.DRAW_FRAMEBUFFER]=ce),!0):!1}function Ae(U,ce){let ge=h,Se=!1;if(U){ge=f.get(ce),ge===void 0&&(ge=[],f.set(ce,ge));const oe=U.textures;if(ge.length!==oe.length||ge[0]!==t.COLOR_ATTACHMENT0){for(let ie=0,se=oe.length;ie<se;ie++)ge[ie]=t.COLOR_ATTACHMENT0+ie;ge.length=oe.length,Se=!0}}else ge[0]!==t.BACK&&(ge[0]=t.BACK,Se=!0);Se&&t.drawBuffers(ge)}function Xe(U){return v!==U?(t.useProgram(U),v=U,!0):!1}const Lt={[qo]:t.FUNC_ADD,[vq]:t.FUNC_SUBTRACT,[yq]:t.FUNC_REVERSE_SUBTRACT};Lt[xq]=t.MIN,Lt[_q]=t.MAX;
vendor: 5,076 bytes, line 4137
4137const I={[wq]:t.ZERO,[bq]:t.ONE,[Sq]:t.SRC_COLOR,[f0]:t.SRC_ALPHA,[Rq]:t.SRC_ALPHA_SATURATE,[Cq]:t.DST_COLOR,[Mq]:t.DST_ALPHA,[Eq]:t.ONE_MINUS_SRC_COLOR,[h0]:t.ONE_MINUS_SRC_ALPHA,[Aq]:t.ONE_MINUS_DST_COLOR,[Tq]:t.ONE_MINUS_DST_ALPHA,[Pq]:t.CONSTANT_COLOR,[Dq]:t.ONE_MINUS_CONSTANT_COLOR,[Lq]:t.CONSTANT_ALPHA,[Nq]:t.ONE_MINUS_CONSTANT_ALPHA};function pt(U,ce,ge,Se,oe,ie,se,_e,Ve,Ze){if(U===ho){g===!0&&(be(t.BLEND),g=!1);return}if(g===!1&&(Z(t.BLEND),g=!0),U!==gq){if(U!==m||Ze!==E){if((p!==qo||w!==qo)&&(t.blendEquation(t.FUNC_ADD),p=qo,w=qo),Ze)switch(U){case Wl:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case lM:t.blendFunc(t.ONE,t.ONE);break;case cM:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case uM:t.blendFuncSeparate(t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ZERO,t.ONE);break;default:console.error("THREE.WebGLState: Invalid blending: ",U);break}else switch(U){case Wl:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case lM:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE,t.ONE,t.ONE);break;case cM:console.error("THREE.WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case uM:console.error("THREE.WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:console.error("THREE.WebGLState: Invalid blending: ",U);break}y=null,x=null,S=null,T=null,C.set(0,0,0),P=0,m=U,E=Ze}return}oe=oe||ce,ie=ie||ge,se=se||Se,(ce!==p||oe!==w)&&(t.blendEquationSeparate(Lt[ce],Lt[oe]),p=ce,w=oe),(ge!==y||Se!==x||ie!==S||se!==T)&&(t.blendFuncSeparate(I[ge],I[Se],I[ie],I[se]),y=ge,x=Se,S=ie,T=se),(_e.equals(C)===!1||Ve!==P)&&(t.blendColor(_e.r,_e.g,_e.b,Ve),C.copy(_e),P=Ve),m=U,E=!1}function $e(U,ce){U.side===Rr?be(t.CULL_FACE):Z(t.CULL_FACE);let ge=U.side===si;ce&&(ge=!ge),Ue(ge),U.blending===Wl&&U.transparent===!1?pt(ho):pt(U.blending,U.blendEquation,U.blendSrc,U.blendDst,U.blendEquationAlpha,U.blendSrcAlpha,U.blendDstAlpha,U.blendColor,U.blendAlpha,U.premultipliedAlpha),o.setFunc(U.depthFunc),o.setTest(U.depthTest),o.setMask(U.depthWrite),s.setMask(U.colorWrite);const Se=U.stencilWrite;a.setTest(Se),Se&&(a.setMask(U.stencilWriteMask),a.setFunc(U.stencilFunc,U.stencilRef,U.stencilFuncMask),a.setOp(U.stencilFail,U.stencilZFail,U.stencilZPass)),Ee(U.polygonOffset,U.polygonOffsetFactor,U.polygonOffsetUnits),U.alphaToCoverage===!0?Z(t.SAMPLE_ALPHA_TO_COVERAGE):be(t.SAMPLE_ALPHA_TO_COVERAGE)}function Ue(U){M!==U&&(U?t.frontFace(t.CW):t.frontFace(t.CCW),M=U)}function Re(U){U!==hq?(Z(t.CULL_FACE),U!==N&&(U===aM?t.cullFace(t.BACK):U===pq?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):be(t.CULL_FACE),N=U}function ft(U){U!==k&&(H&&t.lineWidth(U),k=U)}function Ee(U,ce,ge){U?(Z(t.POLYGON_OFFSET_FILL),(z!==ce||F!==ge)&&(t.polygonOffset(ce,ge),z=ce,F=ge)):be(t.POLYGON_OFFSET_FILL)}function qe(U){U?Z(t.SCISSOR_TEST):be(t.SCISSOR_TEST)}function Rt(U){U===void 0&&(U=t.TEXTURE0+$-1),O!==U&&(t.activeTexture(U),O=U)}function Pt(U,ce,ge){ge===void 0&&(O===null?ge=t.TEXTURE0+$-1:ge=O);let Se=j[ge];Se===void 0&&(Se={type:void 0,texture:void 0},j[ge]=Se),(Se.type!==U||Se.texture!==ce)&&(O!==ge&&(t.activeTexture(ge),O=ge),t.bindTexture(U,ce||K[U]),Se.type=U,Se.texture=ce)}function D(){const U=j[O];U!==void 0&&U.type!==void 0&&(t.bindTexture(U.type,null),U.type=void 0,U.texture=void 0)}function A(){try{t.compressedTexImage2D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function G(){try{t.compressedTexImage3D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function Q(){try{t.texSubImage2D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function re(){try{t.texSubImage3D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function ee(){try{t.compressedTexSubImage2D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function Ie(){try{t.compressedTexSubImage3D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function de(){try{t.texStorage2D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function De(){try{t.texStorage3D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function Le(){try{t.texImage2D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function le(){try{t.texImage3D(...arguments)}catch(U){console.error("THREE.WebGLState:",U)}}function ve(U){pe.equals(U)===!1&&(t.scissor(U.x,U.y,U.z,U.w),pe.copy(U))}function Be(U){he.equals(U)===!1&&(t.viewport(U.x,U.y,U.z,U.w),he.copy(U))}function Ce(U,ce){let ge=c.get(ce);ge===void 0&&(ge=new WeakMap,c.set(ce,ge));let Se=ge.get(U);Se===void 0&&(Se=t.getUniformBlockIndex(ce,U.name),ge.set(U,Se))}function ye(U,ce){const Se=c.get(ce).get(U);l.get(ce)!==Se&&(t.uniformBlockBinding(ce,Se,U.__bindingPointIndex),l.set(ce,Se))}function Ye(){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.blendColor
vendor: 5,766 bytes, line 4137
4137(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),o.setReversed(!1),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),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),u={},O=null,j={},d={},f=new WeakMap,h=[],v=null,g=!1,m=null,p=null,y=null,x=null,w=null,S=null,T=null,C=new xt(0,0,0),P=0,E=!1,M=null,N=null,k=null,z=null,F=null,pe.set(0,0,t.canvas.width,t.canvas.height),he.set(0,0,t.canvas.width,t.canvas.height),s.reset(),o.reset(),a.reset()}return{buffers:{color:s,depth:o,stencil:a},enable:Z,disable:be,bindFramebuffer:Oe,drawBuffers:Ae,useProgram:Xe,setBlending:pt,setMaterial:$e,setFlipSided:Ue,setCullFace:Re,setLineWidth:ft,setPolygonOffset:Ee,setScissorTest:qe,activeTexture:Rt,bindTexture:Pt,unbindTexture:D,compressedTexImage2D:A,compressedTexImage3D:G,texImage2D:Le,texImage3D:le,updateUBOMapping:Ce,uniformBlockBinding:ye,texStorage2D:de,texStorage3D:De,texSubImage2D:Q,texSubImage3D:re,compressedTexSubImage2D:ee,compressedTexSubImage3D:Ie,scissor:ve,viewport:Be,reset:Ye}}function pee(t,e,n,i,r,s,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new wt,u=new WeakMap;let d;const f=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(D,A){return h?new OffscreenCanvas(D,A):hd("canvas")}function g(D,A,G){let Q=1;const re=Pt(D);if((re.width>G||re.height>G)&&(Q=G/Math.max(re.width,re.height)),Q<1)if(typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&D instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&D instanceof ImageBitmap||typeof VideoFrame<"u"&&D instanceof VideoFrame){const ee=Math.floor(Q*re.width),Ie=Math.floor(Q*re.height);d===void 0&&(d=v(ee,Ie));const de=A?v(ee,Ie):d;return de.width=ee,de.height=Ie,de.getContext("2d").drawImage(D,0,0,ee,Ie),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+re.width+"x"+re.height+") to ("+ee+"x"+Ie+")."),de}else return"data"in D&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+re.width+"x"+re.height+")."),D;return D}function m(D){return D.generateMipmaps}function p(D){t.generateMipmap(D)}function y(D){return D.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:D.isWebGL3DRenderTarget?t.TEXTURE_3D:D.isWebGLArrayRenderTarget||D.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function x(D,A,G,Q,re=!1){if(D!==null){if(t[D]!==void 0)return t[D];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+D+"'")}let ee=A;if(A===t.RED&&(G===t.FLOAT&&(ee=t.R32F),G===t.HALF_FLOAT&&(ee=t.R16F),G===t.UNSIGNED_BYTE&&(ee=t.R8)),A===t.RED_INTEGER&&(G===t.UNSIGNED_BYTE&&(ee=t.R8UI),G===t.UNSIGNED_SHORT&&(ee=t.R16UI),G===t.UNSIGNED_INT&&(ee=t.R32UI),G===t.BYTE&&(ee=t.R8I),G===t.SHORT&&(ee=t.R16I),G===t.INT&&(ee=t.R32I)),A===t.RG&&(G===t.FLOAT&&(ee=t.RG32F),G===t.HALF_FLOAT&&(ee=t.RG16F),G===t.UNSIGNED_BYTE&&(ee=t.RG8)),A===t.RG_INTEGER&&(G===t.UNSIGNED_BYTE&&(ee=t.RG8UI),G===t.UNSIGNED_SHORT&&(ee=t.RG16UI),G===t.UNSIGNED_INT&&(ee=t.RG32UI),G===t.BYTE&&(ee=t.RG8I),G===t.SHORT&&(ee=t.RG16I),G===t.INT&&(ee=t.RG32I)),A===t.RGB_INTEGER&&(G===t.UNSIGNED_BYTE&&(ee=t.RGB8UI),G===t.UNSIGNED_SHORT&&(ee=t.RGB16UI),G===t.UNSIGNED_INT&&(ee=t.RGB32UI),G===t.BYTE&&(ee=t.RGB8I),G===t.SHORT&&(ee=t.RGB16I),G===t.INT&&(ee=t.RGB32I)),A===t.RGBA_INTEGER&&(G===t.UNSIGNED_BYTE&&(ee=t.RGBA8UI),G===t.UNSIGNED_SHORT&&(ee=t.RGBA16UI),G===t.UNSIGNED_INT&&(ee=t.RGBA32UI),G===t.BYTE&&(ee=t.RGBA8I),G===t.SHORT&&(ee=t.RGBA16I),G===t.INT&&(ee=t.RGBA32I)),A===t.RGB&&(G===t.UNSIGNED_INT_5_9_9_9_REV&&(ee=t.RGB9_E5),G===t.UNSIGNED_INT_10F_11F_11F_REV&&(ee=t.R11F_G11F_B10F)),A===t.RGBA){const Ie=re?bp:ct.getTransfer(Q);G===t.FLOAT&&(ee=t.RGBA32F),G===t.HALF_FLOAT&&(ee=t.RGBA16F),G===t.UNSIGNED_BYTE&&(ee=Ie===yt?t.SRGB8_ALPHA8:t.RGBA8),G===t.UNSIGNED_SHORT_4_4_4_4&&(ee=t.RGBA4),G===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 w(D,A){let G;return D?A===null||A===Pa||A===ud?G=t.DEPTH24_STENCIL8:A===Dr?G=t.DEPTH32F_STENCIL8:A===cd&&(G=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):A===null||A===Pa||A===ud?G=t.DEPTH_COMPONENT24:A===Dr?G=t.DEPTH_COMPONENT32F:A===cd&&(G=t.DEPTH_COMPONENT16),G}function S(D,A){return m(D)===!0||D.isFramebufferTexture&&D.minFilter!==yi&&D.minFilter!==Ui?Math.log2(Math.max(A.width,A.height))+1:D.mipmaps!==void 0&&D.mipmaps.length>0?D.mipmaps.length:D.isCompressedTexture&&Array.isArray(D.image)?A.mipmaps.length:1}function T(D){const A=D.target;A.removeEventListener("dispose",T),P(A),A.isVideoTexture&&u.delete(A)}function C(D){const A=D.target;A.removeEventListener("dispose",C),M(A)}function P(D){const A=i.get(D);if(A.__webglInit===void 0)return;const G=D.source,Q=f.get(G);if(Q){const re=Q[A.__cacheKey];re.usedTimes--,re.usedTimes===0&&E(D),Object.keys(Q).length===0&&f.delete(G)}i.remove(D)}function E(D){const A=i.get(D);t.deleteTexture(A.__webglTexture);const G=D.source,Q=f.get(G);delete Q[A.__cacheKey],o.memory.textures--}function M(D){const A=i.get(D);if(D.depthTexture&&(D.depthTexture.dispose(),i.remove(D.depthTexture)),D.isWebG
vendor: 6,055 bytes, line 4137
4137LCubeRenderTarget)for(let Q=0;Q<6;Q++){if(Array.isArray(A.__webglFramebuffer[Q]))for(let re=0;re<A.__webglFramebuffer[Q].length;re++)t.deleteFramebuffer(A.__webglFramebuffer[Q][re]);else t.deleteFramebuffer(A.__webglFramebuffer[Q]);A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer[Q])}else{if(Array.isArray(A.__webglFramebuffer))for(let Q=0;Q<A.__webglFramebuffer.length;Q++)t.deleteFramebuffer(A.__webglFramebuffer[Q]);else t.deleteFramebuffer(A.__webglFramebuffer);if(A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer),A.__webglMultisampledFramebuffer&&t.deleteFramebuffer(A.__webglMultisampledFramebuffer),A.__webglColorRenderbuffer)for(let Q=0;Q<A.__webglColorRenderbuffer.length;Q++)A.__webglColorRenderbuffer[Q]&&t.deleteRenderbuffer(A.__webglColorRenderbuffer[Q]);A.__webglDepthRenderbuffer&&t.deleteRenderbuffer(A.__webglDepthRenderbuffer)}const G=D.textures;for(let Q=0,re=G.length;Q<re;Q++){const ee=i.get(G[Q]);ee.__webglTexture&&(t.deleteTexture(ee.__webglTexture),o.memory.textures--),i.remove(G[Q])}i.remove(D)}let N=0;function k(){N=0}function z(){const D=N;return D>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+D+" texture units while this GPU supports only "+r.maxTextures),N+=1,D}function F(D){const A=[];return A.push(D.wrapS),A.push(D.wrapT),A.push(D.wrapR||0),A.push(D.magFilter),A.push(D.minFilter),A.push(D.anisotropy),A.push(D.internalFormat),A.push(D.format),A.push(D.type),A.push(D.generateMipmaps),A.push(D.premultiplyAlpha),A.push(D.flipY),A.push(D.unpackAlignment),A.push(D.colorSpace),A.join()}function $(D,A){const G=i.get(D);if(D.isVideoTexture&&qe(D),D.isRenderTargetTexture===!1&&D.isExternalTexture!==!0&&D.version>0&&G.__version!==D.version){const Q=D.image;if(Q===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Q.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{K(G,D,A);return}}else D.isExternalTexture&&(G.__webglTexture=D.sourceTexture?D.sourceTexture:null);n.bindTexture(t.TEXTURE_2D,G.__webglTexture,t.TEXTURE0+A)}function H(D,A){const G=i.get(D);if(D.isRenderTargetTexture===!1&&D.version>0&&G.__version!==D.version){K(G,D,A);return}n.bindTexture(t.TEXTURE_2D_ARRAY,G.__webglTexture,t.TEXTURE0+A)}function W(D,A){const G=i.get(D);if(D.isRenderTargetTexture===!1&&D.version>0&&G.__version!==D.version){K(G,D,A);return}n.bindTexture(t.TEXTURE_3D,G.__webglTexture,t.TEXTURE0+A)}function L(D,A){const G=i.get(D);if(D.version>0&&G.__version!==D.version){Z(G,D,A);return}n.bindTexture(t.TEXTURE_CUBE_MAP,G.__webglTexture,t.TEXTURE0+A)}const O={[S0]:t.REPEAT,[cs]:t.CLAMP_TO_EDGE,[E0]:t.MIRRORED_REPEAT},j={[yi]:t.NEAREST,[jq]:t.NEAREST_MIPMAP_NEAREST,[Af]:t.NEAREST_MIPMAP_LINEAR,[Ui]:t.LINEAR,[Hg]:t.LINEAR_MIPMAP_NEAREST,[oa]:t.LINEAR_MIPMAP_LINEAR},J={[qq]:t.NEVER,[eY]:t.ALWAYS,[Yq]:t.LESS,[OL]:t.LEQUAL,[Kq]:t.EQUAL,[Jq]:t.GEQUAL,[Zq]:t.GREATER,[Qq]:t.NOTEQUAL};function ne(D,A){if(A.type===Dr&&e.has("OES_texture_float_linear")===!1&&(A.magFilter===Ui||A.magFilter===Hg||A.magFilter===Af||A.magFilter===oa||A.minFilter===Ui||A.minFilter===Hg||A.minFilter===Af||A.minFilter===oa)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(D,t.TEXTURE_WRAP_S,O[A.wrapS]),t.texParameteri(D,t.TEXTURE_WRAP_T,O[A.wrapT]),(D===t.TEXTURE_3D||D===t.TEXTURE_2D_ARRAY)&&t.texParameteri(D,t.TEXTURE_WRAP_R,O[A.wrapR]),t.texParameteri(D,t.TEXTURE_MAG_FILTER,j[A.magFilter]),t.texParameteri(D,t.TEXTURE_MIN_FILTER,j[A.minFilter]),A.compareFunction&&(t.texParameteri(D,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(D,t.TEXTURE_COMPARE_FUNC,J[A.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(A.magFilter===yi||A.minFilter!==Af&&A.minFilter!==oa||A.type===Dr&&e.has("OES_texture_float_linear")===!1)return;if(A.anisotropy>1||i.get(A).__currentAnisotropy){const G=e.get("EXT_texture_filter_anisotropic");t.texParameterf(D,G.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),i.get(A).__currentAnisotropy=A.anisotropy}}}function pe(D,A){let G=!1;D.__webglInit===void 0&&(D.__webglInit=!0,A.addEventListener("dispose",T));const Q=A.source;let re=f.get(Q);re===void 0&&(re={},f.set(Q,re));const ee=F(A);if(ee!==D.__cacheKey){re[ee]===void 0&&(re[ee]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,G=!0),re[ee].usedTimes++;const Ie=re[D.__cacheKey];Ie!==void 0&&(re[D.__cacheKey].usedTimes--,Ie.usedTimes===0&&E(A)),D.__cacheKey=ee,D.__webglTexture=re[ee].texture}return G}function he(D,A,G){return Math.floor(Math.floor(D/G)/A)}function Ne(D,A,G,Q){const ee=D.updateRanges;if(ee.length===0)n.texSubImage2D(t.TEXTURE_2D,0,0,0,A.width,A.height,G,Q,A.data);else{ee.sort((le,ve)=>le.start-ve.start);let Ie=0;for(let le=1;le<ee.length;le++){const ve=ee[Ie],Be=ee[le],Ce=ve.start+ve.count,ye=he(Be.start,A.width,4),Ye=he(ve.start,A.width,4);Be.start<=Ce+1&&ye===Ye&&he(Be.start+Be.count-1,A.width,4)===ye?ve.count=Math.max(ve.count,Be.start+Be.count-ve.start):(++Ie,ee[Ie]=Be)}ee.length=Ie+1;const de=t.getParameter(t.UNPACK_ROW_LENGTH),De=t.getParameter(t.UNPACK_SKIP_PIXELS),Le=t.getParameter(t.UNPACK_SKIP_ROWS);t.pixelStorei(t.UNPACK_ROW_LENGTH,A.width);for(let le=0,ve=ee.length;le<ve;le++){const Be=ee[le],Ce=Math.floor(Be.start/4),ye=Math.ceil(Be.count/4),Ye=Ce%A.width,U=Math.floor(Ce/A.width),ce=ye,ge=1;t.pixelStorei(t.UNPACK_SKIP_PIXELS,Ye),t.pixelStorei(t.UNPACK_SKIP_ROWS,U),n.texSubImage2D(t.TEXTURE_2D,0,Ye,U,ce,ge,G,Q,A.data)}D.clearUpdateRanges(),t.pixelStorei(t.UNPACK_ROW_LENGTH,de),t.pixelStorei(t.UNPACK_SKIP_PIXELS,De),t.pixelStorei(t.UNPACK_SKIP_ROWS,Le)}}function K(D,A,G){let Q=t.TEXTURE_2D;(A.isDataArrayTexture||A.isCompressedArrayTexture)&&(Q=t.TEXTURE_2D_ARRAY),A.isData3DTexture&&(Q=t.TEXTURE_3D);const re=pe(D,A),ee=A.source;n.bindTexture(Q,D.__webglTexture,t.TEXTURE0+G);const Ie=i.get(ee);if(ee.version!==Ie.__version||re===!0){n.activeTexture(t.TEXTURE0+G);
vendor: 13,313 bytes, line 4137
4137const de=ct.getPrimaries(ct.workingColorSpace),De=A.colorSpace===Gs?null:ct.getPrimaries(A.colorSpace),Le=A.colorSpace===Gs||de===De?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,A.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,A.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Le);let le=g(A.image,!1,r.maxTextureSize);le=Rt(A,le);const ve=s.convert(A.format,A.colorSpace),Be=s.convert(A.type);let Ce=x(A.internalFormat,ve,Be,A.colorSpace,A.isVideoTexture);ne(Q,A);let ye;const Ye=A.mipmaps,U=A.isVideoTexture!==!0,ce=Ie.__version===void 0||re===!0,ge=ee.dataReady,Se=S(A,le);if(A.isDepthTexture)Ce=w(A.format===fd,A.type),ce&&(U?n.texStorage2D(t.TEXTURE_2D,1,Ce,le.width,le.height):n.texImage2D(t.TEXTURE_2D,0,Ce,le.width,le.height,0,ve,Be,null));else if(A.isDataTexture)if(Ye.length>0){U&&ce&&n.texStorage2D(t.TEXTURE_2D,Se,Ce,Ye[0].width,Ye[0].height);for(let oe=0,ie=Ye.length;oe<ie;oe++)ye=Ye[oe],U?ge&&n.texSubImage2D(t.TEXTURE_2D,oe,0,0,ye.width,ye.height,ve,Be,ye.data):n.texImage2D(t.TEXTURE_2D,oe,Ce,ye.width,ye.height,0,ve,Be,ye.data);A.generateMipmaps=!1}else U?(ce&&n.texStorage2D(t.TEXTURE_2D,Se,Ce,le.width,le.height),ge&&Ne(A,le,ve,Be)):n.texImage2D(t.TEXTURE_2D,0,Ce,le.width,le.height,0,ve,Be,le.data);else if(A.isCompressedTexture)if(A.isCompressedArrayTexture){U&&ce&&n.texStorage3D(t.TEXTURE_2D_ARRAY,Se,Ce,Ye[0].width,Ye[0].height,le.depth);for(let oe=0,ie=Ye.length;oe<ie;oe++)if(ye=Ye[oe],A.format!==zi)if(ve!==null)if(U){if(ge)if(A.layerUpdates.size>0){const se=DM(ye.width,ye.height,A.format,A.type);for(const _e of A.layerUpdates){const Ve=ye.data.subarray(_e*se/ye.data.BYTES_PER_ELEMENT,(_e+1)*se/ye.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,oe,0,0,_e,ye.width,ye.height,1,ve,Ve)}A.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,oe,0,0,0,ye.width,ye.height,le.depth,ve,ye.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,oe,Ce,ye.width,ye.height,le.depth,0,ye.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else U?ge&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,oe,0,0,0,ye.width,ye.height,le.depth,ve,Be,ye.data):n.texImage3D(t.TEXTURE_2D_ARRAY,oe,Ce,ye.width,ye.height,le.depth,0,ve,Be,ye.data)}else{U&&ce&&n.texStorage2D(t.TEXTURE_2D,Se,Ce,Ye[0].width,Ye[0].height);for(let oe=0,ie=Ye.length;oe<ie;oe++)ye=Ye[oe],A.format!==zi?ve!==null?U?ge&&n.compressedTexSubImage2D(t.TEXTURE_2D,oe,0,0,ye.width,ye.height,ve,ye.data):n.compressedTexImage2D(t.TEXTURE_2D,oe,Ce,ye.width,ye.height,0,ye.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):U?ge&&n.texSubImage2D(t.TEXTURE_2D,oe,0,0,ye.width,ye.height,ve,Be,ye.data):n.texImage2D(t.TEXTURE_2D,oe,Ce,ye.width,ye.height,0,ve,Be,ye.data)}else if(A.isDataArrayTexture)if(U){if(ce&&n.texStorage3D(t.TEXTURE_2D_ARRAY,Se,Ce,le.width,le.height,le.depth),ge)if(A.layerUpdates.size>0){const oe=DM(le.width,le.height,A.format,A.type);for(const ie of A.layerUpdates){const se=le.data.subarray(ie*oe/le.data.BYTES_PER_ELEMENT,(ie+1)*oe/le.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,ie,le.width,le.height,1,ve,Be,se)}A.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,le.width,le.height,le.depth,ve,Be,le.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Ce,le.width,le.height,le.depth,0,ve,Be,le.data);else if(A.isData3DTexture)U?(ce&&n.texStorage3D(t.TEXTURE_3D,Se,Ce,le.width,le.height,le.depth),ge&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,le.width,le.height,le.depth,ve,Be,le.data)):n.texImage3D(t.TEXTURE_3D,0,Ce,le.width,le.height,le.depth,0,ve,Be,le.data);else if(A.isFramebufferTexture){if(ce)if(U)n.texStorage2D(t.TEXTURE_2D,Se,Ce,le.width,le.height);else{let oe=le.width,ie=le.height;for(let se=0;se<Se;se++)n.texImage2D(t.TEXTURE_2D,se,Ce,oe,ie,0,ve,Be,null),oe>>=1,ie>>=1}}else if(Ye.length>0){if(U&&ce){const oe=Pt(Ye[0]);n.texStorage2D(t.TEXTURE_2D,Se,Ce,oe.width,oe.height)}for(let oe=0,ie=Ye.length;oe<ie;oe++)ye=Ye[oe],U?ge&&n.texSubImage2D(t.TEXTURE_2D,oe,0,0,ve,Be,ye):n.texImage2D(t.TEXTURE_2D,oe,Ce,ve,Be,ye);A.generateMipmaps=!1}else if(U){if(ce){const oe=Pt(le);n.texStorage2D(t.TEXTURE_2D,Se,Ce,oe.width,oe.height)}ge&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,ve,Be,le)}else n.texImage2D(t.TEXTURE_2D,0,Ce,ve,Be,le);m(A)&&p(Q),Ie.__version=ee.version,A.onUpdate&&A.onUpdate(A)}D.__version=A.version}function Z(D,A,G){if(A.image.length!==6)return;const Q=pe(D,A),re=A.source;n.bindTexture(t.TEXTURE_CUBE_MAP,D.__webglTexture,t.TEXTURE0+G);const ee=i.get(re);if(re.version!==ee.__version||Q===!0){n.activeTexture(t.TEXTURE0+G);const Ie=ct.getPrimaries(ct.workingColorSpace),de=A.colorSpace===Gs?null:ct.getPrimaries(A.colorSpace),De=A.colorSpace===Gs||Ie===de?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,A.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,A.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,De);const Le=A.isCompressedTexture||A.image[0].isCompressedTexture,le=A.image[0]&&A.image[0].isDataTexture,ve=[];for(let ie=0;ie<6;ie++)!Le&&!le?ve[ie]=g(A.image[ie],!0,r.maxCubemapSize):ve[ie]=le?A.image[ie].image:A.image[ie],ve[ie]=Rt(A,ve[ie]);const Be=ve[0],Ce=s.convert(A.format,A.colorSpace),ye=s.convert(A.type),Ye=x(A.internalFormat,Ce,ye,A.colorSpace),U=A.isVideoTexture!==!0,ce=ee.__version===void 0||Q===!0,ge=re.dataReady;let Se=S(A,Be);ne(t.TEXTURE_CUBE_MAP,A);let oe;if(Le){U&&ce&&n.texStorage2D(t.TEXTURE_CUBE_MAP,Se,Ye,Be.width,Be.height);for(let ie=0;ie<6;ie++){oe=ve[ie].mipmaps;for(let se=0;se<oe.length;se++){const _e=oe[se];A.format!==zi?Ce!==null?U?ge&&n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se,0,0,_e.width,_e.height,Ce,_e.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se,Ye,_e.width,_e.height,0,_e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):U?ge&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se,0,0,_e.width,_e.height,Ce,ye,_e.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se,Ye,_e.width,_e.height,0,Ce,ye,_e.data)}}}else{if(oe=A.mipmaps,U&&ce){oe.length>0&&Se++;const ie=Pt(ve[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Se,Ye,ie.width,ie.height)}for(let ie=0;ie<6;ie++)if(le){U?ge&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,0,0,ve[ie].width,ve[ie].height,Ce,ye,ve[ie].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,Ye,ve[ie].width,ve[ie].height,0,Ce,ye,ve[ie].data);for(let se=0;se<oe.length;se++){const Ve=oe[se].image[ie].image;U?ge&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se+1,0,0,Ve.width,Ve.height,Ce,ye,Ve.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se+1,Ye,Ve.width,Ve.height,0,Ce,ye,Ve.data)}}else{U?ge&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,0,0,Ce,ye,ve[ie]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,Ye,Ce,ye,ve[ie]);for(let se=0;se<oe.length;se++){const _e=oe[se];U?ge&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se+1,0,0,Ce,ye,_e.image[ie]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ie,se+1,Ye,Ce,ye,_e.image[ie])}}}m(A)&&p(t.TEXTURE_CUBE_MAP),ee.__version=re.version,A.onUpdate&&A.onUpdate(A)}D.__version=A.version}function be(D,A,G,Q,re,ee){const Ie=s.convert(G.format,G.colorSpace),de=s.convert(G.type),De=x(G.internalFormat,Ie,de,G.colorSpace),Le=i.get(A),le=i.get(G);if(le.__renderTarget=A,!Le.__hasExternalTextures){const ve=Math.max(1,A.width>>ee),Be=Math.max(1,A.height>>ee);re===t.TEXTURE_3D||re===t.TEXTURE_2D_ARRAY?n.texImage3D(re,ee,De,ve,Be,A.depth,0,Ie,de,null):n.texImage2D(re,ee,De,ve,Be,0,Ie,de,null)}n.bindFramebuffer(t.FRAMEBUFFER,D),Ee(A)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Q,re,le.__webglTexture,0,ft(A)):(re===t.TEXTURE_2D||re>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&re<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,Q,re,le.__webglTexture,ee),n.bindFramebuffer(t.FRAMEBUFFER,null)}function Oe(D,A,G){if(t.bindRenderbuffer(t.RENDERBUFFER,D),A.depthBuffer){const Q=A.depthTexture,re=Q&&Q.isDepthTexture?Q.type:null,ee=w(A.stencilBuffer,re),Ie=A.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,de=ft(A);Ee(A)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,de,ee,A.width,A.height):G?t.renderbufferStorageMultisample(t.RENDERBUFFER,de,ee,A.width,A.height):t.renderbufferStorage(t.RENDERBUFFER,ee,A.width,A.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ie,t.RENDERBUFFER,D)}else{const Q=A.textures;for(let re=0;re<Q.length;re++){const ee=Q[re],Ie=s.convert(ee.format,ee.colorSpace),de=s.convert(ee.type),De=x(ee.internalFormat,Ie,de,ee.colorSpace),Le=ft(A);G&&Ee(A)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,Le,De,A.width,A.height):Ee(A)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Le,De,A.width,A.height):t.renderbufferStorage(t.RENDERBUFFER,De,A.width,A.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function Ae(D,A){if(A&&A.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,D),!(A.depthTexture&&A.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Q=i.get(A.depthTexture);Q.__renderTarget=A,(!Q.__webglTexture||A.depthTexture.image.width!==A.width||A.depthTexture.image.height!==A.height)&&(A.depthTexture.image.width=A.width,A.depthTexture.image.height=A.height,A.depthTexture.needsUpdate=!0),$(A.depthTexture,0);const re=Q.__webglTexture,ee=ft(A);if(A.depthTexture.format===dd)Ee(A)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,re,0,ee):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,re,0);else if(A.depthTexture.format===fd)Ee(A)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,re,0,ee):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,re,0);else throw new Error("Unknown depthTexture format")}function Xe(D){const A=i.get(D),G=D.isWebGLCubeRenderTarget===!0;if(A.__boundDepthTexture!==D.depthTexture){const Q=D.depthTexture;if(A.__depthDisposeCallback&&A.__depthDisposeCallback(),Q){const re=()=>{delete A.__boundDepthTexture,delete A.__depthDisposeCallback,Q.removeEventListener("dispose",re)};Q.addEventListener("dispose",re),A.__depthDisposeCallback=re}A.__boundDepthTexture=Q}if(D.depthTexture&&!A.__autoAllocateDepthBuffer){if(G)throw new Error("target.depthTexture not supported in Cube render targets");const Q=D.texture.mipmaps;Q&&Q.length>0?Ae(A.__webglFramebuffer[0],D):Ae(A.__webglFramebuffer,D)}else if(G){A.__webglDepthbuffer=[];for(let Q=0;Q<6;Q++)if(n.bindFramebuffer(t.FRAMEBUFFER,A.__webglFramebuffer[Q]),A.__webglDepthbuffer[Q]===void 0)A.__webglDepthbuffer[Q]=t.createRenderbuffer(),Oe(A.__webglDepthbuffer[Q],D,!1);else{const re=D.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ee=A.__webglDepthbuffer[Q];t.bindRenderbuffer(t.RENDERBUFFER,ee),t.framebufferRenderbuffer(t.FRAMEBUFFER,re,t.RENDERBUFFER,ee)}}else{const Q=D.texture.mipmaps;if(Q&&Q.length>0?n.bindFramebuffer(t.FRAMEBUFFER,A.__webglFramebuffer[0]):n.bindFramebuffer(t.FRAMEBUFFER,A.__webglFramebuffer),A.__webglDepthbuffer===void 0)A.__webglDepthbuffer=t.createRenderbuffer(),Oe(A.__webglDepthbuffer,D,!1);else{const re=D.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ee=A.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,ee),t.framebufferRenderbuffer(t.FRAMEBUFFER,re,t.RENDERBUFFER,ee)}}n.bindFramebuffer(t.FRAMEBUFFER,null)}function Lt(D,A,G){const Q=i.get(D);A!==void 0&&be(Q.__webglFramebuffer,D,D.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),G!==void 0&&Xe(D)}function I(D){const A=D.texture,G=i.get(D),Q=i.get(A);D.addEventListener("dispose",C);const re=D.textures,ee=D.isWebGLCubeRenderTarget===!0,Ie=re.length>1;if(Ie||(Q.__webglTexture===void 0&&(Q.__webglTexture=t.createTexture()),Q.__version=A.version,o.memory.textures++),ee){G.__webglFramebuffer=[];for(let de=0;de<6;de++)if(A.mipmaps&&A.mipmaps.length>0){G.__webglFramebuffer[de]=[];for(let De=0;De<A.mipmaps.length;De++)G.__webglFramebuffer[de][De]=t.createFramebuffer()}else G.__webglFramebuffer[de]=t.createFramebuffer()}else{if(A.mipmaps&&A.mipmaps.length>0){G.__webglFramebuffer=[];for(let de=0;de<A.mipmaps.length;de++)G.__webglFramebuffer[de]=t.createFramebuffer()}else G.__webglFramebuffer=t.createFramebuffer();if(Ie)for(let de=0,De=re.length;de<De;de++){const Le=i.get(re[de]);Le.__webglTexture===void 0&&(Le.__webglTexture=t.createTexture(),o.memory.textures++)}if(D.samples>0&&Ee(D)===!1){G.__webglMultisampledFramebuffer=t.createFramebuffer(),G.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,G.__webglMultisampledFramebuffer);for(let de=0;de<re.length;de++){const De=re[de];G.__webglColorRenderbuffer[de]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,G.__webglColorRenderbuffer[de]);const Le=s.convert(De.format,De.colorSpace),le=s.convert(De.type),ve=x(De.internalFormat,Le,le,De.colorSpace,D.isXRRenderTarget===!0),Be=ft(D);t.renderbufferStorageMultisample(t.RENDERBUFFER,Be,ve,D.width,D.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+de,t.RENDERBUFFER,G.__webglColorRen
vendor: 4,472 bytes, line 4137
4137derbuffer[de])}t.bindRenderbuffer(t.RENDERBUFFER,null),D.depthBuffer&&(G.__webglDepthRenderbuffer=t.createRenderbuffer(),Oe(G.__webglDepthRenderbuffer,D,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(ee){n.bindTexture(t.TEXTURE_CUBE_MAP,Q.__webglTexture),ne(t.TEXTURE_CUBE_MAP,A);for(let de=0;de<6;de++)if(A.mipmaps&&A.mipmaps.length>0)for(let De=0;De<A.mipmaps.length;De++)be(G.__webglFramebuffer[de][De],D,A,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+de,De);else be(G.__webglFramebuffer[de],D,A,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+de,0);m(A)&&p(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(Ie){for(let de=0,De=re.length;de<De;de++){const Le=re[de],le=i.get(Le);let ve=t.TEXTURE_2D;(D.isWebGL3DRenderTarget||D.isWebGLArrayRenderTarget)&&(ve=D.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(ve,le.__webglTexture),ne(ve,Le),be(G.__webglFramebuffer,D,Le,t.COLOR_ATTACHMENT0+de,ve,0),m(Le)&&p(ve)}n.unbindTexture()}else{let de=t.TEXTURE_2D;if((D.isWebGL3DRenderTarget||D.isWebGLArrayRenderTarget)&&(de=D.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(de,Q.__webglTexture),ne(de,A),A.mipmaps&&A.mipmaps.length>0)for(let De=0;De<A.mipmaps.length;De++)be(G.__webglFramebuffer[De],D,A,t.COLOR_ATTACHMENT0,de,De);else be(G.__webglFramebuffer,D,A,t.COLOR_ATTACHMENT0,de,0);m(A)&&p(de),n.unbindTexture()}D.depthBuffer&&Xe(D)}function pt(D){const A=D.textures;for(let G=0,Q=A.length;G<Q;G++){const re=A[G];if(m(re)){const ee=y(D),Ie=i.get(re).__webglTexture;n.bindTexture(ee,Ie),p(ee),n.unbindTexture()}}}const $e=[],Ue=[];function Re(D){if(D.samples>0){if(Ee(D)===!1){const A=D.textures,G=D.width,Q=D.height;let re=t.COLOR_BUFFER_BIT;const ee=D.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ie=i.get(D),de=A.length>1;if(de)for(let Le=0;Le<A.length;Le++)n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Le,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+Le,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer);const De=D.texture.mipmaps;De&&De.length>0?n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ie.__webglFramebuffer[0]):n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ie.__webglFramebuffer);for(let Le=0;Le<A.length;Le++){if(D.resolveDepthBuffer&&(D.depthBuffer&&(re|=t.DEPTH_BUFFER_BIT),D.stencilBuffer&&D.resolveStencilBuffer&&(re|=t.STENCIL_BUFFER_BIT)),de){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,Ie.__webglColorRenderbuffer[Le]);const le=i.get(A[Le]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,le,0)}t.blitFramebuffer(0,0,G,Q,0,0,G,Q,re,t.NEAREST),l===!0&&($e.length=0,Ue.length=0,$e.push(t.COLOR_ATTACHMENT0+Le),D.depthBuffer&&D.resolveDepthBuffer===!1&&($e.push(ee),Ue.push(ee),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,Ue)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,$e))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),de)for(let Le=0;Le<A.length;Le++){n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Le,t.RENDERBUFFER,Ie.__webglColorRenderbuffer[Le]);const le=i.get(A[Le]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,Ie.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+Le,t.TEXTURE_2D,le,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Ie.__webglMultisampledFramebuffer)}else if(D.depthBuffer&&D.resolveDepthBuffer===!1&&l){const A=D.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[A])}}}function ft(D){return Math.min(r.maxSamples,D.samples)}function Ee(D){const A=i.get(D);return D.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&A.__useRenderToTexture!==!1}function qe(D){const A=o.render.frame;u.get(D)!==A&&(u.set(D,A),D.update())}function Rt(D,A){const G=D.colorSpace,Q=D.format,re=D.type;return D.isCompressedTexture===!0||D.isVideoTexture===!0||G!==Sc&&G!==Gs&&(ct.getTransfer(G)===yt?(Q!==zi||re!==ws)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",G)),A}function Pt(D){return typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement?(c.width=D.naturalWi
vendor: 4,409 bytes, line 4137
4137dth||D.width,c.height=D.naturalHeight||D.height):typeof VideoFrame<"u"&&D instanceof VideoFrame?(c.width=D.displayWidth,c.height=D.displayHeight):(c.width=D.width,c.height=D.height),c}this.allocateTextureUnit=z,this.resetTextureUnits=k,this.setTexture2D=$,this.setTexture2DArray=H,this.setTexture3D=W,this.setTextureCube=L,this.rebindTextures=Lt,this.setupRenderTarget=I,this.updateRenderTargetMipmap=pt,this.updateMultisampleRenderTarget=Re,this.setupDepthRenderbuffer=Xe,this.setupFrameBufferTexture=be,this.useMultisampledRTT=Ee}function mee(t,e){function n(i,r=Gs){let s;const o=ct.getTransfer(r);if(i===ws)return t.UNSIGNED_BYTE;if(i===yw)return t.UNSIGNED_SHORT_4_4_4_4;if(i===xw)return t.UNSIGNED_SHORT_5_5_5_1;if(i===PL)return t.UNSIGNED_INT_5_9_9_9_REV;if(i===DL)return t.UNSIGNED_INT_10F_11F_11F_REV;if(i===AL)return t.BYTE;if(i===RL)return t.SHORT;if(i===cd)return t.UNSIGNED_SHORT;if(i===vw)return t.INT;if(i===Pa)return t.UNSIGNED_INT;if(i===Dr)return t.FLOAT;if(i===Ld)return t.HALF_FLOAT;if(i===LL)return t.ALPHA;if(i===NL)return t.RGB;if(i===zi)return t.RGBA;if(i===dd)return t.DEPTH_COMPONENT;if(i===fd)return t.DEPTH_STENCIL;if(i===IL)return t.RED;if(i===_w)return t.RED_INTEGER;if(i===kL)return t.RG;if(i===ww)return t.RG_INTEGER;if(i===bw)return t.RGBA_INTEGER;if(i===Eh||i===Mh||i===Th||i===Ch)if(o===yt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Eh)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Mh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Th)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Ch)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Eh)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Mh)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Th)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Ch)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===M0||i===T0||i===C0||i===A0)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===M0)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===T0)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===C0)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===A0)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===R0||i===P0||i===D0)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===R0||i===P0)return o===yt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===D0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===L0||i===N0||i===I0||i===k0||i===O0||i===F0||i===U0||i===z0||i===B0||i===V0||i===H0||i===j0||i===G0||i===W0)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===L0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===N0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===I0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===k0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===O0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===F0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===U0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===z0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===B0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===V0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===H0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===j0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===G0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===W0)return o===yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===$0||i===X0||i===q0)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===$0)return o===yt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===X0)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===q0)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===Y0||i===K0||i===Z0||i===Q0)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===Y0)return s.COMPRESSED_RED_RGT
vendor: 12,521 bytes, lines 4137-4161
4137C1_EXT;if(i===K0)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Z0)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Q0)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===ud?t.UNSIGNED_INT_24_8:t[i]!==void 0?t[i]:null}return{convert:n}}const gee=`
4138void main() {
4139
4140	gl_Position = vec4( position, 1.0 );
4141
4142}`,vee=`
4143uniform sampler2DArray depthColor;
4144uniform float depthWidth;
4145uniform float depthHeight;
4146
4147void main() {
4148
4149	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
4150
4151	if ( coord.x >= 1.0 ) {
4152
4153		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
4154
4155	} else {
4156
4157		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
4158
4159	}
4160
4161}`;class yee{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n){if(this.texture===null){const i=new YL(e.texture);(e.depthNear!==n.depthNear||e.depthFar!==n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,i=new Ss({vertexShader:gee,fragmentShader:vee,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new Nr(new Fd(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class xee extends Fc{constructor(e,n){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,d=null,f=null,h=null,v=null;const g=typeof XRWebGLBinding<"u",m=new yee,p={},y=n.getContextAttributes();let x=null,w=null;const S=[],T=[],C=new wt;let P=null;const E=new sr;E.viewport=new Gt;const M=new sr;M.viewport=new Gt;const N=[E,M],k=new BY;let z=null,F=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(K){let Z=S[K];return Z===void 0&&(Z=new dv,S[K]=Z),Z.getTargetRaySpace()},this.getControllerGrip=function(K){let Z=S[K];return Z===void 0&&(Z=new dv,S[K]=Z),Z.getGripSpace()},this.getHand=function(K){let Z=S[K];return Z===void 0&&(Z=new dv,S[K]=Z),Z.getHandSpace()};function $(K){const Z=T.indexOf(K.inputSource);if(Z===-1)return;const be=S[Z];be!==void 0&&(be.update(K.inputSource,K.frame,c||o),be.dispatchEvent({type:K.type,data:K.inputSource}))}function H(){r.removeEventListener("select",$),r.removeEventListener("selectstart",$),r.removeEventListener("selectend",$),r.removeEventListener("squeeze",$),r.removeEventListener("squeezestart",$),r.removeEventListener("squeezeend",$),r.removeEventListener("end",H),r.removeEventListener("inputsourceschange",W);for(let K=0;K<S.length;K++){const Z=T[K];Z!==null&&(T[K]=null,S[K].disconnect(Z))}z=null,F=null,m.reset();for(const K in p)delete p[K];e.setRenderTarget(x),h=null,f=null,d=null,r=null,w=null,Ne.stop(),i.isPresenting=!1,e.setPixelRatio(P),e.setSize(C.width,C.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(K){s=K,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(K){a=K,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(K){c=K},this.getBaseLayer=function(){return f!==null?f:h},this.getBinding=function(){return d===null&&g&&(d=new XRWebGLBinding(r,n)),d},this.getFrame=function(){return v},this.getSession=function(){return r},this.setSession=async function(K){if(r=K,r!==null){if(x=e.getRenderTarget(),r.addEventListener("select",$),r.addEventListener("selectstart",$),r.addEventListener("selectend",$),r.addEventListener("squeeze",$),r.addEventListener("squeezestart",$),r.addEventListener("squeezeend",$),r.addEventListener("end",H),r.addEventListener("inputsourceschange",W),y.xrCompatible!==!0&&await n.makeXRCompatible(),P=e.getPixelRatio(),e.getSize(C),g&&"createProjectionLayer"in XRWebGLBinding.prototype){let be=null,Oe=null,Ae=null;y.depth&&(Ae=y.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,be=y.stencil?fd:dd,Oe=y.stencil?ud:Pa);const Xe={colorFormat:n.RGBA8,depthFormat:Ae,scaleFactor:s};d=this.getBinding(),f=d.createProjectionLayer(Xe),r.updateRenderState({layers:[f]}),e.setPixelRatio(1),e.setSize(f.textureWidth,f.textureHeight,!1),w=new Da(f.textureWidth,f.textureHeight,{format:zi,type:ws,depthTexture:new qL(f.textureWidth,f.textureHeight,Oe,void 0,void 0,void 0,void 0,void 0,void 0,be),stencilBuffer:y.stencil,colorSpace:e.outputColorSpace,samples:y.antialias?4:0,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}else{const be={antialias:y.antialias,alpha:!0,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:s};h=new XRWebGLLayer(r,n,be),r.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),w=new Da(h.framebufferWidth,h.framebufferHeight,{format:zi,type:ws,colorSpace:e.outputColorSpace,stencilBuffer:y.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}w.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),Ne.setContext(r),Ne.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};function W(K){for(let Z=0;Z<K.removed.length;Z++){const be=K.removed[Z],Oe=T.indexOf(be);Oe>=0&&(T[Oe]=null,S[Oe].disconnect(be))}for(let Z=0;Z<K.added.length;Z++){const be=K.added[Z];let Oe=T.indexOf(be);if(Oe===-1){for(let Xe=0;Xe<S.length;Xe++)if(Xe>=T.length){T.push(be),Oe=Xe;break}else if(T[Xe]===null){T[Xe]=be,Oe=Xe;break}if(Oe===-1)break}const Ae=S[Oe];Ae&&Ae.connect(be)}}const L=new q,O=new q;function j(K,Z,be){L.setFromMatrixPosition(Z.matrixWorld),O.setFromMatrixPosition(be.matrixWorld);const Oe=L.distanceTo(O),Ae=Z.projectionMatrix.elements,Xe=be.projectionMatrix.elements,Lt=Ae[14]/(Ae[10]-1),I=Ae[14]/(Ae[10]+1),pt=(Ae[9]+1)/Ae[5],$e=(Ae[9]-1)/Ae[5],Ue=(Ae[8]-1)/Ae[0],Re=(Xe[8]+1)/Xe[0],ft=Lt*Ue,Ee=Lt*Re,qe=Oe/(-Ue+Re),Rt=qe*-Ue;if(Z.matrixWorld.decompose(K.position,K.quaternion,K.scale),K.translateX(Rt),K.translateZ(qe),K.matrixWorld.compose(K.position,K.quaternion,K.scale),K.matrixWorldInverse.copy(K.matrixWorld).invert(),Ae[10]===-1)K.projectionMatrix.copy(Z.projectionMatrix),K.projectionMatrixInverse.copy(Z.projectionMatrixInverse);else{const Pt=Lt+qe,D=I+qe,A=ft-Rt,G=Ee+(Oe-Rt),Q=pt*I/D*Pt,re=$e*I/D*Pt;K.projectionMatrix.makePerspective(A,G,Q,re,Pt,D),K.projectionMatrixInverse.copy(K.projectionMatrix).invert()}}function J(K,Z){Z===null?K.matrixWorld.copy(K.matrix):K.matrixWorld.multiplyMatrices(Z.matrixWorld,K.matrix),K.matrixWorldInverse.copy(K.matrixWorld).invert()}this.updateCamera=function(K){if(r===null)return;let Z=K.near,be=K.far;m.texture!==null&&(m.depthNear>0&&(Z=m.depthNear),m.depthFar>0&&(be=m.depthFar)),k.near=M.near=E.near=Z,k.far=M.far=E.far=be,(z!==k.near||F!==k.far)&&(r.updateRenderState({depthNear:k.near,depthFar:k.far}),z=k.near,F=k.far),k.layers.mask=K.layers.mask|6,E.layers.mask=k.layers.mask&3,M.layers.mask=k.layers.mask&5;const Oe=K.parent,Ae=k.cameras;J(k,Oe);for(let Xe=0;Xe<Ae.length;Xe++)J(Ae[Xe],Oe);Ae.length===2?j(k,E,M):k.projectionMatrix.copy(E.projectionMatrix),ne(K,k,Oe)};function ne(K,Z,be){be===null?K.matrix.copy(Z.matrixWorld):(K.matrix.copy(be.matrixWorld),K.matrix.invert(),K.matrix.multiply(Z.matrixWorld)),K.matrix.decompose(K.position,K.quaternion,K.scale),K.updateMatrixWorld(!0),K.projectionMatrix.copy(Z.projectionMatrix),K.projectionMatrixInverse.copy(Z.projectionMatrixInverse),K.isPerspectiveCamera&&(K.fov=J0*2*Math.atan(1/K.projectionMatrix.elements[5]),K.zoom=1)}this.getCamera=function(){return k},this.getFoveation=function(){if(!(f===null&&h===null))return l},this.setFoveation=function(K){l=K,f!==null&&(f.fixedFoveation=K),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=K)},this.hasDepthSensing=function(){return m.texture!==null},this.getDepthSensingMesh=function(){return m.getMesh(k)},this.getCameraTexture=function(K){return p[K]};let pe=null;function he(K,Z){if(u=Z.getViewerPose(c||o),v=Z,u!==null){const be=u.views;h!==null&&(e.setRenderTargetFramebuffer(w,h.framebuffer),e.setRenderTarget(w));let Oe=!1;be.length!==k.cameras.length&&(k.cameras.length=0,Oe=!0);for(let I=0;I<be.length;I++){const pt=be[I];let $e=null;if(h!==null)$e=h.getViewport(pt);else{const Re=d.getViewSubImage(f,pt);$e=Re.viewport,I===0&&(e.setRenderTargetTextures(w,Re.colorTexture,Re.depthStencilTexture),e.setRenderTarget(w))}let Ue=N[I];Ue===void 0&&(Ue=new sr,Ue.layers.enable(I),Ue.viewport=new Gt,N[I]=Ue),Ue.matrix.fromArray(pt.transform.matrix),Ue.matrix.decompose(Ue.position,Ue.quaternion,Ue.scale),Ue.projectionMatrix.fromArray(pt.projectionMatrix),Ue.projectionMatrixInverse.copy(Ue.projectionMatrix).invert(),Ue.viewport.set($e.x,$e.y,$e.width,$e.height),I===0&&(k.matrix.copy(Ue.matrix),k.matrix.decompose(k.position,k.quaternion,k.scale)),Oe===!0&&k.cameras.push(Ue)}const Ae=r.enabledFeatures;if(Ae&&Ae.includes("depth-sensing")&&r.depthUsage=="gpu-optimized"&&g){d=i.getBinding();const I=d.getDepthInformation(be[0]);I&&I.isValid&&I.texture&&m.init(I,r.renderState)}if(Ae&&Ae.includes("camera-access")&&g){e.state.unbindTexture(),d=i.getBinding();for(let I=0;I<be.length;I++){const pt=be[I].camera;if(pt){let $e=p[pt];$e||($e=new YL,p[pt]=$e);const Ue=d.getCameraImage(pt);$e.sourceTexture=Ue}}}}for(let be=0;be<S.length;be++){const Oe=T[be],Ae=S[be];Oe!==null&&Ae!==void 0&&Ae.update(Oe,Z,c||o)}pe&&pe(K,Z),Z.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:Z}),v=null}const Ne=new ZL;Ne.setAnimationLoop(he),this.setAnimationLoop=function(K){pe=K},this.dispose=function(){}}}const Vo=new bs,_ee=new ln;function wee(t,e){function n(m,p){m.matrixAutoUpdate===!0&&m.updateMatrix(),p.value.copy(m.matrix)}function i(m,p){p.color.getRGB(m.fogColor.value,GL(t)),p.isFog?(m.fogNear.value=p.near,m.fogFar.value=p.far):p.isFogExp2&&(m.fogDensity.value=p.density)}function r(m,p,y,x,w){p.isMeshBasicMaterial||p.isMeshLambertMaterial?s(m,p):p.isMeshToonMaterial?(s(m,p),d(m,p)):p.isMeshPhongMaterial?(s(m,p),u(m,p)):p.isMeshStandardMaterial?(s(m,p),f(m,p),p.isMeshPhysicalMaterial&&h(m,p,w)):p.isMeshMatcapMaterial?(s(m,p),v(m,p)):p.isMeshDepthMaterial?s(m,p):p.isMeshDistanceMaterial?(s(m,p),g(m,p)):p.isMeshNormalMaterial?s(m,p):p.isLineBasicMaterial?(o(m,p),p.isLineDashedMaterial&&a(m,p)):p.isPointsMaterial?l(m,p,y,x):p.isSpriteMaterial?c(m,p):p.isShadowMaterial?(m.color.value.copy(p.color),m.opacity.value=p.opacity):p.isShaderMaterial&&(p.uniformsNeedUpdate=!1)}function s(m,p){m.opacity.value=p.opacity,p.color&&m.diffuse.value.copy(p.color),p.emissive&&m.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity),p.map&&(m.map.value=p.map,n(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,n(p.alphaMap,m.alphaMapTransform)),p.bumpMap&&(m.bumpMap.value=p.bumpMap,n(p.bumpMap,m.bumpMapTransform),m.bumpScale.value=p.bumpScale,p.side===si&&(m.bumpScale.value*=-1)),p.normalMap&&(m.normalMap.value=p.normalMap,n(p.normalMap,m.normalMapTransform),m.normalScale.value.copy(p.normalScale),p.side===si&&m.normalScale.value.negate()),p.displacementMap&&(m.displacementMap.value=p.displacementMap,n(p.displacementMap,m.displacementMapTransform),m.displacementScale.value=p.displacementScale,m.displacementBias.value=p.displacementBias),p.emissiveMap&&(m.emissiveMap.value=p.emissiveMap,n(p.emissiveMap,m.emissiveMapTransform)),p.specularMap&&(m.specularMap.value=p.specularMap,n(p.specularMap,m.specularMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest);const y=e.get(p),x=y.envMap,w=y.envMapRotation;x&&(m.envMap.value=x,Vo.copy(w),Vo.x*=-1,Vo.y*=-1,Vo.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(Vo.y*=-1,Vo.z*=-1),m.envMapRotation.value.setFromMatrix4(_ee.makeRotationFromEuler(Vo)),m.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=p.reflectivity,m.ior.value=p.ior,m.refractionRatio.value=p.refractionRatio),p.lightMap&&(m.lightMap.value=p.lightMap,m.lightMapIntensity.value=p.lightMapIntensity,n(p.lightMap,m.lightMapTransform)),p.aoMap&&(m.aoMap.value=p.aoMap,m.aoMapIntensity.value=p.aoMapIntensity,n(p.aoMap,m.aoMapTransform))}function o(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,p.map&&(m.map.value=p.map,n(p.map,m.mapTransform))}function a(m,p){m.dashSize.value=p.dashSize,m.totalSize.value=p.dashSize
vendor: 10,998 bytes, line 4161
4161+p.gapSize,m.scale.value=p.scale}function l(m,p,y,x){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.size.value=p.size*y,m.scale.value=x*.5,p.map&&(m.map.value=p.map,n(p.map,m.uvTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,n(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function c(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.rotation.value=p.rotation,p.map&&(m.map.value=p.map,n(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,n(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function u(m,p){m.specular.value.copy(p.specular),m.shininess.value=Math.max(p.shininess,1e-4)}function d(m,p){p.gradientMap&&(m.gradientMap.value=p.gradientMap)}function f(m,p){m.metalness.value=p.metalness,p.metalnessMap&&(m.metalnessMap.value=p.metalnessMap,n(p.metalnessMap,m.metalnessMapTransform)),m.roughness.value=p.roughness,p.roughnessMap&&(m.roughnessMap.value=p.roughnessMap,n(p.roughnessMap,m.roughnessMapTransform)),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)}function h(m,p,y){m.ior.value=p.ior,p.sheen>0&&(m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),m.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(m.sheenColorMap.value=p.sheenColorMap,n(p.sheenColorMap,m.sheenColorMapTransform)),p.sheenRoughnessMap&&(m.sheenRoughnessMap.value=p.sheenRoughnessMap,n(p.sheenRoughnessMap,m.sheenRoughnessMapTransform))),p.clearcoat>0&&(m.clearcoat.value=p.clearcoat,m.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(m.clearcoatMap.value=p.clearcoatMap,n(p.clearcoatMap,m.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,n(p.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(m.clearcoatNormalMap.value=p.clearcoatNormalMap,n(p.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===si&&m.clearcoatNormalScale.value.negate())),p.dispersion>0&&(m.dispersion.value=p.dispersion),p.iridescence>0&&(m.iridescence.value=p.iridescence,m.iridescenceIOR.value=p.iridescenceIOR,m.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(m.iridescenceMap.value=p.iridescenceMap,n(p.iridescenceMap,m.iridescenceMapTransform)),p.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=p.iridescenceThicknessMap,n(p.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),p.transmission>0&&(m.transmission.value=p.transmission,m.transmissionSamplerMap.value=y.texture,m.transmissionSamplerSize.value.set(y.width,y.height),p.transmissionMap&&(m.transmissionMap.value=p.transmissionMap,n(p.transmissionMap,m.transmissionMapTransform)),m.thickness.value=p.thickness,p.thicknessMap&&(m.thicknessMap.value=p.thicknessMap,n(p.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=p.attenuationDistance,m.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(m.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(m.anisotropyMap.value=p.anisotropyMap,n(p.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=p.specularIntensity,m.specularColor.value.copy(p.specularColor),p.specularColorMap&&(m.specularColorMap.value=p.specularColorMap,n(p.specularColorMap,m.specularColorMapTransform)),p.specularIntensityMap&&(m.specularIntensityMap.value=p.specularIntensityMap,n(p.specularIntensityMap,m.specularIntensityMapTransform))}function v(m,p){p.matcap&&(m.matcap.value=p.matcap)}function g(m,p){const y=e.get(p).light;m.referencePosition.value.setFromMatrixPosition(y.matrixWorld),m.nearDistance.value=y.shadow.camera.near,m.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function bee(t,e,n,i){let r={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(y,x){const w=x.program;i.uniformBlockBinding(y,w)}function c(y,x){let w=r[y.id];w===void 0&&(v(y),w=u(y),r[y.id]=w,y.addEventListener("dispose",m));const S=x.program;i.updateUBOMapping(y,S);const T=e.render.frame;s[y.id]!==T&&(f(y),s[y.id]=T)}function u(y){const x=d();y.__bindingPointIndex=x;const w=t.createBuffer(),S=y.__size,T=y.usage;return t.bindBuffer(t.UNIFORM_BUFFER,w),t.bufferData(t.UNIFORM_BUFFER,S,T),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,x,w),w}function d(){for(let y=0;y<a;y++)if(o.indexOf(y)===-1)return o.push(y),y;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function f(y){const x=r[y.id],w=y.uniforms,S=y.__cache;t.bindBuffer(t.UNIFORM_BUFFER,x);for(let T=0,C=w.length;T<C;T++){const P=Array.isArray(w[T])?w[T]:[w[T]];for(let E=0,M=P.length;E<M;E++){const N=P[E];if(h(N,T,E,S)===!0){const k=N.__offset,z=Array.isArray(N.value)?N.value:[N.value];let F=0;for(let $=0;$<z.length;$++){const H=z[$],W=g(H);typeof H=="number"||typeof H=="boolean"?(N.__data[0]=H,t.bufferSubData(t.UNIFORM_BUFFER,k+F,N.__data)):H.isMatrix3?(N.__data[0]=H.elements[0],N.__data[1]=H.elements[1],N.__data[2]=H.elements[2],N.__data[3]=0,N.__data[4]=H.elements[3],N.__data[5]=H.elements[4],N.__data[6]=H.elements[5],N.__data[7]=0,N.__data[8]=H.elements[6],N.__data[9]=H.elements[7],N.__data[10]=H.elements[8],N.__data[11]=0):(H.toArray(N.__data,F),F+=W.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,k,N.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function h(y,x,w,S){const T=y.value,C=x+"_"+w;if(S[C]===void 0)return typeof T=="number"||typeof T=="boolean"?S[C]=T:S[C]=T.clone(),!0;{const P=S[C];if(typeof T=="number"||typeof T=="boolean"){if(P!==T)return S[C]=T,!0}else if(P.equals(T)===!1)return P.copy(T),!0}return!1}function v(y){const x=y.uniforms;let w=0;const S=16;for(let C=0,P=x.length;C<P;C++){const E=Array.isArray(x[C])?x[C]:[x[C]];for(let M=0,N=E.length;M<N;M++){const k=E[M],z=Array.isArray(k.value)?k.value:[k.value];for(let F=0,$=z.length;F<$;F++){const H=z[F],W=g(H),L=w%S,O=L%W.boundary,j=L+O;w+=O,j!==0&&S-j<W.storage&&(w+=S-j),k.__data=new Float32Array(W.storage/Float32Array.BYTES_PER_ELEMENT),k.__offset=w,w+=W.storage}}}const T=w%S;return T>0&&(w+=S-T),y.__size=w,y.__cache={},this}function g(y){const x={boundary:0,storage:0};return typeof y=="number"||typeof y=="boolean"?(x.boundary=4,x.storage=4):y.isVector2?(x.boundary=8,x.storage=8):y.isVector3||y.isColor?(x.boundary=16,x.storage=12):y.isVector4?(x.boundary=16,x.storage=16):y.isMatrix3?(x.boundary=48,x.storage=48):y.isMatrix4?(x.boundary=64,x.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),x}function m(y){const x=y.target;x.removeEventListener("dispose",m);const w=o.indexOf(x.__bindingPointIndex);o.splice(w,1),t.deleteBuffer(r[x.id]),delete r[x.id],delete s[x.id]}function p(){for(const y in r)t.deleteBuffer(r[y]);o=[],r={},s={}}return{bind:l,update:c,dispose:p}}class See{constructor(e={}){const{canvas:n=nY(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1,reversedDepthBuffer:f=!1}=e;this.isWebGLRenderer=!0;let h;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=i.getContextAttributes().alpha}else h=o;const v=new Uint32Array(4),g=new Int32Array(4);let m=null,p=null;const y=[],x=[];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.toneMapping=po,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const w=this;let S=!1;this._outputColorSpace=Li;let T=0,C=0,P=null,E=-1,M=null;const N=new Gt,k=new Gt;let z=null;const F=new xt(0);let $=0,H=n.width,W=n.height,L=1,O=null,j=null;const J=new Gt(0,0,H,W),ne=new Gt(0,0,H,W);let pe=!1;const he=new XL;let Ne=!1,K=!1;const Z=new ln,be=new q,Oe=new Gt,Ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Xe=!1;function Lt(){return P===null?L:1}let I=i;function pt(R,B){return n.getContext(R,B)}try{const R={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:d};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${gw}`),n.addEventListener("webglcontextlost",ge,!1),n.addEventListener("webglcontextrestored",Se,!1),n.addEventListener("webglcontextcreationerror",oe,!1),I===null){const B="webgl2";if(I=pt(B,R),I===null)throw pt(B)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(R){throw console.error("THREE.WebGLRenderer: "+R.message),R}let $e,Ue,Re,ft,Ee,qe,Rt,Pt,D,A,G,Q,re,ee,Ie,de,De,Le,le,ve,Be,Ce,ye,Ye;function U(){$e=new NQ(I),$e.init(),Ce=new mee(I,$e),Ue=new TQ(I,$e,e,Ce),Re=new hee(I,$e),Ue.reversedDepthBuffer&&f&&Re.buffers.depth.setReversed(!0),ft=new OQ(I),Ee=new eee,qe=new pee(I,$e,Re,Ee,Ue,Ce,ft),Rt=new AQ(w),Pt=new LQ(w),D=new HY(I),ye=new EQ(I,D),A=new IQ(I,D,ft,ye),G=new UQ(I,A,D,ft),le=new FQ(I,Ue,qe),de=new CQ(Ee),Q=new JJ(w,Rt,Pt,$e,Ue,ye,de),re=new wee(w,Ee),ee=new nee,Ie=new lee($e),Le=new SQ(w,Rt,Pt,Re,G,h,l),De=new dee(w,G,Ue),Ye=new bee(I,ft,Ue,Re),ve=new MQ(I,$e,ft),Be=new kQ(I,$e,ft),ft.programs=Q.programs,w.capabilities=Ue,w.extensions=$e,w.properties=Ee,w.renderLists=ee,w.shadowMap=De,w.state=Re,w.info=ft}U();const ce=new xee(w,I);this.xr=ce,this.getContext=function(){return I},this.getContextAttributes=function(){return I.getContextAttributes()},this.forceContextLoss=function(){const R=$e.get("WEBGL_lose_context");R&&R.loseContext()},this.forceContextRestore=function(){const R=$e.get("WEBGL_lose_context");R&&R.restoreContext()},this.getPixelRatio=function(){return L},this.setPixelRatio=function(R){R!==void 0&&(L=R,this.setSize(H,W,!1))},this.getSize=function(R){return R.set(H,W)},this.setSize=function(R,B,X=!0){if(ce.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}H=R,W=B,n.width=Math.floor(R*L),n.height=Math.floor(B*L),X===!0&&(n.style.width=R+"px",n.style.height=B+"px"),this.setViewport(0,0,R,B)},this.getDrawingBufferSize=function(R){return R.set(H*L,W*L).floor()},this.setDrawingBufferSize=function(R,B,X){H=R,W=B,L=X,n.width=Math.floor(R*X),n.height=Math.floor(B*X),this.setViewport(0,0,R,B)},this.getCurrentViewport=function(R){return R.copy(N)},this.getViewport=function(R){return R.copy(J)},this.setViewport=function(R,B,X,Y){R.isVector4?J.set(R.x,R.y,R.z,R.w):J.set(R,B,X,Y),Re.viewport(N.copy(J).multiplyScalar(L).roun
vendor: 6,411 bytes, line 4161
4161d())},this.getScissor=function(R){return R.copy(ne)},this.setScissor=function(R,B,X,Y){R.isVector4?ne.set(R.x,R.y,R.z,R.w):ne.set(R,B,X,Y),Re.scissor(k.copy(ne).multiplyScalar(L).round())},this.getScissorTest=function(){return pe},this.setScissorTest=function(R){Re.setScissorTest(pe=R)},this.setOpaqueSort=function(R){O=R},this.setTransparentSort=function(R){j=R},this.getClearColor=function(R){return R.copy(Le.getClearColor())},this.setClearColor=function(){Le.setClearColor(...arguments)},this.getClearAlpha=function(){return Le.getClearAlpha()},this.setClearAlpha=function(){Le.setClearAlpha(...arguments)},this.clear=function(R=!0,B=!0,X=!0){let Y=0;if(R){let V=!1;if(P!==null){const ue=P.texture.format;V=ue===bw||ue===ww||ue===_w}if(V){const ue=P.texture.type,we=ue===ws||ue===Pa||ue===cd||ue===ud||ue===yw||ue===xw,Pe=Le.getClearColor(),Te=Le.getClearAlpha(),je=Pe.r,We=Pe.g,Fe=Pe.b;we?(v[0]=je,v[1]=We,v[2]=Fe,v[3]=Te,I.clearBufferuiv(I.COLOR,0,v)):(g[0]=je,g[1]=We,g[2]=Fe,g[3]=Te,I.clearBufferiv(I.COLOR,0,g))}else Y|=I.COLOR_BUFFER_BIT}B&&(Y|=I.DEPTH_BUFFER_BIT),X&&(Y|=I.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),I.clear(Y)},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",ge,!1),n.removeEventListener("webglcontextrestored",Se,!1),n.removeEventListener("webglcontextcreationerror",oe,!1),Le.dispose(),ee.dispose(),Ie.dispose(),Ee.dispose(),Rt.dispose(),Pt.dispose(),G.dispose(),ye.dispose(),Ye.dispose(),Q.dispose(),ce.dispose(),ce.removeEventListener("sessionstart",nn),ce.removeEventListener("sessionend",_r),rn.stop()};function ge(R){R.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),S=!0}function Se(){console.log("THREE.WebGLRenderer: Context Restored."),S=!1;const R=ft.autoReset,B=De.enabled,X=De.autoUpdate,Y=De.needsUpdate,V=De.type;U(),ft.autoReset=R,De.enabled=B,De.autoUpdate=X,De.needsUpdate=Y,De.type=V}function oe(R){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",R.statusMessage)}function ie(R){const B=R.target;B.removeEventListener("dispose",ie),se(B)}function se(R){_e(R),Ee.remove(R)}function _e(R){const B=Ee.get(R).programs;B!==void 0&&(B.forEach(function(X){Q.releaseProgram(X)}),R.isShaderMaterial&&Q.releaseShaderCache(R))}this.renderBufferDirect=function(R,B,X,Y,V,ue){B===null&&(B=Ae);const we=V.isMesh&&V.matrixWorld.determinant()<0,Pe=sN(R,B,X,Y,V);Re.setMaterial(Y,we);let Te=X.index,je=1;if(Y.wireframe===!0){if(Te=A.getWireframeAttribute(X),Te===void 0)return;je=2}const We=X.drawRange,Fe=X.attributes.position;let nt=We.start*je,vt=(We.start+We.count)*je;ue!==null&&(nt=Math.max(nt,ue.start*je),vt=Math.min(vt,(ue.start+ue.count)*je)),Te!==null?(nt=Math.max(nt,0),vt=Math.min(vt,Te.count)):Fe!=null&&(nt=Math.max(nt,0),vt=Math.min(vt,Fe.count));const zt=vt-nt;if(zt<0||zt===1/0)return;ye.setup(V,Y,Pe,X,Te);let Mt,bt=ve;if(Te!==null&&(Mt=D.get(Te),bt=Be,bt.setIndex(Mt)),V.isMesh)Y.wireframe===!0?(Re.setLineWidth(Y.wireframeLinewidth*Lt()),bt.setMode(I.LINES)):bt.setMode(I.TRIANGLES);else if(V.isLine){let He=Y.linewidth;He===void 0&&(He=1),Re.setLineWidth(He*Lt()),V.isLineSegments?bt.setMode(I.LINES):V.isLineLoop?bt.setMode(I.LINE_LOOP):bt.setMode(I.LINE_STRIP)}else V.isPoints?bt.setMode(I.POINTS):V.isSprite&&bt.setMode(I.TRIANGLES);if(V.isBatchedMesh)if(V._multiDrawInstances!==null)pd("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),bt.renderMultiDrawInstances(V._multiDrawStarts,V._multiDrawCounts,V._multiDrawCount,V._multiDrawInstances);else if($e.get("WEBGL_multi_draw"))bt.renderMultiDraw(V._multiDrawStarts,V._multiDrawCounts,V._multiDrawCount);else{const He=V._multiDrawStarts,Nt=V._multiDrawCounts,at=V._multiDrawCount,oi=Te?D.get(Te).bytesPerElement:1,Ua=Ee.get(Y).currentProgram.getUniforms();for(let ai=0;ai<at;ai++)Ua.setValue(I,"_gl_DrawID",ai),bt.render(He[ai]/oi,Nt[ai])}else if(V.isInstancedMesh)bt.renderInstances(nt,zt,V.count);else if(X.isInstancedBufferGeometry){const He=X._maxInstanceCount!==void 0?X._maxInstanceCount:1/0,Nt=Math.min(X.instanceCount,He);bt.renderInstances(nt,zt,Nt)}else bt.render(nt,zt)};function Ve(R,B,X){R.transparent===!0&&R.side===Rr&&R.forceSinglePass===!1?(R.side=si,R.needsUpdate=!0,zd(R,B,X),R.side=Eo,R.needsUpdate=!0,zd(R,B,X),R.side=Rr):zd(R,B,X)}this.compile=function(R,B,X=null){X===null&&(X=R),p=Ie.get(X),p.init(B),x.push(p),X.traverseVisible(function(V){V.isLight&&V.layers.test(B.layers)&&(p.pushLight(V),V.castShadow&&p.pushShadow(V))}),R!==X&&R.traverseVisible(function(V){V.isLight&&V.layers.test(B.layers)&&(p.pushLight(V),V.castShadow&&p.pushShadow(V))}),p.setupLights();const Y=new Set;return R.traverse(function(V){if(!(V.isMesh||V.isPoints||V.isLine||V.isSprite))return;const ue=V.material;if(ue)if(Array.isArray(ue))for(let we=0;we<ue.length;we++){const Pe=ue[we];Ve(Pe,X,V),Y.add(Pe)}else Ve(ue,X,V),Y.add(ue)}),p=x.pop(),Y},this.compileAsync=function(R,B,X=null){const Y=this.compile(R,B,X);return new Promise(V=>{function ue(){if(Y.forEach(function(we){Ee.get(we).currentProgram.isReady()&&Y.delete(we)}),Y.size===0){V(R);return}setTimeout(ue,10)}$e.get("KHR_parallel_shader_compile")!==null?ue():setTimeout(ue,10)})};let Ze=null;function Wt(R){Ze&&Ze(R)}function nn(){rn.stop()}function _r(){rn.start()}const rn=new ZL;rn.setAnimationLoop(Wt),typeof self<"u"&&rn.setContext(self),this.setAnimationLoop=function(R){Ze=R,ce.setAnimationLoop(R),R===null?rn.stop():rn.start()},ce.addEventListener("sessionstart",nn),ce.addEventListener("sessionend",_r),this.render=function(R,B){if(B!==void 0&&B.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;if(R.matrixWorldAutoUpdate===!0&&R.updateMatrixWorld(),B.parent===null&&B.matrixWorldAutoUpdate===!0&&B.updateMatrixWorld(),ce.enabled===!0&&ce.isPresenting===!0&&(ce.cameraAutoUpdate===!0&&ce.updateCamera(B),B=ce.getCamera()),R.isScene===!0&&R.onBeforeRender(w,R,B,P),p=Ie.get(R,x.length),p.init(B),x.push(p),Z.multiplyMatrices(B.projectionMatrix,B.matrixWorldInverse),he.setFromProjectionMatrix(Z,Lr,B.reversedDepth),K=this.localClippingEnabled,Ne=de.init(this.clippingPlanes,K),m=ee.get(R,y.length),m.init(
vendor: 4,836 bytes, line 4161
4161),y.push(m),ce.enabled===!0&&ce.isPresenting===!0){const ue=w.xr.getDepthSensingMesh();ue!==null&&Ei(ue,B,-1/0,w.sortObjects)}Ei(R,B,0,w.sortObjects),m.finish(),w.sortObjects===!0&&m.sort(O,j),Xe=ce.enabled===!1||ce.isPresenting===!1||ce.hasDepthSensing()===!1,Xe&&Le.addToRenderList(m,R),this.info.render.frame++,Ne===!0&&de.beginShadows();const X=p.state.shadowsArray;De.render(X,R,B),Ne===!0&&de.endShadows(),this.info.autoReset===!0&&this.info.reset();const Y=m.opaque,V=m.transmissive;if(p.setupLights(),B.isArrayCamera){const ue=B.cameras;if(V.length>0)for(let we=0,Pe=ue.length;we<Pe;we++){const Te=ue[we];Rw(Y,V,R,Te)}Xe&&Le.render(R);for(let we=0,Pe=ue.length;we<Pe;we++){const Te=ue[we];Aw(m,R,Te,Te.viewport)}}else V.length>0&&Rw(Y,V,R,B),Xe&&Le.render(R),Aw(m,R,B);P!==null&&C===0&&(qe.updateMultisampleRenderTarget(P),qe.updateRenderTargetMipmap(P)),R.isScene===!0&&R.onAfterRender(w,R,B),ye.resetDefaultState(),E=-1,M=null,x.pop(),x.length>0?(p=x[x.length-1],Ne===!0&&de.setGlobalState(w.clippingPlanes,p.state.camera)):p=null,y.pop(),y.length>0?m=y[y.length-1]:m=null};function Ei(R,B,X,Y){if(R.visible===!1)return;if(R.layers.test(B.layers)){if(R.isGroup)X=R.renderOrder;else if(R.isLOD)R.autoUpdate===!0&&R.update(B);else if(R.isLight)p.pushLight(R),R.castShadow&&p.pushShadow(R);else if(R.isSprite){if(!R.frustumCulled||he.intersectsSprite(R)){Y&&Oe.setFromMatrixPosition(R.matrixWorld).applyMatrix4(Z);const we=G.update(R),Pe=R.material;Pe.visible&&m.push(R,we,Pe,X,Oe.z,null)}}else if((R.isMesh||R.isLine||R.isPoints)&&(!R.frustumCulled||he.intersectsObject(R))){const we=G.update(R),Pe=R.material;if(Y&&(R.boundingSphere!==void 0?(R.boundingSphere===null&&R.computeBoundingSphere(),Oe.copy(R.boundingSphere.center)):(we.boundingSphere===null&&we.computeBoundingSphere(),Oe.copy(we.boundingSphere.center)),Oe.applyMatrix4(R.matrixWorld).applyMatrix4(Z)),Array.isArray(Pe)){const Te=we.groups;for(let je=0,We=Te.length;je<We;je++){const Fe=Te[je],nt=Pe[Fe.materialIndex];nt&&nt.visible&&m.push(R,we,nt,X,Oe.z,Fe)}}else Pe.visible&&m.push(R,we,Pe,X,Oe.z,null)}}const ue=R.children;for(let we=0,Pe=ue.length;we<Pe;we++)Ei(ue[we],B,X,Y)}function Aw(R,B,X,Y){const V=R.opaque,ue=R.transmissive,we=R.transparent;p.setupLightsView(X),Ne===!0&&de.setGlobalState(w.clippingPlanes,X),Y&&Re.viewport(N.copy(Y)),V.length>0&&Ud(V,B,X),ue.length>0&&Ud(ue,B,X),we.length>0&&Ud(we,B,X),Re.buffers.depth.setTest(!0),Re.buffers.depth.setMask(!0),Re.buffers.color.setMask(!0),Re.setPolygonOffset(!1)}function Rw(R,B,X,Y){if((X.isScene===!0?X.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[Y.id]===void 0&&(p.state.transmissionRenderTarget[Y.id]=new Da(1,1,{generateMipmaps:!0,type:$e.has("EXT_color_buffer_half_float")||$e.has("EXT_color_buffer_float")?Ld:ws,minFilter:oa,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ct.workingColorSpace}));const ue=p.state.transmissionRenderTarget[Y.id],we=Y.viewport||N;ue.setSize(we.z*w.transmissionResolutionScale,we.w*w.transmissionResolutionScale);const Pe=w.getRenderTarget(),Te=w.getActiveCubeFace(),je=w.getActiveMipmapLevel();w.setRenderTarget(ue),w.getClearColor(F),$=w.getClearAlpha(),$<1&&w.setClearColor(16777215,.5),w.clear(),Xe&&Le.render(X);const We=w.toneMapping;w.toneMapping=po;const Fe=Y.viewport;if(Y.viewport!==void 0&&(Y.viewport=void 0),p.setupLightsView(Y),Ne===!0&&de.setGlobalState(w.clippingPlanes,Y),Ud(R,X,Y),qe.updateMultisampleRenderTarget(ue),qe.updateRenderTargetMipmap(ue),$e.has("WEBGL_multisampled_render_to_texture")===!1){let nt=!1;for(let vt=0,zt=B.length;vt<zt;vt++){const Mt=B[vt],bt=Mt.object,He=Mt.geometry,Nt=Mt.material,at=Mt.group;if(Nt.side===Rr&&bt.layers.test(Y.layers)){const oi=Nt.side;Nt.side=si,Nt.needsUpdate=!0,Pw(bt,X,Y,He,Nt,at),Nt.side=oi,Nt.needsUpdate=!0,nt=!0}}nt===!0&&(qe.updateMultisampleRenderTarget(ue),qe.updateRenderTargetMipmap(ue))}w.setRenderTarget(Pe,Te,je),w.setClearColor(F,$),Fe!==void 0&&(Y.viewport=Fe),w.toneMapping=We}function Ud(R,B,X){const Y=B.isScene===!0?B.overrideMaterial:null;for(let V=0,ue=R.length;V<ue;V++){const we=R[V],Pe=we.object,Te=we.geometry,je=we.group;let We=we.material;We.allowOverride===!0&&Y!==null&&(We=Y),Pe.layers.test(X.layers)&&Pw(Pe,B,X,Te,We,je)}}function Pw(R,B,X,Y,V,ue){R.onBeforeRender(w,B,X,Y,V,ue),R.modelViewMatrix.multiplyMatrices(X.matrixWorldInverse,R.matrixWorld),R.normalMatrix.getNormalMatrix(R.modelViewMatrix),V.onBeforeRender(w,B,X,Y,R,ue),V.transparent===!0&&V.side===Rr&&V.forceSinglePass===!1?(V.side=si,V.needsUpdate=!0,w.renderBufferDirect(X,B,Y,V,R,ue),V.side=Eo,V.needsUpdate=!0,w.renderBufferDirect(X,B,Y,V,R,ue),V.side=Rr):w.renderBufferDirect(X,B,Y,V,R,ue),R.onAfterRender(w,B,X,Y,V,ue)}function zd(R,B,X){B.isScene!==!0&&(B=Ae);const Y=Ee.get(R),V=p.state.lights,ue=p.state.shadowsArray,we=V.state.ver
vendor: 16,738 bytes, line 4161
4161sion,Pe=Q.getParameters(R,V.state,ue,B,X),Te=Q.getProgramCacheKey(Pe);let je=Y.programs;Y.environment=R.isMeshStandardMaterial?B.environment:null,Y.fog=B.fog,Y.envMap=(R.isMeshStandardMaterial?Pt:Rt).get(R.envMap||Y.environment),Y.envMapRotation=Y.environment!==null&&R.envMap===null?B.environmentRotation:R.envMapRotation,je===void 0&&(R.addEventListener("dispose",ie),je=new Map,Y.programs=je);let We=je.get(Te);if(We!==void 0){if(Y.currentProgram===We&&Y.lightsStateVersion===we)return Lw(R,Pe),We}else Pe.uniforms=Q.getUniforms(R),R.onBeforeCompile(Pe,w),We=Q.acquireProgram(Pe,Te),je.set(Te,We),Y.uniforms=Pe.uniforms;const Fe=Y.uniforms;return(!R.isShaderMaterial&&!R.isRawShaderMaterial||R.clipping===!0)&&(Fe.clippingPlanes=de.uniform),Lw(R,Pe),Y.needsLights=aN(R),Y.lightsStateVersion=we,Y.needsLights&&(Fe.ambientLightColor.value=V.state.ambient,Fe.lightProbe.value=V.state.probe,Fe.directionalLights.value=V.state.directional,Fe.directionalLightShadows.value=V.state.directionalShadow,Fe.spotLights.value=V.state.spot,Fe.spotLightShadows.value=V.state.spotShadow,Fe.rectAreaLights.value=V.state.rectArea,Fe.ltc_1.value=V.state.rectAreaLTC1,Fe.ltc_2.value=V.state.rectAreaLTC2,Fe.pointLights.value=V.state.point,Fe.pointLightShadows.value=V.state.pointShadow,Fe.hemisphereLights.value=V.state.hemi,Fe.directionalShadowMap.value=V.state.directionalShadowMap,Fe.directionalShadowMatrix.value=V.state.directionalShadowMatrix,Fe.spotShadowMap.value=V.state.spotShadowMap,Fe.spotLightMatrix.value=V.state.spotLightMatrix,Fe.spotLightMap.value=V.state.spotLightMap,Fe.pointShadowMap.value=V.state.pointShadowMap,Fe.pointShadowMatrix.value=V.state.pointShadowMatrix),Y.currentProgram=We,Y.uniformsList=null,We}function Dw(R){if(R.uniformsList===null){const B=R.currentProgram.getUniforms();R.uniformsList=Ah.seqWithValue(B.seq,R.uniforms)}return R.uniformsList}function Lw(R,B){const X=Ee.get(R);X.outputColorSpace=B.outputColorSpace,X.batching=B.batching,X.batchingColor=B.batchingColor,X.instancing=B.instancing,X.instancingColor=B.instancingColor,X.instancingMorph=B.instancingMorph,X.skinning=B.skinning,X.morphTargets=B.morphTargets,X.morphNormals=B.morphNormals,X.morphColors=B.morphColors,X.morphTargetsCount=B.morphTargetsCount,X.numClippingPlanes=B.numClippingPlanes,X.numIntersection=B.numClipIntersection,X.vertexAlphas=B.vertexAlphas,X.vertexTangents=B.vertexTangents,X.toneMapping=B.toneMapping}function sN(R,B,X,Y,V){B.isScene!==!0&&(B=Ae),qe.resetTextureUnits();const ue=B.fog,we=Y.isMeshStandardMaterial?B.environment:null,Pe=P===null?w.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:Sc,Te=(Y.isMeshStandardMaterial?Pt:Rt).get(Y.envMap||we),je=Y.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,We=!!X.attributes.tangent&&(!!Y.normalMap||Y.anisotropy>0),Fe=!!X.morphAttributes.position,nt=!!X.morphAttributes.normal,vt=!!X.morphAttributes.color;let zt=po;Y.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(zt=w.toneMapping);const Mt=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,bt=Mt!==void 0?Mt.length:0,He=Ee.get(Y),Nt=p.state.lights;if(Ne===!0&&(K===!0||R!==M)){const Fn=R===M&&Y.id===E;de.setState(Y,R,Fn)}let at=!1;Y.version===He.__version?(He.needsLights&&He.lightsStateVersion!==Nt.state.version||He.outputColorSpace!==Pe||V.isBatchedMesh&&He.batching===!1||!V.isBatchedMesh&&He.batching===!0||V.isBatchedMesh&&He.batchingColor===!0&&V.colorTexture===null||V.isBatchedMesh&&He.batchingColor===!1&&V.colorTexture!==null||V.isInstancedMesh&&He.instancing===!1||!V.isInstancedMesh&&He.instancing===!0||V.isSkinnedMesh&&He.skinning===!1||!V.isSkinnedMesh&&He.skinning===!0||V.isInstancedMesh&&He.instancingColor===!0&&V.instanceColor===null||V.isInstancedMesh&&He.instancingColor===!1&&V.instanceColor!==null||V.isInstancedMesh&&He.instancingMorph===!0&&V.morphTexture===null||V.isInstancedMesh&&He.instancingMorph===!1&&V.morphTexture!==null||He.envMap!==Te||Y.fog===!0&&He.fog!==ue||He.numClippingPlanes!==void 0&&(He.numClippingPlanes!==de.numPlanes||He.numIntersection!==de.numIntersection)||He.vertexAlphas!==je||He.vertexTangents!==We||He.morphTargets!==Fe||He.morphNormals!==nt||He.morphColors!==vt||He.toneMapping!==zt||He.morphTargetsCount!==bt)&&(at=!0):(at=!0,He.__version=Y.version);let oi=He.currentProgram;at===!0&&(oi=zd(Y,B,V));let Ua=!1,ai=!1,zc=!1;const It=oi.getUniforms(),Mi=He.uniforms;if(Re.useProgram(oi.program)&&(Ua=!0,ai=!0,zc=!0),Y.id!==E&&(E=Y.id,ai=!0),Ua||M!==R){Re.buffers.depth.getReversed()&&R.reversedDepth!==!0&&(R._reversedDepth=!0,R.updateProjectionMatrix()),It.setValue(I,"projectionMatrix",R.projectionMatrix),It.setValue(I,"viewMatrix",R.matrixWorldInverse);const qn=It.map.cameraPosition;qn!==void 0&&qn.setValue(I,be.setFromMatrixPosition(R.matrixWorld)),Ue.logarithmicDepthBuffer&&It.setValue(I,"logDepthBufFC",2/(Math.log(R.far+1)/Math.LN2)),(Y.isMeshPhongMaterial||Y.isMeshToonMaterial||Y.isMeshLambertMaterial||Y.isMeshBasicMaterial||Y.isMeshStandardMaterial||Y.isShaderMaterial)&&It.setValue(I,"isOrthographic",R.isOrthographicCamera===!0),M!==R&&(M=R,ai=!0,zc=!0)}if(V.isSkinnedMesh){It.setOptional(I,V,"bindMatrix"),It.setOptional(I,V,"bindMatrixInverse");const Fn=V.skeleton;Fn&&(Fn.boneTexture===null&&Fn.computeBoneTexture(),It.setValue(I,"boneTexture",Fn.boneTexture,qe))}V.isBatchedMesh&&(It.setOptional(I,V,"batchingTexture"),It.setValue(I,"batchingTexture",V._matricesTexture,qe),It.setOptional(I,V,"batchingIdTexture"),It.setValue(I,"batchingIdTexture",V._indirectTexture,qe),It.setOptional(I,V,"batchingColorTexture"),V._colorsTexture!==null&&It.setValue(I,"batchingColorTexture",V._colorsTexture,qe));const Ti=X.morphAttributes;if((Ti.position!==void 0||Ti.normal!==void 0||Ti.color!==void 0)&&le.update(V,X,oi),(ai||He.receiveShadow!==V.receiveShadow)&&(He.receiveShadow=V.receiveShadow,It.setValue(I,"receiveShadow",V.receiveShadow)),Y.isMeshGouraudMaterial&&Y.envMap!==null&&(Mi.envMap.value=Te,Mi.flipEnvMap.value=Te.isCubeTexture&&Te.isRenderTargetTexture===!1?-1:1),Y.isMeshStandardMaterial&&Y.envMap===null&&B.environment!==null&&(Mi.envMapIntensity.value=B.environmentIntensity),ai&&(It.setValue(I,"toneMappingExposure",w.toneMappingExposure),He.needsLights&&oN(Mi,zc),ue&&Y.fog===!0&&re.refreshFogUniforms(Mi,ue),re.refreshMaterialUniforms(Mi,Y,L,W,p.state.transmissionRenderTarget[R.id]),Ah.upload(I,Dw(He),Mi,qe)),Y.isShaderMaterial&&Y.uniformsNeedUpdate===!0&&(Ah.upload(I,Dw(He),Mi,qe),Y.uniformsNeedUpdate=!1),Y.isSpriteMaterial&&It.setValue(I,"center",V.center),It.setValue(I,"modelViewMatrix",V.modelViewMatrix),It.setValue(I,"normalMatrix",V.normalMatrix),It.setValue(I,"modelMatrix",V.matrixWorld),Y.isShaderMaterial||Y.isRawShaderMaterial){const Fn=Y.uniformsGroups;for(let qn=0,mm=Fn.length;qn<mm;qn++){const Ro=Fn[qn];Ye.update(Ro,oi),Ye.bind(Ro,oi)}}return oi}function oN(R,B){R.ambientLightColor.needsUpdate=B,R.lightProbe.needsUpdate=B,R.directionalLights.needsUpdate=B,R.directionalLightShadows.needsUpdate=B,R.pointLights.needsUpdate=B,R.pointLightShadows.needsUpdate=B,R.spotLights.needsUpdate=B,R.spotLightShadows.needsUpdate=B,R.rectAreaLights.needsUpdate=B,R.hemisphereLights.needsUpdate=B}function aN(R){return R.isMeshLambertMaterial||R.isMeshToonMaterial||R.isMeshPhongMaterial||R.isMeshStandardMaterial||R.isShadowMaterial||R.isShaderMaterial&&R.lights===!0}this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(R,B,X){const Y=Ee.get(R);Y.__autoAllocateDepthBuffer=R.resolveDepthBuffer===!1,Y.__autoAllocateDepthBuffer===!1&&(Y.__useRenderToTexture=!1),Ee.get(R.texture).__webglTexture=B,Ee.get(R.depthTexture).__webglTexture=Y.__autoAllocateDepthBuffer?void 0:X,Y.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(R,B){const X=Ee.get(R);X.__webglFramebuffer=B,X.__useDefaultFramebuffer=B===void 0};const lN=I.createFramebuffer();this.setRenderTarget=function(R,B=0,X=0){P=R,T=B,C=X;let Y=!0,V=null,ue=!1,we=!1;if(R){const Te=Ee.get(R);if(Te.__useDefaultFramebuffer!==void 0)Re.bindFramebuffer(I.FRAMEBUFFER,null),Y=!1;else if(Te.__webglFramebuffer===void 0)qe.setupRenderTarget(R);else if(Te.__hasExternalTextures)qe.rebindTextures(R,Ee.get(R.texture).__webglTexture,Ee.get(R.depthTexture).__webglTexture);else if(R.depthBuffer){const Fe=R.depthTexture;if(Te.__boundDepthTexture!==Fe){if(Fe!==null&&Ee.has(Fe)&&(R.width!==Fe.image.width||R.height!==Fe.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");qe.setupDepthRenderbuffer(R)}}const je=R.texture;(je.isData3DTexture||je.isDataArrayTexture||je.isCompressedArrayTexture)&&(we=!0);const We=Ee.get(R).__webglFramebuffer;R.isWebGLCubeRenderTarget?(Array.isArray(We[B])?V=We[B][X]:V=We[B],ue=!0):R.samples>0&&qe.useMultisampledRTT(R)===!1?V=Ee.get(R).__webglMultisampledFramebuffer:Array.isArray(We)?V=We[X]:V=We,N.copy(R.viewport),k.copy(R.scissor),z=R.scissorTest}else N.copy(J).multiplyScalar(L).floor(),k.copy(ne).multiplyScalar(L).floor(),z=pe;if(X!==0&&(V=lN),Re.bindFramebuffer(I.FRAMEBUFFER,V)&&Y&&Re.drawBuffers(R,V),Re.viewport(N),Re.scissor(k),Re.setScissorTest(z),ue){const Te=Ee.get(R.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_CUBE_MAP_POSITIVE_X+B,Te.__webglTexture,X)}else if(we){const Te=B;for(let je=0;je<R.textures.length;je++){const We=Ee.get(R.textures[je]);I.framebufferTextureLayer(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0+je,We.__webglTexture,X,Te)}}else if(R!==null&&X!==0){const Te=Ee.get(R.texture);I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,Te.__webglTexture,X)}E=-1},this.readRenderTargetPixels=function(R,B,X,Y,V,ue,we,Pe=0){if(!(R&&R.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Te=Ee.get(R).__webglFramebuffer;if(R.isWebGLCubeRenderTarget&&we!==void 0&&(Te=Te[we]),Te){Re.bindFramebuffer(I.FRAMEBUFFER,Te);try{const je=R.textures[Pe],We=je.format,Fe=je.type;if(!Ue.textureFormatReadable(We)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ue.textureTypeReadable(Fe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}B>=0&&B<=R.width-Y&&X>=0&&X<=R.height-V&&(R.textures.length>1&&I.readBuffer(I.COLOR_ATTACHMENT0+Pe),I.readPixels(B,X,Y,V,Ce.convert(We),Ce.convert(Fe),ue))}finally{const je=P!==null?Ee.get(P).__webglFramebuffer:null;Re.bindFramebuffer(I.FRAMEBUFFER,je)}}},this.readRenderTargetPixelsAsync=async function(R,B,X,Y,V,ue,we,Pe=0){if(!(R&&R.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Te=Ee.get(R).__webglFramebuffer;if(R.isWebGLCubeRenderTarget&&we!==void 0&&(Te=Te[we]),Te)if(B>=0&&B<=R.width-Y&&X>=0&&X<=R.height-V){Re.bindFramebuffer(I.FRAMEBUFFER,Te);const je=R.textures[Pe],We=je.format,Fe=je.type;if(!Ue.textureFormatReadable(We))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Ue.textureTypeReadable(Fe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const nt=I.createBuffer();I.bindBuffer(I.PIXEL_PACK_BUFFER,nt),I.bufferData(I.PIXEL_PACK_BUFFER,ue.byteLength,I.STREAM_READ),R.textures.length>1&&I.readBuffer(I.COLOR_ATTACHMENT0+Pe),I.readPixels(B,X,Y,V,Ce.convert(We),Ce.convert(Fe),0);const vt=P!==null?Ee.get(P).__webglFramebuffer:null;Re.bindFramebuffer(I.FRAMEBUFFER,vt);const zt=I.fenceSync(I.SYNC_GPU_COMMANDS_COMPLETE,0);return I.flush(),await iY(I,zt,4),I.bindBuffer(I.PIXEL_PACK_BUFFER,nt),I.getBufferSubData(I.PIXEL_PACK_BUFFER,0,ue),I.deleteBuffer(nt),I.deleteSync(zt),ue}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(R,B=null,X=0){const Y=Math.pow(2,-X),V=Math.floor(R.image.width*Y),ue=Math.floor(R.image.height*Y),we=B!==null?B.x:0,Pe=B!==null?B.y:0;qe.setTexture2D(R,0),I.copyTexSubImage2D(I.TEXTURE_2D,X,0,0,we,Pe,V,ue),Re.unbindTexture()};const cN=I.createFramebuffer(),uN=I.createFramebuffer();this.copyTextureToTexture=function(R,B,X=null,Y=null,V=0,ue=null){ue===null&&(V!==0?(pd("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),ue=V,V=0):ue=0);let we,Pe,Te,je,We,Fe,nt,vt,zt;const Mt=R.isCompressedTexture?R.mipmaps[ue]:R.image;if(X!==null)we=X.max.x-X.min.x,Pe=X.max.y-X.min.y,Te=X.isBox3?X.max.z-X.min.z:1,je=X.min.x,We=X.min.y,Fe=X.isBox3?X.min.z:0;else{const Ti=Math.pow(2,-V);we=Math.floor(Mt.width*Ti),Pe=Math.floor(Mt.height*Ti),R.isDataArrayTexture?Te=Mt.depth:R.isData3DTexture?Te=Math.floor(Mt.depth*Ti):Te=1,je=0,We=0,Fe=0}Y!==null?(nt=Y.x,vt=Y.y,zt=Y.z):(nt=0,vt=0,zt=0);const bt=Ce.convert(B.format),He=Ce.convert(B.type);let Nt;B.isData3DTexture?(qe.setTexture3D(B,0),Nt=I.TEXTURE_3D):B.isDataArrayTexture||B.isCompressedArrayTexture?(qe.setTexture2DArray(B,0),Nt=I.TEXTURE_2D_ARRAY):(qe.setTexture2D(B,0),Nt=I.TEXTURE_2D),I.pixelStorei(I.UNPACK_FLIP_Y_WEBGL,B.flipY),I.pixelStorei(I.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha),I.pixelStorei(I.UNPACK_ALIGNMENT,B.unpackAlignment);const at=I.getParameter(I.UNPACK_ROW_LENGTH),oi=I.getParameter(I.UNPACK_IMAGE_HEIGHT),Ua=I.getParameter(I.UNPACK_SKIP_PIXELS),ai=I.getParameter(I.UNPACK_SKIP_ROWS),zc=I.getParameter(I.UNPACK_SKIP_IMAGES);I.pixelStorei(I.UNPACK_ROW_LENGTH,Mt.width),I.pixelStorei(I.UNPACK_IMAGE_HEIGHT,Mt.height),I.pixelStorei(I.UNPACK_SKIP_PIXELS,je),I.pixelStorei(I.UNPACK_SKIP_ROWS,We),I.pixelStorei(I.UNPACK_SKIP_IMAGES,Fe);const It=R.isDataArrayTexture||R.isData3DTexture,Mi=B.isDataArrayTexture||B.isData3DTexture;if(R.isDepthTexture){const Ti=Ee.get(R),Fn=Ee.get(B),qn=Ee.get(Ti.__renderTarget),mm=Ee.get(Fn.__renderTarget);Re.bindFramebuffer(I.READ_FRAMEBUFFER,qn.__webglFramebuffer),Re.bindFramebuffer(I.DRAW_FRAMEBUFFER,mm.__webglFramebuffer);for(let Ro=0;Ro<Te;Ro++)It&&(I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,Ee.get(R).__webglTexture,V,Fe+Ro),I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,Ee.get(B).__webglTexture,ue,zt+Ro)),I.blitFramebuffer(je,We,we,Pe,nt,vt,we,Pe,I.DEPTH_BUFFER_BIT,I.NEAREST);Re.bindFramebuffer(I.READ_FRAMEBUFFER,null),Re.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else if(V!==0||R.isRenderTargetTexture||Ee.has(R)){const Ti=Ee.get(R),Fn=Ee.get(B);Re.bindFramebuffer(I.READ_FRAMEBUFFER,cN),Re.bindFramebuffer(I.DRAW_FRAMEBUFFER,uN);for(let qn=0;qn<Te;qn++)It?I.framebufferTextureLayer(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,Ti.__webglTexture,V,Fe+qn):I.framebufferTexture2D(I.READ_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,Ti.__webglTexture,V),Mi?I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,Fn.__webglTexture,ue,zt+qn):I.framebufferTexture2D(I.DRAW_FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,Fn.__webglTexture,ue),V!==0?I.blitFramebuffer(je,We,we,Pe,nt,vt,we,Pe,I.COLOR_BUFFER_BIT,I.NEAREST):Mi?I.copyTexSubImage3D(Nt,ue,nt,vt,zt+qn,je,We,we,Pe):I.copyTexSubImage2D(Nt,ue,nt,vt,je,We,we,Pe);Re.bindFramebuffer(I.READ_FRAMEBUFFER,null),Re.bindFramebuffer(I.DRAW_FRAMEBUFFER,null)}else Mi?R.isDataTexture||R.isData3DTexture?I.texSubImage3D(Nt,ue,nt,vt,zt,we,Pe,Te,bt,He,Mt.data):B.isCompressedArrayTexture?I.compressedTexSubImage3D(Nt,ue,nt,vt,zt,we,Pe,Te,bt,Mt.data):I.texSubImage3D(Nt,ue,nt,vt,zt,we,Pe,Te,bt,He,Mt):R.isDataTexture?I.texSubImage2D(I.TEXTURE_2D,ue,nt,vt,we,Pe,bt,He,Mt.data):R.isCompressedTexture?I.compressedTexSubImage2D(I.TEXTURE_2D,ue,nt,vt,Mt.width,Mt.height,bt,Mt.data):I.texSubImage2D(I.TEXTURE_2D,ue,nt,vt,we,Pe,bt,He,Mt);I.pixelStorei(I.UNPACK_ROW_LENGTH,at),I.pixelStorei(I.UNPACK_IMAGE_HEIGHT,oi),I.pixelStorei(I.UNPACK_SKIP_PIXELS,Ua),I.pixelStorei(I.UNPACK_SKIP_ROWS,ai),I.pixelStorei(I.UNPACK_SKIP_IMAGES,zc),ue===0&&B.generateMipmaps&&I.generateMipmap(Nt),Re.unbindTexture()},this.initRenderTarget=function(R){Ee.get(R).__webglFramebuffer===void 0&&qe.setupRenderTarget(R)},this.initTexture=function(R){R.isCubeTexture?qe.setTextureCube(R,0):R.isData3DTexture?qe.setTexture3D(R,0):R.isDataArrayTexture||R.isCompressedArrayTexture?qe.setTexture2DArray(R,0):qe.setTexture2D(R,0),Re.unbindTexture()},this.resetState=function(){T=0,C=0,P=null,Re.reset(),ye.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Lr}get outputColorSpace(){return this._outputColorSpace}
4161set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=ct._getDrawingBufferColorSpace(e),n.unpackColorSpace=ct._getUnpackColorSpace()}}const Eee=`
4162uniform float time;
4163varying vec2 vUv;
4164varying vec3 vPosition;
4165
4166void main() {
4167  vUv = uv;
4168  vPosition = position;
4169  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
4170}
4171`,Mee=`
4172uniform sampler2D uDataTexture;
4173uniform sampler2D uTexture;
4174uniform vec4 resolution;
4175varying vec2 vUv;
4176
4177void main() {
4178  vec2 uv = vUv;
4179  vec4 offset = texture2D(uDataTexture, vUv);
4180  gl_FragColor = texture2D(uTexture, uv - 0.02 * offset.rg);
4181}
4182`,Tee=fe.memo(({grid:t=10,mouse:e=.1,strength:n=.15,relaxation:i=.9,imageSrc:r,className:s=""})=>{const{ref:o,inView:a}=mw({threshold:0,triggerOnce:!1}),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),h=b.useRef(1),v=b.useRef(null),g=b.useRef(null),m=b.useRef(0);return b.useEffect(()=>{if(!l.current)return;const p=l.current,y=new RY;c.current=y;const x=new See({antialias:!0,alpha:!0,powerPreference:"high-performance"});x.setPixelRatio(Math.min(window.devicePixelRatio,2)),x.setClearColor(0,0),u.current=x,p.innerHTML="",p.appendChild(x.domElement);const w=new KL(0,0,0,0,-1e3,1e3);w.position.z=2,d.current=w;const S={time:{value:0},resolution:{value:new Gt},uTexture:{value:null},uDataTexture:{value:null}};new zY().load(r,O=>{O.minFilter=Ui,O.magFilter=Ui,O.wrapS=cs,O.wrapT=cs,h.current=O.image.width/O.image.height,S.uTexture.value=O,z()});const C=t,P=new Float32Array(4*C*C);for(let O=0;O<C*C;O++)P[O*4]=Math.random()*255-125,P[O*4+1]=Math.random()*255-125;const E=new PY(P,C,C,zi,Dr);E.needsUpdate=!0,S.uDataTexture.value=E;const M=new Ss({side:Rr,uniforms:S,vertexShader:Eee,fragmentShader:Mee,transparent:!0}),N=new Fd(1,1,C-1,C-1),k=new Nr(N,M);f.current=k,y.add(k);const z=()=>{if(!p||!x||!w)return;const O=p.getBoundingClientRect(),j=O.width,J=O.height;if(j===0||J===0)return;const ne=j/J;x.setSize(j,J),k&&k.scale.set(ne,1,1);const pe=1,he=pe*ne;w.left=-he/2,w.right=he/2,w.top=pe/2,w.bottom=-pe/2,w.updateProjectionMatrix(),S.resolution.value.set(j,J,1,1)};if(window.ResizeObserver){const O=new ResizeObserver(()=>{z()});O.observe(p),g.current=O}else window.addEventListener("resize",z);const F={x:0,y:0,prevX:0,prevY:0,vX:0,vY:0},$=O=>{const j=p.getBoundingClientRect(),J=(O.clientX-j.left)/j.width,ne=1-(O.clientY-j.top)/j.height;F.vX=J-F.prevX,F.vY=ne-F.prevY,Object.assign(F,{x:J,y:ne,prevX:J,prevY:ne})},H=()=>{E&&(E.needsUpdate=!0),Object.assign(F,{x:0,y:0,prevX:0,prevY:0,vX:0,vY:0})};p.addEventListener("mousemove",$),p.addEventListener("mouseleave",H);const W=()=>{if(!p)return;const O=p.getBoundingClientRect(),{top:j,height:J}=O,ne=window.innerHeight,pe=(ne-j)/(ne+J);m.current=Math.max(0,Math.min(1,pe))};window.addEventListener("scroll",W,{passive:!0}),W(),z();const L=()=>
4182{if(!a){v.current=requestAnimationFrame(L);return}if(v.current=requestAnimationFrame(L),!x||!y||!w||!f.current)return;const O=(m.current-.5)*.4;if(f.current.position.y=O,S.time.value+=.05,!(E.image.data instanceof Float32Array)){console.error("dataTexture.image.data is not a Float32Array");return}const j=E.image.data;for(let he=0;he<C*C;he++)j[he*4]*=i,j[he*4+1]*=i;const J=C*F.x,ne=C*F.y,pe=C*e;for(let he=0;he<C;he++)for(let Ne=0;Ne<C;Ne++){const K=Math.pow(J-he,2)+Math.pow(ne-Ne,2);if(K<pe*pe){const Z=4*(he+C*Ne),be=Math.min(pe/Math.sqrt(K),10);j[Z]+=n*100*F.vX*be,j[Z+1]-=n*100*F.vY*be}}E.needsUpdate=!0,x.render(y,w)};return L(),()=>{v.current&&cancelAnimationFrame(v.current),g.current?g.current.disconnect():window.removeEventListener("resize",z),p.removeEventListener("mousemove",$),p.removeEventListener("mouseleave",H),window.removeEventListener("scroll",W),x&&(x.dispose(),p.contains(x.domElement)&&p.removeChild(x.domElement)),N&&N.dispose(),M&&M.dispose(),E&&E.dispose(),S.uTexture.value&&S.uTexture.value.dispose(),c.current=null,u.current=null,d.current=null,f.current=null}},[t,e,n,i,r,a]),_.jsx("div",{ref:p=>{l.current=p,o(p)},className:`relative overflow-hidden ${s}`,style:{width:"100%",height:"100%",minWidth:"0",minHeight:"0"}})}),Cee="/assets/service-hero-CZe5l4K1.png",Aee=[{id:1,cardId:"mvp-development",title:"MVP Development",subtitle:"Rapid Innovation",description:"Rapid prototyping and MVP development to validate your ideas and get to market faster.",features:["Rapid Prototyping","User Testing","Market Validation","Iterative Design"],image:"https://i.pinimg.com/736x/f2/00/ab/f200ab40b3236fabfe3674a4e87259b6.jpg",imagePosition:"right"},{id:2,cardId:"full-stack-development",title:"Full-Stack Development",subtitle:"Complete Digital Solutions",description:"End-to-end development solutions with modern frameworks and cutting-edge technologies.",features:["React/Next.js","Node.js/Python","Cloud Architecture","API Development"],image:"https://i.pinimg.com/736x/2a/91/e9/2a91e93882707fe9571071d5604910c9.jpg",imagePosition:"left"},{id:3,cardId:"agentic-ai",title:"Agentic AI",subtitle:"Next-Generation Intelligence",description:"Intelligent autonomous systems that think, learn, and adapt to solve complex business problems.",features:["Machine Learning","Natural Language Processing","Computer Vision","Predictive Analytics"],image:"https://i.pinimg.com/736x/c9/22/08/c9220891b0900b0e6b5409cb005815ca.jpg",imagePosition:"right"},{id:4,cardId:"web3-products",title:"Web3 Products",subtitle:"Decentralized Future",description:"Decentralized applications, smart contracts, and blockchain solutions for the new internet.",features:["Smart Contracts","DeFi Protocols","NFT Platforms","DAO Development"],image:"https://i.pinimg.com/736x/bb/cc/eb/bbcceb7b8af015276ff0cf4650438ad5.jpg",imagePosition:"left"},{id:5,cardId:"future-tech-prototyping",title:"Future Tech Prototyping",subtitle:"Tomorrow's Technology",description:"Experimental projects with emerging technologies like AR/VR, IoT, and quantum computing.",features:["AR/VR Experiences","IoT Solutions","Edge Computing","Quantum Algorithms"],image:"https://i.pinimg.com/736x/bb/73/d1/bb73d1c949e2d3aff5b4c816b2f014d1.jpg",imagePosition:"right"}],Ree=()=>{const t=b.useRef(null),[e,n]=b.useState(0),i=oq();return b.useEffect(()=>{const r=t.current;if(!r)return;const s=Array.from(r.querySelectorAll(".service-section"));if(s.length===0)return;const o=s[0],a=s[s.length-1],l=()=>{const c=window.scrollY,u=c+window.innerHeight/2;let d=!1;if(i){const f=o.offsetTop+o.offsetHeight/2,h=a.offsetTop+a.offsetHeight;d=u>f&&u<h}else{const f=o.offsetTop,h=a.offsetTop;d=c>=f&&c<=h}d?document.documentElement.style.scrollSnapType!=="y mandatory"&&(document.documentElement.style.scrollSnapType="y mandatory",i||(document.documentElement.style.scrollSnapStop="always")):document.documentElement.style.scrollSnapType!==""&&(document.documentElement.style.scrollSnapType="",document.documentElement.style.scrollSnapStop=""),s.forEach((f,h)=>{const v=f.offsetTop,g=v+f.offsetHeight;u>=v&&u<g&&n(h)})};return window.addEventListener("scroll",l,{passive:!0}
4182),l(),()=>{window.removeEventListener("scroll",l),document.documentElement.style.scrollSnapType="",document.documentElement.style.scrollSnapStop=""}},[i]),_.jsxs("div",{ref:t,id:"service",children:[_.jsxs("div",{className:"service-section h-screen flex items-center justify-center bg-background relative",style:{scrollSnapAlign:"start"},children:[_.jsx("div",{className:"absolute inset-0",children:_.jsx(Tee,{imageSrc:Cee,grid:10,mouse:.1,strength:.15,relaxation:.9,className:"custom-class"})}),_.jsxs("div",{className:"text-center px-8 relative",children:[_.jsx("h1",{className:"text-6xl md:text-8xl font-bold mb-6 text-foreground",children:"Our Services"}),_.jsx("p",{className:"text-xl md:text-2xl text-muted-foreground max-w-3xl",children:"We specialize in cutting-edge technologies that define the future of digital innovation"})]})]}),Aee.map((r,s)=>_.jsx("div",{className:"service-section h-screen",style:{scrollSnapAlign:"start"},id:r.cardId,children:_.jsx(fq,{service:r})},r.id))]})},ss=b.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:ot("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));ss.displayName="Card";const Pee=b.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:ot("flex flex-col space-y-1.5 p-6",t),...e}));Pee.displayName="CardHeader";const Dee=b.forwardRef(({className:t,...e},n)=>_.jsx("h3",{ref:n,className:ot("text-2xl font-semibold leading-none tracking-tight",t),...e}));Dee.displayName="CardTitle";const Lee=b.forwardRef(({className:t,...e},n)=>_.jsx("p",{ref:n,className:ot("text-sm text-muted-foreground",t),...e}));Lee.displayName="CardDescription";const Ep=b.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:ot("p-6 pt-0",t),...e}));Ep.displayName="CardContent";const Nee=b.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:ot("flex items-center p-6 pt-0",t),...e}));Nee.displayName="CardFooter";const Iee=[{icon:tR,title:"Innovation-First",description:"We embrace cutting-edge technologies and methodologies to deliver solutions that set industry standards."},{icon:t3,title:"Scalable",description:"Built for growth with robust architectures that evolve with your business needs and user demands."},{icon:t_,title:"Human-Centered",description:"Every solution is designed with user experience at its core, ensuring intuitive and accessible interfaces."},{icon:Jh,title:"Secure",description:"Enterprise-grade security protocols and best practices protect your data and ensure compliance."},{icon:BO,title:"AI-Native",description:"Integrated AI capabilities that enhance functionality and provide intelligent automation from day one."}];function kee(){const t={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.15}}},e={hidden:{opacity:0,scale:.8},visible:{opacity:1,scale:1,transition:{duration:.5,ease:[.25,.1,.25,1]}}};return _.jsxs("section",{className:"py-24 px-6 mt-40 relative overflow-hidden min-h-screen flex justify-center items-center",children:[_.jsxs("div",{className:"absolute inset-0",children:[_.jsx("div",{className:"absolute top-1/3 left-1/4 w-80 h-80 bg-nova-purple/10 rounded-full blur-3xl animate-float"}),_.jsx("div",{className:"absolute bottom-1/3 right-1/4 w-60 h-60 bg-nova-cyan/10 rounded-full blur-3xl animate-float",style:{animationDelay:"2s"}})]}),_.jsxs("div",{className:"max-w-7xl mx-auto relative z-10",children:[_.jsxs(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.8},viewport:{once:!0},className:"text-center mb-16",children:[_.jsx("h2",{className:"text-4xl md:text-6xl font-bold mb-6",children:_.jsx("span",{className:"text-gradient",children:"Why Choose Nova Stack"})}),_.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"Our core principles drive everything we build, ensuring exceptional results that exceed expectations"})]}),_.jsx(ze.div,{variants:t,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:Iee.map((n,i)=>_.jsx(ze.div,{variants:e,className:`group ${n.title==="Scalable"?"lg:col-span-2":""}`,children:_.jsxs(ss,{className:"relative p-8 rounded-3xl glass border border-border/50 hover:border-nova-purple/50 transition-all duration-300 h-full hover:-translate-y-2",children:[_.jsxs("div",{className:"mb-6 relative",children:[_.jsx("div",{className:"w-20 h-20 rounded-3xl bg-gradient-to-br from-nova-purple/20 to-nova-cyan/20 flex items-center justify-center group-hover:from-nova-purple/30 group-hover:to-nova-cyan/30 transition-all duration-300",children:_.jsx(n.icon,{className:"w-10 h-10 text-nova-purple group-hover:text-nova-cyan transition-colors duration-300"})}),_.jsx("div",{className:"absolute inset-0 rounded-3xl bg-nova-purple/20 blur-xl opacity-0 group-hover:opacity-50 transition-opacity duration-300"})]}),_.jsx("h3",{className:"text-2xl font-bold mb-4 text-foreground group-hover:text-nova-purple transition-colors",children:n.title}),_.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n.description}),_.jsx("div",{className:"absolute inset-0 rounded-3xl bg-gradient-to-br from-nova-purple/5 via-trans
4182parent to-nova-cyan/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]})},n.title))}),_.jsx(ze.div,{initial:{opacity:0},whileInView:{opacity:1},transition:{duration:1,delay:.5},viewport:{once:!0},className:"flex justify-center mt-16",children:_.jsx("div",{className:"w-24 h-1 bg-gradient-hero rounded-full"})})]})]})}const Xl=b.forwardRef(({className:t,type:e,...n},i)=>_.jsx("input",{type:e,className:ot("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:i,...n}));Xl.displayName="Input";const Cw=b.forwardRef(({className:t,...e},n)=>_.jsx("textarea",{className:ot("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));Cw.displayName="Textarea";var Oee="Label",nN=b.forwardRef((t,e)=>_.jsx(Et.label,{...t,ref:e,onMouseDown:n=>{var r;n.target.closest("button, input, select, textarea")||((r=t.onMouseDown)==null||r.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));nN.displayName=Oee;var iN=nN;const Fee=e_("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),to=b.forwardRef(({className:t,...e},n)=>_.jsx(iN,{ref:n,className:ot(Fee(),t),...e}));to.displayName=iN.displayName;function Uee(){const[t,e]=b.useState(""),[n,i]=b.useState(""),[r,s]=b.useState(""),[o,a]=b.useState(!1),[l,c]=b.useState(!1),u=async d=>{d.preventDefault(),a(!0);const f="8479262226:AAH_8QFh06z6q664Gh6MDcP8aVuciBoDM34",h="7762872848",v=`New message from ${t} (${n}):
4183
4184${r}`;console.log("Telegram Bot Token:",f);try{(await fetch(`https://api.telegram.org/bot${f}/sendMessage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:h,text:v})})).ok?(c(!0),ds.success("Message sent successfully!")):(console.error("Failed to send message"),ds.error("Failed to send message. Please try again later."))}catch(g){console.error(g),ds.error("An error occurred. Please try again later.")}a(!1)};return _.jsxs("section",{className:"py-24 px-6 relative overflow-hidden",children:[_.jsx("div",{className:"absolute inset-0",children:_.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-nova-purple/5 rounded-full blur-3xl"})}),_.jsxs("div",{className:"max-w-7xl mx-auto relative z-10",children:[_.jsxs(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.8},viewport:{once:!0},className:"text-center mb-16",children:[_.jsx("h2",{className:"text-4xl md:text-6xl font-bold mb-6",children:_.jsx("span",{className:"text-gradient",children:"Let's Build Together"})}),_.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"Ready to transform your ideas into reality? Get in touch and let's discuss your next big project."})]}),_.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[_.jsx(ze.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},transition:{duration:.8},viewport:{once:!0},children:_.jsx(ss,{className:"glass border-border/50 hover:border-nova-purple/50 transition-all duration-300",children:_.jsxs(Ep,{className:"p-8",children:[_.jsx("h3",{className:"text-2xl font-bold mb-6 text-foreground",children:"Send us a message"}),l?_.jsxs("div",{className:"text-center",children:[_.jsx("h3",{className:"text-2xl font-bold text-nova-purple",children:"Thank you for your message!"}),_.jsx("p",{className:"text-muted-foreground",children:"We will get back to you shortly."})]}):_.jsxs("form",{onSubmit:u,className:"space-y-6",children:[_.jsxs("div",{children:[_.jsx(to,{htmlFor:"name",className:"text-foreground font-medium",children:"Name"}),_.jsx(Xl,{id:"name",placeholder:"Your full name",className:"mt-2 bg-background/50 border-border/50 focus:border-nova-purple transition-colors",required:!0,value:t,onChange:d=>e(d.target.value)})]}),_.jsxs("div",{children:[_.jsx(to,{htmlFor:"email",className:"text-foreground font-medium",children:"Email"}),_.jsx(Xl,{id:"email",type:"email",placeholder:"[email protected]",className:"mt-2 bg-background/50 border-border/50 focus:border-nova-purple transition-colors",required:!0,value:n,onChange:d=>i(d.target.value)})]}),_.jsxs("div",{children:[_.jsx(to,{htmlFor:"message",className:"text-foreground font-medium",children:"Message"}),_.jsx(Cw,{id:"message",placeholder:"Tell us about your project, goals, and timeline...",rows:6,className:"mt-2 bg-background/50 border-border/50 focus:border-nova-purple transition-colors resize-none",required:!0,value:r,onChange:d=>s(d.target.value)})]}),_.jsx(rd,{className:"w-full text-lg py-4 h-auto",type:"submit",disabled:o,children:o?"Sending...":"Send Message"}),_.jsx(VD,{children:_.jsx(rd,{glowColor:"#d1d1d1",hoverTextColor:"#ffffff",className:"w-full text-lg py-4 h-auto",children:"Book a Call"})})]})]})})}),_.jsxs(ze.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},transition:{duration:.8,delay:.2},viewport:{once:!0},className:"space-y-8",children:[_.jsxs("div",{className:"space-y-6",children:[_.jsxs(ss,{className:"flex items-center gap-4 p-6 rounded-2xl glass border border-border/50",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-nova-purple/10 flex items-center justify-center",children:_.jsx(Gp,{className:"w-6 h-6 text-nova-purple"})}),_.jsxs("div",{children:[_.jsx("h4",{className:"font-semibold text-foreground",children:"Email Us"}),_.jsx("p",{className:"text-muted-foreground",children:"[email protected]"})]})]}),_.jsxs(ss,{className:"flex items-center gap-4 p-6 rounded-2xl glass border border-border/50",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-nova-cyan/10 flex items-center justify-center",children:_.jsx(QO,{className:"w-6 h-6 text-nova-cyan"})}),_.jsxs("div",{children:[_.jsx("h4",{className:"font-semibold text-foreground",children:"Call Us"}),_.jsx("p",{className:"text-muted-foreground",children:"+91-2250333576"})]})]}),_.jsxs(ss,{className:"flex items-center gap-4 p-6 rounded-2xl glass border border-border/50",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-nova-magenta/10 flex items-center justify-center",children:_.jsx(KO,{className:"w-6 h-6 text-nova-magenta"})}),_.jsxs("div",{children:[_.jsx("h4",{className:"font-semibold text-foreground",children:"Visit Us"}),_.jsx("p",{className:"text-muted-foreground",children:"41, 1st Floor, Building No 3, Sunshine Commercial Complex, Opposite Sunshine Heights, Near Railway Sta on, Nallasopara East. Palghar – 401209"})]})]})]}),_.jsxs(ss,{className:"p-6 rounded-2xl bg-gradient-to-br from-nova-purple/10 to-nova-cyan/10 border border-nova-purple/20",children:[_.jsx("h4",{className:"font-semibold text-foreground mb-2",children:"Qu
4184ick Response"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"We typically respond to all inquiries within 2-4 hours during business hours."})]})]})]})]})]})}function pm(){const[t,e]=b.useState(""),[n,i]=b.useState(!1),r=()=>{window.scrollTo({top:0,behavior:"smooth"})},s=async l=>{l.preventDefault(),i(!0);const c="8479262226:AAH_8QFh06z6q664Gh6MDcP8aVuciBoDM34",u="7762872848",d=`📧 New Newsletter Subscription:
4185
4186Email: ${t}`;try{(await fetch(`https://api.telegram.org/bot${c}/sendMessage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:u,text:d})})).ok?(ds.success("Successfully subscribed to newsletter!"),e("")):(console.error("Failed to subscribe"),ds.error("Failed to subscribe. Please try again later."))}catch(f){console.error(f),ds.error("An error occurred. Please try again later.")}i(!1)},o={Services:[{name:"Agentic AI",id:"#agentic-ai"},{name:"Full-Stack Development",id:"#full-stack-development"},{name:"MVP Development",id:"#mvp-development"},{name:"Web3 Products",id:"#web3-products"},{name:"Future Tech Prototyping",id:"#future-tech-prototyping"}],Company:[{name:"About Us",link:"about-us"},{name:"Our Team",link:"our-team"},{name:"Careers",link:"careers"},{name:"Blog",link:"blog"},{name:"Press",link:"press"}],Resources:[{name:"Documentation",link:"documentation"},{name:"Case Studies",link:"case-studies"},{name:"Community",link:"community"},{name:"Careers",link:"/careers"}]},a=[{icon:XO,href:"#",label:"GitHub"},{icon:qO,href:"#",label:"LinkedIn"},{icon:n3,href:"#",label:"Twitter"},{icon:Gp,href:"mailto:[email protected]",label:"Email"}];return _.jsxs("footer",{className:"relative bg-background/95 backdrop-blur-sm border-t border-border/50",children:[_.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[_.jsx("div",{className:"absolute bottom-0 left-1/4 w-80 h-80 bg-nova-purple/5 rounded-full blur-3xl"}),_.jsx("div",{className:"absolute bottom-0 right-1/4 w-60 h-60 bg-nova-cyan/5 rounded-full blur-3xl"})]}),_.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-16 relative z-10",children:[_.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-12 mb-12",children:[_.jsx("div",{className:"lg:col-span-2",children:_.jsxs(ze.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},children:[_.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[_.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-hero flex items-center justify-center",children:_.jsx("img",{src:"./logo.png",alt:"logo",className:"rounded-xl"})}),_.jsx("span",{className:"text-2xl font-bold text-foreground",children:"Nova Stack"})]}),_.jsx("p",{className:"text-muted-foreground mb-6 max-w-md leading-relaxed",children:"Building the future of technology with innovative AI, Web3, and cutting-edge solutions. Transform your ideas into reality with Nova Stack."}),_.jsx("div",{className:"flex gap-4",children:a.map(l=>_.jsx("a",{href:l.href,className:"group w-12 h-12 rounded-xl glass border border-border/50 hover:border-nova-purple/50 flex items-center justify-center transition-all duration-300 hover:shadow-glow","aria-label":l.label,children:_.jsx(l.icon,{className:"w-5 h-5 text-muted-foreground group-hover:text-nova-purple transition-colors"})},l.label))})]})}),Object.entries(o).map(([l,c],u)=>_.jsxs(ze.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:u*.1},viewport:{once:!0},children:[_.jsx("h3",{className:"font-bold text-foreground mb-6",children:l}),_.jsx("ul",{className:"space-y-3",children:c.map(d=>{var f;return _.jsx("li",{children:(f=d.link)!=null&&f.startsWith("/")?_.jsx(Jo,{to:d.link,className:"text-muted-foreground hover:text-nova-purple transition-colors",children:d.name}):_.jsx("a",{href:d.id||d.link,className:"text-muted-foreground hover:text-nova-purple transition-colors",children:d.name})},d.id||d.link)})})]},l))]}),_.jsx(ze.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:.3},viewport:{once:!0},className:"mb-12",children:_.jsx("div",{className:"p-8 rounded-3xl glass border border-nova-purple/30 hover:border-nova-purple/50 transition-all duration-300",children:_.jsxs("div",{className:"text-center max-w-2xl mx-auto",children:[_.jsxs("h3",{className:"text-2xl font-bold text-foreground mb-4",children:["Stay Updated with ",_.jsx("span",{className:"text-gradient",children:"Nova Stack"})]}),_.jsx("p",{className:"text-muted-foreground mb-6",children:"Get the latest insights on AI, Web3, and future technologies delivered to your inbox."}),_.jsxs("form",{onSubmit:s,className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:[_.jsx("input",{type:"email",placeholder:"Enter your email",className:"flex-1 px-4 py-3 rounded-xl bg-background/50 border border-border/50 focus:border-nova-purple focus:outline-none transition-colors text-foreground",required:!0,value:t,onChange:l=>e(l.target.value)}),_.jsx(Cu,{variant:"nova",className:"px-6",type:"submit",disabled:n,children:n?"Subscribing...":"Subscribe"})]})]})})}),_.jsxs(ze.div,{initial:{opacity:0}
4186,whileInView:{opacity:1},transition:{duration:.6,delay:.4},viewport:{once:!0},className:"flex flex-col sm:flex-row items-center justify-between pt-8 border-t border-border/50",children:[_.jsx("div",{className:"text-muted-foreground text-sm mb-4 sm:mb-0",children:"© 2025 Nova Stack. All rights reserved."}),_.jsxs("div",{className:"flex items-center gap-6",children:[_.jsx(Jo,{to:"/privacy-policy",className:"text-muted-foreground hover:text-nova-purple text-sm transition-colors",children:"Privacy Policy"}),_.jsx(Jo,{to:"/terms-and-conditions",className:"text-muted-foreground hover:text-nova-purple text-sm transition-colors",children:"Terms of Service"}),_.jsx("button",{onClick:r,className:"w-10 h-10 rounded-full glass border border-border/50 hover:border-nova-purple/50 flex items-center justify-center transition-all duration-300 hover:shadow-glow group","aria-label":"Scroll to top",children:_.jsx(jO,{className:"w-5 h-5 text-muted-foreground group-hover:text-nova-purple transition-colors"})})]})]})]})]})}const rN=b.forwardRef(({className:t,columns:e=3,gap:n=4,children:i,...r},s)=>{const o={columnCount:e,columnGap:`${n*.25}rem`},a={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}};return _.jsx("div",{ref:s,style:o,className:ot("w-full",t),...r,children:b.Children.map(i,l=>_.jsx(ze.div,{className:"mb-4 break-inside-avoid",variants:a,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},children:l}))})});rN.displayName="MasonryGrid";const zee=[{profileImage:"https://randomuser.me/api/portraits/men/32.jpg",name:"Anaam Farooq",feedback:"Kashmir's Hidden Winter Wonderland",mainImage:"https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=800&h=1200&q=80"},{profileImage:"https://randomuser.me/api/portraits/women/44.jpg",name:"neophyte_clicker",feedback:"Celebrating Diwali Through The Lens",mainImage:"https://images.unsplash.com/photo-1605292356183-a77d0a9c9d1d?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8RGl3YWxpfGVufDB8fDB8fHww"},{profileImage:"https://randomuser.me/api/portraits/men/56.jpg",name:"Badshah1341",feedback:"A Sunset Symphony in Gold",mainImage:"https://images.unsplash.com/photo-1494500764479-0c8f2919a3d8?auto=format&fit=crop&w=800&h=1000&q=80"},{profileImage:"https://randomuser.me/api/portraits/men/78.jpg",name:"mohsinsyasin_",feedback:"realme Insider Event Kashmir",mainImage:"https://images.unsplash.com/photo-1617396900799-f4ec2b43c7ae?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTh8fHdhbGxwYXBlciUyMDRrfGVufDB8fDB8fHww"},{profileImage:"https://randomuser.me/api/portraits/women/68.jpg",name:"Naaz khan",feedback:"Illuminate the Night with the P3 Pro",mainImage:"https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NTF8fG5hdHVyZXxlbnwwfHwwfHx8MA%3D%3D"},{profileImage:"https://randomuser.me/api/portraits/women/88.jpg",name:"Venky_smile",feedback:"Highlights from realme",mainImage:"https://images.unsplash.com/photo-1444464666168-49d633b86797?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OTh8fG5hdHVyZXxlbnwwfHwwfHx8MA%3D%3D"},{profileImage:"https://randomuser.me/api/portraits/men/21.jpg",name:"LoserAnant",feedback:"14 Pro Series Launch Event Recap",mainImage:"https://images.unsplash.com/photo-1497436072909-60f360e1d4b1?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Njh8fG5hdHVyZXxlbnwwfHwwfHx8MA%3D%3D"},{profileImage:"https://randomuser.me/api/portraits/women/11.jpg",name:"Isabella",feedback:"The mountains are calling me.",mainImage:"https://images.unsplash.com/photo-1531366936337-7c912a4589a7?auto=format&fit=crop&w=800&h=1200&q=80"}],Bee=({profileImage:t,name:e,feedback:n,mainImage:i})=>{const r=b.useRef(null),{ref:s,inView:o}=mw({threshold:0,triggerOnce:!1}),{scrollYProgress:a}=V2({target:r,offset:["start end","end start"]}),l=j2(a,[0,1],o?["-10%","10%"]:["0%","0%"]);return _.jsxs("div",{ref:c=>{s(c),r.current=c},className:"relative rounded-2xl overflow-hidden group transition-transform duration-300 ease-in-out hover:scale-105",children:[_.jsx(ze.div,{style:{y:l},children:_.jsx("img",{src:i,alt:n,className:"w-full h-auto object-cover",onError:c=>{c.currentTarget.src="https://placehold.co/800x600/1a1a1a/ffffff?text=Image"}})}),_.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/60 via-black/20 to-transparent"}),_.jsxs("div",{className:"absolute top-0 left-0 p-4 text-white",children:[_.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[_.jsx("img",{src:t,className:"w-8 h-8 rounded-full border-2 border-white/80",alt:e,onError:c=>{c.currentTarget.src="https://placehold.co/40x40/EFEFEF/333333?text=A"}}),_.jsx("span",{className:"font-semibold text-sm drop-shadow-md",children:e})]}),_.jsx("p",{className:"text-sm font-medium leading-tight drop-shadow-md",children:n})]})]})},Vee=()=>{const[t,e]=b.useState(4),n=i=>i<640?1:i<1024?2:i<1280?3:4;return b.useEffect(()=>{const i=()=>{e(n(window.innerWidth))};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),_.jsxs("div",{className:"w-full min-h-screen mt-20 p-4 sm:p-6 lg:p-8 bg-background text-foreground",children:[_.jsx("h1",{className:"text-3xl md:text-6xl font-semibold mb-20 text-center",children:"What People Are Saying"}),_.jsx("div",{className:"max-w-7xl mx-auto",children:_.jsx(rN,{columns:t,gap:4,children:zee.map((i,r)=>_.jsx(Bee,{...i},r))})})]})},Hee=()=>(b.useEffect(()=>{document.title="Nova Stack - Building the Future of Technology";const t=document.querySelector('meta[name="description"]');t&&t.setAttribute("content","Nova Stack is a cutting-edge development agency specializing in AI, Web3, and future technologies. Transform your ideas into reality with our expert team.")},[]),_.jsxs("div",{className:"min-h-screen w-full bg-background text-foreground relative font-outfit",children:[_.jsx(im,{}),_.jsxs("main",{children:[_.jsx(fG,{}),_.jsx("div",{id:"testimonial",children:_.jsx(Vee,{})}),_.jsx("div",{id:"about",children:_.jsx(sq,{})}),_.jsx("div",{id:"services",children:_.jsx(Ree,{})}),_.jsx(kee,{}),_.jsx("div",{id:"contact",children:_.jsx(Uee,{})})]}),_.jsx(pm,{})]})),jee=()=>{const t=Nc();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),_.jsx("main",{children:_.jsx("div",{className:"max-w-screen-xl mx-auto px-4 flex items-center justify-start h-screen md:px-8",children:_.jsxs("div",{className:"max-w-lg mx-auto text-center",children:[_.jsx("h3",{className:"text-4xl font-semibold sm:text-5xl",children:"Page not found"}),_.jsx("p",{className:"text-white/50 mt-3",children:"Sorry, the page you are looking for could not be found or has been removed."})]})})})},Gee={hidden:{opacity:0}
4186,visible:{opacity:1,transition:{staggerChildren:.1}}},Kf={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6}}};function Wee(){b.useEffect(()=>{window.scrollTo(0,0)},[]);const t=[{icon:WO,title:"Information We Collect",content:[{subtitle:"Personal Information",text:"When you contact us or use our services, we may collect personal information such as your name, email address, phone number, company name, and project requirements. This information is collected only when voluntarily provided by you through our contact forms or communication channels."},{subtitle:"Usage Data",text:"We automatically collect certain information about your device and how you interact with our website, including IP address, browser type, operating system, referring URLs, pages viewed, and timestamps. This helps us improve our services and user experience."}]},{icon:$O,title:"How We Use Your Information",content:[{subtitle:"Service Delivery",text:"We use your personal information to provide, maintain, and improve our services, respond to your inquiries, communicate with you about projects, and deliver the solutions you've requested."},{subtitle:"Business Operations",text:"Your information helps us understand user needs, develop new features and services, analyze website usage patterns, prevent fraud and abuse, and comply with legal obligations."},{subtitle:"Communications",text:"With your consent, we may send you technical updates, security alerts, project notifications, marketing communications, and newsletters about our services and innovations in AI, Web3, and emerging technologies."}]},{icon:YO,title:"Data Security",content:[{subtitle:"Protection Measures",text:"We implement industry-standard security measures to protect your personal information, including encryption, secure servers, access controls, and regular security audits. However, no method of transmission over the internet is 100% secure."},{subtitle:"Data Retention",text:"We retain your personal information only for as long as necessary to fulfill the purposes outlined in this privacy policy, comply with legal obligations, resolve disputes, and enforce our agreements."}]},{icon:i3,title:"Your Rights",content:[{subtitle:"Access and Control",text:"You have the right to access, correct, update, or delete your personal information. You can opt-out of marketing communications at any time and request a copy of the data we hold about you."},{subtitle:"Data Portability",text:"Upon request, we will provide your personal information in a structured, commonly used, and machine-readable format. You have the right to transfer this data to another service provider."}]},{icon:vy,title:"Third-Party Services",content:[{subtitle:"Service Providers",text:"We may share your information with trusted third-party service providers who assist us in operating our website, conducting business, or servicing you. These parties are obligated to keep your information confidential."},{subtitle:"Analytics",text:"We use analytics services to understand how visitors interact with our website. These services may collect information about your use of our site and other websites using cookies and similar technologies."}]},{icon:Jh,title:"Cookies and Tracking",content:[{subtitle:"Cookie Usage",text:"Our website uses cookies and similar tracking technologies to enhance user experience, analyze site traffic, and understand where our visitors are coming from. You can control cookies through your browser settings."},{subtitle:"Do Not Track",text:"We respect Do Not Track signals and will not track, plant cookies, or use advertising when a Do Not Track browser mechanism is in place."}]}];return _.jsxs("div",{className:"min-h-screen w-full bg-background text-foreground",children:[_.jsx(im,{}),_.jsxs("section",{className:"relative min-h-[60vh] flex items-center justify-center overflow-hidden",children:[_.jsxs("div",{className:"absolute inset-0",children:[_.jsx("div",{className:"absolute top-20 left-1/4 w-96 h-96 bg-nova-purple/20 rounded-full blur-3xl animate-pulse-glow"}),_.jsx("div",{className:"absolute bottom-20 right-1/4 w-80 h-80 bg-nova-cyan/20 rounded-full blur-3xl animate-pulse-glow",style:{animationDelay:"1s"}})]}),_.jsxs(ze.div,{variants:Gee,initial:"hidden",animate:"visible",className:"max-w-4xl mx-auto px-6 py-24 relative z-10 text-center",children:[_.jsxs(ze.div,{variants:Kf,className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass border border-nova-purple/30 mb-8",children:[_.jsx(Jh,{className:"w-4 h-4 text-nova-purple"}),_.jsx("span",{className:"text-sm font-medium",children:"Legal"})]}),_.jsxs(ze.h1,{variants:Kf,className:"text-5xl md:text-6xl lg:text-7xl font-bold mb-6",children:["Privacy ",_.jsx("span",{className:"text-gradient",children:"Policy"})]}),_.jsx(ze.p,{variants:Kf,className:"text-xl text-muted-foreground max-w-2xl mx-auto leading-relaxed",children:"Your privacy is important to us. This policy explains how Nova Stack collects, uses, and protects your personal information."}),_.jsx(ze.div,{variants:Kf,className:"flex items-center justify-center gap-4 text-sm text-muted-foreground mt-8",children:_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(eR,{className:"w-4 h-4"}),_.jsx("span",{children:"Last Updated: January 2025"})]})})]})]}),_.jsx("section",{className:"py-20 relative",children:_.jsxs("div",{className:"max-w-4xl mx-auto px-6 space-y-12",children:[t.map((e,n)=>_.jsxs(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:n*.1},viewport:{once:!0},className:"glass rounded-3xl p-8 md:p-12 border border-border/50 hover:border-nova-purple/30 transition-all duration-300",children:[_.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-hero flex items-center justify-center flex-shrink-0",children:_.jsx(e.icon,{className:"w-6 h-6 text-foreground"})}),_.jsx("h2",{className:"text-3xl font-bold text-foreground",children:e.title})]}),_.jsx("div",{className:"space-y-6 ml-16",children:e.content.map((i,r)=>_.jsxs("div",{children:[_.jsx("h3",{className:"text-xl font-semibold text-foreground mb-3",children:i.subtitle}),_.jsx("p",{className:"text-muted-foreground leading-relaxed",children:i.text})]},r))})]},e.title)),_.jsx(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"glass rounded-3xl p-8 md:p-12 border border-nova-purple/30 hover:border-nova-purple/50 transition-all duration-300",children:_.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-hero flex items-center justify-center flex-shrink-0",children:_.jsx(Gp,{className:"w-6 h-6 text-foreground"})}),_.jsxs("div",{children:[_.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Contact Us"}),_.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:"If you have any questions about this Privacy Policy, your data, or our practices, please contact us at:"}),_.jsx("a",{href:"mailto:[email protected]",className:"text-nova-purple hover:text-nova-cyan transition-colors font-medium",children:"[email protected]"})]})]})}),_.jsx(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center py-8",children:_.jsx("p",{className:"text-muted-foreground text-sm",children:'We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page and updating the "Last Updated" date.'})})]})}),_.jsx(pm,{})]})}const $ee={hidden:{opacity:0}
4186,visible:{opacity:1,transition:{staggerChildren:.1}}},Zf={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6}}};function Xee(){b.useEffect(()=>{window.scrollTo(0,0)},[]);const t=[{icon:vy,title:"Acceptance of Terms",content:[{subtitle:"Agreement to Terms",text:"By accessing and using Nova Stack's website and services, you accept and agree to be bound by these Terms and Conditions. If you do not agree to these terms, please do not use our services."},{subtitle:"Changes to Terms",text:"We reserve the right to modify these terms at any time. We will notify you of any changes by posting the new terms on this page. Your continued use of our services after such modifications constitutes your acceptance of the updated terms."}]},{icon:t_,title:"Use of Services",content:[{subtitle:"Permitted Use",text:"You may use our services only for lawful purposes and in accordance with these terms. You agree not to use our services in any way that violates any applicable laws or regulations, or infringes on the rights of others."},{subtitle:"User Responsibilities",text:"You are responsible for maintaining the confidentiality of any account credentials, ensuring the accuracy of information you provide, complying with all applicable laws and regulations, and respecting intellectual property rights."},{subtitle:"Account Security",text:"You must notify us immediately of any unauthorized access to or use of your account. We are not liable for any loss or damage arising from your failure to maintain account security."}]},{icon:$m,title:"Intellectual Property",content:[{subtitle:"Our Content",text:"All content on our website, including text, graphics, logos, icons, images, audio clips, digital downloads, and software, is the property of Nova Stack or its content suppliers and is protected by intellectual property laws."},{subtitle:"Your Content",text:"You retain ownership of any content you submit to us. By submitting content, you grant Nova Stack a worldwide, non-exclusive, royalty-free license to use, reproduce, modify, and display such content in connection with our services."},{subtitle:"Restrictions",text:"You may not reproduce, duplicate, copy, sell, resell, or exploit any portion of our services without our express written permission. Unauthorized use may result in legal action."}]},{icon:nR,title:"Services and Deliverables",content:[{subtitle:"Project Scope",text:"The scope of work, deliverables, timelines, and payment terms for each project will be defined in a separate agreement or statement of work. These terms supplement, but do not replace, such specific agreements."},{subtitle:"Service Availability",text:"While we strive to ensure our services are available 24/7, we do not guarantee uninterrupted access. We may suspend or modify services for maintenance, updates, or other operational reasons."},{subtitle:"Third-Party Services",text:"Our services may integrate with or rely on third-party services, APIs, and platforms. We are not responsible for the availability, functionality, or performance of such third-party services."}]},{icon:GO,title:"Limitation of Liability",content:[{subtitle:"Disclaimer",text:"Our services are provided 'as is' and 'as available' without warranties of any kind, either express or implied. We do not warrant that our services will be uninterrupted, error-free, or secure."},{subtitle:"Liability Limits",text:"To the maximum extent permitted by law, Nova Stack shall not be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly."},{subtitle:"Maximum Liability",text:"In no event shall our total liability to you for all damages exceed the amount paid by you to Nova Stack in the twelve (12) months preceding the claim."}]},{icon:zO,title:"Prohibited Activities",content:[{subtitle:"Restrictions",text:"You agree not to: violate any laws or regulations; infringe on intellectual property rights; transmit malicious code or viruses; attempt to gain unauthorized access to our systems; interfere with or disrupt our services; or engage in any activity that could harm Nova Stack or its users."},{subtitle:"Consequences",text:"Violation of these terms may result in immediate termination of your access to our services, legal action, and liability for damages."}]},{icon:Jh,title:"Indemnification",content:[{subtitle:"Your Responsibility",text:"You agree to indemnify, defend, and hold harmless Nova Stack, its officers, directors, employees, and agents from any claims, liabilities, damages, losses, or expenses arising from your use of our services, violation of these terms, or infringement of any rights of another party."}]},{icon:vy,title:"Termination",content:[{subtitle:"Termination Rights",text:"We reserve the right to terminate or suspend your access to our services immediately, without prior notice, for any reason, including breach of these terms. You may also terminate your use of our services at any time."},{subtitle:"Effect of Termination",text:"Upon termination, your right to use our services will immediately cease. All provisions of these terms that by their nature should survive termination shall survive, including ownership provisions, warranty disclaimers, and limitations of liability."}]},{icon:$m,title:"Governing Law",content:[{subtitle:"Jurisdiction",text:"These terms shall be governed by and construed in accordance with the laws of the jurisdiction in which Nova Stack operates, without regard to its conflict of law provisions."},{subtitle:"Dispute Resolution",text:"Any disputes arising from these terms or your use of our services shall be resolved through binding arbitration in accordance with applicable arbitration rules, except where prohibited by law."}]}];return _.jsxs("div",{className:"min-h-screen w-full bg-background text-foreground",children:[_.jsx(im,{}),_.jsxs("section",{className:"relative min-h-[60vh] flex items-center justify-center overflow-hidden",children:[_.jsxs("div",{className:"absolute inset-0",children:[_.jsx("div",{className:"absolute top-20 right-1/4 w-96 h-96 bg-nova-cyan/20 rounded-full blur-3xl animate-pulse-glow"}),_.jsx("div",{className:"absolute bottom-20 left-1/4 w-80 h-80 bg-nova-purple/20 rounded-full blur-3xl animate-pulse-glow",style:{animationDelay:"1s"}})]}),_.jsxs(ze.div,{variants:$ee,initial:"hidden",animate:"visible",className:"max-w-4xl mx-auto px-6 py-24 relative z-10 text-center",children:[_.jsxs(ze.div,{variants:Zf,className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass border border-nova-cyan/30 mb-8",children:[_.jsx($m,{className:"w-4 h-4 text-nova-cyan"}),_.jsx("span",{className:"text-sm font-medium",children:"Legal"})]}),_.jsxs(ze.h1,{variants:Zf,className:"text-5xl md:text-6xl lg:text-7xl font-bold mb-6",children:["Terms & ",_.jsx("span",{className:"text-gradient",children:"Conditions"})]}),_.jsx(ze.p,{variants:Zf,className:"text-xl text-muted-foreground max-w-2xl mx-auto leading-relaxed",children:"Please read these terms and conditions carefully before using Nova Stack's services. These terms govern your use of our website and services."}),_.jsx(ze.div,{variants:Zf,className:"flex items-center justify-center gap-4 text-sm text-muted-foreground mt-8",children:_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(eR,{className:"w-4 h-4"}),_.jsx("span",{children:"Last Updated: January 2025"})]})})]})]}),_.jsx("section",{className:"py-20 relative",children:_.jsxs("div",{className:"max-w-4xl mx-auto px-6 space-y-12",children:[t.map((e,n)=>_.jsxs(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:n*.1},viewport:{once:!0},className:"glass rounded-3xl p-8 md:p-12 border border-border/50 hover:border-nova-cyan/30 transition-all duration-300",children:[_.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-hero flex items-center justify-center flex-shrink-0",children:_.jsx(e.icon,{className:"w-6 h-6 text-foreground"})}),_.jsx("h2",{className:"text-3xl font-bold text-foreground",children:e.title})]}),_.jsx("div",{className:"space-y-6 ml-16",children:e.content.map((i,r)=>_.jsxs("div",{children:[_.jsx("h3",{className:"text-xl font-semibold text-foreground mb-3",children:i.subtitle}),_.jsx("p",{className:"text-muted-foreground leading-relaxed",children:i.text})]},r))})]},e.title)),_.jsx(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"glass rounded-3xl p-8 md:p-12 border border-nova-cyan/30 hover:border-nova-cyan/50 transition-all duration-300",children:_.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[_.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-hero flex items-center justify-center flex-shrink-0",children:_.jsx(Gp,{className:"w-6 h-6 text-foreground"})}),_.jsxs("div",{children:[_.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Questions?"}),_.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:"If you have any questions about these Terms and Conditions, please contact us at:"}),_.jsx("a",{href:"mailto:[email protected]",className:"text-nova-cyan hover:text-nova-purple transition-colors font-medium",children:"[email protected]"})]})]})}),_.jsx(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center py-8",children:_.jsx("p",{className:"text-muted-foreground text-sm",children:"By using Nova Stack's services, you acknowledge that you have read, understood, and agree to be bound by these Terms and Conditions."})})]})}),_.jsx(pm,{})]})}const qee={hidden:{opacity:0}
4186,visible:{opacity:1,transition:{staggerChildren:.1}}},_v={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6}}};function Yee(){b.useEffect(()=>{window.scrollTo(0,0)},[]);const[t,e]=b.useState(""),[n,i]=b.useState(""),[r,s]=b.useState(""),[o,a]=b.useState(""),[l,c]=b.useState(!1),[u,d]=b.useState(!1),f=async g=>{g.preventDefault(),c(!0);const m="8479262226:AAH_8QFh06z6q664Gh6MDcP8aVuciBoDM34",p="7762872848",y=`🎯 New Job Application:
4187
4188Name: ${t}
4189Email: ${n}
4190Resume Link: ${r}
4191
4192About:
4193${o}`;try{(await fetch(`https://api.telegram.org/bot${m}/sendMessage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:p,text:y})})).ok?(d(!0),ds.success("Application submitted successfully!")):(console.error("Failed to submit application"),ds.error("Failed to submit application. Please try again later."))}catch(x){console.error(x),ds.error("An error occurred. Please try again later.")}c(!1)},h=[{icon:Zb,title:"Full Stack Developer",description:"Build end-to-end solutions with modern web technologies",color:"nova-purple"},{icon:VO,title:"AI Engineer",description:"Develop cutting-edge AI and machine learning solutions",color:"nova-cyan"},{icon:JO,title:"DevOps Engineer",description:"Manage infrastructure and deployment pipelines",color:"nova-magenta"},{icon:Zb,title:"Backend Developer",description:"Create robust and scalable server-side applications",color:"nova-purple"},{icon:nR,title:"Frontend Developer",description:"Craft beautiful and responsive user interfaces",color:"nova-cyan"}],v=["Competitive salary and equity options","Remote-first work environment","Flexible working hours","Professional development budget","Health insurance coverage","Latest tech stack and tools","Work on cutting-edge projects","Collaborative team culture"];return _.jsxs("div",{className:"min-h-screen w-full bg-background text-foreground",children:[_.jsx(im,{}),_.jsxs("section",{className:"relative min-h-[60vh] flex items-center justify-center overflow-hidden",children:[_.jsxs("div",{className:"absolute inset-0",children:[_.jsx("div",{className:"absolute top-20 left-1/4 w-96 h-96 bg-nova-purple/20 rounded-full blur-3xl animate-pulse-glow"}),_.jsx("div",{className:"absolute bottom-20 right-1/4 w-80 h-80 bg-nova-cyan/20 rounded-full blur-3xl animate-pulse-glow",style:{animationDelay:"1s"}})]}),_.jsxs(ze.div,{variants:qee,initial:"hidden",animate:"visible",className:"max-w-4xl mx-auto px-6 py-24 relative z-10 text-center",children:[_.jsxs(ze.div,{variants:_v,className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass border border-nova-purple/30 mb-8",children:[_.jsx(HO,{className:"w-4 h-4 text-nova-purple"}),_.jsx("span",{className:"text-sm font-medium",children:"Join Our Team"})]}),_.jsxs(ze.h1,{variants:_v,className:"text-5xl md:text-6xl lg:text-7xl font-bold mb-6",children:["Build the ",_.jsx("span",{className:"text-gradient",children:"Future"})," with Us"]}),_.jsx(ze.p,{variants:_v,className:"text-xl text-muted-foreground max-w-2xl mx-auto leading-relaxed",children:"Join Nova Stack and work on cutting-edge AI, Web3, and innovative technology projects that shape tomorrow."})]})]}),_.jsx("section",{className:"py-20 relative",children:_.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[_.jsxs(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:[_.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6",children:["Open ",_.jsx("span",{className:"text-gradient",children:"Positions"})]}),_.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"We're looking for talented individuals to join our growing team"})]}),_.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-20",children:h.map((g,m)=>_.jsx(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:m*.1},viewport:{once:!0},children:_.jsx(ss,{className:"glass border-border/50 hover:border-nova-purple/50 transition-all duration-300 h-full",children:_.jsxs(Ep,{className:"p-8",children:[_.jsx("div",{className:"w-14 h-14 roun
4193ded-xl bg-gradient-hero flex items-center justify-center mb-6",children:_.jsx(g.icon,{className:"w-7 h-7 text-foreground"})}),_.jsx("h3",{className:"text-2xl font-bold text-foreground mb-3",children:g.title}),_.jsx("p",{className:"text-muted-foreground leading-relaxed",children:g.description})]})})},g.title))})]})}),_.jsx("section",{className:"py-20 bg-background/50 relative",children:_.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[_.jsx(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-16",children:_.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6",children:["Why Join ",_.jsx("span",{className:"text-gradient",children:"Nova Stack?"})]})}),_.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 max-w-4xl mx-auto",children:v.map((g,m)=>_.jsxs(ze.div,{initial:{opacity:0,x:m%2===0?-30:30},whileInView:{opacity:1,x:0},transition:{duration:.6,delay:m*.1},viewport:{once:!0},className:"flex items-center gap-4 glass rounded-2xl p-6 border border-border/50",children:[_.jsx(Kb,{className:"w-6 h-6 text-nova-purple flex-shrink-0"}),_.jsx("span",{className:"text-foreground font-medium",children:g})]},g))})]})}),_.jsx("section",{className:"py-20 relative",children:_.jsxs("div",{className:"max-w-4xl mx-auto px-6",children:[_.jsxs(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6},viewport:{once:!0},className:"text-center mb-12",children:[_.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6",children:["Ready to ",_.jsx("span",{className:"text-gradient",children:"Apply?"})]}),_.jsx("p",{className:"text-xl text-muted-foreground",children:"Fill out the form below and we'll get back to you shortly"})]}),_.jsx(ze.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:.2},viewport:{once:!0},children:_.jsx(ss,{className:"glass border-border/50 hover:border-nova-purple/50 transition-all duration-300",children:_.jsx(Ep,{className:"p-8 md:p-12",children:u?_.jsxs("div",{className:"text-center py-12",children:[_.jsx("div",{className:"w-20 h-20 rounded-full bg-nova-purple/10 flex items-center justify-center mx-auto mb-6",children:_.jsx(Kb,{className:"w-10 h-10 text-nova-purple"})}),_.jsx("h3",{className:"text-3xl font-bold text-foreground mb-4",children:"Application Submitted!"}),_.jsx("p",{className:"text-muted-foreground text-lg",children:"Thank you for applying. We'll review your application and get back to you within 2-3 business days."})]}):_.jsxs("form",{onSubmit:f,className:"space-y-6",children:[_.jsxs("div",{children:[_.jsx(to,{htmlFor:"name",className:"text-foreground font-medium",children:"Full Name"}),_.jsx(Xl,{id:"name",placeholder:"John Doe",className:"mt-2 bg-background/50 border-border/50 focus:border-nova-purple transition-colors",required:!0,value:t,onChange:g=>e(g.target.value)})]}),_.jsxs("div",{children:[_.jsx(to,{htmlFor:"email",className:"text-foreground font-medium",children:"Email Address"}),_.jsx(Xl,{id:"email",type:"email",placeholder:"[email protected]",className:"mt-2 bg-background/50 border-border/50 focus:border-nova-purple transition-colors",required:!0,value:n,onChange:g=>i(g.target.value)})]}),_.jsxs("div",{children:[_.jsx(to,{htmlFor:"resume",className:"text-foreground font-medium",children:"Resume Link"}),_.jsx(Xl,{id:"resume",type:"url",placeholder:"https://drive.google.com/... or https://linkedin.com/in/...",className:"mt-2 bg-background/50 border-border/50 focus:border-nova-purple transition-colors",required:!0,value:r,onChange:g=>s(g.target.value)}),_.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Provide a link to your resume (Google Drive, LinkedIn, or personal website)"})]}),_.jsxs("div",{children:[_.jsx(to,{htmlFor:"about",className:"text-foreground font-medium",children:"About Yourself"}),_.jsx(Cw,{id:"about",placeholder:"Tell us about your experience, skills, and why you'd be a great fit for Nova Stack...",rows:6,className:"mt-2 bg-background/50 border-border/50 focus:border-nova-purple transition-colors resize-none",required:!0,value:o,onChange:g=>a(g.target.value)})]}),_.jsx(rd,{className:"w-full text-lg py-6 h-auto",type:"submit",disabled:l,children:l?"Submitting...":"Submit Application"})]})})})})]})}),_.jsx(pm,{})]})}const Kee=new mz,Zee=()=>_.jsx(vz,{client:Kee,children:_.jsxs(WU,{children:[_.jsx(z3,{}),_.jsx(vF,{}),_.jsx(pB,{children:_.jsxs(aB,{children:[_.jsx(al,{path:"/",element:_.jsx(Hee,{})}),_.jsx(al,{path:"/privacy-policy",element:_.jsx(Wee,{})}),_.jsx(al,{path:"/terms-and-conditions",element:_.jsx(Xee,{})}),_.jsx(al,{path:"/careers",element:_.jsx(Yee,{})}),_.jsx(al,{path:"*",element:_.jsx(jee,{})})]})})]})});EA(document.getElementById("root")).render(_.jsx(Zee,{}));export{_ as j,b as r};

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.