Files
IronSteelNon-ferrousMetallu…/dist/assets/index-DrcP_SDP.js

4713 lines
1.8 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function RW(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var x0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var i1={exports:{}},Wf={},a1={exports:{}},ln={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var GR;function jW(){if(GR)return ln;GR=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator;function m(W){return W===null||typeof W!="object"?null:(W=f&&W[f]||W["@@iterator"],typeof W=="function"?W:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function v(W,H,te){this.props=W,this.context=H,this.refs=y,this.updater=te||g}v.prototype.isReactComponent={},v.prototype.setState=function(W,H){if(typeof W!="object"&&typeof W!="function"&&W!=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,W,H,"setState")},v.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function w(){}w.prototype=v.prototype;function _(W,H,te){this.props=W,this.context=H,this.refs=y,this.updater=te||g}var E=_.prototype=new w;E.constructor=_,b(E,v.prototype),E.isPureReactComponent=!0;var M=Array.isArray,T=Object.prototype.hasOwnProperty,A={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function P(W,H,te){var we,Ae={},ne=null,de=null;if(H!=null)for(we in H.ref!==void 0&&(de=H.ref),H.key!==void 0&&(ne=""+H.key),H)T.call(H,we)&&!N.hasOwnProperty(we)&&(Ae[we]=H[we]);var pe=arguments.length-2;if(pe===1)Ae.children=te;else if(1<pe){for(var fe=Array(pe),ce=0;ce<pe;ce++)fe[ce]=arguments[ce+2];Ae.children=fe}if(W&&W.defaultProps)for(we in pe=W.defaultProps,pe)Ae[we]===void 0&&(Ae[we]=pe[we]);return{$$typeof:t,type:W,key:ne,ref:de,props:Ae,_owner:A.current}}function R(W,H){return{$$typeof:t,type:W.type,key:H,ref:W.ref,props:W.props,_owner:W._owner}}function F(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function D(W){var H={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(te){return H[te]})}var L=/\/+/g;function q(W,H){return typeof W=="object"&&W!==null&&W.key!=null?D(""+W.key):H.toString(36)}function I(W,H,te,we,Ae){var ne=typeof W;(ne==="undefined"||ne==="boolean")&&(W=null);var de=!1;if(W===null)de=!0;else switch(ne){case"string":case"number":de=!0;break;case"object":switch(W.$$typeof){case t:case e:de=!0}}if(de)return de=W,Ae=Ae(de),W=we===""?"."+q(de,0):we,M(Ae)?(te="",W!=null&&(te=W.replace(L,"$&/")+"/"),I(Ae,H,te,"",function(ce){return ce})):Ae!=null&&(F(Ae)&&(Ae=R(Ae,te+(!Ae.key||de&&de.key===Ae.key?"":(""+Ae.key).replace(L,"$&/")+"/")+W)),H.push(Ae)),1;if(de=0,we=we===""?".":we+":",M(W))for(var pe=0;pe<W.length;pe++){ne=W[pe];var fe=we+q(ne,pe);de+=I(ne,H,te,fe,Ae)}else if(fe=m(W),typeof fe=="function")for(W=fe.call(W),pe=0;!(ne=W.next()).done;)ne=ne.value,fe=we+q(ne,pe++),de+=I(ne,H,te,fe,Ae);else if(ne==="object")throw H=String(W),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return de}function U(W,H,te){if(W==null)return W;var we=[],Ae=0;return I(W,we,"","",function(ne){return H.call(te,ne,Ae++)}),we}function k(W){if(W._status===-1){var H=W._result;H=H(),H.then(function(te){(W._status===0||W._status===-1)&&(W._status=1,W._result=te)},function(te){(W._status===0||W._status===-1)&&(W._status=2,W._result=te)}),W._status===-1&&(W._status=0,W._result=H)}if(W._status===1)return W._result.default;throw W._result}var V={current:null},$={transition:null},Y={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:$,ReactCurrentOwner:A};function J(){throw Error("act(...) is not supported in production builds of React.")}return ln.Children={map:U,forEach:function(W,H,te){U(W,function(){H.apply(this,arguments)},te)},count:function(W){var H=0;return U(W,function(){H++}),H},toArray:function(W){return U(W,function(H){return H})||[]},only:function(W){if(!F(W))throw Error("React.Children.only expected to receive a single React element child.");return W}},ln.Component=v,ln.Fragment=n,ln.Profiler=i,ln.PureComponent=_,ln.StrictMode=r,ln.Suspense=c,ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,ln.act=J,ln.cloneElement=function(W,H,te){if(W==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+W+".");var we=b({},W.props),Ae=W.key,ne=W.ref,de=W._owner;if(H!=null){if(H.ref!==void 0&&(ne=H.ref,de=A.current),H.key!==void 0&&(Ae=""+H.key),W.type&&W.type.defaultProps)var pe=W.type.defaultProps;for(fe in H)T.call(H,fe)&&!N.hasOwnProperty(fe)&&(we[fe]=H[fe]===void 0&&pe!==void 0?pe[fe]:H[fe])}var fe=arguments.length-2;if(fe===1)we.children=te;else if(1<fe){pe=Array(fe);for(var ce=0;ce<fe;ce++)pe[ce]=arguments[ce+2];we.children=pe}return{$$typeof:t,type:W.type,key:Ae,ref:ne,props:we,_owner:de}},ln.createContext=function(W){return W={$$typeof:s,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},W.Provider={$$typeof:a,_context:W},W.Consumer=W},ln.createElement=P,ln.createFactory=function(W){var H=P.bind(null,W);return H.type=W,H},ln.createRef=function(){return{current:null}},ln.forwardRef=function(W){return{$$typeof:o,render:W}},ln.isValidElement=F,ln.lazy=function(W){return{$$typeof:h,_payload:{_status:-1,_result:W},_init:k}},ln.memo=function(W,H){return{$$typeof:l,type:W,compare:H===void 0?null:H}},ln.startTransition=function(W){var H=$.transition;$.transition={};try{W()}finally{$.transition=H}},ln.unstable_act=J,ln.useCallback=function(W,H){return V.current.useCallback(W,H)},ln.useContext=function(W){return V.current.useContext(W)},ln.useDebugValue=function(){},ln.useDeferredValue=function(W){return V.current.useDeferredValue(W)},ln.useEffect=function(W,H){return V.current.useEffect(W,H)},ln.useId=function(){return V.current.useId()},ln.useImperativeHandle=function(W,H,te){return V.current.useImperativeHandle(W,H,te)},ln.useInsertionEffect=function(W,H){return V.current.useInsertionEffect(W,H)},ln.useLayoutEffect=function(W,H){return V.current.useLayoutEffect(W,H)},ln.useMemo=function(W,H){return V.current.useMemo(W,H)},ln.useReducer=function(W,H,te){return V.current.useReducer(W,H,te)},ln.useRef=function(W){return V.current.useRef(W)},ln.useState=function(W){return V.current.useState(W)},ln.useSyncExternalStore=function(W,H,te){return V.current.useSyncExternalStore(W,H,te)},ln.useTransition=function(){return V.current.useTransition()},ln.version="18.3.1",ln}var WR;function KA(){return WR||(WR=1,a1.exports=jW()),a1.exports}/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var qR;function OW(){if(qR)return Wf;qR=1;var t=KA(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(o,c,l){var h,f={},m=null,g=null;l!==void 0&&(m=""+l),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(g=c.ref);for(h in c)r.call(c,h)&&!a.hasOwnProperty(h)&&(f[h]=c[h]);if(o&&o.defaultProps)for(h in c=o.defaultProps,c)f[h]===void 0&&(f[h]=c[h]);return{$$typeof:e,type:o,key:m,ref:g,props:f,_owner:i.current}}return Wf.Fragment=n,Wf.jsx=s,Wf.jsxs=s,Wf}var XR;function IW(){return XR||(XR=1,i1.exports=OW()),i1.exports}var d=IW(),b0={},s1={exports:{}},Ti={},o1={exports:{}},l1={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var KR;function DW(){return KR||(KR=1,(function(t){function e($,Y){var J=$.length;$.push(Y);e:for(;0<J;){var W=J-1>>>1,H=$[W];if(0<i(H,Y))$[W]=Y,$[J]=H,J=W;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var Y=$[0],J=$.pop();if(J!==Y){$[0]=J;e:for(var W=0,H=$.length,te=H>>>1;W<te;){var we=2*(W+1)-1,Ae=$[we],ne=we+1,de=$[ne];if(0>i(Ae,J))ne<H&&0>i(de,Ae)?($[W]=de,$[ne]=J,W=ne):($[W]=Ae,$[we]=J,W=we);else if(ne<H&&0>i(de,J))$[W]=de,$[ne]=J,W=ne;else break e}}return Y}function i($,Y){var J=$.sortIndex-Y.sortIndex;return J!==0?J:$.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();t.unstable_now=function(){return s.now()-o}}var c=[],l=[],h=1,f=null,m=3,g=!1,b=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E($){for(var Y=n(l);Y!==null;){if(Y.callback===null)r(l);else if(Y.startTime<=$)r(l),Y.sortIndex=Y.expirationTime,e(c,Y);else break;Y=n(l)}}function M($){if(y=!1,E($),!b)if(n(c)!==null)b=!0,k(T);else{var Y=n(l);Y!==null&&V(M,Y.startTime-$)}}function T($,Y){b=!1,y&&(y=!1,w(P),P=-1),g=!0;var J=m;try{for(E(Y),f=n(c);f!==null&&(!(f.expirationTime>Y)||$&&!D());){var W=f.callback;if(typeof W=="function"){f.callback=null,m=f.priorityLevel;var H=W(f.expirationTime<=Y);Y=t.unstable_now(),typeof H=="function"?f.callback=H:f===n(c)&&r(c),E(Y)}else r(c);f=n(c)}if(f!==null)var te=!0;else{var we=n(l);we!==null&&V(M,we.startTime-Y),te=!1}return te}finally{f=null,m=J,g=!1}}var A=!1,N=null,P=-1,R=5,F=-1;function D(){return!(t.unstable_now()-F<R)}function L(){if(N!==null){var $=t.unstable_now();F=$;var Y=!0;try{Y=N(!0,$)}finally{Y?q():(A=!1,N=null)}}else A=!1}var q;if(typeof _=="function")q=function(){_(L)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,U=I.port2;I.port1.onmessage=L,q=function(){U.postMessage(null)}}else q=function(){v(L,0)};function k($){N=$,A||(A=!0,q())}function V($,Y){P=v(function(){$(t.unstable_now())},Y)}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($){$.callback=null},t.unstable_continueExecution=function(){b||g||(b=!0,k(T))},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function($){switch(m){case 1:case 2:case 3:var Y=3;break;default:Y=m}var J=m;m=Y;try{return $()}finally{m=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function($,Y){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var J=m;m=$;try{return Y()}finally{m=J}},t.unstable_scheduleCallback=function($,Y,J){var W=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?W+J:W):J=W,$){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=J+H,$={id:h++,callback:Y,priorityLevel:$,startTime:J,expirationTime:H,sortIndex:-1},J>W?($.sortIndex=J,e(l,$),n(c)===null&&$===n(l)&&(y?(w(P),P=-1):y=!0,V(M,J-W))):($.sortIndex=H,e(c,$),b||g||(b=!0,k(T))),$},t.unstable_shouldYield=D,t.unstable_wrapCallback=function($){var Y=m;return function(){var J=m;m=Y;try{return $.apply(this,arguments)}finally{m=J}}}})(l1)),l1}var YR;function kW(){return YR||(YR=1,o1.exports=DW()),o1.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ZR;function LW(){if(ZR)return Ti;ZR=1;var t=KA(),e=kW();function n(u){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+u,x=1;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x]);return"Minified React error #"+u+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function a(u,p){s(u,p),s(u+"Capture",p)}function s(u,p){for(i[u]=p,u=0;u<p.length;u++)r.add(p[u])}var o=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,l=/^[: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]*$/,h={},f={};function m(u){return c.call(f,u)?!0:c.call(h,u)?!1:l.test(u)?f[u]=!0:(h[u]=!0,!1)}function g(u,p,x,S){if(x!==null&&x.type===0)return!1;switch(typeof p){case"function":case"symbol":return!0;case"boolean":return S?!1:x!==null?!x.acceptsBooleans:(u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-");default:return!1}}function b(u,p,x,S){if(p===null||typeof p>"u"||g(u,p,x,S))return!0;if(S)return!1;if(x!==null)switch(x.type){case 3:return!p;case 4:return p===!1;case 5:return isNaN(p);case 6:return isNaN(p)||1>p}return!1}function y(u,p,x,S,C,j,G){this.acceptsBooleans=p===2||p===3||p===4,this.attributeName=S,this.attributeNamespace=C,this.mustUseProperty=x,this.propertyName=u,this.type=p,this.sanitizeURL=j,this.removeEmptyString=G}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){v[u]=new y(u,0,!1,u,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var p=u[0];v[p]=new y(p,1,!1,u[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(u){v[u]=new y(u,2,!1,u.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){v[u]=new y(u,2,!1,u,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(u){v[u]=new y(u,3,!1,u.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(u){v[u]=new y(u,3,!0,u,null,!1,!1)}),["capture","download"].forEach(function(u){v[u]=new y(u,4,!1,u,null,!1,!1)}),["cols","rows","size","span"].forEach(function(u){v[u]=new y(u,6,!1,u,null,!1,!1)}),["rowSpan","start"].forEach(function(u){v[u]=new y(u,5,!1,u.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function _(u){return u[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(u){var p=u.replace(w,_);v[p]=new y(p,1,!1,u,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var p=u.replace(w,_);v[p]=new y(p,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(u){var p=u.replace(w,_);v[p]=new y(p,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(u){v[u]=new y(u,1,!1,u.toLowerCase(),null,!1,!1)}),v.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(u){v[u]=new y(u,1,!1,u.toLowerCase(),null,!0,!0)});function E(u,p,x,S){var C=v.hasOwnProperty(p)?v[p]:null;(C!==null?C.type!==0:S||!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(b(p,x,C,S)&&(x=null),S||C===null?m(p)&&(x===null?u.removeAttribute(p):u.setAttribute(p,""+x)):C.mustUseProperty?u[C.propertyName]=x===null?C.type===3?!1:"":x:(p=C.attributeName,S=C.attributeNamespace,x===null?u.removeAttribute(p):(C=C.type,x=C===3||C===4&&x===!0?"":""+x,S?u.setAttributeNS(S,p,x):u.setAttribute(p,x))))}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T=Symbol.for("react.element"),A=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),D=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),$=Symbol.iterator;function Y(u){return u===null||typeof u!="object"?null:(u=$&&u[$]||u["@@iterator"],typeof u=="function"?u:null)}var J=Object.assign,W;function H(u){if(W===void 0)try{throw Error()}catch(x){var p=x.stack.trim().match(/\n( *(at )?)/);W=p&&p[1]||""}return`
`+W+u}var te=!1;function we(u,p){if(!u||te)return"";te=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(Ne){var S=Ne}Reflect.construct(u,[],p)}else{try{p.call()}catch(Ne){S=Ne}u.call(p.prototype)}else{try{throw Error()}catch(Ne){S=Ne}u()}}catch(Ne){if(Ne&&S&&typeof Ne.stack=="string"){for(var C=Ne.stack.split(`
`),j=S.stack.split(`
`),G=C.length-1,Q=j.length-1;1<=G&&0<=Q&&C[G]!==j[Q];)Q--;for(;1<=G&&0<=Q;G--,Q--)if(C[G]!==j[Q]){if(G!==1||Q!==1)do if(G--,Q--,0>Q||C[G]!==j[Q]){var se=`
`+C[G].replace(" at new "," at ");return u.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",u.displayName)),se}while(1<=G&&0<=Q);break}}}finally{te=!1,Error.prepareStackTrace=x}return(u=u?u.displayName||u.name:"")?H(u):""}function Ae(u){switch(u.tag){case 5:return H(u.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return u=we(u.type,!1),u;case 11:return u=we(u.type.render,!1),u;case 1:return u=we(u.type,!0),u;default:return""}}function ne(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case N:return"Fragment";case A:return"Portal";case R:return"Profiler";case P:return"StrictMode";case q:return"Suspense";case I:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case D:return(u.displayName||"Context")+".Consumer";case F:return(u._context.displayName||"Context")+".Provider";case L:var p=u.render;return u=u.displayName,u||(u=p.displayName||p.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case U:return p=u.displayName||null,p!==null?p:ne(u.type)||"Memo";case k:p=u._payload,u=u._init;try{return ne(u(p))}catch{}}return null}function de(u){var p=u.type;switch(u.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=p.render,u=u.displayName||u.name||"",p.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(p);case 8:return p===P?"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 p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function pe(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function fe(u){var p=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function ce(u){var p=fe(u)?"checked":"value",x=Object.getOwnPropertyDescriptor(u.constructor.prototype,p),S=""+u[p];if(!u.hasOwnProperty(p)&&typeof x<"u"&&typeof x.get=="function"&&typeof x.set=="function"){var C=x.get,j=x.set;return Object.defineProperty(u,p,{configurable:!0,get:function(){return C.call(this)},set:function(G){S=""+G,j.call(this,G)}}),Object.defineProperty(u,p,{enumerable:x.enumerable}),{getValue:function(){return S},setValue:function(G){S=""+G},stopTracking:function(){u._valueTracker=null,delete u[p]}}}}function Ce(u){u._valueTracker||(u._valueTracker=ce(u))}function ye(u){if(!u)return!1;var p=u._valueTracker;if(!p)return!0;var x=p.getValue(),S="";return u&&(S=fe(u)?u.checked?"true":"false":u.value),u=S,u!==x?(p.setValue(u),!0):!1}function Ze(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function tt(u,p){var x=p.checked;return J({},p,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:x??u._wrapperState.initialChecked})}function St(u,p){var x=p.defaultValue==null?"":p.defaultValue,S=p.checked!=null?p.checked:p.defaultChecked;x=pe(p.value!=null?p.value:x),u._wrapperState={initialChecked:S,initialValue:x,controlled:p.type==="checkbox"||p.type==="radio"?p.checked!=null:p.value!=null}}function lt(u,p){p=p.checked,p!=null&&E(u,"checked",p,!1)}function kt(u,p){lt(u,p);var x=pe(p.value),S=p.type;if(x!=null)S==="number"?(x===0&&u.value===""||u.value!=x)&&(u.value=""+x):u.value!==""+x&&(u.value=""+x);else if(S==="submit"||S==="reset"){u.removeAttribute("value");return}p.hasOwnProperty("value")?Ht(u,p.type,x):p.hasOwnProperty("defaultValue")&&Ht(u,p.type,pe(p.defaultValue)),p.checked==null&&p.defaultChecked!=null&&(u.defaultChecked=!!p.defaultChecked)}function re(u,p,x){if(p.hasOwnProperty("value")||p.hasOwnProperty("defaultValue")){var S=p.type;if(!(S!=="submit"&&S!=="reset"||p.value!==void 0&&p.value!==null))return;p=""+u._wrapperState.initialValue,x||p===u.value||(u.value=p),u.defaultValue=p}x=u.name,x!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,x!==""&&(u.name=x)}function Ht(u,p,x){(p!=="number"||Ze(u.ownerDocument)!==u)&&(x==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+x&&(u.defaultValue=""+x))}var Lt=Array.isArray;function zt(u,p,x,S){if(u=u.options,p){p={};for(var C=0;C<x.length;C++)p["$"+x[C]]=!0;for(x=0;x<u.length;x++)C=p.hasOwnProperty("$"+u[x].value),u[x].selected!==C&&(u[x].selected=C),C&&S&&(u[x].defaultSelected=!0)}else{for(x=""+pe(x),p=null,C=0;C<u.length;C++){if(u[C].value===x){u[C].selected=!0,S&&(u[C].defaultSelected=!0);return}p!==null||u[C].disabled||(p=u[C])}p!==null&&(p.selected=!0)}}function qe(u,p){if(p.dangerouslySetInnerHTML!=null)throw Error(n(91));return J({},p,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function Z(u,p){var x=p.value;if(x==null){if(x=p.children,p=p.defaultValue,x!=null){if(p!=null)throw Error(n(92));if(Lt(x)){if(1<x.length)throw Error(n(93));x=x[0]}p=x}p==null&&(p=""),x=p}u._wrapperState={initialValue:pe(x)}}function z(u,p){var x=pe(p.value),S=pe(p.defaultValue);x!=null&&(x=""+x,x!==u.value&&(u.value=x),p.defaultValue==null&&u.defaultValue!==x&&(u.defaultValue=x)),S!=null&&(u.defaultValue=""+S)}function ie(u){var p=u.textContent;p===u._wrapperState.initialValue&&p!==""&&p!==null&&(u.value=p)}function Ee(u){switch(u){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 Pe(u,p){return u==null||u==="http://www.w3.org/1999/xhtml"?Ee(p):u==="http://www.w3.org/2000/svg"&&p==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var ge,Xe=(function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(p,x,S,C){MSApp.execUnsafeLocalFunction(function(){return u(p,x,S,C)})}:u})(function(u,p){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=p;else{for(ge=ge||document.createElement("div"),ge.innerHTML="<svg>"+p.valueOf().toString()+"</svg>",p=ge.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;p.firstChild;)u.appendChild(p.firstChild)}});function Le(u,p){if(p){var x=u.firstChild;if(x&&x===u.lastChild&&x.nodeType===3){x.nodeValue=p;return}}u.textContent=p}var ft={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},nt=["Webkit","ms","Moz","O"];Object.keys(ft).forEach(function(u){nt.forEach(function(p){p=p+u.charAt(0).toUpperCase()+u.substring(1),ft[p]=ft[u]})});function Ue(u,p,x){return p==null||typeof p=="boolean"||p===""?"":x||typeof p!="number"||p===0||ft.hasOwnProperty(u)&&ft[u]?(""+p).trim():p+"px"}function ke(u,p){u=u.style;for(var x in p)if(p.hasOwnProperty(x)){var S=x.indexOf("--")===0,C=Ue(x,p[x],S);x==="float"&&(x="cssFloat"),S?u.setProperty(x,C):u[x]=C}}var Fe=J({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 ze(u,p){if(p){if(Fe[u]&&(p.children!=null||p.dangerouslySetInnerHTML!=null))throw Error(n(137,u));if(p.dangerouslySetInnerHTML!=null){if(p.children!=null)throw Error(n(60));if(typeof p.dangerouslySetInnerHTML!="object"||!("__html"in p.dangerouslySetInnerHTML))throw Error(n(61))}if(p.style!=null&&typeof p.style!="object")throw Error(n(62))}}function He(u,p){if(u.indexOf("-")===-1)return typeof p.is=="string";switch(u){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 vt=null;function ae(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var Re=null,Ie=null,rt=null;function $e(u){if(u=Rf(u)){if(typeof Re!="function")throw Error(n(280));var p=u.stateNode;p&&(p=Im(p),Re(u.stateNode,u.type,p))}}function he(u){Ie?rt?rt.push(u):rt=[u]:Ie=u}function Qe(){if(Ie){var u=Ie,p=rt;if(rt=Ie=null,$e(u),p)for(u=0;u<p.length;u++)$e(p[u])}}function ht(u,p){return u(p)}function Gt(){}var Qt=!1;function mn(u,p,x){if(Qt)return u(p,x);Qt=!0;try{return ht(u,p,x)}finally{Qt=!1,(Ie!==null||rt!==null)&&(Gt(),Qe())}}function En(u,p){var x=u.stateNode;if(x===null)return null;var S=Im(x);if(S===null)return null;x=S[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(S=!S.disabled)||(u=u.type,S=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!S;break e;default:u=!1}if(u)return null;if(x&&typeof x!="function")throw Error(n(231,p,typeof x));return x}var Oi=!1;if(o)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Oi=!0}}),window.addEventListener("test",ee,ee),window.removeEventListener("test",ee,ee)}catch{Oi=!1}function oe(u,p,x,S,C,j,G,Q,se){var Ne=Array.prototype.slice.call(arguments,3);try{p.apply(x,Ne)}catch(Ve){this.onError(Ve)}}var Se=!1,De=null,Ge=!1,Mt=null,It={onError:function(u){Se=!0,De=u}};function mt(u,p,x,S,C,j,G,Q,se){Se=!1,De=null,oe.apply(It,arguments)}function yt(u,p,x,S,C,j,G,Q,se){if(mt.apply(this,arguments),Se){if(Se){var Ne=De;Se=!1,De=null}else throw Error(n(198));Ge||(Ge=!0,Mt=Ne)}}function xt(u){var p=u,x=u;if(u.alternate)for(;p.return;)p=p.return;else{u=p;do p=u,(p.flags&4098)!==0&&(x=p.return),u=p.return;while(u)}return p.tag===3?x:null}function $t(u){if(u.tag===13){var p=u.memoizedState;if(p===null&&(u=u.alternate,u!==null&&(p=u.memoizedState)),p!==null)return p.dehydrated}return null}function Ct(u){if(xt(u)!==u)throw Error(n(188))}function Zt(u){var p=u.alternate;if(!p){if(p=xt(u),p===null)throw Error(n(188));return p!==u?null:u}for(var x=u,S=p;;){var C=x.return;if(C===null)break;var j=C.alternate;if(j===null){if(S=C.return,S!==null){x=S;continue}break}if(C.child===j.child){for(j=C.child;j;){if(j===x)return Ct(C),u;if(j===S)return Ct(C),p;j=j.sibling}throw Error(n(188))}if(x.return!==S.return)x=C,S=j;else{for(var G=!1,Q=C.child;Q;){if(Q===x){G=!0,x=C,S=j;break}if(Q===S){G=!0,S=C,x=j;break}Q=Q.sibling}if(!G){for(Q=j.child;Q;){if(Q===x){G=!0,x=j,S=C;break}if(Q===S){G=!0,S=j,x=C;break}Q=Q.sibling}if(!G)throw Error(n(189))}}if(x.alternate!==S)throw Error(n(190))}if(x.tag!==3)throw Error(n(188));return x.stateNode.current===x?u:p}function sn(u){return u=Zt(u),u!==null?Jn(u):null}function Jn(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var p=Jn(u);if(p!==null)return p;u=u.sibling}return null}var Gn=e.unstable_scheduleCallback,sr=e.unstable_cancelCallback,yn=e.unstable_shouldYield,$r=e.unstable_requestPaint,X=e.unstable_now,ue=e.unstable_getCurrentPriorityLevel,Te=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,be=e.unstable_NormalPriority,ot=e.unstable_LowPriority,ct=e.unstable_IdlePriority,it=null,ut=null;function Ke(u){if(ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(it,u,void 0,(u.current.flags&128)===128)}catch{}}var pt=Math.clz32?Math.clz32:Ft,Wt=Math.log,bt=Math.LN2;function Ft(u){return u>>>=0,u===0?32:31-(Wt(u)/bt|0)|0}var wn=64,Tn=4194304;function fn(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function rr(u,p){var x=u.pendingLanes;if(x===0)return 0;var S=0,C=u.suspendedLanes,j=u.pingedLanes,G=x&268435455;if(G!==0){var Q=G&~C;Q!==0?S=fn(Q):(j&=G,j!==0&&(S=fn(j)))}else G=x&~C,G!==0?S=fn(G):j!==0&&(S=fn(j));if(S===0)return 0;if(p!==0&&p!==S&&(p&C)===0&&(C=S&-S,j=p&-p,C>=j||C===16&&(j&4194240)!==0))return p;if((S&4)!==0&&(S|=x&16),p=u.entangledLanes,p!==0)for(u=u.entanglements,p&=S;0<p;)x=31-pt(p),C=1<<x,S|=u[x],p&=~C;return S}function jt(u,p){switch(u){case 1:case 2:case 4:return p+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 p+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 ei(u,p){for(var x=u.suspendedLanes,S=u.pingedLanes,C=u.expirationTimes,j=u.pendingLanes;0<j;){var G=31-pt(j),Q=1<<G,se=C[G];se===-1?((Q&x)===0||(Q&S)!==0)&&(C[G]=jt(Q,p)):se<=p&&(u.expiredLanes|=Q),j&=~Q}}function hn(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function xi(){var u=wn;return wn<<=1,(wn&4194240)===0&&(wn=64),u}function bi(u){for(var p=[],x=0;31>x;x++)p.push(u);return p}function Ii(u,p,x){u.pendingLanes|=p,p!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,p=31-pt(p),u[p]=x}function So(u,p){var x=u.pendingLanes&~p;u.pendingLanes=p,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=p,u.mutableReadLanes&=p,u.entangledLanes&=p,p=u.entanglements;var S=u.eventTimes;for(u=u.expirationTimes;0<x;){var C=31-pt(x),j=1<<C;p[C]=0,S[C]=-1,u[C]=-1,x&=~j}}function _n(u,p){var x=u.entangledLanes|=p;for(u=u.entanglements;x;){var S=31-pt(x),C=1<<S;C&p|u[S]&p&&(u[S]|=p),x&=~C}}var qt=0;function Ma(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var ir,ea,Is,pf,AC,Px=!1,xm=[],Mo=null,Eo=null,To=null,mf=new Map,gf=new Map,Ao=[],QG="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 NC(u,p){switch(u){case"focusin":case"focusout":Mo=null;break;case"dragenter":case"dragleave":Eo=null;break;case"mouseover":case"mouseout":To=null;break;case"pointerover":case"pointerout":mf.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":gf.delete(p.pointerId)}}function vf(u,p,x,S,C,j){return u===null||u.nativeEvent!==j?(u={blockedOn:p,domEventName:x,eventSystemFlags:S,nativeEvent:j,targetContainers:[C]},p!==null&&(p=Rf(p),p!==null&&ea(p)),u):(u.eventSystemFlags|=S,p=u.targetContainers,C!==null&&p.indexOf(C)===-1&&p.push(C),u)}function e7(u,p,x,S,C){switch(p){case"focusin":return Mo=vf(Mo,u,p,x,S,C),!0;case"dragenter":return Eo=vf(Eo,u,p,x,S,C),!0;case"mouseover":return To=vf(To,u,p,x,S,C),!0;case"pointerover":var j=C.pointerId;return mf.set(j,vf(mf.get(j)||null,u,p,x,S,C)),!0;case"gotpointercapture":return j=C.pointerId,gf.set(j,vf(gf.get(j)||null,u,p,x,S,C)),!0}return!1}function PC(u){var p=Cl(u.target);if(p!==null){var x=xt(p);if(x!==null){if(p=x.tag,p===13){if(p=$t(x),p!==null){u.blockedOn=p,AC(u.priority,function(){Is(x)});return}}else if(p===3&&x.stateNode.current.memoizedState.isDehydrated){u.blockedOn=x.tag===3?x.stateNode.containerInfo:null;return}}}u.blockedOn=null}function bm(u){if(u.blockedOn!==null)return!1;for(var p=u.targetContainers;0<p.length;){var x=Rx(u.domEventName,u.eventSystemFlags,p[0],u.nativeEvent);if(x===null){x=u.nativeEvent;var S=new x.constructor(x.type,x);vt=S,x.target.dispatchEvent(S),vt=null}else return p=Rf(x),p!==null&&ea(p),u.blockedOn=x,!1;p.shift()}return!0}function CC(u,p,x){bm(u)&&x.delete(p)}function t7(){Px=!1,Mo!==null&&bm(Mo)&&(Mo=null),Eo!==null&&bm(Eo)&&(Eo=null),To!==null&&bm(To)&&(To=null),mf.forEach(CC),gf.forEach(CC)}function yf(u,p){u.blockedOn===p&&(u.blockedOn=null,Px||(Px=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,t7)))}function xf(u){function p(C){return yf(C,u)}if(0<xm.length){yf(xm[0],u);for(var x=1;x<xm.length;x++){var S=xm[x];S.blockedOn===u&&(S.blockedOn=null)}}for(Mo!==null&&yf(Mo,u),Eo!==null&&yf(Eo,u),To!==null&&yf(To,u),mf.forEach(p),gf.forEach(p),x=0;x<Ao.length;x++)S=Ao[x],S.blockedOn===u&&(S.blockedOn=null);for(;0<Ao.length&&(x=Ao[0],x.blockedOn===null);)PC(x),x.blockedOn===null&&Ao.shift()}var Gc=M.ReactCurrentBatchConfig,wm=!0;function n7(u,p,x,S){var C=qt,j=Gc.transition;Gc.transition=null;try{qt=1,Cx(u,p,x,S)}finally{qt=C,Gc.transition=j}}function r7(u,p,x,S){var C=qt,j=Gc.transition;Gc.transition=null;try{qt=4,Cx(u,p,x,S)}finally{qt=C,Gc.transition=j}}function Cx(u,p,x,S){if(wm){var C=Rx(u,p,x,S);if(C===null)Xx(u,p,S,_m,x),NC(u,S);else if(e7(C,u,p,x,S))S.stopPropagation();else if(NC(u,S),p&4&&-1<QG.indexOf(u)){for(;C!==null;){var j=Rf(C);if(j!==null&&ir(j),j=Rx(u,p,x,S),j===null&&Xx(u,p,S,_m,x),j===C)break;C=j}C!==null&&S.stopPropagation()}else Xx(u,p,S,null,x)}}var _m=null;function Rx(u,p,x,S){if(_m=null,u=ae(S),u=Cl(u),u!==null)if(p=xt(u),p===null)u=null;else if(x=p.tag,x===13){if(u=$t(p),u!==null)return u;u=null}else if(x===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;u=null}else p!==u&&(u=null);return _m=u,null}function RC(u){switch(u){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(ue()){case Te:return 1;case ve:return 4;case be:case ot:return 16;case ct:return 536870912;default:return 16}default:return 16}}var No=null,jx=null,Sm=null;function jC(){if(Sm)return Sm;var u,p=jx,x=p.length,S,C="value"in No?No.value:No.textContent,j=C.length;for(u=0;u<x&&p[u]===C[u];u++);var G=x-u;for(S=1;S<=G&&p[x-S]===C[j-S];S++);return Sm=C.slice(u,1<S?1-S:void 0)}function Mm(u){var p=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&p===13&&(u=13)):u=p,u===10&&(u=13),32<=u||u===13?u:0}function Em(){return!0}function OC(){return!1}function Di(u){function p(x,S,C,j,G){this._reactName=x,this._targetInst=C,this.type=S,this.nativeEvent=j,this.target=G,this.currentTarget=null;for(var Q in u)u.hasOwnProperty(Q)&&(x=u[Q],this[Q]=x?x(j):j[Q]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?Em:OC,this.isPropagationStopped=OC,this}return J(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var x=this.nativeEvent;x&&(x.preventDefault?x.preventDefault():typeof x.returnValue!="unknown"&&(x.returnValue=!1),this.isDefaultPrevented=Em)},stopPropagation:function(){var x=this.nativeEvent;x&&(x.stopPropagation?x.stopPropagation():typeof x.cancelBubble!="unknown"&&(x.cancelBubble=!0),this.isPropagationStopped=Em)},persist:function(){},isPersistent:Em}),p}var Wc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ox=Di(Wc),bf=J({},Wc,{view:0,detail:0}),i7=Di(bf),Ix,Dx,wf,Tm=J({},bf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lx,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==wf&&(wf&&u.type==="mousemove"?(Ix=u.screenX-wf.screenX,Dx=u.screenY-wf.screenY):Dx=Ix=0,wf=u),Ix)},movementY:function(u){return"movementY"in u?u.movementY:Dx}}),IC=Di(Tm),a7=J({},Tm,{dataTransfer:0}),s7=Di(a7),o7=J({},bf,{relatedTarget:0}),kx=Di(o7),l7=J({},Wc,{animationName:0,elapsedTime:0,pseudoElement:0}),c7=Di(l7),u7=J({},Wc,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),d7=Di(u7),f7=J({},Wc,{data:0}),DC=Di(f7),h7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},p7={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"},m7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g7(u){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(u):(u=m7[u])?!!p[u]:!1}function Lx(){return g7}var v7=J({},bf,{key:function(u){if(u.key){var p=h7[u.key]||u.key;if(p!=="Unidentified")return p}return u.type==="keypress"?(u=Mm(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?p7[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lx,charCode:function(u){return u.type==="keypress"?Mm(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?Mm(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),y7=Di(v7),x7=J({},Tm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kC=Di(x7),b7=J({},bf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lx}),w7=Di(b7),_7=J({},Wc,{propertyName:0,elapsedTime:0,pseudoElement:0}),S7=Di(_7),M7=J({},Tm,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),E7=Di(M7),T7=[9,13,27,32],Fx=o&&"CompositionEvent"in window,_f=null;o&&"documentMode"in document&&(_f=document.documentMode);var A7=o&&"TextEvent"in window&&!_f,LC=o&&(!Fx||_f&&8<_f&&11>=_f),FC=" ",UC=!1;function BC(u,p){switch(u){case"keyup":return T7.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zC(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var qc=!1;function N7(u,p){switch(u){case"compositionend":return zC(p);case"keypress":return p.which!==32?null:(UC=!0,FC);case"textInput":return u=p.data,u===FC&&UC?null:u;default:return null}}function P7(u,p){if(qc)return u==="compositionend"||!Fx&&BC(u,p)?(u=jC(),Sm=jx=No=null,qc=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return LC&&p.locale!=="ko"?null:p.data;default:return null}}var C7={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 $C(u){var p=u&&u.nodeName&&u.nodeName.toLowerCase();return p==="input"?!!C7[u.type]:p==="textarea"}function VC(u,p,x,S){he(S),p=Rm(p,"onChange"),0<p.length&&(x=new Ox("onChange","change",null,x,S),u.push({event:x,listeners:p}))}var Sf=null,Mf=null;function R7(u){o3(u,0)}function Am(u){var p=Jc(u);if(ye(p))return u}function j7(u,p){if(u==="change")return p}var HC=!1;if(o){var Ux;if(o){var Bx="oninput"in document;if(!Bx){var GC=document.createElement("div");GC.setAttribute("oninput","return;"),Bx=typeof GC.oninput=="function"}Ux=Bx}else Ux=!1;HC=Ux&&(!document.documentMode||9<document.documentMode)}function WC(){Sf&&(Sf.detachEvent("onpropertychange",qC),Mf=Sf=null)}function qC(u){if(u.propertyName==="value"&&Am(Mf)){var p=[];VC(p,Mf,u,ae(u)),mn(R7,p)}}function O7(u,p,x){u==="focusin"?(WC(),Sf=p,Mf=x,Sf.attachEvent("onpropertychange",qC)):u==="focusout"&&WC()}function I7(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return Am(Mf)}function D7(u,p){if(u==="click")return Am(p)}function k7(u,p){if(u==="input"||u==="change")return Am(p)}function L7(u,p){return u===p&&(u!==0||1/u===1/p)||u!==u&&p!==p}var Ea=typeof Object.is=="function"?Object.is:L7;function Ef(u,p){if(Ea(u,p))return!0;if(typeof u!="object"||u===null||typeof p!="object"||p===null)return!1;var x=Object.keys(u),S=Object.keys(p);if(x.length!==S.length)return!1;for(S=0;S<x.length;S++){var C=x[S];if(!c.call(p,C)||!Ea(u[C],p[C]))return!1}return!0}function XC(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function KC(u,p){var x=XC(u);u=0;for(var S;x;){if(x.nodeType===3){if(S=u+x.textContent.length,u<=p&&S>=p)return{node:x,offset:p-u};u=S}e:{for(;x;){if(x.nextSibling){x=x.nextSibling;break e}x=x.parentNode}x=void 0}x=XC(x)}}function YC(u,p){return u&&p?u===p?!0:u&&u.nodeType===3?!1:p&&p.nodeType===3?YC(u,p.parentNode):"contains"in u?u.contains(p):u.compareDocumentPosition?!!(u.compareDocumentPosition(p)&16):!1:!1}function ZC(){for(var u=window,p=Ze();p instanceof u.HTMLIFrameElement;){try{var x=typeof p.contentWindow.location.href=="string"}catch{x=!1}if(x)u=p.contentWindow;else break;p=Ze(u.document)}return p}function zx(u){var p=u&&u.nodeName&&u.nodeName.toLowerCase();return p&&(p==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||p==="textarea"||u.contentEditable==="true")}function F7(u){var p=ZC(),x=u.focusedElem,S=u.selectionRange;if(p!==x&&x&&x.ownerDocument&&YC(x.ownerDocument.documentElement,x)){if(S!==null&&zx(x)){if(p=S.start,u=S.end,u===void 0&&(u=p),"selectionStart"in x)x.selectionStart=p,x.selectionEnd=Math.min(u,x.value.length);else if(u=(p=x.ownerDocument||document)&&p.defaultView||window,u.getSelection){u=u.getSelection();var C=x.textContent.length,j=Math.min(S.start,C);S=S.end===void 0?j:Math.min(S.end,C),!u.extend&&j>S&&(C=S,S=j,j=C),C=KC(x,j);var G=KC(x,S);C&&G&&(u.rangeCount!==1||u.anchorNode!==C.node||u.anchorOffset!==C.offset||u.focusNode!==G.node||u.focusOffset!==G.offset)&&(p=p.createRange(),p.setStart(C.node,C.offset),u.removeAllRanges(),j>S?(u.addRange(p),u.extend(G.node,G.offset)):(p.setEnd(G.node,G.offset),u.addRange(p)))}}for(p=[],u=x;u=u.parentNode;)u.nodeType===1&&p.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<p.length;x++)u=p[x],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var U7=o&&"documentMode"in document&&11>=document.documentMode,Xc=null,$x=null,Tf=null,Vx=!1;function JC(u,p,x){var S=x.window===x?x.document:x.nodeType===9?x:x.ownerDocument;Vx||Xc==null||Xc!==Ze(S)||(S=Xc,"selectionStart"in S&&zx(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Tf&&Ef(Tf,S)||(Tf=S,S=Rm($x,"onSelect"),0<S.length&&(p=new Ox("onSelect","select",null,p,x),u.push({event:p,listeners:S}),p.target=Xc)))}function Nm(u,p){var x={};return x[u.toLowerCase()]=p.toLowerCase(),x["Webkit"+u]="webkit"+p,x["Moz"+u]="moz"+p,x}var Kc={animationend:Nm("Animation","AnimationEnd"),animationiteration:Nm("Animation","AnimationIteration"),animationstart:Nm("Animation","AnimationStart"),transitionend:Nm("Transition","TransitionEnd")},Hx={},QC={};o&&(QC=document.createElement("div").style,"AnimationEvent"in window||(delete Kc.animationend.animation,delete Kc.animationiteration.animation,delete Kc.animationstart.animation),"TransitionEvent"in window||delete Kc.transitionend.transition);function Pm(u){if(Hx[u])return Hx[u];if(!Kc[u])return u;var p=Kc[u],x;for(x in p)if(p.hasOwnProperty(x)&&x in QC)return Hx[u]=p[x];return u}var e3=Pm("animationend"),t3=Pm("animationiteration"),n3=Pm("animationstart"),r3=Pm("transitionend"),i3=new Map,a3="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 Po(u,p){i3.set(u,p),a(p,[u])}for(var Gx=0;Gx<a3.length;Gx++){var Wx=a3[Gx],B7=Wx.toLowerCase(),z7=Wx[0].toUpperCase()+Wx.slice(1);Po(B7,"on"+z7)}Po(e3,"onAnimationEnd"),Po(t3,"onAnimationIteration"),Po(n3,"onAnimationStart"),Po("dblclick","onDoubleClick"),Po("focusin","onFocus"),Po("focusout","onBlur"),Po(r3,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Af="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(" "),$7=new Set("cancel close invalid load scroll toggle".split(" ").concat(Af));function s3(u,p,x){var S=u.type||"unknown-event";u.currentTarget=x,yt(S,p,void 0,u),u.currentTarget=null}function o3(u,p){p=(p&4)!==0;for(var x=0;x<u.length;x++){var S=u[x],C=S.event;S=S.listeners;e:{var j=void 0;if(p)for(var G=S.length-1;0<=G;G--){var Q=S[G],se=Q.instance,Ne=Q.currentTarget;if(Q=Q.listener,se!==j&&C.isPropagationStopped())break e;s3(C,Q,Ne),j=se}else for(G=0;G<S.length;G++){if(Q=S[G],se=Q.instance,Ne=Q.currentTarget,Q=Q.listener,se!==j&&C.isPropagationStopped())break e;s3(C,Q,Ne),j=se}}}if(Ge)throw u=Mt,Ge=!1,Mt=null,u}function Fn(u,p){var x=p[eb];x===void 0&&(x=p[eb]=new Set);var S=u+"__bubble";x.has(S)||(l3(p,u,2,!1),x.add(S))}function qx(u,p,x){var S=0;p&&(S|=4),l3(x,u,S,p)}var Cm="_reactListening"+Math.random().toString(36).slice(2);function Nf(u){if(!u[Cm]){u[Cm]=!0,r.forEach(function(x){x!=="selectionchange"&&($7.has(x)||qx(x,!1,u),qx(x,!0,u))});var p=u.nodeType===9?u:u.ownerDocument;p===null||p[Cm]||(p[Cm]=!0,qx("selectionchange",!1,p))}}function l3(u,p,x,S){switch(RC(p)){case 1:var C=n7;break;case 4:C=r7;break;default:C=Cx}x=C.bind(null,p,x,u),C=void 0,!Oi||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(C=!0),S?C!==void 0?u.addEventListener(p,x,{capture:!0,passive:C}):u.addEventListener(p,x,!0):C!==void 0?u.addEventListener(p,x,{passive:C}):u.addEventListener(p,x,!1)}function Xx(u,p,x,S,C){var j=S;if((p&1)===0&&(p&2)===0&&S!==null)e:for(;;){if(S===null)return;var G=S.tag;if(G===3||G===4){var Q=S.stateNode.containerInfo;if(Q===C||Q.nodeType===8&&Q.parentNode===C)break;if(G===4)for(G=S.return;G!==null;){var se=G.tag;if((se===3||se===4)&&(se=G.stateNode.containerInfo,se===C||se.nodeType===8&&se.parentNode===C))return;G=G.return}for(;Q!==null;){if(G=Cl(Q),G===null)return;if(se=G.tag,se===5||se===6){S=j=G;continue e}Q=Q.parentNode}}S=S.return}mn(function(){var Ne=j,Ve=ae(x),We=[];e:{var Be=i3.get(u);if(Be!==void 0){var gt=Ox,Et=u;switch(u){case"keypress":if(Mm(x)===0)break e;case"keydown":case"keyup":gt=y7;break;case"focusin":Et="focus",gt=kx;break;case"focusout":Et="blur",gt=kx;break;case"beforeblur":case"afterblur":gt=kx;break;case"click":if(x.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":gt=IC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":gt=s7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":gt=w7;break;case e3:case t3:case n3:gt=c7;break;case r3:gt=S7;break;case"scroll":gt=i7;break;case"wheel":gt=E7;break;case"copy":case"cut":case"paste":gt=d7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":gt=kC}var Rt=(p&4)!==0,ar=!Rt&&u==="scroll",xe=Rt?Be!==null?Be+"Capture":null:Be;Rt=[];for(var le=Ne,Me;le!==null;){Me=le;var et=Me.stateNode;if(Me.tag===5&&et!==null&&(Me=et,xe!==null&&(et=En(le,xe),et!=null&&Rt.push(Pf(le,et,Me)))),ar)break;le=le.return}0<Rt.length&&(Be=new gt(Be,Et,null,x,Ve),We.push({event:Be,listeners:Rt}))}}if((p&7)===0){e:{if(Be=u==="mouseover"||u==="pointerover",gt=u==="mouseout"||u==="pointerout",Be&&x!==vt&&(Et=x.relatedTarget||x.fromElement)&&(Cl(Et)||Et[Ds]))break e;if((gt||Be)&&(Be=Ve.window===Ve?Ve:(Be=Ve.ownerDocument)?Be.defaultView||Be.parentWindow:window,gt?(Et=x.relatedTarget||x.toElement,gt=Ne,Et=Et?Cl(Et):null,Et!==null&&(ar=xt(Et),Et!==ar||Et.tag!==5&&Et.tag!==6)&&(Et=null)):(gt=null,Et=Ne),gt!==Et)){if(Rt=IC,et="onMouseLeave",xe="onMouseEnter",le="mouse",(u==="pointerout"||u==="pointerover")&&(Rt=kC,et="onPointerLeave",xe="onPointerEnter",le="pointer"),ar=gt==null?Be:Jc(gt),Me=Et==null?Be:Jc(Et),Be=new Rt(et,le+"leave",gt,x,Ve),Be.target=ar,Be.relatedTarget=Me,et=null,Cl(Ve)===Ne&&(Rt=new Rt(xe,le+"enter",Et,x,Ve),Rt.target=Me,Rt.relatedTarget=ar,et=Rt),ar=et,gt&&Et)t:{for(Rt=gt,xe=Et,le=0,Me=Rt;Me;Me=Yc(Me))le++;for(Me=0,et=xe;et;et=Yc(et))Me++;for(;0<le-Me;)Rt=Yc(Rt),le--;for(;0<Me-le;)xe=Yc(xe),Me--;for(;le--;){if(Rt===xe||xe!==null&&Rt===xe.alternate)break t;Rt=Yc(Rt),xe=Yc(xe)}Rt=null}else Rt=null;gt!==null&&c3(We,Be,gt,Rt,!1),Et!==null&&ar!==null&&c3(We,ar,Et,Rt,!0)}}e:{if(Be=Ne?Jc(Ne):window,gt=Be.nodeName&&Be.nodeName.toLowerCase(),gt==="select"||gt==="input"&&Be.type==="file")var Ot=j7;else if($C(Be))if(HC)Ot=k7;else{Ot=I7;var Ut=O7}else(gt=Be.nodeName)&&gt.toLowerCase()==="input"&&(Be.type==="checkbox"||Be.type==="radio")&&(Ot=D7);if(Ot&&(Ot=Ot(u,Ne))){VC(We,Ot,x,Ve);break e}Ut&&Ut(u,Be,Ne),u==="focusout"&&(Ut=Be._wrapperState)&&Ut.controlled&&Be.type==="number"&&Ht(Be,"number",Be.value)}switch(Ut=Ne?Jc(Ne):window,u){case"focusin":($C(Ut)||Ut.contentEditable==="true")&&(Xc=Ut,$x=Ne,Tf=null);break;case"focusout":Tf=$x=Xc=null;break;case"mousedown":Vx=!0;break;case"contextmenu":case"mouseup":case"dragend":Vx=!1,JC(We,x,Ve);break;case"selectionchange":if(U7)break;case"keydown":case"keyup":JC(We,x,Ve)}var Bt;if(Fx)e:{switch(u){case"compositionstart":var Xt="onCompositionStart";break e;case"compositionend":Xt="onCompositionEnd";break e;case"compositionupdate":Xt="onCompositionUpdate";break e}Xt=void 0}else qc?BC(u,x)&&(Xt="onCompositionEnd"):u==="keydown"&&x.keyCode===229&&(Xt="onCompositionStart");Xt&&(LC&&x.locale!=="ko"&&(qc||Xt!=="onCompositionStart"?Xt==="onCompositionEnd"&&qc&&(Bt=jC()):(No=Ve,jx="value"in No?No.value:No.textContent,qc=!0)),Ut=Rm(Ne,Xt),0<Ut.length&&(Xt=new DC(Xt,u,null,x,Ve),We.push({event:Xt,listeners:Ut}),Bt?Xt.data=Bt:(Bt=zC(x),Bt!==null&&(Xt.data=Bt)))),(Bt=A7?N7(u,x):P7(u,x))&&(Ne=Rm(Ne,"onBeforeInput"),0<Ne.length&&(Ve=new DC("onBeforeInput","beforeinput",null,x,Ve),We.push({event:Ve,listeners:Ne}),Ve.data=Bt))}o3(We,p)})}function Pf(u,p,x){return{instance:u,listener:p,currentTarget:x}}function Rm(u,p){for(var x=p+"Capture",S=[];u!==null;){var C=u,j=C.stateNode;C.tag===5&&j!==null&&(C=j,j=En(u,x),j!=null&&S.unshift(Pf(u,j,C)),j=En(u,p),j!=null&&S.push(Pf(u,j,C))),u=u.return}return S}function Yc(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u||null}function c3(u,p,x,S,C){for(var j=p._reactName,G=[];x!==null&&x!==S;){var Q=x,se=Q.alternate,Ne=Q.stateNode;if(se!==null&&se===S)break;Q.tag===5&&Ne!==null&&(Q=Ne,C?(se=En(x,j),se!=null&&G.unshift(Pf(x,se,Q))):C||(se=En(x,j),se!=null&&G.push(Pf(x,se,Q)))),x=x.return}G.length!==0&&u.push({event:p,listeners:G})}var V7=/\r\n?/g,H7=/\u0000|\uFFFD/g;function u3(u){return(typeof u=="string"?u:""+u).replace(V7,`
`).replace(H7,"")}function jm(u,p,x){if(p=u3(p),u3(u)!==p&&x)throw Error(n(425))}function Om(){}var Kx=null,Yx=null;function Zx(u,p){return u==="textarea"||u==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var Jx=typeof setTimeout=="function"?setTimeout:void 0,G7=typeof clearTimeout=="function"?clearTimeout:void 0,d3=typeof Promise=="function"?Promise:void 0,W7=typeof queueMicrotask=="function"?queueMicrotask:typeof d3<"u"?function(u){return d3.resolve(null).then(u).catch(q7)}:Jx;function q7(u){setTimeout(function(){throw u})}function Qx(u,p){var x=p,S=0;do{var C=x.nextSibling;if(u.removeChild(x),C&&C.nodeType===8)if(x=C.data,x==="/$"){if(S===0){u.removeChild(C),xf(p);return}S--}else x!=="$"&&x!=="$?"&&x!=="$!"||S++;x=C}while(x);xf(p)}function Co(u){for(;u!=null;u=u.nextSibling){var p=u.nodeType;if(p===1||p===3)break;if(p===8){if(p=u.data,p==="$"||p==="$!"||p==="$?")break;if(p==="/$")return null}}return u}function f3(u){u=u.previousSibling;for(var p=0;u;){if(u.nodeType===8){var x=u.data;if(x==="$"||x==="$!"||x==="$?"){if(p===0)return u;p--}else x==="/$"&&p++}u=u.previousSibling}return null}var Zc=Math.random().toString(36).slice(2),Ya="__reactFiber$"+Zc,Cf="__reactProps$"+Zc,Ds="__reactContainer$"+Zc,eb="__reactEvents$"+Zc,X7="__reactListeners$"+Zc,K7="__reactHandles$"+Zc;function Cl(u){var p=u[Ya];if(p)return p;for(var x=u.parentNode;x;){if(p=x[Ds]||x[Ya]){if(x=p.alternate,p.child!==null||x!==null&&x.child!==null)for(u=f3(u);u!==null;){if(x=u[Ya])return x;u=f3(u)}return p}u=x,x=u.parentNode}return null}function Rf(u){return u=u[Ya]||u[Ds],!u||u.tag!==5&&u.tag!==6&&u.tag!==13&&u.tag!==3?null:u}function Jc(u){if(u.tag===5||u.tag===6)return u.stateNode;throw Error(n(33))}function Im(u){return u[Cf]||null}var tb=[],Qc=-1;function Ro(u){return{current:u}}function Un(u){0>Qc||(u.current=tb[Qc],tb[Qc]=null,Qc--)}function In(u,p){Qc++,tb[Qc]=u.current,u.current=p}var jo={},Vr=Ro(jo),wi=Ro(!1),Rl=jo;function eu(u,p){var x=u.type.contextTypes;if(!x)return jo;var S=u.stateNode;if(S&&S.__reactInternalMemoizedUnmaskedChildContext===p)return S.__reactInternalMemoizedMaskedChildContext;var C={},j;for(j in x)C[j]=p[j];return S&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=p,u.__reactInternalMemoizedMaskedChildContext=C),C}function _i(u){return u=u.childContextTypes,u!=null}function Dm(){Un(wi),Un(Vr)}function h3(u,p,x){if(Vr.current!==jo)throw Error(n(168));In(Vr,p),In(wi,x)}function p3(u,p,x){var S=u.stateNode;if(p=p.childContextTypes,typeof S.getChildContext!="function")return x;S=S.getChildContext();for(var C in S)if(!(C in p))throw Error(n(108,de(u)||"Unknown",C));return J({},x,S)}function km(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||jo,Rl=Vr.current,In(Vr,u),In(wi,wi.current),!0}function m3(u,p,x){var S=u.stateNode;if(!S)throw Error(n(169));x?(u=p3(u,p,Rl),S.__reactInternalMemoizedMergedChildContext=u,Un(wi),Un(Vr),In(Vr,u)):Un(wi),In(wi,x)}var ks=null,Lm=!1,nb=!1;function g3(u){ks===null?ks=[u]:ks.push(u)}function Y7(u){Lm=!0,g3(u)}function Oo(){if(!nb&&ks!==null){nb=!0;var u=0,p=qt;try{var x=ks;for(qt=1;u<x.length;u++){var S=x[u];do S=S(!0);while(S!==null)}ks=null,Lm=!1}catch(C){throw ks!==null&&(ks=ks.slice(u+1)),Gn(Te,Oo),C}finally{qt=p,nb=!1}}return null}var tu=[],nu=0,Fm=null,Um=0,ta=[],na=0,jl=null,Ls=1,Fs="";function Ol(u,p){tu[nu++]=Um,tu[nu++]=Fm,Fm=u,Um=p}function v3(u,p,x){ta[na++]=Ls,ta[na++]=Fs,ta[na++]=jl,jl=u;var S=Ls;u=Fs;var C=32-pt(S)-1;S&=~(1<<C),x+=1;var j=32-pt(p)+C;if(30<j){var G=C-C%5;j=(S&(1<<G)-1).toString(32),S>>=G,C-=G,Ls=1<<32-pt(p)+C|x<<C|S,Fs=j+u}else Ls=1<<j|x<<C|S,Fs=u}function rb(u){u.return!==null&&(Ol(u,1),v3(u,1,0))}function ib(u){for(;u===Fm;)Fm=tu[--nu],tu[nu]=null,Um=tu[--nu],tu[nu]=null;for(;u===jl;)jl=ta[--na],ta[na]=null,Fs=ta[--na],ta[na]=null,Ls=ta[--na],ta[na]=null}var ki=null,Li=null,Vn=!1,Ta=null;function y3(u,p){var x=sa(5,null,null,0);x.elementType="DELETED",x.stateNode=p,x.return=u,p=u.deletions,p===null?(u.deletions=[x],u.flags|=16):p.push(x)}function x3(u,p){switch(u.tag){case 5:var x=u.type;return p=p.nodeType!==1||x.toLowerCase()!==p.nodeName.toLowerCase()?null:p,p!==null?(u.stateNode=p,ki=u,Li=Co(p.firstChild),!0):!1;case 6:return p=u.pendingProps===""||p.nodeType!==3?null:p,p!==null?(u.stateNode=p,ki=u,Li=null,!0):!1;case 13:return p=p.nodeType!==8?null:p,p!==null?(x=jl!==null?{id:Ls,overflow:Fs}:null,u.memoizedState={dehydrated:p,treeContext:x,retryLane:1073741824},x=sa(18,null,null,0),x.stateNode=p,x.return=u,u.child=x,ki=u,Li=null,!0):!1;default:return!1}}function ab(u){return(u.mode&1)!==0&&(u.flags&128)===0}function sb(u){if(Vn){var p=Li;if(p){var x=p;if(!x3(u,p)){if(ab(u))throw Error(n(418));p=Co(x.nextSibling);var S=ki;p&&x3(u,p)?y3(S,x):(u.flags=u.flags&-4097|2,Vn=!1,ki=u)}}else{if(ab(u))throw Error(n(418));u.flags=u.flags&-4097|2,Vn=!1,ki=u}}}function b3(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;ki=u}function Bm(u){if(u!==ki)return!1;if(!Vn)return b3(u),Vn=!0,!1;var p;if((p=u.tag!==3)&&!(p=u.tag!==5)&&(p=u.type,p=p!=="head"&&p!=="body"&&!Zx(u.type,u.memoizedProps)),p&&(p=Li)){if(ab(u))throw w3(),Error(n(418));for(;p;)y3(u,p),p=Co(p.nextSibling)}if(b3(u),u.tag===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(317));e:{for(u=u.nextSibling,p=0;u;){if(u.nodeType===8){var x=u.data;if(x==="/$"){if(p===0){Li=Co(u.nextSibling);break e}p--}else x!=="$"&&x!=="$!"&&x!=="$?"||p++}u=u.nextSibling}Li=null}}else Li=ki?Co(u.stateNode.nextSibling):null;return!0}function w3(){for(var u=Li;u;)u=Co(u.nextSibling)}function ru(){Li=ki=null,Vn=!1}function ob(u){Ta===null?Ta=[u]:Ta.push(u)}var Z7=M.ReactCurrentBatchConfig;function jf(u,p,x){if(u=x.ref,u!==null&&typeof u!="function"&&typeof u!="object"){if(x._owner){if(x=x._owner,x){if(x.tag!==1)throw Error(n(309));var S=x.stateNode}if(!S)throw Error(n(147,u));var C=S,j=""+u;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===j?p.ref:(p=function(G){var Q=C.refs;G===null?delete Q[j]:Q[j]=G},p._stringRef=j,p)}if(typeof u!="string")throw Error(n(284));if(!x._owner)throw Error(n(290,u))}return u}function zm(u,p){throw u=Object.prototype.toString.call(p),Error(n(31,u==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":u))}function _3(u){var p=u._init;return p(u._payload)}function S3(u){function p(xe,le){if(u){var Me=xe.deletions;Me===null?(xe.deletions=[le],xe.flags|=16):Me.push(le)}}function x(xe,le){if(!u)return null;for(;le!==null;)p(xe,le),le=le.sibling;return null}function S(xe,le){for(xe=new Map;le!==null;)le.key!==null?xe.set(le.key,le):xe.set(le.index,le),le=le.sibling;return xe}function C(xe,le){return xe=zo(xe,le),xe.index=0,xe.sibling=null,xe}function j(xe,le,Me){return xe.index=Me,u?(Me=xe.alternate,Me!==null?(Me=Me.index,Me<le?(xe.flags|=2,le):Me):(xe.flags|=2,le)):(xe.flags|=1048576,le)}function G(xe){return u&&xe.alternate===null&&(xe.flags|=2),xe}function Q(xe,le,Me,et){return le===null||le.tag!==6?(le=Jb(Me,xe.mode,et),le.return=xe,le):(le=C(le,Me),le.return=xe,le)}function se(xe,le,Me,et){var Ot=Me.type;return Ot===N?Ve(xe,le,Me.props.children,et,Me.key):le!==null&&(le.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===k&&_3(Ot)===le.type)?(et=C(le,Me.props),et.ref=jf(xe,le,Me),et.return=xe,et):(et=d0(Me.type,Me.key,Me.props,null,xe.mode,et),et.ref=jf(xe,le,Me),et.return=xe,et)}function Ne(xe,le,Me,et){return le===null||le.tag!==4||le.stateNode.containerInfo!==Me.containerInfo||le.stateNode.implementation!==Me.implementation?(le=Qb(Me,xe.mode,et),le.return=xe,le):(le=C(le,Me.children||[]),le.return=xe,le)}function Ve(xe,le,Me,et,Ot){return le===null||le.tag!==7?(le=zl(Me,xe.mode,et,Ot),le.return=xe,le):(le=C(le,Me),le.return=xe,le)}function We(xe,le,Me){if(typeof le=="string"&&le!==""||typeof le=="number")return le=Jb(""+le,xe.mode,Me),le.return=xe,le;if(typeof le=="object"&&le!==null){switch(le.$$typeof){case T:return Me=d0(le.type,le.key,le.props,null,xe.mode,Me),Me.ref=jf(xe,null,le),Me.return=xe,Me;case A:return le=Qb(le,xe.mode,Me),le.return=xe,le;case k:var et=le._init;return We(xe,et(le._payload),Me)}if(Lt(le)||Y(le))return le=zl(le,xe.mode,Me,null),le.return=xe,le;zm(xe,le)}return null}function Be(xe,le,Me,et){var Ot=le!==null?le.key:null;if(typeof Me=="string"&&Me!==""||typeof Me=="number")return Ot!==null?null:Q(xe,le,""+Me,et);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case T:return Me.key===Ot?se(xe,le,Me,et):null;case A:return Me.key===Ot?Ne(xe,le,Me,et):null;case k:return Ot=Me._init,Be(xe,le,Ot(Me._payload),et)}if(Lt(Me)||Y(Me))return Ot!==null?null:Ve(xe,le,Me,et,null);zm(xe,Me)}return null}function gt(xe,le,Me,et,Ot){if(typeof et=="string"&&et!==""||typeof et=="number")return xe=xe.get(Me)||null,Q(le,xe,""+et,Ot);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case T:return xe=xe.get(et.key===null?Me:et.key)||null,se(le,xe,et,Ot);case A:return xe=xe.get(et.key===null?Me:et.key)||null,Ne(le,xe,et,Ot);case k:var Ut=et._init;return gt(xe,le,Me,Ut(et._payload),Ot)}if(Lt(et)||Y(et))return xe=xe.get(Me)||null,Ve(le,xe,et,Ot,null);zm(le,et)}return null}function Et(xe,le,Me,et){for(var Ot=null,Ut=null,Bt=le,Xt=le=0,Tr=null;Bt!==null&&Xt<Me.length;Xt++){Bt.index>Xt?(Tr=Bt,Bt=null):Tr=Bt.sibling;var xn=Be(xe,Bt,Me[Xt],et);if(xn===null){Bt===null&&(Bt=Tr);break}u&&Bt&&xn.alternate===null&&p(xe,Bt),le=j(xn,le,Xt),Ut===null?Ot=xn:Ut.sibling=xn,Ut=xn,Bt=Tr}if(Xt===Me.length)return x(xe,Bt),Vn&&Ol(xe,Xt),Ot;if(Bt===null){for(;Xt<Me.length;Xt++)Bt=We(xe,Me[Xt],et),Bt!==null&&(le=j(Bt,le,Xt),Ut===null?Ot=Bt:Ut.sibling=Bt,Ut=Bt);return Vn&&Ol(xe,Xt),Ot}for(Bt=S(xe,Bt);Xt<Me.length;Xt++)Tr=gt(Bt,xe,Xt,Me[Xt],et),Tr!==null&&(u&&Tr.alternate!==null&&Bt.delete(Tr.key===null?Xt:Tr.key),le=j(Tr,le,Xt),Ut===null?Ot=Tr:Ut.sibling=Tr,Ut=Tr);return u&&Bt.forEach(function($o){return p(xe,$o)}),Vn&&Ol(xe,Xt),Ot}function Rt(xe,le,Me,et){var Ot=Y(Me);if(typeof Ot!="function")throw Error(n(150));if(Me=Ot.call(Me),Me==null)throw Error(n(151));for(var Ut=Ot=null,Bt=le,Xt=le=0,Tr=null,xn=Me.next();Bt!==null&&!xn.done;Xt++,xn=Me.next()){Bt.index>Xt?(Tr=Bt,Bt=null):Tr=Bt.sibling;var $o=Be(xe,Bt,xn.value,et);if($o===null){Bt===null&&(Bt=Tr);break}u&&Bt&&$o.alternate===null&&p(xe,Bt),le=j($o,le,Xt),Ut===null?Ot=$o:Ut.sibling=$o,Ut=$o,Bt=Tr}if(xn.done)return x(xe,Bt),Vn&&Ol(xe,Xt),Ot;if(Bt===null){for(;!xn.done;Xt++,xn=Me.next())xn=We(xe,xn.value,et),xn!==null&&(le=j(xn,le,Xt),Ut===null?Ot=xn:Ut.sibling=xn,Ut=xn);return Vn&&Ol(xe,Xt),Ot}for(Bt=S(xe,Bt);!xn.done;Xt++,xn=Me.next())xn=gt(Bt,xe,Xt,xn.value,et),xn!==null&&(u&&xn.alternate!==null&&Bt.delete(xn.key===null?Xt:xn.key),le=j(xn,le,Xt),Ut===null?Ot=xn:Ut.sibling=xn,Ut=xn);return u&&Bt.forEach(function(CW){return p(xe,CW)}),Vn&&Ol(xe,Xt),Ot}function ar(xe,le,Me,et){if(typeof Me=="object"&&Me!==null&&Me.type===N&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case T:e:{for(var Ot=Me.key,Ut=le;Ut!==null;){if(Ut.key===Ot){if(Ot=Me.type,Ot===N){if(Ut.tag===7){x(xe,Ut.sibling),le=C(Ut,Me.props.children),le.return=xe,xe=le;break e}}else if(Ut.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===k&&_3(Ot)===Ut.type){x(xe,Ut.sibling),le=C(Ut,Me.props),le.ref=jf(xe,Ut,Me),le.return=xe,xe=le;break e}x(xe,Ut);break}else p(xe,Ut);Ut=Ut.sibling}Me.type===N?(le=zl(Me.props.children,xe.mode,et,Me.key),le.return=xe,xe=le):(et=d0(Me.type,Me.key,Me.props,null,xe.mode,et),et.ref=jf(xe,le,Me),et.return=xe,xe=et)}return G(xe);case A:e:{for(Ut=Me.key;le!==null;){if(le.key===Ut)if(le.tag===4&&le.stateNode.containerInfo===Me.containerInfo&&le.stateNode.implementation===Me.implementation){x(xe,le.sibling),le=C(le,Me.children||[]),le.return=xe,xe=le;break e}else{x(xe,le);break}else p(xe,le);le=le.sibling}le=Qb(Me,xe.mode,et),le.return=xe,xe=le}return G(xe);case k:return Ut=Me._init,ar(xe,le,Ut(Me._payload),et)}if(Lt(Me))return Et(xe,le,Me,et);if(Y(Me))return Rt(xe,le,Me,et);zm(xe,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"?(Me=""+Me,le!==null&&le.tag===6?(x(xe,le.sibling),le=C(le,Me),le.return=xe,xe=le):(x(xe,le),le=Jb(Me,xe.mode,et),le.return=xe,xe=le),G(xe)):x(xe,le)}return ar}var iu=S3(!0),M3=S3(!1),$m=Ro(null),Vm=null,au=null,lb=null;function cb(){lb=au=Vm=null}function ub(u){var p=$m.current;Un($m),u._currentValue=p}function db(u,p,x){for(;u!==null;){var S=u.alternate;if((u.childLanes&p)!==p?(u.childLanes|=p,S!==null&&(S.childLanes|=p)):S!==null&&(S.childLanes&p)!==p&&(S.childLanes|=p),u===x)break;u=u.return}}function su(u,p){Vm=u,lb=au=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&p)!==0&&(Si=!0),u.firstContext=null)}function ra(u){var p=u._currentValue;if(lb!==u)if(u={context:u,memoizedValue:p,next:null},au===null){if(Vm===null)throw Error(n(308));au=u,Vm.dependencies={lanes:0,firstContext:u}}else au=au.next=u;return p}var Il=null;function fb(u){Il===null?Il=[u]:Il.push(u)}function E3(u,p,x,S){var C=p.interleaved;return C===null?(x.next=x,fb(p)):(x.next=C.next,C.next=x),p.interleaved=x,Us(u,S)}function Us(u,p){u.lanes|=p;var x=u.alternate;for(x!==null&&(x.lanes|=p),x=u,u=u.return;u!==null;)u.childLanes|=p,x=u.alternate,x!==null&&(x.childLanes|=p),x=u,u=u.return;return x.tag===3?x.stateNode:null}var Io=!1;function hb(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function T3(u,p){u=u.updateQueue,p.updateQueue===u&&(p.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function Bs(u,p){return{eventTime:u,lane:p,tag:0,payload:null,callback:null,next:null}}function Do(u,p,x){var S=u.updateQueue;if(S===null)return null;if(S=S.shared,(gn&2)!==0){var C=S.pending;return C===null?p.next=p:(p.next=C.next,C.next=p),S.pending=p,Us(u,x)}return C=S.interleaved,C===null?(p.next=p,fb(S)):(p.next=C.next,C.next=p),S.interleaved=p,Us(u,x)}function Hm(u,p,x){if(p=p.updateQueue,p!==null&&(p=p.shared,(x&4194240)!==0)){var S=p.lanes;S&=u.pendingLanes,x|=S,p.lanes=x,_n(u,x)}}function A3(u,p){var x=u.updateQueue,S=u.alternate;if(S!==null&&(S=S.updateQueue,x===S)){var C=null,j=null;if(x=x.firstBaseUpdate,x!==null){do{var G={eventTime:x.eventTime,lane:x.lane,tag:x.tag,payload:x.payload,callback:x.callback,next:null};j===null?C=j=G:j=j.next=G,x=x.next}while(x!==null);j===null?C=j=p:j=j.next=p}else C=j=p;x={baseState:S.baseState,firstBaseUpdate:C,lastBaseUpdate:j,shared:S.shared,effects:S.effects},u.updateQueue=x;return}u=x.lastBaseUpdate,u===null?x.firstBaseUpdate=p:u.next=p,x.lastBaseUpdate=p}function Gm(u,p,x,S){var C=u.updateQueue;Io=!1;var j=C.firstBaseUpdate,G=C.lastBaseUpdate,Q=C.shared.pending;if(Q!==null){C.shared.pending=null;var se=Q,Ne=se.next;se.next=null,G===null?j=Ne:G.next=Ne,G=se;var Ve=u.alternate;Ve!==null&&(Ve=Ve.updateQueue,Q=Ve.lastBaseUpdate,Q!==G&&(Q===null?Ve.firstBaseUpdate=Ne:Q.next=Ne,Ve.lastBaseUpdate=se))}if(j!==null){var We=C.baseState;G=0,Ve=Ne=se=null,Q=j;do{var Be=Q.lane,gt=Q.eventTime;if((S&Be)===Be){Ve!==null&&(Ve=Ve.next={eventTime:gt,lane:0,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null});e:{var Et=u,Rt=Q;switch(Be=p,gt=x,Rt.tag){case 1:if(Et=Rt.payload,typeof Et=="function"){We=Et.call(gt,We,Be);break e}We=Et;break e;case 3:Et.flags=Et.flags&-65537|128;case 0:if(Et=Rt.payload,Be=typeof Et=="function"?Et.call(gt,We,Be):Et,Be==null)break e;We=J({},We,Be);break e;case 2:Io=!0}}Q.callback!==null&&Q.lane!==0&&(u.flags|=64,Be=C.effects,Be===null?C.effects=[Q]:Be.push(Q))}else gt={eventTime:gt,lane:Be,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},Ve===null?(Ne=Ve=gt,se=We):Ve=Ve.next=gt,G|=Be;if(Q=Q.next,Q===null){if(Q=C.shared.pending,Q===null)break;Be=Q,Q=Be.next,Be.next=null,C.lastBaseUpdate=Be,C.shared.pending=null}}while(!0);if(Ve===null&&(se=We),C.baseState=se,C.firstBaseUpdate=Ne,C.lastBaseUpdate=Ve,p=C.shared.interleaved,p!==null){C=p;do G|=C.lane,C=C.next;while(C!==p)}else j===null&&(C.shared.lanes=0);Ll|=G,u.lanes=G,u.memoizedState=We}}function N3(u,p,x){if(u=p.effects,p.effects=null,u!==null)for(p=0;p<u.length;p++){var S=u[p],C=S.callback;if(C!==null){if(S.callback=null,S=x,typeof C!="function")throw Error(n(191,C));C.call(S)}}}var Of={},Za=Ro(Of),If=Ro(Of),Df=Ro(Of);function Dl(u){if(u===Of)throw Error(n(174));return u}function pb(u,p){switch(In(Df,p),In(If,u),In(Za,Of),u=p.nodeType,u){case 9:case 11:p=(p=p.documentElement)?p.namespaceURI:Pe(null,"");break;default:u=u===8?p.parentNode:p,p=u.namespaceURI||null,u=u.tagName,p=Pe(p,u)}Un(Za),In(Za,p)}function ou(){Un(Za),Un(If),Un(Df)}function P3(u){Dl(Df.current);var p=Dl(Za.current),x=Pe(p,u.type);p!==x&&(In(If,u),In(Za,x))}function mb(u){If.current===u&&(Un(Za),Un(If))}var Wn=Ro(0);function Wm(u){for(var p=u;p!==null;){if(p.tag===13){var x=p.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||x.data==="$?"||x.data==="$!"))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===u)break;for(;p.sibling===null;){if(p.return===null||p.return===u)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var gb=[];function vb(){for(var u=0;u<gb.length;u++)gb[u]._workInProgressVersionPrimary=null;gb.length=0}var qm=M.ReactCurrentDispatcher,yb=M.ReactCurrentBatchConfig,kl=0,qn=null,hr=null,Mr=null,Xm=!1,kf=!1,Lf=0,J7=0;function Hr(){throw Error(n(321))}function xb(u,p){if(p===null)return!1;for(var x=0;x<p.length&&x<u.length;x++)if(!Ea(u[x],p[x]))return!1;return!0}function bb(u,p,x,S,C,j){if(kl=j,qn=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,qm.current=u===null||u.memoizedState===null?nW:rW,u=x(S,C),kf){j=0;do{if(kf=!1,Lf=0,25<=j)throw Error(n(301));j+=1,Mr=hr=null,p.updateQueue=null,qm.current=iW,u=x(S,C)}while(kf)}if(qm.current=Zm,p=hr!==null&&hr.next!==null,kl=0,Mr=hr=qn=null,Xm=!1,p)throw Error(n(300));return u}function wb(){var u=Lf!==0;return Lf=0,u}function Ja(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mr===null?qn.memoizedState=Mr=u:Mr=Mr.next=u,Mr}function ia(){if(hr===null){var u=qn.alternate;u=u!==null?u.memoizedState:null}else u=hr.next;var p=Mr===null?qn.memoizedState:Mr.next;if(p!==null)Mr=p,hr=u;else{if(u===null)throw Error(n(310));hr=u,u={memoizedState:hr.memoizedState,baseState:hr.baseState,baseQueue:hr.baseQueue,queue:hr.queue,next:null},Mr===null?qn.memoizedState=Mr=u:Mr=Mr.next=u}return Mr}function Ff(u,p){return typeof p=="function"?p(u):p}function _b(u){var p=ia(),x=p.queue;if(x===null)throw Error(n(311));x.lastRenderedReducer=u;var S=hr,C=S.baseQueue,j=x.pending;if(j!==null){if(C!==null){var G=C.next;C.next=j.next,j.next=G}S.baseQueue=C=j,x.pending=null}if(C!==null){j=C.next,S=S.baseState;var Q=G=null,se=null,Ne=j;do{var Ve=Ne.lane;if((kl&Ve)===Ve)se!==null&&(se=se.next={lane:0,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),S=Ne.hasEagerState?Ne.eagerState:u(S,Ne.action);else{var We={lane:Ve,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null};se===null?(Q=se=We,G=S):se=se.next=We,qn.lanes|=Ve,Ll|=Ve}Ne=Ne.next}while(Ne!==null&&Ne!==j);se===null?G=S:se.next=Q,Ea(S,p.memoizedState)||(Si=!0),p.memoizedState=S,p.baseState=G,p.baseQueue=se,x.lastRenderedState=S}if(u=x.interleaved,u!==null){C=u;do j=C.lane,qn.lanes|=j,Ll|=j,C=C.next;while(C!==u)}else C===null&&(x.lanes=0);return[p.memoizedState,x.dispatch]}function Sb(u){var p=ia(),x=p.queue;if(x===null)throw Error(n(311));x.lastRenderedReducer=u;var S=x.dispatch,C=x.pending,j=p.memoizedState;if(C!==null){x.pending=null;var G=C=C.next;do j=u(j,G.action),G=G.next;while(G!==C);Ea(j,p.memoizedState)||(Si=!0),p.memoizedState=j,p.baseQueue===null&&(p.baseState=j),x.lastRenderedState=j}return[j,S]}function C3(){}function R3(u,p){var x=qn,S=ia(),C=p(),j=!Ea(S.memoizedState,C);if(j&&(S.memoizedState=C,Si=!0),S=S.queue,Mb(I3.bind(null,x,S,u),[u]),S.getSnapshot!==p||j||Mr!==null&&Mr.memoizedState.tag&1){if(x.flags|=2048,Uf(9,O3.bind(null,x,S,C,p),void 0,null),Er===null)throw Error(n(349));(kl&30)!==0||j3(x,p,C)}return C}function j3(u,p,x){u.flags|=16384,u={getSnapshot:p,value:x},p=qn.updateQueue,p===null?(p={lastEffect:null,stores:null},qn.updateQueue=p,p.stores=[u]):(x=p.stores,x===null?p.stores=[u]:x.push(u))}function O3(u,p,x,S){p.value=x,p.getSnapshot=S,D3(p)&&k3(u)}function I3(u,p,x){return x(function(){D3(p)&&k3(u)})}function D3(u){var p=u.getSnapshot;u=u.value;try{var x=p();return!Ea(u,x)}catch{return!0}}function k3(u){var p=Us(u,1);p!==null&&Ca(p,u,1,-1)}function L3(u){var p=Ja();return typeof u=="function"&&(u=u()),p.memoizedState=p.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ff,lastRenderedState:u},p.queue=u,u=u.dispatch=tW.bind(null,qn,u),[p.memoizedState,u]}function Uf(u,p,x,S){return u={tag:u,create:p,destroy:x,deps:S,next:null},p=qn.updateQueue,p===null?(p={lastEffect:null,stores:null},qn.updateQueue=p,p.lastEffect=u.next=u):(x=p.lastEffect,x===null?p.lastEffect=u.next=u:(S=x.next,x.next=u,u.next=S,p.lastEffect=u)),u}function F3(){return ia().memoizedState}function Km(u,p,x,S){var C=Ja();qn.flags|=u,C.memoizedState=Uf(1|p,x,void 0,S===void 0?null:S)}function Ym(u,p,x,S){var C=ia();S=S===void 0?null:S;var j=void 0;if(hr!==null){var G=hr.memoizedState;if(j=G.destroy,S!==null&&xb(S,G.deps)){C.memoizedState=Uf(p,x,j,S);return}}qn.flags|=u,C.memoizedState=Uf(1|p,x,j,S)}function U3(u,p){return Km(8390656,8,u,p)}function Mb(u,p){return Ym(2048,8,u,p)}function B3(u,p){return Ym(4,2,u,p)}function z3(u,p){return Ym(4,4,u,p)}function $3(u,p){if(typeof p=="function")return u=u(),p(u),function(){p(null)};if(p!=null)return u=u(),p.current=u,function(){p.current=null}}function V3(u,p,x){return x=x!=null?x.concat([u]):null,Ym(4,4,$3.bind(null,p,u),x)}function Eb(){}function H3(u,p){var x=ia();p=p===void 0?null:p;var S=x.memoizedState;return S!==null&&p!==null&&xb(p,S[1])?S[0]:(x.memoizedState=[u,p],u)}function G3(u,p){var x=ia();p=p===void 0?null:p;var S=x.memoizedState;return S!==null&&p!==null&&xb(p,S[1])?S[0]:(u=u(),x.memoizedState=[u,p],u)}function W3(u,p,x){return(kl&21)===0?(u.baseState&&(u.baseState=!1,Si=!0),u.memoizedState=x):(Ea(x,p)||(x=xi(),qn.lanes|=x,Ll|=x,u.baseState=!0),p)}function Q7(u,p){var x=qt;qt=x!==0&&4>x?x:4,u(!0);var S=yb.transition;yb.transition={};try{u(!1),p()}finally{qt=x,yb.transition=S}}function q3(){return ia().memoizedState}function eW(u,p,x){var S=Uo(u);if(x={lane:S,action:x,hasEagerState:!1,eagerState:null,next:null},X3(u))K3(p,x);else if(x=E3(u,p,x,S),x!==null){var C=ni();Ca(x,u,S,C),Y3(x,p,S)}}function tW(u,p,x){var S=Uo(u),C={lane:S,action:x,hasEagerState:!1,eagerState:null,next:null};if(X3(u))K3(p,C);else{var j=u.alternate;if(u.lanes===0&&(j===null||j.lanes===0)&&(j=p.lastRenderedReducer,j!==null))try{var G=p.lastRenderedState,Q=j(G,x);if(C.hasEagerState=!0,C.eagerState=Q,Ea(Q,G)){var se=p.interleaved;se===null?(C.next=C,fb(p)):(C.next=se.next,se.next=C),p.interleaved=C;return}}catch{}finally{}x=E3(u,p,C,S),x!==null&&(C=ni(),Ca(x,u,S,C),Y3(x,p,S))}}function X3(u){var p=u.alternate;return u===qn||p!==null&&p===qn}function K3(u,p){kf=Xm=!0;var x=u.pending;x===null?p.next=p:(p.next=x.next,x.next=p),u.pending=p}function Y3(u,p,x){if((x&4194240)!==0){var S=p.lanes;S&=u.pendingLanes,x|=S,p.lanes=x,_n(u,x)}}var Zm={readContext:ra,useCallback:Hr,useContext:Hr,useEffect:Hr,useImperativeHandle:Hr,useInsertionEffect:Hr,useLayoutEffect:Hr,useMemo:Hr,useReducer:Hr,useRef:Hr,useState:Hr,useDebugValue:Hr,useDeferredValue:Hr,useTransition:Hr,useMutableSource:Hr,useSyncExternalStore:Hr,useId:Hr,unstable_isNewReconciler:!1},nW={readContext:ra,useCallback:function(u,p){return Ja().memoizedState=[u,p===void 0?null:p],u},useContext:ra,useEffect:U3,useImperativeHandle:function(u,p,x){return x=x!=null?x.concat([u]):null,Km(4194308,4,$3.bind(null,p,u),x)},useLayoutEffect:function(u,p){return Km(4194308,4,u,p)},useInsertionEffect:function(u,p){return Km(4,2,u,p)},useMemo:function(u,p){var x=Ja();return p=p===void 0?null:p,u=u(),x.memoizedState=[u,p],u},useReducer:function(u,p,x){var S=Ja();return p=x!==void 0?x(p):p,S.memoizedState=S.baseState=p,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:p},S.queue=u,u=u.dispatch=eW.bind(null,qn,u),[S.memoizedState,u]},useRef:function(u){var p=Ja();return u={current:u},p.memoizedState=u},useState:L3,useDebugValue:Eb,useDeferredValue:function(u){return Ja().memoizedState=u},useTransition:function(){var u=L3(!1),p=u[0];return u=Q7.bind(null,u[1]),Ja().memoizedState=u,[p,u]},useMutableSource:function(){},useSyncExternalStore:function(u,p,x){var S=qn,C=Ja();if(Vn){if(x===void 0)throw Error(n(407));x=x()}else{if(x=p(),Er===null)throw Error(n(349));(kl&30)!==0||j3(S,p,x)}C.memoizedState=x;var j={value:x,getSnapshot:p};return C.queue=j,U3(I3.bind(null,S,j,u),[u]),S.flags|=2048,Uf(9,O3.bind(null,S,j,x,p),void 0,null),x},useId:function(){var u=Ja(),p=Er.identifierPrefix;if(Vn){var x=Fs,S=Ls;x=(S&~(1<<32-pt(S)-1)).toString(32)+x,p=":"+p+"R"+x,x=Lf++,0<x&&(p+="H"+x.toString(32)),p+=":"}else x=J7++,p=":"+p+"r"+x.toString(32)+":";return u.memoizedState=p},unstable_isNewReconciler:!1},rW={readContext:ra,useCallback:H3,useContext:ra,useEffect:Mb,useImperativeHandle:V3,useInsertionEffect:B3,useLayoutEffect:z3,useMemo:G3,useReducer:_b,useRef:F3,useState:function(){return _b(Ff)},useDebugValue:Eb,useDeferredValue:function(u){var p=ia();return W3(p,hr.memoizedState,u)},useTransition:function(){var u=_b(Ff)[0],p=ia().memoizedState;return[u,p]},useMutableSource:C3,useSyncExternalStore:R3,useId:q3,unstable_isNewReconciler:!1},iW={readContext:ra,useCallback:H3,useContext:ra,useEffect:Mb,useImperativeHandle:V3,useInsertionEffect:B3,useLayoutEffect:z3,useMemo:G3,useReducer:Sb,useRef:F3,useState:function(){return Sb(Ff)},useDebugValue:Eb,useDeferredValue:function(u){var p=ia();return hr===null?p.memoizedState=u:W3(p,hr.memoizedState,u)},useTransition:function(){var u=Sb(Ff)[0],p=ia().memoizedState;return[u,p]},useMutableSource:C3,useSyncExternalStore:R3,useId:q3,unstable_isNewReconciler:!1};function Aa(u,p){if(u&&u.defaultProps){p=J({},p),u=u.defaultProps;for(var x in u)p[x]===void 0&&(p[x]=u[x]);return p}return p}function Tb(u,p,x,S){p=u.memoizedState,x=x(S,p),x=x==null?p:J({},p,x),u.memoizedState=x,u.lanes===0&&(u.updateQueue.baseState=x)}var Jm={isMounted:function(u){return(u=u._reactInternals)?xt(u)===u:!1},enqueueSetState:function(u,p,x){u=u._reactInternals;var S=ni(),C=Uo(u),j=Bs(S,C);j.payload=p,x!=null&&(j.callback=x),p=Do(u,j,C),p!==null&&(Ca(p,u,C,S),Hm(p,u,C))},enqueueReplaceState:function(u,p,x){u=u._reactInternals;var S=ni(),C=Uo(u),j=Bs(S,C);j.tag=1,j.payload=p,x!=null&&(j.callback=x),p=Do(u,j,C),p!==null&&(Ca(p,u,C,S),Hm(p,u,C))},enqueueForceUpdate:function(u,p){u=u._reactInternals;var x=ni(),S=Uo(u),C=Bs(x,S);C.tag=2,p!=null&&(C.callback=p),p=Do(u,C,S),p!==null&&(Ca(p,u,S,x),Hm(p,u,S))}};function Z3(u,p,x,S,C,j,G){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(S,j,G):p.prototype&&p.prototype.isPureReactComponent?!Ef(x,S)||!Ef(C,j):!0}function J3(u,p,x){var S=!1,C=jo,j=p.contextType;return typeof j=="object"&&j!==null?j=ra(j):(C=_i(p)?Rl:Vr.current,S=p.contextTypes,j=(S=S!=null)?eu(u,C):jo),p=new p(x,j),u.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Jm,u.stateNode=p,p._reactInternals=u,S&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=C,u.__reactInternalMemoizedMaskedChildContext=j),p}function Q3(u,p,x,S){u=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(x,S),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(x,S),p.state!==u&&Jm.enqueueReplaceState(p,p.state,null)}function Ab(u,p,x,S){var C=u.stateNode;C.props=x,C.state=u.memoizedState,C.refs={},hb(u);var j=p.contextType;typeof j=="object"&&j!==null?C.context=ra(j):(j=_i(p)?Rl:Vr.current,C.context=eu(u,j)),C.state=u.memoizedState,j=p.getDerivedStateFromProps,typeof j=="function"&&(Tb(u,p,j,x),C.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(p=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),p!==C.state&&Jm.enqueueReplaceState(C,C.state,null),Gm(u,x,C,S),C.state=u.memoizedState),typeof C.componentDidMount=="function"&&(u.flags|=4194308)}function lu(u,p){try{var x="",S=p;do x+=Ae(S),S=S.return;while(S);var C=x}catch(j){C=`
Error generating stack: `+j.message+`
`+j.stack}return{value:u,source:p,stack:C,digest:null}}function Nb(u,p,x){return{value:u,source:null,stack:x??null,digest:p??null}}function Pb(u,p){try{console.error(p.value)}catch(x){setTimeout(function(){throw x})}}var aW=typeof WeakMap=="function"?WeakMap:Map;function eR(u,p,x){x=Bs(-1,x),x.tag=3,x.payload={element:null};var S=p.value;return x.callback=function(){a0||(a0=!0,Hb=S),Pb(u,p)},x}function tR(u,p,x){x=Bs(-1,x),x.tag=3;var S=u.type.getDerivedStateFromError;if(typeof S=="function"){var C=p.value;x.payload=function(){return S(C)},x.callback=function(){Pb(u,p)}}var j=u.stateNode;return j!==null&&typeof j.componentDidCatch=="function"&&(x.callback=function(){Pb(u,p),typeof S!="function"&&(Lo===null?Lo=new Set([this]):Lo.add(this));var G=p.stack;this.componentDidCatch(p.value,{componentStack:G!==null?G:""})}),x}function nR(u,p,x){var S=u.pingCache;if(S===null){S=u.pingCache=new aW;var C=new Set;S.set(p,C)}else C=S.get(p),C===void 0&&(C=new Set,S.set(p,C));C.has(x)||(C.add(x),u=xW.bind(null,u,p,x),p.then(u,u))}function rR(u){do{var p;if((p=u.tag===13)&&(p=u.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return u;u=u.return}while(u!==null);return null}function iR(u,p,x,S,C){return(u.mode&1)===0?(u===p?u.flags|=65536:(u.flags|=128,x.flags|=131072,x.flags&=-52805,x.tag===1&&(x.alternate===null?x.tag=17:(p=Bs(-1,1),p.tag=2,Do(x,p,1))),x.lanes|=1),u):(u.flags|=65536,u.lanes=C,u)}var sW=M.ReactCurrentOwner,Si=!1;function ti(u,p,x,S){p.child=u===null?M3(p,null,x,S):iu(p,u.child,x,S)}function aR(u,p,x,S,C){x=x.render;var j=p.ref;return su(p,C),S=bb(u,p,x,S,j,C),x=wb(),u!==null&&!Si?(p.updateQueue=u.updateQueue,p.flags&=-2053,u.lanes&=~C,zs(u,p,C)):(Vn&&x&&rb(p),p.flags|=1,ti(u,p,S,C),p.child)}function sR(u,p,x,S,C){if(u===null){var j=x.type;return typeof j=="function"&&!Zb(j)&&j.defaultProps===void 0&&x.compare===null&&x.defaultProps===void 0?(p.tag=15,p.type=j,oR(u,p,j,S,C)):(u=d0(x.type,null,S,p,p.mode,C),u.ref=p.ref,u.return=p,p.child=u)}if(j=u.child,(u.lanes&C)===0){var G=j.memoizedProps;if(x=x.compare,x=x!==null?x:Ef,x(G,S)&&u.ref===p.ref)return zs(u,p,C)}return p.flags|=1,u=zo(j,S),u.ref=p.ref,u.return=p,p.child=u}function oR(u,p,x,S,C){if(u!==null){var j=u.memoizedProps;if(Ef(j,S)&&u.ref===p.ref)if(Si=!1,p.pendingProps=S=j,(u.lanes&C)!==0)(u.flags&131072)!==0&&(Si=!0);else return p.lanes=u.lanes,zs(u,p,C)}return Cb(u,p,x,S,C)}function lR(u,p,x){var S=p.pendingProps,C=S.children,j=u!==null?u.memoizedState:null;if(S.mode==="hidden")if((p.mode&1)===0)p.memoizedState={baseLanes:0,cachePool:null,transitions:null},In(uu,Fi),Fi|=x;else{if((x&1073741824)===0)return u=j!==null?j.baseLanes|x:x,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:u,cachePool:null,transitions:null},p.updateQueue=null,In(uu,Fi),Fi|=u,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},S=j!==null?j.baseLanes:x,In(uu,Fi),Fi|=S}else j!==null?(S=j.baseLanes|x,p.memoizedState=null):S=x,In(uu,Fi),Fi|=S;return ti(u,p,C,x),p.child}function cR(u,p){var x=p.ref;(u===null&&x!==null||u!==null&&u.ref!==x)&&(p.flags|=512,p.flags|=2097152)}function Cb(u,p,x,S,C){var j=_i(x)?Rl:Vr.current;return j=eu(p,j),su(p,C),x=bb(u,p,x,S,j,C),S=wb(),u!==null&&!Si?(p.updateQueue=u.updateQueue,p.flags&=-2053,u.lanes&=~C,zs(u,p,C)):(Vn&&S&&rb(p),p.flags|=1,ti(u,p,x,C),p.child)}function uR(u,p,x,S,C){if(_i(x)){var j=!0;km(p)}else j=!1;if(su(p,C),p.stateNode===null)e0(u,p),J3(p,x,S),Ab(p,x,S,C),S=!0;else if(u===null){var G=p.stateNode,Q=p.memoizedProps;G.props=Q;var se=G.context,Ne=x.contextType;typeof Ne=="object"&&Ne!==null?Ne=ra(Ne):(Ne=_i(x)?Rl:Vr.current,Ne=eu(p,Ne));var Ve=x.getDerivedStateFromProps,We=typeof Ve=="function"||typeof G.getSnapshotBeforeUpdate=="function";We||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(Q!==S||se!==Ne)&&Q3(p,G,S,Ne),Io=!1;var Be=p.memoizedState;G.state=Be,Gm(p,S,G,C),se=p.memoizedState,Q!==S||Be!==se||wi.current||Io?(typeof Ve=="function"&&(Tb(p,x,Ve,S),se=p.memoizedState),(Q=Io||Z3(p,x,Q,S,Be,se,Ne))?(We||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount()),typeof G.componentDidMount=="function"&&(p.flags|=4194308)):(typeof G.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=S,p.memoizedState=se),G.props=S,G.state=se,G.context=Ne,S=Q):(typeof G.componentDidMount=="function"&&(p.flags|=4194308),S=!1)}else{G=p.stateNode,T3(u,p),Q=p.memoizedProps,Ne=p.type===p.elementType?Q:Aa(p.type,Q),G.props=Ne,We=p.pendingProps,Be=G.context,se=x.contextType,typeof se=="object"&&se!==null?se=ra(se):(se=_i(x)?Rl:Vr.current,se=eu(p,se));var gt=x.getDerivedStateFromProps;(Ve=typeof gt=="function"||typeof G.getSnapshotBeforeUpdate=="function")||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(Q!==We||Be!==se)&&Q3(p,G,S,se),Io=!1,Be=p.memoizedState,G.state=Be,Gm(p,S,G,C);var Et=p.memoizedState;Q!==We||Be!==Et||wi.current||Io?(typeof gt=="function"&&(Tb(p,x,gt,S),Et=p.memoizedState),(Ne=Io||Z3(p,x,Ne,S,Be,Et,se)||!1)?(Ve||typeof G.UNSAFE_componentWillUpdate!="function"&&typeof G.componentWillUpdate!="function"||(typeof G.componentWillUpdate=="function"&&G.componentWillUpdate(S,Et,se),typeof G.UNSAFE_componentWillUpdate=="function"&&G.UNSAFE_componentWillUpdate(S,Et,se)),typeof G.componentDidUpdate=="function"&&(p.flags|=4),typeof G.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof G.componentDidUpdate!="function"||Q===u.memoizedProps&&Be===u.memoizedState||(p.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||Q===u.memoizedProps&&Be===u.memoizedState||(p.flags|=1024),p.memoizedProps=S,p.memoizedState=Et),G.props=S,G.state=Et,G.context=se,S=Ne):(typeof G.componentDidUpdate!="function"||Q===u.memoizedProps&&Be===u.memoizedState||(p.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||Q===u.memoizedProps&&Be===u.memoizedState||(p.flags|=1024),S=!1)}return Rb(u,p,x,S,j,C)}function Rb(u,p,x,S,C,j){cR(u,p);var G=(p.flags&128)!==0;if(!S&&!G)return C&&m3(p,x,!1),zs(u,p,j);S=p.stateNode,sW.current=p;var Q=G&&typeof x.getDerivedStateFromError!="function"?null:S.render();return p.flags|=1,u!==null&&G?(p.child=iu(p,u.child,null,j),p.child=iu(p,null,Q,j)):ti(u,p,Q,j),p.memoizedState=S.state,C&&m3(p,x,!0),p.child}function dR(u){var p=u.stateNode;p.pendingContext?h3(u,p.pendingContext,p.pendingContext!==p.context):p.context&&h3(u,p.context,!1),pb(u,p.containerInfo)}function fR(u,p,x,S,C){return ru(),ob(C),p.flags|=256,ti(u,p,x,S),p.child}var jb={dehydrated:null,treeContext:null,retryLane:0};function Ob(u){return{baseLanes:u,cachePool:null,transitions:null}}function hR(u,p,x){var S=p.pendingProps,C=Wn.current,j=!1,G=(p.flags&128)!==0,Q;if((Q=G)||(Q=u!==null&&u.memoizedState===null?!1:(C&2)!==0),Q?(j=!0,p.flags&=-129):(u===null||u.memoizedState!==null)&&(C|=1),In(Wn,C&1),u===null)return sb(p),u=p.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?((p.mode&1)===0?p.lanes=1:u.data==="$!"?p.lanes=8:p.lanes=1073741824,null):(G=S.children,u=S.fallback,j?(S=p.mode,j=p.child,G={mode:"hidden",children:G},(S&1)===0&&j!==null?(j.childLanes=0,j.pendingProps=G):j=f0(G,S,0,null),u=zl(u,S,x,null),j.return=p,u.return=p,j.sibling=u,p.child=j,p.child.memoizedState=Ob(x),p.memoizedState=jb,u):Ib(p,G));if(C=u.memoizedState,C!==null&&(Q=C.dehydrated,Q!==null))return oW(u,p,G,S,Q,C,x);if(j){j=S.fallback,G=p.mode,C=u.child,Q=C.sibling;var se={mode:"hidden",children:S.children};return(G&1)===0&&p.child!==C?(S=p.child,S.childLanes=0,S.pendingProps=se,p.deletions=null):(S=zo(C,se),S.subtreeFlags=C.subtreeFlags&14680064),Q!==null?j=zo(Q,j):(j=zl(j,G,x,null),j.flags|=2),j.return=p,S.return=p,S.sibling=j,p.child=S,S=j,j=p.child,G=u.child.memoizedState,G=G===null?Ob(x):{baseLanes:G.baseLanes|x,cachePool:null,transitions:G.transitions},j.memoizedState=G,j.childLanes=u.childLanes&~x,p.memoizedState=jb,S}return j=u.child,u=j.sibling,S=zo(j,{mode:"visible",children:S.children}),(p.mode&1)===0&&(S.lanes=x),S.return=p,S.sibling=null,u!==null&&(x=p.deletions,x===null?(p.deletions=[u],p.flags|=16):x.push(u)),p.child=S,p.memoizedState=null,S}function Ib(u,p){return p=f0({mode:"visible",children:p},u.mode,0,null),p.return=u,u.child=p}function Qm(u,p,x,S){return S!==null&&ob(S),iu(p,u.child,null,x),u=Ib(p,p.pendingProps.children),u.flags|=2,p.memoizedState=null,u}function oW(u,p,x,S,C,j,G){if(x)return p.flags&256?(p.flags&=-257,S=Nb(Error(n(422))),Qm(u,p,G,S)):p.memoizedState!==null?(p.child=u.child,p.flags|=128,null):(j=S.fallback,C=p.mode,S=f0({mode:"visible",children:S.children},C,0,null),j=zl(j,C,G,null),j.flags|=2,S.return=p,j.return=p,S.sibling=j,p.child=S,(p.mode&1)!==0&&iu(p,u.child,null,G),p.child.memoizedState=Ob(G),p.memoizedState=jb,j);if((p.mode&1)===0)return Qm(u,p,G,null);if(C.data==="$!"){if(S=C.nextSibling&&C.nextSibling.dataset,S)var Q=S.dgst;return S=Q,j=Error(n(419)),S=Nb(j,S,void 0),Qm(u,p,G,S)}if(Q=(G&u.childLanes)!==0,Si||Q){if(S=Er,S!==null){switch(G&-G){case 4:C=2;break;case 16:C=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:C=32;break;case 536870912:C=268435456;break;default:C=0}C=(C&(S.suspendedLanes|G))!==0?0:C,C!==0&&C!==j.retryLane&&(j.retryLane=C,Us(u,C),Ca(S,u,C,-1))}return Yb(),S=Nb(Error(n(421))),Qm(u,p,G,S)}return C.data==="$?"?(p.flags|=128,p.child=u.child,p=bW.bind(null,u),C._reactRetry=p,null):(u=j.treeContext,Li=Co(C.nextSibling),ki=p,Vn=!0,Ta=null,u!==null&&(ta[na++]=Ls,ta[na++]=Fs,ta[na++]=jl,Ls=u.id,Fs=u.overflow,jl=p),p=Ib(p,S.children),p.flags|=4096,p)}function pR(u,p,x){u.lanes|=p;var S=u.alternate;S!==null&&(S.lanes|=p),db(u.return,p,x)}function Db(u,p,x,S,C){var j=u.memoizedState;j===null?u.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:S,tail:x,tailMode:C}:(j.isBackwards=p,j.rendering=null,j.renderingStartTime=0,j.last=S,j.tail=x,j.tailMode=C)}function mR(u,p,x){var S=p.pendingProps,C=S.revealOrder,j=S.tail;if(ti(u,p,S.children,x),S=Wn.current,(S&2)!==0)S=S&1|2,p.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=p.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&pR(u,x,p);else if(u.tag===19)pR(u,x,p);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===p)break e;for(;u.sibling===null;){if(u.return===null||u.return===p)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}S&=1}if(In(Wn,S),(p.mode&1)===0)p.memoizedState=null;else switch(C){case"forwards":for(x=p.child,C=null;x!==null;)u=x.alternate,u!==null&&Wm(u)===null&&(C=x),x=x.sibling;x=C,x===null?(C=p.child,p.child=null):(C=x.sibling,x.sibling=null),Db(p,!1,C,x,j);break;case"backwards":for(x=null,C=p.child,p.child=null;C!==null;){if(u=C.alternate,u!==null&&Wm(u)===null){p.child=C;break}u=C.sibling,C.sibling=x,x=C,C=u}Db(p,!0,x,null,j);break;case"together":Db(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function e0(u,p){(p.mode&1)===0&&u!==null&&(u.alternate=null,p.alternate=null,p.flags|=2)}function zs(u,p,x){if(u!==null&&(p.dependencies=u.dependencies),Ll|=p.lanes,(x&p.childLanes)===0)return null;if(u!==null&&p.child!==u.child)throw Error(n(153));if(p.child!==null){for(u=p.child,x=zo(u,u.pendingProps),p.child=x,x.return=p;u.sibling!==null;)u=u.sibling,x=x.sibling=zo(u,u.pendingProps),x.return=p;x.sibling=null}return p.child}function lW(u,p,x){switch(p.tag){case 3:dR(p),ru();break;case 5:P3(p);break;case 1:_i(p.type)&&km(p);break;case 4:pb(p,p.stateNode.containerInfo);break;case 10:var S=p.type._context,C=p.memoizedProps.value;In($m,S._currentValue),S._currentValue=C;break;case 13:if(S=p.memoizedState,S!==null)return S.dehydrated!==null?(In(Wn,Wn.current&1),p.flags|=128,null):(x&p.child.childLanes)!==0?hR(u,p,x):(In(Wn,Wn.current&1),u=zs(u,p,x),u!==null?u.sibling:null);In(Wn,Wn.current&1);break;case 19:if(S=(x&p.childLanes)!==0,(u.flags&128)!==0){if(S)return mR(u,p,x);p.flags|=128}if(C=p.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),In(Wn,Wn.current),S)break;return null;case 22:case 23:return p.lanes=0,lR(u,p,x)}return zs(u,p,x)}var gR,kb,vR,yR;gR=function(u,p){for(var x=p.child;x!==null;){if(x.tag===5||x.tag===6)u.appendChild(x.stateNode);else if(x.tag!==4&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===p)break;for(;x.sibling===null;){if(x.return===null||x.return===p)return;x=x.return}x.sibling.return=x.return,x=x.sibling}},kb=function(){},vR=function(u,p,x,S){var C=u.memoizedProps;if(C!==S){u=p.stateNode,Dl(Za.current);var j=null;switch(x){case"input":C=tt(u,C),S=tt(u,S),j=[];break;case"select":C=J({},C,{value:void 0}),S=J({},S,{value:void 0}),j=[];break;case"textarea":C=qe(u,C),S=qe(u,S),j=[];break;default:typeof C.onClick!="function"&&typeof S.onClick=="function"&&(u.onclick=Om)}ze(x,S);var G;x=null;for(Ne in C)if(!S.hasOwnProperty(Ne)&&C.hasOwnProperty(Ne)&&C[Ne]!=null)if(Ne==="style"){var Q=C[Ne];for(G in Q)Q.hasOwnProperty(G)&&(x||(x={}),x[G]="")}else Ne!=="dangerouslySetInnerHTML"&&Ne!=="children"&&Ne!=="suppressContentEditableWarning"&&Ne!=="suppressHydrationWarning"&&Ne!=="autoFocus"&&(i.hasOwnProperty(Ne)?j||(j=[]):(j=j||[]).push(Ne,null));for(Ne in S){var se=S[Ne];if(Q=C!=null?C[Ne]:void 0,S.hasOwnProperty(Ne)&&se!==Q&&(se!=null||Q!=null))if(Ne==="style")if(Q){for(G in Q)!Q.hasOwnProperty(G)||se&&se.hasOwnProperty(G)||(x||(x={}),x[G]="");for(G in se)se.hasOwnProperty(G)&&Q[G]!==se[G]&&(x||(x={}),x[G]=se[G])}else x||(j||(j=[]),j.push(Ne,x)),x=se;else Ne==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,Q=Q?Q.__html:void 0,se!=null&&Q!==se&&(j=j||[]).push(Ne,se)):Ne==="children"?typeof se!="string"&&typeof se!="number"||(j=j||[]).push(Ne,""+se):Ne!=="suppressContentEditableWarning"&&Ne!=="suppressHydrationWarning"&&(i.hasOwnProperty(Ne)?(se!=null&&Ne==="onScroll"&&Fn("scroll",u),j||Q===se||(j=[])):(j=j||[]).push(Ne,se))}x&&(j=j||[]).push("style",x);var Ne=j;(p.updateQueue=Ne)&&(p.flags|=4)}},yR=function(u,p,x,S){x!==S&&(p.flags|=4)};function Bf(u,p){if(!Vn)switch(u.tailMode){case"hidden":p=u.tail;for(var x=null;p!==null;)p.alternate!==null&&(x=p),p=p.sibling;x===null?u.tail=null:x.sibling=null;break;case"collapsed":x=u.tail;for(var S=null;x!==null;)x.alternate!==null&&(S=x),x=x.sibling;S===null?p||u.tail===null?u.tail=null:u.tail.sibling=null:S.sibling=null}}function Gr(u){var p=u.alternate!==null&&u.alternate.child===u.child,x=0,S=0;if(p)for(var C=u.child;C!==null;)x|=C.lanes|C.childLanes,S|=C.subtreeFlags&14680064,S|=C.flags&14680064,C.return=u,C=C.sibling;else for(C=u.child;C!==null;)x|=C.lanes|C.childLanes,S|=C.subtreeFlags,S|=C.flags,C.return=u,C=C.sibling;return u.subtreeFlags|=S,u.childLanes=x,p}function cW(u,p,x){var S=p.pendingProps;switch(ib(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gr(p),null;case 1:return _i(p.type)&&Dm(),Gr(p),null;case 3:return S=p.stateNode,ou(),Un(wi),Un(Vr),vb(),S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),(u===null||u.child===null)&&(Bm(p)?p.flags|=4:u===null||u.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,Ta!==null&&(qb(Ta),Ta=null))),kb(u,p),Gr(p),null;case 5:mb(p);var C=Dl(Df.current);if(x=p.type,u!==null&&p.stateNode!=null)vR(u,p,x,S,C),u.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!S){if(p.stateNode===null)throw Error(n(166));return Gr(p),null}if(u=Dl(Za.current),Bm(p)){S=p.stateNode,x=p.type;var j=p.memoizedProps;switch(S[Ya]=p,S[Cf]=j,u=(p.mode&1)!==0,x){case"dialog":Fn("cancel",S),Fn("close",S);break;case"iframe":case"object":case"embed":Fn("load",S);break;case"video":case"audio":for(C=0;C<Af.length;C++)Fn(Af[C],S);break;case"source":Fn("error",S);break;case"img":case"image":case"link":Fn("error",S),Fn("load",S);break;case"details":Fn("toggle",S);break;case"input":St(S,j),Fn("invalid",S);break;case"select":S._wrapperState={wasMultiple:!!j.multiple},Fn("invalid",S);break;case"textarea":Z(S,j),Fn("invalid",S)}ze(x,j),C=null;for(var G in j)if(j.hasOwnProperty(G)){var Q=j[G];G==="children"?typeof Q=="string"?S.textContent!==Q&&(j.suppressHydrationWarning!==!0&&jm(S.textContent,Q,u),C=["children",Q]):typeof Q=="number"&&S.textContent!==""+Q&&(j.suppressHydrationWarning!==!0&&jm(S.textContent,Q,u),C=["children",""+Q]):i.hasOwnProperty(G)&&Q!=null&&G==="onScroll"&&Fn("scroll",S)}switch(x){case"input":Ce(S),re(S,j,!0);break;case"textarea":Ce(S),ie(S);break;case"select":case"option":break;default:typeof j.onClick=="function"&&(S.onclick=Om)}S=C,p.updateQueue=S,S!==null&&(p.flags|=4)}else{G=C.nodeType===9?C:C.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=Ee(x)),u==="http://www.w3.org/1999/xhtml"?x==="script"?(u=G.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):typeof S.is=="string"?u=G.createElement(x,{is:S.is}):(u=G.createElement(x),x==="select"&&(G=u,S.multiple?G.multiple=!0:S.size&&(G.size=S.size))):u=G.createElementNS(u,x),u[Ya]=p,u[Cf]=S,gR(u,p,!1,!1),p.stateNode=u;e:{switch(G=He(x,S),x){case"dialog":Fn("cancel",u),Fn("close",u),C=S;break;case"iframe":case"object":case"embed":Fn("load",u),C=S;break;case"video":case"audio":for(C=0;C<Af.length;C++)Fn(Af[C],u);C=S;break;case"source":Fn("error",u),C=S;break;case"img":case"image":case"link":Fn("error",u),Fn("load",u),C=S;break;case"details":Fn("toggle",u),C=S;break;case"input":St(u,S),C=tt(u,S),Fn("invalid",u);break;case"option":C=S;break;case"select":u._wrapperState={wasMultiple:!!S.multiple},C=J({},S,{value:void 0}),Fn("invalid",u);break;case"textarea":Z(u,S),C=qe(u,S),Fn("invalid",u);break;default:C=S}ze(x,C),Q=C;for(j in Q)if(Q.hasOwnProperty(j)){var se=Q[j];j==="style"?ke(u,se):j==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,se!=null&&Xe(u,se)):j==="children"?typeof se=="string"?(x!=="textarea"||se!=="")&&Le(u,se):typeof se=="number"&&Le(u,""+se):j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&j!=="autoFocus"&&(i.hasOwnProperty(j)?se!=null&&j==="onScroll"&&Fn("scroll",u):se!=null&&E(u,j,se,G))}switch(x){case"input":Ce(u),re(u,S,!1);break;case"textarea":Ce(u),ie(u);break;case"option":S.value!=null&&u.setAttribute("value",""+pe(S.value));break;case"select":u.multiple=!!S.multiple,j=S.value,j!=null?zt(u,!!S.multiple,j,!1):S.defaultValue!=null&&zt(u,!!S.multiple,S.defaultValue,!0);break;default:typeof C.onClick=="function"&&(u.onclick=Om)}switch(x){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}}S&&(p.flags|=4)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return Gr(p),null;case 6:if(u&&p.stateNode!=null)yR(u,p,u.memoizedProps,S);else{if(typeof S!="string"&&p.stateNode===null)throw Error(n(166));if(x=Dl(Df.current),Dl(Za.current),Bm(p)){if(S=p.stateNode,x=p.memoizedProps,S[Ya]=p,(j=S.nodeValue!==x)&&(u=ki,u!==null))switch(u.tag){case 3:jm(S.nodeValue,x,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&jm(S.nodeValue,x,(u.mode&1)!==0)}j&&(p.flags|=4)}else S=(x.nodeType===9?x:x.ownerDocument).createTextNode(S),S[Ya]=p,p.stateNode=S}return Gr(p),null;case 13:if(Un(Wn),S=p.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(Vn&&Li!==null&&(p.mode&1)!==0&&(p.flags&128)===0)w3(),ru(),p.flags|=98560,j=!1;else if(j=Bm(p),S!==null&&S.dehydrated!==null){if(u===null){if(!j)throw Error(n(318));if(j=p.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(n(317));j[Ya]=p}else ru(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;Gr(p),j=!1}else Ta!==null&&(qb(Ta),Ta=null),j=!0;if(!j)return p.flags&65536?p:null}return(p.flags&128)!==0?(p.lanes=x,p):(S=S!==null,S!==(u!==null&&u.memoizedState!==null)&&S&&(p.child.flags|=8192,(p.mode&1)!==0&&(u===null||(Wn.current&1)!==0?pr===0&&(pr=3):Yb())),p.updateQueue!==null&&(p.flags|=4),Gr(p),null);case 4:return ou(),kb(u,p),u===null&&Nf(p.stateNode.containerInfo),Gr(p),null;case 10:return ub(p.type._context),Gr(p),null;case 17:return _i(p.type)&&Dm(),Gr(p),null;case 19:if(Un(Wn),j=p.memoizedState,j===null)return Gr(p),null;if(S=(p.flags&128)!==0,G=j.rendering,G===null)if(S)Bf(j,!1);else{if(pr!==0||u!==null&&(u.flags&128)!==0)for(u=p.child;u!==null;){if(G=Wm(u),G!==null){for(p.flags|=128,Bf(j,!1),S=G.updateQueue,S!==null&&(p.updateQueue=S,p.flags|=4),p.subtreeFlags=0,S=x,x=p.child;x!==null;)j=x,u=S,j.flags&=14680066,G=j.alternate,G===null?(j.childLanes=0,j.lanes=u,j.child=null,j.subtreeFlags=0,j.memoizedProps=null,j.memoizedState=null,j.updateQueue=null,j.dependencies=null,j.stateNode=null):(j.childLanes=G.childLanes,j.lanes=G.lanes,j.child=G.child,j.subtreeFlags=0,j.deletions=null,j.memoizedProps=G.memoizedProps,j.memoizedState=G.memoizedState,j.updateQueue=G.updateQueue,j.type=G.type,u=G.dependencies,j.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),x=x.sibling;return In(Wn,Wn.current&1|2),p.child}u=u.sibling}j.tail!==null&&X()>du&&(p.flags|=128,S=!0,Bf(j,!1),p.lanes=4194304)}else{if(!S)if(u=Wm(G),u!==null){if(p.flags|=128,S=!0,x=u.updateQueue,x!==null&&(p.updateQueue=x,p.flags|=4),Bf(j,!0),j.tail===null&&j.tailMode==="hidden"&&!G.alternate&&!Vn)return Gr(p),null}else 2*X()-j.renderingStartTime>du&&x!==1073741824&&(p.flags|=128,S=!0,Bf(j,!1),p.lanes=4194304);j.isBackwards?(G.sibling=p.child,p.child=G):(x=j.last,x!==null?x.sibling=G:p.child=G,j.last=G)}return j.tail!==null?(p=j.tail,j.rendering=p,j.tail=p.sibling,j.renderingStartTime=X(),p.sibling=null,x=Wn.current,In(Wn,S?x&1|2:x&1),p):(Gr(p),null);case 22:case 23:return Kb(),S=p.memoizedState!==null,u!==null&&u.memoizedState!==null!==S&&(p.flags|=8192),S&&(p.mode&1)!==0?(Fi&1073741824)!==0&&(Gr(p),p.subtreeFlags&6&&(p.flags|=8192)):Gr(p),null;case 24:return null;case 25:return null}throw Error(n(156,p.tag))}function uW(u,p){switch(ib(p),p.tag){case 1:return _i(p.type)&&Dm(),u=p.flags,u&65536?(p.flags=u&-65537|128,p):null;case 3:return ou(),Un(wi),Un(Vr),vb(),u=p.flags,(u&65536)!==0&&(u&128)===0?(p.flags=u&-65537|128,p):null;case 5:return mb(p),null;case 13:if(Un(Wn),u=p.memoizedState,u!==null&&u.dehydrated!==null){if(p.alternate===null)throw Error(n(340));ru()}return u=p.flags,u&65536?(p.flags=u&-65537|128,p):null;case 19:return Un(Wn),null;case 4:return ou(),null;case 10:return ub(p.type._context),null;case 22:case 23:return Kb(),null;case 24:return null;default:return null}}var t0=!1,Wr=!1,dW=typeof WeakSet=="function"?WeakSet:Set,wt=null;function cu(u,p){var x=u.ref;if(x!==null)if(typeof x=="function")try{x(null)}catch(S){Qn(u,p,S)}else x.current=null}function Lb(u,p,x){try{x()}catch(S){Qn(u,p,S)}}var xR=!1;function fW(u,p){if(Kx=wm,u=ZC(),zx(u)){if("selectionStart"in u)var x={start:u.selectionStart,end:u.selectionEnd};else e:{x=(x=u.ownerDocument)&&x.defaultView||window;var S=x.getSelection&&x.getSelection();if(S&&S.rangeCount!==0){x=S.anchorNode;var C=S.anchorOffset,j=S.focusNode;S=S.focusOffset;try{x.nodeType,j.nodeType}catch{x=null;break e}var G=0,Q=-1,se=-1,Ne=0,Ve=0,We=u,Be=null;t:for(;;){for(var gt;We!==x||C!==0&&We.nodeType!==3||(Q=G+C),We!==j||S!==0&&We.nodeType!==3||(se=G+S),We.nodeType===3&&(G+=We.nodeValue.length),(gt=We.firstChild)!==null;)Be=We,We=gt;for(;;){if(We===u)break t;if(Be===x&&++Ne===C&&(Q=G),Be===j&&++Ve===S&&(se=G),(gt=We.nextSibling)!==null)break;We=Be,Be=We.parentNode}We=gt}x=Q===-1||se===-1?null:{start:Q,end:se}}else x=null}x=x||{start:0,end:0}}else x=null;for(Yx={focusedElem:u,selectionRange:x},wm=!1,wt=p;wt!==null;)if(p=wt,u=p.child,(p.subtreeFlags&1028)!==0&&u!==null)u.return=p,wt=u;else for(;wt!==null;){p=wt;try{var Et=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(Et!==null){var Rt=Et.memoizedProps,ar=Et.memoizedState,xe=p.stateNode,le=xe.getSnapshotBeforeUpdate(p.elementType===p.type?Rt:Aa(p.type,Rt),ar);xe.__reactInternalSnapshotBeforeUpdate=le}break;case 3:var Me=p.stateNode.containerInfo;Me.nodeType===1?Me.textContent="":Me.nodeType===9&&Me.documentElement&&Me.removeChild(Me.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(et){Qn(p,p.return,et)}if(u=p.sibling,u!==null){u.return=p.return,wt=u;break}wt=p.return}return Et=xR,xR=!1,Et}function zf(u,p,x){var S=p.updateQueue;if(S=S!==null?S.lastEffect:null,S!==null){var C=S=S.next;do{if((C.tag&u)===u){var j=C.destroy;C.destroy=void 0,j!==void 0&&Lb(p,x,j)}C=C.next}while(C!==S)}}function n0(u,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&u)===u){var S=x.create;x.destroy=S()}x=x.next}while(x!==p)}}function Fb(u){var p=u.ref;if(p!==null){var x=u.stateNode;switch(u.tag){case 5:u=x;break;default:u=x}typeof p=="function"?p(u):p.current=u}}function bR(u){var p=u.alternate;p!==null&&(u.alternate=null,bR(p)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(p=u.stateNode,p!==null&&(delete p[Ya],delete p[Cf],delete p[eb],delete p[X7],delete p[K7])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function wR(u){return u.tag===5||u.tag===3||u.tag===4}function _R(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||wR(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Ub(u,p,x){var S=u.tag;if(S===5||S===6)u=u.stateNode,p?x.nodeType===8?x.parentNode.insertBefore(u,p):x.insertBefore(u,p):(x.nodeType===8?(p=x.parentNode,p.insertBefore(u,x)):(p=x,p.appendChild(u)),x=x._reactRootContainer,x!=null||p.onclick!==null||(p.onclick=Om));else if(S!==4&&(u=u.child,u!==null))for(Ub(u,p,x),u=u.sibling;u!==null;)Ub(u,p,x),u=u.sibling}function Bb(u,p,x){var S=u.tag;if(S===5||S===6)u=u.stateNode,p?x.insertBefore(u,p):x.appendChild(u);else if(S!==4&&(u=u.child,u!==null))for(Bb(u,p,x),u=u.sibling;u!==null;)Bb(u,p,x),u=u.sibling}var Or=null,Na=!1;function ko(u,p,x){for(x=x.child;x!==null;)SR(u,p,x),x=x.sibling}function SR(u,p,x){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(it,x)}catch{}switch(x.tag){case 5:Wr||cu(x,p);case 6:var S=Or,C=Na;Or=null,ko(u,p,x),Or=S,Na=C,Or!==null&&(Na?(u=Or,x=x.stateNode,u.nodeType===8?u.parentNode.removeChild(x):u.removeChild(x)):Or.removeChild(x.stateNode));break;case 18:Or!==null&&(Na?(u=Or,x=x.stateNode,u.nodeType===8?Qx(u.parentNode,x):u.nodeType===1&&Qx(u,x),xf(u)):Qx(Or,x.stateNode));break;case 4:S=Or,C=Na,Or=x.stateNode.containerInfo,Na=!0,ko(u,p,x),Or=S,Na=C;break;case 0:case 11:case 14:case 15:if(!Wr&&(S=x.updateQueue,S!==null&&(S=S.lastEffect,S!==null))){C=S=S.next;do{var j=C,G=j.destroy;j=j.tag,G!==void 0&&((j&2)!==0||(j&4)!==0)&&Lb(x,p,G),C=C.next}while(C!==S)}ko(u,p,x);break;case 1:if(!Wr&&(cu(x,p),S=x.stateNode,typeof S.componentWillUnmount=="function"))try{S.props=x.memoizedProps,S.state=x.memoizedState,S.componentWillUnmount()}catch(Q){Qn(x,p,Q)}ko(u,p,x);break;case 21:ko(u,p,x);break;case 22:x.mode&1?(Wr=(S=Wr)||x.memoizedState!==null,ko(u,p,x),Wr=S):ko(u,p,x);break;default:ko(u,p,x)}}function MR(u){var p=u.updateQueue;if(p!==null){u.updateQueue=null;var x=u.stateNode;x===null&&(x=u.stateNode=new dW),p.forEach(function(S){var C=wW.bind(null,u,S);x.has(S)||(x.add(S),S.then(C,C))})}}function Pa(u,p){var x=p.deletions;if(x!==null)for(var S=0;S<x.length;S++){var C=x[S];try{var j=u,G=p,Q=G;e:for(;Q!==null;){switch(Q.tag){case 5:Or=Q.stateNode,Na=!1;break e;case 3:Or=Q.stateNode.containerInfo,Na=!0;break e;case 4:Or=Q.stateNode.containerInfo,Na=!0;break e}Q=Q.return}if(Or===null)throw Error(n(160));SR(j,G,C),Or=null,Na=!1;var se=C.alternate;se!==null&&(se.return=null),C.return=null}catch(Ne){Qn(C,p,Ne)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)ER(p,u),p=p.sibling}function ER(u,p){var x=u.alternate,S=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(Pa(p,u),Qa(u),S&4){try{zf(3,u,u.return),n0(3,u)}catch(Rt){Qn(u,u.return,Rt)}try{zf(5,u,u.return)}catch(Rt){Qn(u,u.return,Rt)}}break;case 1:Pa(p,u),Qa(u),S&512&&x!==null&&cu(x,x.return);break;case 5:if(Pa(p,u),Qa(u),S&512&&x!==null&&cu(x,x.return),u.flags&32){var C=u.stateNode;try{Le(C,"")}catch(Rt){Qn(u,u.return,Rt)}}if(S&4&&(C=u.stateNode,C!=null)){var j=u.memoizedProps,G=x!==null?x.memoizedProps:j,Q=u.type,se=u.updateQueue;if(u.updateQueue=null,se!==null)try{Q==="input"&&j.type==="radio"&&j.name!=null&&lt(C,j),He(Q,G);var Ne=He(Q,j);for(G=0;G<se.length;G+=2){var Ve=se[G],We=se[G+1];Ve==="style"?ke(C,We):Ve==="dangerouslySetInnerHTML"?Xe(C,We):Ve==="children"?Le(C,We):E(C,Ve,We,Ne)}switch(Q){case"input":kt(C,j);break;case"textarea":z(C,j);break;case"select":var Be=C._wrapperState.wasMultiple;C._wrapperState.wasMultiple=!!j.multiple;var gt=j.value;gt!=null?zt(C,!!j.multiple,gt,!1):Be!==!!j.multiple&&(j.defaultValue!=null?zt(C,!!j.multiple,j.defaultValue,!0):zt(C,!!j.multiple,j.multiple?[]:"",!1))}C[Cf]=j}catch(Rt){Qn(u,u.return,Rt)}}break;case 6:if(Pa(p,u),Qa(u),S&4){if(u.stateNode===null)throw Error(n(162));C=u.stateNode,j=u.memoizedProps;try{C.nodeValue=j}catch(Rt){Qn(u,u.return,Rt)}}break;case 3:if(Pa(p,u),Qa(u),S&4&&x!==null&&x.memoizedState.isDehydrated)try{xf(p.containerInfo)}catch(Rt){Qn(u,u.return,Rt)}break;case 4:Pa(p,u),Qa(u);break;case 13:Pa(p,u),Qa(u),C=u.child,C.flags&8192&&(j=C.memoizedState!==null,C.stateNode.isHidden=j,!j||C.alternate!==null&&C.alternate.memoizedState!==null||(Vb=X())),S&4&&MR(u);break;case 22:if(Ve=x!==null&&x.memoizedState!==null,u.mode&1?(Wr=(Ne=Wr)||Ve,Pa(p,u),Wr=Ne):Pa(p,u),Qa(u),S&8192){if(Ne=u.memoizedState!==null,(u.stateNode.isHidden=Ne)&&!Ve&&(u.mode&1)!==0)for(wt=u,Ve=u.child;Ve!==null;){for(We=wt=Ve;wt!==null;){switch(Be=wt,gt=Be.child,Be.tag){case 0:case 11:case 14:case 15:zf(4,Be,Be.return);break;case 1:cu(Be,Be.return);var Et=Be.stateNode;if(typeof Et.componentWillUnmount=="function"){S=Be,x=Be.return;try{p=S,Et.props=p.memoizedProps,Et.state=p.memoizedState,Et.componentWillUnmount()}catch(Rt){Qn(S,x,Rt)}}break;case 5:cu(Be,Be.return);break;case 22:if(Be.memoizedState!==null){NR(We);continue}}gt!==null?(gt.return=Be,wt=gt):NR(We)}Ve=Ve.sibling}e:for(Ve=null,We=u;;){if(We.tag===5){if(Ve===null){Ve=We;try{C=We.stateNode,Ne?(j=C.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none"):(Q=We.stateNode,se=We.memoizedProps.style,G=se!=null&&se.hasOwnProperty("display")?se.display:null,Q.style.display=Ue("display",G))}catch(Rt){Qn(u,u.return,Rt)}}}else if(We.tag===6){if(Ve===null)try{We.stateNode.nodeValue=Ne?"":We.memoizedProps}catch(Rt){Qn(u,u.return,Rt)}}else if((We.tag!==22&&We.tag!==23||We.memoizedState===null||We===u)&&We.child!==null){We.child.return=We,We=We.child;continue}if(We===u)break e;for(;We.sibling===null;){if(We.return===null||We.return===u)break e;Ve===We&&(Ve=null),We=We.return}Ve===We&&(Ve=null),We.sibling.return=We.return,We=We.sibling}}break;case 19:Pa(p,u),Qa(u),S&4&&MR(u);break;case 21:break;default:Pa(p,u),Qa(u)}}function Qa(u){var p=u.flags;if(p&2){try{e:{for(var x=u.return;x!==null;){if(wR(x)){var S=x;break e}x=x.return}throw Error(n(160))}switch(S.tag){case 5:var C=S.stateNode;S.flags&32&&(Le(C,""),S.flags&=-33);var j=_R(u);Bb(u,j,C);break;case 3:case 4:var G=S.stateNode.containerInfo,Q=_R(u);Ub(u,Q,G);break;default:throw Error(n(161))}}catch(se){Qn(u,u.return,se)}u.flags&=-3}p&4096&&(u.flags&=-4097)}function hW(u,p,x){wt=u,TR(u)}function TR(u,p,x){for(var S=(u.mode&1)!==0;wt!==null;){var C=wt,j=C.child;if(C.tag===22&&S){var G=C.memoizedState!==null||t0;if(!G){var Q=C.alternate,se=Q!==null&&Q.memoizedState!==null||Wr;Q=t0;var Ne=Wr;if(t0=G,(Wr=se)&&!Ne)for(wt=C;wt!==null;)G=wt,se=G.child,G.tag===22&&G.memoizedState!==null?PR(C):se!==null?(se.return=G,wt=se):PR(C);for(;j!==null;)wt=j,TR(j),j=j.sibling;wt=C,t0=Q,Wr=Ne}AR(u)}else(C.subtreeFlags&8772)!==0&&j!==null?(j.return=C,wt=j):AR(u)}}function AR(u){for(;wt!==null;){var p=wt;if((p.flags&8772)!==0){var x=p.alternate;try{if((p.flags&8772)!==0)switch(p.tag){case 0:case 11:case 15:Wr||n0(5,p);break;case 1:var S=p.stateNode;if(p.flags&4&&!Wr)if(x===null)S.componentDidMount();else{var C=p.elementType===p.type?x.memoizedProps:Aa(p.type,x.memoizedProps);S.componentDidUpdate(C,x.memoizedState,S.__reactInternalSnapshotBeforeUpdate)}var j=p.updateQueue;j!==null&&N3(p,j,S);break;case 3:var G=p.updateQueue;if(G!==null){if(x=null,p.child!==null)switch(p.child.tag){case 5:x=p.child.stateNode;break;case 1:x=p.child.stateNode}N3(p,G,x)}break;case 5:var Q=p.stateNode;if(x===null&&p.flags&4){x=Q;var se=p.memoizedProps;switch(p.type){case"button":case"input":case"select":case"textarea":se.autoFocus&&x.focus();break;case"img":se.src&&(x.src=se.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(p.memoizedState===null){var Ne=p.alternate;if(Ne!==null){var Ve=Ne.memoizedState;if(Ve!==null){var We=Ve.dehydrated;We!==null&&xf(We)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Wr||p.flags&512&&Fb(p)}catch(Be){Qn(p,p.return,Be)}}if(p===u){wt=null;break}if(x=p.sibling,x!==null){x.return=p.return,wt=x;break}wt=p.return}}function NR(u){for(;wt!==null;){var p=wt;if(p===u){wt=null;break}var x=p.sibling;if(x!==null){x.return=p.return,wt=x;break}wt=p.return}}function PR(u){for(;wt!==null;){var p=wt;try{switch(p.tag){case 0:case 11:case 15:var x=p.return;try{n0(4,p)}catch(se){Qn(p,x,se)}break;case 1:var S=p.stateNode;if(typeof S.componentDidMount=="function"){var C=p.return;try{S.componentDidMount()}catch(se){Qn(p,C,se)}}var j=p.return;try{Fb(p)}catch(se){Qn(p,j,se)}break;case 5:var G=p.return;try{Fb(p)}catch(se){Qn(p,G,se)}}}catch(se){Qn(p,p.return,se)}if(p===u){wt=null;break}var Q=p.sibling;if(Q!==null){Q.return=p.return,wt=Q;break}wt=p.return}}var pW=Math.ceil,r0=M.ReactCurrentDispatcher,zb=M.ReactCurrentOwner,aa=M.ReactCurrentBatchConfig,gn=0,Er=null,or=null,Ir=0,Fi=0,uu=Ro(0),pr=0,$f=null,Ll=0,i0=0,$b=0,Vf=null,Mi=null,Vb=0,du=1/0,$s=null,a0=!1,Hb=null,Lo=null,s0=!1,Fo=null,o0=0,Hf=0,Gb=null,l0=-1,c0=0;function ni(){return(gn&6)!==0?X():l0!==-1?l0:l0=X()}function Uo(u){return(u.mode&1)===0?1:(gn&2)!==0&&Ir!==0?Ir&-Ir:Z7.transition!==null?(c0===0&&(c0=xi()),c0):(u=qt,u!==0||(u=window.event,u=u===void 0?16:RC(u.type)),u)}function Ca(u,p,x,S){if(50<Hf)throw Hf=0,Gb=null,Error(n(185));Ii(u,x,S),((gn&2)===0||u!==Er)&&(u===Er&&((gn&2)===0&&(i0|=x),pr===4&&Bo(u,Ir)),Ei(u,S),x===1&&gn===0&&(p.mode&1)===0&&(du=X()+500,Lm&&Oo()))}function Ei(u,p){var x=u.callbackNode;ei(u,p);var S=rr(u,u===Er?Ir:0);if(S===0)x!==null&&sr(x),u.callbackNode=null,u.callbackPriority=0;else if(p=S&-S,u.callbackPriority!==p){if(x!=null&&sr(x),p===1)u.tag===0?Y7(RR.bind(null,u)):g3(RR.bind(null,u)),W7(function(){(gn&6)===0&&Oo()}),x=null;else{switch(Ma(S)){case 1:x=Te;break;case 4:x=ve;break;case 16:x=be;break;case 536870912:x=ct;break;default:x=be}x=UR(x,CR.bind(null,u))}u.callbackPriority=p,u.callbackNode=x}}function CR(u,p){if(l0=-1,c0=0,(gn&6)!==0)throw Error(n(327));var x=u.callbackNode;if(fu()&&u.callbackNode!==x)return null;var S=rr(u,u===Er?Ir:0);if(S===0)return null;if((S&30)!==0||(S&u.expiredLanes)!==0||p)p=u0(u,S);else{p=S;var C=gn;gn|=2;var j=OR();(Er!==u||Ir!==p)&&($s=null,du=X()+500,Ul(u,p));do try{vW();break}catch(Q){jR(u,Q)}while(!0);cb(),r0.current=j,gn=C,or!==null?p=0:(Er=null,Ir=0,p=pr)}if(p!==0){if(p===2&&(C=hn(u),C!==0&&(S=C,p=Wb(u,C))),p===1)throw x=$f,Ul(u,0),Bo(u,S),Ei(u,X()),x;if(p===6)Bo(u,S);else{if(C=u.current.alternate,(S&30)===0&&!mW(C)&&(p=u0(u,S),p===2&&(j=hn(u),j!==0&&(S=j,p=Wb(u,j))),p===1))throw x=$f,Ul(u,0),Bo(u,S),Ei(u,X()),x;switch(u.finishedWork=C,u.finishedLanes=S,p){case 0:case 1:throw Error(n(345));case 2:Bl(u,Mi,$s);break;case 3:if(Bo(u,S),(S&130023424)===S&&(p=Vb+500-X(),10<p)){if(rr(u,0)!==0)break;if(C=u.suspendedLanes,(C&S)!==S){ni(),u.pingedLanes|=u.suspendedLanes&C;break}u.timeoutHandle=Jx(Bl.bind(null,u,Mi,$s),p);break}Bl(u,Mi,$s);break;case 4:if(Bo(u,S),(S&4194240)===S)break;for(p=u.eventTimes,C=-1;0<S;){var G=31-pt(S);j=1<<G,G=p[G],G>C&&(C=G),S&=~j}if(S=C,S=X()-S,S=(120>S?120:480>S?480:1080>S?1080:1920>S?1920:3e3>S?3e3:4320>S?4320:1960*pW(S/1960))-S,10<S){u.timeoutHandle=Jx(Bl.bind(null,u,Mi,$s),S);break}Bl(u,Mi,$s);break;case 5:Bl(u,Mi,$s);break;default:throw Error(n(329))}}}return Ei(u,X()),u.callbackNode===x?CR.bind(null,u):null}function Wb(u,p){var x=Vf;return u.current.memoizedState.isDehydrated&&(Ul(u,p).flags|=256),u=u0(u,p),u!==2&&(p=Mi,Mi=x,p!==null&&qb(p)),u}function qb(u){Mi===null?Mi=u:Mi.push.apply(Mi,u)}function mW(u){for(var p=u;;){if(p.flags&16384){var x=p.updateQueue;if(x!==null&&(x=x.stores,x!==null))for(var S=0;S<x.length;S++){var C=x[S],j=C.getSnapshot;C=C.value;try{if(!Ea(j(),C))return!1}catch{return!1}}}if(x=p.child,p.subtreeFlags&16384&&x!==null)x.return=p,p=x;else{if(p===u)break;for(;p.sibling===null;){if(p.return===null||p.return===u)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function Bo(u,p){for(p&=~$b,p&=~i0,u.suspendedLanes|=p,u.pingedLanes&=~p,u=u.expirationTimes;0<p;){var x=31-pt(p),S=1<<x;u[x]=-1,p&=~S}}function RR(u){if((gn&6)!==0)throw Error(n(327));fu();var p=rr(u,0);if((p&1)===0)return Ei(u,X()),null;var x=u0(u,p);if(u.tag!==0&&x===2){var S=hn(u);S!==0&&(p=S,x=Wb(u,S))}if(x===1)throw x=$f,Ul(u,0),Bo(u,p),Ei(u,X()),x;if(x===6)throw Error(n(345));return u.finishedWork=u.current.alternate,u.finishedLanes=p,Bl(u,Mi,$s),Ei(u,X()),null}function Xb(u,p){var x=gn;gn|=1;try{return u(p)}finally{gn=x,gn===0&&(du=X()+500,Lm&&Oo())}}function Fl(u){Fo!==null&&Fo.tag===0&&(gn&6)===0&&fu();var p=gn;gn|=1;var x=aa.transition,S=qt;try{if(aa.transition=null,qt=1,u)return u()}finally{qt=S,aa.transition=x,gn=p,(gn&6)===0&&Oo()}}function Kb(){Fi=uu.current,Un(uu)}function Ul(u,p){u.finishedWork=null,u.finishedLanes=0;var x=u.timeoutHandle;if(x!==-1&&(u.timeoutHandle=-1,G7(x)),or!==null)for(x=or.return;x!==null;){var S=x;switch(ib(S),S.tag){case 1:S=S.type.childContextTypes,S!=null&&Dm();break;case 3:ou(),Un(wi),Un(Vr),vb();break;case 5:mb(S);break;case 4:ou();break;case 13:Un(Wn);break;case 19:Un(Wn);break;case 10:ub(S.type._context);break;case 22:case 23:Kb()}x=x.return}if(Er=u,or=u=zo(u.current,null),Ir=Fi=p,pr=0,$f=null,$b=i0=Ll=0,Mi=Vf=null,Il!==null){for(p=0;p<Il.length;p++)if(x=Il[p],S=x.interleaved,S!==null){x.interleaved=null;var C=S.next,j=x.pending;if(j!==null){var G=j.next;j.next=C,S.next=G}x.pending=S}Il=null}return u}function jR(u,p){do{var x=or;try{if(cb(),qm.current=Zm,Xm){for(var S=qn.memoizedState;S!==null;){var C=S.queue;C!==null&&(C.pending=null),S=S.next}Xm=!1}if(kl=0,Mr=hr=qn=null,kf=!1,Lf=0,zb.current=null,x===null||x.return===null){pr=1,$f=p,or=null;break}e:{var j=u,G=x.return,Q=x,se=p;if(p=Ir,Q.flags|=32768,se!==null&&typeof se=="object"&&typeof se.then=="function"){var Ne=se,Ve=Q,We=Ve.tag;if((Ve.mode&1)===0&&(We===0||We===11||We===15)){var Be=Ve.alternate;Be?(Ve.updateQueue=Be.updateQueue,Ve.memoizedState=Be.memoizedState,Ve.lanes=Be.lanes):(Ve.updateQueue=null,Ve.memoizedState=null)}var gt=rR(G);if(gt!==null){gt.flags&=-257,iR(gt,G,Q,j,p),gt.mode&1&&nR(j,Ne,p),p=gt,se=Ne;var Et=p.updateQueue;if(Et===null){var Rt=new Set;Rt.add(se),p.updateQueue=Rt}else Et.add(se);break e}else{if((p&1)===0){nR(j,Ne,p),Yb();break e}se=Error(n(426))}}else if(Vn&&Q.mode&1){var ar=rR(G);if(ar!==null){(ar.flags&65536)===0&&(ar.flags|=256),iR(ar,G,Q,j,p),ob(lu(se,Q));break e}}j=se=lu(se,Q),pr!==4&&(pr=2),Vf===null?Vf=[j]:Vf.push(j),j=G;do{switch(j.tag){case 3:j.flags|=65536,p&=-p,j.lanes|=p;var xe=eR(j,se,p);A3(j,xe);break e;case 1:Q=se;var le=j.type,Me=j.stateNode;if((j.flags&128)===0&&(typeof le.getDerivedStateFromError=="function"||Me!==null&&typeof Me.componentDidCatch=="function"&&(Lo===null||!Lo.has(Me)))){j.flags|=65536,p&=-p,j.lanes|=p;var et=tR(j,Q,p);A3(j,et);break e}}j=j.return}while(j!==null)}DR(x)}catch(Ot){p=Ot,or===x&&x!==null&&(or=x=x.return);continue}break}while(!0)}function OR(){var u=r0.current;return r0.current=Zm,u===null?Zm:u}function Yb(){(pr===0||pr===3||pr===2)&&(pr=4),Er===null||(Ll&268435455)===0&&(i0&268435455)===0||Bo(Er,Ir)}function u0(u,p){var x=gn;gn|=2;var S=OR();(Er!==u||Ir!==p)&&($s=null,Ul(u,p));do try{gW();break}catch(C){jR(u,C)}while(!0);if(cb(),gn=x,r0.current=S,or!==null)throw Error(n(261));return Er=null,Ir=0,pr}function gW(){for(;or!==null;)IR(or)}function vW(){for(;or!==null&&!yn();)IR(or)}function IR(u){var p=FR(u.alternate,u,Fi);u.memoizedProps=u.pendingProps,p===null?DR(u):or=p,zb.current=null}function DR(u){var p=u;do{var x=p.alternate;if(u=p.return,(p.flags&32768)===0){if(x=cW(x,p,Fi),x!==null){or=x;return}}else{if(x=uW(x,p),x!==null){x.flags&=32767,or=x;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{pr=6,or=null;return}}if(p=p.sibling,p!==null){or=p;return}or=p=u}while(p!==null);pr===0&&(pr=5)}function Bl(u,p,x){var S=qt,C=aa.transition;try{aa.transition=null,qt=1,yW(u,p,x,S)}finally{aa.transition=C,qt=S}return null}function yW(u,p,x,S){do fu();while(Fo!==null);if((gn&6)!==0)throw Error(n(327));x=u.finishedWork;var C=u.finishedLanes;if(x===null)return null;if(u.finishedWork=null,u.finishedLanes=0,x===u.current)throw Error(n(177));u.callbackNode=null,u.callbackPriority=0;var j=x.lanes|x.childLanes;if(So(u,j),u===Er&&(or=Er=null,Ir=0),(x.subtreeFlags&2064)===0&&(x.flags&2064)===0||s0||(s0=!0,UR(be,function(){return fu(),null})),j=(x.flags&15990)!==0,(x.subtreeFlags&15990)!==0||j){j=aa.transition,aa.transition=null;var G=qt;qt=1;var Q=gn;gn|=4,zb.current=null,fW(u,x),ER(x,u),F7(Yx),wm=!!Kx,Yx=Kx=null,u.current=x,hW(x),$r(),gn=Q,qt=G,aa.transition=j}else u.current=x;if(s0&&(s0=!1,Fo=u,o0=C),j=u.pendingLanes,j===0&&(Lo=null),Ke(x.stateNode),Ei(u,X()),p!==null)for(S=u.onRecoverableError,x=0;x<p.length;x++)C=p[x],S(C.value,{componentStack:C.stack,digest:C.digest});if(a0)throw a0=!1,u=Hb,Hb=null,u;return(o0&1)!==0&&u.tag!==0&&fu(),j=u.pendingLanes,(j&1)!==0?u===Gb?Hf++:(Hf=0,Gb=u):Hf=0,Oo(),null}function fu(){if(Fo!==null){var u=Ma(o0),p=aa.transition,x=qt;try{if(aa.transition=null,qt=16>u?16:u,Fo===null)var S=!1;else{if(u=Fo,Fo=null,o0=0,(gn&6)!==0)throw Error(n(331));var C=gn;for(gn|=4,wt=u.current;wt!==null;){var j=wt,G=j.child;if((wt.flags&16)!==0){var Q=j.deletions;if(Q!==null){for(var se=0;se<Q.length;se++){var Ne=Q[se];for(wt=Ne;wt!==null;){var Ve=wt;switch(Ve.tag){case 0:case 11:case 15:zf(8,Ve,j)}var We=Ve.child;if(We!==null)We.return=Ve,wt=We;else for(;wt!==null;){Ve=wt;var Be=Ve.sibling,gt=Ve.return;if(bR(Ve),Ve===Ne){wt=null;break}if(Be!==null){Be.return=gt,wt=Be;break}wt=gt}}}var Et=j.alternate;if(Et!==null){var Rt=Et.child;if(Rt!==null){Et.child=null;do{var ar=Rt.sibling;Rt.sibling=null,Rt=ar}while(Rt!==null)}}wt=j}}if((j.subtreeFlags&2064)!==0&&G!==null)G.return=j,wt=G;else e:for(;wt!==null;){if(j=wt,(j.flags&2048)!==0)switch(j.tag){case 0:case 11:case 15:zf(9,j,j.return)}var xe=j.sibling;if(xe!==null){xe.return=j.return,wt=xe;break e}wt=j.return}}var le=u.current;for(wt=le;wt!==null;){G=wt;var Me=G.child;if((G.subtreeFlags&2064)!==0&&Me!==null)Me.return=G,wt=Me;else e:for(G=le;wt!==null;){if(Q=wt,(Q.flags&2048)!==0)try{switch(Q.tag){case 0:case 11:case 15:n0(9,Q)}}catch(Ot){Qn(Q,Q.return,Ot)}if(Q===G){wt=null;break e}var et=Q.sibling;if(et!==null){et.return=Q.return,wt=et;break e}wt=Q.return}}if(gn=C,Oo(),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(it,u)}catch{}S=!0}return S}finally{qt=x,aa.transition=p}}return!1}function kR(u,p,x){p=lu(x,p),p=eR(u,p,1),u=Do(u,p,1),p=ni(),u!==null&&(Ii(u,1,p),Ei(u,p))}function Qn(u,p,x){if(u.tag===3)kR(u,u,x);else for(;p!==null;){if(p.tag===3){kR(p,u,x);break}else if(p.tag===1){var S=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Lo===null||!Lo.has(S))){u=lu(x,u),u=tR(p,u,1),p=Do(p,u,1),u=ni(),p!==null&&(Ii(p,1,u),Ei(p,u));break}}p=p.return}}function xW(u,p,x){var S=u.pingCache;S!==null&&S.delete(p),p=ni(),u.pingedLanes|=u.suspendedLanes&x,Er===u&&(Ir&x)===x&&(pr===4||pr===3&&(Ir&130023424)===Ir&&500>X()-Vb?Ul(u,0):$b|=x),Ei(u,p)}function LR(u,p){p===0&&((u.mode&1)===0?p=1:(p=Tn,Tn<<=1,(Tn&130023424)===0&&(Tn=4194304)));var x=ni();u=Us(u,p),u!==null&&(Ii(u,p,x),Ei(u,x))}function bW(u){var p=u.memoizedState,x=0;p!==null&&(x=p.retryLane),LR(u,x)}function wW(u,p){var x=0;switch(u.tag){case 13:var S=u.stateNode,C=u.memoizedState;C!==null&&(x=C.retryLane);break;case 19:S=u.stateNode;break;default:throw Error(n(314))}S!==null&&S.delete(p),LR(u,x)}var FR;FR=function(u,p,x){if(u!==null)if(u.memoizedProps!==p.pendingProps||wi.current)Si=!0;else{if((u.lanes&x)===0&&(p.flags&128)===0)return Si=!1,lW(u,p,x);Si=(u.flags&131072)!==0}else Si=!1,Vn&&(p.flags&1048576)!==0&&v3(p,Um,p.index);switch(p.lanes=0,p.tag){case 2:var S=p.type;e0(u,p),u=p.pendingProps;var C=eu(p,Vr.current);su(p,x),C=bb(null,p,S,u,C,x);var j=wb();return p.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,_i(S)?(j=!0,km(p)):j=!1,p.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,hb(p),C.updater=Jm,p.stateNode=C,C._reactInternals=p,Ab(p,S,u,x),p=Rb(null,p,S,!0,j,x)):(p.tag=0,Vn&&j&&rb(p),ti(null,p,C,x),p=p.child),p;case 16:S=p.elementType;e:{switch(e0(u,p),u=p.pendingProps,C=S._init,S=C(S._payload),p.type=S,C=p.tag=SW(S),u=Aa(S,u),C){case 0:p=Cb(null,p,S,u,x);break e;case 1:p=uR(null,p,S,u,x);break e;case 11:p=aR(null,p,S,u,x);break e;case 14:p=sR(null,p,S,Aa(S.type,u),x);break e}throw Error(n(306,S,""))}return p;case 0:return S=p.type,C=p.pendingProps,C=p.elementType===S?C:Aa(S,C),Cb(u,p,S,C,x);case 1:return S=p.type,C=p.pendingProps,C=p.elementType===S?C:Aa(S,C),uR(u,p,S,C,x);case 3:e:{if(dR(p),u===null)throw Error(n(387));S=p.pendingProps,j=p.memoizedState,C=j.element,T3(u,p),Gm(p,S,null,x);var G=p.memoizedState;if(S=G.element,j.isDehydrated)if(j={element:S,isDehydrated:!1,cache:G.cache,pendingSuspenseBoundaries:G.pendingSuspenseBoundaries,transitions:G.transitions},p.updateQueue.baseState=j,p.memoizedState=j,p.flags&256){C=lu(Error(n(423)),p),p=fR(u,p,S,x,C);break e}else if(S!==C){C=lu(Error(n(424)),p),p=fR(u,p,S,x,C);break e}else for(Li=Co(p.stateNode.containerInfo.firstChild),ki=p,Vn=!0,Ta=null,x=M3(p,null,S,x),p.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling;else{if(ru(),S===C){p=zs(u,p,x);break e}ti(u,p,S,x)}p=p.child}return p;case 5:return P3(p),u===null&&sb(p),S=p.type,C=p.pendingProps,j=u!==null?u.memoizedProps:null,G=C.children,Zx(S,C)?G=null:j!==null&&Zx(S,j)&&(p.flags|=32),cR(u,p),ti(u,p,G,x),p.child;case 6:return u===null&&sb(p),null;case 13:return hR(u,p,x);case 4:return pb(p,p.stateNode.containerInfo),S=p.pendingProps,u===null?p.child=iu(p,null,S,x):ti(u,p,S,x),p.child;case 11:return S=p.type,C=p.pendingProps,C=p.elementType===S?C:Aa(S,C),aR(u,p,S,C,x);case 7:return ti(u,p,p.pendingProps,x),p.child;case 8:return ti(u,p,p.pendingProps.children,x),p.child;case 12:return ti(u,p,p.pendingProps.children,x),p.child;case 10:e:{if(S=p.type._context,C=p.pendingProps,j=p.memoizedProps,G=C.value,In($m,S._currentValue),S._currentValue=G,j!==null)if(Ea(j.value,G)){if(j.children===C.children&&!wi.current){p=zs(u,p,x);break e}}else for(j=p.child,j!==null&&(j.return=p);j!==null;){var Q=j.dependencies;if(Q!==null){G=j.child;for(var se=Q.firstContext;se!==null;){if(se.context===S){if(j.tag===1){se=Bs(-1,x&-x),se.tag=2;var Ne=j.updateQueue;if(Ne!==null){Ne=Ne.shared;var Ve=Ne.pending;Ve===null?se.next=se:(se.next=Ve.next,Ve.next=se),Ne.pending=se}}j.lanes|=x,se=j.alternate,se!==null&&(se.lanes|=x),db(j.return,x,p),Q.lanes|=x;break}se=se.next}}else if(j.tag===10)G=j.type===p.type?null:j.child;else if(j.tag===18){if(G=j.return,G===null)throw Error(n(341));G.lanes|=x,Q=G.alternate,Q!==null&&(Q.lanes|=x),db(G,x,p),G=j.sibling}else G=j.child;if(G!==null)G.return=j;else for(G=j;G!==null;){if(G===p){G=null;break}if(j=G.sibling,j!==null){j.return=G.return,G=j;break}G=G.return}j=G}ti(u,p,C.children,x),p=p.child}return p;case 9:return C=p.type,S=p.pendingProps.children,su(p,x),C=ra(C),S=S(C),p.flags|=1,ti(u,p,S,x),p.child;case 14:return S=p.type,C=Aa(S,p.pendingProps),C=Aa(S.type,C),sR(u,p,S,C,x);case 15:return oR(u,p,p.type,p.pendingProps,x);case 17:return S=p.type,C=p.pendingProps,C=p.elementType===S?C:Aa(S,C),e0(u,p),p.tag=1,_i(S)?(u=!0,km(p)):u=!1,su(p,x),J3(p,S,C),Ab(p,S,C,x),Rb(null,p,S,!0,u,x);case 19:return mR(u,p,x);case 22:return lR(u,p,x)}throw Error(n(156,p.tag))};function UR(u,p){return Gn(u,p)}function _W(u,p,x,S){this.tag=u,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sa(u,p,x,S){return new _W(u,p,x,S)}function Zb(u){return u=u.prototype,!(!u||!u.isReactComponent)}function SW(u){if(typeof u=="function")return Zb(u)?1:0;if(u!=null){if(u=u.$$typeof,u===L)return 11;if(u===U)return 14}return 2}function zo(u,p){var x=u.alternate;return x===null?(x=sa(u.tag,p,u.key,u.mode),x.elementType=u.elementType,x.type=u.type,x.stateNode=u.stateNode,x.alternate=u,u.alternate=x):(x.pendingProps=p,x.type=u.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=u.flags&14680064,x.childLanes=u.childLanes,x.lanes=u.lanes,x.child=u.child,x.memoizedProps=u.memoizedProps,x.memoizedState=u.memoizedState,x.updateQueue=u.updateQueue,p=u.dependencies,x.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},x.sibling=u.sibling,x.index=u.index,x.ref=u.ref,x}function d0(u,p,x,S,C,j){var G=2;if(S=u,typeof u=="function")Zb(u)&&(G=1);else if(typeof u=="string")G=5;else e:switch(u){case N:return zl(x.children,C,j,p);case P:G=8,C|=8;break;case R:return u=sa(12,x,p,C|2),u.elementType=R,u.lanes=j,u;case q:return u=sa(13,x,p,C),u.elementType=q,u.lanes=j,u;case I:return u=sa(19,x,p,C),u.elementType=I,u.lanes=j,u;case V:return f0(x,C,j,p);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case F:G=10;break e;case D:G=9;break e;case L:G=11;break e;case U:G=14;break e;case k:G=16,S=null;break e}throw Error(n(130,u==null?u:typeof u,""))}return p=sa(G,x,p,C),p.elementType=u,p.type=S,p.lanes=j,p}function zl(u,p,x,S){return u=sa(7,u,S,p),u.lanes=x,u}function f0(u,p,x,S){return u=sa(22,u,S,p),u.elementType=V,u.lanes=x,u.stateNode={isHidden:!1},u}function Jb(u,p,x){return u=sa(6,u,null,p),u.lanes=x,u}function Qb(u,p,x){return p=sa(4,u.children!==null?u.children:[],u.key,p),p.lanes=x,p.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},p}function MW(u,p,x,S,C){this.tag=p,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bi(0),this.expirationTimes=bi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bi(0),this.identifierPrefix=S,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function e1(u,p,x,S,C,j,G,Q,se){return u=new MW(u,p,x,Q,se),p===1?(p=1,j===!0&&(p|=8)):p=0,j=sa(3,null,null,p),u.current=j,j.stateNode=u,j.memoizedState={element:S,isDehydrated:x,cache:null,transitions:null,pendingSuspenseBoundaries:null},hb(j),u}function EW(u,p,x){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:S==null?null:""+S,children:u,containerInfo:p,implementation:x}}function BR(u){if(!u)return jo;u=u._reactInternals;e:{if(xt(u)!==u||u.tag!==1)throw Error(n(170));var p=u;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(_i(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(n(171))}if(u.tag===1){var x=u.type;if(_i(x))return p3(u,x,p)}return p}function zR(u,p,x,S,C,j,G,Q,se){return u=e1(x,S,!0,u,C,j,G,Q,se),u.context=BR(null),x=u.current,S=ni(),C=Uo(x),j=Bs(S,C),j.callback=p??null,Do(x,j,C),u.current.lanes=C,Ii(u,C,S),Ei(u,S),u}function h0(u,p,x,S){var C=p.current,j=ni(),G=Uo(C);return x=BR(x),p.context===null?p.context=x:p.pendingContext=x,p=Bs(j,G),p.payload={element:u},S=S===void 0?null:S,S!==null&&(p.callback=S),u=Do(C,p,G),u!==null&&(Ca(u,C,G,j),Hm(u,C,G)),G}function p0(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return u.child.stateNode;default:return u.child.stateNode}}function $R(u,p){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var x=u.retryLane;u.retryLane=x!==0&&x<p?x:p}}function t1(u,p){$R(u,p),(u=u.alternate)&&$R(u,p)}function TW(){return null}var VR=typeof reportError=="function"?reportError:function(u){console.error(u)};function n1(u){this._internalRoot=u}m0.prototype.render=n1.prototype.render=function(u){var p=this._internalRoot;if(p===null)throw Error(n(409));h0(u,p,null,null)},m0.prototype.unmount=n1.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var p=u.containerInfo;Fl(function(){h0(null,u,null,null)}),p[Ds]=null}};function m0(u){this._internalRoot=u}m0.prototype.unstable_scheduleHydration=function(u){if(u){var p=pf();u={blockedOn:null,target:u,priority:p};for(var x=0;x<Ao.length&&p!==0&&p<Ao[x].priority;x++);Ao.splice(x,0,u),x===0&&PC(u)}};function r1(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function g0(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function HR(){}function AW(u,p,x,S,C){if(C){if(typeof S=="function"){var j=S;S=function(){var Ne=p0(G);j.call(Ne)}}var G=zR(p,S,u,0,null,!1,!1,"",HR);return u._reactRootContainer=G,u[Ds]=G.current,Nf(u.nodeType===8?u.parentNode:u),Fl(),G}for(;C=u.lastChild;)u.removeChild(C);if(typeof S=="function"){var Q=S;S=function(){var Ne=p0(se);Q.call(Ne)}}var se=e1(u,0,!1,null,null,!1,!1,"",HR);return u._reactRootContainer=se,u[Ds]=se.current,Nf(u.nodeType===8?u.parentNode:u),Fl(function(){h0(p,se,x,S)}),se}function v0(u,p,x,S,C){var j=x._reactRootContainer;if(j){var G=j;if(typeof C=="function"){var Q=C;C=function(){var se=p0(G);Q.call(se)}}h0(p,G,u,C)}else G=AW(x,p,u,C,S);return p0(G)}ir=function(u){switch(u.tag){case 3:var p=u.stateNode;if(p.current.memoizedState.isDehydrated){var x=fn(p.pendingLanes);x!==0&&(_n(p,x|1),Ei(p,X()),(gn&6)===0&&(du=X()+500,Oo()))}break;case 13:Fl(function(){var S=Us(u,1);if(S!==null){var C=ni();Ca(S,u,1,C)}}),t1(u,1)}},ea=function(u){if(u.tag===13){var p=Us(u,134217728);if(p!==null){var x=ni();Ca(p,u,134217728,x)}t1(u,134217728)}},Is=function(u){if(u.tag===13){var p=Uo(u),x=Us(u,p);if(x!==null){var S=ni();Ca(x,u,p,S)}t1(u,p)}},pf=function(){return qt},AC=function(u,p){var x=qt;try{return qt=u,p()}finally{qt=x}},Re=function(u,p,x){switch(p){case"input":if(kt(u,x),p=x.name,x.type==="radio"&&p!=null){for(x=u;x.parentNode;)x=x.parentNode;for(x=x.querySelectorAll("input[name="+JSON.stringify(""+p)+'][type="radio"]'),p=0;p<x.length;p++){var S=x[p];if(S!==u&&S.form===u.form){var C=Im(S);if(!C)throw Error(n(90));ye(S),kt(S,C)}}}break;case"textarea":z(u,x);break;case"select":p=x.value,p!=null&&zt(u,!!x.multiple,p,!1)}},ht=Xb,Gt=Fl;var NW={usingClientEntryPoint:!1,Events:[Rf,Jc,Im,he,Qe,Xb]},Gf={findFiberByHostInstance:Cl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},PW={bundleType:Gf.bundleType,version:Gf.version,rendererPackageName:Gf.rendererPackageName,rendererConfig:Gf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=sn(u),u===null?null:u.stateNode},findFiberByHostInstance:Gf.findFiberByHostInstance||TW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var y0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!y0.isDisabled&&y0.supportsFiber)try{it=y0.inject(PW),ut=y0}catch{}}return Ti.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NW,Ti.createPortal=function(u,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r1(p))throw Error(n(200));return EW(u,p,null,x)},Ti.createRoot=function(u,p){if(!r1(u))throw Error(n(299));var x=!1,S="",C=VR;return p!=null&&(p.unstable_strictMode===!0&&(x=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onRecoverableError!==void 0&&(C=p.onRecoverableError)),p=e1(u,1,!1,null,null,x,!1,S,C),u[Ds]=p.current,Nf(u.nodeType===8?u.parentNode:u),new n1(p)},Ti.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var p=u._reactInternals;if(p===void 0)throw typeof u.render=="function"?Error(n(188)):(u=Object.keys(u).join(","),Error(n(268,u)));return u=sn(p),u=u===null?null:u.stateNode,u},Ti.flushSync=function(u){return Fl(u)},Ti.hydrate=function(u,p,x){if(!g0(p))throw Error(n(200));return v0(null,u,p,!0,x)},Ti.hydrateRoot=function(u,p,x){if(!r1(u))throw Error(n(405));var S=x!=null&&x.hydratedSources||null,C=!1,j="",G=VR;if(x!=null&&(x.unstable_strictMode===!0&&(C=!0),x.identifierPrefix!==void 0&&(j=x.identifierPrefix),x.onRecoverableError!==void 0&&(G=x.onRecoverableError)),p=zR(p,null,u,1,x??null,C,!1,j,G),u[Ds]=p.current,Nf(u),S)for(u=0;u<S.length;u++)x=S[u],C=x._getVersion,C=C(x._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[x,C]:p.mutableSourceEagerHydrationData.push(x,C);return new m0(p)},Ti.render=function(u,p,x){if(!g0(p))throw Error(n(200));return v0(null,u,p,!1,x)},Ti.unmountComponentAtNode=function(u){if(!g0(u))throw Error(n(40));return u._reactRootContainer?(Fl(function(){v0(null,null,u,!1,function(){u._reactRootContainer=null,u[Ds]=null})}),!0):!1},Ti.unstable_batchedUpdates=Xb,Ti.unstable_renderSubtreeIntoContainer=function(u,p,x,S){if(!g0(x))throw Error(n(200));if(u==null||u._reactInternals===void 0)throw Error(n(38));return v0(u,p,x,!1,S)},Ti.version="18.3.1-next-f1338f8080-20240426",Ti}var JR;function K8(){if(JR)return s1.exports;JR=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),s1.exports=LW(),s1.exports}var QR;function FW(){if(QR)return b0;QR=1;var t=K8();return b0.createRoot=t.createRoot,b0.hydrateRoot=t.hydrateRoot,b0}var UW=FW(),O=KA();const K=Mn(O),Y8=RW({__proto__:null,default:K},[O]);/**
* react-router v7.13.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var Z8=t=>{throw TypeError(t)},BW=(t,e,n)=>e.has(t)||Z8("Cannot "+n),c1=(t,e,n)=>(BW(t,e,"read from private field"),n?n.call(t):e.get(t)),zW=(t,e,n)=>e.has(t)?Z8("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),e5="popstate";function $W(t={}){function e(r,i){let{pathname:a,search:s,hash:o}=r.location;return qh("",{pathname:a,search:s,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ws(i)}return HW(e,n,null,t)}function un(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function dr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function VW(){return Math.random().toString(36).substring(2,10)}function t5(t,e){return{usr:t.state,key:t.key,idx:e}}function qh(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?_l(e):e,state:n,key:e&&e.key||r||VW()}}function ws({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function _l(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function HW(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,o="POP",c=null,l=h();l==null&&(l=0,s.replaceState({...s.state,idx:l},""));function h(){return(s.state||{idx:null}).idx}function f(){o="POP";let v=h(),w=v==null?null:v-l;l=v,c&&c({action:o,location:y.location,delta:w})}function m(v,w){o="PUSH";let _=qh(y.location,v,w);l=h()+1;let E=t5(_,l),M=y.createHref(_);try{s.pushState(E,"",M)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(M)}a&&c&&c({action:o,location:y.location,delta:1})}function g(v,w){o="REPLACE";let _=qh(y.location,v,w);l=h();let E=t5(_,l),M=y.createHref(_);s.replaceState(E,"",M),a&&c&&c({action:o,location:y.location,delta:0})}function b(v){return J8(v)}let y={get action(){return o},get location(){return t(i,s)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(e5,f),c=v,()=>{i.removeEventListener(e5,f),c=null}},createHref(v){return e(i,v)},createURL:b,encodeLocation(v){let w=b(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:m,replace:g,go(v){return s.go(v)}};return y}function J8(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),un(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:ws(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var bh,n5=class{constructor(t){if(zW(this,bh,new Map),t)for(let[e,n]of t)this.set(e,n)}get(t){if(c1(this,bh).has(t))return c1(this,bh).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,e){c1(this,bh).set(t,e)}};bh=new WeakMap;var GW=new Set(["lazy","caseSensitive","path","id","index","children"]);function WW(t){return GW.has(t)}var qW=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function XW(t){return qW.has(t)}function KW(t){return t.index===!0}function Xh(t,e,n=[],r={},i=!1){return t.map((a,s)=>{let o=[...n,String(s)],c=typeof a.id=="string"?a.id:o.join("-");if(un(a.index!==!0||!a.children,"Cannot specify children on an index route"),un(i||!r[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),KW(a)){let l={...a,id:c};return r[c]=r5(l,e(l)),l}else{let l={...a,id:c,children:void 0};return r[c]=r5(l,e(l)),a.children&&(l.children=Xh(a.children,e,o,r,i)),l}})}function r5(t,e){return Object.assign(t,{...e,...typeof e.lazy=="object"&&e.lazy!=null?{lazy:{...t.lazy,...e.lazy}}:{}})}function nl(t,e,n="/"){return wh(t,e,n,!1)}function wh(t,e,n,r){let i=typeof e=="string"?_l(e):e,a=ya(i.pathname||"/",n);if(a==null)return null;let s=Q8(t);ZW(s);let o=null;for(let c=0;o==null&&c<s.length;++c){let l=lq(a);o=sq(s[c],l,r)}return o}function YW(t,e){let{route:n,pathname:r,params:i}=t;return{id:n.id,pathname:r,params:i,data:e[n.id],loaderData:e[n.id],handle:n.handle}}function Q8(t,e=[],n=[],r="",i=!1){let a=(s,o,c=i,l)=>{let h={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&c)return;un(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let f=hs([r,h.relativePath]),m=n.concat(h);s.children&&s.children.length>0&&(un(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Q8(s.children,e,m,f,c)),!(s.path==null&&!s.index)&&e.push({path:f,score:iq(f,s.index),routesMeta:m})};return t.forEach((s,o)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,o);else for(let l of eB(s.path))a(s,o,!0,l)}),e}function eB(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=eB(r.join("/")),o=[];return o.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&o.push(...s),o.map(c=>t.startsWith("/")&&c===""?"/":c)}function ZW(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:aq(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var JW=/^:[\w-]+$/,QW=3,eq=2,tq=1,nq=10,rq=-2,i5=t=>t==="*";function iq(t,e){let n=t.split("/"),r=n.length;return n.some(i5)&&(r+=rq),e&&(r+=eq),n.filter(i=>!i5(i)).reduce((i,a)=>i+(JW.test(a)?QW:a===""?tq:nq),r)}function aq(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function sq(t,e,n=!1){let{routesMeta:r}=t,i={},a="/",s=[];for(let o=0;o<r.length;++o){let c=r[o],l=o===r.length-1,h=a==="/"?e:e.slice(a.length)||"/",f=Qg({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},h),m=c.route;if(!f&&l&&n&&!r[r.length-1].route.index&&(f=Qg({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!f)return null;Object.assign(i,f.params),s.push({params:i,pathname:hs([a,f.pathname]),pathnameBase:dq(hs([a,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(a=hs([a,f.pathnameBase]))}return s}function Qg(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=oq(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((l,{paramName:h,isOptional:f},m)=>{if(h==="*"){let b=o[m]||"";s=a.slice(0,a.length-b.length).replace(/(.)\/+$/,"$1")}const g=o[m];return f&&!g?l[h]=void 0:l[h]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:a,pathnameBase:s,pattern:t}}function oq(t,e=!1,n=!0){dr(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 r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function lq(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return dr(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function ya(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function cq({basename:t,pathname:e}){return e==="/"?t:hs([t,e])}var tB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,YA=t=>tB.test(t);function uq(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?_l(t):t,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=a5(n.substring(1),"/"):a=a5(n,e)):a=e,{pathname:a,search:fq(r),hash:hq(i)}}function a5(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function u1(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. 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 nB(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function ZA(t){let e=nB(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function JA(t,e,n,r=!1){let i;typeof t=="string"?i=_l(t):(i={...t},un(!i.pathname||!i.pathname.includes("?"),u1("?","pathname","search",i)),un(!i.pathname||!i.pathname.includes("#"),u1("#","pathname","hash",i)),un(!i.search||!i.search.includes("#"),u1("#","search","hash",i)));let a=t===""||i.pathname==="",s=a?"/":i.pathname,o;if(s==null)o=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),f-=1;i.pathname=m.join("/")}o=f>=0?e[f]:"/"}let c=uq(i,o),l=s&&s!=="/"&&s.endsWith("/"),h=(a||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(l||h)&&(c.pathname+="/"),c}var hs=t=>t.join("/").replace(/\/\/+/g,"/"),dq=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),fq=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,hq=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,qp=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Kh(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Xp(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var rB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iB(t,e){let n=t;if(typeof n!="string"||!tB.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(rB)try{let a=new URL(window.location.href),s=n.startsWith("//")?new URL(a.protocol+n):new URL(n),o=ya(s.pathname,e);s.origin===a.origin&&o!=null?n=o+s.search+s.hash:i=!0}catch{dr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var sl=Symbol("Uninstrumented");function pq(t,e){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(i=>i({id:e.id,index:e.index,path:e.path,instrument(a){let s=Object.keys(n);for(let o of s)a[o]&&n[o].push(a[o])}}));let r={};if(typeof e.lazy=="function"&&n.lazy.length>0){let i=zu(n.lazy,e.lazy,()=>{});i&&(r.lazy=i)}if(typeof e.lazy=="object"){let i=e.lazy;["middleware","loader","action"].forEach(a=>{let s=i[a],o=n[`lazy.${a}`];if(typeof s=="function"&&o.length>0){let c=zu(o,s,()=>{});c&&(r.lazy=Object.assign(r.lazy||{},{[a]:c}))}})}return["loader","action"].forEach(i=>{let a=e[i];if(typeof a=="function"&&n[i].length>0){let s=a[sl]??a,o=zu(n[i],s,(...c)=>s5(c[0]));o&&(i==="loader"&&s.hydrate===!0&&(o.hydrate=!0),o[sl]=s,r[i]=o)}}),e.middleware&&e.middleware.length>0&&n.middleware.length>0&&(r.middleware=e.middleware.map(i=>{let a=i[sl]??i,s=zu(n.middleware,a,(...o)=>s5(o[0]));return s?(s[sl]=a,s):i})),r}function mq(t,e){let n={navigate:[],fetch:[]};if(e.forEach(r=>r({instrument(i){let a=Object.keys(i);for(let s of a)i[s]&&n[s].push(i[s])}})),n.navigate.length>0){let r=t.navigate[sl]??t.navigate,i=zu(n.navigate,r,(...a)=>{let[s,o]=a;return{to:typeof s=="number"||typeof s=="string"?s:s?ws(s):".",...o5(t,o??{})}});i&&(i[sl]=r,t.navigate=i)}if(n.fetch.length>0){let r=t.fetch[sl]??t.fetch,i=zu(n.fetch,r,(...a)=>{let[s,,o,c]=a;return{href:o??".",fetcherKey:s,...o5(t,c??{})}});i&&(i[sl]=r,t.fetch=i)}return t}function zu(t,e,n){return t.length===0?null:async(...r)=>{let i=await aB(t,n(...r),()=>e(...r),t.length-1);if(i.type==="error")throw i.value;return i.value}}async function aB(t,e,n,r){let i=t[r],a;if(i){let s,o=async()=>(s?console.error("You cannot call instrumented handlers more than once"):s=aB(t,e,n,r-1),a=await s,un(a,"Expected a result"),a.type==="error"&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await i(o,e)}catch(c){console.error("An instrumentation function threw an error:",c)}s||await o(),await s}else try{a={type:"success",value:await n()}}catch(s){a={type:"error",value:s}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function s5(t){let{request:e,context:n,params:r,unstable_pattern:i}=t;return{request:gq(e),params:{...r},unstable_pattern:i,context:vq(n)}}function o5(t,e){return{currentUrl:ws(t.state.location),..."formMethod"in e?{formMethod:e.formMethod}:{},..."formEncType"in e?{formEncType:e.formEncType}:{},..."formData"in e?{formData:e.formData}:{},..."body"in e?{body:e.body}:{}}}function gq(t){return{method:t.method,url:t.url,headers:{get:(...e)=>t.headers.get(...e)}}}function vq(t){if(xq(t)){let e={...t};return Object.freeze(e),e}else return{get:e=>t.get(e)}}var yq=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function xq(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null||Object.getOwnPropertyNames(e).sort().join("\0")===yq}var sB=["POST","PUT","PATCH","DELETE"],bq=new Set(sB),wq=["GET",...sB],_q=new Set(wq),oB=new Set([301,302,303,307,308]),Sq=new Set([307,308]),d1={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mq={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qf={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Eq=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),lB="remix-router-transitions",cB=Symbol("ResetLoaderData");function Tq(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";un(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],i=t.mapRouteProperties||Eq,a=i;if(t.unstable_instrumentations){let ee=t.unstable_instrumentations;a=oe=>({...i(oe),...pq(ee.map(Se=>Se.route).filter(Boolean),oe)})}let s={},o=Xh(t.routes,a,void 0,s),c,l=t.basename||"/";l.startsWith("/")||(l=`/${l}`);let h=t.dataStrategy||Rq,f={...t.future},m=null,g=new Set,b=null,y=null,v=null,w=t.hydrationData!=null,_=nl(o,t.history.location,l),E=!1,M=null,T;if(_==null&&!t.patchRoutesOnNavigation){let ee=da(404,{pathname:t.history.location.pathname}),{matches:oe,route:Se}=w0(o);T=!0,_=oe,M={[Se.id]:ee}}else if(_&&!t.hydrationData&&Gt(_,o,t.history.location.pathname).active&&(_=null),_)if(_.some(ee=>ee.route.lazy))T=!1;else if(!_.some(ee=>QA(ee.route)))T=!0;else{let ee=t.hydrationData?t.hydrationData.loaderData:null,oe=t.hydrationData?t.hydrationData.errors:null;if(oe){let Se=_.findIndex(De=>oe[De.route.id]!==void 0);T=_.slice(0,Se+1).every(De=>!zM(De.route,ee,oe))}else T=_.every(Se=>!zM(Se.route,ee,oe))}else{T=!1,_=[];let ee=Gt(null,o,t.history.location.pathname);ee.active&&ee.matches&&(E=!0,_=ee.matches)}let A,N={historyAction:t.history.action,location:t.history.location,matches:_,initialized:T,navigation:d1,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||M,fetchers:new Map,blockers:new Map},P="POP",R=null,F=!1,D,L=!1,q=new Map,I=null,U=!1,k=!1,V=new Set,$=new Map,Y=0,J=-1,W=new Map,H=new Set,te=new Map,we=new Map,Ae=new Set,ne=new Map,de,pe=null;function fe(){if(m=t.history.listen(({action:ee,location:oe,delta:Se})=>{if(de){de(),de=void 0;return}dr(ne.size===0||Se!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let De=Ie({currentLocation:N.location,nextLocation:oe,historyAction:ee});if(De&&Se!=null){let Ge=new Promise(Mt=>{de=Mt});t.history.go(Se*-1),Re(De,{state:"blocked",location:oe,proceed(){Re(De,{state:"proceeding",proceed:void 0,reset:void 0,location:oe}),Ge.then(()=>t.history.go(Se))},reset(){let Mt=new Map(N.blockers);Mt.set(De,qf),ye({blockers:Mt})}}),R==null||R.resolve(),R=null;return}return lt(ee,oe)}),n){Kq(e,q);let ee=()=>Yq(e,q);e.addEventListener("pagehide",ee),I=()=>e.removeEventListener("pagehide",ee)}return N.initialized||lt("POP",N.location,{initialHydration:!0}),A}function ce(){m&&m(),I&&I(),g.clear(),D&&D.abort(),N.fetchers.forEach((ee,oe)=>nt(oe)),N.blockers.forEach((ee,oe)=>ae(oe))}function Ce(ee){return g.add(ee),()=>g.delete(ee)}function ye(ee,oe={}){ee.matches&&(ee.matches=ee.matches.map(Ge=>{let Mt=s[Ge.route.id],It=Ge.route;return It.element!==Mt.element||It.errorElement!==Mt.errorElement||It.hydrateFallbackElement!==Mt.hydrateFallbackElement?{...Ge,route:Mt}:Ge})),N={...N,...ee};let Se=[],De=[];N.fetchers.forEach((Ge,Mt)=>{Ge.state==="idle"&&(Ae.has(Mt)?Se.push(Mt):De.push(Mt))}),Ae.forEach(Ge=>{!N.fetchers.has(Ge)&&!$.has(Ge)&&Se.push(Ge)}),[...g].forEach(Ge=>Ge(N,{deletedFetchers:Se,newErrors:ee.errors??null,viewTransitionOpts:oe.viewTransitionOpts,flushSync:oe.flushSync===!0})),Se.forEach(Ge=>nt(Ge)),De.forEach(Ge=>N.fetchers.delete(Ge))}function Ze(ee,oe,{flushSync:Se}={}){var $t,Ct;let De=N.actionData!=null&&N.navigation.formMethod!=null&&Yr(N.navigation.formMethod)&&N.navigation.state==="loading"&&(($t=ee.state)==null?void 0:$t._isRedirect)!==!0,Ge;oe.actionData?Object.keys(oe.actionData).length>0?Ge=oe.actionData:Ge=null:De?Ge=N.actionData:Ge=null;let Mt=oe.loaderData?v5(N.loaderData,oe.loaderData,oe.matches||[],oe.errors):N.loaderData,It=N.blockers;It.size>0&&(It=new Map(It),It.forEach((Zt,sn)=>It.set(sn,qf)));let mt=U?!1:ht(ee,oe.matches||N.matches),yt=F===!0||N.navigation.formMethod!=null&&Yr(N.navigation.formMethod)&&((Ct=ee.state)==null?void 0:Ct._isRedirect)!==!0;c&&(o=c,c=void 0),U||P==="POP"||(P==="PUSH"?t.history.push(ee,ee.state):P==="REPLACE"&&t.history.replace(ee,ee.state));let xt;if(P==="POP"){let Zt=q.get(N.location.pathname);Zt&&Zt.has(ee.pathname)?xt={currentLocation:N.location,nextLocation:ee}:q.has(ee.pathname)&&(xt={currentLocation:ee,nextLocation:N.location})}else if(L){let Zt=q.get(N.location.pathname);Zt?Zt.add(ee.pathname):(Zt=new Set([ee.pathname]),q.set(N.location.pathname,Zt)),xt={currentLocation:N.location,nextLocation:ee}}ye({...oe,actionData:Ge,loaderData:Mt,historyAction:P,location:ee,initialized:!0,navigation:d1,revalidation:"idle",restoreScrollPosition:mt,preventScrollReset:yt,blockers:It},{viewTransitionOpts:xt,flushSync:Se===!0}),P="POP",F=!1,L=!1,U=!1,k=!1,R==null||R.resolve(),R=null,pe==null||pe.resolve(),pe=null}async function tt(ee,oe){if(R==null||R.resolve(),R=null,typeof ee=="number"){R||(R=w5());let sn=R.promise;return t.history.go(ee),sn}let Se=BM(N.location,N.matches,l,ee,oe==null?void 0:oe.fromRouteId,oe==null?void 0:oe.relative),{path:De,submission:Ge,error:Mt}=l5(!1,Se,oe),It=N.location,mt=qh(N.location,De,oe&&oe.state);mt={...mt,...t.history.encodeLocation(mt)};let yt=oe&&oe.replace!=null?oe.replace:void 0,xt="PUSH";yt===!0?xt="REPLACE":yt===!1||Ge!=null&&Yr(Ge.formMethod)&&Ge.formAction===N.location.pathname+N.location.search&&(xt="REPLACE");let $t=oe&&"preventScrollReset"in oe?oe.preventScrollReset===!0:void 0,Ct=(oe&&oe.flushSync)===!0,Zt=Ie({currentLocation:It,nextLocation:mt,historyAction:xt});if(Zt){Re(Zt,{state:"blocked",location:mt,proceed(){Re(Zt,{state:"proceeding",proceed:void 0,reset:void 0,location:mt}),tt(ee,oe)},reset(){let sn=new Map(N.blockers);sn.set(Zt,qf),ye({blockers:sn})}});return}await lt(xt,mt,{submission:Ge,pendingError:Mt,preventScrollReset:$t,replace:oe&&oe.replace,enableViewTransition:oe&&oe.viewTransition,flushSync:Ct,callSiteDefaultShouldRevalidate:oe&&oe.unstable_defaultShouldRevalidate})}function St(){pe||(pe=w5()),Pe(),ye({revalidation:"loading"});let ee=pe.promise;return N.navigation.state==="submitting"?ee:N.navigation.state==="idle"?(lt(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),ee):(lt(P||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:L===!0}),ee)}async function lt(ee,oe,Se){D&&D.abort(),D=null,P=ee,U=(Se&&Se.startUninterruptedRevalidation)===!0,Qe(N.location,N.matches),F=(Se&&Se.preventScrollReset)===!0,L=(Se&&Se.enableViewTransition)===!0;let De=c||o,Ge=Se&&Se.overrideNavigation,Mt=Se!=null&&Se.initialHydration&&N.matches&&N.matches.length>0&&!E?N.matches:nl(De,oe,l),It=(Se&&Se.flushSync)===!0;if(Mt&&N.initialized&&!k&&Uq(N.location,oe)&&!(Se&&Se.submission&&Yr(Se.submission.formMethod))){Ze(oe,{matches:Mt},{flushSync:It});return}let mt=Gt(Mt,De,oe.pathname);if(mt.active&&mt.matches&&(Mt=mt.matches),!Mt){let{error:Gn,notFoundMatches:sr,route:yn}=rt(oe.pathname);Ze(oe,{matches:sr,loaderData:{},errors:{[yn.id]:Gn}},{flushSync:It});return}D=new AbortController;let yt=Uu(t.history,oe,D.signal,Se&&Se.submission),xt=t.getContext?await t.getContext():new n5,$t;if(Se&&Se.pendingError)$t=[rl(Mt).route.id,{type:"error",error:Se.pendingError}];else if(Se&&Se.submission&&Yr(Se.submission.formMethod)){let Gn=await kt(yt,oe,Se.submission,Mt,xt,mt.active,Se&&Se.initialHydration===!0,{replace:Se.replace,flushSync:It});if(Gn.shortCircuited)return;if(Gn.pendingActionResult){let[sr,yn]=Gn.pendingActionResult;if(Hi(yn)&&Kh(yn.error)&&yn.error.status===404){D=null,Ze(oe,{matches:Gn.matches,loaderData:{},errors:{[sr]:yn.error}});return}}Mt=Gn.matches||Mt,$t=Gn.pendingActionResult,Ge=f1(oe,Se.submission),It=!1,mt.active=!1,yt=Uu(t.history,yt.url,yt.signal)}let{shortCircuited:Ct,matches:Zt,loaderData:sn,errors:Jn}=await re(yt,oe,Mt,xt,mt.active,Ge,Se&&Se.submission,Se&&Se.fetcherSubmission,Se&&Se.replace,Se&&Se.initialHydration===!0,It,$t,Se&&Se.callSiteDefaultShouldRevalidate);Ct||(D=null,Ze(oe,{matches:Zt||Mt,...y5($t),loaderData:sn,errors:Jn}))}async function kt(ee,oe,Se,De,Ge,Mt,It,mt={}){Pe();let yt=qq(oe,Se);if(ye({navigation:yt},{flushSync:mt.flushSync===!0}),Mt){let Ct=await Qt(De,oe.pathname,ee.signal);if(Ct.type==="aborted")return{shortCircuited:!0};if(Ct.type==="error"){if(Ct.partialMatches.length===0){let{matches:sn,route:Jn}=w0(o);return{matches:sn,pendingActionResult:[Jn.id,{type:"error",error:Ct.error}]}}let Zt=rl(Ct.partialMatches).route.id;return{matches:Ct.partialMatches,pendingActionResult:[Zt,{type:"error",error:Ct.error}]}}else if(Ct.matches)De=Ct.matches;else{let{notFoundMatches:Zt,error:sn,route:Jn}=rt(oe.pathname);return{matches:Zt,pendingActionResult:[Jn.id,{type:"error",error:sn}]}}}let xt,$t=Pg(De,oe);if(!$t.route.action&&!$t.route.lazy)xt={type:"error",error:da(405,{method:ee.method,pathname:oe.pathname,routeId:$t.route.id})};else{let Ct=Yu(a,s,ee,De,$t,It?[]:r,Ge),Zt=await ie(ee,Ct,Ge,null);if(xt=Zt[$t.route.id],!xt){for(let sn of De)if(Zt[sn.route.id]){xt=Zt[sn.route.id];break}}if(ee.signal.aborted)return{shortCircuited:!0}}if(oc(xt)){let Ct;return mt&&mt.replace!=null?Ct=mt.replace:Ct=p5(xt.response.headers.get("Location"),new URL(ee.url),l,t.history)===N.location.pathname+N.location.search,await z(ee,xt,!0,{submission:Se,replace:Ct}),{shortCircuited:!0}}if(Hi(xt)){let Ct=rl(De,$t.route.id);return(mt&&mt.replace)!==!0&&(P="PUSH"),{matches:De,pendingActionResult:[Ct.route.id,xt,$t.route.id]}}return{matches:De,pendingActionResult:[$t.route.id,xt]}}async function re(ee,oe,Se,De,Ge,Mt,It,mt,yt,xt,$t,Ct,Zt){let sn=Mt||f1(oe,It),Jn=It||mt||b5(sn),Gn=!U&&!xt;if(Ge){if(Gn){let pt=Ht(Ct);ye({navigation:sn,...pt!==void 0?{actionData:pt}:{}},{flushSync:$t})}let Ke=await Qt(Se,oe.pathname,ee.signal);if(Ke.type==="aborted")return{shortCircuited:!0};if(Ke.type==="error"){if(Ke.partialMatches.length===0){let{matches:Wt,route:bt}=w0(o);return{matches:Wt,loaderData:{},errors:{[bt.id]:Ke.error}}}let pt=rl(Ke.partialMatches).route.id;return{matches:Ke.partialMatches,loaderData:{},errors:{[pt]:Ke.error}}}else if(Ke.matches)Se=Ke.matches;else{let{error:pt,notFoundMatches:Wt,route:bt}=rt(oe.pathname);return{matches:Wt,loaderData:{},errors:{[bt.id]:pt}}}}let sr=c||o,{dsMatches:yn,revalidatingFetchers:$r}=c5(ee,De,a,s,t.history,N,Se,Jn,oe,xt?[]:r,xt===!0,k,V,Ae,te,H,sr,l,t.patchRoutesOnNavigation!=null,Ct,Zt);if(J=++Y,!t.dataStrategy&&!yn.some(Ke=>Ke.shouldLoad)&&!yn.some(Ke=>Ke.route.middleware&&Ke.route.middleware.length>0)&&$r.length===0){let Ke=ze();return Ze(oe,{matches:Se,loaderData:{},errors:Ct&&Hi(Ct[1])?{[Ct[0]]:Ct[1].error}:null,...y5(Ct),...Ke?{fetchers:new Map(N.fetchers)}:{}},{flushSync:$t}),{shortCircuited:!0}}if(Gn){let Ke={};if(!Ge){Ke.navigation=sn;let pt=Ht(Ct);pt!==void 0&&(Ke.actionData=pt)}$r.length>0&&(Ke.fetchers=Lt($r)),ye(Ke,{flushSync:$t})}$r.forEach(Ke=>{ke(Ke.key),Ke.controller&&$.set(Ke.key,Ke.controller)});let X=()=>$r.forEach(Ke=>ke(Ke.key));D&&D.signal.addEventListener("abort",X);let{loaderResults:ue,fetcherResults:Te}=await Ee(yn,$r,ee,De);if(ee.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",X),$r.forEach(Ke=>$.delete(Ke.key));let ve=_0(ue);if(ve)return await z(ee,ve.result,!0,{replace:yt}),{shortCircuited:!0};if(ve=_0(Te),ve)return H.add(ve.key),await z(ee,ve.result,!0,{replace:yt}),{shortCircuited:!0};let{loaderData:be,errors:ot}=g5(N,Se,ue,Ct,$r,Te);xt&&N.errors&&(ot={...N.errors,...ot});let ct=ze(),it=He(J),ut=ct||it||$r.length>0;return{matches:Se,loaderData:be,errors:ot,...ut?{fetchers:new Map(N.fetchers)}:{}}}function Ht(ee){if(ee&&!Hi(ee[1]))return{[ee[0]]:ee[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function Lt(ee){return ee.forEach(oe=>{let Se=N.fetchers.get(oe.key),De=Xf(void 0,Se?Se.data:void 0);N.fetchers.set(oe.key,De)}),new Map(N.fetchers)}async function zt(ee,oe,Se,De){ke(ee);let Ge=(De&&De.flushSync)===!0,Mt=c||o,It=BM(N.location,N.matches,l,Se,oe,De==null?void 0:De.relative),mt=nl(Mt,It,l),yt=Gt(mt,Mt,It);if(yt.active&&yt.matches&&(mt=yt.matches),!mt){Xe(ee,oe,da(404,{pathname:It}),{flushSync:Ge});return}let{path:xt,submission:$t,error:Ct}=l5(!0,It,De);if(Ct){Xe(ee,oe,Ct,{flushSync:Ge});return}let Zt=t.getContext?await t.getContext():new n5,sn=(De&&De.preventScrollReset)===!0;if($t&&Yr($t.formMethod)){await qe(ee,oe,xt,mt,Zt,yt.active,Ge,sn,$t,De&&De.unstable_defaultShouldRevalidate);return}te.set(ee,{routeId:oe,path:xt}),await Z(ee,oe,xt,mt,Zt,yt.active,Ge,sn,$t)}async function qe(ee,oe,Se,De,Ge,Mt,It,mt,yt,xt){Pe(),te.delete(ee);let $t=N.fetchers.get(ee);ge(ee,Xq(yt,$t),{flushSync:It});let Ct=new AbortController,Zt=Uu(t.history,Se,Ct.signal,yt);if(Mt){let Ft=await Qt(De,new URL(Zt.url).pathname,Zt.signal,ee);if(Ft.type==="aborted")return;if(Ft.type==="error"){Xe(ee,oe,Ft.error,{flushSync:It});return}else if(Ft.matches)De=Ft.matches;else{Xe(ee,oe,da(404,{pathname:Se}),{flushSync:It});return}}let sn=Pg(De,Se);if(!sn.route.action&&!sn.route.lazy){let Ft=da(405,{method:yt.formMethod,pathname:Se,routeId:oe});Xe(ee,oe,Ft,{flushSync:It});return}$.set(ee,Ct);let Jn=Y,Gn=Yu(a,s,Zt,De,sn,r,Ge),sr=await ie(Zt,Gn,Ge,ee),yn=sr[sn.route.id];if(!yn){for(let Ft of Gn)if(sr[Ft.route.id]){yn=sr[Ft.route.id];break}}if(Zt.signal.aborted){$.get(ee)===Ct&&$.delete(ee);return}if(Ae.has(ee)){if(oc(yn)||Hi(yn)){ge(ee,Js(void 0));return}}else{if(oc(yn))if($.delete(ee),J>Jn){ge(ee,Js(void 0));return}else return H.add(ee),ge(ee,Xf(yt)),z(Zt,yn,!1,{fetcherSubmission:yt,preventScrollReset:mt});if(Hi(yn)){Xe(ee,oe,yn.error);return}}let $r=N.navigation.location||N.location,X=Uu(t.history,$r,Ct.signal),ue=c||o,Te=N.navigation.state!=="idle"?nl(ue,N.navigation.location,l):N.matches;un(Te,"Didn't find any matches after fetcher action");let ve=++Y;W.set(ee,ve);let be=Xf(yt,yn.data);N.fetchers.set(ee,be);let{dsMatches:ot,revalidatingFetchers:ct}=c5(X,Ge,a,s,t.history,N,Te,yt,$r,r,!1,k,V,Ae,te,H,ue,l,t.patchRoutesOnNavigation!=null,[sn.route.id,yn],xt);ct.filter(Ft=>Ft.key!==ee).forEach(Ft=>{let wn=Ft.key,Tn=N.fetchers.get(wn),fn=Xf(void 0,Tn?Tn.data:void 0);N.fetchers.set(wn,fn),ke(wn),Ft.controller&&$.set(wn,Ft.controller)}),ye({fetchers:new Map(N.fetchers)});let it=()=>ct.forEach(Ft=>ke(Ft.key));Ct.signal.addEventListener("abort",it);let{loaderResults:ut,fetcherResults:Ke}=await Ee(ot,ct,X,Ge);if(Ct.signal.aborted)return;if(Ct.signal.removeEventListener("abort",it),W.delete(ee),$.delete(ee),ct.forEach(Ft=>$.delete(Ft.key)),N.fetchers.has(ee)){let Ft=Js(yn.data);N.fetchers.set(ee,Ft)}let pt=_0(ut);if(pt)return z(X,pt.result,!1,{preventScrollReset:mt});if(pt=_0(Ke),pt)return H.add(pt.key),z(X,pt.result,!1,{preventScrollReset:mt});let{loaderData:Wt,errors:bt}=g5(N,Te,ut,void 0,ct,Ke);He(ve),N.navigation.state==="loading"&&ve>J?(un(P,"Expected pending action"),D&&D.abort(),Ze(N.navigation.location,{matches:Te,loaderData:Wt,errors:bt,fetchers:new Map(N.fetchers)})):(ye({errors:bt,loaderData:v5(N.loaderData,Wt,Te,bt),fetchers:new Map(N.fetchers)}),k=!1)}async function Z(ee,oe,Se,De,Ge,Mt,It,mt,yt){let xt=N.fetchers.get(ee);ge(ee,Xf(yt,xt?xt.data:void 0),{flushSync:It});let $t=new AbortController,Ct=Uu(t.history,Se,$t.signal);if(Mt){let yn=await Qt(De,new URL(Ct.url).pathname,Ct.signal,ee);if(yn.type==="aborted")return;if(yn.type==="error"){Xe(ee,oe,yn.error,{flushSync:It});return}else if(yn.matches)De=yn.matches;else{Xe(ee,oe,da(404,{pathname:Se}),{flushSync:It});return}}let Zt=Pg(De,Se);$.set(ee,$t);let sn=Y,Jn=Yu(a,s,Ct,De,Zt,r,Ge),sr=(await ie(Ct,Jn,Ge,ee))[Zt.route.id];if($.get(ee)===$t&&$.delete(ee),!Ct.signal.aborted){if(Ae.has(ee)){ge(ee,Js(void 0));return}if(oc(sr))if(J>sn){ge(ee,Js(void 0));return}else{H.add(ee),await z(Ct,sr,!1,{preventScrollReset:mt});return}if(Hi(sr)){Xe(ee,oe,sr.error);return}ge(ee,Js(sr.data))}}async function z(ee,oe,Se,{submission:De,fetcherSubmission:Ge,preventScrollReset:Mt,replace:It}={}){Se||(R==null||R.resolve(),R=null),oe.response.headers.has("X-Remix-Revalidate")&&(k=!0);let mt=oe.response.headers.get("Location");un(mt,"Expected a Location header on the redirect Response"),mt=p5(mt,new URL(ee.url),l,t.history);let yt=qh(N.location,mt,{_isRedirect:!0});if(n){let Jn=!1;if(oe.response.headers.has("X-Remix-Reload-Document"))Jn=!0;else if(YA(mt)){const Gn=J8(mt,!0);Jn=Gn.origin!==e.location.origin||ya(Gn.pathname,l)==null}if(Jn){It?e.location.replace(mt):e.location.assign(mt);return}}D=null;let xt=It===!0||oe.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:$t,formAction:Ct,formEncType:Zt}=N.navigation;!De&&!Ge&&$t&&Ct&&Zt&&(De=b5(N.navigation));let sn=De||Ge;if(Sq.has(oe.response.status)&&sn&&Yr(sn.formMethod))await lt(xt,yt,{submission:{...sn,formAction:mt},preventScrollReset:Mt||F,enableViewTransition:Se?L:void 0});else{let Jn=f1(yt,De);await lt(xt,yt,{overrideNavigation:Jn,fetcherSubmission:Ge,preventScrollReset:Mt||F,enableViewTransition:Se?L:void 0})}}async function ie(ee,oe,Se,De){var It;let Ge,Mt={};try{Ge=await Oq(h,ee,oe,De,Se,!1)}catch(mt){return oe.filter(yt=>yt.shouldLoad).forEach(yt=>{Mt[yt.route.id]={type:"error",error:mt}}),Mt}if(ee.signal.aborted)return Mt;if(!Yr(ee.method))for(let mt of oe){if(((It=Ge[mt.route.id])==null?void 0:It.type)==="error")break;!Ge.hasOwnProperty(mt.route.id)&&!N.loaderData.hasOwnProperty(mt.route.id)&&(!N.errors||!N.errors.hasOwnProperty(mt.route.id))&&mt.shouldCallHandler()&&(Ge[mt.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${mt.route.id}`)})}for(let[mt,yt]of Object.entries(Ge))if(Vq(yt)){let xt=yt.result;Mt[mt]={type:"redirect",response:Lq(xt,ee,mt,oe,l)}}else Mt[mt]=await kq(yt);return Mt}async function Ee(ee,oe,Se,De){let Ge=ie(Se,ee,De,null),Mt=Promise.all(oe.map(async yt=>{if(yt.matches&&yt.match&&yt.request&&yt.controller){let $t=(await ie(yt.request,yt.matches,De,yt.key))[yt.match.route.id];return{[yt.key]:$t}}else return Promise.resolve({[yt.key]:{type:"error",error:da(404,{pathname:yt.path})}})})),It=await Ge,mt=(await Mt).reduce((yt,xt)=>Object.assign(yt,xt),{});return{loaderResults:It,fetcherResults:mt}}function Pe(){k=!0,te.forEach((ee,oe)=>{$.has(oe)&&V.add(oe),ke(oe)})}function ge(ee,oe,Se={}){N.fetchers.set(ee,oe),ye({fetchers:new Map(N.fetchers)},{flushSync:(Se&&Se.flushSync)===!0})}function Xe(ee,oe,Se,De={}){let Ge=rl(N.matches,oe);nt(ee),ye({errors:{[Ge.route.id]:Se},fetchers:new Map(N.fetchers)},{flushSync:(De&&De.flushSync)===!0})}function Le(ee){return we.set(ee,(we.get(ee)||0)+1),Ae.has(ee)&&Ae.delete(ee),N.fetchers.get(ee)||Mq}function ft(ee,oe){ke(ee,oe==null?void 0:oe.reason),ge(ee,Js(null))}function nt(ee){let oe=N.fetchers.get(ee);$.has(ee)&&!(oe&&oe.state==="loading"&&W.has(ee))&&ke(ee),te.delete(ee),W.delete(ee),H.delete(ee),Ae.delete(ee),V.delete(ee),N.fetchers.delete(ee)}function Ue(ee){let oe=(we.get(ee)||0)-1;oe<=0?(we.delete(ee),Ae.add(ee)):we.set(ee,oe),ye({fetchers:new Map(N.fetchers)})}function ke(ee,oe){let Se=$.get(ee);Se&&(Se.abort(oe),$.delete(ee))}function Fe(ee){for(let oe of ee){let Se=Le(oe),De=Js(Se.data);N.fetchers.set(oe,De)}}function ze(){let ee=[],oe=!1;for(let Se of H){let De=N.fetchers.get(Se);un(De,`Expected fetcher: ${Se}`),De.state==="loading"&&(H.delete(Se),ee.push(Se),oe=!0)}return Fe(ee),oe}function He(ee){let oe=[];for(let[Se,De]of W)if(De<ee){let Ge=N.fetchers.get(Se);un(Ge,`Expected fetcher: ${Se}`),Ge.state==="loading"&&(ke(Se),W.delete(Se),oe.push(Se))}return Fe(oe),oe.length>0}function vt(ee,oe){let Se=N.blockers.get(ee)||qf;return ne.get(ee)!==oe&&ne.set(ee,oe),Se}function ae(ee){N.blockers.delete(ee),ne.delete(ee)}function Re(ee,oe){let Se=N.blockers.get(ee)||qf;un(Se.state==="unblocked"&&oe.state==="blocked"||Se.state==="blocked"&&oe.state==="blocked"||Se.state==="blocked"&&oe.state==="proceeding"||Se.state==="blocked"&&oe.state==="unblocked"||Se.state==="proceeding"&&oe.state==="unblocked",`Invalid blocker state transition: ${Se.state} -> ${oe.state}`);let De=new Map(N.blockers);De.set(ee,oe),ye({blockers:De})}function Ie({currentLocation:ee,nextLocation:oe,historyAction:Se}){if(ne.size===0)return;ne.size>1&&dr(!1,"A router only supports one blocker at a time");let De=Array.from(ne.entries()),[Ge,Mt]=De[De.length-1],It=N.blockers.get(Ge);if(!(It&&It.state==="proceeding")&&Mt({currentLocation:ee,nextLocation:oe,historyAction:Se}))return Ge}function rt(ee){let oe=da(404,{pathname:ee}),Se=c||o,{matches:De,route:Ge}=w0(Se);return{notFoundMatches:De,route:Ge,error:oe}}function $e(ee,oe,Se){if(b=ee,v=oe,y=Se||null,!w&&N.navigation===d1){w=!0;let De=ht(N.location,N.matches);De!=null&&ye({restoreScrollPosition:De})}return()=>{b=null,v=null,y=null}}function he(ee,oe){return y&&y(ee,oe.map(De=>YW(De,N.loaderData)))||ee.key}function Qe(ee,oe){if(b&&v){let Se=he(ee,oe);b[Se]=v()}}function ht(ee,oe){if(b){let Se=he(ee,oe),De=b[Se];if(typeof De=="number")return De}return null}function Gt(ee,oe,Se){if(t.patchRoutesOnNavigation)if(ee){if(Object.keys(ee[0].params).length>0)return{active:!0,matches:wh(oe,Se,l,!0)}}else return{active:!0,matches:wh(oe,Se,l,!0)||[]};return{active:!1,matches:null}}async function Qt(ee,oe,Se,De){if(!t.patchRoutesOnNavigation)return{type:"success",matches:ee};let Ge=ee;for(;;){let Mt=c==null,It=c||o,mt=s;try{await t.patchRoutesOnNavigation({signal:Se,path:oe,matches:Ge,fetcherKey:De,patch:($t,Ct)=>{Se.aborted||u5($t,Ct,It,mt,a,!1)}})}catch($t){return{type:"error",error:$t,partialMatches:Ge}}finally{Mt&&!Se.aborted&&(o=[...o])}if(Se.aborted)return{type:"aborted"};let yt=nl(It,oe,l),xt=null;if(yt){if(Object.keys(yt[0].params).length===0)return{type:"success",matches:yt};if(xt=wh(It,oe,l,!0),!(xt&&Ge.length<xt.length&&mn(Ge,xt.slice(0,Ge.length))))return{type:"success",matches:yt}}if(xt||(xt=wh(It,oe,l,!0)),!xt||mn(Ge,xt))return{type:"success",matches:null};Ge=xt}}function mn(ee,oe){return ee.length===oe.length&&ee.every((Se,De)=>Se.route.id===oe[De].route.id)}function En(ee){s={},c=Xh(ee,a,void 0,s)}function Oi(ee,oe,Se=!1){let De=c==null;u5(ee,oe,c||o,s,a,Se),De&&(o=[...o],ye({}))}return A={get basename(){return l},get future(){return f},get state(){return N},get routes(){return o},get window(){return e},initialize:fe,subscribe:Ce,enableScrollRestoration:$e,navigate:tt,fetch:zt,revalidate:St,createHref:ee=>t.history.createHref(ee),encodeLocation:ee=>t.history.encodeLocation(ee),getFetcher:Le,resetFetcher:ft,deleteFetcher:Ue,dispose:ce,getBlocker:vt,deleteBlocker:ae,patchRoutes:Oi,_internalFetchControllers:$,_internalSetRoutes:En,_internalSetStateDoNotUseOrYouWillBreakYourApp(ee){ye(ee)}},t.unstable_instrumentations&&(A=mq(A,t.unstable_instrumentations.map(ee=>ee.router).filter(Boolean))),A}function Aq(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function BM(t,e,n,r,i,a){let s,o;if(i){s=[];for(let l of e)if(s.push(l),l.route.id===i){o=l;break}}else s=e,o=e[e.length-1];let c=JA(r||".",ZA(s),ya(t.pathname,n)||t.pathname,a==="path");if(r==null&&(c.search=t.search,c.hash=t.hash),(r==null||r===""||r===".")&&o){let l=tN(c.search);if(o.route.index&&!l)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!o.route.index&&l){let h=new URLSearchParams(c.search),f=h.getAll("index");h.delete("index"),f.filter(g=>g).forEach(g=>h.append("index",g));let m=h.toString();c.search=m?`?${m}`:""}}return n!=="/"&&(c.pathname=cq({basename:n,pathname:c.pathname})),ws(c)}function l5(t,e,n){if(!n||!Aq(n))return{path:e};if(n.formMethod&&!Wq(n.formMethod))return{path:e,error:da(405,{method:n.formMethod})};let r=()=>({path:e,error:da(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),s=mB(e);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Yr(a))return r();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((m,[g,b])=>`${m}${g}=${b}
`,""):String(n.body);return{path:e,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Yr(a))return r();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:e,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return r()}}}un(typeof FormData=="function","FormData is not available in this environment");let o,c;if(n.formData)o=VM(n.formData),c=n.formData;else if(n.body instanceof FormData)o=VM(n.body),c=n.body;else if(n.body instanceof URLSearchParams)o=n.body,c=m5(o);else if(n.body==null)o=new URLSearchParams,c=new FormData;else try{o=new URLSearchParams(n.body),c=m5(o)}catch{return r()}let l={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Yr(l.formMethod))return{path:e,submission:l};let h=_l(e);return t&&h.search&&tN(h.search)&&o.append("index",""),h.search=`?${o}`,{path:ws(h),submission:l}}function c5(t,e,n,r,i,a,s,o,c,l,h,f,m,g,b,y,v,w,_,E,M){var U;let T=E?Hi(E[1])?E[1].error:E[1].data:void 0,A=i.createURL(a.location),N=i.createURL(c),P;if(h&&a.errors){let k=Object.keys(a.errors)[0];P=s.findIndex(V=>V.route.id===k)}else if(E&&Hi(E[1])){let k=E[0];P=s.findIndex(V=>V.route.id===k)-1}let R=E?E[1].statusCode:void 0,F=R&&R>=400,D={currentUrl:A,currentParams:((U=a.matches[0])==null?void 0:U.params)||{},nextUrl:N,nextParams:s[0].params,...o,actionResult:T,actionStatus:R},L=Xp(s),q=s.map((k,V)=>{let{route:$}=k,Y=null;if(P!=null&&V>P?Y=!1:$.lazy?Y=!0:QA($)?h?Y=zM($,a.loaderData,a.errors):Nq(a.loaderData,a.matches[V],k)&&(Y=!0):Y=!1,Y!==null)return $M(n,r,t,L,k,l,e,Y);let J=!1;typeof M=="boolean"?J=M:F?J=!1:(f||A.pathname+A.search===N.pathname+N.search||A.search!==N.search||Pq(a.matches[V],k))&&(J=!0);let W={...D,defaultShouldRevalidate:J},H=Rh(k,W);return $M(n,r,t,L,k,l,e,H,W,M)}),I=[];return b.forEach((k,V)=>{if(h||!s.some(Ae=>Ae.route.id===k.routeId)||g.has(V))return;let $=a.fetchers.get(V),Y=$&&$.state!=="idle"&&$.data===void 0,J=nl(v,k.path,w);if(!J){if(_&&Y)return;I.push({key:V,routeId:k.routeId,path:k.path,matches:null,match:null,request:null,controller:null});return}if(y.has(V))return;let W=Pg(J,k.path),H=new AbortController,te=Uu(i,k.path,H.signal),we=null;if(m.has(V))m.delete(V),we=Yu(n,r,te,J,W,l,e);else if(Y)f&&(we=Yu(n,r,te,J,W,l,e));else{let Ae;typeof M=="boolean"?Ae=M:F?Ae=!1:Ae=f;let ne={...D,defaultShouldRevalidate:Ae};Rh(W,ne)&&(we=Yu(n,r,te,J,W,l,e,ne))}we&&I.push({key:V,routeId:k.routeId,path:k.path,matches:we,match:W,request:te,controller:H})}),{dsMatches:q,revalidatingFetchers:I}}function QA(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function zM(t,e,n){if(t.lazy)return!0;if(!QA(t))return!1;let r=e!=null&&t.id in e,i=n!=null&&n[t.id]!==void 0;return!r&&i?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!i}function Nq(t,e,n){let r=!e||n.route.id!==e.route.id,i=!t.hasOwnProperty(n.route.id);return r||i}function Pq(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function Rh(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function u5(t,e,n,r,i,a){let s;if(t){let l=r[t];un(l,`No route found to patch children into: routeId = ${t}`),l.children||(l.children=[]),s=l.children}else s=n;let o=[],c=[];if(e.forEach(l=>{let h=s.find(f=>uB(l,f));h?c.push({existingRoute:h,newRoute:l}):o.push(l)}),o.length>0){let l=Xh(o,i,[t||"_","patch",String((s==null?void 0:s.length)||"0")],r);s.push(...l)}if(a&&c.length>0)for(let l=0;l<c.length;l++){let{existingRoute:h,newRoute:f}=c[l],m=h,[g]=Xh([f],i,[],{},!0);Object.assign(m,{element:g.element?g.element:m.element,errorElement:g.errorElement?g.errorElement:m.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:m.hydrateFallbackElement})}}function uB(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>{var i;return(i=e.children)==null?void 0:i.some(a=>uB(n,a))}):!1}var d5=new WeakMap,dB=({key:t,route:e,manifest:n,mapRouteProperties:r})=>{let i=n[e.id];if(un(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let a=i.lazy[t];if(!a)return;let s=d5.get(i);s||(s={},d5.set(i,s));let o=s[t];if(o)return o;let c=(async()=>{let l=WW(t),f=i[t]!==void 0&&t!=="hasErrorBoundary";if(l)dr(!l,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),s[t]=Promise.resolve();else if(f)dr(!1,`Route "${i.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let m=await a();m!=null&&(Object.assign(i,{[t]:m}),Object.assign(i,r(i)))}typeof i.lazy=="object"&&(i.lazy[t]=void 0,Object.values(i.lazy).every(m=>m===void 0)&&(i.lazy=void 0))})();return s[t]=c,c},f5=new WeakMap;function Cq(t,e,n,r,i){let a=n[t.id];if(un(a,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let h=f5.get(a);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let f=(async()=>{un(typeof t.lazy=="function","No lazy route function found");let m=await t.lazy(),g={};for(let b in m){let y=m[b];if(y===void 0)continue;let v=XW(b),_=a[b]!==void 0&&b!=="hasErrorBoundary";v?dr(!v,"Route property "+b+" is not a supported property to be returned from a lazy route function. This property will be ignored."):_?dr(!_,`Route "${a.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`):g[b]=y}Object.assign(a,g),Object.assign(a,{...r(a),lazy:void 0})})();return f5.set(a,f),f.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:f}}let s=Object.keys(t.lazy),o=[],c;for(let h of s){if(i&&i.includes(h))continue;let f=dB({key:h,route:t,manifest:n,mapRouteProperties:r});f&&(o.push(f),h===e&&(c=f))}let l=o.length>0?Promise.all(o).then(()=>{}):void 0;return l==null||l.catch(()=>{}),c==null||c.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function h5(t){let e=t.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(e.map(i=>i.resolve()))).forEach((i,a)=>{n[e[a].route.id]=i}),n}async function Rq(t){return t.matches.some(e=>e.route.middleware)?fB(t,()=>h5(t)):h5(t)}function fB(t,e){return jq(t,e,r=>{if(Gq(r))throw r;return r},zq,n);function n(r,i,a){if(a)return Promise.resolve(Object.assign(a.value,{[i]:{type:"error",result:r}}));{let{matches:s}=t,o=Math.min(Math.max(s.findIndex(l=>l.route.id===i),0),Math.max(s.findIndex(l=>l.shouldCallHandler()),0)),c=rl(s,s[o].route.id).route.id;return Promise.resolve({[c]:{type:"error",result:r}})}}}async function jq(t,e,n,r,i){let{matches:a,request:s,params:o,context:c,unstable_pattern:l}=t,h=a.flatMap(m=>m.route.middleware?m.route.middleware.map(g=>[m.route.id,g]):[]);return await hB({request:s,params:o,context:c,unstable_pattern:l},h,e,n,r,i)}async function hB(t,e,n,r,i,a,s=0){let{request:o}=t;if(o.signal.aborted)throw o.signal.reason??new Error(`Request aborted: ${o.method} ${o.url}`);let c=e[s];if(!c)return await n();let[l,h]=c,f,m=async()=>{if(f)throw new Error("You may only call `next()` once per middleware");try{return f={value:await hB(t,e,n,r,i,a,s+1)},f.value}catch(g){return f={value:await a(g,l,f)},f.value}};try{let g=await h(t,m),b=g!=null?r(g):void 0;return i(b)?b:f?b??f.value:(f={value:await m()},f.value)}catch(g){return await a(g,l,f)}}function pB(t,e,n,r,i){let a=dB({key:"middleware",route:r.route,manifest:e,mapRouteProperties:t}),s=Cq(r.route,Yr(n.method)?"action":"loader",e,t,i);return{middleware:a,route:s.lazyRoutePromise,handler:s.lazyHandlerPromise}}function $M(t,e,n,r,i,a,s,o,c=null,l){let h=!1,f=pB(t,e,n,i,a);return{...i,_lazyPromises:f,shouldLoad:o,shouldRevalidateArgs:c,shouldCallHandler(m){return h=!0,c?typeof l=="boolean"?Rh(i,{...c,defaultShouldRevalidate:l}):typeof m=="boolean"?Rh(i,{...c,defaultShouldRevalidate:m}):Rh(i,c):o},resolve(m){let{lazy:g,loader:b,middleware:y}=i.route,v=h||o||m&&!Yr(n.method)&&(g||b),w=y&&y.length>0&&!b&&!g;return v&&(Yr(n.method)||!w)?Iq({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:f==null?void 0:f.handler,lazyRoutePromise:f==null?void 0:f.route,handlerOverride:m,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function Yu(t,e,n,r,i,a,s,o=null){return r.map(c=>c.route.id!==i.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:o,shouldCallHandler:()=>!1,_lazyPromises:pB(t,e,n,c,a),resolve:()=>Promise.resolve({type:"data",result:void 0})}:$M(t,e,n,Xp(r),c,a,s,!0,o))}async function Oq(t,e,n,r,i,a){n.some(l=>{var h;return(h=l._lazyPromises)==null?void 0:h.middleware})&&await Promise.all(n.map(l=>{var h;return(h=l._lazyPromises)==null?void 0:h.middleware}));let s={request:e,unstable_pattern:Xp(n),params:n[0].params,context:i,matches:n},c=await t({...s,fetcherKey:r,runClientMiddleware:l=>{let h=s;return fB(h,()=>l({...h,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(l=>{var h,f;return[(h=l._lazyPromises)==null?void 0:h.handler,(f=l._lazyPromises)==null?void 0:f.route]}))}catch{}return c}async function Iq({request:t,unstable_pattern:e,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:a,scopedContext:s}){let o,c,l=Yr(t.method),h=l?"action":"loader",f=m=>{let g,b=new Promise((w,_)=>g=_);c=()=>g(),t.signal.addEventListener("abort",c);let y=w=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${n.route.id}]`)):m({request:t,unstable_pattern:e,params:n.params,context:s},...w!==void 0?[w]:[]),v=(async()=>{try{return{type:"data",result:await(a?a(_=>y(_)):y())}}catch(w){return{type:"error",result:w}}})();return Promise.race([v,b])};try{let m=l?n.route.action:n.route.loader;if(r||i)if(m){let g,[b]=await Promise.all([f(m).catch(y=>{g=y}),r,i]);if(g!==void 0)throw g;o=b}else{await r;let g=l?n.route.action:n.route.loader;if(g)[o]=await Promise.all([f(g),i]);else if(h==="action"){let b=new URL(t.url),y=b.pathname+b.search;throw da(405,{method:t.method,pathname:y,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(m)o=await f(m);else{let g=new URL(t.url),b=g.pathname+g.search;throw da(404,{pathname:b})}}catch(m){return{type:"error",result:m}}finally{c&&t.signal.removeEventListener("abort",c)}return o}async function Dq(t){let e=t.headers.get("Content-Type");return e&&/\bapplication\/json\b/.test(e)?t.body==null?null:t.json():t.text()}async function kq(t){var r,i,a,s,o;let{result:e,type:n}=t;if(eN(e)){let c;try{c=await Dq(e)}catch(l){return{type:"error",error:l}}return n==="error"?{type:"error",error:new qp(e.status,e.statusText,c),statusCode:e.status,headers:e.headers}:{type:"data",data:c,statusCode:e.status,headers:e.headers}}return n==="error"?x5(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:(r=e.init)==null?void 0:r.status,headers:(i=e.init)!=null&&i.headers?new Headers(e.init.headers):void 0}:{type:"error",error:Bq(e),statusCode:Kh(e)?e.status:void 0,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:Kh(e)?e.status:void 0}:x5(e)?{type:"data",data:e.data,statusCode:(s=e.init)==null?void 0:s.status,headers:(o=e.init)!=null&&o.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function Lq(t,e,n,r,i){let a=t.headers.get("Location");if(un(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!YA(a)){let s=r.slice(0,r.findIndex(o=>o.route.id===n)+1);a=BM(new URL(e.url),s,i,a),t.headers.set("Location",a)}return t}function p5(t,e,n,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(YA(t)){let a=t,s=a.startsWith("//")?new URL(e.protocol+a):new URL(a);if(i.includes(s.protocol))throw new Error("Invalid redirect location");let o=ya(s.pathname,n)!=null;if(s.origin===e.origin&&o)return s.pathname+s.search+s.hash}try{let a=r.createURL(t);if(i.includes(a.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Uu(t,e,n,r){let i=t.createURL(mB(e)).toString(),a={signal:n};if(r&&Yr(r.formMethod)){let{formMethod:s,formEncType:o}=r;a.method=s.toUpperCase(),o==="application/json"?(a.headers=new Headers({"Content-Type":o}),a.body=JSON.stringify(r.json)):o==="text/plain"?a.body=r.text:o==="application/x-www-form-urlencoded"&&r.formData?a.body=VM(r.formData):a.body=r.formData}return new Request(i,a)}function VM(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function m5(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function Fq(t,e,n,r=!1,i=!1){let a={},s=null,o,c=!1,l={},h=n&&Hi(n[1])?n[1].error:void 0;return t.forEach(f=>{if(!(f.route.id in e))return;let m=f.route.id,g=e[m];if(un(!oc(g),"Cannot handle redirect results in processLoaderData"),Hi(g)){let b=g.error;if(h!==void 0&&(b=h,h=void 0),s=s||{},i)s[m]=b;else{let y=rl(t,m);s[y.route.id]==null&&(s[y.route.id]=b)}r||(a[m]=cB),c||(c=!0,o=Kh(g.error)?g.error.status:500),g.headers&&(l[m]=g.headers)}else a[m]=g.data,g.statusCode&&g.statusCode!==200&&!c&&(o=g.statusCode),g.headers&&(l[m]=g.headers)}),h!==void 0&&n&&(s={[n[0]]:h},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:s,statusCode:o||200,loaderHeaders:l}}function g5(t,e,n,r,i,a){let{loaderData:s,errors:o}=Fq(e,n,r);return i.filter(c=>!c.matches||c.matches.some(l=>l.shouldLoad)).forEach(c=>{let{key:l,match:h,controller:f}=c;if(f&&f.signal.aborted)return;let m=a[l];if(un(m,"Did not find corresponding fetcher result"),Hi(m)){let g=rl(t.matches,h==null?void 0:h.route.id);o&&o[g.route.id]||(o={...o,[g.route.id]:m.error}),t.fetchers.delete(l)}else if(oc(m))un(!1,"Unhandled fetcher revalidation redirect");else{let g=Js(m.data);t.fetchers.set(l,g)}}),{loaderData:s,errors:o}}function v5(t,e,n,r){let i=Object.entries(e).filter(([,a])=>a!==cB).reduce((a,[s,o])=>(a[s]=o,a),{});for(let a of n){let s=a.route.id;if(!e.hasOwnProperty(s)&&t.hasOwnProperty(s)&&a.route.loader&&(i[s]=t[s]),r&&r.hasOwnProperty(s))break}return i}function y5(t){return t?Hi(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function rl(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function w0(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function da(t,{pathname:e,routeId:n,method:r,type:i,message:a}={}){let s="Unknown Server Error",o="Unknown @remix-run/router error";return t===400?(s="Bad Request",r&&e&&n?o=`You made a ${r} request to "${e}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(o="Unable to encode submission body")):t===403?(s="Forbidden",o=`Route "${n}" does not match URL "${e}"`):t===404?(s="Not Found",o=`No route matches URL "${e}"`):t===405&&(s="Method Not Allowed",r&&e&&n?o=`You made a ${r.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(o=`Invalid request method "${r.toUpperCase()}"`)),new qp(t||500,s,new Error(o),!0)}function _0(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,i]=e[n];if(oc(i))return{key:r,result:i}}}function mB(t){let e=typeof t=="string"?_l(t):t;return ws({...e,hash:""})}function Uq(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Bq(t){var e,n;return new qp(((e=t.init)==null?void 0:e.status)??500,((n=t.init)==null?void 0:n.statusText)??"Internal Server Error",t.data)}function zq(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([e,n])=>typeof e=="string"&&$q(n))}function $q(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function Vq(t){return eN(t.result)&&oB.has(t.result.status)}function Hi(t){return t.type==="error"}function oc(t){return(t&&t.type)==="redirect"}function x5(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function eN(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function Hq(t){return oB.has(t)}function Gq(t){return eN(t)&&Hq(t.status)&&t.headers.has("Location")}function Wq(t){return _q.has(t.toUpperCase())}function Yr(t){return bq.has(t.toUpperCase())}function tN(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Pg(t,e){let n=typeof e=="string"?_l(e).search:e.search;if(t[t.length-1].route.index&&tN(n||""))return t[t.length-1];let r=nB(t);return r[r.length-1]}function b5(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:a,json:s}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:e,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function f1(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qq(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Xf(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Xq(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Js(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Kq(t,e){try{let n=t.sessionStorage.getItem(lB);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&e.set(i,new Set(a||[]))}}catch{}}function Yq(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(lB,JSON.stringify(n))}catch(r){dr(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function w5(){let t,e,n=new Promise((r,i)=>{t=async a=>{r(a);try{await n}catch{}},e=async a=>{i(a);try{await n}catch{}}});return{promise:n,resolve:t,reject:e}}var Lc=O.createContext(null);Lc.displayName="DataRouter";var Kp=O.createContext(null);Kp.displayName="DataRouterState";var gB=O.createContext(!1);function Zq(){return O.useContext(gB)}var nN=O.createContext({isTransitioning:!1});nN.displayName="ViewTransition";var vB=O.createContext(new Map);vB.displayName="Fetchers";var Jq=O.createContext(null);Jq.displayName="Await";var _a=O.createContext(null);_a.displayName="Navigation";var Ry=O.createContext(null);Ry.displayName="Location";var Ps=O.createContext({outlet:null,matches:[],isDataRoute:!1});Ps.displayName="Route";var rN=O.createContext(null);rN.displayName="RouteError";var yB="REACT_ROUTER_ERROR",Qq="REDIRECT",eX="ROUTE_ERROR_RESPONSE";function tX(t){if(t.startsWith(`${yB}:${Qq}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function nX(t){if(t.startsWith(`${yB}:${eX}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new qp(e.status,e.statusText,e.data)}catch{}}function rX(t,{relative:e}={}){un(Yp(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=O.useContext(_a),{hash:i,pathname:a,search:s}=Zp(t,{relative:e}),o=a;return n!=="/"&&(o=a==="/"?n:hs([n,a])),r.createHref({pathname:o,search:s,hash:i})}function Yp(){return O.useContext(Ry)!=null}function Sl(){return un(Yp(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(Ry).location}var xB="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function bB(t){O.useContext(_a).static||O.useLayoutEffect(t)}function wB(){let{isDataRoute:t}=O.useContext(Ps);return t?yX():iX()}function iX(){un(Yp(),"useNavigate() may be used only in the context of a <Router> component.");let t=O.useContext(Lc),{basename:e,navigator:n}=O.useContext(_a),{matches:r}=O.useContext(Ps),{pathname:i}=Sl(),a=JSON.stringify(ZA(r)),s=O.useRef(!1);return bB(()=>{s.current=!0}),O.useCallback((c,l={})=>{if(dr(s.current,xB),!s.current)return;if(typeof c=="number"){n.go(c);return}let h=JA(c,JSON.parse(a),i,l.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:hs([e,h.pathname])),(l.replace?n.replace:n.push)(h,l.state,l)},[e,n,a,i,t])}var aX=O.createContext(null);function sX(t){let e=O.useContext(Ps).outlet;return O.useMemo(()=>e&&O.createElement(aX.Provider,{value:t},e),[e,t])}function Zp(t,{relative:e}={}){let{matches:n}=O.useContext(Ps),{pathname:r}=Sl(),i=JSON.stringify(ZA(n));return O.useMemo(()=>JA(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function oX(t,e,n,r,i){un(Yp(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=O.useContext(_a),{matches:s}=O.useContext(Ps),o=s[s.length-1],c=o?o.params:{},l=o?o.pathname:"/",h=o?o.pathnameBase:"/",f=o&&o.route;{let _=f&&f.path||"";SB(l,!f||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let m=Sl(),g;g=m;let b=g.pathname||"/",y=b;if(h!=="/"){let _=h.replace(/^\//,"").split("/");y="/"+b.replace(/^\//,"").split("/").slice(_.length).join("/")}let v=nl(t,{pathname:y});return dr(f||v!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),dr(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),fX(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:hs([h,a.encodeLocation?a.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?h:hs([h,a.encodeLocation?a.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,n,r,i)}function lX(){let t=vX(),e=Kh(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:a},"ErrorBoundary")," or"," ",O.createElement("code",{style:a},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),n?O.createElement("pre",{style:i},n):null,s)}var cX=O.createElement(lX,null),_B=class extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=nX(t.digest);n&&(t=n)}let e=t!==void 0?O.createElement(Ps.Provider,{value:this.props.routeContext},O.createElement(rN.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?O.createElement(uX,{error:t},e):e}};_B.contextType=gB;var h1=new WeakMap;function uX({children:t,error:e}){let{basename:n}=O.useContext(_a);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=tX(e.digest);if(r){let i=h1.get(e);if(i)throw i;let a=iB(r.location,n);if(rB&&!h1.get(e))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw h1.set(e,s),s}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function dX({routeContext:t,match:e,children:n}){let r=O.useContext(Lc);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),O.createElement(Ps.Provider,{value:t},n)}function fX(t,e=[],n=null,r=null,i=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,s=n==null?void 0:n.errors;if(s!=null){let h=a.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);un(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let o=!1,c=-1;if(n)for(let h=0;h<a.length;h++){let f=a[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:m,errors:g}=n,b=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||b){o=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}let l=n&&r?(h,f)=>{var m,g;r(h,{location:n.location,params:((g=(m=n.matches)==null?void 0:m[0])==null?void 0:g.params)??{},unstable_pattern:Xp(n.matches),errorInfo:f})}:void 0;return a.reduceRight((h,f,m)=>{let g,b=!1,y=null,v=null;n&&(g=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||cX,o&&(c<0&&m===0?(SB("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,v=null):c===m&&(b=!0,v=f.route.hydrateFallbackElement||null)));let w=e.concat(a.slice(0,m+1)),_=()=>{let E;return g?E=y:b?E=v:f.route.Component?E=O.createElement(f.route.Component,null):f.route.element?E=f.route.element:E=h,O.createElement(dX,{match:f,routeContext:{outlet:h,matches:w,isDataRoute:n!=null},children:E})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?O.createElement(_B,{location:n.location,revalidation:n.revalidation,component:y,error:g,children:_(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:l}):_()},null)}function iN(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hX(t){let e=O.useContext(Lc);return un(e,iN(t)),e}function pX(t){let e=O.useContext(Kp);return un(e,iN(t)),e}function mX(t){let e=O.useContext(Ps);return un(e,iN(t)),e}function aN(t){let e=mX(t),n=e.matches[e.matches.length-1];return un(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function gX(){return aN("useRouteId")}function vX(){var r;let t=O.useContext(rN),e=pX("useRouteError"),n=aN("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function yX(){let{router:t}=hX("useNavigate"),e=aN("useNavigate"),n=O.useRef(!1);return bB(()=>{n.current=!0}),O.useCallback(async(i,a={})=>{dr(n.current,xB),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var _5={};function SB(t,e,n){!e&&!_5[t]&&(_5[t]=!0,dr(!1,n))}var S5={};function M5(t,e){!t&&!S5[e]&&(S5[e]=!0,console.warn(e))}var xX="useOptimistic",E5=Y8[xX],bX=()=>{};function wX(t){return E5?E5(t):[t,bX]}function _X(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&dr(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:O.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&dr(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:O.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&dr(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:O.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var SX=["HydrateFallback","hydrateFallbackElement"],MX=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",e(n))}})}};function EX({router:t,flushSync:e,onError:n,unstable_useTransitions:r}){r=Zq()||r;let[a,s]=O.useState(t.state),[o,c]=wX(a),[l,h]=O.useState(),[f,m]=O.useState({isTransitioning:!1}),[g,b]=O.useState(),[y,v]=O.useState(),[w,_]=O.useState(),E=O.useRef(new Map),M=O.useCallback((P,{deletedFetchers:R,newErrors:F,flushSync:D,viewTransitionOpts:L})=>{F&&n&&Object.values(F).forEach(I=>{var U;return n(I,{location:P.location,params:((U=P.matches[0])==null?void 0:U.params)??{},unstable_pattern:Xp(P.matches)})}),P.fetchers.forEach((I,U)=>{I.data!==void 0&&E.current.set(U,I.data)}),R.forEach(I=>E.current.delete(I)),M5(D===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let q=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(M5(L==null||q,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!L||!q){e&&D?e(()=>s(P)):r===!1?s(P):O.startTransition(()=>{r===!0&&c(I=>T5(I,P)),s(P)});return}if(e&&D){e(()=>{y&&(g==null||g.resolve(),y.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let I=t.window.document.startViewTransition(()=>{e(()=>s(P))});I.finished.finally(()=>{e(()=>{b(void 0),v(void 0),h(void 0),m({isTransitioning:!1})})}),e(()=>v(I));return}y?(g==null||g.resolve(),y.skipTransition(),_({state:P,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(h(P),m({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[t.window,e,y,g,r,c,n]);O.useLayoutEffect(()=>t.subscribe(M),[t,M]),O.useEffect(()=>{f.isTransitioning&&!f.flushSync&&b(new MX)},[f]),O.useEffect(()=>{if(g&&l&&t.window){let P=l,R=g.promise,F=t.window.document.startViewTransition(async()=>{r===!1?s(P):O.startTransition(()=>{r===!0&&c(D=>T5(D,P)),s(P)}),await R});F.finished.finally(()=>{b(void 0),v(void 0),h(void 0),m({isTransitioning:!1})}),v(F)}},[l,g,t.window,r,c]),O.useEffect(()=>{g&&l&&o.location.key===l.location.key&&g.resolve()},[g,y,o.location,l]),O.useEffect(()=>{!f.isTransitioning&&w&&(h(w.state),m({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),_(void 0))},[f.isTransitioning,w]);let T=O.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:P=>t.navigate(P),push:(P,R,F)=>t.navigate(P,{state:R,preventScrollReset:F==null?void 0:F.preventScrollReset}),replace:(P,R,F)=>t.navigate(P,{replace:!0,state:R,preventScrollReset:F==null?void 0:F.preventScrollReset})}),[t]),A=t.basename||"/",N=O.useMemo(()=>({router:t,navigator:T,static:!1,basename:A,onError:n}),[t,T,A,n]);return O.createElement(O.Fragment,null,O.createElement(Lc.Provider,{value:N},O.createElement(Kp.Provider,{value:o},O.createElement(vB.Provider,{value:E.current},O.createElement(nN.Provider,{value:f},O.createElement(PX,{basename:A,location:o.location,navigationType:o.historyAction,navigator:T,unstable_useTransitions:r},O.createElement(TX,{routes:t.routes,future:t.future,state:o,onError:n})))))),null)}function T5(t,e){return{...t,navigation:e.navigation.state!=="idle"?e.navigation:t.navigation,revalidation:e.revalidation!=="idle"?e.revalidation:t.revalidation,actionData:e.navigation.state!=="submitting"?e.actionData:t.actionData,fetchers:e.fetchers}}var TX=O.memo(AX);function AX({routes:t,future:e,state:n,onError:r}){return oX(t,void 0,n,r,e)}function NX(t){return sX(t.context)}function PX({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:a=!1,unstable_useTransitions:s}){un(!Yp(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=t.replace(/^\/*/,"/"),c=O.useMemo(()=>({basename:o,navigator:i,static:a,unstable_useTransitions:s,future:{}}),[o,i,a,s]);typeof n=="string"&&(n=_l(n));let{pathname:l="/",search:h="",hash:f="",state:m=null,key:g="default"}=n,b=O.useMemo(()=>{let y=ya(l,o);return y==null?null:{location:{pathname:y,search:h,hash:f,state:m,key:g},navigationType:r}},[o,l,h,f,m,g,r]);return dr(b!=null,`<Router basename="${o}"> is not able to match the URL "${l}${h}${f}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:O.createElement(_a.Provider,{value:c},O.createElement(Ry.Provider,{children:e,value:b}))}var Cg="get",Rg="application/x-www-form-urlencoded";function jy(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function CX(t){return jy(t)&&t.tagName.toLowerCase()==="button"}function RX(t){return jy(t)&&t.tagName.toLowerCase()==="form"}function jX(t){return jy(t)&&t.tagName.toLowerCase()==="input"}function OX(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function IX(t,e){return t.button===0&&(!e||e==="_self")&&!OX(t)}var S0=null;function DX(){if(S0===null)try{new FormData(document.createElement("form"),0),S0=!1}catch{S0=!0}return S0}var kX=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function p1(t){return t!=null&&!kX.has(t)?(dr(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rg}"`),null):t}function LX(t,e){let n,r,i,a,s;if(RX(t)){let o=t.getAttribute("action");r=o?ya(o,e):null,n=t.getAttribute("method")||Cg,i=p1(t.getAttribute("enctype"))||Rg,a=new FormData(t)}else if(CX(t)||jX(t)&&(t.type==="submit"||t.type==="image")){let o=t.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||o.getAttribute("action");if(r=c?ya(c,e):null,n=t.getAttribute("formmethod")||o.getAttribute("method")||Cg,i=p1(t.getAttribute("formenctype"))||p1(o.getAttribute("enctype"))||Rg,a=new FormData(o,t),!DX()){let{name:l,type:h,value:f}=t;if(h==="image"){let m=l?`${l}.`:"";a.append(`${m}x`,"0"),a.append(`${m}y`,"0")}else l&&a.append(l,f)}}else{if(jy(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Cg,r=null,i=Rg,s=t}return a&&i==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sN(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function FX(t,e,n,r){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:e&&ya(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function UX(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function BX(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function zX(t,e,n){let r=await Promise.all(t.map(async i=>{let a=e.routes[i.route.id];if(a){let s=await UX(a,n);return s.links?s.links():[]}return[]}));return GX(r.flat(1).filter(BX).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function A5(t,e,n,r,i,a){let s=(c,l)=>n[l]?c.route.id!==n[l].route.id:!0,o=(c,l)=>{var h;return n[l].pathname!==c.pathname||((h=n[l].route.path)==null?void 0:h.endsWith("*"))&&n[l].params["*"]!==c.params["*"]};return a==="assets"?e.filter((c,l)=>s(c,l)||o(c,l)):a==="data"?e.filter((c,l)=>{var f;let h=r.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(s(c,l)||o(c,l))return!0;if(c.route.shouldRevalidate){let m=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function $X(t,e,{includeHydrateFallback:n}={}){return VX(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function VX(t){return[...new Set(t)]}function HX(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function GX(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let a=JSON.stringify(HX(i));return n.has(a)||(n.add(a),r.push({key:a,link:i})),r},[])}function MB(){let t=O.useContext(Lc);return sN(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function WX(){let t=O.useContext(Kp);return sN(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var oN=O.createContext(void 0);oN.displayName="FrameworkContext";function EB(){let t=O.useContext(oN);return sN(t,"You must render this element inside a <HydratedRouter> element"),t}function qX(t,e){let n=O.useContext(oN),[r,i]=O.useState(!1),[a,s]=O.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:l,onMouseLeave:h,onTouchStart:f}=e,m=O.useRef(null);O.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let y=w=>{w.forEach(_=>{s(_.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return m.current&&v.observe(m.current),()=>{v.disconnect()}}},[t]),O.useEffect(()=>{if(r){let y=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(y)}}},[r]);let g=()=>{i(!0)},b=()=>{i(!1),s(!1)};return n?t!=="intent"?[a,m,{}]:[a,m,{onFocus:Kf(o,g),onBlur:Kf(c,b),onMouseEnter:Kf(l,g),onMouseLeave:Kf(h,b),onTouchStart:Kf(f,g)}]:[!1,m,{}]}function Kf(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function XX({page:t,...e}){let{router:n}=MB(),r=O.useMemo(()=>nl(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?O.createElement(YX,{page:t,matches:r,...e}):null}function KX(t){let{manifest:e,routeModules:n}=EB(),[r,i]=O.useState([]);return O.useEffect(()=>{let a=!1;return zX(t,e,n).then(s=>{a||i(s)}),()=>{a=!0}},[t,e,n]),r}function YX({page:t,matches:e,...n}){let r=Sl(),{future:i,manifest:a,routeModules:s}=EB(),{basename:o}=MB(),{loaderData:c,matches:l}=WX(),h=O.useMemo(()=>A5(t,e,l,a,r,"data"),[t,e,l,a,r]),f=O.useMemo(()=>A5(t,e,l,a,r,"assets"),[t,e,l,a,r]),m=O.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let y=new Set,v=!1;if(e.forEach(_=>{var M;let E=a.routes[_.route.id];!E||!E.hasLoader||(!h.some(T=>T.route.id===_.route.id)&&_.route.id in c&&((M=s[_.route.id])!=null&&M.shouldRevalidate)||E.hasClientLoader?v=!0:y.add(_.route.id))}),y.size===0)return[];let w=FX(t,o,i.unstable_trailingSlashAwareDataRequests,"data");return v&&y.size>0&&w.searchParams.set("_routes",e.filter(_=>y.has(_.route.id)).map(_=>_.route.id).join(",")),[w.pathname+w.search]},[o,i.unstable_trailingSlashAwareDataRequests,c,r,a,h,e,t,s]),g=O.useMemo(()=>$X(f,a),[f,a]),b=KX(f);return O.createElement(O.Fragment,null,m.map(y=>O.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),g.map(y=>O.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),b.map(({key:y,link:v})=>O.createElement("link",{key:y,nonce:n.nonce,...v,crossOrigin:v.crossOrigin??n.crossOrigin})))}function ZX(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var JX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{JX&&(window.__reactRouterVersion="7.13.0")}catch{}function QX(t,e){return Tq({basename:e==null?void 0:e.basename,getContext:e==null?void 0:e.getContext,future:e==null?void 0:e.future,history:$W({window:e==null?void 0:e.window}),hydrationData:eK(),routes:t,mapRouteProperties:_X,hydrationRouteProperties:SX,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window,unstable_instrumentations:e==null?void 0:e.unstable_instrumentations}).initialize()}function eK(){let t=window==null?void 0:window.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:tK(t.errors)}),t}function tK(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new qp(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let s=new a(i.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let a=new Error(i.message);a.stack="",n[r]=a}}else n[r]=i;return n}var TB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ev=O.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:s,state:o,target:c,to:l,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m,...g},b){let{basename:y,unstable_useTransitions:v}=O.useContext(_a),w=typeof l=="string"&&TB.test(l),_=iB(l,y);l=_.to;let E=rX(l,{relative:i}),[M,T,A]=qX(r,g),N=aK(l,{replace:s,state:o,target:c,preventScrollReset:h,relative:i,viewTransition:f,unstable_defaultShouldRevalidate:m,unstable_useTransitions:v});function P(F){e&&e(F),F.defaultPrevented||N(F)}let R=O.createElement("a",{...g,...A,href:_.absoluteURL||E,onClick:_.isExternal||a?e:P,ref:ZX(b,T),target:c,"data-discover":!w&&n==="render"?"true":void 0});return M&&!w?O.createElement(O.Fragment,null,R,O.createElement(XX,{page:E})):R});ev.displayName="Link";var nK=O.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:s,viewTransition:o,children:c,...l},h){let f=Zp(s,{relative:l.relative}),m=Sl(),g=O.useContext(Kp),{navigator:b,basename:y}=O.useContext(_a),v=g!=null&&uK(f)&&o===!0,w=b.encodeLocation?b.encodeLocation(f).pathname:f.pathname,_=m.pathname,E=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(_=_.toLowerCase(),E=E?E.toLowerCase():null,w=w.toLowerCase()),E&&y&&(E=ya(E,y)||E);const M=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let T=_===w||!i&&_.startsWith(w)&&_.charAt(M)==="/",A=E!=null&&(E===w||!i&&E.startsWith(w)&&E.charAt(w.length)==="/"),N={isActive:T,isPending:A,isTransitioning:v},P=T?e:void 0,R;typeof r=="function"?R=r(N):R=[r,T?"active":null,A?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let F=typeof a=="function"?a(N):a;return O.createElement(ev,{...l,"aria-current":P,className:R,ref:h,style:F,to:s,viewTransition:o},typeof c=="function"?c(N):c)});nK.displayName="NavLink";var rK=O.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:a,method:s=Cg,action:o,onSubmit:c,relative:l,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m,...g},b)=>{let{unstable_useTransitions:y}=O.useContext(_a),v=lK(),w=cK(o,{relative:l}),_=s.toLowerCase()==="get"?"get":"post",E=typeof o=="string"&&TB.test(o),M=T=>{if(c&&c(T),T.defaultPrevented)return;T.preventDefault();let A=T.nativeEvent.submitter,N=(A==null?void 0:A.getAttribute("formmethod"))||s,P=()=>v(A||T.currentTarget,{fetcherKey:e,method:N,navigate:n,replace:i,state:a,relative:l,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m});y&&n!==!1?O.startTransition(()=>P()):P()};return O.createElement("form",{ref:b,method:_,action:w,onSubmit:r?c:M,...g,"data-discover":!E&&t==="render"?"true":void 0})});rK.displayName="Form";function iK(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function AB(t){let e=O.useContext(Lc);return un(e,iK(t)),e}function aK(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:o,unstable_useTransitions:c}={}){let l=wB(),h=Sl(),f=Zp(t,{relative:a});return O.useCallback(m=>{if(IX(m,e)){m.preventDefault();let g=n!==void 0?n:ws(h)===ws(f),b=()=>l(t,{replace:g,state:r,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:o});c?O.startTransition(()=>b()):b()}},[h,l,f,n,r,e,t,i,a,s,o,c])}var sK=0,oK=()=>`__${String(++sK)}__`;function lK(){let{router:t}=AB("useSubmit"),{basename:e}=O.useContext(_a),n=gX(),r=t.fetch,i=t.navigate;return O.useCallback(async(a,s={})=>{let{action:o,method:c,encType:l,formData:h,body:f}=LX(a,e);if(s.navigate===!1){let m=s.fetcherKey||oK();await r(m,n,s.action||o,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:f,formMethod:s.method||c,formEncType:s.encType||l,flushSync:s.flushSync})}else await i(s.action||o,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:f,formMethod:s.method||c,formEncType:s.encType||l,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,i,e,n])}function cK(t,{relative:e}={}){let{basename:n}=O.useContext(_a),r=O.useContext(Ps);un(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),a={...Zp(t||".",{relative:e})},s=Sl();if(t==null){a.search=s.search;let o=new URLSearchParams(a.search),c=o.getAll("index");if(c.some(h=>h==="")){o.delete("index"),c.filter(f=>f).forEach(f=>o.append("index",f));let h=o.toString();a.search=h?`?${h}`:""}}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:hs([n,a.pathname])),ws(a)}function uK(t,{relative:e}={}){let n=O.useContext(nN);un(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=AB("useViewTransitionState"),i=Zp(t,{relative:e});if(!n.isTransitioning)return!1;let a=ya(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=ya(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Qg(i.pathname,s)!=null||Qg(i.pathname,a)!=null}/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dK=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fK=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),N5=t=>{const e=fK(t);return e.charAt(0).toUpperCase()+e.slice(1)},NB=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var hK={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"};/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pK=O.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},c)=>O.createElement("svg",{ref:c,...hK,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:NB("lucide",i),...o},[...s.map(([l,h])=>O.createElement(l,h)),...Array.isArray(a)?a:[a]]));/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const st=(t,e)=>{const n=O.forwardRef(({className:r,...i},a)=>O.createElement(pK,{ref:a,iconNode:e,className:NB(`lucide-${dK(N5(t))}`,`lucide-${t}`,r),...i}));return n.displayName=N5(t),n};/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mK=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],yr=st("activity",mK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gK=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],m1=st("arrow-left-right",gK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vK=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_h=st("arrow-right",vK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yK=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Oy=st("bell",yK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xK=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],bK=st("book-open",xK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wK=[["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"}]],P5=st("bot",wK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _K=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],jh=st("box",_K);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SK=[["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"}]],gl=st("brain",SK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MK=[["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"}]],EK=st("calendar",MK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TK=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],AK=st("camera",TK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NK=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],PK=st("chart-column",NK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CK=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],RK=st("check",CK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jK=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],OK=st("chevron-right",jK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IK=[["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"}]],Yh=st("circle-alert",IK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DK=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Cr=st("circle-check-big",DK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],tv=st("circle-check",kK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],C5=st("circle-x",LK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],_s=st("clock",FK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UK=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],HM=st("cloud",UK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BK=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],zK=st("code-xml",BK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $K=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],VK=st("copy",$K);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HK=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Jp=st("cpu",HK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GK=[["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"}]],vl=st("database",GK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WK=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],R5=st("dollar-sign",WK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qK=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Fc=st("download",qK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XK=[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]],Oh=st("droplets",XK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KK=[["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"}]],Gd=st("eye",KK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YK=[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]],Iy=st("factory",YK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZK=[["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:"m9 15 2 2 4-4",key:"1grp1n"}]],JK=st("file-check",ZK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QK=[["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"}]],Mc=st("file-text",QK);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eY=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],Zu=st("flame",eY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tY=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Zh=st("gauge",tY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nY=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],rY=st("git-branch",nY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iY=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],GM=st("git-merge",iY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aY=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],PB=st("hard-drive",aY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sY=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],oY=st("image",sY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lY=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],nv=st("layers",lY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cY=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],CB=st("loader-circle",cY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uY=[["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"}]],j5=st("lock",uY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dY=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],Jh=st("maximize-2",dY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fY=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],hY=st("message-circle",fY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pY=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],mY=st("message-square",pY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gY=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]],vY=st("mic",gY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yY=[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]],xY=st("monitor-play",yY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bY=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],wY=st("monitor",bY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _Y=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Qh=st("network",_Y);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SY=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],Qp=st("pause",SY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MY=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],EY=st("pen-line",MY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TY=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Wd=st("play",TY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AY=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],RB=st("plus",AY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NY=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],PY=st("radio",NY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CY=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ps=st("refresh-cw",CY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RY=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],jY=st("rotate-ccw",RY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const OY=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],IY=st("save",OY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DY=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],kY=st("scan",DY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LY=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ju=st("search",LY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FY=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],UY=st("send",FY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BY=[["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"}]],jg=st("server",BY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zY=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sd=st("settings",zY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $Y=[["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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],O5=st("shield-check",$Y);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VY=[["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",key:"oel41y"}]],g1=st("shield",VY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HY=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]],GY=st("signal",HY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WY=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Ec=st("sparkles",WY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qY=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],XY=st("square-pen",qY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KY=[["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"}]],ep=st("target",KY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YY=[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]],rv=st("thermometer",YY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZY=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],JY=st("trash-2",ZY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QY=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],WM=st("trending-down",QY);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eZ=[["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"}]],Ni=st("trending-up",eZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tZ=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],qi=st("triangle-alert",tZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nZ=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Dy=st("upload",nZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rZ=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],jB=st("user",rZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iZ=[["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"}]],aZ=st("users",iZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sZ=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],oZ=st("video",sZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lZ=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],cZ=st("volume-2",lZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uZ=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],OB=st("wifi-off",uZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dZ=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],iv=st("wifi",dZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fZ=[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]],hZ=st("wind",fZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pZ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],IB=st("x",pZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mZ=[["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"}]],Qr=st("zap",mZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gZ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],DB=st("zoom-in",gZ);/**
* @license lucide-react v0.487.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vZ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],yZ=st("zoom-out",vZ);function xZ(){const t=O.useRef(null);return O.useEffect(()=>{const e=t.current;if(!e)return;const n=e.getContext("2d");if(!n)return;e.width=window.innerWidth,e.height=window.innerHeight;const r=[];for(let o=0;o<50;o++)r.push({x:Math.random()*e.width,y:Math.random()*e.height,vx:(Math.random()-.5)*.3,vy:(Math.random()-.5)*.3,size:Math.random()*2+1});let i;const a=()=>{n.fillStyle="rgba(2, 6, 23, 0.05)",n.fillRect(0,0,e.width,e.height);for(let o=0;o<r.length;o++)for(let c=o+1;c<r.length;c++){const l=r[o].x-r[c].x,h=r[o].y-r[c].y,f=Math.sqrt(l*l+h*h);f<150&&(n.strokeStyle=`rgba(59, 130, 246, ${.2*(1-f/150)})`,n.lineWidth=.5,n.beginPath(),n.moveTo(r[o].x,r[o].y),n.lineTo(r[c].x,r[c].y),n.stroke())}r.forEach(o=>{o.x+=o.vx,o.y+=o.vy,(o.x<0||o.x>e.width)&&(o.vx*=-1),(o.y<0||o.y>e.height)&&(o.vy*=-1),n.fillStyle="rgba(59, 130, 246, 0.6)",n.beginPath(),n.arc(o.x,o.y,o.size,0,Math.PI*2),n.fill()}),i=requestAnimationFrame(a)};a();const s=()=>{e.width=window.innerWidth,e.height=window.innerHeight};return window.addEventListener("resize",s),()=>{cancelAnimationFrame(i),window.removeEventListener("resize",s)}},[]),d.jsx("canvas",{ref:t,className:"fixed inset-0 pointer-events-none opacity-30",style:{zIndex:0}})}var bZ=(t,e,n,r,i,a,s,o)=>{let c=document.documentElement,l=["light","dark"];function h(g){(Array.isArray(t)?t:[t]).forEach(b=>{let y=b==="class",v=y&&a?i.map(w=>a[w]||w):i;y?(c.classList.remove(...v),c.classList.add(a&&a[g]?a[g]:g)):c.setAttribute(b,g)}),f(g)}function f(g){o&&l.includes(g)&&(c.style.colorScheme=g)}function m(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)h(r);else try{let g=localStorage.getItem(e)||n,b=s&&g==="system"?m():g;h(b)}catch{}},wZ=O.createContext(void 0),_Z={setTheme:t=>{},themes:[]},SZ=()=>{var t;return(t=O.useContext(wZ))!=null?t:_Z};O.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:s,themes:o,nonce:c,scriptProps:l})=>{let h=JSON.stringify([n,e,a,t,o,s,r,i]).slice(1,-1);return O.createElement("script",{...l,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${bZ.toString()})(${h})`}})});var kB=K8();const LB=Mn(kB);function MZ(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const EZ=t=>{switch(t){case"success":return NZ;case"info":return CZ;case"warning":return PZ;case"error":return RZ;default:return null}},TZ=Array(12).fill(0),AZ=({visible:t,className:e})=>K.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},K.createElement("div",{className:"sonner-spinner"},TZ.map((n,r)=>K.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),NZ=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),PZ=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},K.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"})),CZ=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),RZ=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),jZ=K.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"},K.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),K.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),OZ=()=>{const[t,e]=K.useState(document.hidden);return K.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let qM=1;class IZ{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:r,...i}=e,a=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:qM++,s=this.toasts.find(c=>c.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...e,id:a,title:r}),{...c,...e,id:a,dismissible:o,title:r}):c):this.addToast({title:r,...i,dismissible:o,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let a=r!==void 0,s;const o=i.then(async l=>{if(s=["resolve",l],K.isValidElement(l))a=!1,this.create({id:r,type:"default",message:l});else if(kZ(l)&&!l.ok){a=!1;const f=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,b=typeof f=="object"&&!K.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...b})}else if(l instanceof Error){a=!1;const f=typeof n.error=="function"?await n.error(l):n.error,m=typeof n.description=="function"?await n.description(l):n.description,b=typeof f=="object"&&!K.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...b})}else if(n.success!==void 0){a=!1;const f=typeof n.success=="function"?await n.success(l):n.success,m=typeof n.description=="function"?await n.description(l):n.description,b=typeof f=="object"&&!K.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:m,...b})}}).catch(async l=>{if(s=["reject",l],n.error!==void 0){a=!1;const h=typeof n.error=="function"?await n.error(l):n.error,f=typeof n.description=="function"?await n.description(l):n.description,g=typeof h=="object"&&!K.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:f,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,h)=>o.then(()=>s[0]==="reject"?h(s[1]):l(s[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(e,n)=>{const r=(n==null?void 0:n.id)||qM++;return this.create({jsx:e(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ai=new IZ,DZ=(t,e)=>{const n=(e==null?void 0:e.id)||qM++;return Ai.addToast({title:t,...e,id:n}),n},kZ=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",LZ=DZ,FZ=()=>Ai.toasts,UZ=()=>Ai.getActiveToasts(),Ye=Object.assign(LZ,{success:Ai.success,info:Ai.info,warning:Ai.warning,error:Ai.error,custom:Ai.custom,message:Ai.message,promise:Ai.promise,dismiss:Ai.dismiss,loading:Ai.loading},{getHistory:FZ,getToasts:UZ});MZ("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left: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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");function M0(t){return t.label!==void 0}const BZ=3,zZ="24px",$Z="16px",I5=4e3,VZ=356,HZ=14,GZ=45,WZ=200;function es(...t){return t.filter(Boolean).join(" ")}function qZ(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const XZ=t=>{var e,n,r,i,a,s,o,c,l;const{invert:h,toast:f,unstyled:m,interacting:g,setHeights:b,visibleToasts:y,heights:v,index:w,toasts:_,expanded:E,removeToast:M,defaultRichColors:T,closeButton:A,style:N,cancelButtonStyle:P,actionButtonStyle:R,className:F="",descriptionClassName:D="",duration:L,position:q,gap:I,expandByDefault:U,classNames:k,icons:V,closeButtonAriaLabel:$="Close toast"}=t,[Y,J]=K.useState(null),[W,H]=K.useState(null),[te,we]=K.useState(!1),[Ae,ne]=K.useState(!1),[de,pe]=K.useState(!1),[fe,ce]=K.useState(!1),[Ce,ye]=K.useState(!1),[Ze,tt]=K.useState(0),[St,lt]=K.useState(0),kt=K.useRef(f.duration||L||I5),re=K.useRef(null),Ht=K.useRef(null),Lt=w===0,zt=w+1<=y,qe=f.type,Z=f.dismissible!==!1,z=f.className||"",ie=f.descriptionClassName||"",Ee=K.useMemo(()=>v.findIndex(he=>he.toastId===f.id)||0,[v,f.id]),Pe=K.useMemo(()=>{var he;return(he=f.closeButton)!=null?he:A},[f.closeButton,A]),ge=K.useMemo(()=>f.duration||L||I5,[f.duration,L]),Xe=K.useRef(0),Le=K.useRef(0),ft=K.useRef(0),nt=K.useRef(null),[Ue,ke]=q.split("-"),Fe=K.useMemo(()=>v.reduce((he,Qe,ht)=>ht>=Ee?he:he+Qe.height,0),[v,Ee]),ze=OZ(),He=f.invert||h,vt=qe==="loading";Le.current=K.useMemo(()=>Ee*I+Fe,[Ee,Fe]),K.useEffect(()=>{kt.current=ge},[ge]),K.useEffect(()=>{we(!0)},[]),K.useEffect(()=>{const he=Ht.current;if(he){const Qe=he.getBoundingClientRect().height;return lt(Qe),b(ht=>[{toastId:f.id,height:Qe,position:f.position},...ht]),()=>b(ht=>ht.filter(Gt=>Gt.toastId!==f.id))}},[b,f.id]),K.useLayoutEffect(()=>{if(!te)return;const he=Ht.current,Qe=he.style.height;he.style.height="auto";const ht=he.getBoundingClientRect().height;he.style.height=Qe,lt(ht),b(Gt=>Gt.find(mn=>mn.toastId===f.id)?Gt.map(mn=>mn.toastId===f.id?{...mn,height:ht}:mn):[{toastId:f.id,height:ht,position:f.position},...Gt])},[te,f.title,f.description,b,f.id]);const ae=K.useCallback(()=>{ne(!0),tt(Le.current),b(he=>he.filter(Qe=>Qe.toastId!==f.id)),setTimeout(()=>{M(f)},WZ)},[f,M,b,Le]);K.useEffect(()=>{if(f.promise&&qe==="loading"||f.duration===1/0||f.type==="loading")return;let he;return E||g||ze?(()=>{if(ft.current<Xe.current){const Gt=new Date().getTime()-Xe.current;kt.current=kt.current-Gt}ft.current=new Date().getTime()})():(()=>{kt.current!==1/0&&(Xe.current=new Date().getTime(),he=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),ae()},kt.current))})(),()=>clearTimeout(he)},[E,g,f,qe,ze,ae]),K.useEffect(()=>{f.delete&&ae()},[ae,f.delete]);function Re(){var he;if(V!=null&&V.loading){var Qe;return K.createElement("div",{className:es(k==null?void 0:k.loader,f==null||(Qe=f.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":qe==="loading"},V.loading)}return K.createElement(AZ,{className:es(k==null?void 0:k.loader,f==null||(he=f.classNames)==null?void 0:he.loader),visible:qe==="loading"})}const Ie=f.icon||(V==null?void 0:V[qe])||EZ(qe);var rt,$e;return K.createElement("li",{tabIndex:0,ref:Ht,className:es(F,z,k==null?void 0:k.toast,f==null||(e=f.classNames)==null?void 0:e.toast,k==null?void 0:k.default,k==null?void 0:k[qe],f==null||(n=f.classNames)==null?void 0:n[qe]),"data-sonner-toast":"","data-rich-colors":(rt=f.richColors)!=null?rt:T,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":te,"data-promise":!!f.promise,"data-swiped":Ce,"data-removed":Ae,"data-visible":zt,"data-y-position":Ue,"data-x-position":ke,"data-index":w,"data-front":Lt,"data-swiping":de,"data-dismissible":Z,"data-type":qe,"data-invert":He,"data-swipe-out":fe,"data-swipe-direction":W,"data-expanded":!!(E||U&&te),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${Ae?Ze:Le.current}px`,"--initial-height":U?"auto":`${St}px`,...N,...f.style},onDragEnd:()=>{pe(!1),J(null),nt.current=null},onPointerDown:he=>{vt||!Z||(re.current=new Date,tt(Le.current),he.target.setPointerCapture(he.pointerId),he.target.tagName!=="BUTTON"&&(pe(!0),nt.current={x:he.clientX,y:he.clientY}))},onPointerUp:()=>{var he,Qe,ht;if(fe||!Z)return;nt.current=null;const Gt=Number(((he=Ht.current)==null?void 0:he.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qt=Number(((Qe=Ht.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),mn=new Date().getTime()-((ht=re.current)==null?void 0:ht.getTime()),En=Y==="x"?Gt:Qt,Oi=Math.abs(En)/mn;if(Math.abs(En)>=GZ||Oi>.11){tt(Le.current),f.onDismiss==null||f.onDismiss.call(f,f),H(Y==="x"?Gt>0?"right":"left":Qt>0?"down":"up"),ae(),ce(!0);return}else{var ee,oe;(ee=Ht.current)==null||ee.style.setProperty("--swipe-amount-x","0px"),(oe=Ht.current)==null||oe.style.setProperty("--swipe-amount-y","0px")}ye(!1),pe(!1),J(null)},onPointerMove:he=>{var Qe,ht,Gt;if(!nt.current||!Z||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;const mn=he.clientY-nt.current.y,En=he.clientX-nt.current.x;var Oi;const ee=(Oi=t.swipeDirections)!=null?Oi:qZ(q);!Y&&(Math.abs(En)>1||Math.abs(mn)>1)&&J(Math.abs(En)>Math.abs(mn)?"x":"y");let oe={x:0,y:0};const Se=De=>1/(1.5+Math.abs(De)/20);if(Y==="y"){if(ee.includes("top")||ee.includes("bottom"))if(ee.includes("top")&&mn<0||ee.includes("bottom")&&mn>0)oe.y=mn;else{const De=mn*Se(mn);oe.y=Math.abs(De)<Math.abs(mn)?De:mn}}else if(Y==="x"&&(ee.includes("left")||ee.includes("right")))if(ee.includes("left")&&En<0||ee.includes("right")&&En>0)oe.x=En;else{const De=En*Se(En);oe.x=Math.abs(De)<Math.abs(En)?De:En}(Math.abs(oe.x)>0||Math.abs(oe.y)>0)&&ye(!0),(ht=Ht.current)==null||ht.style.setProperty("--swipe-amount-x",`${oe.x}px`),(Gt=Ht.current)==null||Gt.style.setProperty("--swipe-amount-y",`${oe.y}px`)}},Pe&&!f.jsx&&qe!=="loading"?K.createElement("button",{"aria-label":$,"data-disabled":vt,"data-close-button":!0,onClick:vt||!Z?()=>{}:()=>{ae(),f.onDismiss==null||f.onDismiss.call(f,f)},className:es(k==null?void 0:k.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},($e=V==null?void 0:V.close)!=null?$e:jZ):null,(qe||f.icon||f.promise)&&f.icon!==null&&((V==null?void 0:V[qe])!==null||f.icon)?K.createElement("div",{"data-icon":"",className:es(k==null?void 0:k.icon,f==null||(i=f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||Re():null,f.type!=="loading"?Ie:null):null,K.createElement("div",{"data-content":"",className:es(k==null?void 0:k.content,f==null||(a=f.classNames)==null?void 0:a.content)},K.createElement("div",{"data-title":"",className:es(k==null?void 0:k.title,f==null||(s=f.classNames)==null?void 0:s.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?K.createElement("div",{"data-description":"",className:es(D,ie,k==null?void 0:k.description,f==null||(o=f.classNames)==null?void 0:o.description)},typeof f.description=="function"?f.description():f.description):null),K.isValidElement(f.cancel)?f.cancel:f.cancel&&M0(f.cancel)?K.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||P,onClick:he=>{M0(f.cancel)&&Z&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,he),ae())},className:es(k==null?void 0:k.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,K.isValidElement(f.action)?f.action:f.action&&M0(f.action)?K.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||R,onClick:he=>{M0(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,he),!he.defaultPrevented&&ae())},className:es(k==null?void 0:k.actionButton,f==null||(l=f.classNames)==null?void 0:l.actionButton)},f.action.label):null)};function D5(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function KZ(t,e){const n={};return[t,e].forEach((r,i)=>{const a=i===1,s=a?"--mobile-offset":"--offset",o=a?$Z:zZ;function c(l){["top","right","bottom","left"].forEach(h=>{n[`${s}-${h}`]=typeof l=="number"?`${l}px`:l})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(l=>{r[l]===void 0?n[`${s}-${l}`]=o:n[`${s}-${l}`]=typeof r[l]=="number"?`${r[l]}px`:r[l]}):c(o)}),n}const YZ=K.forwardRef(function(e,n){const{invert:r,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:o,className:c,offset:l,mobileOffset:h,theme:f="light",richColors:m,duration:g,style:b,visibleToasts:y=BZ,toastOptions:v,dir:w=D5(),gap:_=HZ,icons:E,containerAriaLabel:M="Notifications"}=e,[T,A]=K.useState([]),N=K.useMemo(()=>Array.from(new Set([i].concat(T.filter(W=>W.position).map(W=>W.position)))),[T,i]),[P,R]=K.useState([]),[F,D]=K.useState(!1),[L,q]=K.useState(!1),[I,U]=K.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=K.useRef(null),V=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=K.useRef(null),Y=K.useRef(!1),J=K.useCallback(W=>{A(H=>{var te;return(te=H.find(we=>we.id===W.id))!=null&&te.delete||Ai.dismiss(W.id),H.filter(({id:we})=>we!==W.id)})},[]);return K.useEffect(()=>Ai.subscribe(W=>{if(W.dismiss){requestAnimationFrame(()=>{A(H=>H.map(te=>te.id===W.id?{...te,delete:!0}:te))});return}setTimeout(()=>{LB.flushSync(()=>{A(H=>{const te=H.findIndex(we=>we.id===W.id);return te!==-1?[...H.slice(0,te),{...H[te],...W},...H.slice(te+1)]:[W,...H]})})})}),[T]),K.useEffect(()=>{if(f!=="system"){U(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:H})=>{U(H?"dark":"light")})}catch{W.addListener(({matches:te})=>{try{U(te?"dark":"light")}catch(we){console.error(we)}})}},[f]),K.useEffect(()=>{T.length<=1&&D(!1)},[T]),K.useEffect(()=>{const W=H=>{var te;if(a.every(ne=>H[ne]||H.code===ne)){var Ae;D(!0),(Ae=k.current)==null||Ae.focus()}H.code==="Escape"&&(document.activeElement===k.current||(te=k.current)!=null&&te.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[a]),K.useEffect(()=>{if(k.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,Y.current=!1)}},[k.current]),K.createElement("section",{ref:n,"aria-label":`${M} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((W,H)=>{var te;const[we,Ae]=W.split("-");return T.length?K.createElement("ol",{key:W,dir:w==="auto"?D5():w,tabIndex:-1,ref:k,className:c,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":we,"data-lifted":F&&T.length>1&&!s,"data-x-position":Ae,style:{"--front-toast-height":`${((te=P[0])==null?void 0:te.height)||0}px`,"--width":`${VZ}px`,"--gap":`${_}px`,...b,...KZ(l,h)},onBlur:ne=>{Y.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(Y.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,$.current=ne.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{L||D(!1)},onDragEnd:()=>D(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},T.filter(ne=>!ne.position&&H===0||ne.position===W).map((ne,de)=>{var pe,fe;return K.createElement(XZ,{key:ne.id,icons:E,index:de,toast:ne,defaultRichColors:m,duration:(pe=v==null?void 0:v.duration)!=null?pe:g,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:y,closeButton:(fe=v==null?void 0:v.closeButton)!=null?fe:o,interacting:L,position:W,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:J,toasts:T.filter(ce=>ce.position==ne.position),heights:P.filter(ce=>ce.position==ne.position),setHeights:R,expandByDefault:s,gap:_,expanded:F,swipeDirections:e.swipeDirections})})):null}))}),ZZ=({...t})=>{const{theme:e="system"}=SZ();return d.jsx(YZ,{theme:e,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})},k5=[{path:"/",label:"工作台",icon:Iy},{path:"/furnace-diagnosis",label:"高炉诊断",icon:gl},{path:"/intelligent-converter",label:"智能转炉",icon:Zu},{path:"/quality-tracing",label:"质量溯源",icon:Ni},{path:"/monitoring",label:"监控中心",icon:xY},{path:"/industrial-dashboard",label:"监控大屏",icon:wY},{path:"/knowledge-graph",label:"知识图谱",icon:Qh},{path:"/knowledge-fusion",label:"知识融合",icon:GM},{path:"/entity-extraction",label:"实体抽取",icon:kY},{path:"/rag-system",label:"智能检索",icon:Ju},{path:"/prompt-engineering",label:"Prompt工程",icon:Ec},{path:"/model-management",label:"模型管理",icon:Jp},{path:"/human-machine",label:"人机协同",icon:Gd},{path:"/digital-twin",label:"数字孪生",icon:jh},{path:"/edge-cloud-sync",label:"边缘云同步",icon:HM},{path:"/data-collection",label:"数据采集",icon:vl},{path:"/data-governance",label:"数据标准",icon:Mc},{path:"/economic-analysis",label:"经济分析",icon:PK}];function JZ(){const t=Sl();return d.jsxs("div",{className:"h-screen flex flex-col bg-gradient-to-br from-slate-950 via-slate-900 to-slate-950",children:[d.jsx(xZ,{}),d.jsx(ZZ,{position:"top-right",richColors:!0,closeButton:!0,toastOptions:{style:{background:"#1e293b",border:"1px solid #334155",color:"#fff"}}}),d.jsxs("header",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-800/50 bg-slate-900/50 backdrop-blur-sm relative z-10",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center",children:d.jsx(Iy,{className:"w-6 h-6 text-white"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"font-semibold text-white",children:"流程工业AI平台"}),d.jsx("p",{className:"text-xs text-slate-400",children:"知识增强多模态大模型系统"})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-blue-500/10 border border-blue-500/30",children:d.jsx("span",{className:"text-xs text-blue-400",children:"钢铁行业"})}),d.jsx("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-purple-500/10 border border-purple-500/30",children:d.jsx("span",{className:"text-xs text-purple-400",children:"有色冶金"})}),d.jsxs("button",{className:"p-2 rounded-lg hover:bg-slate-800 transition-colors relative",children:[d.jsx(Oy,{className:"w-5 h-5 text-slate-400"}),d.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 bg-red-500 rounded-full"})]}),d.jsx("button",{className:"p-2 rounded-lg hover:bg-slate-800 transition-colors",children:d.jsx(sd,{className:"w-5 h-5 text-slate-400"})}),d.jsx("button",{className:"p-2 rounded-lg hover:bg-slate-800 transition-colors",children:d.jsx(jB,{className:"w-5 h-5 text-slate-400"})})]})]}),d.jsx("nav",{className:"px-6 py-3 border-b border-slate-800/50 bg-slate-900/30 backdrop-blur-sm overflow-x-auto",children:d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:k5.slice(0,9).map(e=>{const n=e.icon,r=t.pathname===e.path;return d.jsxs(ev,{to:e.path,className:`flex items-center gap-2 px-4 py-2 rounded-lg transition-all whitespace-nowrap ${r?"bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-lg shadow-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800/50"}`,children:[d.jsx(n,{className:"w-4 h-4"}),d.jsx("span",{className:"text-sm font-medium",children:e.label})]},e.path)})})}),d.jsx("nav",{className:"px-6 py-2 border-b border-slate-800/50 bg-slate-900/20 backdrop-blur-sm overflow-x-auto",children:d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:k5.slice(9).map(e=>{const n=e.icon,r=t.pathname===e.path;return d.jsxs(ev,{to:e.path,className:`flex items-center gap-2 px-4 py-1.5 rounded-lg transition-all whitespace-nowrap text-xs ${r?"bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-lg shadow-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800/50"}`,children:[d.jsx(n,{className:"w-3 h-3"}),d.jsx("span",{className:"font-medium",children:e.label})]},e.path)})})}),d.jsx("main",{className:"flex-1 overflow-auto",children:d.jsx(NX,{})})]})}function FB(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=FB(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Yt(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=FB(t))&&(r&&(r+=" "),r+=e);return r}var v1,L5;function ji(){if(L5)return v1;L5=1;var t=Array.isArray;return v1=t,v1}var y1,F5;function UB(){if(F5)return y1;F5=1;var t=typeof x0=="object"&&x0&&x0.Object===Object&&x0;return y1=t,y1}var x1,U5;function Cs(){if(U5)return x1;U5=1;var t=UB(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return x1=n,x1}var b1,B5;function em(){if(B5)return b1;B5=1;var t=Cs(),e=t.Symbol;return b1=e,b1}var w1,z5;function QZ(){if(z5)return w1;z5=1;var t=em(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,i=t?t.toStringTag:void 0;function a(s){var o=n.call(s,i),c=s[i];try{s[i]=void 0;var l=!0}catch{}var h=r.call(s);return l&&(o?s[i]=c:delete s[i]),h}return w1=a,w1}var _1,$5;function eJ(){if($5)return _1;$5=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return _1=n,_1}var S1,V5;function xo(){if(V5)return S1;V5=1;var t=em(),e=QZ(),n=eJ(),r="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(o){return o==null?o===void 0?i:r:a&&a in Object(o)?e(o):n(o)}return S1=s,S1}var M1,H5;function bo(){if(H5)return M1;H5=1;function t(e){return e!=null&&typeof e=="object"}return M1=t,M1}var E1,G5;function qd(){if(G5)return E1;G5=1;var t=xo(),e=bo(),n="[object Symbol]";function r(i){return typeof i=="symbol"||e(i)&&t(i)==n}return E1=r,E1}var T1,W5;function lN(){if(W5)return T1;W5=1;var t=ji(),e=qd(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,s){if(t(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||e(a)?!0:r.test(a)||!n.test(a)||s!=null&&a in Object(s)}return T1=i,T1}var A1,q5;function Ml(){if(q5)return A1;q5=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return A1=t,A1}var N1,X5;function cN(){if(X5)return N1;X5=1;var t=xo(),e=Ml(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(o){if(!e(o))return!1;var c=t(o);return c==r||c==i||c==n||c==a}return N1=s,N1}var P1,K5;function tJ(){if(K5)return P1;K5=1;var t=Cs(),e=t["__core-js_shared__"];return P1=e,P1}var C1,Y5;function nJ(){if(Y5)return C1;Y5=1;var t=tJ(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return C1=n,C1}var R1,Z5;function BB(){if(Z5)return R1;Z5=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return R1=n,R1}var j1,J5;function rJ(){if(J5)return j1;J5=1;var t=cN(),e=nJ(),n=Ml(),r=BB(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,c=s.toString,l=o.hasOwnProperty,h=RegExp("^"+c.call(l).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(m){if(!n(m)||e(m))return!1;var g=t(m)?h:a;return g.test(r(m))}return j1=f,j1}var O1,Q5;function iJ(){if(Q5)return O1;Q5=1;function t(e,n){return e==null?void 0:e[n]}return O1=t,O1}var I1,ej;function Uc(){if(ej)return I1;ej=1;var t=rJ(),e=iJ();function n(r,i){var a=e(r,i);return t(a)?a:void 0}return I1=n,I1}var D1,tj;function ky(){if(tj)return D1;tj=1;var t=Uc(),e=t(Object,"create");return D1=e,D1}var k1,nj;function aJ(){if(nj)return k1;nj=1;var t=ky();function e(){this.__data__=t?t(null):{},this.size=0}return k1=e,k1}var L1,rj;function sJ(){if(rj)return L1;rj=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return L1=t,L1}var F1,ij;function oJ(){if(ij)return F1;ij=1;var t=ky(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var s=this.__data__;if(t){var o=s[a];return o===e?void 0:o}return r.call(s,a)?s[a]:void 0}return F1=i,F1}var U1,aj;function lJ(){if(aj)return U1;aj=1;var t=ky(),e=Object.prototype,n=e.hasOwnProperty;function r(i){var a=this.__data__;return t?a[i]!==void 0:n.call(a,i)}return U1=r,U1}var B1,sj;function cJ(){if(sj)return B1;sj=1;var t=ky(),e="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=t&&i===void 0?e:i,this}return B1=n,B1}var z1,oj;function uJ(){if(oj)return z1;oj=1;var t=aJ(),e=sJ(),n=oJ(),r=lJ(),i=cJ();function a(s){var o=-1,c=s==null?0:s.length;for(this.clear();++o<c;){var l=s[o];this.set(l[0],l[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,z1=a,z1}var $1,lj;function dJ(){if(lj)return $1;lj=1;function t(){this.__data__=[],this.size=0}return $1=t,$1}var V1,cj;function uN(){if(cj)return V1;cj=1;function t(e,n){return e===n||e!==e&&n!==n}return V1=t,V1}var H1,uj;function Ly(){if(uj)return H1;uj=1;var t=uN();function e(n,r){for(var i=n.length;i--;)if(t(n[i][0],r))return i;return-1}return H1=e,H1}var G1,dj;function fJ(){if(dj)return G1;dj=1;var t=Ly(),e=Array.prototype,n=e.splice;function r(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var o=a.length-1;return s==o?a.pop():n.call(a,s,1),--this.size,!0}return G1=r,G1}var W1,fj;function hJ(){if(fj)return W1;fj=1;var t=Ly();function e(n){var r=this.__data__,i=t(r,n);return i<0?void 0:r[i][1]}return W1=e,W1}var q1,hj;function pJ(){if(hj)return q1;hj=1;var t=Ly();function e(n){return t(this.__data__,n)>-1}return q1=e,q1}var X1,pj;function mJ(){if(pj)return X1;pj=1;var t=Ly();function e(n,r){var i=this.__data__,a=t(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return X1=e,X1}var K1,mj;function Fy(){if(mj)return K1;mj=1;var t=dJ(),e=fJ(),n=hJ(),r=pJ(),i=mJ();function a(s){var o=-1,c=s==null?0:s.length;for(this.clear();++o<c;){var l=s[o];this.set(l[0],l[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,K1=a,K1}var Y1,gj;function dN(){if(gj)return Y1;gj=1;var t=Uc(),e=Cs(),n=t(e,"Map");return Y1=n,Y1}var Z1,vj;function gJ(){if(vj)return Z1;vj=1;var t=uJ(),e=Fy(),n=dN();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return Z1=r,Z1}var J1,yj;function vJ(){if(yj)return J1;yj=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return J1=t,J1}var Q1,xj;function Uy(){if(xj)return Q1;xj=1;var t=vJ();function e(n,r){var i=n.__data__;return t(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Q1=e,Q1}var ew,bj;function yJ(){if(bj)return ew;bj=1;var t=Uy();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return ew=e,ew}var tw,wj;function xJ(){if(wj)return tw;wj=1;var t=Uy();function e(n){return t(this,n).get(n)}return tw=e,tw}var nw,_j;function bJ(){if(_j)return nw;_j=1;var t=Uy();function e(n){return t(this,n).has(n)}return nw=e,nw}var rw,Sj;function wJ(){if(Sj)return rw;Sj=1;var t=Uy();function e(n,r){var i=t(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return rw=e,rw}var iw,Mj;function fN(){if(Mj)return iw;Mj=1;var t=gJ(),e=yJ(),n=xJ(),r=bJ(),i=wJ();function a(s){var o=-1,c=s==null?0:s.length;for(this.clear();++o<c;){var l=s[o];this.set(l[0],l[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,iw=a,iw}var aw,Ej;function zB(){if(Ej)return aw;Ej=1;var t=fN(),e="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,o=i?i.apply(this,s):s[0],c=a.cache;if(c.has(o))return c.get(o);var l=r.apply(this,s);return a.cache=c.set(o,l)||c,l};return a.cache=new(n.Cache||t),a}return n.Cache=t,aw=n,aw}var sw,Tj;function _J(){if(Tj)return sw;Tj=1;var t=zB(),e=500;function n(r){var i=t(r,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return sw=n,sw}var ow,Aj;function SJ(){if(Aj)return ow;Aj=1;var t=_J(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,o,c,l){a.push(c?l.replace(n,"$1"):o||s)}),a});return ow=r,ow}var lw,Nj;function hN(){if(Nj)return lw;Nj=1;function t(e,n){for(var r=-1,i=e==null?0:e.length,a=Array(i);++r<i;)a[r]=n(e[r],r,e);return a}return lw=t,lw}var cw,Pj;function MJ(){if(Pj)return cw;Pj=1;var t=em(),e=hN(),n=ji(),r=qd(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(o){if(typeof o=="string")return o;if(n(o))return e(o,s)+"";if(r(o))return a?a.call(o):"";var c=o+"";return c=="0"&&1/o==-1/0?"-0":c}return cw=s,cw}var uw,Cj;function $B(){if(Cj)return uw;Cj=1;var t=MJ();function e(n){return n==null?"":t(n)}return uw=e,uw}var dw,Rj;function VB(){if(Rj)return dw;Rj=1;var t=ji(),e=lN(),n=SJ(),r=$B();function i(a,s){return t(a)?a:e(a,s)?[a]:n(r(a))}return dw=i,dw}var fw,jj;function By(){if(jj)return fw;jj=1;var t=qd();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return fw=e,fw}var hw,Oj;function pN(){if(Oj)return hw;Oj=1;var t=VB(),e=By();function n(r,i){i=t(i,r);for(var a=0,s=i.length;r!=null&&a<s;)r=r[e(i[a++])];return a&&a==s?r:void 0}return hw=n,hw}var pw,Ij;function HB(){if(Ij)return pw;Ij=1;var t=pN();function e(n,r,i){var a=n==null?void 0:t(n,r);return a===void 0?i:a}return pw=e,pw}var EJ=HB();const Xi=Mn(EJ);var mw,Dj;function TJ(){if(Dj)return mw;Dj=1;function t(e){return e==null}return mw=t,mw}var AJ=TJ();const Kt=Mn(AJ);var gw,kj;function NJ(){if(kj)return gw;kj=1;var t=xo(),e=ji(),n=bo(),r="[object String]";function i(a){return typeof a=="string"||!e(a)&&n(a)&&t(a)==r}return gw=i,gw}var PJ=NJ();const tm=Mn(PJ);var CJ=cN();const Dt=Mn(CJ);var RJ=Ml();const Xd=Mn(RJ);var vw={exports:{}},An={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Lj;function jJ(){if(Lj)return An;Lj=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var w=v.$$typeof;switch(w){case t:switch(v=v.type,v){case n:case i:case r:case l:case h:return v;default:switch(v=v&&v.$$typeof,v){case o:case s:case c:case m:case f:case a:return v;default:return w}}case e:return w}}}return An.ContextConsumer=s,An.ContextProvider=a,An.Element=t,An.ForwardRef=c,An.Fragment=n,An.Lazy=m,An.Memo=f,An.Portal=e,An.Profiler=i,An.StrictMode=r,An.Suspense=l,An.SuspenseList=h,An.isAsyncMode=function(){return!1},An.isConcurrentMode=function(){return!1},An.isContextConsumer=function(v){return y(v)===s},An.isContextProvider=function(v){return y(v)===a},An.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},An.isForwardRef=function(v){return y(v)===c},An.isFragment=function(v){return y(v)===n},An.isLazy=function(v){return y(v)===m},An.isMemo=function(v){return y(v)===f},An.isPortal=function(v){return y(v)===e},An.isProfiler=function(v){return y(v)===i},An.isStrictMode=function(v){return y(v)===r},An.isSuspense=function(v){return y(v)===l},An.isSuspenseList=function(v){return y(v)===h},An.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===i||v===r||v===l||v===h||v===g||typeof v=="object"&&v!==null&&(v.$$typeof===m||v.$$typeof===f||v.$$typeof===a||v.$$typeof===s||v.$$typeof===c||v.$$typeof===b||v.getModuleId!==void 0)},An.typeOf=y,An}var Fj;function OJ(){return Fj||(Fj=1,vw.exports=jJ()),vw.exports}var IJ=OJ(),yw,Uj;function GB(){if(Uj)return yw;Uj=1;var t=xo(),e=bo(),n="[object Number]";function r(i){return typeof i=="number"||e(i)&&t(i)==n}return yw=r,yw}var xw,Bj;function DJ(){if(Bj)return xw;Bj=1;var t=GB();function e(n){return t(n)&&n!=+n}return xw=e,xw}var kJ=DJ();const Kd=Mn(kJ);var LJ=GB();const FJ=Mn(LJ);var ui=function(e){return e===0?0:e>0?1:-1},lc=function(e){return tm(e)&&e.indexOf("%")===e.length-1},Je=function(e){return FJ(e)&&!Kd(e)},xr=function(e){return Je(e)||tm(e)},UJ=0,Bc=function(e){var n=++UJ;return"".concat(e||"").concat(n)},di=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Je(e)&&!tm(e))return r;var a;if(lc(e)){var s=e.indexOf("%");a=n*parseFloat(e.slice(0,s))/100}else a=+e;return Kd(a)&&(a=r),i&&a>n&&(a=n),a},il=function(e){if(!e)return null;var n=Object.keys(e);return n&&n.length?e[n[0]]:null},BJ=function(e){if(!Array.isArray(e))return!1;for(var n=e.length,r={},i=0;i<n;i++)if(!r[e[i]])r[e[i]]=!0;else return!0;return!1},Kn=function(e,n){return Je(e)&&Je(n)?function(r){return e+r*(n-e)}:function(){return n}};function av(t,e,n){return!t||!t.length?null:t.find(function(r){return r&&(typeof e=="function"?e(r):Xi(r,e))===n})}function Qu(t,e){for(var n in t)if({}.hasOwnProperty.call(t,n)&&(!{}.hasOwnProperty.call(e,n)||t[n]!==e[n]))return!1;for(var r in e)if({}.hasOwnProperty.call(e,r)&&!{}.hasOwnProperty.call(t,r))return!1;return!0}function XM(t){"@babel/helpers - typeof";return XM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XM(t)}var zJ=["viewBox","children"],$J=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],zj=["points","pathLength"],bw={svg:zJ,polygon:zj,polyline:zj},mN=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],sv=function(e,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(O.isValidElement(e)&&(r=e.props),!Xd(r))return null;var i={};return Object.keys(r).forEach(function(a){mN.includes(a)&&(i[a]=n||function(s){return r[a](r,s)})}),i},VJ=function(e,n,r){return function(i){return e(n,r,i),null}},Tc=function(e,n,r){if(!Xd(e)||XM(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var s=e[a];mN.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=VJ(s,n,r))}),i},HJ=["children"],GJ=["children"];function $j(t,e){if(t==null)return{};var n=WJ(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function WJ(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function KM(t){"@babel/helpers - typeof";return KM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KM(t)}var Vj={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},oo=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},Hj=null,ww=null,gN=function t(e){if(e===Hj&&Array.isArray(ww))return ww;var n=[];return O.Children.forEach(e,function(r){Kt(r)||(IJ.isFragment(r)?n=n.concat(t(r.props.children)):n.push(r))}),ww=n,Hj=e,n};function Ki(t,e){var n=[],r=[];return Array.isArray(e)?r=e.map(function(i){return oo(i)}):r=[oo(e)],gN(t).forEach(function(i){var a=Xi(i,"type.displayName")||Xi(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Vi(t,e){var n=Ki(t,e);return n&&n[0]}var Gj=function(e){if(!e||!e.props)return!1;var n=e.props,r=n.width,i=n.height;return!(!Je(r)||r<=0||!Je(i)||i<=0)},qJ=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],XJ=function(e){return e&&e.type&&tm(e.type)&&qJ.indexOf(e.type)>=0},WB=function(e){return e&&KM(e)==="object"&&"clipDot"in e},KJ=function(e,n,r,i){var a,s=(a=bw==null?void 0:bw[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!Dt(e)&&(i&&s.includes(n)||$J.includes(n))||r&&mN.includes(n)},Pt=function(e,n,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(O.isValidElement(e)&&(i=e.props),!Xd(i))return null;var a={};return Object.keys(i).forEach(function(s){var o;KJ((o=i)===null||o===void 0?void 0:o[s],s,n,r)&&(a[s]=i[s])}),a},YM=function t(e,n){if(e===n)return!0;var r=O.Children.count(e);if(r!==O.Children.count(n))return!1;if(r===0)return!0;if(r===1)return Wj(Array.isArray(e)?e[0]:e,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=e[i],s=n[i];if(Array.isArray(a)||Array.isArray(s)){if(!t(a,s))return!1}else if(!Wj(a,s))return!1}return!0},Wj=function(e,n){if(Kt(e)&&Kt(n))return!0;if(!Kt(e)&&!Kt(n)){var r=e.props||{},i=r.children,a=$j(r,HJ),s=n.props||{},o=s.children,c=$j(s,GJ);return i&&o?Qu(a,c)&&YM(i,o):!i&&!o?Qu(a,c):!1}return!1},qj=function(e,n){var r=[],i={};return gN(e).forEach(function(a,s){if(XJ(a))r.push(a);else if(a){var o=oo(a.type),c=n[o]||{},l=c.handler,h=c.once;if(l&&(!h||!i[o])){var f=l(a,o,s);r.push(f),i[o]=!0}}}),r},YJ=function(e){var n=e&&e.type;return n&&Vj[n]?Vj[n]:null},ZJ=function(e,n){return gN(n).indexOf(e)},JJ=["children","width","height","viewBox","className","style","title","desc"];function ZM(){return ZM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ZM.apply(this,arguments)}function QJ(t,e){if(t==null)return{};var n=eQ(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function eQ(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function JM(t){var e=t.children,n=t.width,r=t.height,i=t.viewBox,a=t.className,s=t.style,o=t.title,c=t.desc,l=QJ(t,JJ),h=i||{width:n,height:r,x:0,y:0},f=Yt("recharts-surface",a);return K.createElement("svg",ZM({},Pt(l,!0,"svg"),{className:f,width:n,height:r,style:s,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),K.createElement("title",null,o),K.createElement("desc",null,c),e)}var tQ=["children","className"];function QM(){return QM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},QM.apply(this,arguments)}function nQ(t,e){if(t==null)return{};var n=rQ(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rQ(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var an=K.forwardRef(function(t,e){var n=t.children,r=t.className,i=nQ(t,tQ),a=Yt("recharts-layer",r);return K.createElement("g",QM({className:a},Pt(i,!0),{ref:e}),n)}),$a=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]},_w,Xj;function iQ(){if(Xj)return _w;Xj=1;function t(e,n,r){var i=-1,a=e.length;n<0&&(n=-n>a?0:a+n),r=r>a?a:r,r<0&&(r+=a),a=n>r?0:r-n>>>0,n>>>=0;for(var s=Array(a);++i<a;)s[i]=e[i+n];return s}return _w=t,_w}var Sw,Kj;function aQ(){if(Kj)return Sw;Kj=1;var t=iQ();function e(n,r,i){var a=n.length;return i=i===void 0?a:i,!r&&i>=a?n:t(n,r,i)}return Sw=e,Sw}var Mw,Yj;function qB(){if(Yj)return Mw;Yj=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=e+n+r,a="\\ufe0e\\ufe0f",s="\\u200d",o=RegExp("["+s+t+i+a+"]");function c(l){return o.test(l)}return Mw=c,Mw}var Ew,Zj;function sQ(){if(Zj)return Ew;Zj=1;function t(e){return e.split("")}return Ew=t,Ew}var Tw,Jj;function oQ(){if(Jj)return Tw;Jj=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=e+n+r,a="\\ufe0e\\ufe0f",s="["+t+"]",o="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",l="(?:"+o+"|"+c+")",h="[^"+t+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=l+"?",y="["+a+"]?",v="(?:"+g+"(?:"+[h,f,m].join("|")+")"+y+b+")*",w=y+b+v,_="(?:"+[h+o+"?",o,f,m,s].join("|")+")",E=RegExp(c+"(?="+c+")|"+_+w,"g");function M(T){return T.match(E)||[]}return Tw=M,Tw}var Aw,Qj;function lQ(){if(Qj)return Aw;Qj=1;var t=sQ(),e=qB(),n=oQ();function r(i){return e(i)?n(i):t(i)}return Aw=r,Aw}var Nw,eO;function cQ(){if(eO)return Nw;eO=1;var t=aQ(),e=qB(),n=lQ(),r=$B();function i(a){return function(s){s=r(s);var o=e(s)?n(s):void 0,c=o?o[0]:s.charAt(0),l=o?t(o,1).join(""):s.slice(1);return c[a]()+l}}return Nw=i,Nw}var Pw,tO;function uQ(){if(tO)return Pw;tO=1;var t=cQ(),e=t("toUpperCase");return Pw=e,Pw}var dQ=uQ();const zy=Mn(dQ);function kn(t){return function(){return t}}const XB=Math.cos,ov=Math.sin,Wa=Math.sqrt,lv=Math.PI,$y=2*lv,eE=Math.PI,tE=2*eE,ec=1e-6,fQ=tE-ec;function KB(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function hQ(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return KB;const n=10**e;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class pQ{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?KB:hQ(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,a,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,n,r,i,a){if(e=+e,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,c=r-e,l=i-n,h=s-e,f=o-n,m=h*h+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(m>ec)if(!(Math.abs(f*c-l*h)>ec)||!a)this._append`L${this._x1=e},${this._y1=n}`;else{let g=r-s,b=i-o,y=c*c+l*l,v=g*g+b*b,w=Math.sqrt(y),_=Math.sqrt(m),E=a*Math.tan((eE-Math.acos((y+m-v)/(2*w*_)))/2),M=E/_,T=E/w;Math.abs(M-1)>ec&&this._append`L${e+M*h},${n+M*f}`,this._append`A${a},${a},0,0,${+(f*g>h*b)},${this._x1=e+T*c},${this._y1=n+T*l}`}}arc(e,n,r,i,a,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),c=r*Math.sin(i),l=e+o,h=n+c,f=1^s,m=s?i-a:a-i;this._x1===null?this._append`M${l},${h}`:(Math.abs(this._x1-l)>ec||Math.abs(this._y1-h)>ec)&&this._append`L${l},${h}`,r&&(m<0&&(m=m%tE+tE),m>fQ?this._append`A${r},${r},0,1,${f},${e-o},${n-c}A${r},${r},0,1,${f},${this._x1=l},${this._y1=h}`:m>ec&&this._append`A${r},${r},0,${+(m>=eE)},${f},${this._x1=e+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function vN(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new pQ(e)}function yN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function YB(t){this._context=t}YB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Vy(t){return new YB(t)}function ZB(t){return t[0]}function JB(t){return t[1]}function QB(t,e){var n=kn(!0),r=null,i=Vy,a=null,s=vN(o);t=typeof t=="function"?t:t===void 0?ZB:kn(t),e=typeof e=="function"?e:e===void 0?JB:kn(e);function o(c){var l,h=(c=yN(c)).length,f,m=!1,g;for(r==null&&(a=i(g=s())),l=0;l<=h;++l)!(l<h&&n(f=c[l],l,c))===m&&((m=!m)?a.lineStart():a.lineEnd()),m&&a.point(+t(f,l,c),+e(f,l,c));if(g)return a=null,g+""||null}return o.x=function(c){return arguments.length?(t=typeof c=="function"?c:kn(+c),o):t},o.y=function(c){return arguments.length?(e=typeof c=="function"?c:kn(+c),o):e},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:kn(!!c),o):n},o.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),o):i},o.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),o):r},o}function E0(t,e,n){var r=null,i=kn(!0),a=null,s=Vy,o=null,c=vN(l);t=typeof t=="function"?t:t===void 0?ZB:kn(+t),e=typeof e=="function"?e:kn(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?JB:kn(+n);function l(f){var m,g,b,y=(f=yN(f)).length,v,w=!1,_,E=new Array(y),M=new Array(y);for(a==null&&(o=s(_=c())),m=0;m<=y;++m){if(!(m<y&&i(v=f[m],m,f))===w)if(w=!w)g=m,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),b=m-1;b>=g;--b)o.point(E[b],M[b]);o.lineEnd(),o.areaEnd()}w&&(E[m]=+t(v,m,f),M[m]=+e(v,m,f),o.point(r?+r(v,m,f):E[m],n?+n(v,m,f):M[m]))}if(_)return o=null,_+""||null}function h(){return QB().defined(i).curve(s).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:kn(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:kn(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:kn(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:kn(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:kn(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:kn(+f),l):n},l.lineX0=l.lineY0=function(){return h().x(t).y(e)},l.lineY1=function(){return h().x(t).y(n)},l.lineX1=function(){return h().x(r).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:kn(!!f),l):i},l.curve=function(f){return arguments.length?(s=f,a!=null&&(o=s(a)),l):s},l.context=function(f){return arguments.length?(f==null?a=o=null:o=s(a=f),l):a},l}class e6{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function mQ(t){return new e6(t,!0)}function gQ(t){return new e6(t,!1)}const xN={draw(t,e){const n=Wa(e/lv);t.moveTo(n,0),t.arc(0,0,n,0,$y)}},vQ={draw(t,e){const n=Wa(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},t6=Wa(1/3),yQ=t6*2,xQ={draw(t,e){const n=Wa(e/yQ),r=n*t6;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},bQ={draw(t,e){const n=Wa(e),r=-n/2;t.rect(r,r,n,n)}},wQ=.8908130915292852,n6=ov(lv/10)/ov(7*lv/10),_Q=ov($y/10)*n6,SQ=-XB($y/10)*n6,MQ={draw(t,e){const n=Wa(e*wQ),r=_Q*n,i=SQ*n;t.moveTo(0,-n),t.lineTo(r,i);for(let a=1;a<5;++a){const s=$y*a/5,o=XB(s),c=ov(s);t.lineTo(c*n,-o*n),t.lineTo(o*r-c*i,c*r+o*i)}t.closePath()}},Cw=Wa(3),EQ={draw(t,e){const n=-Wa(e/(Cw*3));t.moveTo(0,n*2),t.lineTo(-Cw*n,-n),t.lineTo(Cw*n,-n),t.closePath()}},oa=-.5,la=Wa(3)/2,nE=1/Wa(12),TQ=(nE/2+1)*3,AQ={draw(t,e){const n=Wa(e/TQ),r=n/2,i=n*nE,a=r,s=n*nE+n,o=-a,c=s;t.moveTo(r,i),t.lineTo(a,s),t.lineTo(o,c),t.lineTo(oa*r-la*i,la*r+oa*i),t.lineTo(oa*a-la*s,la*a+oa*s),t.lineTo(oa*o-la*c,la*o+oa*c),t.lineTo(oa*r+la*i,oa*i-la*r),t.lineTo(oa*a+la*s,oa*s-la*a),t.lineTo(oa*o+la*c,oa*c-la*o),t.closePath()}};function NQ(t,e){let n=null,r=vN(i);t=typeof t=="function"?t:kn(t||xN),e=typeof e=="function"?e:kn(e===void 0?64:+e);function i(){let a;if(n||(n=a=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:kn(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:kn(+a),i):e},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function cv(){}function uv(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function r6(t){this._context=t}r6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:uv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uv(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function PQ(t){return new r6(t)}function i6(t){this._context=t}i6.prototype={areaStart:cv,areaEnd:cv,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:uv(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function CQ(t){return new i6(t)}function a6(t){this._context=t}a6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:uv(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function RQ(t){return new a6(t)}function s6(t){this._context=t}s6.prototype={areaStart:cv,areaEnd:cv,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function jQ(t){return new s6(t)}function nO(t){return t<0?-1:1}function rO(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),o=(a*i+s*r)/(r+i);return(nO(a)+nO(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function iO(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Rw(t,e,n){var r=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-r)/3;t._context.bezierCurveTo(r+o,i+o*e,a-o,s-o*n,a,s)}function dv(t){this._context=t}dv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Rw(this,this._t0,iO(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Rw(this,iO(this,n=rO(this,t,e)),n);break;default:Rw(this,this._t0,n=rO(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function o6(t){this._context=new l6(t)}(o6.prototype=Object.create(dv.prototype)).point=function(t,e){dv.prototype.point.call(this,e,t)};function l6(t){this._context=t}l6.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}};function OQ(t){return new dv(t)}function IQ(t){return new o6(t)}function c6(t){this._context=t}c6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=aO(t),i=aO(e),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function aO(t){var e,n=t.length-1,r,i=new Array(n),a=new Array(n),s=new Array(n);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/a[e-1],a[e]-=r,s[e]-=r*s[e-1];for(i[n-1]=s[n-1]/a[n-1],e=n-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function DQ(t){return new c6(t)}function Hy(t,e){this._context=t,this._t=e}Hy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function kQ(t){return new Hy(t,.5)}function LQ(t){return new Hy(t,0)}function FQ(t){return new Hy(t,1)}function od(t,e){if((s=t.length)>1)for(var n=1,r,i,a=t[e[0]],s,o=a.length;n<s;++n)for(i=a,a=t[e[n]],r=0;r<o;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function rE(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function UQ(t,e){return t[e]}function BQ(t){const e=[];return e.key=t,e}function zQ(){var t=kn([]),e=rE,n=od,r=UQ;function i(a){var s=Array.from(t.apply(this,arguments),BQ),o,c=s.length,l=-1,h;for(const f of a)for(o=0,++l;o<c;++o)(s[o][l]=[0,+r(f,s[o].key,l,a)]).data=f;for(o=0,h=yN(e(s));o<c;++o)s[h[o]].index=o;return n(s,h),s}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:kn(Array.from(a)),i):t},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:kn(+a),i):r},i.order=function(a){return arguments.length?(e=a==null?rE:typeof a=="function"?a:kn(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(n=a??od,i):n},i}function $Q(t,e){if((r=t.length)>0){for(var n,r,i=0,a=t[0].length,s;i<a;++i){for(s=n=0;n<r;++n)s+=t[n][i][1]||0;if(s)for(n=0;n<r;++n)t[n][i][1]/=s}od(t,e)}}function VQ(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,a=r.length;n<a;++n){for(var s=0,o=0;s<i;++s)o+=t[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}od(t,e)}}function HQ(t,e){if(!(!((s=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,a,s;r<a;++r){for(var o=0,c=0,l=0;o<s;++o){for(var h=t[e[o]],f=h[r][1]||0,m=h[r-1][1]||0,g=(f-m)/2,b=0;b<o;++b){var y=t[e[b]],v=y[r][1]||0,w=y[r-1][1]||0;g+=v-w}c+=f,l+=g*f}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,od(t,e)}}function tp(t){"@babel/helpers - typeof";return tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tp(t)}var GQ=["type","size","sizeType"];function iE(){return iE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},iE.apply(this,arguments)}function sO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oO(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sO(Object(n),!0).forEach(function(r){WQ(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function WQ(t,e,n){return e=qQ(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qQ(t){var e=XQ(t,"string");return tp(e)=="symbol"?e:e+""}function XQ(t,e){if(tp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(tp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function KQ(t,e){if(t==null)return{};var n=YQ(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function YQ(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var u6={symbolCircle:xN,symbolCross:vQ,symbolDiamond:xQ,symbolSquare:bQ,symbolStar:MQ,symbolTriangle:EQ,symbolWye:AQ},ZQ=Math.PI/180,JQ=function(e){var n="symbol".concat(zy(e));return u6[n]||xN},QQ=function(e,n,r){if(n==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*ZQ;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},eee=function(e,n){u6["symbol".concat(zy(e))]=n},bN=function(e){var n=e.type,r=n===void 0?"circle":n,i=e.size,a=i===void 0?64:i,s=e.sizeType,o=s===void 0?"area":s,c=KQ(e,GQ),l=oO(oO({},c),{},{type:r,size:a,sizeType:o}),h=function(){var v=JQ(r),w=NQ().type(v).size(QQ(a,o,r));return w()},f=l.className,m=l.cx,g=l.cy,b=Pt(l,!0);return m===+m&&g===+g&&a===+a?K.createElement("path",iE({},b,{className:Yt("recharts-symbols",f),transform:"translate(".concat(m,", ").concat(g,")"),d:h()})):null};bN.registerSymbol=eee;function ld(t){"@babel/helpers - typeof";return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ld(t)}function aE(){return aE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},aE.apply(this,arguments)}function lO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tee(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lO(Object(n),!0).forEach(function(r){np(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function nee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ree(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f6(r.key),r)}}function iee(t,e,n){return e&&ree(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function aee(t,e,n){return e=fv(e),see(t,d6()?Reflect.construct(e,n||[],fv(t).constructor):e.apply(t,n))}function see(t,e){if(e&&(ld(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oee(t)}function oee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d6(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d6=function(){return!!t})()}function fv(t){return fv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fv(t)}function lee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sE(t,e)}function sE(t,e){return sE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sE(t,e)}function np(t,e,n){return e=f6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f6(t){var e=cee(t,"string");return ld(e)=="symbol"?e:e+""}function cee(t,e){if(ld(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ld(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ca=32,wN=(function(t){function e(){return nee(this,e),aee(this,e,arguments)}return lee(e,t),iee(e,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=ca/2,s=ca/6,o=ca/3,c=r.inactive?i:r.color;if(r.type==="plainline")return K.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:ca,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return K.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(o,`
A`).concat(s,",").concat(s,",0,1,1,").concat(2*o,",").concat(a,`
H`).concat(ca,"M").concat(2*o,",").concat(a,`
A`).concat(s,",").concat(s,",0,1,1,").concat(o,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return K.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(ca/8,"h").concat(ca,"v").concat(ca*3/4,"h").concat(-ca,"z"),className:"recharts-legend-icon"});if(K.isValidElement(r.legendIcon)){var l=tee({},r);return delete l.legendIcon,K.cloneElement(r.legendIcon,l)}return K.createElement(bN,{fill:c,cx:a,cy:a,size:ca,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,s=i.iconSize,o=i.layout,c=i.formatter,l=i.inactiveColor,h={x:0,y:0,width:ca,height:ca},f={display:o==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(g,b){var y=g.formatter||c,v=Yt(np(np({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",g.inactive));if(g.type==="none")return null;var w=Dt(g.value)?null:g.value;$a(!Dt(g.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var _=g.inactive?l:g.color;return K.createElement("li",aE({className:v,style:f,key:"legend-item-".concat(b)},Tc(r.props,g,b)),K.createElement(JM,{width:s,height:s,viewBox:h,style:m},r.renderIcon(g)),K.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},y?y(w,g,b):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,s=r.align;if(!i||!i.length)return null;var o={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return K.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])})(O.PureComponent);np(wN,"displayName","Legend");np(wN,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var jw,cO;function uee(){if(cO)return jw;cO=1;var t=Fy();function e(){this.__data__=new t,this.size=0}return jw=e,jw}var Ow,uO;function dee(){if(uO)return Ow;uO=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return Ow=t,Ow}var Iw,dO;function fee(){if(dO)return Iw;dO=1;function t(e){return this.__data__.get(e)}return Iw=t,Iw}var Dw,fO;function hee(){if(fO)return Dw;fO=1;function t(e){return this.__data__.has(e)}return Dw=t,Dw}var kw,hO;function pee(){if(hO)return kw;hO=1;var t=Fy(),e=dN(),n=fN(),r=200;function i(a,s){var o=this.__data__;if(o instanceof t){var c=o.__data__;if(!e||c.length<r-1)return c.push([a,s]),this.size=++o.size,this;o=this.__data__=new n(c)}return o.set(a,s),this.size=o.size,this}return kw=i,kw}var Lw,pO;function h6(){if(pO)return Lw;pO=1;var t=Fy(),e=uee(),n=dee(),r=fee(),i=hee(),a=pee();function s(o){var c=this.__data__=new t(o);this.size=c.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=i,s.prototype.set=a,Lw=s,Lw}var Fw,mO;function mee(){if(mO)return Fw;mO=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return Fw=e,Fw}var Uw,gO;function gee(){if(gO)return Uw;gO=1;function t(e){return this.__data__.has(e)}return Uw=t,Uw}var Bw,vO;function p6(){if(vO)return Bw;vO=1;var t=fN(),e=mee(),n=gee();function r(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,Bw=r,Bw}var zw,yO;function m6(){if(yO)return zw;yO=1;function t(e,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(e[r],r,e))return!0;return!1}return zw=t,zw}var $w,xO;function g6(){if(xO)return $w;xO=1;function t(e,n){return e.has(n)}return $w=t,$w}var Vw,bO;function v6(){if(bO)return Vw;bO=1;var t=p6(),e=m6(),n=g6(),r=1,i=2;function a(s,o,c,l,h,f){var m=c&r,g=s.length,b=o.length;if(g!=b&&!(m&&b>g))return!1;var y=f.get(s),v=f.get(o);if(y&&v)return y==o&&v==s;var w=-1,_=!0,E=c&i?new t:void 0;for(f.set(s,o),f.set(o,s);++w<g;){var M=s[w],T=o[w];if(l)var A=m?l(T,M,w,o,s,f):l(M,T,w,s,o,f);if(A!==void 0){if(A)continue;_=!1;break}if(E){if(!e(o,function(N,P){if(!n(E,P)&&(M===N||h(M,N,c,l,f)))return E.push(P)})){_=!1;break}}else if(!(M===T||h(M,T,c,l,f))){_=!1;break}}return f.delete(s),f.delete(o),_}return Vw=a,Vw}var Hw,wO;function vee(){if(wO)return Hw;wO=1;var t=Cs(),e=t.Uint8Array;return Hw=e,Hw}var Gw,_O;function yee(){if(_O)return Gw;_O=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(i,a){r[++n]=[a,i]}),r}return Gw=t,Gw}var Ww,SO;function _N(){if(SO)return Ww;SO=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(i){r[++n]=i}),r}return Ww=t,Ww}var qw,MO;function xee(){if(MO)return qw;MO=1;var t=em(),e=vee(),n=uN(),r=v6(),i=yee(),a=_N(),s=1,o=2,c="[object Boolean]",l="[object Date]",h="[object Error]",f="[object Map]",m="[object Number]",g="[object RegExp]",b="[object Set]",y="[object String]",v="[object Symbol]",w="[object ArrayBuffer]",_="[object DataView]",E=t?t.prototype:void 0,M=E?E.valueOf:void 0;function T(A,N,P,R,F,D,L){switch(P){case _:if(A.byteLength!=N.byteLength||A.byteOffset!=N.byteOffset)return!1;A=A.buffer,N=N.buffer;case w:return!(A.byteLength!=N.byteLength||!D(new e(A),new e(N)));case c:case l:case m:return n(+A,+N);case h:return A.name==N.name&&A.message==N.message;case g:case y:return A==N+"";case f:var q=i;case b:var I=R&s;if(q||(q=a),A.size!=N.size&&!I)return!1;var U=L.get(A);if(U)return U==N;R|=o,L.set(A,N);var k=r(q(A),q(N),R,F,D,L);return L.delete(A),k;case v:if(M)return M.call(A)==M.call(N)}return!1}return qw=T,qw}var Xw,EO;function y6(){if(EO)return Xw;EO=1;function t(e,n){for(var r=-1,i=n.length,a=e.length;++r<i;)e[a+r]=n[r];return e}return Xw=t,Xw}var Kw,TO;function bee(){if(TO)return Kw;TO=1;var t=y6(),e=ji();function n(r,i,a){var s=i(r);return e(r)?s:t(s,a(r))}return Kw=n,Kw}var Yw,AO;function wee(){if(AO)return Yw;AO=1;function t(e,n){for(var r=-1,i=e==null?0:e.length,a=0,s=[];++r<i;){var o=e[r];n(o,r,e)&&(s[a++]=o)}return s}return Yw=t,Yw}var Zw,NO;function _ee(){if(NO)return Zw;NO=1;function t(){return[]}return Zw=t,Zw}var Jw,PO;function See(){if(PO)return Jw;PO=1;var t=wee(),e=_ee(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(o){return r.call(s,o)}))}:e;return Jw=a,Jw}var Qw,CO;function Mee(){if(CO)return Qw;CO=1;function t(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}return Qw=t,Qw}var e_,RO;function Eee(){if(RO)return e_;RO=1;var t=xo(),e=bo(),n="[object Arguments]";function r(i){return e(i)&&t(i)==n}return e_=r,e_}var t_,jO;function SN(){if(jO)return t_;jO=1;var t=Eee(),e=bo(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(s){return e(s)&&r.call(s,"callee")&&!i.call(s,"callee")};return t_=a,t_}var Sh={exports:{}},n_,OO;function Tee(){if(OO)return n_;OO=1;function t(){return!1}return n_=t,n_}Sh.exports;var IO;function x6(){return IO||(IO=1,(function(t,e){var n=Cs(),r=Tee(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,o=s?n.Buffer:void 0,c=o?o.isBuffer:void 0,l=c||r;t.exports=l})(Sh,Sh.exports)),Sh.exports}var r_,DO;function MN(){if(DO)return r_;DO=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<i}return r_=n,r_}var i_,kO;function EN(){if(kO)return i_;kO=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return i_=e,i_}var a_,LO;function Aee(){if(LO)return a_;LO=1;var t=xo(),e=EN(),n=bo(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",c="[object Function]",l="[object Map]",h="[object Number]",f="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",E="[object Float64Array]",M="[object Int8Array]",T="[object Int16Array]",A="[object Int32Array]",N="[object Uint8Array]",P="[object Uint8ClampedArray]",R="[object Uint16Array]",F="[object Uint32Array]",D={};D[_]=D[E]=D[M]=D[T]=D[A]=D[N]=D[P]=D[R]=D[F]=!0,D[r]=D[i]=D[v]=D[a]=D[w]=D[s]=D[o]=D[c]=D[l]=D[h]=D[f]=D[m]=D[g]=D[b]=D[y]=!1;function L(q){return n(q)&&e(q.length)&&!!D[t(q)]}return a_=L,a_}var s_,FO;function b6(){if(FO)return s_;FO=1;function t(e){return function(n){return e(n)}}return s_=t,s_}var Mh={exports:{}};Mh.exports;var UO;function Nee(){return UO||(UO=1,(function(t,e){var n=UB(),r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===r,s=a&&n.process,o=(function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();t.exports=o})(Mh,Mh.exports)),Mh.exports}var o_,BO;function w6(){if(BO)return o_;BO=1;var t=Aee(),e=b6(),n=Nee(),r=n&&n.isTypedArray,i=r?e(r):t;return o_=i,o_}var l_,zO;function Pee(){if(zO)return l_;zO=1;var t=Mee(),e=SN(),n=ji(),r=x6(),i=MN(),a=w6(),s=Object.prototype,o=s.hasOwnProperty;function c(l,h){var f=n(l),m=!f&&e(l),g=!f&&!m&&r(l),b=!f&&!m&&!g&&a(l),y=f||m||g||b,v=y?t(l.length,String):[],w=v.length;for(var _ in l)(h||o.call(l,_))&&!(y&&(_=="length"||g&&(_=="offset"||_=="parent")||b&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,w)))&&v.push(_);return v}return l_=c,l_}var c_,$O;function Cee(){if($O)return c_;$O=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||t;return n===i}return c_=e,c_}var u_,VO;function _6(){if(VO)return u_;VO=1;function t(e,n){return function(r){return e(n(r))}}return u_=t,u_}var d_,HO;function Ree(){if(HO)return d_;HO=1;var t=_6(),e=t(Object.keys,Object);return d_=e,d_}var f_,GO;function jee(){if(GO)return f_;GO=1;var t=Cee(),e=Ree(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var o in Object(a))r.call(a,o)&&o!="constructor"&&s.push(o);return s}return f_=i,f_}var h_,WO;function nm(){if(WO)return h_;WO=1;var t=cN(),e=EN();function n(r){return r!=null&&e(r.length)&&!t(r)}return h_=n,h_}var p_,qO;function Gy(){if(qO)return p_;qO=1;var t=Pee(),e=jee(),n=nm();function r(i){return n(i)?t(i):e(i)}return p_=r,p_}var m_,XO;function Oee(){if(XO)return m_;XO=1;var t=bee(),e=See(),n=Gy();function r(i){return t(i,n,e)}return m_=r,m_}var g_,KO;function Iee(){if(KO)return g_;KO=1;var t=Oee(),e=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,s,o,c,l,h){var f=o&e,m=t(a),g=m.length,b=t(s),y=b.length;if(g!=y&&!f)return!1;for(var v=g;v--;){var w=m[v];if(!(f?w in s:r.call(s,w)))return!1}var _=h.get(a),E=h.get(s);if(_&&E)return _==s&&E==a;var M=!0;h.set(a,s),h.set(s,a);for(var T=f;++v<g;){w=m[v];var A=a[w],N=s[w];if(c)var P=f?c(N,A,w,s,a,h):c(A,N,w,a,s,h);if(!(P===void 0?A===N||l(A,N,o,c,h):P)){M=!1;break}T||(T=w=="constructor")}if(M&&!T){var R=a.constructor,F=s.constructor;R!=F&&"constructor"in a&&"constructor"in s&&!(typeof R=="function"&&R instanceof R&&typeof F=="function"&&F instanceof F)&&(M=!1)}return h.delete(a),h.delete(s),M}return g_=i,g_}var v_,YO;function Dee(){if(YO)return v_;YO=1;var t=Uc(),e=Cs(),n=t(e,"DataView");return v_=n,v_}var y_,ZO;function kee(){if(ZO)return y_;ZO=1;var t=Uc(),e=Cs(),n=t(e,"Promise");return y_=n,y_}var x_,JO;function S6(){if(JO)return x_;JO=1;var t=Uc(),e=Cs(),n=t(e,"Set");return x_=n,x_}var b_,QO;function Lee(){if(QO)return b_;QO=1;var t=Uc(),e=Cs(),n=t(e,"WeakMap");return b_=n,b_}var w_,eI;function Fee(){if(eI)return w_;eI=1;var t=Dee(),e=dN(),n=kee(),r=S6(),i=Lee(),a=xo(),s=BB(),o="[object Map]",c="[object Object]",l="[object Promise]",h="[object Set]",f="[object WeakMap]",m="[object DataView]",g=s(t),b=s(e),y=s(n),v=s(r),w=s(i),_=a;return(t&&_(new t(new ArrayBuffer(1)))!=m||e&&_(new e)!=o||n&&_(n.resolve())!=l||r&&_(new r)!=h||i&&_(new i)!=f)&&(_=function(E){var M=a(E),T=M==c?E.constructor:void 0,A=T?s(T):"";if(A)switch(A){case g:return m;case b:return o;case y:return l;case v:return h;case w:return f}return M}),w_=_,w_}var __,tI;function Uee(){if(tI)return __;tI=1;var t=h6(),e=v6(),n=xee(),r=Iee(),i=Fee(),a=ji(),s=x6(),o=w6(),c=1,l="[object Arguments]",h="[object Array]",f="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function b(y,v,w,_,E,M){var T=a(y),A=a(v),N=T?h:i(y),P=A?h:i(v);N=N==l?f:N,P=P==l?f:P;var R=N==f,F=P==f,D=N==P;if(D&&s(y)){if(!s(v))return!1;T=!0,R=!1}if(D&&!R)return M||(M=new t),T||o(y)?e(y,v,w,_,E,M):n(y,v,N,w,_,E,M);if(!(w&c)){var L=R&&g.call(y,"__wrapped__"),q=F&&g.call(v,"__wrapped__");if(L||q){var I=L?y.value():y,U=q?v.value():v;return M||(M=new t),E(I,U,w,_,M)}}return D?(M||(M=new t),r(y,v,w,_,E,M)):!1}return __=b,__}var S_,nI;function TN(){if(nI)return S_;nI=1;var t=Uee(),e=bo();function n(r,i,a,s,o){return r===i?!0:r==null||i==null||!e(r)&&!e(i)?r!==r&&i!==i:t(r,i,a,s,n,o)}return S_=n,S_}var M_,rI;function Bee(){if(rI)return M_;rI=1;var t=h6(),e=TN(),n=1,r=2;function i(a,s,o,c){var l=o.length,h=l,f=!c;if(a==null)return!h;for(a=Object(a);l--;){var m=o[l];if(f&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++l<h;){m=o[l];var g=m[0],b=a[g],y=m[1];if(f&&m[2]){if(b===void 0&&!(g in a))return!1}else{var v=new t;if(c)var w=c(b,y,g,a,s,v);if(!(w===void 0?e(y,b,n|r,c,v):w))return!1}}return!0}return M_=i,M_}var E_,iI;function M6(){if(iI)return E_;iI=1;var t=Ml();function e(n){return n===n&&!t(n)}return E_=e,E_}var T_,aI;function zee(){if(aI)return T_;aI=1;var t=M6(),e=Gy();function n(r){for(var i=e(r),a=i.length;a--;){var s=i[a],o=r[s];i[a]=[s,o,t(o)]}return i}return T_=n,T_}var A_,sI;function E6(){if(sI)return A_;sI=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return A_=t,A_}var N_,oI;function $ee(){if(oI)return N_;oI=1;var t=Bee(),e=zee(),n=E6();function r(i){var a=e(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return N_=r,N_}var P_,lI;function Vee(){if(lI)return P_;lI=1;function t(e,n){return e!=null&&n in Object(e)}return P_=t,P_}var C_,cI;function Hee(){if(cI)return C_;cI=1;var t=VB(),e=SN(),n=ji(),r=MN(),i=EN(),a=By();function s(o,c,l){c=t(c,o);for(var h=-1,f=c.length,m=!1;++h<f;){var g=a(c[h]);if(!(m=o!=null&&l(o,g)))break;o=o[g]}return m||++h!=f?m:(f=o==null?0:o.length,!!f&&i(f)&&r(g,f)&&(n(o)||e(o)))}return C_=s,C_}var R_,uI;function Gee(){if(uI)return R_;uI=1;var t=Vee(),e=Hee();function n(r,i){return r!=null&&e(r,i,t)}return R_=n,R_}var j_,dI;function Wee(){if(dI)return j_;dI=1;var t=TN(),e=HB(),n=Gee(),r=lN(),i=M6(),a=E6(),s=By(),o=1,c=2;function l(h,f){return r(h)&&i(f)?a(s(h),f):function(m){var g=e(m,h);return g===void 0&&g===f?n(m,h):t(f,g,o|c)}}return j_=l,j_}var O_,fI;function Yd(){if(fI)return O_;fI=1;function t(e){return e}return O_=t,O_}var I_,hI;function qee(){if(hI)return I_;hI=1;function t(e){return function(n){return n==null?void 0:n[e]}}return I_=t,I_}var D_,pI;function Xee(){if(pI)return D_;pI=1;var t=pN();function e(n){return function(r){return t(r,n)}}return D_=e,D_}var k_,mI;function Kee(){if(mI)return k_;mI=1;var t=qee(),e=Xee(),n=lN(),r=By();function i(a){return n(a)?t(r(a)):e(a)}return k_=i,k_}var L_,gI;function Rs(){if(gI)return L_;gI=1;var t=$ee(),e=Wee(),n=Yd(),r=ji(),i=Kee();function a(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?e(s[0],s[1]):t(s):i(s)}return L_=a,L_}var F_,vI;function T6(){if(vI)return F_;vI=1;function t(e,n,r,i){for(var a=e.length,s=r+(i?1:-1);i?s--:++s<a;)if(n(e[s],s,e))return s;return-1}return F_=t,F_}var U_,yI;function Yee(){if(yI)return U_;yI=1;function t(e){return e!==e}return U_=t,U_}var B_,xI;function Zee(){if(xI)return B_;xI=1;function t(e,n,r){for(var i=r-1,a=e.length;++i<a;)if(e[i]===n)return i;return-1}return B_=t,B_}var z_,bI;function Jee(){if(bI)return z_;bI=1;var t=T6(),e=Yee(),n=Zee();function r(i,a,s){return a===a?n(i,a,s):t(i,e,s)}return z_=r,z_}var $_,wI;function Qee(){if(wI)return $_;wI=1;var t=Jee();function e(n,r){var i=n==null?0:n.length;return!!i&&t(n,r,0)>-1}return $_=e,$_}var V_,_I;function ete(){if(_I)return V_;_I=1;function t(e,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;)if(r(n,e[i]))return!0;return!1}return V_=t,V_}var H_,SI;function tte(){if(SI)return H_;SI=1;function t(){}return H_=t,H_}var G_,MI;function nte(){if(MI)return G_;MI=1;var t=S6(),e=tte(),n=_N(),r=1/0,i=t&&1/n(new t([,-0]))[1]==r?function(a){return new t(a)}:e;return G_=i,G_}var W_,EI;function rte(){if(EI)return W_;EI=1;var t=p6(),e=Qee(),n=ete(),r=g6(),i=nte(),a=_N(),s=200;function o(c,l,h){var f=-1,m=e,g=c.length,b=!0,y=[],v=y;if(h)b=!1,m=n;else if(g>=s){var w=l?null:i(c);if(w)return a(w);b=!1,m=r,v=new t}else v=l?[]:y;e:for(;++f<g;){var _=c[f],E=l?l(_):_;if(_=h||_!==0?_:0,b&&E===E){for(var M=v.length;M--;)if(v[M]===E)continue e;l&&v.push(E),y.push(_)}else m(v,E,h)||(v!==y&&v.push(E),y.push(_))}return y}return W_=o,W_}var q_,TI;function ite(){if(TI)return q_;TI=1;var t=Rs(),e=rte();function n(r,i){return r&&r.length?e(r,t(i,2)):[]}return q_=n,q_}var ate=ite();const AI=Mn(ate);function A6(t,e,n){return e===!0?AI(t,n):Dt(e)?AI(t,e):t}function cd(t){"@babel/helpers - typeof";return cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cd(t)}var ste=["ref"];function NI(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?NI(Object(n),!0).forEach(function(r){Wy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ote(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PI(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P6(r.key),r)}}function lte(t,e,n){return e&&PI(t.prototype,e),n&&PI(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function cte(t,e,n){return e=hv(e),ute(t,N6()?Reflect.construct(e,n||[],hv(t).constructor):e.apply(t,n))}function ute(t,e){if(e&&(cd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dte(t)}function dte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N6(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N6=function(){return!!t})()}function hv(t){return hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hv(t)}function fte(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oE(t,e)}function oE(t,e){return oE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oE(t,e)}function Wy(t,e,n){return e=P6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P6(t){var e=hte(t,"string");return cd(e)=="symbol"?e:e+""}function hte(t,e){if(cd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function pte(t,e){if(t==null)return{};var n=mte(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function mte(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function gte(t){return t.value}function vte(t,e){if(K.isValidElement(t))return K.cloneElement(t,e);if(typeof t=="function")return K.createElement(t,e);e.ref;var n=pte(e,ste);return K.createElement(wN,n)}var CI=1,ms=(function(t){function e(){var n;ote(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=cte(this,e,[].concat(i)),Wy(n,"lastBoundingBox",{width:-1,height:-1}),n}return fte(e,t),lte(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>CI||Math.abs(i.height-this.lastBoundingBox.height)>CI)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,s=i.align,o=i.verticalAlign,c=i.margin,l=i.chartWidth,h=i.chartHeight,f,m;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&a==="vertical"){var g=this.getBBoxSnapshot();f={left:((l||0)-g.width)/2}}else f=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var b=this.getBBoxSnapshot();m={top:((h||0)-b.height)/2}}else m=o==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Vs(Vs({},f),m)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,s=i.width,o=i.height,c=i.wrapperStyle,l=i.payloadUniqBy,h=i.payload,f=Vs(Vs({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(c)),c);return K.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(g){r.wrapperNode=g}},vte(a,Vs(Vs({},this.props),{},{payload:A6(h,l,gte)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Vs(Vs({},this.defaultProps),r.props),s=a.layout;return s==="vertical"&&Je(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||i}:null}}])})(O.PureComponent);Wy(ms,"displayName","Legend");Wy(ms,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var X_,RI;function yte(){if(RI)return X_;RI=1;var t=em(),e=SN(),n=ji(),r=t?t.isConcatSpreadable:void 0;function i(a){return n(a)||e(a)||!!(r&&a&&a[r])}return X_=i,X_}var K_,jI;function C6(){if(jI)return K_;jI=1;var t=y6(),e=yte();function n(r,i,a,s,o){var c=-1,l=r.length;for(a||(a=e),o||(o=[]);++c<l;){var h=r[c];i>0&&a(h)?i>1?n(h,i-1,a,s,o):t(o,h):s||(o[o.length]=h)}return o}return K_=n,K_}var Y_,OI;function xte(){if(OI)return Y_;OI=1;function t(e){return function(n,r,i){for(var a=-1,s=Object(n),o=i(n),c=o.length;c--;){var l=o[e?c:++a];if(r(s[l],l,s)===!1)break}return n}}return Y_=t,Y_}var Z_,II;function bte(){if(II)return Z_;II=1;var t=xte(),e=t();return Z_=e,Z_}var J_,DI;function R6(){if(DI)return J_;DI=1;var t=bte(),e=Gy();function n(r,i){return r&&t(r,i,e)}return J_=n,J_}var Q_,kI;function wte(){if(kI)return Q_;kI=1;var t=nm();function e(n,r){return function(i,a){if(i==null)return i;if(!t(i))return n(i,a);for(var s=i.length,o=r?s:-1,c=Object(i);(r?o--:++o<s)&&a(c[o],o,c)!==!1;);return i}}return Q_=e,Q_}var eS,LI;function AN(){if(LI)return eS;LI=1;var t=R6(),e=wte(),n=e(t);return eS=n,eS}var tS,FI;function j6(){if(FI)return tS;FI=1;var t=AN(),e=nm();function n(r,i){var a=-1,s=e(r)?Array(r.length):[];return t(r,function(o,c,l){s[++a]=i(o,c,l)}),s}return tS=n,tS}var nS,UI;function _te(){if(UI)return nS;UI=1;function t(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}return nS=t,nS}var rS,BI;function Ste(){if(BI)return rS;BI=1;var t=qd();function e(n,r){if(n!==r){var i=n!==void 0,a=n===null,s=n===n,o=t(n),c=r!==void 0,l=r===null,h=r===r,f=t(r);if(!l&&!f&&!o&&n>r||o&&c&&h&&!l&&!f||a&&c&&h||!i&&h||!s)return 1;if(!a&&!o&&!f&&n<r||f&&i&&s&&!a&&!o||l&&i&&s||!c&&s||!h)return-1}return 0}return rS=e,rS}var iS,zI;function Mte(){if(zI)return iS;zI=1;var t=Ste();function e(n,r,i){for(var a=-1,s=n.criteria,o=r.criteria,c=s.length,l=i.length;++a<c;){var h=t(s[a],o[a]);if(h){if(a>=l)return h;var f=i[a];return h*(f=="desc"?-1:1)}}return n.index-r.index}return iS=e,iS}var aS,$I;function Ete(){if($I)return aS;$I=1;var t=hN(),e=pN(),n=Rs(),r=j6(),i=_te(),a=b6(),s=Mte(),o=Yd(),c=ji();function l(h,f,m){f.length?f=t(f,function(y){return c(y)?function(v){return e(v,y.length===1?y[0]:y)}:y}):f=[o];var g=-1;f=t(f,a(n));var b=r(h,function(y,v,w){var _=t(f,function(E){return E(y)});return{criteria:_,index:++g,value:y}});return i(b,function(y,v){return s(y,v,m)})}return aS=l,aS}var sS,VI;function Tte(){if(VI)return sS;VI=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return sS=t,sS}var oS,HI;function Ate(){if(HI)return oS;HI=1;var t=Tte(),e=Math.max;function n(r,i,a){return i=e(i===void 0?r.length-1:i,0),function(){for(var s=arguments,o=-1,c=e(s.length-i,0),l=Array(c);++o<c;)l[o]=s[i+o];o=-1;for(var h=Array(i+1);++o<i;)h[o]=s[o];return h[i]=a(l),t(r,this,h)}}return oS=n,oS}var lS,GI;function Nte(){if(GI)return lS;GI=1;function t(e){return function(){return e}}return lS=t,lS}var cS,WI;function O6(){if(WI)return cS;WI=1;var t=Uc(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return cS=e,cS}var uS,qI;function Pte(){if(qI)return uS;qI=1;var t=Nte(),e=O6(),n=Yd(),r=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:n;return uS=r,uS}var dS,XI;function Cte(){if(XI)return dS;XI=1;var t=800,e=16,n=Date.now;function r(i){var a=0,s=0;return function(){var o=n(),c=e-(o-s);if(s=o,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return dS=r,dS}var fS,KI;function Rte(){if(KI)return fS;KI=1;var t=Pte(),e=Cte(),n=e(t);return fS=n,fS}var hS,YI;function jte(){if(YI)return hS;YI=1;var t=Yd(),e=Ate(),n=Rte();function r(i,a){return n(e(i,a,t),i+"")}return hS=r,hS}var pS,ZI;function qy(){if(ZI)return pS;ZI=1;var t=uN(),e=nm(),n=MN(),r=Ml();function i(a,s,o){if(!r(o))return!1;var c=typeof s;return(c=="number"?e(o)&&n(s,o.length):c=="string"&&s in o)?t(o[s],a):!1}return pS=i,pS}var mS,JI;function Ote(){if(JI)return mS;JI=1;var t=C6(),e=Ete(),n=jte(),r=qy(),i=n(function(a,s){if(a==null)return[];var o=s.length;return o>1&&r(a,s[0],s[1])?s=[]:o>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return mS=i,mS}var Ite=Ote();const NN=Mn(Ite);function rp(t){"@babel/helpers - typeof";return rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rp(t)}function lE(){return lE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lE.apply(this,arguments)}function Dte(t,e){return Ute(t)||Fte(t,e)||Lte(t,e)||kte()}function kte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lte(t,e){if(t){if(typeof t=="string")return QI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QI(t,e)}}function QI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Fte(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function Ute(t){if(Array.isArray(t))return t}function e4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function gS(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?e4(Object(n),!0).forEach(function(r){Bte(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Bte(t,e,n){return e=zte(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zte(t){var e=$te(t,"string");return rp(e)=="symbol"?e:e+""}function $te(t,e){if(rp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(rp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vte(t){return Array.isArray(t)&&xr(t[0])&&xr(t[1])?t.join(" ~ "):t}var Hte=function(e){var n=e.separator,r=n===void 0?" : ":n,i=e.contentStyle,a=i===void 0?{}:i,s=e.itemStyle,o=s===void 0?{}:s,c=e.labelStyle,l=c===void 0?{}:c,h=e.payload,f=e.formatter,m=e.itemSorter,g=e.wrapperClassName,b=e.labelClassName,y=e.label,v=e.labelFormatter,w=e.accessibilityLayer,_=w===void 0?!1:w,E=function(){if(h&&h.length){var L={padding:0,margin:0},q=(m?NN(h,m):h).map(function(I,U){if(I.type==="none")return null;var k=gS({display:"block",paddingTop:4,paddingBottom:4,color:I.color||"#000"},o),V=I.formatter||f||Vte,$=I.value,Y=I.name,J=$,W=Y;if(V&&J!=null&&W!=null){var H=V($,Y,I,U,h);if(Array.isArray(H)){var te=Dte(H,2);J=te[0],W=te[1]}else J=H}return K.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:k},xr(W)?K.createElement("span",{className:"recharts-tooltip-item-name"},W):null,xr(W)?K.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,K.createElement("span",{className:"recharts-tooltip-item-value"},J),K.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return K.createElement("ul",{className:"recharts-tooltip-item-list",style:L},q)}return null},M=gS({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),T=gS({margin:0},l),A=!Kt(y),N=A?y:"",P=Yt("recharts-default-tooltip",g),R=Yt("recharts-tooltip-label",b);A&&v&&h!==void 0&&h!==null&&(N=v(y,h));var F=_?{role:"status","aria-live":"assertive"}:{};return K.createElement("div",lE({className:P,style:M},F),K.createElement("p",{className:R,style:T},K.isValidElement(N)?N:"".concat(N)),E())};function ip(t){"@babel/helpers - typeof";return ip=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ip(t)}function T0(t,e,n){return e=Gte(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gte(t){var e=Wte(t,"string");return ip(e)=="symbol"?e:e+""}function Wte(t,e){if(ip(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ip(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Yf="recharts-tooltip-wrapper",qte={visibility:"hidden"};function Xte(t){var e=t.coordinate,n=t.translateX,r=t.translateY;return Yt(Yf,T0(T0(T0(T0({},"".concat(Yf,"-right"),Je(n)&&e&&Je(e.x)&&n>=e.x),"".concat(Yf,"-left"),Je(n)&&e&&Je(e.x)&&n<e.x),"".concat(Yf,"-bottom"),Je(r)&&e&&Je(e.y)&&r>=e.y),"".concat(Yf,"-top"),Je(r)&&e&&Je(e.y)&&r<e.y))}function t4(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.key,i=t.offsetTopLeft,a=t.position,s=t.reverseDirection,o=t.tooltipDimension,c=t.viewBox,l=t.viewBoxDimension;if(a&&Je(a[r]))return a[r];var h=n[r]-o-i,f=n[r]+i;if(e[r])return s[r]?h:f;if(s[r]){var m=h,g=c[r];return m<g?Math.max(f,c[r]):Math.max(h,c[r])}var b=f+o,y=c[r]+l;return b>y?Math.max(h,c[r]):Math.max(f,c[r])}function Kte(t){var e=t.translateX,n=t.translateY,r=t.useTranslate3d;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function Yte(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.offsetTopLeft,i=t.position,a=t.reverseDirection,s=t.tooltipBox,o=t.useTranslate3d,c=t.viewBox,l,h,f;return s.height>0&&s.width>0&&n?(h=t4({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=t4({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),l=Kte({translateX:h,translateY:f,useTranslate3d:o})):l=qte,{cssProperties:l,cssClasses:Xte({translateX:h,translateY:f,coordinate:n})}}function ud(t){"@babel/helpers - typeof";return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ud(t)}function n4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function r4(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?n4(Object(n),!0).forEach(function(r){uE(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Zte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jte(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,D6(r.key),r)}}function Qte(t,e,n){return e&&Jte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ene(t,e,n){return e=pv(e),tne(t,I6()?Reflect.construct(e,n||[],pv(t).constructor):e.apply(t,n))}function tne(t,e){if(e&&(ud(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nne(t)}function nne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I6(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I6=function(){return!!t})()}function pv(t){return pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pv(t)}function rne(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cE(t,e)}function cE(t,e){return cE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cE(t,e)}function uE(t,e,n){return e=D6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D6(t){var e=ine(t,"string");return ud(e)=="symbol"?e:e+""}function ine(t,e){if(ud(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ud(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var i4=1,ane=(function(t){function e(){var n;Zte(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ene(this,e,[].concat(i)),uE(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),uE(n,"handleKeyDown",function(s){if(s.key==="Escape"){var o,c,l,h;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&o!==void 0?o:0,y:(l=(h=n.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&l!==void 0?l:0}})}}),n}return rne(e,t),Qte(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>i4||Math.abs(r.height-this.state.lastBoundingBox.height)>i4)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,o=i.animationDuration,c=i.animationEasing,l=i.children,h=i.coordinate,f=i.hasPayload,m=i.isAnimationActive,g=i.offset,b=i.position,y=i.reverseDirection,v=i.useTranslate3d,w=i.viewBox,_=i.wrapperStyle,E=Yte({allowEscapeViewBox:s,coordinate:h,offsetTopLeft:g,position:b,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),M=E.cssClasses,T=E.cssProperties,A=r4(r4({transition:m&&a?"transform ".concat(o,"ms ").concat(c):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},_);return K.createElement("div",{tabIndex:-1,className:M,style:A,ref:function(P){r.wrapperNode=P}},l)}}])})(O.PureComponent),sne=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},wo={isSsr:sne()};function dd(t){"@babel/helpers - typeof";return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dd(t)}function a4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function s4(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?a4(Object(n),!0).forEach(function(r){PN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function one(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lne(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,L6(r.key),r)}}function cne(t,e,n){return e&&lne(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function une(t,e,n){return e=mv(e),dne(t,k6()?Reflect.construct(e,n||[],mv(t).constructor):e.apply(t,n))}function dne(t,e){if(e&&(dd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fne(t)}function fne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function k6(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k6=function(){return!!t})()}function mv(t){return mv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mv(t)}function hne(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dE(t,e)}function dE(t,e){return dE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dE(t,e)}function PN(t,e,n){return e=L6(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L6(t){var e=pne(t,"string");return dd(e)=="symbol"?e:e+""}function pne(t,e){if(dd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(dd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function mne(t){return t.dataKey}function gne(t,e){return K.isValidElement(t)?K.cloneElement(t,e):typeof t=="function"?K.createElement(t,e):K.createElement(Hte,e)}var Xn=(function(t){function e(){return one(this,e),une(this,e,arguments)}return hne(e,t),cne(e,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,o=i.animationDuration,c=i.animationEasing,l=i.content,h=i.coordinate,f=i.filterNull,m=i.isAnimationActive,g=i.offset,b=i.payload,y=i.payloadUniqBy,v=i.position,w=i.reverseDirection,_=i.useTranslate3d,E=i.viewBox,M=i.wrapperStyle,T=b??[];f&&T.length&&(T=A6(b.filter(function(N){return N.value!=null&&(N.hide!==!0||r.props.includeHidden)}),y,mne));var A=T.length>0;return K.createElement(ane,{allowEscapeViewBox:s,animationDuration:o,animationEasing:c,isAnimationActive:m,active:a,coordinate:h,hasPayload:A,offset:g,position:v,reverseDirection:w,useTranslate3d:_,viewBox:E,wrapperStyle:M},gne(l,s4(s4({},this.props),{},{payload:T})))}}])})(O.PureComponent);PN(Xn,"displayName","Tooltip");PN(Xn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!wo.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var vS,o4;function vne(){if(o4)return vS;o4=1;var t=Cs(),e=function(){return t.Date.now()};return vS=e,vS}var yS,l4;function yne(){if(l4)return yS;l4=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return yS=e,yS}var xS,c4;function xne(){if(c4)return xS;c4=1;var t=yne(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return xS=n,xS}var bS,u4;function F6(){if(u4)return bS;u4=1;var t=xne(),e=Ml(),n=qd(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function c(l){if(typeof l=="number")return l;if(n(l))return r;if(e(l)){var h=typeof l.valueOf=="function"?l.valueOf():l;l=e(h)?h+"":h}if(typeof l!="string")return l===0?l:+l;l=t(l);var f=a.test(l);return f||s.test(l)?o(l.slice(2),f?2:8):i.test(l)?r:+l}return bS=c,bS}var wS,d4;function bne(){if(d4)return wS;d4=1;var t=Ml(),e=vne(),n=F6(),r="Expected a function",i=Math.max,a=Math.min;function s(o,c,l){var h,f,m,g,b,y,v=0,w=!1,_=!1,E=!0;if(typeof o!="function")throw new TypeError(r);c=n(c)||0,t(l)&&(w=!!l.leading,_="maxWait"in l,m=_?i(n(l.maxWait)||0,c):m,E="trailing"in l?!!l.trailing:E);function M(q){var I=h,U=f;return h=f=void 0,v=q,g=o.apply(U,I),g}function T(q){return v=q,b=setTimeout(P,c),w?M(q):g}function A(q){var I=q-y,U=q-v,k=c-I;return _?a(k,m-U):k}function N(q){var I=q-y,U=q-v;return y===void 0||I>=c||I<0||_&&U>=m}function P(){var q=e();if(N(q))return R(q);b=setTimeout(P,A(q))}function R(q){return b=void 0,E&&h?M(q):(h=f=void 0,g)}function F(){b!==void 0&&clearTimeout(b),v=0,h=y=f=b=void 0}function D(){return b===void 0?g:R(e())}function L(){var q=e(),I=N(q);if(h=arguments,f=this,y=q,I){if(b===void 0)return T(y);if(_)return clearTimeout(b),b=setTimeout(P,c),M(y)}return b===void 0&&(b=setTimeout(P,c)),g}return L.cancel=F,L.flush=D,L}return wS=s,wS}var _S,f4;function wne(){if(f4)return _S;f4=1;var t=bne(),e=Ml(),n="Expected a function";function r(i,a,s){var o=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return e(s)&&(o="leading"in s?!!s.leading:o,c="trailing"in s?!!s.trailing:c),t(i,a,{leading:o,maxWait:a,trailing:c})}return _S=r,_S}var _ne=wne();const U6=Mn(_ne);function ap(t){"@babel/helpers - typeof";return ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ap(t)}function h4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function A0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?h4(Object(n),!0).forEach(function(r){Sne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Sne(t,e,n){return e=Mne(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mne(t){var e=Ene(t,"string");return ap(e)=="symbol"?e:e+""}function Ene(t,e){if(ap(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ap(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tne(t,e){return Cne(t)||Pne(t,e)||Nne(t,e)||Ane()}function Ane(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nne(t,e){if(t){if(typeof t=="string")return p4(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p4(t,e)}}function p4(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Pne(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function Cne(t){if(Array.isArray(t))return t}var Ci=O.forwardRef(function(t,e){var n=t.aspect,r=t.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=t.width,s=a===void 0?"100%":a,o=t.height,c=o===void 0?"100%":o,l=t.minWidth,h=l===void 0?0:l,f=t.minHeight,m=t.maxHeight,g=t.children,b=t.debounce,y=b===void 0?0:b,v=t.id,w=t.className,_=t.onResize,E=t.style,M=E===void 0?{}:E,T=O.useRef(null),A=O.useRef();A.current=_,O.useImperativeHandle(e,function(){return Object.defineProperty(T.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),T.current},configurable:!0})});var N=O.useState({containerWidth:i.width,containerHeight:i.height}),P=Tne(N,2),R=P[0],F=P[1],D=O.useCallback(function(q,I){F(function(U){var k=Math.round(q),V=Math.round(I);return U.containerWidth===k&&U.containerHeight===V?U:{containerWidth:k,containerHeight:V}})},[]);O.useEffect(function(){var q=function(Y){var J,W=Y[0].contentRect,H=W.width,te=W.height;D(H,te),(J=A.current)===null||J===void 0||J.call(A,H,te)};y>0&&(q=U6(q,y,{trailing:!0,leading:!1}));var I=new ResizeObserver(q),U=T.current.getBoundingClientRect(),k=U.width,V=U.height;return D(k,V),I.observe(T.current),function(){I.disconnect()}},[D,y]);var L=O.useMemo(function(){var q=R.containerWidth,I=R.containerHeight;if(q<0||I<0)return null;$a(lc(s)||lc(c),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,s,c),$a(!n||n>0,"The aspect(%s) must be greater than zero.",n);var U=lc(s)?q:s,k=lc(c)?I:c;n&&n>0&&(U?k=U/n:k&&(U=k*n),m&&k>m&&(k=m)),$a(U>0||k>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,U,k,s,c,h,f,n);var V=!Array.isArray(g)&&oo(g.type).endsWith("Chart");return K.Children.map(g,function($){return K.isValidElement($)?O.cloneElement($,A0({width:U,height:k},V?{style:A0({height:"100%",width:"100%",maxHeight:k,maxWidth:U},$.props.style)}:{})):$})},[n,g,c,m,f,h,R,s]);return K.createElement("div",{id:v?"".concat(v):void 0,className:Yt("recharts-responsive-container",w),style:A0(A0({},M),{},{width:s,height:c,minWidth:h,minHeight:f,maxHeight:m}),ref:T},L)}),rm=function(e){return null};rm.displayName="Cell";function sp(t){"@babel/helpers - typeof";return sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sp(t)}function m4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function fE(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?m4(Object(n),!0).forEach(function(r){Rne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Rne(t,e,n){return e=jne(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jne(t){var e=One(t,"string");return sp(e)=="symbol"?e:e+""}function One(t,e){if(sp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(sp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var hu={widthCache:{},cacheCount:0},Ine=2e3,Dne={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},g4="recharts_measurement_span";function kne(t){var e=fE({},t);return Object.keys(e).forEach(function(n){e[n]||delete e[n]}),e}var Ih=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||wo.isSsr)return{width:0,height:0};var r=kne(n),i=JSON.stringify({text:e,copyStyle:r});if(hu.widthCache[i])return hu.widthCache[i];try{var a=document.getElementById(g4);a||(a=document.createElement("span"),a.setAttribute("id",g4),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=fE(fE({},Dne),r);Object.assign(a.style,s),a.textContent="".concat(e);var o=a.getBoundingClientRect(),c={width:o.width,height:o.height};return hu.widthCache[i]=c,++hu.cacheCount>Ine&&(hu.cacheCount=0,hu.widthCache={}),c}catch{return{width:0,height:0}}},Lne=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function op(t){"@babel/helpers - typeof";return op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},op(t)}function gv(t,e){return zne(t)||Bne(t,e)||Une(t,e)||Fne()}function Fne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Une(t,e){if(t){if(typeof t=="string")return v4(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v4(t,e)}}function v4(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bne(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function zne(t){if(Array.isArray(t))return t}function $ne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y4(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hne(r.key),r)}}function Vne(t,e,n){return e&&y4(t.prototype,e),n&&y4(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hne(t){var e=Gne(t,"string");return op(e)=="symbol"?e:e+""}function Gne(t,e){if(op(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(op(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var x4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,b4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Wne=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,qne=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,B6={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Xne=Object.keys(B6),$u="NaN";function Kne(t,e){return t*B6[e]}var N0=(function(){function t(e,n){$ne(this,t),this.num=e,this.unit=n,this.num=e,this.unit=n,Number.isNaN(e)&&(this.unit=""),n!==""&&!Wne.test(n)&&(this.num=NaN,this.unit=""),Xne.includes(n)&&(this.num=Kne(e,n),this.unit="px")}return Vne(t,[{key:"add",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=qne.exec(n))!==null&&r!==void 0?r:[],a=gv(i,3),s=a[1],o=a[2];return new t(parseFloat(s),o??"")}}])})();function z6(t){if(t.includes($u))return $u;for(var e=t;e.includes("*")||e.includes("/");){var n,r=(n=x4.exec(e))!==null&&n!==void 0?n:[],i=gv(r,4),a=i[1],s=i[2],o=i[3],c=N0.parse(a??""),l=N0.parse(o??""),h=s==="*"?c.multiply(l):c.divide(l);if(h.isNaN())return $u;e=e.replace(x4,h.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var f,m=(f=b4.exec(e))!==null&&f!==void 0?f:[],g=gv(m,4),b=g[1],y=g[2],v=g[3],w=N0.parse(b??""),_=N0.parse(v??""),E=y==="+"?w.add(_):w.subtract(_);if(E.isNaN())return $u;e=e.replace(b4,E.toString())}return e}var w4=/\(([^()]*)\)/;function Yne(t){for(var e=t;e.includes("(");){var n=w4.exec(e),r=gv(n,2),i=r[1];e=e.replace(w4,z6(i))}return e}function Zne(t){var e=t.replace(/\s+/g,"");return e=Yne(e),e=z6(e),e}function Jne(t){try{return Zne(t)}catch{return $u}}function SS(t){var e=Jne(t.slice(5,-1));return e===$u?"":e}var Qne=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],ere=["dx","dy","angle","className","breakAll"];function hE(){return hE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hE.apply(this,arguments)}function _4(t,e){if(t==null)return{};var n=tre(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function tre(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function S4(t,e){return are(t)||ire(t,e)||rre(t,e)||nre()}function nre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rre(t,e){if(t){if(typeof t=="string")return M4(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M4(t,e)}}function M4(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ire(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function are(t){if(Array.isArray(t))return t}var $6=/[ \f\n\r\t\v\u2028\u2029]+/,V6=function(e){var n=e.children,r=e.breakAll,i=e.style;try{var a=[];Kt(n)||(r?a=n.toString().split(""):a=n.toString().split($6));var s=a.map(function(c){return{word:c,width:Ih(c,i).width}}),o=r?0:Ih(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}},sre=function(e,n,r,i,a){var s=e.maxLines,o=e.children,c=e.style,l=e.breakAll,h=Je(s),f=o,m=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce(function(k,V){var $=V.word,Y=V.width,J=k[k.length-1];if(J&&(i==null||a||J.width+Y+r<Number(i)))J.words.push($),J.width+=Y+r;else{var W={words:[$],width:Y};k.push(W)}return k},[])},g=m(n),b=function(U){return U.reduce(function(k,V){return k.width>V.width?k:V})};if(!h)return g;for(var y="…",v=function(U){var k=f.slice(0,U),V=V6({breakAll:l,style:c,children:k+y}).wordsWithComputedWidth,$=m(V),Y=$.length>s||b($).width>Number(i);return[Y,$]},w=0,_=f.length-1,E=0,M;w<=_&&E<=f.length-1;){var T=Math.floor((w+_)/2),A=T-1,N=v(A),P=S4(N,2),R=P[0],F=P[1],D=v(T),L=S4(D,1),q=L[0];if(!R&&!q&&(w=T+1),R&&q&&(_=T-1),!R&&q){M=F;break}E++}return M||g},E4=function(e){var n=Kt(e)?[]:e.toString().split($6);return[{words:n}]},ore=function(e){var n=e.width,r=e.scaleToFit,i=e.children,a=e.style,s=e.breakAll,o=e.maxLines;if((n||r)&&!wo.isSsr){var c,l,h=V6({breakAll:s,children:i,style:a});if(h){var f=h.wordsWithComputedWidth,m=h.spaceWidth;c=f,l=m}else return E4(i);return sre({breakAll:s,children:i,maxLines:o,style:a},c,l,n,r)}return E4(i)},T4="#808080",Ac=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,a=i===void 0?0:i,s=e.lineHeight,o=s===void 0?"1em":s,c=e.capHeight,l=c===void 0?"0.71em":c,h=e.scaleToFit,f=h===void 0?!1:h,m=e.textAnchor,g=m===void 0?"start":m,b=e.verticalAnchor,y=b===void 0?"end":b,v=e.fill,w=v===void 0?T4:v,_=_4(e,Qne),E=O.useMemo(function(){return ore({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:f,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,f,_.style,_.width]),M=_.dx,T=_.dy,A=_.angle,N=_.className,P=_.breakAll,R=_4(_,ere);if(!xr(r)||!xr(a))return null;var F=r+(Je(M)?M:0),D=a+(Je(T)?T:0),L;switch(y){case"start":L=SS("calc(".concat(l,")"));break;case"middle":L=SS("calc(".concat((E.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:L=SS("calc(".concat(E.length-1," * -").concat(o,")"));break}var q=[];if(f){var I=E[0].width,U=_.width;q.push("scale(".concat((Je(U)?U/I:1)/I,")"))}return A&&q.push("rotate(".concat(A,", ").concat(F,", ").concat(D,")")),q.length&&(R.transform=q.join(" ")),K.createElement("text",hE({},Pt(R,!0),{x:F,y:D,className:Yt("recharts-text",N),textAnchor:g,fill:w.includes("url")?T4:w}),E.map(function(k,V){var $=k.words.join(P?"":" ");return K.createElement("tspan",{x:F,dy:V===0?L:o,key:"".concat($,"-").concat(V)},$)}))};function hl(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lre(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function CN(t){let e,n,r;t.length!==2?(e=hl,n=(o,c)=>hl(t(o),c),r=(o,c)=>t(o)-c):(e=t===hl||t===lre?t:cre,n=t,r=t);function i(o,c,l=0,h=o.length){if(l<h){if(e(c,c)!==0)return h;do{const f=l+h>>>1;n(o[f],c)<0?l=f+1:h=f}while(l<h)}return l}function a(o,c,l=0,h=o.length){if(l<h){if(e(c,c)!==0)return h;do{const f=l+h>>>1;n(o[f],c)<=0?l=f+1:h=f}while(l<h)}return l}function s(o,c,l=0,h=o.length){const f=i(o,c,l,h-1);return f>l&&r(o[f-1],c)>-r(o[f],c)?f-1:f}return{left:i,center:s,right:a}}function cre(){return 0}function H6(t){return t===null?NaN:+t}function*ure(t,e){for(let n of t)n!=null&&(n=+n)>=n&&(yield n)}const dre=CN(hl),im=dre.right;CN(H6).center;class A4 extends Map{constructor(e,n=pre){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(N4(this,e))}has(e){return super.has(N4(this,e))}set(e,n){return super.set(fre(this,e),n)}delete(e){return super.delete(hre(this,e))}}function N4({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function fre({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function hre({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function pre(t){return t!==null&&typeof t=="object"?t.valueOf():t}function mre(t=hl){if(t===hl)return G6;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function G6(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const gre=Math.sqrt(50),vre=Math.sqrt(10),yre=Math.sqrt(2);function vv(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=gre?10:a>=vre?5:a>=yre?2:1;let o,c,l;return i<0?(l=Math.pow(10,-i)/s,o=Math.round(t*l),c=Math.round(e*l),o/l<t&&++o,c/l>e&&--c,l=-l):(l=Math.pow(10,i)*s,o=Math.round(t/l),c=Math.round(e/l),o*l<t&&++o,c*l>e&&--c),c<o&&.5<=n&&n<2?vv(t,e,n*2):[o,c,l]}function pE(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,s]=r?vv(e,t,n):vv(t,e,n);if(!(a>=i))return[];const o=a-i+1,c=new Array(o);if(r)if(s<0)for(let l=0;l<o;++l)c[l]=(a-l)/-s;else for(let l=0;l<o;++l)c[l]=(a-l)*s;else if(s<0)for(let l=0;l<o;++l)c[l]=(i+l)/-s;else for(let l=0;l<o;++l)c[l]=(i+l)*s;return c}function mE(t,e,n){return e=+e,t=+t,n=+n,vv(t,e,n)[2]}function gE(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?mE(e,t,n):mE(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function P4(t,e){let n;for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function C4(t,e){let n;for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function W6(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?G6:mre(i);r>n;){if(r-n>600){const c=r-n+1,l=e-n+1,h=Math.log(c),f=.5*Math.exp(2*h/3),m=.5*Math.sqrt(h*f*(c-f)/c)*(l-c/2<0?-1:1),g=Math.max(n,Math.floor(e-l*f/c+m)),b=Math.min(r,Math.floor(e+(c-l)*f/c+m));W6(t,e,g,b,i)}const a=t[e];let s=n,o=r;for(Zf(t,n,e),i(t[r],a)>0&&Zf(t,n,r);s<o;){for(Zf(t,s,o),++s,--o;i(t[s],a)<0;)++s;for(;i(t[o],a)>0;)--o}i(t[n],a)===0?Zf(t,n,o):(++o,Zf(t,o,r)),o<=e&&(n=o+1),e<=o&&(r=o-1)}return t}function Zf(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function xre(t,e,n){if(t=Float64Array.from(ure(t)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return C4(t);if(e>=1)return P4(t);var r,i=(r-1)*e,a=Math.floor(i),s=P4(W6(t,a).subarray(0,a+1)),o=C4(t.subarray(a+1));return s+(o-s)*(i-a)}}function bre(t,e,n=H6){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),s=+n(t[a],a,t),o=+n(t[a+1],a+1,t);return s+(o-s)*(i-a)}}function wre(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r<i;)a[r]=t+r*n;return a}function Sa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function _o(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const vE=Symbol("implicit");function RN(){var t=new A4,e=[],n=[],r=vE;function i(a){let s=t.get(a);if(s===void 0){if(r!==vE)return r;t.set(a,s=e.push(a)-1)}return n[s%n.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new A4;for(const s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return RN(e,n).unknown(r)},Sa.apply(i,arguments),i}function lp(){var t=RN().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,a,s,o=!1,c=0,l=0,h=.5;delete t.unknown;function f(){var m=e().length,g=i<r,b=g?i:r,y=g?r:i;a=(y-b)/Math.max(1,m-c+l*2),o&&(a=Math.floor(a)),b+=(y-b-a*(m-c))*h,s=a*(1-c),o&&(b=Math.round(b),s=Math.round(s));var v=wre(m).map(function(w){return b+a*w});return n(g?v.reverse():v)}return t.domain=function(m){return arguments.length?(e(m),f()):e()},t.range=function(m){return arguments.length?([r,i]=m,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(m){return[r,i]=m,r=+r,i=+i,o=!0,f()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(m){return arguments.length?(o=!!m,f()):o},t.padding=function(m){return arguments.length?(c=Math.min(1,l=+m),f()):c},t.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),f()):c},t.paddingOuter=function(m){return arguments.length?(l=+m,f()):l},t.align=function(m){return arguments.length?(h=Math.max(0,Math.min(1,m)),f()):h},t.copy=function(){return lp(e(),[r,i]).round(o).paddingInner(c).paddingOuter(l).align(h)},Sa.apply(f(),arguments)}function q6(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return q6(e())},t}function Dh(){return q6(lp.apply(null,arguments).paddingInner(1))}function jN(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function X6(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function am(){}var cp=.7,yv=1/cp,ed="\\s*([+-]?\\d+)\\s*",up="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_re=/^#([0-9a-f]{3,8})$/,Sre=new RegExp(`^rgb\\(${ed},${ed},${ed}\\)$`),Mre=new RegExp(`^rgb\\(${gs},${gs},${gs}\\)$`),Ere=new RegExp(`^rgba\\(${ed},${ed},${ed},${up}\\)$`),Tre=new RegExp(`^rgba\\(${gs},${gs},${gs},${up}\\)$`),Are=new RegExp(`^hsl\\(${up},${gs},${gs}\\)$`),Nre=new RegExp(`^hsla\\(${up},${gs},${gs},${up}\\)$`),R4={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};jN(am,Nc,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:j4,formatHex:j4,formatHex8:Pre,formatHsl:Cre,formatRgb:O4,toString:O4});function j4(){return this.rgb().formatHex()}function Pre(){return this.rgb().formatHex8()}function Cre(){return K6(this).formatHsl()}function O4(){return this.rgb().formatRgb()}function Nc(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=_re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?I4(e):n===3?new Pi(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?P0(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?P0(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Sre.exec(t))?new Pi(e[1],e[2],e[3],1):(e=Mre.exec(t))?new Pi(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Ere.exec(t))?P0(e[1],e[2],e[3],e[4]):(e=Tre.exec(t))?P0(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Are.exec(t))?L4(e[1],e[2]/100,e[3]/100,1):(e=Nre.exec(t))?L4(e[1],e[2]/100,e[3]/100,e[4]):R4.hasOwnProperty(t)?I4(R4[t]):t==="transparent"?new Pi(NaN,NaN,NaN,0):null}function I4(t){return new Pi(t>>16&255,t>>8&255,t&255,1)}function P0(t,e,n,r){return r<=0&&(t=e=n=NaN),new Pi(t,e,n,r)}function Rre(t){return t instanceof am||(t=Nc(t)),t?(t=t.rgb(),new Pi(t.r,t.g,t.b,t.opacity)):new Pi}function yE(t,e,n,r){return arguments.length===1?Rre(t):new Pi(t,e,n,r??1)}function Pi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}jN(Pi,yE,X6(am,{brighter(t){return t=t==null?yv:Math.pow(yv,t),new Pi(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?cp:Math.pow(cp,t),new Pi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Pi(vc(this.r),vc(this.g),vc(this.b),xv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D4,formatHex:D4,formatHex8:jre,formatRgb:k4,toString:k4}));function D4(){return`#${cc(this.r)}${cc(this.g)}${cc(this.b)}`}function jre(){return`#${cc(this.r)}${cc(this.g)}${cc(this.b)}${cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function k4(){const t=xv(this.opacity);return`${t===1?"rgb(":"rgba("}${vc(this.r)}, ${vc(this.g)}, ${vc(this.b)}${t===1?")":`, ${t})`}`}function xv(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function vc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function cc(t){return t=vc(t),(t<16?"0":"")+t.toString(16)}function L4(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ba(t,e,n,r)}function K6(t){if(t instanceof Ba)return new Ba(t.h,t.s,t.l,t.opacity);if(t instanceof am||(t=Nc(t)),!t)return new Ba;if(t instanceof Ba)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),s=NaN,o=a-i,c=(a+i)/2;return o?(e===a?s=(n-r)/o+(n<r)*6:n===a?s=(r-e)/o+2:s=(e-n)/o+4,o/=c<.5?a+i:2-a-i,s*=60):o=c>0&&c<1?0:s,new Ba(s,o,c,t.opacity)}function Ore(t,e,n,r){return arguments.length===1?K6(t):new Ba(t,e,n,r??1)}function Ba(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}jN(Ba,Ore,X6(am,{brighter(t){return t=t==null?yv:Math.pow(yv,t),new Ba(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?cp:Math.pow(cp,t),new Ba(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Pi(MS(t>=240?t-240:t+120,i,r),MS(t,i,r),MS(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ba(F4(this.h),C0(this.s),C0(this.l),xv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=xv(this.opacity);return`${t===1?"hsl(":"hsla("}${F4(this.h)}, ${C0(this.s)*100}%, ${C0(this.l)*100}%${t===1?")":`, ${t})`}`}}));function F4(t){return t=(t||0)%360,t<0?t+360:t}function C0(t){return Math.max(0,Math.min(1,t||0))}function MS(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ON=t=>()=>t;function Ire(t,e){return function(n){return t+n*e}}function Dre(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function kre(t){return(t=+t)==1?Y6:function(e,n){return n-e?Dre(e,n,t):ON(isNaN(e)?n:e)}}function Y6(t,e){var n=e-t;return n?Ire(t,n):ON(isNaN(t)?e:t)}const bv=(function t(e){var n=kre(e);function r(i,a){var s=n((i=yE(i)).r,(a=yE(a)).r),o=n(i.g,a.g),c=n(i.b,a.b),l=Y6(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=c(h),i.opacity=l(h),i+""}}return r.gamma=t,r})(1);function Lre(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function Fre(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ure(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),a=new Array(n),s;for(s=0;s<r;++s)i[s]=Zd(t[s],e[s]);for(;s<n;++s)a[s]=e[s];return function(o){for(s=0;s<r;++s)a[s]=i[s](o);return a}}function Bre(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ua(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function zre(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Zd(t[i],e[i]):r[i]=e[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var xE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ES=new RegExp(xE.source,"g");function $re(t){return function(){return t}}function Vre(t){return function(e){return t(e)+""}}function Z6(t,e){var n=xE.lastIndex=ES.lastIndex=0,r,i,a,s=-1,o=[],c=[];for(t=t+"",e=e+"";(r=xE.exec(t))&&(i=ES.exec(e));)(a=i.index)>n&&(a=e.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,c.push({i:s,x:Ua(r,i)})),n=ES.lastIndex;return n<e.length&&(a=e.slice(n),o[s]?o[s]+=a:o[++s]=a),o.length<2?c[0]?Vre(c[0].x):$re(e):(e=c.length,function(l){for(var h=0,f;h<e;++h)o[(f=c[h]).i]=f.x(l);return o.join("")})}function Zd(t,e){var n=typeof e,r;return e==null||n==="boolean"?ON(e):(n==="number"?Ua:n==="string"?(r=Nc(e))?(e=r,bv):Z6:e instanceof Nc?bv:e instanceof Date?Bre:Fre(e)?Lre:Array.isArray(e)?Ure:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?zre:Ua)(t,e)}function IN(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var U4=180/Math.PI,bE={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function J6(t,e,n,r,i,a){var s,o,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,c/=o),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*U4,skewX:Math.atan(c)*U4,scaleX:s,scaleY:o}}var R0;function Hre(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?bE:J6(e.a,e.b,e.c,e.d,e.e,e.f)}function Gre(t){return t==null||(R0||(R0=document.createElementNS("http://www.w3.org/2000/svg","g")),R0.setAttribute("transform",t),!(t=R0.transform.baseVal.consolidate()))?bE:(t=t.matrix,J6(t.a,t.b,t.c,t.d,t.e,t.f))}function Q6(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,h,f,m,g,b){if(l!==f||h!==m){var y=g.push("translate(",null,e,null,n);b.push({i:y-4,x:Ua(l,f)},{i:y-2,x:Ua(h,m)})}else(f||m)&&g.push("translate("+f+e+m+n)}function s(l,h,f,m){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),m.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Ua(l,h)})):h&&f.push(i(f)+"rotate("+h+r)}function o(l,h,f,m){l!==h?m.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Ua(l,h)}):h&&f.push(i(f)+"skewX("+h+r)}function c(l,h,f,m,g,b){if(l!==f||h!==m){var y=g.push(i(g)+"scale(",null,",",null,")");b.push({i:y-4,x:Ua(l,f)},{i:y-2,x:Ua(h,m)})}else(f!==1||m!==1)&&g.push(i(g)+"scale("+f+","+m+")")}return function(l,h){var f=[],m=[];return l=t(l),h=t(h),a(l.translateX,l.translateY,h.translateX,h.translateY,f,m),s(l.rotate,h.rotate,f,m),o(l.skewX,h.skewX,f,m),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,f,m),l=h=null,function(g){for(var b=-1,y=m.length,v;++b<y;)f[(v=m[b]).i]=v.x(g);return f.join("")}}}var Wre=Q6(Hre,"px, ","px)","deg)"),qre=Q6(Gre,", ",")",")"),Xre=1e-12;function B4(t){return((t=Math.exp(t))+1/t)/2}function Kre(t){return((t=Math.exp(t))-1/t)/2}function Yre(t){return((t=Math.exp(2*t))-1)/(t+1)}const Zre=(function t(e,n,r){function i(a,s){var o=a[0],c=a[1],l=a[2],h=s[0],f=s[1],m=s[2],g=h-o,b=f-c,y=g*g+b*b,v,w;if(y<Xre)w=Math.log(m/l)/e,v=function(N){return[o+N*g,c+N*b,l*Math.exp(e*N*w)]};else{var _=Math.sqrt(y),E=(m*m-l*l+r*y)/(2*l*n*_),M=(m*m-l*l-r*y)/(2*m*n*_),T=Math.log(Math.sqrt(E*E+1)-E),A=Math.log(Math.sqrt(M*M+1)-M);w=(A-T)/e,v=function(N){var P=N*w,R=B4(T),F=l/(n*_)*(R*Yre(e*P+T)-Kre(T));return[o+F*g,c+F*b,l*R/B4(e*P+T)]}}return v.duration=w*1e3*e/Math.SQRT2,v}return i.rho=function(a){var s=Math.max(.001,+a),o=s*s,c=o*o;return t(s,o,c)},i})(Math.SQRT2,2,4);function Jre(t,e){e===void 0&&(e=t,t=Zd);for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return a[o](s-o)}}function Qre(t){return function(){return t}}function wv(t){return+t}var z4=[0,1];function fi(t){return t}function wE(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Qre(isNaN(e)?NaN:.5)}function eie(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function tie(t,e,n){var r=t[0],i=t[1],a=e[0],s=e[1];return i<r?(r=wE(i,r),a=n(s,a)):(r=wE(r,i),a=n(a,s)),function(o){return a(r(o))}}function nie(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=wE(t[s],t[s+1]),a[s]=n(e[s],e[s+1]);return function(o){var c=im(t,o,1,r)-1;return a[c](i[c](o))}}function sm(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xy(){var t=z4,e=z4,n=Zd,r,i,a,s=fi,o,c,l;function h(){var m=Math.min(t.length,e.length);return s!==fi&&(s=eie(t[0],t[m-1])),o=m>2?nie:tie,c=l=null,f}function f(m){return m==null||isNaN(m=+m)?a:(c||(c=o(t.map(r),e,n)))(r(s(m)))}return f.invert=function(m){return s(i((l||(l=o(e,t.map(r),Ua)))(m)))},f.domain=function(m){return arguments.length?(t=Array.from(m,wv),h()):t.slice()},f.range=function(m){return arguments.length?(e=Array.from(m),h()):e.slice()},f.rangeRound=function(m){return e=Array.from(m),n=IN,h()},f.clamp=function(m){return arguments.length?(s=m?!0:fi,h()):s!==fi},f.interpolate=function(m){return arguments.length?(n=m,h()):n},f.unknown=function(m){return arguments.length?(a=m,f):a},function(m,g){return r=m,i=g,h()}}function DN(){return Xy()(fi,fi)}function rie(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function _v(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function fd(t){return t=_v(Math.abs(t)),t?t[1]:NaN}function iie(t,e){return function(n,r){for(var i=n.length,a=[],s=0,o=t[0],c=0;i>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),a.push(n.substring(i-=o,i+o)),!((c+=o+1)>r));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}function aie(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var sie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function dp(t){if(!(e=sie.exec(t)))throw new Error("invalid format: "+t);var e;return new kN({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}dp.prototype=kN.prototype;function kN(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}kN.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function oie(t){e:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break e;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Sv;function lie(t,e){var n=_v(t,e);if(!n)return Sv=void 0,t.toPrecision(e);var r=n[0],i=n[1],a=i-(Sv=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+_v(t,Math.max(0,e+a-1))[0]}function $4(t,e){var n=_v(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const V4={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:rie,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>$4(t*100,e),r:$4,s:lie,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function H4(t){return t}var G4=Array.prototype.map,W4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cie(t){var e=t.grouping===void 0||t.thousands===void 0?H4:iie(G4.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?H4:aie(G4.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function l(f,m){f=dp(f);var g=f.fill,b=f.align,y=f.sign,v=f.symbol,w=f.zero,_=f.width,E=f.comma,M=f.precision,T=f.trim,A=f.type;A==="n"?(E=!0,A="g"):V4[A]||(M===void 0&&(M=12),T=!0,A="g"),(w||g==="0"&&b==="=")&&(w=!0,g="0",b="=");var N=(m&&m.prefix!==void 0?m.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),P=(v==="$"?r:/[%p]/.test(A)?s:"")+(m&&m.suffix!==void 0?m.suffix:""),R=V4[A],F=/[defgprs%]/.test(A);M=M===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function D(L){var q=N,I=P,U,k,V;if(A==="c")I=R(L)+I,L="";else{L=+L;var $=L<0||1/L<0;if(L=isNaN(L)?c:R(Math.abs(L),M),T&&(L=oie(L)),$&&+L==0&&y!=="+"&&($=!1),q=($?y==="("?y:o:y==="-"||y==="("?"":y)+q,I=(A==="s"&&!isNaN(L)&&Sv!==void 0?W4[8+Sv/3]:"")+I+($&&y==="("?")":""),F){for(U=-1,k=L.length;++U<k;)if(V=L.charCodeAt(U),48>V||V>57){I=(V===46?i+L.slice(U+1):L.slice(U))+I,L=L.slice(0,U);break}}}E&&!w&&(L=e(L,1/0));var Y=q.length+L.length+I.length,J=Y<_?new Array(_-Y+1).join(g):"";switch(E&&w&&(L=e(J+L,J.length?_-I.length:1/0),J=""),b){case"<":L=q+L+I+J;break;case"=":L=q+J+L+I;break;case"^":L=J.slice(0,Y=J.length>>1)+q+L+I+J.slice(Y);break;default:L=J+q+L+I;break}return a(L)}return D.toString=function(){return f+""},D}function h(f,m){var g=Math.max(-8,Math.min(8,Math.floor(fd(m)/3)))*3,b=Math.pow(10,-g),y=l((f=dp(f),f.type="f",f),{suffix:W4[8+g/3]});return function(v){return y(b*v)}}return{format:l,formatPrefix:h}}var j0,LN,ez;uie({thousands:",",grouping:[3],currency:["$",""]});function uie(t){return j0=cie(t),LN=j0.format,ez=j0.formatPrefix,j0}function die(t){return Math.max(0,-fd(Math.abs(t)))}function fie(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fd(e)/3)))*3-fd(Math.abs(t)))}function hie(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,fd(e)-fd(t))+1}function tz(t,e,n,r){var i=gE(t,e,n),a;switch(r=dp(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=fie(i,s))&&(r.precision=a),ez(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=hie(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=die(i))&&(r.precision=a-(r.type==="%")*2);break}}return LN(r)}function El(t){var e=t.domain;return t.ticks=function(n){var r=e();return pE(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return tz(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,a=r.length-1,s=r[i],o=r[a],c,l,h=10;for(o<s&&(l=s,s=o,o=l,l=i,i=a,a=l);h-- >0;){if(l=mE(s,o,n),l===c)return r[i]=s,r[a]=o,e(r);if(l>0)s=Math.floor(s/l)*l,o=Math.ceil(o/l)*l;else if(l<0)s=Math.ceil(s*l)/l,o=Math.floor(o*l)/l;else break;c=l}return t},t}function Mv(){var t=DN();return t.copy=function(){return sm(t,Mv())},Sa.apply(t,arguments),El(t)}function nz(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,wv),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return nz(t).unknown(e)},t=arguments.length?Array.from(t,wv):[0,1],El(n)}function rz(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],a=t[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),t[n]=e.floor(i),t[r]=e.ceil(a),t}function q4(t){return Math.log(t)}function X4(t){return Math.exp(t)}function pie(t){return-Math.log(-t)}function mie(t){return-Math.exp(-t)}function gie(t){return isFinite(t)?+("1e"+t):t<0?0:t}function vie(t){return t===10?gie:t===Math.E?Math.exp:e=>Math.pow(t,e)}function yie(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function K4(t){return(e,n)=>-t(-e,n)}function FN(t){const e=t(q4,X4),n=e.domain;let r=10,i,a;function s(){return i=yie(r),a=vie(r),n()[0]<0?(i=K4(i),a=K4(a),t(pie,mie)):t(q4,X4),e}return e.base=function(o){return arguments.length?(r=+o,s()):r},e.domain=function(o){return arguments.length?(n(o),s()):n()},e.ticks=o=>{const c=n();let l=c[0],h=c[c.length-1];const f=h<l;f&&([l,h]=[h,l]);let m=i(l),g=i(h),b,y;const v=o==null?10:+o;let w=[];if(!(r%1)&&g-m<v){if(m=Math.floor(m),g=Math.ceil(g),l>0){for(;m<=g;++m)for(b=1;b<r;++b)if(y=m<0?b/a(-m):b*a(m),!(y<l)){if(y>h)break;w.push(y)}}else for(;m<=g;++m)for(b=r-1;b>=1;--b)if(y=m>0?b/a(-m):b*a(m),!(y<l)){if(y>h)break;w.push(y)}w.length*2<v&&(w=pE(l,h,v))}else w=pE(m,g,Math.min(g-m,v)).map(a);return f?w.reverse():w},e.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=dp(c)).precision==null&&(c.trim=!0),c=LN(c)),o===1/0)return c;const l=Math.max(1,r*o/e.ticks().length);return h=>{let f=h/a(Math.round(i(h)));return f*r<r-.5&&(f*=r),f<=l?c(h):""}},e.nice=()=>n(rz(n(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),e}function iz(){const t=FN(Xy()).domain([1,10]);return t.copy=()=>sm(t,iz()).base(t.base()),Sa.apply(t,arguments),t}function Y4(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Z4(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function UN(t){var e=1,n=t(Y4(e),Z4(e));return n.constant=function(r){return arguments.length?t(Y4(e=+r),Z4(e)):e},El(n)}function az(){var t=UN(Xy());return t.copy=function(){return sm(t,az()).constant(t.constant())},Sa.apply(t,arguments)}function J4(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function xie(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function bie(t){return t<0?-t*t:t*t}function BN(t){var e=t(fi,fi),n=1;function r(){return n===1?t(fi,fi):n===.5?t(xie,bie):t(J4(n),J4(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},El(e)}function zN(){var t=BN(Xy());return t.copy=function(){return sm(t,zN()).exponent(t.exponent())},Sa.apply(t,arguments),t}function wie(){return zN.apply(null,arguments).exponent(.5)}function Q4(t){return Math.sign(t)*t*t}function _ie(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function sz(){var t=DN(),e=[0,1],n=!1,r;function i(a){var s=_ie(t(a));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(a){return t.invert(Q4(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,wv)).map(Q4)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return sz(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},Sa.apply(i,arguments),El(i)}function oz(){var t=[],e=[],n=[],r;function i(){var s=0,o=Math.max(1,e.length);for(n=new Array(o-1);++s<o;)n[s-1]=bre(t,s/o);return a}function a(s){return s==null||isNaN(s=+s)?r:e[im(n,s)]}return a.invertExtent=function(s){var o=e.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:t[0],o<n.length?n[o]:t[t.length-1]]},a.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let o of s)o!=null&&!isNaN(o=+o)&&t.push(o);return t.sort(hl),i()},a.range=function(s){return arguments.length?(e=Array.from(s),i()):e.slice()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return oz().domain(t).range(e).unknown(r)},Sa.apply(a,arguments)}function lz(){var t=0,e=1,n=1,r=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[im(r,c,0,n)]:a}function o(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,o()):[t,e]},s.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,o()):i.slice()},s.invertExtent=function(c){var l=i.indexOf(c);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return lz().domain([t,e]).range(i).unknown(a)},Sa.apply(El(s),arguments)}function cz(){var t=[.5],e=[0,1],n,r=1;function i(a){return a!=null&&a<=a?e[im(t,a,0,r)]:n}return i.domain=function(a){return arguments.length?(t=Array.from(a),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var s=e.indexOf(a);return[t[s-1],t[s]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return cz().domain(t).range(e).unknown(n)},Sa.apply(i,arguments)}const TS=new Date,AS=new Date;function Sr(t,e,n,r){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const c=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return c;let l;do c.push(l=new Date(+a)),e(a,o),t(a);while(l<a&&a<s);return c},i.filter=a=>Sr(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),n&&(i.count=(a,s)=>(TS.setTime(+a),AS.setTime(+s),t(TS),t(AS),Math.floor(n(TS,AS))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ev=Sr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ev.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Sr(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ev);Ev.range;const no=1e3,ma=no*60,ro=ma*60,fo=ro*24,$N=fo*7,eD=fo*30,NS=fo*365,uc=Sr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*no)},(t,e)=>(e-t)/no,t=>t.getUTCSeconds());uc.range;const VN=Sr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*no)},(t,e)=>{t.setTime(+t+e*ma)},(t,e)=>(e-t)/ma,t=>t.getMinutes());VN.range;const HN=Sr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ma)},(t,e)=>(e-t)/ma,t=>t.getUTCMinutes());HN.range;const GN=Sr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*no-t.getMinutes()*ma)},(t,e)=>{t.setTime(+t+e*ro)},(t,e)=>(e-t)/ro,t=>t.getHours());GN.range;const WN=Sr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ro)},(t,e)=>(e-t)/ro,t=>t.getUTCHours());WN.range;const om=Sr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ma)/fo,t=>t.getDate()-1);om.range;const Ky=Sr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/fo,t=>t.getUTCDate()-1);Ky.range;const uz=Sr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/fo,t=>Math.floor(t/fo));uz.range;function zc(t){return Sr(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ma)/$N)}const Yy=zc(0),Tv=zc(1),Sie=zc(2),Mie=zc(3),hd=zc(4),Eie=zc(5),Tie=zc(6);Yy.range;Tv.range;Sie.range;Mie.range;hd.range;Eie.range;Tie.range;function $c(t){return Sr(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/$N)}const Zy=$c(0),Av=$c(1),Aie=$c(2),Nie=$c(3),pd=$c(4),Pie=$c(5),Cie=$c(6);Zy.range;Av.range;Aie.range;Nie.range;pd.range;Pie.range;Cie.range;const qN=Sr(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());qN.range;const XN=Sr(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());XN.range;const ho=Sr(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());ho.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Sr(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});ho.range;const po=Sr(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());po.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Sr(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});po.range;function dz(t,e,n,r,i,a){const s=[[uc,1,no],[uc,5,5*no],[uc,15,15*no],[uc,30,30*no],[a,1,ma],[a,5,5*ma],[a,15,15*ma],[a,30,30*ma],[i,1,ro],[i,3,3*ro],[i,6,6*ro],[i,12,12*ro],[r,1,fo],[r,2,2*fo],[n,1,$N],[e,1,eD],[e,3,3*eD],[t,1,NS]];function o(l,h,f){const m=h<l;m&&([l,h]=[h,l]);const g=f&&typeof f.range=="function"?f:c(l,h,f),b=g?g.range(l,+h+1):[];return m?b.reverse():b}function c(l,h,f){const m=Math.abs(h-l)/f,g=CN(([,,v])=>v).right(s,m);if(g===s.length)return t.every(gE(l/NS,h/NS,f));if(g===0)return Ev.every(Math.max(gE(l,h,f),1));const[b,y]=s[m/s[g-1][2]<s[g][2]/m?g-1:g];return b.every(y)}return[o,c]}const[Rie,jie]=dz(po,XN,Zy,uz,WN,HN),[Oie,Iie]=dz(ho,qN,Yy,om,GN,VN);function PS(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function CS(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Jf(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Die(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,c=t.shortMonths,l=Qf(i),h=eh(i),f=Qf(a),m=eh(a),g=Qf(s),b=eh(s),y=Qf(o),v=eh(o),w=Qf(c),_=eh(c),E={a:V,A:$,b:Y,B:J,c:null,d:sD,e:sD,f:iae,g:pae,G:gae,H:tae,I:nae,j:rae,L:fz,m:aae,M:sae,p:W,q:H,Q:cD,s:uD,S:oae,u:lae,U:cae,V:uae,w:dae,W:fae,x:null,X:null,y:hae,Y:mae,Z:vae,"%":lD},M={a:te,A:we,b:Ae,B:ne,c:null,d:oD,e:oD,f:wae,g:Rae,G:Oae,H:yae,I:xae,j:bae,L:pz,m:_ae,M:Sae,p:de,q:pe,Q:cD,s:uD,S:Mae,u:Eae,U:Tae,V:Aae,w:Nae,W:Pae,x:null,X:null,y:Cae,Y:jae,Z:Iae,"%":lD},T={a:F,A:D,b:L,B:q,c:I,d:iD,e:iD,f:Zie,g:rD,G:nD,H:aD,I:aD,j:qie,L:Yie,m:Wie,M:Xie,p:R,q:Gie,Q:Qie,s:eae,S:Kie,u:Bie,U:zie,V:$ie,w:Uie,W:Vie,x:U,X:k,y:rD,Y:nD,Z:Hie,"%":Jie};E.x=A(n,E),E.X=A(r,E),E.c=A(e,E),M.x=A(n,M),M.X=A(r,M),M.c=A(e,M);function A(fe,ce){return function(Ce){var ye=[],Ze=-1,tt=0,St=fe.length,lt,kt,re;for(Ce instanceof Date||(Ce=new Date(+Ce));++Ze<St;)fe.charCodeAt(Ze)===37&&(ye.push(fe.slice(tt,Ze)),(kt=tD[lt=fe.charAt(++Ze)])!=null?lt=fe.charAt(++Ze):kt=lt==="e"?" ":"0",(re=ce[lt])&&(lt=re(Ce,kt)),ye.push(lt),tt=Ze+1);return ye.push(fe.slice(tt,Ze)),ye.join("")}}function N(fe,ce){return function(Ce){var ye=Jf(1900,void 0,1),Ze=P(ye,fe,Ce+="",0),tt,St;if(Ze!=Ce.length)return null;if("Q"in ye)return new Date(ye.Q);if("s"in ye)return new Date(ye.s*1e3+("L"in ye?ye.L:0));if(ce&&!("Z"in ye)&&(ye.Z=0),"p"in ye&&(ye.H=ye.H%12+ye.p*12),ye.m===void 0&&(ye.m="q"in ye?ye.q:0),"V"in ye){if(ye.V<1||ye.V>53)return null;"w"in ye||(ye.w=1),"Z"in ye?(tt=CS(Jf(ye.y,0,1)),St=tt.getUTCDay(),tt=St>4||St===0?Av.ceil(tt):Av(tt),tt=Ky.offset(tt,(ye.V-1)*7),ye.y=tt.getUTCFullYear(),ye.m=tt.getUTCMonth(),ye.d=tt.getUTCDate()+(ye.w+6)%7):(tt=PS(Jf(ye.y,0,1)),St=tt.getDay(),tt=St>4||St===0?Tv.ceil(tt):Tv(tt),tt=om.offset(tt,(ye.V-1)*7),ye.y=tt.getFullYear(),ye.m=tt.getMonth(),ye.d=tt.getDate()+(ye.w+6)%7)}else("W"in ye||"U"in ye)&&("w"in ye||(ye.w="u"in ye?ye.u%7:"W"in ye?1:0),St="Z"in ye?CS(Jf(ye.y,0,1)).getUTCDay():PS(Jf(ye.y,0,1)).getDay(),ye.m=0,ye.d="W"in ye?(ye.w+6)%7+ye.W*7-(St+5)%7:ye.w+ye.U*7-(St+6)%7);return"Z"in ye?(ye.H+=ye.Z/100|0,ye.M+=ye.Z%100,CS(ye)):PS(ye)}}function P(fe,ce,Ce,ye){for(var Ze=0,tt=ce.length,St=Ce.length,lt,kt;Ze<tt;){if(ye>=St)return-1;if(lt=ce.charCodeAt(Ze++),lt===37){if(lt=ce.charAt(Ze++),kt=T[lt in tD?ce.charAt(Ze++):lt],!kt||(ye=kt(fe,Ce,ye))<0)return-1}else if(lt!=Ce.charCodeAt(ye++))return-1}return ye}function R(fe,ce,Ce){var ye=l.exec(ce.slice(Ce));return ye?(fe.p=h.get(ye[0].toLowerCase()),Ce+ye[0].length):-1}function F(fe,ce,Ce){var ye=g.exec(ce.slice(Ce));return ye?(fe.w=b.get(ye[0].toLowerCase()),Ce+ye[0].length):-1}function D(fe,ce,Ce){var ye=f.exec(ce.slice(Ce));return ye?(fe.w=m.get(ye[0].toLowerCase()),Ce+ye[0].length):-1}function L(fe,ce,Ce){var ye=w.exec(ce.slice(Ce));return ye?(fe.m=_.get(ye[0].toLowerCase()),Ce+ye[0].length):-1}function q(fe,ce,Ce){var ye=y.exec(ce.slice(Ce));return ye?(fe.m=v.get(ye[0].toLowerCase()),Ce+ye[0].length):-1}function I(fe,ce,Ce){return P(fe,e,ce,Ce)}function U(fe,ce,Ce){return P(fe,n,ce,Ce)}function k(fe,ce,Ce){return P(fe,r,ce,Ce)}function V(fe){return s[fe.getDay()]}function $(fe){return a[fe.getDay()]}function Y(fe){return c[fe.getMonth()]}function J(fe){return o[fe.getMonth()]}function W(fe){return i[+(fe.getHours()>=12)]}function H(fe){return 1+~~(fe.getMonth()/3)}function te(fe){return s[fe.getUTCDay()]}function we(fe){return a[fe.getUTCDay()]}function Ae(fe){return c[fe.getUTCMonth()]}function ne(fe){return o[fe.getUTCMonth()]}function de(fe){return i[+(fe.getUTCHours()>=12)]}function pe(fe){return 1+~~(fe.getUTCMonth()/3)}return{format:function(fe){var ce=A(fe+="",E);return ce.toString=function(){return fe},ce},parse:function(fe){var ce=N(fe+="",!1);return ce.toString=function(){return fe},ce},utcFormat:function(fe){var ce=A(fe+="",M);return ce.toString=function(){return fe},ce},utcParse:function(fe){var ce=N(fe+="",!0);return ce.toString=function(){return fe},ce}}}var tD={"-":"",_:" ",0:"0"},Rr=/^\s*\d+/,kie=/^%/,Lie=/[\\^$*+?|[\]().{}]/g;function bn(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Fie(t){return t.replace(Lie,"\\$&")}function Qf(t){return new RegExp("^(?:"+t.map(Fie).join("|")+")","i")}function eh(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Uie(t,e,n){var r=Rr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Bie(t,e,n){var r=Rr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function zie(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $ie(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Vie(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function nD(t,e,n){var r=Rr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function rD(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Hie(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Gie(t,e,n){var r=Rr.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Wie(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function iD(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function qie(t,e,n){var r=Rr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function aD(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Xie(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Kie(t,e,n){var r=Rr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Yie(t,e,n){var r=Rr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zie(t,e,n){var r=Rr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Jie(t,e,n){var r=kie.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Qie(t,e,n){var r=Rr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function eae(t,e,n){var r=Rr.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function sD(t,e){return bn(t.getDate(),e,2)}function tae(t,e){return bn(t.getHours(),e,2)}function nae(t,e){return bn(t.getHours()%12||12,e,2)}function rae(t,e){return bn(1+om.count(ho(t),t),e,3)}function fz(t,e){return bn(t.getMilliseconds(),e,3)}function iae(t,e){return fz(t,e)+"000"}function aae(t,e){return bn(t.getMonth()+1,e,2)}function sae(t,e){return bn(t.getMinutes(),e,2)}function oae(t,e){return bn(t.getSeconds(),e,2)}function lae(t){var e=t.getDay();return e===0?7:e}function cae(t,e){return bn(Yy.count(ho(t)-1,t),e,2)}function hz(t){var e=t.getDay();return e>=4||e===0?hd(t):hd.ceil(t)}function uae(t,e){return t=hz(t),bn(hd.count(ho(t),t)+(ho(t).getDay()===4),e,2)}function dae(t){return t.getDay()}function fae(t,e){return bn(Tv.count(ho(t)-1,t),e,2)}function hae(t,e){return bn(t.getFullYear()%100,e,2)}function pae(t,e){return t=hz(t),bn(t.getFullYear()%100,e,2)}function mae(t,e){return bn(t.getFullYear()%1e4,e,4)}function gae(t,e){var n=t.getDay();return t=n>=4||n===0?hd(t):hd.ceil(t),bn(t.getFullYear()%1e4,e,4)}function vae(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+bn(e/60|0,"0",2)+bn(e%60,"0",2)}function oD(t,e){return bn(t.getUTCDate(),e,2)}function yae(t,e){return bn(t.getUTCHours(),e,2)}function xae(t,e){return bn(t.getUTCHours()%12||12,e,2)}function bae(t,e){return bn(1+Ky.count(po(t),t),e,3)}function pz(t,e){return bn(t.getUTCMilliseconds(),e,3)}function wae(t,e){return pz(t,e)+"000"}function _ae(t,e){return bn(t.getUTCMonth()+1,e,2)}function Sae(t,e){return bn(t.getUTCMinutes(),e,2)}function Mae(t,e){return bn(t.getUTCSeconds(),e,2)}function Eae(t){var e=t.getUTCDay();return e===0?7:e}function Tae(t,e){return bn(Zy.count(po(t)-1,t),e,2)}function mz(t){var e=t.getUTCDay();return e>=4||e===0?pd(t):pd.ceil(t)}function Aae(t,e){return t=mz(t),bn(pd.count(po(t),t)+(po(t).getUTCDay()===4),e,2)}function Nae(t){return t.getUTCDay()}function Pae(t,e){return bn(Av.count(po(t)-1,t),e,2)}function Cae(t,e){return bn(t.getUTCFullYear()%100,e,2)}function Rae(t,e){return t=mz(t),bn(t.getUTCFullYear()%100,e,2)}function jae(t,e){return bn(t.getUTCFullYear()%1e4,e,4)}function Oae(t,e){var n=t.getUTCDay();return t=n>=4||n===0?pd(t):pd.ceil(t),bn(t.getUTCFullYear()%1e4,e,4)}function Iae(){return"+0000"}function lD(){return"%"}function cD(t){return+t}function uD(t){return Math.floor(+t/1e3)}var pu,gz,vz;Dae({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Dae(t){return pu=Die(t),gz=pu.format,pu.parse,vz=pu.utcFormat,pu.utcParse,pu}function kae(t){return new Date(t)}function Lae(t){return t instanceof Date?+t:+new Date(+t)}function KN(t,e,n,r,i,a,s,o,c,l){var h=DN(),f=h.invert,m=h.domain,g=l(".%L"),b=l(":%S"),y=l("%I:%M"),v=l("%I %p"),w=l("%a %d"),_=l("%b %d"),E=l("%B"),M=l("%Y");function T(A){return(c(A)<A?g:o(A)<A?b:s(A)<A?y:a(A)<A?v:r(A)<A?i(A)<A?w:_:n(A)<A?E:M)(A)}return h.invert=function(A){return new Date(f(A))},h.domain=function(A){return arguments.length?m(Array.from(A,Lae)):m().map(kae)},h.ticks=function(A){var N=m();return t(N[0],N[N.length-1],A??10)},h.tickFormat=function(A,N){return N==null?T:l(N)},h.nice=function(A){var N=m();return(!A||typeof A.range!="function")&&(A=e(N[0],N[N.length-1],A??10)),A?m(rz(N,A)):h},h.copy=function(){return sm(h,KN(t,e,n,r,i,a,s,o,c,l))},h}function Fae(){return Sa.apply(KN(Oie,Iie,ho,qN,Yy,om,GN,VN,uc,gz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Uae(){return Sa.apply(KN(Rie,jie,po,XN,Zy,Ky,WN,HN,uc,vz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Jy(){var t=0,e=1,n,r,i,a,s=fi,o=!1,c;function l(f){return f==null||isNaN(f=+f)?c:s(i===0?.5:(f=(a(f)-n)*i,o?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,n=a(t=+t),r=a(e=+e),i=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(f){return arguments.length?(o=!!f,l):o},l.interpolator=function(f){return arguments.length?(s=f,l):s};function h(f){return function(m){var g,b;return arguments.length?([g,b]=m,s=f(g,b),l):[s(0),s(1)]}}return l.range=h(Zd),l.rangeRound=h(IN),l.unknown=function(f){return arguments.length?(c=f,l):c},function(f){return a=f,n=f(t),r=f(e),i=n===r?0:1/(r-n),l}}function Tl(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function yz(){var t=El(Jy()(fi));return t.copy=function(){return Tl(t,yz())},_o.apply(t,arguments)}function xz(){var t=FN(Jy()).domain([1,10]);return t.copy=function(){return Tl(t,xz()).base(t.base())},_o.apply(t,arguments)}function bz(){var t=UN(Jy());return t.copy=function(){return Tl(t,bz()).constant(t.constant())},_o.apply(t,arguments)}function YN(){var t=BN(Jy());return t.copy=function(){return Tl(t,YN()).exponent(t.exponent())},_o.apply(t,arguments)}function Bae(){return YN.apply(null,arguments).exponent(.5)}function wz(){var t=[],e=fi;function n(r){if(r!=null&&!isNaN(r=+r))return e((im(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(hl),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>xre(t,a/r))},n.copy=function(){return wz(e).domain(t)},_o.apply(n,arguments)}function Qy(){var t=0,e=.5,n=1,r=1,i,a,s,o,c,l=fi,h,f=!1,m;function g(y){return isNaN(y=+y)?m:(y=.5+((y=+h(y))-a)*(r*y<r*a?o:c),l(f?Math.max(0,Math.min(1,y)):y))}g.domain=function(y){return arguments.length?([t,e,n]=y,i=h(t=+t),a=h(e=+e),s=h(n=+n),o=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),r=a<i?-1:1,g):[t,e,n]},g.clamp=function(y){return arguments.length?(f=!!y,g):f},g.interpolator=function(y){return arguments.length?(l=y,g):l};function b(y){return function(v){var w,_,E;return arguments.length?([w,_,E]=v,l=Jre(y,[w,_,E]),g):[l(0),l(.5),l(1)]}}return g.range=b(Zd),g.rangeRound=b(IN),g.unknown=function(y){return arguments.length?(m=y,g):m},function(y){return h=y,i=y(t),a=y(e),s=y(n),o=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),r=a<i?-1:1,g}}function _z(){var t=El(Qy()(fi));return t.copy=function(){return Tl(t,_z())},_o.apply(t,arguments)}function Sz(){var t=FN(Qy()).domain([.1,1,10]);return t.copy=function(){return Tl(t,Sz()).base(t.base())},_o.apply(t,arguments)}function Mz(){var t=UN(Qy());return t.copy=function(){return Tl(t,Mz()).constant(t.constant())},_o.apply(t,arguments)}function ZN(){var t=BN(Qy());return t.copy=function(){return Tl(t,ZN()).exponent(t.exponent())},_o.apply(t,arguments)}function zae(){return ZN.apply(null,arguments).exponent(.5)}const dD=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:lp,scaleDiverging:_z,scaleDivergingLog:Sz,scaleDivergingPow:ZN,scaleDivergingSqrt:zae,scaleDivergingSymlog:Mz,scaleIdentity:nz,scaleImplicit:vE,scaleLinear:Mv,scaleLog:iz,scaleOrdinal:RN,scalePoint:Dh,scalePow:zN,scaleQuantile:oz,scaleQuantize:lz,scaleRadial:sz,scaleSequential:yz,scaleSequentialLog:xz,scaleSequentialPow:YN,scaleSequentialQuantile:wz,scaleSequentialSqrt:Bae,scaleSequentialSymlog:bz,scaleSqrt:wie,scaleSymlog:az,scaleThreshold:cz,scaleTime:Fae,scaleUtc:Uae,tickFormat:tz},Symbol.toStringTag,{value:"Module"}));var RS,fD;function ex(){if(fD)return RS;fD=1;var t=qd();function e(n,r,i){for(var a=-1,s=n.length;++a<s;){var o=n[a],c=r(o);if(c!=null&&(l===void 0?c===c&&!t(c):i(c,l)))var l=c,h=o}return h}return RS=e,RS}var jS,hD;function Ez(){if(hD)return jS;hD=1;function t(e,n){return e>n}return jS=t,jS}var OS,pD;function $ae(){if(pD)return OS;pD=1;var t=ex(),e=Ez(),n=Yd();function r(i){return i&&i.length?t(i,n,e):void 0}return OS=r,OS}var Vae=$ae();const ol=Mn(Vae);var IS,mD;function Tz(){if(mD)return IS;mD=1;function t(e,n){return e<n}return IS=t,IS}var DS,gD;function Hae(){if(gD)return DS;gD=1;var t=ex(),e=Tz(),n=Yd();function r(i){return i&&i.length?t(i,n,e):void 0}return DS=r,DS}var Gae=Hae();const tx=Mn(Gae);var kS,vD;function Wae(){if(vD)return kS;vD=1;var t=hN(),e=Rs(),n=j6(),r=ji();function i(a,s){var o=r(a)?t:n;return o(a,e(s,3))}return kS=i,kS}var LS,yD;function qae(){if(yD)return LS;yD=1;var t=C6(),e=Wae();function n(r,i){return t(e(r,i),1)}return LS=n,LS}var Xae=qae();const Kae=Mn(Xae);var FS,xD;function Yae(){if(xD)return FS;xD=1;var t=TN();function e(n,r){return t(n,r)}return FS=e,FS}var Zae=Yae();const yl=Mn(Zae);var Jd=1e9,Jae={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},QN,Hn=!0,xa="[DecimalError] ",yc=xa+"Invalid argument: ",JN=xa+"Exponent out of range: ",Qd=Math.floor,tc=Math.pow,Qae=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gi,Nr=1e7,Bn=7,Az=9007199254740991,Nv=Qd(Az/Bn),_t={};_t.absoluteValue=_t.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};_t.comparedTo=_t.cmp=function(t){var e,n,r,i,a=this;if(t=new a.constructor(t),a.s!==t.s)return a.s||-t.s;if(a.e!==t.e)return a.e>t.e^a.s<0?1:-1;for(r=a.d.length,i=t.d.length,e=0,n=r<i?r:i;e<n;++e)if(a.d[e]!==t.d[e])return a.d[e]>t.d[e]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};_t.decimalPlaces=_t.dp=function(){var t=this,e=t.d.length-1,n=(e-t.e)*Bn;if(e=t.d[e],e)for(;e%10==0;e/=10)n--;return n<0?0:n};_t.dividedBy=_t.div=function(t){return lo(this,new this.constructor(t))};_t.dividedToIntegerBy=_t.idiv=function(t){var e=this,n=e.constructor;return jn(lo(e,new n(t),0,1),n.precision)};_t.equals=_t.eq=function(t){return!this.cmp(t)};_t.exponent=function(){return fr(this)};_t.greaterThan=_t.gt=function(t){return this.cmp(t)>0};_t.greaterThanOrEqualTo=_t.gte=function(t){return this.cmp(t)>=0};_t.isInteger=_t.isint=function(){return this.e>this.d.length-2};_t.isNegative=_t.isneg=function(){return this.s<0};_t.isPositive=_t.ispos=function(){return this.s>0};_t.isZero=function(){return this.s===0};_t.lessThan=_t.lt=function(t){return this.cmp(t)<0};_t.lessThanOrEqualTo=_t.lte=function(t){return this.cmp(t)<1};_t.logarithm=_t.log=function(t){var e,n=this,r=n.constructor,i=r.precision,a=i+5;if(t===void 0)t=new r(10);else if(t=new r(t),t.s<1||t.eq(Gi))throw Error(xa+"NaN");if(n.s<1)throw Error(xa+(n.s?"NaN":"-Infinity"));return n.eq(Gi)?new r(0):(Hn=!1,e=lo(fp(n,a),fp(t,a),a),Hn=!0,jn(e,i))};_t.minus=_t.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Cz(e,t):Nz(e,(t.s=-t.s,t))};_t.modulo=_t.mod=function(t){var e,n=this,r=n.constructor,i=r.precision;if(t=new r(t),!t.s)throw Error(xa+"NaN");return n.s?(Hn=!1,e=lo(n,t,0,1).times(t),Hn=!0,n.minus(e)):jn(new r(n),i)};_t.naturalExponential=_t.exp=function(){return Pz(this)};_t.naturalLogarithm=_t.ln=function(){return fp(this)};_t.negated=_t.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};_t.plus=_t.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?Nz(e,t):Cz(e,(t.s=-t.s,t))};_t.precision=_t.sd=function(t){var e,n,r,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(yc+t);if(e=fr(i)+1,r=i.d.length-1,n=r*Bn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return t&&e>n?e:n};_t.squareRoot=_t.sqrt=function(){var t,e,n,r,i,a,s,o=this,c=o.constructor;if(o.s<1){if(!o.s)return new c(0);throw Error(xa+"NaN")}for(t=fr(o),Hn=!1,i=Math.sqrt(+o),i==0||i==1/0?(e=cs(o.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Qd((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),r=new c(e)):r=new c(i.toString()),n=c.precision,i=s=n+3;;)if(a=r,r=a.plus(lo(o,a,s+2)).times(.5),cs(a.d).slice(0,s)===(e=cs(r.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(jn(a,n+1,0),a.times(a).eq(o)){r=a;break}}else if(e!="9999")break;s+=4}return Hn=!0,jn(r,n)};_t.times=_t.mul=function(t){var e,n,r,i,a,s,o,c,l,h=this,f=h.constructor,m=h.d,g=(t=new f(t)).d;if(!h.s||!t.s)return new f(0);for(t.s*=h.s,n=h.e+t.e,c=m.length,l=g.length,c<l&&(a=m,m=g,g=a,s=c,c=l,l=s),a=[],s=c+l,r=s;r--;)a.push(0);for(r=l;--r>=0;){for(e=0,i=c+r;i>r;)o=a[i]+g[r]*m[i-r-1]+e,a[i--]=o%Nr|0,e=o/Nr|0;a[i]=(a[i]+e)%Nr|0}for(;!a[--s];)a.pop();return e?++n:a.shift(),t.d=a,t.e=n,Hn?jn(t,f.precision):t};_t.toDecimalPlaces=_t.todp=function(t,e){var n=this,r=n.constructor;return n=new r(n),t===void 0?n:(Ss(t,0,Jd),e===void 0?e=r.rounding:Ss(e,0,8),jn(n,t+fr(n)+1,e))};_t.toExponential=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=Pc(r,!0):(Ss(t,0,Jd),e===void 0?e=i.rounding:Ss(e,0,8),r=jn(new i(r),t+1,e),n=Pc(r,!0,t+1)),n};_t.toFixed=function(t,e){var n,r,i=this,a=i.constructor;return t===void 0?Pc(i):(Ss(t,0,Jd),e===void 0?e=a.rounding:Ss(e,0,8),r=jn(new a(i),t+fr(i)+1,e),n=Pc(r.abs(),!1,t+fr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};_t.toInteger=_t.toint=function(){var t=this,e=t.constructor;return jn(new e(t),fr(t)+1,e.rounding)};_t.toNumber=function(){return+this};_t.toPower=_t.pow=function(t){var e,n,r,i,a,s,o=this,c=o.constructor,l=12,h=+(t=new c(t));if(!t.s)return new c(Gi);if(o=new c(o),!o.s){if(t.s<1)throw Error(xa+"Infinity");return o}if(o.eq(Gi))return o;if(r=c.precision,t.eq(Gi))return jn(o,r);if(e=t.e,n=t.d.length-1,s=e>=n,a=o.s,s){if((n=h<0?-h:h)<=Az){for(i=new c(Gi),e=Math.ceil(r/Bn+4),Hn=!1;n%2&&(i=i.times(o),wD(i.d,e)),n=Qd(n/2),n!==0;)o=o.times(o),wD(o.d,e);return Hn=!0,t.s<0?new c(Gi).div(i):jn(i,r)}}else if(a<0)throw Error(xa+"NaN");return a=a<0&&t.d[Math.max(e,n)]&1?-1:1,o.s=1,Hn=!1,i=t.times(fp(o,r+l)),Hn=!0,i=Pz(i),i.s=a,i};_t.toPrecision=function(t,e){var n,r,i=this,a=i.constructor;return t===void 0?(n=fr(i),r=Pc(i,n<=a.toExpNeg||n>=a.toExpPos)):(Ss(t,1,Jd),e===void 0?e=a.rounding:Ss(e,0,8),i=jn(new a(i),t,e),n=fr(i),r=Pc(i,t<=n||n<=a.toExpNeg,t)),r};_t.toSignificantDigits=_t.tosd=function(t,e){var n=this,r=n.constructor;return t===void 0?(t=r.precision,e=r.rounding):(Ss(t,1,Jd),e===void 0?e=r.rounding:Ss(e,0,8)),jn(new r(n),t,e)};_t.toString=_t.valueOf=_t.val=_t.toJSON=_t[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=fr(t),n=t.constructor;return Pc(t,e<=n.toExpNeg||e>=n.toExpPos)};function Nz(t,e){var n,r,i,a,s,o,c,l,h=t.constructor,f=h.precision;if(!t.s||!e.s)return e.s||(e=new h(t)),Hn?jn(e,f):e;if(c=t.d,l=e.d,s=t.e,i=e.e,c=c.slice(),a=s-i,a){for(a<0?(r=c,a=-a,o=l.length):(r=l,i=s,o=c.length),s=Math.ceil(f/Bn),o=s>o?s+1:o+1,a>o&&(a=o,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(o=c.length,a=l.length,o-a<0&&(a=o,r=l,l=c,c=r),n=0;a;)n=(c[--a]=c[a]+l[a]+n)/Nr|0,c[a]%=Nr;for(n&&(c.unshift(n),++i),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=i,Hn?jn(e,f):e}function Ss(t,e,n){if(t!==~~t||t<e||t>n)throw Error(yc+t)}function cs(t){var e,n,r,i=t.length-1,a="",s=t[0];if(i>0){for(a+=s,e=1;e<i;e++)r=t[e]+"",n=Bn-r.length,n&&(a+=tl(n)),a+=r;s=t[e],r=s+"",n=Bn-r.length,n&&(a+=tl(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var lo=(function(){function t(r,i){var a,s=0,o=r.length;for(r=r.slice();o--;)a=r[o]*i+s,r[o]=a%Nr|0,s=a/Nr|0;return s&&r.unshift(s),r}function e(r,i,a,s){var o,c;if(a!=s)c=a>s?1:-1;else for(o=c=0;o<a;o++)if(r[o]!=i[o]){c=r[o]>i[o]?1:-1;break}return c}function n(r,i,a){for(var s=0;a--;)r[a]-=s,s=r[a]<i[a]?1:0,r[a]=s*Nr+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,s){var o,c,l,h,f,m,g,b,y,v,w,_,E,M,T,A,N,P,R=r.constructor,F=r.s==i.s?1:-1,D=r.d,L=i.d;if(!r.s)return new R(r);if(!i.s)throw Error(xa+"Division by zero");for(c=r.e-i.e,N=L.length,T=D.length,g=new R(F),b=g.d=[],l=0;L[l]==(D[l]||0);)++l;if(L[l]>(D[l]||0)&&--c,a==null?_=a=R.precision:s?_=a+(fr(r)-fr(i))+1:_=a,_<0)return new R(0);if(_=_/Bn+2|0,l=0,N==1)for(h=0,L=L[0],_++;(l<T||h)&&_--;l++)E=h*Nr+(D[l]||0),b[l]=E/L|0,h=E%L|0;else{for(h=Nr/(L[0]+1)|0,h>1&&(L=t(L,h),D=t(D,h),N=L.length,T=D.length),M=N,y=D.slice(0,N),v=y.length;v<N;)y[v++]=0;P=L.slice(),P.unshift(0),A=L[0],L[1]>=Nr/2&&++A;do h=0,o=e(L,y,N,v),o<0?(w=y[0],N!=v&&(w=w*Nr+(y[1]||0)),h=w/A|0,h>1?(h>=Nr&&(h=Nr-1),f=t(L,h),m=f.length,v=y.length,o=e(f,y,m,v),o==1&&(h--,n(f,N<m?P:L,m))):(h==0&&(o=h=1),f=L.slice()),m=f.length,m<v&&f.unshift(0),n(y,f,v),o==-1&&(v=y.length,o=e(L,y,N,v),o<1&&(h++,n(y,N<v?P:L,v))),v=y.length):o===0&&(h++,y=[0]),b[l++]=h,o&&y[0]?y[v++]=D[M]||0:(y=[D[M]],v=1);while((M++<T||y[0]!==void 0)&&_--)}return b[0]||b.shift(),g.e=c,jn(g,s?a+fr(g)+1:a)}})();function Pz(t,e){var n,r,i,a,s,o,c=0,l=0,h=t.constructor,f=h.precision;if(fr(t)>16)throw Error(JN+fr(t));if(!t.s)return new h(Gi);for(Hn=!1,o=f,s=new h(.03125);t.abs().gte(.1);)t=t.times(s),l+=5;for(r=Math.log(tc(2,l))/Math.LN10*2+5|0,o+=r,n=i=a=new h(Gi),h.precision=o;;){if(i=jn(i.times(t),o),n=n.times(++c),s=a.plus(lo(i,n,o)),cs(s.d).slice(0,o)===cs(a.d).slice(0,o)){for(;l--;)a=jn(a.times(a),o);return h.precision=f,e==null?(Hn=!0,jn(a,f)):a}a=s}}function fr(t){for(var e=t.e*Bn,n=t.d[0];n>=10;n/=10)e++;return e}function US(t,e,n){if(e>t.LN10.sd())throw Hn=!0,n&&(t.precision=n),Error(xa+"LN10 precision limit exceeded");return jn(new t(t.LN10),e)}function tl(t){for(var e="";t--;)e+="0";return e}function fp(t,e){var n,r,i,a,s,o,c,l,h,f=1,m=10,g=t,b=g.d,y=g.constructor,v=y.precision;if(g.s<1)throw Error(xa+(g.s?"NaN":"-Infinity"));if(g.eq(Gi))return new y(0);if(e==null?(Hn=!1,l=v):l=e,g.eq(10))return e==null&&(Hn=!0),US(y,l);if(l+=m,y.precision=l,n=cs(b),r=n.charAt(0),a=fr(g),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(t),n=cs(g.d),r=n.charAt(0),f++;a=fr(g),r>1?(g=new y("0."+n),a++):g=new y(r+"."+n.slice(1))}else return c=US(y,l+2,v).times(a+""),g=fp(new y(r+"."+n.slice(1)),l-m).plus(c),y.precision=v,e==null?(Hn=!0,jn(g,v)):g;for(o=s=g=lo(g.minus(Gi),g.plus(Gi),l),h=jn(g.times(g),l),i=3;;){if(s=jn(s.times(h),l),c=o.plus(lo(s,new y(i),l)),cs(c.d).slice(0,l)===cs(o.d).slice(0,l))return o=o.times(2),a!==0&&(o=o.plus(US(y,l+2,v).times(a+""))),o=lo(o,new y(f),l),y.precision=v,e==null?(Hn=!0,jn(o,v)):o;o=c,i+=2}}function bD(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charCodeAt(r)===48;)++r;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(r,i),e){if(i-=r,n=n-r-1,t.e=Qd(n/Bn),t.d=[],r=(n+1)%Bn,n<0&&(r+=Bn),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=Bn;r<i;)t.d.push(+e.slice(r,r+=Bn));e=e.slice(r),r=Bn-e.length}else r-=i;for(;r--;)e+="0";if(t.d.push(+e),Hn&&(t.e>Nv||t.e<-Nv))throw Error(JN+n)}else t.s=0,t.e=0,t.d=[0];return t}function jn(t,e,n){var r,i,a,s,o,c,l,h,f=t.d;for(s=1,a=f[0];a>=10;a/=10)s++;if(r=e-s,r<0)r+=Bn,i=e,l=f[h=0];else{if(h=Math.ceil((r+1)/Bn),a=f.length,h>=a)return t;for(l=a=f[h],s=1;a>=10;a/=10)s++;r%=Bn,i=r-Bn+s}if(n!==void 0&&(a=tc(10,s-i-1),o=l/a%10|0,c=e<0||f[h+1]!==void 0||l%a,c=n<4?(o||c)&&(n==0||n==(t.s<0?3:2)):o>5||o==5&&(n==4||c||n==6&&(r>0?i>0?l/tc(10,s-i):0:f[h-1])%10&1||n==(t.s<0?8:7))),e<1||!f[0])return c?(a=fr(t),f.length=1,e=e-a-1,f[0]=tc(10,(Bn-e%Bn)%Bn),t.e=Qd(-e/Bn)||0):(f.length=1,f[0]=t.e=t.s=0),t;if(r==0?(f.length=h,a=1,h--):(f.length=h+1,a=tc(10,Bn-r),f[h]=i>0?(l/tc(10,s-i)%tc(10,i)|0)*a:0),c)for(;;)if(h==0){(f[0]+=a)==Nr&&(f[0]=1,++t.e);break}else{if(f[h]+=a,f[h]!=Nr)break;f[h--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(Hn&&(t.e>Nv||t.e<-Nv))throw Error(JN+fr(t));return t}function Cz(t,e){var n,r,i,a,s,o,c,l,h,f,m=t.constructor,g=m.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new m(t),Hn?jn(e,g):e;if(c=t.d,f=e.d,r=e.e,l=t.e,c=c.slice(),s=l-r,s){for(h=s<0,h?(n=c,s=-s,o=f.length):(n=f,r=l,o=c.length),i=Math.max(Math.ceil(g/Bn),o)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=c.length,o=f.length,h=i<o,h&&(o=i),i=0;i<o;i++)if(c[i]!=f[i]){h=c[i]<f[i];break}s=0}for(h&&(n=c,c=f,f=n,e.s=-e.s),o=c.length,i=f.length-o;i>0;--i)c[o++]=0;for(i=f.length;i>s;){if(c[--i]<f[i]){for(a=i;a&&c[--a]===0;)c[a]=Nr-1;--c[a],c[i]+=Nr}c[i]-=f[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(e.d=c,e.e=r,Hn?jn(e,g):e):new m(0)}function Pc(t,e,n){var r,i=fr(t),a=cs(t.d),s=a.length;return e?(n&&(r=n-s)>0?a=a.charAt(0)+"."+a.slice(1)+tl(r):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+tl(-i-1)+a,n&&(r=n-s)>0&&(a+=tl(r))):i>=s?(a+=tl(i+1-s),n&&(r=n-i-1)>0&&(a=a+"."+tl(r))):((r=i+1)<s&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(a+="."),a+=tl(r))),t.s<0?"-"+a:a}function wD(t,e){if(t.length>e)return t.length=e,!0}function Rz(t){var e,n,r;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(yc+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return bD(s,a.toString())}else if(typeof a!="string")throw Error(yc+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,Qae.test(a))bD(s,a);else throw Error(yc+a)}if(i.prototype=_t,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Rz,i.config=i.set=ese,t===void 0&&(t={}),t)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<r.length;)t.hasOwnProperty(n=r[e++])||(t[n]=this[n]);return i.config(t),i}function ese(t){if(!t||typeof t!="object")throw Error(xa+"Object expected");var e,n,r,i=["precision",1,Jd,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((r=t[n=i[e]])!==void 0)if(Qd(r)===r&&r>=i[e+1]&&r<=i[e+2])this[n]=r;else throw Error(yc+n+": "+r);if((r=t[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(yc+n+": "+r);return this}var QN=Rz(Jae);Gi=new QN(1);const Rn=QN;function tse(t){return ase(t)||ise(t)||rse(t)||nse()}function nse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rse(t,e){if(t){if(typeof t=="string")return _E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _E(t,e)}}function ise(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function ase(t){if(Array.isArray(t))return _E(t)}function _E(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var sse=function(e){return e},jz={},Oz=function(e){return e===jz},_D=function(e){return function n(){return arguments.length===0||arguments.length===1&&Oz(arguments.length<=0?void 0:arguments[0])?n:e.apply(void 0,arguments)}},ose=function t(e,n){return e===1?n:_D(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=i.filter(function(o){return o!==jz}).length;return s>=e?n.apply(void 0,i):t(e-s,_D(function(){for(var o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];var h=i.map(function(f){return Oz(f)?c.shift():f});return n.apply(void 0,tse(h).concat(c))}))})},nx=function(e){return ose(e.length,e)},SE=function(e,n){for(var r=[],i=e;i<n;++i)r[i-e]=i;return r},lse=nx(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(n){return e[n]}).map(t)}),cse=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.length)return sse;var i=n.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(o,c){return c(o)},a.apply(void 0,arguments))}},ME=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},Iz=function(e){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n&&a.every(function(o,c){return o===n[c]})||(n=a,r=e.apply(void 0,a)),r}};function use(t){var e;return t===0?e=1:e=Math.floor(new Rn(t).abs().log(10).toNumber())+1,e}function dse(t,e,n){for(var r=new Rn(t),i=0,a=[];r.lt(e)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var fse=nx(function(t,e,n){var r=+t,i=+e;return r+n*(i-r)}),hse=nx(function(t,e,n){var r=e-+t;return r=r||1/0,(n-t)/r}),pse=nx(function(t,e,n){var r=e-+t;return r=r||1/0,Math.max(0,Math.min(1,(n-t)/r))});const rx={rangeStep:dse,getDigitCount:use,interpolateNumber:fse,uninterpolateNumber:hse,uninterpolateTruncation:pse};function EE(t){return vse(t)||gse(t)||Dz(t)||mse()}function mse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gse(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function vse(t){if(Array.isArray(t))return TE(t)}function hp(t,e){return bse(t)||xse(t,e)||Dz(t,e)||yse()}function yse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dz(t,e){if(t){if(typeof t=="string")return TE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TE(t,e)}}function TE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xse(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),o;!(r=(o=s.next()).done)&&(n.push(o.value),!(e&&n.length===e));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw a}}return n}}function bse(t){if(Array.isArray(t))return t}function kz(t){var e=hp(t,2),n=e[0],r=e[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function Lz(t,e,n){if(t.lte(0))return new Rn(0);var r=rx.getDigitCount(t.toNumber()),i=new Rn(10).pow(r),a=t.div(i),s=r!==1?.05:.1,o=new Rn(Math.ceil(a.div(s).toNumber())).add(n).mul(s),c=o.mul(i);return e?c:new Rn(Math.ceil(c))}function wse(t,e,n){var r=1,i=new Rn(t);if(!i.isint()&&n){var a=Math.abs(t);a<1?(r=new Rn(10).pow(rx.getDigitCount(t)-1),i=new Rn(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Rn(Math.floor(t)))}else t===0?i=new Rn(Math.floor((e-1)/2)):n||(i=new Rn(Math.floor(t)));var s=Math.floor((e-1)/2),o=cse(lse(function(c){return i.add(new Rn(c-s).mul(r)).toNumber()}),SE);return o(0,e)}function Fz(t,e,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new Rn(0),tickMin:new Rn(0),tickMax:new Rn(0)};var a=Lz(new Rn(e).sub(t).div(n-1),r,i),s;t<=0&&e>=0?s=new Rn(0):(s=new Rn(t).add(e).div(2),s=s.sub(new Rn(s).mod(a)));var o=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Rn(e).sub(s).div(a).toNumber()),l=o+c+1;return l>n?Fz(t,e,n,r,i+1):(l<n&&(c=e>0?c+(n-l):c,o=e>0?o:o+(n-l)),{step:a,tickMin:s.sub(new Rn(o).mul(a)),tickMax:s.add(new Rn(c).mul(a))})}function _se(t){var e=hp(t,2),n=e[0],r=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),o=kz([n,r]),c=hp(o,2),l=c[0],h=c[1];if(l===-1/0||h===1/0){var f=h===1/0?[l].concat(EE(SE(0,i-1).map(function(){return 1/0}))):[].concat(EE(SE(0,i-1).map(function(){return-1/0})),[h]);return n>r?ME(f):f}if(l===h)return wse(l,i,a);var m=Fz(l,h,s,a),g=m.step,b=m.tickMin,y=m.tickMax,v=rx.rangeStep(b,y.add(new Rn(.1).mul(g)),g);return n>r?ME(v):v}function Sse(t,e){var n=hp(t,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=kz([r,i]),o=hp(s,2),c=o[0],l=o[1];if(c===-1/0||l===1/0)return[r,i];if(c===l)return[c];var h=Math.max(e,2),f=Lz(new Rn(l).sub(c).div(h-1),a,0),m=[].concat(EE(rx.rangeStep(new Rn(c),new Rn(l).sub(new Rn(.99).mul(f)),f)),[l]);return r>i?ME(m):m}var Mse=Iz(_se),Ese=Iz(Sse),Tse="Invariant failed";function Cc(t,e){throw new Error(Tse)}var Ase=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function md(t){"@babel/helpers - typeof";return md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},md(t)}function Pv(){return Pv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pv.apply(this,arguments)}function Nse(t,e){return jse(t)||Rse(t,e)||Cse(t,e)||Pse()}function Pse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cse(t,e){if(t){if(typeof t=="string")return SD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SD(t,e)}}function SD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Rse(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function jse(t){if(Array.isArray(t))return t}function Ose(t,e){if(t==null)return{};var n=Ise(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ise(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Dse(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kse(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zz(r.key),r)}}function Lse(t,e,n){return e&&kse(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fse(t,e,n){return e=Cv(e),Use(t,Uz()?Reflect.construct(e,n||[],Cv(t).constructor):e.apply(t,n))}function Use(t,e){if(e&&(md(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bse(t)}function Bse(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uz(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uz=function(){return!!t})()}function Cv(t){return Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(t)}function zse(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&AE(t,e)}function AE(t,e){return AE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AE(t,e)}function Bz(t,e,n){return e=zz(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zz(t){var e=$se(t,"string");return md(e)=="symbol"?e:e+""}function $se(t,e){if(md(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(md(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var lm=(function(t){function e(){return Dse(this,e),Fse(this,e,arguments)}return zse(e,t),Lse(e,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,s=r.width,o=r.dataKey,c=r.data,l=r.dataPointFormatter,h=r.xAxis,f=r.yAxis,m=Ose(r,Ase),g=Pt(m,!1);this.props.direction==="x"&&h.type!=="number"&&Cc();var b=c.map(function(y){var v=l(y,o),w=v.x,_=v.y,E=v.value,M=v.errorVal;if(!M)return null;var T=[],A,N;if(Array.isArray(M)){var P=Nse(M,2);A=P[0],N=P[1]}else A=N=M;if(a==="vertical"){var R=h.scale,F=_+i,D=F+s,L=F-s,q=R(E-A),I=R(E+N);T.push({x1:I,y1:D,x2:I,y2:L}),T.push({x1:q,y1:F,x2:I,y2:F}),T.push({x1:q,y1:D,x2:q,y2:L})}else if(a==="horizontal"){var U=f.scale,k=w+i,V=k-s,$=k+s,Y=U(E-A),J=U(E+N);T.push({x1:V,y1:J,x2:$,y2:J}),T.push({x1:k,y1:Y,x2:k,y2:J}),T.push({x1:V,y1:Y,x2:$,y2:Y})}return K.createElement(an,Pv({className:"recharts-errorBar",key:"bar-".concat(T.map(function(W){return"".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))},g),T.map(function(W){return K.createElement("line",Pv({},W,{key:"line-".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))}))});return K.createElement(an,{className:"recharts-errorBars"},b)}}])})(K.Component);Bz(lm,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Bz(lm,"displayName","ErrorBar");function pp(t){"@babel/helpers - typeof";return pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pp(t)}function MD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $l(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?MD(Object(n),!0).forEach(function(r){Vse(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):MD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Vse(t,e,n){return e=Hse(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hse(t){var e=Gse(t,"string");return pp(e)=="symbol"?e:e+""}function Gse(t,e){if(pp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(pp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $z=function(e){var n=e.children,r=e.formattedGraphicalItems,i=e.legendWidth,a=e.legendContent,s=Vi(n,ms);if(!s)return null;var o=ms.defaultProps,c=o!==void 0?$l($l({},o),s.props):{},l;return s.props&&s.props.payload?l=s.props&&s.props.payload:a==="children"?l=(r||[]).reduce(function(h,f){var m=f.item,g=f.props,b=g.sectors||g.data||[];return h.concat(b.map(function(y){return{type:s.props.iconType||m.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):l=(r||[]).map(function(h){var f=h.item,m=f.type.defaultProps,g=m!==void 0?$l($l({},m),f.props):{},b=g.dataKey,y=g.name,v=g.legendType,w=g.hide;return{inactive:w,dataKey:b,type:c.iconType||v||"square",color:eP(f),value:y||b,payload:g}}),$l($l($l({},c),ms.getWithHeight(s,i)),{},{payload:l,item:s})};function mp(t){"@babel/helpers - typeof";return mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mp(t)}function ED(t){return Kse(t)||Xse(t)||qse(t)||Wse()}function Wse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qse(t,e){if(t){if(typeof t=="string")return NE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NE(t,e)}}function Xse(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Kse(t){if(Array.isArray(t))return NE(t)}function NE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function TD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TD(Object(n),!0).forEach(function(r){td(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function td(t,e,n){return e=Yse(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yse(t){var e=Zse(t,"string");return mp(e)=="symbol"?e:e+""}function Zse(t,e){if(mp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(mp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yn(t,e,n){return Kt(t)||Kt(e)?n:xr(e)?Xi(t,e,n):Dt(e)?e(t):n}function kh(t,e,n,r){var i=Kae(t,function(o){return Yn(o,e)});if(n==="number"){var a=i.filter(function(o){return Je(o)||parseFloat(o)});return a.length?[tx(a),ol(a)]:[1/0,-1/0]}var s=r?i.filter(function(o){return!Kt(o)}):i;return s.map(function(o){return xr(o)||o instanceof Date?o:""})}var Jse=function(e){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,l=0;l<o;l++){var h=l>0?i[l-1].coordinate:i[o-1].coordinate,f=i[l].coordinate,m=l>=o-1?i[0].coordinate:i[l+1].coordinate,g=void 0;if(ui(f-h)!==ui(m-f)){var b=[];if(ui(m-f)===ui(c[1]-c[0])){g=m;var y=f+c[1]-c[0];b[0]=Math.min(y,(y+h)/2),b[1]=Math.max(y,(y+h)/2)}else{g=h;var v=m+c[1]-c[0];b[0]=Math.min(f,(v+f)/2),b[1]=Math.max(f,(v+f)/2)}var w=[Math.min(f,(g+f)/2),Math.max(f,(g+f)/2)];if(e>w[0]&&e<=w[1]||e>=b[0]&&e<=b[1]){s=i[l].index;break}}else{var _=Math.min(h,m),E=Math.max(h,m);if(e>(_+f)/2&&e<=(E+f)/2){s=i[l].index;break}}}else for(var M=0;M<o;M++)if(M===0&&e<=(r[M].coordinate+r[M+1].coordinate)/2||M>0&&M<o-1&&e>(r[M].coordinate+r[M-1].coordinate)/2&&e<=(r[M].coordinate+r[M+1].coordinate)/2||M===o-1&&e>(r[M].coordinate+r[M-1].coordinate)/2){s=r[M].index;break}return s},eP=function(e){var n,r=e,i=r.type.displayName,a=(n=e.type)!==null&&n!==void 0&&n.defaultProps?tr(tr({},e.type.defaultProps),e.props):e.props,s=a.stroke,o=a.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:o;break;default:c=o;break}return c},Qse=function(e){var n=e.barSize,r=e.totalSize,i=e.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},o=Object.keys(a),c=0,l=o.length;c<l;c++)for(var h=a[o[c]].stackGroups,f=Object.keys(h),m=0,g=f.length;m<g;m++){var b=h[f[m]],y=b.items,v=b.cateAxisId,w=y.filter(function(N){return oo(N.type).indexOf("Bar")>=0});if(w&&w.length){var _=w[0].type.defaultProps,E=_!==void 0?tr(tr({},_),w[0].props):w[0].props,M=E.barSize,T=E[v];s[T]||(s[T]=[]);var A=Kt(M)?n:M;s[T].push({item:w[0],stackList:w.slice(1),barSize:Kt(A)?void 0:di(A,r,0)})}}return s},eoe=function(e){var n=e.barGap,r=e.barCategoryGap,i=e.bandSize,a=e.sizeList,s=a===void 0?[]:a,o=e.maxBarSize,c=s.length;if(c<1)return null;var l=di(n,i,0,!0),h,f=[];if(s[0].barSize===+s[0].barSize){var m=!1,g=i/c,b=s.reduce(function(M,T){return M+T.barSize||0},0);b+=(c-1)*l,b>=i&&(b-=(c-1)*l,l=0),b>=i&&g>0&&(m=!0,g*=.9,b=c*g);var y=(i-b)/2>>0,v={offset:y-l,size:0};h=s.reduce(function(M,T){var A={item:T.item,position:{offset:v.offset+v.size+l,size:m?g:T.barSize}},N=[].concat(ED(M),[A]);return v=N[N.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(P){N.push({item:P,position:v})}),N},f)}else{var w=di(r,i,0,!0);i-2*w-(c-1)*l<=0&&(l=0);var _=(i-2*w-(c-1)*l)/c;_>1&&(_>>=0);var E=o===+o?Math.min(_,o):_;h=s.reduce(function(M,T,A){var N=[].concat(ED(M),[{item:T.item,position:{offset:w+(_+l)*A+(_-E)/2,size:E}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(P){N.push({item:P,position:N[N.length-1].position})}),N},f)}return h},toe=function(e,n,r,i){var a=r.children,s=r.width,o=r.margin,c=s-(o.left||0)-(o.right||0),l=$z({children:a,legendWidth:c});if(l){var h=i||{},f=h.width,m=h.height,g=l.align,b=l.verticalAlign,y=l.layout;if((y==="vertical"||y==="horizontal"&&b==="middle")&&g!=="center"&&Je(e[g]))return tr(tr({},e),{},td({},g,e[g]+(f||0)));if((y==="horizontal"||y==="vertical"&&g==="center")&&b!=="middle"&&Je(e[b]))return tr(tr({},e),{},td({},b,e[b]+(m||0)))}return e},noe=function(e,n,r){return Kt(n)?!0:e==="horizontal"?n==="yAxis":e==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Vz=function(e,n,r,i,a){var s=n.props.children,o=Ki(s,lm).filter(function(l){return noe(i,a,l.props.direction)});if(o&&o.length){var c=o.map(function(l){return l.props.dataKey});return e.reduce(function(l,h){var f=Yn(h,r);if(Kt(f))return l;var m=Array.isArray(f)?[tx(f),ol(f)]:[f,f],g=c.reduce(function(b,y){var v=Yn(h,y,0),w=m[0]-Math.abs(Array.isArray(v)?v[0]:v),_=m[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,b[0]),Math.max(_,b[1])]},[1/0,-1/0]);return[Math.min(g[0],l[0]),Math.max(g[1],l[1])]},[1/0,-1/0])}return null},roe=function(e,n,r,i,a){var s=n.map(function(o){return Vz(e,o,r,a,i)}).filter(function(o){return!Kt(o)});return s&&s.length?s.reduce(function(o,c){return[Math.min(o[0],c[0]),Math.max(o[1],c[1])]},[1/0,-1/0]):null},Hz=function(e,n,r,i,a){var s=n.map(function(c){var l=c.props.dataKey;return r==="number"&&l&&Vz(e,c,l,i)||kh(e,l,r,a)});if(r==="number")return s.reduce(function(c,l){return[Math.min(c[0],l[0]),Math.max(c[1],l[1])]},[1/0,-1/0]);var o={};return s.reduce(function(c,l){for(var h=0,f=l.length;h<f;h++)o[l[h]]||(o[l[h]]=!0,c.push(l[h]));return c},[])},Gz=function(e,n){return e==="horizontal"&&n==="xAxis"||e==="vertical"&&n==="yAxis"||e==="centric"&&n==="angleAxis"||e==="radial"&&n==="radiusAxis"},Wz=function(e,n,r,i){if(i)return e.map(function(c){return c.coordinate});var a,s,o=e.map(function(c){return c.coordinate===n&&(a=!0),c.coordinate===r&&(s=!0),c.coordinate});return a||o.push(n),s||o.push(r),o},io=function(e,n,r){if(!e)return null;var i=e.scale,a=e.duplicateDomain,s=e.type,o=e.range,c=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,l=(n||r)&&s==="category"&&i.bandwidth?i.bandwidth()/c:0;if(l=e.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?ui(o[0]-o[1])*2*l:l,n&&(e.ticks||e.niceTicks)){var h=(e.ticks||e.niceTicks).map(function(f){var m=a?a.indexOf(f):f;return{coordinate:i(m)+l,value:f,offset:l}});return h.filter(function(f){return!Kd(f.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(f,m){return{coordinate:i(f)+l,value:f,index:m,offset:l}}):i.ticks&&!r?i.ticks(e.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,m){return{coordinate:i(f)+l,value:a?a[f]:f,index:m,offset:l}})},BS=new WeakMap,O0=function(e,n){if(typeof n!="function")return e;BS.has(e)||BS.set(e,new WeakMap);var r=BS.get(e);if(r.has(n))return r.get(n);var i=function(){e.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},qz=function(e,n,r){var i=e.scale,a=e.type,s=e.layout,o=e.axisType;if(i==="auto")return s==="radial"&&o==="radiusAxis"?{scale:lp(),realScaleType:"band"}:s==="radial"&&o==="angleAxis"?{scale:Mv(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Dh(),realScaleType:"point"}:a==="category"?{scale:lp(),realScaleType:"band"}:{scale:Mv(),realScaleType:"linear"};if(tm(i)){var c="scale".concat(zy(i));return{scale:(dD[c]||Dh)(),realScaleType:dD[c]?c:"point"}}return Dt(i)?{scale:i}:{scale:Dh(),realScaleType:"point"}},AD=1e-4,Xz=function(e){var n=e.domain();if(!(!n||n.length<=2)){var r=n.length,i=e.range(),a=Math.min(i[0],i[1])-AD,s=Math.max(i[0],i[1])+AD,o=e(n[0]),c=e(n[r-1]);(o<a||o>s||c<a||c>s)&&e.domain([n[0],n[r-1]])}},ioe=function(e,n){if(!e)return null;for(var r=0,i=e.length;r<i;r++)if(e[r].item===n)return e[r].position;return null},aoe=function(e,n){if(!n||n.length!==2||!Je(n[0])||!Je(n[1]))return e;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[e[0],e[1]];return(!Je(e[0])||e[0]<r)&&(a[0]=r),(!Je(e[1])||e[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},soe=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r<i;++r)for(var a=0,s=0,o=0;o<n;++o){var c=Kd(e[o][r][1])?e[o][r][0]:e[o][r][1];c>=0?(e[o][r][0]=a,e[o][r][1]=a+c,a=e[o][r][1]):(e[o][r][0]=s,e[o][r][1]=s+c,s=e[o][r][1])}},ooe=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r<i;++r)for(var a=0,s=0;s<n;++s){var o=Kd(e[s][r][1])?e[s][r][0]:e[s][r][1];o>=0?(e[s][r][0]=a,e[s][r][1]=a+o,a=e[s][r][1]):(e[s][r][0]=0,e[s][r][1]=0)}},loe={sign:soe,expand:$Q,none:od,silhouette:VQ,wiggle:HQ,positive:ooe},coe=function(e,n,r){var i=n.map(function(o){return o.props.dataKey}),a=loe[r],s=zQ().keys(i).value(function(o,c){return+Yn(o,c,0)}).order(rE).offset(a);return s(e)},uoe=function(e,n,r,i,a,s){if(!e)return null;var o=s?n.reverse():n,c={},l=o.reduce(function(f,m){var g,b=(g=m.type)!==null&&g!==void 0&&g.defaultProps?tr(tr({},m.type.defaultProps),m.props):m.props,y=b.stackId,v=b.hide;if(v)return f;var w=b[r],_=f[w]||{hasStack:!1,stackGroups:{}};if(xr(y)){var E=_.stackGroups[y]||{numericAxisId:r,cateAxisId:i,items:[]};E.items.push(m),_.hasStack=!0,_.stackGroups[y]=E}else _.stackGroups[Bc("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[m]};return tr(tr({},f),{},td({},w,_))},c),h={};return Object.keys(l).reduce(function(f,m){var g=l[m];if(g.hasStack){var b={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(y,v){var w=g.stackGroups[v];return tr(tr({},y),{},td({},v,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:coe(e,w.items,a)}))},b)}return tr(tr({},f),{},td({},m,g))},h)},Kz=function(e,n){var r=n.realScaleType,i=n.type,a=n.tickCount,s=n.originalDomain,o=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var l=e.domain();if(!l.length)return null;var h=Mse(l,a,o);return e.domain([tx(h),ol(h)]),{niceTicks:h}}if(a&&i==="number"){var f=e.domain(),m=Ese(f,a,o);return{niceTicks:m}}return null};function Rv(t){var e=t.axis,n=t.ticks,r=t.bandSize,i=t.entry,a=t.index,s=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!Kt(i[e.dataKey])){var o=av(n,"value",i[e.dataKey]);if(o)return o.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=Yn(i,Kt(s)?e.dataKey:s);return Kt(c)?null:e.scale(c)}var ND=function(e){var n=e.axis,r=e.ticks,i=e.offset,a=e.bandSize,s=e.entry,o=e.index;if(n.type==="category")return r[o]?r[o].coordinate+i:null;var c=Yn(s,n.dataKey,n.domain[o]);return Kt(c)?null:n.scale(c)-a/2+i},doe=function(e){var n=e.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},foe=function(e,n){var r,i=(r=e.type)!==null&&r!==void 0&&r.defaultProps?tr(tr({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(xr(a)){var s=n[a];if(s){var o=s.items.indexOf(e);return o>=0?s.stackedData[o]:null}}return null},hoe=function(e){return e.reduce(function(n,r){return[tx(r.concat([n[0]]).filter(Je)),ol(r.concat([n[1]]).filter(Je))]},[1/0,-1/0])},Yz=function(e,n,r){return Object.keys(e).reduce(function(i,a){var s=e[a],o=s.stackedData,c=o.reduce(function(l,h){var f=hoe(h.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},PD=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,CD=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PE=function(e,n,r){if(Dt(e))return e(n,r);if(!Array.isArray(e))return n;var i=[];if(Je(e[0]))i[0]=r?e[0]:Math.min(e[0],n[0]);else if(PD.test(e[0])){var a=+PD.exec(e[0])[1];i[0]=n[0]-a}else Dt(e[0])?i[0]=e[0](n[0]):i[0]=n[0];if(Je(e[1]))i[1]=r?e[1]:Math.max(e[1],n[1]);else if(CD.test(e[1])){var s=+CD.exec(e[1])[1];i[1]=n[1]+s}else Dt(e[1])?i[1]=e[1](n[1]):i[1]=n[1];return i},jv=function(e,n,r){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!r||i>0)return i}if(e&&n&&n.length>=2){for(var a=NN(n,function(f){return f.coordinate}),s=1/0,o=1,c=a.length;o<c;o++){var l=a[o],h=a[o-1];s=Math.min((l.coordinate||0)-(h.coordinate||0),s)}return s===1/0?0:s}return r?void 0:0},RD=function(e,n,r){return!e||!e.length||yl(e,Xi(r,"type.defaultProps.domain"))?n:e},Zz=function(e,n){var r=e.type.defaultProps?tr(tr({},e.type.defaultProps),e.props):e.props,i=r.dataKey,a=r.name,s=r.unit,o=r.formatter,c=r.tooltipType,l=r.chartType,h=r.hide;return tr(tr({},Pt(e,!1)),{},{dataKey:i,unit:s,formatter:o,name:a||i,color:eP(e),value:Yn(n,i),type:c,payload:n,chartType:l,hide:h})};function gp(t){"@babel/helpers - typeof";return gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gp(t)}function jD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jD(Object(n),!0).forEach(function(r){Jz(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Jz(t,e,n){return e=poe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function poe(t){var e=moe(t,"string");return gp(e)=="symbol"?e:e+""}function moe(t,e){if(gp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(gp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function goe(t,e){return boe(t)||xoe(t,e)||yoe(t,e)||voe()}function voe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yoe(t,e){if(t){if(typeof t=="string")return OD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OD(t,e)}}function OD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xoe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function boe(t){if(Array.isArray(t))return t}var Ov=Math.PI/180,woe=function(e){return e*180/Math.PI},Sn=function(e,n,r,i){return{x:e+Math.cos(-Ov*i)*r,y:n+Math.sin(-Ov*i)*r}},Qz=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},e9=function(e,n,r,i,a){var s=e.width,o=e.height,c=e.startAngle,l=e.endAngle,h=di(e.cx,s,s/2),f=di(e.cy,o,o/2),m=Qz(s,o,r),g=di(e.innerRadius,m,0),b=di(e.outerRadius,m,m*.8),y=Object.keys(n);return y.reduce(function(v,w){var _=n[w],E=_.domain,M=_.reversed,T;if(Kt(_.range))i==="angleAxis"?T=[c,l]:i==="radiusAxis"&&(T=[g,b]),M&&(T=[T[1],T[0]]);else{T=_.range;var A=T,N=goe(A,2);c=N[0],l=N[1]}var P=qz(_,a),R=P.realScaleType,F=P.scale;F.domain(E).range(T),Xz(F);var D=Kz(F,Qs(Qs({},_),{},{realScaleType:R})),L=Qs(Qs(Qs({},_),D),{},{range:T,radius:b,realScaleType:R,scale:F,cx:h,cy:f,innerRadius:g,outerRadius:b,startAngle:c,endAngle:l});return Qs(Qs({},v),{},Jz({},w,L))},{})},_oe=function(e,n){var r=e.x,i=e.y,a=n.x,s=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-s,2))},Soe=function(e,n){var r=e.x,i=e.y,a=n.cx,s=n.cy,o=_oe({x:r,y:i},{x:a,y:s});if(o<=0)return{radius:o};var c=(r-a)/o,l=Math.acos(c);return i>s&&(l=2*Math.PI-l),{radius:o,angle:woe(l),angleInRadian:l}},Moe=function(e){var n=e.startAngle,r=e.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),s=Math.min(i,a);return{startAngle:n-s*360,endAngle:r-s*360}},Eoe=function(e,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),s=Math.floor(i/360),o=Math.min(a,s);return e+o*360},ID=function(e,n){var r=e.x,i=e.y,a=Soe({x:r,y:i},n),s=a.radius,o=a.angle,c=n.innerRadius,l=n.outerRadius;if(s<c||s>l)return!1;if(s===0)return!0;var h=Moe(n),f=h.startAngle,m=h.endAngle,g=o,b;if(f<=m){for(;g>m;)g-=360;for(;g<f;)g+=360;b=g>=f&&g<=m}else{for(;g>f;)g-=360;for(;g<m;)g+=360;b=g>=m&&g<=f}return b?Qs(Qs({},n),{},{radius:s,angle:Eoe(g,n)}):null},t9=function(e){return!O.isValidElement(e)&&!Dt(e)&&typeof e!="boolean"?e.className:""};function vp(t){"@babel/helpers - typeof";return vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vp(t)}var Toe=["offset"];function Aoe(t){return Roe(t)||Coe(t)||Poe(t)||Noe()}function Noe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Poe(t,e){if(t){if(typeof t=="string")return CE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CE(t,e)}}function Coe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Roe(t){if(Array.isArray(t))return CE(t)}function CE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function joe(t,e){if(t==null)return{};var n=Ooe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ooe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function DD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function gr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?DD(Object(n),!0).forEach(function(r){Ioe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ioe(t,e,n){return e=Doe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Doe(t){var e=koe(t,"string");return vp(e)=="symbol"?e:e+""}function koe(t,e){if(vp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(vp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yp(){return yp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yp.apply(this,arguments)}var Loe=function(e){var n=e.value,r=e.formatter,i=Kt(e.children)?n:e.children;return Dt(r)?r(i):i},Foe=function(e,n){var r=ui(n-e),i=Math.min(Math.abs(n-e),360);return r*i},Uoe=function(e,n,r){var i=e.position,a=e.viewBox,s=e.offset,o=e.className,c=a,l=c.cx,h=c.cy,f=c.innerRadius,m=c.outerRadius,g=c.startAngle,b=c.endAngle,y=c.clockWise,v=(f+m)/2,w=Foe(g,b),_=w>=0?1:-1,E,M;i==="insideStart"?(E=g+_*s,M=y):i==="insideEnd"?(E=b-_*s,M=!y):i==="end"&&(E=b+_*s,M=y),M=w<=0?M:!M;var T=Sn(l,h,v,E),A=Sn(l,h,v,E+(M?1:-1)*359),N="M".concat(T.x,",").concat(T.y,`
A`).concat(v,",").concat(v,",0,1,").concat(M?0:1,`,
`).concat(A.x,",").concat(A.y),P=Kt(e.id)?Bc("recharts-radial-line-"):e.id;return K.createElement("text",yp({},r,{dominantBaseline:"central",className:Yt("recharts-radial-bar-label",o)}),K.createElement("defs",null,K.createElement("path",{id:P,d:N})),K.createElement("textPath",{xlinkHref:"#".concat(P)},n))},Boe=function(e){var n=e.viewBox,r=e.offset,i=e.position,a=n,s=a.cx,o=a.cy,c=a.innerRadius,l=a.outerRadius,h=a.startAngle,f=a.endAngle,m=(h+f)/2;if(i==="outside"){var g=Sn(s,o,l+r,m),b=g.x,y=g.y;return{x:b,y,textAnchor:b>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"end"};var v=(c+l)/2,w=Sn(s,o,v,m),_=w.x,E=w.y;return{x:_,y:E,textAnchor:"middle",verticalAnchor:"middle"}},zoe=function(e){var n=e.viewBox,r=e.parentViewBox,i=e.offset,a=e.position,s=n,o=s.x,c=s.y,l=s.width,h=s.height,f=h>=0?1:-1,m=f*i,g=f>0?"end":"start",b=f>0?"start":"end",y=l>=0?1:-1,v=y*i,w=y>0?"end":"start",_=y>0?"start":"end";if(a==="top"){var E={x:o+l/2,y:c-f*i,textAnchor:"middle",verticalAnchor:g};return gr(gr({},E),r?{height:Math.max(c-r.y,0),width:l}:{})}if(a==="bottom"){var M={x:o+l/2,y:c+h+m,textAnchor:"middle",verticalAnchor:b};return gr(gr({},M),r?{height:Math.max(r.y+r.height-(c+h),0),width:l}:{})}if(a==="left"){var T={x:o-v,y:c+h/2,textAnchor:w,verticalAnchor:"middle"};return gr(gr({},T),r?{width:Math.max(T.x-r.x,0),height:h}:{})}if(a==="right"){var A={x:o+l+v,y:c+h/2,textAnchor:_,verticalAnchor:"middle"};return gr(gr({},A),r?{width:Math.max(r.x+r.width-A.x,0),height:h}:{})}var N=r?{width:l,height:h}:{};return a==="insideLeft"?gr({x:o+v,y:c+h/2,textAnchor:_,verticalAnchor:"middle"},N):a==="insideRight"?gr({x:o+l-v,y:c+h/2,textAnchor:w,verticalAnchor:"middle"},N):a==="insideTop"?gr({x:o+l/2,y:c+m,textAnchor:"middle",verticalAnchor:b},N):a==="insideBottom"?gr({x:o+l/2,y:c+h-m,textAnchor:"middle",verticalAnchor:g},N):a==="insideTopLeft"?gr({x:o+v,y:c+m,textAnchor:_,verticalAnchor:b},N):a==="insideTopRight"?gr({x:o+l-v,y:c+m,textAnchor:w,verticalAnchor:b},N):a==="insideBottomLeft"?gr({x:o+v,y:c+h-m,textAnchor:_,verticalAnchor:g},N):a==="insideBottomRight"?gr({x:o+l-v,y:c+h-m,textAnchor:w,verticalAnchor:g},N):Xd(a)&&(Je(a.x)||lc(a.x))&&(Je(a.y)||lc(a.y))?gr({x:o+di(a.x,l),y:c+di(a.y,h),textAnchor:"end",verticalAnchor:"end"},N):gr({x:o+l/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},N)},$oe=function(e){return"cx"in e&&Je(e.cx)};function Pr(t){var e=t.offset,n=e===void 0?5:e,r=joe(t,Toe),i=gr({offset:n},r),a=i.viewBox,s=i.position,o=i.value,c=i.children,l=i.content,h=i.className,f=h===void 0?"":h,m=i.textBreakAll;if(!a||Kt(o)&&Kt(c)&&!O.isValidElement(l)&&!Dt(l))return null;if(O.isValidElement(l))return O.cloneElement(l,i);var g;if(Dt(l)){if(g=O.createElement(l,i),O.isValidElement(g))return g}else g=Loe(i);var b=$oe(a),y=Pt(i,!0);if(b&&(s==="insideStart"||s==="insideEnd"||s==="end"))return Uoe(i,g,y);var v=b?Boe(i):zoe(i);return K.createElement(Ac,yp({className:Yt("recharts-label",f)},y,v,{breakAll:m}),g)}Pr.displayName="Label";var n9=function(e){var n=e.cx,r=e.cy,i=e.angle,a=e.startAngle,s=e.endAngle,o=e.r,c=e.radius,l=e.innerRadius,h=e.outerRadius,f=e.x,m=e.y,g=e.top,b=e.left,y=e.width,v=e.height,w=e.clockWise,_=e.labelViewBox;if(_)return _;if(Je(y)&&Je(v)){if(Je(f)&&Je(m))return{x:f,y:m,width:y,height:v};if(Je(g)&&Je(b))return{x:g,y:b,width:y,height:v}}return Je(f)&&Je(m)?{x:f,y:m,width:0,height:0}:Je(n)&&Je(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:s||i||0,innerRadius:l||0,outerRadius:h||c||o||0,clockWise:w}:e.viewBox?e.viewBox:{}},Voe=function(e,n){return e?e===!0?K.createElement(Pr,{key:"label-implicit",viewBox:n}):xr(e)?K.createElement(Pr,{key:"label-implicit",viewBox:n,value:e}):O.isValidElement(e)?e.type===Pr?O.cloneElement(e,{key:"label-implicit",viewBox:n}):K.createElement(Pr,{key:"label-implicit",content:e,viewBox:n}):Dt(e)?K.createElement(Pr,{key:"label-implicit",content:e,viewBox:n}):Xd(e)?K.createElement(Pr,yp({viewBox:n},e,{key:"label-implicit"})):null:null},Hoe=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var i=e.children,a=n9(e),s=Ki(i,Pr).map(function(c,l){return O.cloneElement(c,{viewBox:n||a,key:"label-".concat(l)})});if(!r)return s;var o=Voe(e.label,n||a);return[o].concat(Aoe(s))};Pr.parseViewBox=n9;Pr.renderCallByParent=Hoe;var zS,kD;function Goe(){if(kD)return zS;kD=1;function t(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}return zS=t,zS}var Woe=Goe();const r9=Mn(Woe);function xp(t){"@babel/helpers - typeof";return xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xp(t)}var qoe=["valueAccessor"],Xoe=["data","dataKey","clockWise","id","textBreakAll"];function Koe(t){return Qoe(t)||Joe(t)||Zoe(t)||Yoe()}function Yoe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zoe(t,e){if(t){if(typeof t=="string")return RE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RE(t,e)}}function Joe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Qoe(t){if(Array.isArray(t))return RE(t)}function RE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Iv(){return Iv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Iv.apply(this,arguments)}function LD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function FD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?LD(Object(n),!0).forEach(function(r){ele(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):LD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ele(t,e,n){return e=tle(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tle(t){var e=nle(t,"string");return xp(e)=="symbol"?e:e+""}function nle(t,e){if(xp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(xp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UD(t,e){if(t==null)return{};var n=rle(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rle(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var ile=function(e){return Array.isArray(e.value)?r9(e.value):e.value};function Va(t){var e=t.valueAccessor,n=e===void 0?ile:e,r=UD(t,qoe),i=r.data,a=r.dataKey,s=r.clockWise,o=r.id,c=r.textBreakAll,l=UD(r,Xoe);return!i||!i.length?null:K.createElement(an,{className:"recharts-label-list"},i.map(function(h,f){var m=Kt(a)?n(h,f):Yn(h&&h.payload,a),g=Kt(o)?{}:{id:"".concat(o,"-").concat(f)};return K.createElement(Pr,Iv({},Pt(h,!0),l,g,{parentViewBox:h.parentViewBox,value:m,textBreakAll:c,viewBox:Pr.parseViewBox(Kt(s)?h:FD(FD({},h),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}Va.displayName="LabelList";function ale(t,e){return t?t===!0?K.createElement(Va,{key:"labelList-implicit",data:e}):K.isValidElement(t)||Dt(t)?K.createElement(Va,{key:"labelList-implicit",data:e,content:t}):Xd(t)?K.createElement(Va,Iv({data:e},t,{key:"labelList-implicit"})):null:null}function sle(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var r=t.children,i=Ki(r,Va).map(function(s,o){return O.cloneElement(s,{data:e,key:"labelList-".concat(o)})});if(!n)return i;var a=ale(t.label,e);return[a].concat(Koe(i))}Va.renderCallByParent=sle;function bp(t){"@babel/helpers - typeof";return bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bp(t)}function jE(){return jE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jE.apply(this,arguments)}function BD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?BD(Object(n),!0).forEach(function(r){ole(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):BD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ole(t,e,n){return e=lle(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lle(t){var e=cle(t,"string");return bp(e)=="symbol"?e:e+""}function cle(t,e){if(bp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(bp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ule=function(e,n){var r=ui(n-e),i=Math.min(Math.abs(n-e),359.999);return r*i},I0=function(e){var n=e.cx,r=e.cy,i=e.radius,a=e.angle,s=e.sign,o=e.isExternal,c=e.cornerRadius,l=e.cornerIsExternal,h=c*(o?1:-1)+i,f=Math.asin(c/h)/Ov,m=l?a:a+s*f,g=Sn(n,r,h,m),b=Sn(n,r,i,m),y=l?a-s*f:a,v=Sn(n,r,h*Math.cos(f*Ov),y);return{center:g,circleTangency:b,lineTangency:v,theta:f}},i9=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.startAngle,o=e.endAngle,c=ule(s,o),l=s+c,h=Sn(n,r,a,s),f=Sn(n,r,a,l),m="M ".concat(h.x,",").concat(h.y,`
A `).concat(a,",").concat(a,`,0,
`).concat(+(Math.abs(c)>180),",").concat(+(s>l),`,
`).concat(f.x,",").concat(f.y,`
`);if(i>0){var g=Sn(n,r,i,s),b=Sn(n,r,i,l);m+="L ".concat(b.x,",").concat(b.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(c)>180),",").concat(+(s<=l),`,
`).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(n,",").concat(r," Z");return m},dle=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.cornerRadius,o=e.forceCornerRadius,c=e.cornerIsExternal,l=e.startAngle,h=e.endAngle,f=ui(h-l),m=I0({cx:n,cy:r,radius:a,angle:l,sign:f,cornerRadius:s,cornerIsExternal:c}),g=m.circleTangency,b=m.lineTangency,y=m.theta,v=I0({cx:n,cy:r,radius:a,angle:h,sign:-f,cornerRadius:s,cornerIsExternal:c}),w=v.circleTangency,_=v.lineTangency,E=v.theta,M=c?Math.abs(l-h):Math.abs(l-h)-y-E;if(M<0)return o?"M ".concat(b.x,",").concat(b.y,`
a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
`):i9({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:h});var T="M ".concat(b.x,",").concat(b.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(g.x,",").concat(g.y,`
A`).concat(a,",").concat(a,",0,").concat(+(M>180),",").concat(+(f<0),",").concat(w.x,",").concat(w.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
`);if(i>0){var A=I0({cx:n,cy:r,radius:i,angle:l,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),N=A.circleTangency,P=A.lineTangency,R=A.theta,F=I0({cx:n,cy:r,radius:i,angle:h,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),D=F.circleTangency,L=F.lineTangency,q=F.theta,I=c?Math.abs(l-h):Math.abs(l-h)-R-q;if(I<0&&s===0)return"".concat(T,"L").concat(n,",").concat(r,"Z");T+="L".concat(L.x,",").concat(L.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,`
A`).concat(i,",").concat(i,",0,").concat(+(I>180),",").concat(+(f>0),",").concat(N.x,",").concat(N.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else T+="L".concat(n,",").concat(r,"Z");return T},fle={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},a9=function(e){var n=zD(zD({},fle),e),r=n.cx,i=n.cy,a=n.innerRadius,s=n.outerRadius,o=n.cornerRadius,c=n.forceCornerRadius,l=n.cornerIsExternal,h=n.startAngle,f=n.endAngle,m=n.className;if(s<a||h===f)return null;var g=Yt("recharts-sector",m),b=s-a,y=di(o,b,0,!0),v;return y>0&&Math.abs(h-f)<360?v=dle({cx:r,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(y,b/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:h,endAngle:f}):v=i9({cx:r,cy:i,innerRadius:a,outerRadius:s,startAngle:h,endAngle:f}),K.createElement("path",jE({},Pt(n,!0),{className:g,d:v,role:"img"}))};function wp(t){"@babel/helpers - typeof";return wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wp(t)}function OE(){return OE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},OE.apply(this,arguments)}function $D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function VD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$D(Object(n),!0).forEach(function(r){hle(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$D(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function hle(t,e,n){return e=ple(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ple(t){var e=mle(t,"string");return wp(e)=="symbol"?e:e+""}function mle(t,e){if(wp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var HD={curveBasisClosed:CQ,curveBasisOpen:RQ,curveBasis:PQ,curveBumpX:mQ,curveBumpY:gQ,curveLinearClosed:jQ,curveLinear:Vy,curveMonotoneX:OQ,curveMonotoneY:IQ,curveNatural:DQ,curveStep:kQ,curveStepAfter:FQ,curveStepBefore:LQ},D0=function(e){return e.x===+e.x&&e.y===+e.y},th=function(e){return e.x},nh=function(e){return e.y},gle=function(e,n){if(Dt(e))return e;var r="curve".concat(zy(e));return(r==="curveMonotone"||r==="curveBump")&&n?HD["".concat(r).concat(n==="vertical"?"Y":"X")]:HD[r]||Vy},vle=function(e){var n=e.type,r=n===void 0?"linear":n,i=e.points,a=i===void 0?[]:i,s=e.baseLine,o=e.layout,c=e.connectNulls,l=c===void 0?!1:c,h=gle(r,o),f=l?a.filter(function(y){return D0(y)}):a,m;if(Array.isArray(s)){var g=l?s.filter(function(y){return D0(y)}):s,b=f.map(function(y,v){return VD(VD({},y),{},{base:g[v]})});return o==="vertical"?m=E0().y(nh).x1(th).x0(function(y){return y.base.x}):m=E0().x(th).y1(nh).y0(function(y){return y.base.y}),m.defined(D0).curve(h),m(b)}return o==="vertical"&&Je(s)?m=E0().y(nh).x1(th).x0(s):Je(s)?m=E0().x(th).y1(nh).y0(s):m=QB().x(th).y(nh),m.defined(D0).curve(h),m(f)},xc=function(e){var n=e.className,r=e.points,i=e.path,a=e.pathRef;if((!r||!r.length)&&!i)return null;var s=r&&r.length?vle(e):i;return K.createElement("path",OE({},Pt(e,!1),sv(e),{className:Yt("recharts-curve",n),d:s,ref:a}))},$S={exports:{}},VS,GD;function yle(){if(GD)return VS;GD=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return VS=t,VS}var HS,WD;function xle(){if(WD)return HS;WD=1;var t=yle();function e(){}function n(){}return n.resetWarningCache=e,HS=function(){function r(s,o,c,l,h,f){if(f!==t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return a.PropTypes=a,a},HS}var qD;function ble(){return qD||(qD=1,$S.exports=xle()()),$S.exports}var wle=ble();const Nn=Mn(wle),{getOwnPropertyNames:_le,getOwnPropertySymbols:Sle}=Object,{hasOwnProperty:Mle}=Object.prototype;function GS(t,e){return function(r,i,a){return t(r,i,a)&&e(r,i,a)}}function k0(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:a}=i,s=a.get(n),o=a.get(r);if(s&&o)return s===r&&o===n;a.set(n,r),a.set(r,n);const c=t(n,r,i);return a.delete(n),a.delete(r),c}}function Ele(t){return t!=null?t[Symbol.toStringTag]:void 0}function XD(t){return _le(t).concat(Sle(t))}const Tle=Object.hasOwn||((t,e)=>Mle.call(t,e));function Vc(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const Ale="__v",Nle="__o",Ple="_owner",{getOwnPropertyDescriptor:KD,keys:YD}=Object;function Cle(t,e){return t.byteLength===e.byteLength&&Dv(new Uint8Array(t),new Uint8Array(e))}function Rle(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function jle(t,e){return t.byteLength===e.byteLength&&Dv(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Ole(t,e){return Vc(t.getTime(),e.getTime())}function Ile(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Dle(t,e){return t===e}function ZD(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),a=t.entries();let s,o,c=0;for(;(s=a.next())&&!s.done;){const l=e.entries();let h=!1,f=0;for(;(o=l.next())&&!o.done;){if(i[f]){f++;continue}const m=s.value,g=o.value;if(n.equals(m[0],g[0],c,f,t,e,n)&&n.equals(m[1],g[1],m[0],g[0],t,e,n)){h=i[f]=!0;break}f++}if(!h)return!1;c++}return!0}const kle=Vc;function Lle(t,e,n){const r=YD(t);let i=r.length;if(YD(e).length!==i)return!1;for(;i-- >0;)if(!s9(t,e,n,r[i]))return!1;return!0}function rh(t,e,n){const r=XD(t);let i=r.length;if(XD(e).length!==i)return!1;let a,s,o;for(;i-- >0;)if(a=r[i],!s9(t,e,n,a)||(s=KD(t,a),o=KD(e,a),(s||o)&&(!s||!o||s.configurable!==o.configurable||s.enumerable!==o.enumerable||s.writable!==o.writable)))return!1;return!0}function Fle(t,e){return Vc(t.valueOf(),e.valueOf())}function Ule(t,e){return t.source===e.source&&t.flags===e.flags}function JD(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),a=t.values();let s,o;for(;(s=a.next())&&!s.done;){const c=e.values();let l=!1,h=0;for(;(o=c.next())&&!o.done;){if(!i[h]&&n.equals(s.value,o.value,s.value,o.value,t,e,n)){l=i[h]=!0;break}h++}if(!l)return!1}return!0}function Dv(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Ble(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function s9(t,e,n,r){return(r===Ple||r===Nle||r===Ale)&&(t.$$typeof||e.$$typeof)?!0:Tle(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const zle="[object ArrayBuffer]",$le="[object Arguments]",Vle="[object Boolean]",Hle="[object DataView]",Gle="[object Date]",Wle="[object Error]",qle="[object Map]",Xle="[object Number]",Kle="[object Object]",Yle="[object RegExp]",Zle="[object Set]",Jle="[object String]",Qle={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},ece="[object URL]",tce=Object.prototype.toString;function nce({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:h,areSetsEqual:f,areTypedArraysEqual:m,areUrlsEqual:g,unknownTagComparators:b}){return function(v,w,_){if(v===w)return!0;if(v==null||w==null)return!1;const E=typeof v;if(E!==typeof w)return!1;if(E!=="object")return E==="number"?o(v,w,_):E==="function"?a(v,w,_):!1;const M=v.constructor;if(M!==w.constructor)return!1;if(M===Object)return c(v,w,_);if(Array.isArray(v))return e(v,w,_);if(M===Date)return r(v,w,_);if(M===RegExp)return h(v,w,_);if(M===Map)return s(v,w,_);if(M===Set)return f(v,w,_);const T=tce.call(v);if(T===Gle)return r(v,w,_);if(T===Yle)return h(v,w,_);if(T===qle)return s(v,w,_);if(T===Zle)return f(v,w,_);if(T===Kle)return typeof v.then!="function"&&typeof w.then!="function"&&c(v,w,_);if(T===ece)return g(v,w,_);if(T===Wle)return i(v,w,_);if(T===$le)return c(v,w,_);if(Qle[T])return m(v,w,_);if(T===zle)return t(v,w,_);if(T===Hle)return n(v,w,_);if(T===Vle||T===Xle||T===Jle)return l(v,w,_);if(b){let A=b[T];if(!A){const N=Ele(v);N&&(A=b[N])}if(A)return A(v,w,_)}return!1}}function rce({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:Cle,areArraysEqual:n?rh:Rle,areDataViewsEqual:jle,areDatesEqual:Ole,areErrorsEqual:Ile,areFunctionsEqual:Dle,areMapsEqual:n?GS(ZD,rh):ZD,areNumbersEqual:kle,areObjectsEqual:n?rh:Lle,arePrimitiveWrappersEqual:Fle,areRegExpsEqual:Ule,areSetsEqual:n?GS(JD,rh):JD,areTypedArraysEqual:n?GS(Dv,rh):Dv,areUrlsEqual:Ble,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=k0(r.areArraysEqual),a=k0(r.areMapsEqual),s=k0(r.areObjectsEqual),o=k0(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:o})}return r}function ice(t){return function(e,n,r,i,a,s,o){return t(e,n,o)}}function ace({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(o,c){const{cache:l=t?new WeakMap:void 0,meta:h}=n();return e(o,c,{cache:l,equals:r,meta:h,strict:i})};if(t)return function(o,c){return e(o,c,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(o,c){return e(o,c,a)}}const sce=Al();Al({strict:!0});Al({circular:!0});Al({circular:!0,strict:!0});Al({createInternalComparator:()=>Vc});Al({strict:!0,createInternalComparator:()=>Vc});Al({circular:!0,createInternalComparator:()=>Vc});Al({circular:!0,createInternalComparator:()=>Vc,strict:!0});function Al(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,a=rce(t),s=nce(a),o=n?n(s):ice(s);return ace({circular:e,comparator:s,createState:r,equals:o,strict:i})}function oce(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function QD(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>e?(t(a),n=-1):oce(i)};requestAnimationFrame(r)}function IE(t){"@babel/helpers - typeof";return IE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IE(t)}function lce(t){return fce(t)||dce(t)||uce(t)||cce()}function cce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uce(t,e){if(t){if(typeof t=="string")return ek(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ek(t,e)}}function ek(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function dce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function fce(t){if(Array.isArray(t))return t}function hce(){var t={},e=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var s=a,o=lce(s),c=o[0],l=o.slice(1);if(typeof c=="number"){QD(i.bind(null,l),c);return}i(c),QD(i.bind(null,l));return}IE(a)==="object"&&(t=a,e(t)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return e=a,function(){e=function(){return null}}}}}function _p(t){"@babel/helpers - typeof";return _p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_p(t)}function tk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nk(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tk(Object(n),!0).forEach(function(r){o9(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function o9(t,e,n){return e=pce(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pce(t){var e=mce(t,"string");return _p(e)==="symbol"?e:String(e)}function mce(t,e){if(_p(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(_p(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var gce=function(e,n){return[Object.keys(e),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},vce=function(e){return e},yce=function(e){return e.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Lh=function(e,n){return Object.keys(n).reduce(function(r,i){return nk(nk({},r),{},o9({},i,e(i,n[i])))},{})},rk=function(e,n,r){return e.map(function(i){return"".concat(yce(i)," ").concat(n,"ms ").concat(r)}).join(",")};function xce(t,e){return _ce(t)||wce(t,e)||l9(t,e)||bce()}function bce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wce(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function _ce(t){if(Array.isArray(t))return t}function Sce(t){return Tce(t)||Ece(t)||l9(t)||Mce()}function Mce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l9(t,e){if(t){if(typeof t=="string")return DE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DE(t,e)}}function Ece(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Tce(t){if(Array.isArray(t))return DE(t)}function DE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kv=1e-4,c9=function(e,n){return[0,3*e,3*n-6*e,3*e-3*n+1]},u9=function(e,n){return e.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},ik=function(e,n){return function(r){var i=c9(e,n);return u9(i,r)}},Ace=function(e,n){return function(r){var i=c9(e,n),a=[].concat(Sce(i.map(function(s,o){return s*o}).slice(1)),[0]);return u9(a,r)}},ak=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n[1],s=n[2],o=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,s=1,o=1;break;case"ease":i=.25,a=.1,s=.25,o=1;break;case"ease-in":i=.42,a=0,s=1,o=1;break;case"ease-out":i=.42,a=0,s=.58,o=1;break;case"ease-in-out":i=0,a=0,s=.58,o=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var l=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),h=xce(l,4);i=h[0],a=h[1],s=h[2],o=h[3]}}}var f=ik(i,s),m=ik(a,o),g=Ace(i,s),b=function(w){return w>1?1:w<0?0:w},y=function(w){for(var _=w>1?1:w,E=_,M=0;M<8;++M){var T=f(E)-_,A=g(E);if(Math.abs(T-_)<kv||A<kv)return m(E);E=b(E-T/A)}return m(E)};return y.isStepper=!1,y},Nce=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.stiff,r=n===void 0?100:n,i=e.damping,a=i===void 0?8:i,s=e.dt,o=s===void 0?17:s,c=function(h,f,m){var g=-(h-f)*r,b=m*a,y=m+(g-b)*o/1e3,v=m*o/1e3+h;return Math.abs(v-f)<kv&&Math.abs(y)<kv?[f,0]:[v,y]};return c.isStepper=!0,c.dt=o,c},Pce=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return ak(i);case"spring":return Nce();default:if(i.split("(")[0]==="cubic-bezier")return ak(i)}return typeof i=="function"?i:null};function Sp(t){"@babel/helpers - typeof";return Sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sp(t)}function sk(t){return jce(t)||Rce(t)||d9(t)||Cce()}function Cce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jce(t){if(Array.isArray(t))return LE(t)}function ok(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Dr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ok(Object(n),!0).forEach(function(r){kE(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ok(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function kE(t,e,n){return e=Oce(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oce(t){var e=Ice(t,"string");return Sp(e)==="symbol"?e:String(e)}function Ice(t,e){if(Sp(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Sp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Dce(t,e){return Fce(t)||Lce(t,e)||d9(t,e)||kce()}function kce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d9(t,e){if(t){if(typeof t=="string")return LE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LE(t,e)}}function LE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lce(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function Fce(t){if(Array.isArray(t))return t}var Lv=function(e,n,r){return e+(n-e)*r},FE=function(e){var n=e.from,r=e.to;return n!==r},Uce=function t(e,n,r){var i=Lh(function(a,s){if(FE(s)){var o=e(s.from,s.to,s.velocity),c=Dce(o,2),l=c[0],h=c[1];return Dr(Dr({},s),{},{from:l,velocity:h})}return s},n);return r<1?Lh(function(a,s){return FE(s)?Dr(Dr({},s),{},{velocity:Lv(s.velocity,i[a].velocity,r),from:Lv(s.from,i[a].from,r)}):s},n):t(e,i,r-1)};const Bce=(function(t,e,n,r,i){var a=gce(t,e),s=a.reduce(function(v,w){return Dr(Dr({},v),{},kE({},w,[t[w],e[w]]))},{}),o=a.reduce(function(v,w){return Dr(Dr({},v),{},kE({},w,{from:t[w],velocity:0,to:e[w]}))},{}),c=-1,l,h,f=function(){return null},m=function(){return Lh(function(w,_){return _.from},o)},g=function(){return!Object.values(o).filter(FE).length},b=function(w){l||(l=w);var _=w-l,E=_/n.dt;o=Uce(n,o,E),i(Dr(Dr(Dr({},t),e),m())),l=w,g()||(c=requestAnimationFrame(f))},y=function(w){h||(h=w);var _=(w-h)/r,E=Lh(function(T,A){return Lv.apply(void 0,sk(A).concat([n(_)]))},s);if(i(Dr(Dr(Dr({},t),e),E)),_<1)c=requestAnimationFrame(f);else{var M=Lh(function(T,A){return Lv.apply(void 0,sk(A).concat([n(1)]))},s);i(Dr(Dr(Dr({},t),e),M))}};return f=n.isStepper?b:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function gd(t){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gd(t)}var zce=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function $ce(t,e){if(t==null)return{};var n=Vce(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Vce(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function WS(t){return qce(t)||Wce(t)||Gce(t)||Hce()}function Hce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gce(t,e){if(t){if(typeof t=="string")return UE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UE(t,e)}}function Wce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function qce(t){if(Array.isArray(t))return UE(t)}function UE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function lk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ra(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lk(Object(n),!0).forEach(function(r){Eh(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Eh(t,e,n){return e=f9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xce(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kce(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f9(r.key),r)}}function Yce(t,e,n){return e&&Kce(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function f9(t){var e=Zce(t,"string");return gd(e)==="symbol"?e:String(e)}function Zce(t,e){if(gd(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(gd(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jce(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&BE(t,e)}function BE(t,e){return BE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},BE(t,e)}function Qce(t){var e=eue();return function(){var r=Fv(t),i;if(e){var a=Fv(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return zE(this,i)}}function zE(t,e){if(e&&(gd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $E(t)}function $E(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function eue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(t){return Fv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(t)}var ba=(function(t){Jce(n,t);var e=Qce(n);function n(r,i){var a;Xce(this,n),a=e.call(this,r,i);var s=a.props,o=s.isActive,c=s.attributeName,l=s.from,h=s.to,f=s.steps,m=s.children,g=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind($E(a)),a.changeStyle=a.changeStyle.bind($E(a)),!o||g<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:h}),zE(a);if(f&&f.length)a.state={style:f[0].style};else if(l){if(typeof m=="function")return a.state={style:l},zE(a);a.state={style:c?Eh({},c,l):l}}else a.state={style:{}};return a}return Yce(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,o=a.canBegin,c=a.attributeName,l=a.shouldReAnimate,h=a.to,f=a.from,m=this.state.style;if(o){if(!s){var g={style:c?Eh({},c,h):h};this.state&&m&&(c&&m[c]!==h||!c&&m!==h)&&this.setState(g);return}if(!(sce(i.to,h)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=b||l?f:i.to;if(this.state&&m){var v={style:c?Eh({},c,y):y};(c&&m[c]!==y||!c&&m!==y)&&this.setState(v)}this.runAnimation(Ra(Ra({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,o=i.to,c=i.duration,l=i.easing,h=i.begin,f=i.onAnimationEnd,m=i.onAnimationStart,g=Bce(s,o,Pce(l),c,this.changeStyle),b=function(){a.stopJSAnimation=g()};this.manager.start([m,h,b,c,f])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,o=i.begin,c=i.onAnimationStart,l=s[0],h=l.style,f=l.duration,m=f===void 0?0:f,g=function(y,v,w){if(w===0)return y;var _=v.duration,E=v.easing,M=E===void 0?"ease":E,T=v.style,A=v.properties,N=v.onAnimationEnd,P=w>0?s[w-1]:v,R=A||Object.keys(T);if(typeof M=="function"||M==="spring")return[].concat(WS(y),[a.runJSAnimation.bind(a,{from:P.style,to:T,duration:_,easing:M}),_]);var F=rk(R,_,M),D=Ra(Ra(Ra({},P.style),T),{},{transition:F});return[].concat(WS(y),[D,_,N]).filter(vce)};return this.manager.start([c].concat(WS(s.reduce(g,[h,Math.max(m,o)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=hce());var a=i.begin,s=i.duration,o=i.attributeName,c=i.to,l=i.easing,h=i.onAnimationStart,f=i.onAnimationEnd,m=i.steps,g=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof l=="function"||typeof g=="function"||l==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var y=o?Eh({},o,c):c,v=rk(Object.keys(y),s,l);b.start([h,a,Ra(Ra({},y),{},{transition:v}),s,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var o=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=$ce(i,zce),l=O.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!o||l===0||s<=0)return a;var f=function(g){var b=g.props,y=b.style,v=y===void 0?{}:y,w=b.className,_=O.cloneElement(g,Ra(Ra({},c),{},{style:Ra(Ra({},v),h),className:w}));return _};return l===1?f(O.Children.only(a)):K.createElement("div",null,O.Children.map(a,function(m){return f(m)}))}}]),n})(O.PureComponent);ba.displayName="Animate";ba.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ba.propTypes={from:Nn.oneOfType([Nn.object,Nn.string]),to:Nn.oneOfType([Nn.object,Nn.string]),attributeName:Nn.string,duration:Nn.number,begin:Nn.number,easing:Nn.oneOfType([Nn.string,Nn.func]),steps:Nn.arrayOf(Nn.shape({duration:Nn.number.isRequired,style:Nn.object.isRequired,easing:Nn.oneOfType([Nn.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Nn.func]),properties:Nn.arrayOf("string"),onAnimationEnd:Nn.func})),children:Nn.oneOfType([Nn.node,Nn.func]),isActive:Nn.bool,canBegin:Nn.bool,onAnimationEnd:Nn.func,shouldReAnimate:Nn.bool,onAnimationStart:Nn.func,onAnimationReStart:Nn.func};function Mp(t){"@babel/helpers - typeof";return Mp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mp(t)}function Uv(){return Uv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Uv.apply(this,arguments)}function tue(t,e){return aue(t)||iue(t,e)||rue(t,e)||nue()}function nue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rue(t,e){if(t){if(typeof t=="string")return ck(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ck(t,e)}}function ck(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function iue(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function aue(t){if(Array.isArray(t))return t}function uk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function dk(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?uk(Object(n),!0).forEach(function(r){sue(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function sue(t,e,n){return e=oue(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oue(t){var e=lue(t,"string");return Mp(e)=="symbol"?e:e+""}function lue(t,e){if(Mp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Mp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fk=function(e,n,r,i,a){var s=Math.min(Math.abs(r)/2,Math.abs(i)/2),o=i>=0?1:-1,c=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,h;if(s>0&&a instanceof Array){for(var f=[0,0,0,0],m=0,g=4;m<g;m++)f[m]=a[m]>s?s:a[m];h="M".concat(e,",").concat(n+o*f[0]),f[0]>0&&(h+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(e+c*f[0],",").concat(n)),h+="L ".concat(e+r-c*f[1],",").concat(n),f[1]>0&&(h+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`,
`).concat(e+r,",").concat(n+o*f[1])),h+="L ".concat(e+r,",").concat(n+i-o*f[2]),f[2]>0&&(h+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(l,`,
`).concat(e+r-c*f[2],",").concat(n+i)),h+="L ".concat(e+c*f[3],",").concat(n+i),f[3]>0&&(h+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(l,`,
`).concat(e,",").concat(n+i-o*f[3])),h+="Z"}else if(s>0&&a===+a&&a>0){var b=Math.min(s,a);h="M ".concat(e,",").concat(n+o*b,`
A `).concat(b,",").concat(b,",0,0,").concat(l,",").concat(e+c*b,",").concat(n,`
L `).concat(e+r-c*b,",").concat(n,`
A `).concat(b,",").concat(b,",0,0,").concat(l,",").concat(e+r,",").concat(n+o*b,`
L `).concat(e+r,",").concat(n+i-o*b,`
A `).concat(b,",").concat(b,",0,0,").concat(l,",").concat(e+r-c*b,",").concat(n+i,`
L `).concat(e+c*b,",").concat(n+i,`
A `).concat(b,",").concat(b,",0,0,").concat(l,",").concat(e,",").concat(n+i-o*b," Z")}else h="M ".concat(e,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return h},cue=function(e,n){if(!e||!n)return!1;var r=e.x,i=e.y,a=n.x,s=n.y,o=n.width,c=n.height;if(Math.abs(o)>0&&Math.abs(c)>0){var l=Math.min(a,a+o),h=Math.max(a,a+o),f=Math.min(s,s+c),m=Math.max(s,s+c);return r>=l&&r<=h&&i>=f&&i<=m}return!1},uue={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tP=function(e){var n=dk(dk({},uue),e),r=O.useRef(),i=O.useState(-1),a=tue(i,2),s=a[0],o=a[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var M=r.current.getTotalLength();M&&o(M)}catch{}},[]);var c=n.x,l=n.y,h=n.width,f=n.height,m=n.radius,g=n.className,b=n.animationEasing,y=n.animationDuration,v=n.animationBegin,w=n.isAnimationActive,_=n.isUpdateAnimationActive;if(c!==+c||l!==+l||h!==+h||f!==+f||h===0||f===0)return null;var E=Yt("recharts-rectangle",g);return _?K.createElement(ba,{canBegin:s>0,from:{width:h,height:f,x:c,y:l},to:{width:h,height:f,x:c,y:l},duration:y,animationEasing:b,isActive:_},function(M){var T=M.width,A=M.height,N=M.x,P=M.y;return K.createElement(ba,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,isActive:w,easing:b},K.createElement("path",Uv({},Pt(n,!0),{className:E,d:fk(N,P,T,A,m),ref:r})))}):K.createElement("path",Uv({},Pt(n,!0),{className:E,d:fk(c,l,h,f,m)}))},due=["points","className","baseLinePoints","connectNulls"];function Vu(){return Vu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vu.apply(this,arguments)}function fue(t,e){if(t==null)return{};var n=hue(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hue(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function hk(t){return vue(t)||gue(t)||mue(t)||pue()}function pue(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mue(t,e){if(t){if(typeof t=="string")return VE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VE(t,e)}}function gue(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function vue(t){if(Array.isArray(t))return VE(t)}function VE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var pk=function(e){return e&&e.x===+e.x&&e.y===+e.y},yue=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(r){pk(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),pk(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Fh=function(e,n){var r=yue(e);n&&(r=[r.reduce(function(a,s){return[].concat(hk(a),hk(s))},[])]);var i=r.map(function(a){return a.reduce(function(s,o,c){return"".concat(s).concat(c===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},xue=function(e,n,r){var i=Fh(e,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Fh(n.reverse(),r).slice(1))},h9=function(e){var n=e.points,r=e.className,i=e.baseLinePoints,a=e.connectNulls,s=fue(e,due);if(!n||!n.length)return null;var o=Yt("recharts-polygon",r);if(i&&i.length){var c=s.stroke&&s.stroke!=="none",l=xue(n,i,a);return K.createElement("g",{className:o},K.createElement("path",Vu({},Pt(s,!0),{fill:l.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:l})),c?K.createElement("path",Vu({},Pt(s,!0),{fill:"none",d:Fh(n,a)})):null,c?K.createElement("path",Vu({},Pt(s,!0),{fill:"none",d:Fh(i,a)})):null)}var h=Fh(n,a);return K.createElement("path",Vu({},Pt(s,!0),{fill:h.slice(-1)==="Z"?s.fill:"none",className:o,d:h}))};function HE(){return HE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},HE.apply(this,arguments)}var ef=function(e){var n=e.cx,r=e.cy,i=e.r,a=e.className,s=Yt("recharts-dot",a);return n===+n&&r===+r&&i===+i?K.createElement("circle",HE({},Pt(e,!1),sv(e),{className:s,cx:n,cy:r,r:i})):null};function Ep(t){"@babel/helpers - typeof";return Ep=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ep(t)}var bue=["x","y","top","left","width","height","className"];function GE(){return GE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},GE.apply(this,arguments)}function mk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function wue(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mk(Object(n),!0).forEach(function(r){_ue(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _ue(t,e,n){return e=Sue(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sue(t){var e=Mue(t,"string");return Ep(e)=="symbol"?e:e+""}function Mue(t,e){if(Ep(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ep(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Eue(t,e){if(t==null)return{};var n=Tue(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tue(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var Aue=function(e,n,r,i,a,s){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(s,",").concat(n,"h").concat(r)},Nue=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,a=i===void 0?0:i,s=e.top,o=s===void 0?0:s,c=e.left,l=c===void 0?0:c,h=e.width,f=h===void 0?0:h,m=e.height,g=m===void 0?0:m,b=e.className,y=Eue(e,bue),v=wue({x:r,y:a,top:o,left:l,width:f,height:g},y);return!Je(r)||!Je(a)||!Je(f)||!Je(g)||!Je(o)||!Je(l)?null:K.createElement("path",GE({},Pt(v,!0),{className:Yt("recharts-cross",b),d:Aue(r,a,f,g,o,l)}))},Pue=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function Tp(t){"@babel/helpers - typeof";return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tp(t)}function Cue(t,e){if(t==null)return{};var n=Rue(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Rue(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function mo(){return mo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},mo.apply(this,arguments)}function gk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ap(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gk(Object(n),!0).forEach(function(r){jue(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jue(t,e,n){return e=Oue(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oue(t){var e=Iue(t,"string");return Tp(e)=="symbol"?e:e+""}function Iue(t,e){if(Tp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Tp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Due=function(e,n,r,i){var a="";return i.forEach(function(s,o){var c=Sn(n,r,e,s);o?a+="L ".concat(c.x,",").concat(c.y):a+="M ".concat(c.x,",").concat(c.y)}),a+="Z",a},kue=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.polarAngles,o=e.radialLines;if(!s||!s.length||!o)return null;var c=Ap({stroke:"#ccc"},Pt(e,!1));return K.createElement("g",{className:"recharts-polar-grid-angle"},s.map(function(l){var h=Sn(n,r,i,l),f=Sn(n,r,a,l);return K.createElement("line",mo({},c,{key:"line-".concat(l),x1:h.x,y1:h.y,x2:f.x,y2:f.y}))}))},Lue=function(e){var n=e.cx,r=e.cy,i=e.radius,a=e.index,s=Ap(Ap({stroke:"#ccc"},Pt(e,!1)),{},{fill:"none"});return K.createElement("circle",mo({},s,{className:Yt("recharts-polar-grid-concentric-circle",e.className),key:"circle-".concat(a),cx:n,cy:r,r:i}))},Fue=function(e){var n=e.radius,r=e.index,i=Ap(Ap({stroke:"#ccc"},Pt(e,!1)),{},{fill:"none"});return K.createElement("path",mo({},i,{className:Yt("recharts-polar-grid-concentric-polygon",e.className),key:"path-".concat(r),d:Due(n,e.cx,e.cy,e.polarAngles)}))},Uue=function(e){var n=e.polarRadius,r=e.gridType;return!n||!n.length?null:K.createElement("g",{className:"recharts-polar-grid-concentric"},n.map(function(i,a){var s=a;return r==="circle"?K.createElement(Lue,mo({key:s},e,{radius:i,index:a})):K.createElement(Fue,mo({key:s},e,{radius:i,index:a}))}))},p9=function(e){var n=e.cx,r=n===void 0?0:n,i=e.cy,a=i===void 0?0:i,s=e.innerRadius,o=s===void 0?0:s,c=e.outerRadius,l=c===void 0?0:c,h=e.gridType,f=h===void 0?"polygon":h,m=e.radialLines,g=m===void 0?!0:m,b=Cue(e,Pue);return l<=0?null:K.createElement("g",{className:"recharts-polar-grid"},K.createElement(kue,mo({cx:r,cy:a,innerRadius:o,outerRadius:l,gridType:f,radialLines:g},b)),K.createElement(Uue,mo({cx:r,cy:a,innerRadius:o,outerRadius:l,gridType:f,radialLines:g},b)))};p9.displayName="PolarGrid";var qS,vk;function Bue(){if(vk)return qS;vk=1;var t=ex(),e=Ez(),n=Rs();function r(i,a){return i&&i.length?t(i,n(a,2),e):void 0}return qS=r,qS}var zue=Bue();const $ue=Mn(zue);var XS,yk;function Vue(){if(yk)return XS;yk=1;var t=ex(),e=Rs(),n=Tz();function r(i,a){return i&&i.length?t(i,e(a,2),n):void 0}return XS=r,XS}var Hue=Vue();const Gue=Mn(Hue);var Wue=["cx","cy","angle","ticks","axisLine"],que=["ticks","tick","angle","tickFormatter","stroke"];function vd(t){"@babel/helpers - typeof";return vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vd(t)}function Uh(){return Uh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Uh.apply(this,arguments)}function xk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xk(Object(n),!0).forEach(function(r){ix(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bk(t,e){if(t==null)return{};var n=Xue(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Xue(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Kue(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g9(r.key),r)}}function Yue(t,e,n){return e&&wk(t.prototype,e),n&&wk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zue(t,e,n){return e=Bv(e),Jue(t,m9()?Reflect.construct(e,n||[],Bv(t).constructor):e.apply(t,n))}function Jue(t,e){if(e&&(vd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Que(t)}function Que(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m9=function(){return!!t})()}function Bv(t){return Bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(t)}function ede(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&WE(t,e)}function WE(t,e){return WE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WE(t,e)}function ix(t,e,n){return e=g9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g9(t){var e=tde(t,"string");return vd(e)=="symbol"?e:e+""}function tde(t,e){if(vd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(vd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var tf=(function(t){function e(){return Kue(this,e),Zue(this,e,arguments)}return ede(e,t),Yue(e,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,a=this.props,s=a.angle,o=a.cx,c=a.cy;return Sn(o,c,i,s)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,a=r.cy,s=r.angle,o=r.ticks,c=$ue(o,function(h){return h.coordinate||0}),l=Gue(o,function(h){return h.coordinate||0});return{cx:i,cy:a,startAngle:s,endAngle:s,innerRadius:l.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,s=r.angle,o=r.ticks,c=r.axisLine,l=bk(r,Wue),h=o.reduce(function(b,y){return[Math.min(b[0],y.coordinate),Math.max(b[1],y.coordinate)]},[1/0,-1/0]),f=Sn(i,a,h[0],s),m=Sn(i,a,h[1],s),g=Vl(Vl(Vl({},Pt(l,!1)),{},{fill:"none"},Pt(c,!1)),{},{x1:f.x,y1:f.y,x2:m.x,y2:m.y});return K.createElement("line",Uh({className:"recharts-polar-radius-axis-line"},g))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,s=i.tick,o=i.angle,c=i.tickFormatter,l=i.stroke,h=bk(i,que),f=this.getTickTextAnchor(),m=Pt(h,!1),g=Pt(s,!1),b=a.map(function(y,v){var w=r.getTickValueCoord(y),_=Vl(Vl(Vl(Vl({textAnchor:f,transform:"rotate(".concat(90-o,", ").concat(w.x,", ").concat(w.y,")")},m),{},{stroke:"none",fill:l},g),{},{index:v},w),{},{payload:y});return K.createElement(an,Uh({className:Yt("recharts-polar-radius-axis-tick",t9(s)),key:"tick-".concat(y.coordinate)},Tc(r.props,y,v)),e.renderTickItem(s,_,c?c(y.value,v):y.value))});return K.createElement(an,{className:"recharts-polar-radius-axis-ticks"},b)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.axisLine,s=r.tick;return!i||!i.length?null:K.createElement(an,{className:Yt("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),Pr.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,a){var s;return K.isValidElement(r)?s=K.cloneElement(r,i):Dt(r)?s=r(i):s=K.createElement(Ac,Uh({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])})(O.PureComponent);ix(tf,"displayName","PolarRadiusAxis");ix(tf,"axisType","radiusAxis");ix(tf,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function yd(t){"@babel/helpers - typeof";return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yd(t)}function ic(){return ic=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ic.apply(this,arguments)}function _k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_k(Object(n),!0).forEach(function(r){ax(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_k(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function nde(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y9(r.key),r)}}function rde(t,e,n){return e&&Sk(t.prototype,e),n&&Sk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ide(t,e,n){return e=zv(e),ade(t,v9()?Reflect.construct(e,n||[],zv(t).constructor):e.apply(t,n))}function ade(t,e){if(e&&(yd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sde(t)}function sde(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v9=function(){return!!t})()}function zv(t){return zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(t)}function ode(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qE(t,e)}function qE(t,e){return qE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qE(t,e)}function ax(t,e,n){return e=y9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y9(t){var e=lde(t,"string");return yd(e)=="symbol"?e:e+""}function lde(t,e){if(yd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(yd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var cde=Math.PI/180,Mk=1e-5,nf=(function(t){function e(){return nde(this,e),ide(this,e,arguments)}return ode(e,t),rde(e,[{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.cx,s=i.cy,o=i.radius,c=i.orientation,l=i.tickSize,h=l||8,f=Sn(a,s,o,r.coordinate),m=Sn(a,s,o+(c==="inner"?-1:1)*h,r.coordinate);return{x1:f.x,y1:f.y,x2:m.x,y2:m.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,a=Math.cos(-r.coordinate*cde),s;return a>Mk?s=i==="outer"?"start":"end":a<-Mk?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,s=r.radius,o=r.axisLine,c=r.axisLineType,l=Hl(Hl({},Pt(this.props,!1)),{},{fill:"none"},Pt(o,!1));if(c==="circle")return K.createElement(ef,ic({className:"recharts-polar-angle-axis-line"},l,{cx:i,cy:a,r:s}));var h=this.props.ticks,f=h.map(function(m){return Sn(i,a,s,m.coordinate)});return K.createElement(h9,ic({className:"recharts-polar-angle-axis-line"},l,{points:f}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,s=i.tick,o=i.tickLine,c=i.tickFormatter,l=i.stroke,h=Pt(this.props,!1),f=Pt(s,!1),m=Hl(Hl({},h),{},{fill:"none"},Pt(o,!1)),g=a.map(function(b,y){var v=r.getTickLineCoord(b),w=r.getTickTextAnchor(b),_=Hl(Hl(Hl({textAnchor:w},h),{},{stroke:"none",fill:l},f),{},{index:y,payload:b,x:v.x2,y:v.y2});return K.createElement(an,ic({className:Yt("recharts-polar-angle-axis-tick",t9(s)),key:"tick-".concat(b.coordinate)},Tc(r.props,b,y)),o&&K.createElement("line",ic({className:"recharts-polar-angle-axis-tick-line"},m,v)),s&&e.renderTickItem(s,_,c?c(b.value,y):b.value))});return K.createElement(an,{className:"recharts-polar-angle-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,s=r.axisLine;return a<=0||!i||!i.length?null:K.createElement(an,{className:Yt("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var s;return K.isValidElement(r)?s=K.cloneElement(r,i):Dt(r)?s=r(i):s=K.createElement(Ac,ic({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])})(O.PureComponent);ax(nf,"displayName","PolarAngleAxis");ax(nf,"axisType","angleAxis");ax(nf,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var KS,Ek;function ude(){if(Ek)return KS;Ek=1;var t=_6(),e=t(Object.getPrototypeOf,Object);return KS=e,KS}var YS,Tk;function dde(){if(Tk)return YS;Tk=1;var t=xo(),e=ude(),n=bo(),r="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,o=a.hasOwnProperty,c=s.call(Object);function l(h){if(!n(h)||t(h)!=r)return!1;var f=e(h);if(f===null)return!0;var m=o.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==c}return YS=l,YS}var fde=dde();const hde=Mn(fde);var ZS,Ak;function pde(){if(Ak)return ZS;Ak=1;var t=xo(),e=bo(),n="[object Boolean]";function r(i){return i===!0||i===!1||e(i)&&t(i)==n}return ZS=r,ZS}var mde=pde();const gde=Mn(mde);function Np(t){"@babel/helpers - typeof";return Np=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Np(t)}function $v(){return $v=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$v.apply(this,arguments)}function vde(t,e){return wde(t)||bde(t,e)||xde(t,e)||yde()}function yde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xde(t,e){if(t){if(typeof t=="string")return Nk(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nk(t,e)}}function Nk(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bde(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function wde(t){if(Array.isArray(t))return t}function Pk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ck(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pk(Object(n),!0).forEach(function(r){_de(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _de(t,e,n){return e=Sde(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sde(t){var e=Mde(t,"string");return Np(e)=="symbol"?e:e+""}function Mde(t,e){if(Np(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Np(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Rk=function(e,n,r,i,a){var s=r-i,o;return o="M ".concat(e,",").concat(n),o+="L ".concat(e+r,",").concat(n),o+="L ".concat(e+r-s/2,",").concat(n+a),o+="L ".concat(e+r-s/2-i,",").concat(n+a),o+="L ".concat(e,",").concat(n," Z"),o},Ede={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Tde=function(e){var n=Ck(Ck({},Ede),e),r=O.useRef(),i=O.useState(-1),a=vde(i,2),s=a[0],o=a[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&o(E)}catch{}},[]);var c=n.x,l=n.y,h=n.upperWidth,f=n.lowerWidth,m=n.height,g=n.className,b=n.animationEasing,y=n.animationDuration,v=n.animationBegin,w=n.isUpdateAnimationActive;if(c!==+c||l!==+l||h!==+h||f!==+f||m!==+m||h===0&&f===0||m===0)return null;var _=Yt("recharts-trapezoid",g);return w?K.createElement(ba,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:m,x:c,y:l},to:{upperWidth:h,lowerWidth:f,height:m,x:c,y:l},duration:y,animationEasing:b,isActive:w},function(E){var M=E.upperWidth,T=E.lowerWidth,A=E.height,N=E.x,P=E.y;return K.createElement(ba,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,easing:b},K.createElement("path",$v({},Pt(n,!0),{className:_,d:Rk(N,P,M,T,A),ref:r})))}):K.createElement("g",null,K.createElement("path",$v({},Pt(n,!0),{className:_,d:Rk(c,l,h,f,m)})))},Ade=["option","shapeType","propTransformer","activeClassName","isActive"];function Pp(t){"@babel/helpers - typeof";return Pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pp(t)}function Nde(t,e){if(t==null)return{};var n=Pde(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Pde(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function jk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vv(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jk(Object(n),!0).forEach(function(r){Cde(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cde(t,e,n){return e=Rde(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Rde(t){var e=jde(t,"string");return Pp(e)=="symbol"?e:e+""}function jde(t,e){if(Pp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Pp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ode(t,e){return Vv(Vv({},e),t)}function Ide(t,e){return t==="symbols"}function Ok(t){var e=t.shapeType,n=t.elementProps;switch(e){case"rectangle":return K.createElement(tP,n);case"trapezoid":return K.createElement(Tde,n);case"sector":return K.createElement(a9,n);case"symbols":if(Ide(e))return K.createElement(bN,n);break;default:return null}}function Dde(t){return O.isValidElement(t)?t.props:t}function x9(t){var e=t.option,n=t.shapeType,r=t.propTransformer,i=r===void 0?Ode:r,a=t.activeClassName,s=a===void 0?"recharts-active-shape":a,o=t.isActive,c=Nde(t,Ade),l;if(O.isValidElement(e))l=O.cloneElement(e,Vv(Vv({},c),Dde(e)));else if(Dt(e))l=e(c);else if(hde(e)&&!gde(e)){var h=i(e,c);l=K.createElement(Ok,{shapeType:n,elementProps:h})}else{var f=c;l=K.createElement(Ok,{shapeType:n,elementProps:f})}return o?K.createElement(an,{className:s},l):l}function sx(t,e){return e!=null&&"trapezoids"in t.props}function ox(t,e){return e!=null&&"sectors"in t.props}function Cp(t,e){return e!=null&&"points"in t.props}function kde(t,e){var n,r,i=t.x===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.x)||t.x===e.x,a=t.y===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.y)||t.y===e.y;return i&&a}function Lde(t,e){var n=t.endAngle===e.endAngle,r=t.startAngle===e.startAngle;return n&&r}function Fde(t,e){var n=t.x===e.x,r=t.y===e.y,i=t.z===e.z;return n&&r&&i}function Ude(t,e){var n;return sx(t,e)?n=kde:ox(t,e)?n=Lde:Cp(t,e)&&(n=Fde),n}function Bde(t,e){var n;return sx(t,e)?n="trapezoids":ox(t,e)?n="sectors":Cp(t,e)&&(n="points"),n}function zde(t,e){if(sx(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(ox(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Cp(t,e)?e.payload:{}}function $de(t){var e=t.activeTooltipItem,n=t.graphicalItem,r=t.itemData,i=Bde(n,e),a=zde(n,e),s=r.filter(function(c,l){var h=yl(a,c),f=n.props[i].filter(function(b){var y=Ude(n,e);return y(b,e)}),m=n.props[i].indexOf(f[f.length-1]),g=l===m;return h&&g}),o=r.indexOf(s[s.length-1]);return o}var Og;function xd(t){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xd(t)}function Hu(){return Hu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Hu.apply(this,arguments)}function Ik(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Dn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ik(Object(n),!0).forEach(function(r){ha(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ik(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Vde(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w9(r.key),r)}}function Hde(t,e,n){return e&&Dk(t.prototype,e),n&&Dk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gde(t,e,n){return e=Hv(e),Wde(t,b9()?Reflect.construct(e,n||[],Hv(t).constructor):e.apply(t,n))}function Wde(t,e){if(e&&(xd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qde(t)}function qde(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b9=function(){return!!t})()}function Hv(t){return Hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(t)}function Xde(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&XE(t,e)}function XE(t,e){return XE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},XE(t,e)}function ha(t,e,n){return e=w9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w9(t){var e=Kde(t,"string");return xd(e)=="symbol"?e:e+""}function Kde(t,e){if(xd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(xd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var js=(function(t){function e(n){var r;return Vde(this,e),r=Gde(this,e,[n]),ha(r,"pieRef",null),ha(r,"sectorRefs",[]),ha(r,"id",Bc("recharts-pie-")),ha(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Dt(i)&&i()}),ha(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Dt(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return Xde(e,t),Hde(e,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.label,o=a.labelLine,c=a.dataKey,l=a.valueKey,h=Pt(this.props,!1),f=Pt(s,!1),m=Pt(o,!1),g=s&&s.offsetRadius||20,b=r.map(function(y,v){var w=(y.startAngle+y.endAngle)/2,_=Sn(y.cx,y.cy,y.outerRadius+g,w),E=Dn(Dn(Dn(Dn({},h),y),{},{stroke:"none"},f),{},{index:v,textAnchor:e.getTextAnchor(_.x,y.cx)},_),M=Dn(Dn(Dn(Dn({},h),y),{},{fill:"none",stroke:y.fill},m),{},{index:v,points:[Sn(y.cx,y.cy,y.outerRadius,w),_]}),T=c;return Kt(c)&&Kt(l)?T="value":Kt(c)&&(T=l),K.createElement(an,{key:"label-".concat(y.startAngle,"-").concat(y.endAngle,"-").concat(y.midAngle,"-").concat(v)},o&&e.renderLabelLineItem(o,M,"line"),e.renderLabelItem(s,E,Yn(y,T)))});return K.createElement(an,{className:"recharts-pie-labels"},b)}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,s=a.activeShape,o=a.blendStroke,c=a.inactiveShape;return r.map(function(l,h){if((l==null?void 0:l.startAngle)===0&&(l==null?void 0:l.endAngle)===0&&r.length!==1)return null;var f=i.isActiveIndex(h),m=c&&i.hasActiveIndex()?c:null,g=f?s:m,b=Dn(Dn({},l),{},{stroke:o?l.fill:l.stroke,tabIndex:-1});return K.createElement(an,Hu({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Tc(i.props,l,h),{key:"sector-".concat(l==null?void 0:l.startAngle,"-").concat(l==null?void 0:l.endAngle,"-").concat(l.midAngle,"-").concat(h)}),K.createElement(x9,Hu({option:g,isActive:f,shapeType:"sector"},b)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.sectors,s=i.isAnimationActive,o=i.animationBegin,c=i.animationDuration,l=i.animationEasing,h=i.animationId,f=this.state,m=f.prevSectors,g=f.prevIsAnimationActive;return K.createElement(ba,{begin:o,duration:c,isActive:s,easing:l,from:{t:0},to:{t:1},key:"pie-".concat(h,"-").concat(g),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(b){var y=b.t,v=[],w=a&&a[0],_=w.startAngle;return a.forEach(function(E,M){var T=m&&m[M],A=M>0?Xi(E,"paddingAngle",0):0;if(T){var N=Kn(T.endAngle-T.startAngle,E.endAngle-E.startAngle),P=Dn(Dn({},E),{},{startAngle:_+A,endAngle:_+N(y)+A});v.push(P),_=P.endAngle}else{var R=E.endAngle,F=E.startAngle,D=Kn(0,R-F),L=D(y),q=Dn(Dn({},E),{},{startAngle:_+A,endAngle:_+L+A});v.push(q),_=q.endAngle}}),K.createElement(an,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var o=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!yl(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,s=i.sectors,o=i.className,c=i.label,l=i.cx,h=i.cy,f=i.innerRadius,m=i.outerRadius,g=i.isAnimationActive,b=this.state.isAnimationFinished;if(a||!s||!s.length||!Je(l)||!Je(h)||!Je(f)||!Je(m))return null;var y=Yt("recharts-pie",o);return K.createElement(an,{tabIndex:this.props.rootTabIndex,className:y,ref:function(w){r.pieRef=w}},this.renderSectors(),c&&this.renderLabels(s),Pr.renderCallByParent(this.props,null,!1),(!g||b)&&Va.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,a){if(K.isValidElement(r))return K.cloneElement(r,i);if(Dt(r))return r(i);var s=Yt("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return K.createElement(xc,Hu({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(r,i,a){if(K.isValidElement(r))return K.cloneElement(r,i);var s=a;if(Dt(r)&&(s=r(i),K.isValidElement(s)))return s;var o=Yt("recharts-pie-label-text",typeof r!="boolean"&&!Dt(r)?r.className:"");return K.createElement(Ac,Hu({},i,{alignmentBaseline:"middle",className:o}),s)}}])})(O.PureComponent);Og=js;ha(js,"displayName","Pie");ha(js,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!wo.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});ha(js,"parseDeltaAngle",function(t,e){var n=ui(e-t),r=Math.min(Math.abs(e-t),360);return n*r});ha(js,"getRealPieData",function(t){var e=t.data,n=t.children,r=Pt(t,!1),i=Ki(n,rm);return e&&e.length?e.map(function(a,s){return Dn(Dn(Dn({payload:a},r),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return Dn(Dn({},r),a.props)}):[]});ha(js,"parseCoordinateOfPie",function(t,e){var n=e.top,r=e.left,i=e.width,a=e.height,s=Qz(i,a),o=r+di(t.cx,i,i/2),c=n+di(t.cy,a,a/2),l=di(t.innerRadius,s,0),h=di(t.outerRadius,s,s*.8),f=t.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:o,cy:c,innerRadius:l,outerRadius:h,maxRadius:f}});ha(js,"getComposedData",function(t){var e=t.item,n=t.offset,r=e.type.defaultProps!==void 0?Dn(Dn({},e.type.defaultProps),e.props):e.props,i=Og.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,s=r.startAngle,o=r.endAngle,c=r.paddingAngle,l=r.dataKey,h=r.nameKey,f=r.valueKey,m=r.tooltipType,g=Math.abs(r.minAngle),b=Og.parseCoordinateOfPie(r,n),y=Og.parseDeltaAngle(s,o),v=Math.abs(y),w=l;Kt(l)&&Kt(f)?($a(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),w="value"):Kt(l)&&($a(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),w=f);var _=i.filter(function(P){return Yn(P,w,0)!==0}).length,E=(v>=360?_:_-1)*c,M=v-_*g-E,T=i.reduce(function(P,R){var F=Yn(R,w,0);return P+(Je(F)?F:0)},0),A;if(T>0){var N;A=i.map(function(P,R){var F=Yn(P,w,0),D=Yn(P,h,R),L=(Je(F)?F:0)/T,q;R?q=N.endAngle+ui(y)*c*(F!==0?1:0):q=s;var I=q+ui(y)*((F!==0?g:0)+L*M),U=(q+I)/2,k=(b.innerRadius+b.outerRadius)/2,V=[{name:D,value:F,payload:P,dataKey:w,type:m}],$=Sn(b.cx,b.cy,k,U);return N=Dn(Dn(Dn({percent:L,cornerRadius:a,name:D,tooltipPayload:V,midAngle:U,middleRadius:k,tooltipPosition:$},P),b),{},{value:Yn(P,w),startAngle:q,endAngle:I,payload:P,paddingAngle:ui(y)*c}),N})}return Dn(Dn({},b),{},{sectors:A,data:i})});var JS,kk;function Yde(){if(kk)return JS;kk=1;function t(e){return e&&e.length?e[0]:void 0}return JS=t,JS}var QS,Lk;function Zde(){return Lk||(Lk=1,QS=Yde()),QS}var Jde=Zde();const Qde=Mn(Jde);var efe=["key"];function bd(t){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bd(t)}function tfe(t,e){if(t==null)return{};var n=nfe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function nfe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Gv(){return Gv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Gv.apply(this,arguments)}function Fk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function si(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fk(Object(n),!0).forEach(function(r){to(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,S9(r.key),r)}}function ife(t,e,n){return e&&Uk(t.prototype,e),n&&Uk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function afe(t,e,n){return e=Wv(e),sfe(t,_9()?Reflect.construct(e,n||[],Wv(t).constructor):e.apply(t,n))}function sfe(t,e){if(e&&(bd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ofe(t)}function ofe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_9=function(){return!!t})()}function Wv(t){return Wv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(t)}function lfe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&KE(t,e)}function KE(t,e){return KE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},KE(t,e)}function to(t,e,n){return e=S9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S9(t){var e=cfe(t,"string");return bd(e)=="symbol"?e:e+""}function cfe(t,e){if(bd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(bd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var wd=(function(t){function e(){var n;rfe(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=afe(this,e,[].concat(i)),to(n,"state",{isAnimationFinished:!1}),to(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Dt(s)&&s()}),to(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Dt(s)&&s()}),to(n,"handleMouseEnter",function(s){var o=n.props.onMouseEnter;o&&o(n.props,s)}),to(n,"handleMouseLeave",function(s){var o=n.props.onMouseLeave;o&&o(n.props,s)}),n}return lfe(e,t),ife(e,[{key:"renderDots",value:function(r){var i=this.props,a=i.dot,s=i.dataKey,o=Pt(this.props,!1),c=Pt(a,!0),l=r.map(function(h,f){var m=si(si(si({key:"dot-".concat(f),r:3},o),c),{},{dataKey:s,cx:h.x,cy:h.y,index:f,payload:h});return e.renderDotItem(a,m)});return K.createElement(an,{className:"recharts-radar-dots"},l)}},{key:"renderPolygonStatically",value:function(r){var i=this.props,a=i.shape,s=i.dot,o=i.isRange,c=i.baseLinePoints,l=i.connectNulls,h;return K.isValidElement(a)?h=K.cloneElement(a,si(si({},this.props),{},{points:r})):Dt(a)?h=a(si(si({},this.props),{},{points:r})):h=K.createElement(h9,Gv({},Pt(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:r,baseLinePoints:o?c:null,connectNulls:l})),K.createElement(an,{className:"recharts-radar-polygon"},h,s?this.renderDots(r):null)}},{key:"renderPolygonWithAnimation",value:function(){var r=this,i=this.props,a=i.points,s=i.isAnimationActive,o=i.animationBegin,c=i.animationDuration,l=i.animationEasing,h=i.animationId,f=this.state.prevPoints;return K.createElement(ba,{begin:o,duration:c,isActive:s,easing:l,from:{t:0},to:{t:1},key:"radar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var g=m.t,b=f&&f.length/a.length,y=a.map(function(v,w){var _=f&&f[Math.floor(w*b)];if(_){var E=Kn(_.x,v.x),M=Kn(_.y,v.y);return si(si({},v),{},{x:E(g),y:M(g)})}var T=Kn(v.cx,v.x),A=Kn(v.cy,v.y);return si(si({},v),{},{x:T(g),y:A(g)})});return r.renderPolygonStatically(y)})}},{key:"renderPolygon",value:function(){var r=this.props,i=r.points,a=r.isAnimationActive,s=r.isRange,o=this.state.prevPoints;return a&&i&&i.length&&!s&&(!o||!yl(o,i))?this.renderPolygonWithAnimation():this.renderPolygonStatically(i)}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.className,s=r.points,o=r.isAnimationActive;if(i||!s||!s.length)return null;var c=this.state.isAnimationFinished,l=Yt("recharts-radar",a);return K.createElement(an,{className:l},this.renderPolygon(),(!o||c)&&Va.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"renderDotItem",value:function(r,i){var a;if(K.isValidElement(r))a=K.cloneElement(r,i);else if(Dt(r))a=r(i);else{var s=i.key,o=tfe(i,efe);a=K.createElement(ef,Gv({},o,{key:s,className:Yt("recharts-radar-dot",typeof r!="boolean"?r.className:"")}))}return a}}])})(O.PureComponent);to(wd,"displayName","Radar");to(wd,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!wo.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});to(wd,"getComposedData",function(t){var e=t.radiusAxis,n=t.angleAxis,r=t.displayedData,i=t.dataKey,a=t.bandSize,s=n.cx,o=n.cy,c=!1,l=[],h=n.type!=="number"?a??0:0;r.forEach(function(m,g){var b=Yn(m,n.dataKey,g),y=Yn(m,i),v=n.scale(b)+h,w=Array.isArray(y)?r9(y):y,_=Kt(w)?void 0:e.scale(w);Array.isArray(y)&&y.length>=2&&(c=!0),l.push(si(si({},Sn(s,o,_,v)),{},{name:b,value:y,cx:s,cy:o,radius:_,angle:v,payload:m}))});var f=[];return c&&l.forEach(function(m){if(Array.isArray(m.value)){var g=Qde(m.value),b=Kt(g)?void 0:e.scale(g);f.push(si(si({},m),{},{radius:b},Sn(s,o,b,m.angle)))}else f.push(m)}),{points:l,isRange:c,baseLinePoints:f}});var e2,Bk;function ufe(){if(Bk)return e2;Bk=1;var t=Math.ceil,e=Math.max;function n(r,i,a,s){for(var o=-1,c=e(t((i-r)/(a||1)),0),l=Array(c);c--;)l[s?c:++o]=r,r+=a;return l}return e2=n,e2}var t2,zk;function M9(){if(zk)return t2;zk=1;var t=F6(),e=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*n}return i===i?i:0}return t2=r,t2}var n2,$k;function dfe(){if($k)return n2;$k=1;var t=ufe(),e=qy(),n=M9();function r(i){return function(a,s,o){return o&&typeof o!="number"&&e(a,s,o)&&(s=o=void 0),a=n(a),s===void 0?(s=a,a=0):s=n(s),o=o===void 0?a<s?1:-1:n(o),t(a,s,o,i)}}return n2=r,n2}var r2,Vk;function ffe(){if(Vk)return r2;Vk=1;var t=dfe(),e=t();return r2=e,r2}var hfe=ffe();const qv=Mn(hfe);function Rp(t){"@babel/helpers - typeof";return Rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rp(t)}function Hk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gk(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hk(Object(n),!0).forEach(function(r){E9(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function E9(t,e,n){return e=pfe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pfe(t){var e=mfe(t,"string");return Rp(e)=="symbol"?e:e+""}function mfe(t,e){if(Rp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Rp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var gfe=["Webkit","Moz","O","ms"],vfe=function(e,n){var r=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=gfe.reduce(function(a,s){return Gk(Gk({},a),{},E9({},s+r,n))},{});return i[e]=n,i};function _d(t){"@babel/helpers - typeof";return _d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_d(t)}function Xv(){return Xv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xv.apply(this,arguments)}function Wk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function i2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wk(Object(n),!0).forEach(function(r){$i(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A9(r.key),r)}}function xfe(t,e,n){return e&&qk(t.prototype,e),n&&qk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function bfe(t,e,n){return e=Kv(e),wfe(t,T9()?Reflect.construct(e,n||[],Kv(t).constructor):e.apply(t,n))}function wfe(t,e){if(e&&(_d(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _fe(t)}function _fe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function T9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T9=function(){return!!t})()}function Kv(t){return Kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(t)}function Sfe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&YE(t,e)}function YE(t,e){return YE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YE(t,e)}function $i(t,e,n){return e=A9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A9(t){var e=Mfe(t,"string");return _d(e)=="symbol"?e:e+""}function Mfe(t,e){if(_d(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(_d(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Efe=function(e){var n=e.data,r=e.startIndex,i=e.endIndex,a=e.x,s=e.width,o=e.travellerWidth;if(!n||!n.length)return{};var c=n.length,l=Dh().domain(qv(0,c)).range([a,a+s-o]),h=l.domain().map(function(f){return l(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(r),endX:l(i),scale:l,scaleValues:h}},Xk=function(e){return e.changedTouches&&!!e.changedTouches.length},Sd=(function(t){function e(n){var r;return yfe(this,e),r=bfe(this,e,[n]),$i(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),$i(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),$i(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,s=i.onDragEnd,o=i.startIndex;s==null||s({endIndex:a,startIndex:o})}),r.detachDragEndListener()}),$i(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),$i(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),$i(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),$i(r,"handleSlideDragStart",function(i){var a=Xk(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Sfe(e,t),xfe(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,s=this.state.scaleValues,o=this.props,c=o.gap,l=o.data,h=l.length-1,f=Math.min(i,a),m=Math.max(i,a),g=e.getIndexInRange(s,f),b=e.getIndexInRange(s,m);return{startIndex:g-g%c,endIndex:b===h?h:b-b%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,s=i.tickFormatter,o=i.dataKey,c=Yn(a[r],o,r);return Dt(s)?s(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,s=i.startX,o=i.endX,c=this.props,l=c.x,h=c.width,f=c.travellerWidth,m=c.startIndex,g=c.endIndex,b=c.onChange,y=r.pageX-a;y>0?y=Math.min(y,l+h-f-o,l+h-f-s):y<0&&(y=Math.max(y,l-s,l-o));var v=this.getIndex({startX:s+y,endX:o+y});(v.startIndex!==m||v.endIndex!==g)&&b&&b(v),this.setState({startX:s+y,endX:o+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=Xk(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,o=i.endX,c=i.startX,l=this.state[s],h=this.props,f=h.x,m=h.width,g=h.travellerWidth,b=h.onChange,y=h.gap,v=h.data,w={startX:this.state.startX,endX:this.state.endX},_=r.pageX-a;_>0?_=Math.min(_,f+m-g-l):_<0&&(_=Math.max(_,f-l)),w[s]=l+_;var E=this.getIndex(w),M=E.startIndex,T=E.endIndex,A=function(){var P=v.length-1;return s==="startX"&&(o>c?M%y===0:T%y===0)||o<c&&T===P||s==="endX"&&(o>c?T%y===0:M%y===0)||o>c&&T===P};this.setState($i($i({},s,l+_),"brushMoveStartX",r.pageX),function(){b&&A()&&b(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,s=this.state,o=s.scaleValues,c=s.startX,l=s.endX,h=this.state[i],f=o.indexOf(h);if(f!==-1){var m=f+r;if(!(m===-1||m>=o.length)){var g=o[m];i==="startX"&&g>=l||i==="endX"&&g<=c||this.setState($i({},i,g),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,s=r.width,o=r.height,c=r.fill,l=r.stroke;return K.createElement("rect",{stroke:l,fill:c,x:i,y:a,width:s,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,s=r.width,o=r.height,c=r.data,l=r.children,h=r.padding,f=O.Children.only(l);return f?K.cloneElement(f,{x:i,y:a,width:s,height:o,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,s,o=this,c=this.props,l=c.y,h=c.travellerWidth,f=c.height,m=c.traveller,g=c.ariaLabel,b=c.data,y=c.startIndex,v=c.endIndex,w=Math.max(r,this.props.x),_=i2(i2({},Pt(this.props,!1)),{},{x:w,y:l,width:h,height:f}),E=g||"Min value: ".concat((a=b[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=b[v])===null||s===void 0?void 0:s.name);return K.createElement(an,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),o.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,i))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(m,_))}},{key:"renderSlide",value:function(r,i){var a=this.props,s=a.y,o=a.height,c=a.stroke,l=a.travellerWidth,h=Math.min(r,i)+l,f=Math.max(Math.abs(i-r)-l,0);return K.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:s,width:f,height:o})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,s=r.y,o=r.height,c=r.travellerWidth,l=r.stroke,h=this.state,f=h.startX,m=h.endX,g=5,b={pointerEvents:"none",fill:l};return K.createElement(an,{className:"recharts-brush-texts"},K.createElement(Ac,Xv({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,m)-g,y:s+o/2},b),this.getTextOfTick(i)),K.createElement(Ac,Xv({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,m)+c+g,y:s+o/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,s=r.children,o=r.x,c=r.y,l=r.width,h=r.height,f=r.alwaysShowText,m=this.state,g=m.startX,b=m.endX,y=m.isTextActive,v=m.isSlideMoving,w=m.isTravellerMoving,_=m.isTravellerFocused;if(!i||!i.length||!Je(o)||!Je(c)||!Je(l)||!Je(h)||l<=0||h<=0)return null;var E=Yt("recharts-brush",a),M=K.Children.count(s)===1,T=vfe("userSelect","none");return K.createElement(an,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),M&&this.renderPanorama(),this.renderSlide(g,b),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(b,"endX"),(y||v||w||_||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,s=r.width,o=r.height,c=r.stroke,l=Math.floor(a+o/2)-1;return K.createElement(K.Fragment,null,K.createElement("rect",{x:i,y:a,width:s,height:o,fill:c,stroke:"none"}),K.createElement("line",{x1:i+1,y1:l,x2:i+s-1,y2:l,fill:"none",stroke:"#fff"}),K.createElement("line",{x1:i+1,y1:l+2,x2:i+s-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return K.isValidElement(r)?a=K.cloneElement(r,i):Dt(r)?a=r(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,s=r.width,o=r.x,c=r.travellerWidth,l=r.updateId,h=r.startIndex,f=r.endIndex;if(a!==i.prevData||l!==i.prevUpdateId)return i2({prevData:a,prevTravellerWidth:c,prevUpdateId:l,prevX:o,prevWidth:s},a&&a.length?Efe({data:a,width:s,x:o,travellerWidth:c,startIndex:h,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||o!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([o,o+s-c]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:l,prevX:o,prevWidth:s,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,s=0,o=a-1;o-s>1;){var c=Math.floor((s+o)/2);r[c]>i?o=c:s=c}return i>=r[o]?o:s}}])})(O.PureComponent);$i(Sd,"displayName","Brush");$i(Sd,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var a2,Kk;function Tfe(){if(Kk)return a2;Kk=1;var t=AN();function e(n,r){var i;return t(n,function(a,s,o){return i=r(a,s,o),!i}),!!i}return a2=e,a2}var s2,Yk;function Afe(){if(Yk)return s2;Yk=1;var t=m6(),e=Rs(),n=Tfe(),r=ji(),i=qy();function a(s,o,c){var l=r(s)?t:n;return c&&i(s,o,c)&&(o=void 0),l(s,e(o,3))}return s2=a,s2}var Nfe=Afe();const Pfe=Mn(Nfe);var vs=function(e,n){var r=e.alwaysShow,i=e.ifOverflow;return r&&(i="extendDomain"),i===n},o2,Zk;function Cfe(){if(Zk)return o2;Zk=1;var t=O6();function e(n,r,i){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return o2=e,o2}var l2,Jk;function Rfe(){if(Jk)return l2;Jk=1;var t=Cfe(),e=R6(),n=Rs();function r(i,a){var s={};return a=n(a,3),e(i,function(o,c,l){t(s,c,a(o,c,l))}),s}return l2=r,l2}var jfe=Rfe();const Ofe=Mn(jfe);var c2,Qk;function Ife(){if(Qk)return c2;Qk=1;function t(e,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(!n(e[r],r,e))return!1;return!0}return c2=t,c2}var u2,eL;function Dfe(){if(eL)return u2;eL=1;var t=AN();function e(n,r){var i=!0;return t(n,function(a,s,o){return i=!!r(a,s,o),i}),i}return u2=e,u2}var d2,tL;function kfe(){if(tL)return d2;tL=1;var t=Ife(),e=Dfe(),n=Rs(),r=ji(),i=qy();function a(s,o,c){var l=r(s)?t:e;return c&&i(s,o,c)&&(o=void 0),l(s,n(o,3))}return d2=a,d2}var Lfe=kfe();const N9=Mn(Lfe);var Ffe=["x","y"];function jp(t){"@babel/helpers - typeof";return jp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jp(t)}function ZE(){return ZE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ZE.apply(this,arguments)}function nL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ih(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nL(Object(n),!0).forEach(function(r){Ufe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ufe(t,e,n){return e=Bfe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bfe(t){var e=zfe(t,"string");return jp(e)=="symbol"?e:e+""}function zfe(t,e){if(jp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $fe(t,e){if(t==null)return{};var n=Vfe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Vfe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Hfe(t,e){var n=t.x,r=t.y,i=$fe(t,Ffe),a="".concat(n),s=parseInt(a,10),o="".concat(r),c=parseInt(o,10),l="".concat(e.height||i.height),h=parseInt(l,10),f="".concat(e.width||i.width),m=parseInt(f,10);return ih(ih(ih(ih(ih({},e),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:h,width:m,name:e.name,radius:e.radius})}function rL(t){return K.createElement(x9,ZE({shapeType:"rectangle",propTransformer:Hfe,activeClassName:"recharts-active-bar"},t))}var Gfe=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof e=="number")return e;var a=typeof r=="number";return a?e(r,i):(a||Cc(),n)}},Wfe=["value","background"],P9;function Md(t){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Md(t)}function qfe(t,e){if(t==null)return{};var n=Xfe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Xfe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Yv(){return Yv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yv.apply(this,arguments)}function iL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?iL(Object(n),!0).forEach(function(r){ll(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kfe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aL(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,R9(r.key),r)}}function Yfe(t,e,n){return e&&aL(t.prototype,e),n&&aL(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zfe(t,e,n){return e=Zv(e),Jfe(t,C9()?Reflect.construct(e,n||[],Zv(t).constructor):e.apply(t,n))}function Jfe(t,e){if(e&&(Md(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qfe(t)}function Qfe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C9=function(){return!!t})()}function Zv(t){return Zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(t)}function ehe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&JE(t,e)}function JE(t,e){return JE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},JE(t,e)}function ll(t,e,n){return e=R9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R9(t){var e=the(t,"string");return Md(e)=="symbol"?e:e+""}function the(t,e){if(Md(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Md(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Ms=(function(t){function e(){var n;Kfe(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Zfe(this,e,[].concat(i)),ll(n,"state",{isAnimationFinished:!1}),ll(n,"id",Bc("recharts-bar-")),ll(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),s&&s()}),ll(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),s&&s()}),n}return ehe(e,t),Yfe(e,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,s=a.shape,o=a.dataKey,c=a.activeIndex,l=a.activeBar,h=Pt(this.props,!1);return r&&r.map(function(f,m){var g=m===c,b=g?l:s,y=cr(cr(cr({},h),f),{},{isActive:g,option:b,index:m,dataKey:o,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return K.createElement(an,Yv({className:"recharts-bar-rectangle"},Tc(i.props,f,m),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(m)}),K.createElement(rL,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,s=i.layout,o=i.isAnimationActive,c=i.animationBegin,l=i.animationDuration,h=i.animationEasing,f=i.animationId,m=this.state.prevData;return K.createElement(ba,{begin:c,duration:l,isActive:o,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var b=g.t,y=a.map(function(v,w){var _=m&&m[w];if(_){var E=Kn(_.x,v.x),M=Kn(_.y,v.y),T=Kn(_.width,v.width),A=Kn(_.height,v.height);return cr(cr({},v),{},{x:E(b),y:M(b),width:T(b),height:A(b)})}if(s==="horizontal"){var N=Kn(0,v.height),P=N(b);return cr(cr({},v),{},{y:v.y+v.height-P,height:P})}var R=Kn(0,v.width),F=R(b);return cr(cr({},v),{},{width:F})});return K.createElement(an,null,r.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!yl(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,s=i.dataKey,o=i.activeIndex,c=Pt(this.props.background,!1);return a.map(function(l,h){l.value;var f=l.background,m=qfe(l,Wfe);if(!f)return null;var g=cr(cr(cr(cr(cr({},m),{},{fill:"#eee"},f),c),Tc(r.props,l,h)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:s,index:h,className:"recharts-bar-background-rectangle"});return K.createElement(rL,Yv({key:"background-bar-".concat(h),option:r.props.background,isActive:h===o},g))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,o=a.xAxis,c=a.yAxis,l=a.layout,h=a.children,f=Ki(h,lm);if(!f)return null;var m=l==="vertical"?s[0].height/2:s[0].width/2,g=function(v,w){var _=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:_,errorVal:Yn(v,w)}},b={clipPath:r?"url(#clipPath-".concat(i,")"):null};return K.createElement(an,b,f.map(function(y){return K.cloneElement(y,{key:"error-bar-".concat(i,"-").concat(y.props.dataKey),data:s,xAxis:o,yAxis:c,layout:l,offset:m,dataPointFormatter:g})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,s=r.className,o=r.xAxis,c=r.yAxis,l=r.left,h=r.top,f=r.width,m=r.height,g=r.isAnimationActive,b=r.background,y=r.id;if(i||!a||!a.length)return null;var v=this.state.isAnimationFinished,w=Yt("recharts-bar",s),_=o&&o.allowDataOverflow,E=c&&c.allowDataOverflow,M=_||E,T=Kt(y)?this.id:y;return K.createElement(an,{className:w},_||E?K.createElement("defs",null,K.createElement("clipPath",{id:"clipPath-".concat(T)},K.createElement("rect",{x:_?l:l-f/2,y:E?h:h-m/2,width:_?f:f*2,height:E?m:m*2}))):null,K.createElement(an,{className:"recharts-bar-rectangles",clipPath:M?"url(#clipPath-".concat(T,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(M,T),(!g||v)&&Va.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(O.PureComponent);P9=Ms;ll(Ms,"displayName","Bar");ll(Ms,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!wo.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ll(Ms,"getComposedData",function(t){var e=t.props,n=t.item,r=t.barPosition,i=t.bandSize,a=t.xAxis,s=t.yAxis,o=t.xAxisTicks,c=t.yAxisTicks,l=t.stackedData,h=t.dataStartIndex,f=t.displayedData,m=t.offset,g=ioe(r,n);if(!g)return null;var b=e.layout,y=n.type.defaultProps,v=y!==void 0?cr(cr({},y),n.props):n.props,w=v.dataKey,_=v.children,E=v.minPointSize,M=b==="horizontal"?s:a,T=l?M.scale.domain():null,A=doe({numericAxis:M}),N=Ki(_,rm),P=f.map(function(R,F){var D,L,q,I,U,k;l?D=aoe(l[h+F],T):(D=Yn(R,w),Array.isArray(D)||(D=[A,D]));var V=Gfe(E,P9.defaultProps.minPointSize)(D[1],F);if(b==="horizontal"){var $,Y=[s.scale(D[0]),s.scale(D[1])],J=Y[0],W=Y[1];L=ND({axis:a,ticks:o,bandSize:i,offset:g.offset,entry:R,index:F}),q=($=W??J)!==null&&$!==void 0?$:void 0,I=g.size;var H=J-W;if(U=Number.isNaN(H)?0:H,k={x:L,y:s.y,width:I,height:s.height},Math.abs(V)>0&&Math.abs(U)<Math.abs(V)){var te=ui(U||V)*(Math.abs(V)-Math.abs(U));q-=te,U+=te}}else{var we=[a.scale(D[0]),a.scale(D[1])],Ae=we[0],ne=we[1];if(L=Ae,q=ND({axis:s,ticks:c,bandSize:i,offset:g.offset,entry:R,index:F}),I=ne-Ae,U=g.size,k={x:a.x,y:q,width:a.width,height:U},Math.abs(V)>0&&Math.abs(I)<Math.abs(V)){var de=ui(I||V)*(Math.abs(V)-Math.abs(I));I+=de}}return cr(cr(cr({},R),{},{x:L,y:q,width:I,height:U,value:l?D:D[1],payload:R,background:k},N&&N[F]&&N[F].props),{},{tooltipPayload:[Zz(n,R)],tooltipPosition:{x:L+I/2,y:q+U/2}})});return cr({data:P,layout:b},m)});function Op(t){"@babel/helpers - typeof";return Op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Op(t)}function nhe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sL(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j9(r.key),r)}}function rhe(t,e,n){return e&&sL(t.prototype,e),n&&sL(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function oL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function La(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?oL(Object(n),!0).forEach(function(r){lx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lx(t,e,n){return e=j9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j9(t){var e=ihe(t,"string");return Op(e)=="symbol"?e:e+""}function ihe(t,e){if(Op(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Op(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var nP=function(e,n,r,i,a){var s=e.width,o=e.height,c=e.layout,l=e.children,h=Object.keys(n),f={left:r.left,leftMirror:r.left,right:s-r.right,rightMirror:s-r.right,top:r.top,topMirror:r.top,bottom:o-r.bottom,bottomMirror:o-r.bottom},m=!!Vi(l,Ms);return h.reduce(function(g,b){var y=n[b],v=y.orientation,w=y.domain,_=y.padding,E=_===void 0?{}:_,M=y.mirror,T=y.reversed,A="".concat(v).concat(M?"Mirror":""),N,P,R,F,D;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var L=w[1]-w[0],q=1/0,I=y.categoricalDomain.sort();if(I.forEach(function(we,Ae){Ae>0&&(q=Math.min((we||0)-(I[Ae-1]||0),q))}),Number.isFinite(q)){var U=q/L,k=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(N=U*k/2),y.padding==="no-gap"){var V=di(e.barCategoryGap,U*k),$=U*k/2;N=$-V-($-V)/k*V}}}i==="xAxis"?P=[r.left+(E.left||0)+(N||0),r.left+r.width-(E.right||0)-(N||0)]:i==="yAxis"?P=c==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(N||0),r.top+r.height-(E.bottom||0)-(N||0)]:P=y.range,T&&(P=[P[1],P[0]]);var Y=qz(y,a,m),J=Y.scale,W=Y.realScaleType;J.domain(w).range(P),Xz(J);var H=Kz(J,La(La({},y),{},{realScaleType:W}));i==="xAxis"?(D=v==="top"&&!M||v==="bottom"&&M,R=r.left,F=f[A]-D*y.height):i==="yAxis"&&(D=v==="left"&&!M||v==="right"&&M,R=f[A]-D*y.width,F=r.top);var te=La(La(La({},y),H),{},{realScaleType:W,x:R,y:F,scale:J,width:i==="xAxis"?r.width:y.width,height:i==="yAxis"?r.height:y.height});return te.bandSize=jv(te,H),!y.hide&&i==="xAxis"?f[A]+=(D?-1:1)*te.height:y.hide||(f[A]+=(D?-1:1)*te.width),La(La({},g),{},lx({},b,te))},{})},O9=function(e,n){var r=e.x,i=e.y,a=n.x,s=n.y;return{x:Math.min(r,a),y:Math.min(i,s),width:Math.abs(a-r),height:Math.abs(s-i)}},ahe=function(e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2;return O9({x:n,y:r},{x:i,y:a})},I9=(function(){function t(e){nhe(this,t),this.scale=e}return rhe(t,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new t(n)}}])})();lx(I9,"EPS",1e-4);var rP=function(e){var n=Object.keys(e).reduce(function(r,i){return La(La({},r),{},lx({},i,I9.create(e[i])))},{});return La(La({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,o=a.position;return Ofe(i,function(c,l){return n[l].apply(c,{bandAware:s,position:o})})},isInRange:function(i){return N9(i,function(a,s){return n[s].isInRange(a)})}})};function she(t){return(t%180+180)%180}var ohe=function(e){var n=e.width,r=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=she(i),s=a*Math.PI/180,o=Math.atan(r/n),c=s>o&&s<Math.PI-o?r/Math.sin(s):n/Math.cos(s);return Math.abs(c)},f2,lL;function lhe(){if(lL)return f2;lL=1;var t=Rs(),e=nm(),n=Gy();function r(i){return function(a,s,o){var c=Object(a);if(!e(a)){var l=t(s,3);a=n(a),s=function(f){return l(c[f],f,c)}}var h=i(a,s,o);return h>-1?c[l?a[h]:h]:void 0}}return f2=r,f2}var h2,cL;function che(){if(cL)return h2;cL=1;var t=M9();function e(n){var r=t(n),i=r%1;return r===r?i?r-i:r:0}return h2=e,h2}var p2,uL;function uhe(){if(uL)return p2;uL=1;var t=T6(),e=Rs(),n=che(),r=Math.max;function i(a,s,o){var c=a==null?0:a.length;if(!c)return-1;var l=o==null?0:n(o);return l<0&&(l=r(c+l,0)),t(a,e(s,3),l)}return p2=i,p2}var m2,dL;function dhe(){if(dL)return m2;dL=1;var t=lhe(),e=uhe(),n=t(e);return m2=n,m2}var fhe=dhe();const hhe=Mn(fhe);var phe=zB();const mhe=Mn(phe);var ghe=mhe(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),iP=O.createContext(void 0),aP=O.createContext(void 0),D9=O.createContext(void 0),k9=O.createContext({}),L9=O.createContext(void 0),F9=O.createContext(0),U9=O.createContext(0),fL=function(e){var n=e.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,s=e.clipPathId,o=e.children,c=e.width,l=e.height,h=ghe(a);return K.createElement(iP.Provider,{value:r},K.createElement(aP.Provider,{value:i},K.createElement(k9.Provider,{value:a},K.createElement(D9.Provider,{value:h},K.createElement(L9.Provider,{value:s},K.createElement(F9.Provider,{value:l},K.createElement(U9.Provider,{value:c},o)))))))},vhe=function(){return O.useContext(L9)},B9=function(e){var n=O.useContext(iP);n==null&&Cc();var r=n[e];return r==null&&Cc(),r},yhe=function(){var e=O.useContext(iP);return il(e)},xhe=function(){var e=O.useContext(aP),n=hhe(e,function(r){return N9(r.domain,Number.isFinite)});return n||il(e)},z9=function(e){var n=O.useContext(aP);n==null&&Cc();var r=n[e];return r==null&&Cc(),r},bhe=function(){var e=O.useContext(D9);return e},whe=function(){return O.useContext(k9)},sP=function(){return O.useContext(U9)},oP=function(){return O.useContext(F9)};function Ed(t){"@babel/helpers - typeof";return Ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ed(t)}function _he(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function She(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,V9(r.key),r)}}function Mhe(t,e,n){return e&&She(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ehe(t,e,n){return e=Jv(e),The(t,$9()?Reflect.construct(e,n||[],Jv(t).constructor):e.apply(t,n))}function The(t,e){if(e&&(Ed(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ahe(t)}function Ahe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($9=function(){return!!t})()}function Jv(t){return Jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jv(t)}function Nhe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&QE(t,e)}function QE(t,e){return QE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},QE(t,e)}function hL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function pL(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hL(Object(n),!0).forEach(function(r){lP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lP(t,e,n){return e=V9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function V9(t){var e=Phe(t,"string");return Ed(e)=="symbol"?e:e+""}function Phe(t,e){if(Ed(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ed(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Che(t,e){return Ihe(t)||Ohe(t,e)||jhe(t,e)||Rhe()}function Rhe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jhe(t,e){if(t){if(typeof t=="string")return mL(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mL(t,e)}}function mL(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ohe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function Ihe(t){if(Array.isArray(t))return t}function eT(){return eT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},eT.apply(this,arguments)}var Dhe=function(e,n){var r;return K.isValidElement(e)?r=K.cloneElement(e,n):Dt(e)?r=e(n):r=K.createElement("line",eT({},n,{className:"recharts-reference-line-line"})),r},khe=function(e,n,r,i,a,s,o,c,l){var h=a.x,f=a.y,m=a.width,g=a.height;if(r){var b=l.y,y=e.y.apply(b,{position:s});if(vs(l,"discard")&&!e.y.isInRange(y))return null;var v=[{x:h+m,y},{x:h,y}];return c==="left"?v.reverse():v}if(n){var w=l.x,_=e.x.apply(w,{position:s});if(vs(l,"discard")&&!e.x.isInRange(_))return null;var E=[{x:_,y:f+g},{x:_,y:f}];return o==="top"?E.reverse():E}if(i){var M=l.segment,T=M.map(function(A){return e.apply(A,{position:s})});return vs(l,"discard")&&Pfe(T,function(A){return!e.isInRange(A)})?null:T}return null};function Lhe(t){var e=t.x,n=t.y,r=t.segment,i=t.xAxisId,a=t.yAxisId,s=t.shape,o=t.className,c=t.alwaysShow,l=vhe(),h=B9(i),f=z9(a),m=bhe();if(!l||!m)return null;$a(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=rP({x:h.scale,y:f.scale}),b=xr(e),y=xr(n),v=r&&r.length===2,w=khe(g,b,y,v,m,t.position,h.orientation,f.orientation,t);if(!w)return null;var _=Che(w,2),E=_[0],M=E.x,T=E.y,A=_[1],N=A.x,P=A.y,R=vs(t,"hidden")?"url(#".concat(l,")"):void 0,F=pL(pL({clipPath:R},Pt(t,!0)),{},{x1:M,y1:T,x2:N,y2:P});return K.createElement(an,{className:Yt("recharts-reference-line",o)},Dhe(s,F),Pr.renderCallByParent(t,ahe({x1:M,y1:T,x2:N,y2:P})))}var cP=(function(t){function e(){return _he(this,e),Ehe(this,e,arguments)}return Nhe(e,t),Mhe(e,[{key:"render",value:function(){return K.createElement(Lhe,this.props)}}])})(K.Component);lP(cP,"displayName","ReferenceLine");lP(cP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function tT(){return tT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},tT.apply(this,arguments)}function Td(t){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Td(t)}function gL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vL(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gL(Object(n),!0).forEach(function(r){cx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Fhe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uhe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,G9(r.key),r)}}function Bhe(t,e,n){return e&&Uhe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function zhe(t,e,n){return e=Qv(e),$he(t,H9()?Reflect.construct(e,n||[],Qv(t).constructor):e.apply(t,n))}function $he(t,e){if(e&&(Td(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vhe(t)}function Vhe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function H9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H9=function(){return!!t})()}function Qv(t){return Qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qv(t)}function Hhe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nT(t,e)}function nT(t,e){return nT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nT(t,e)}function cx(t,e,n){return e=G9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function G9(t){var e=Ghe(t,"string");return Td(e)=="symbol"?e:e+""}function Ghe(t,e){if(Td(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Td(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Whe=function(e){var n=e.x,r=e.y,i=e.xAxis,a=e.yAxis,s=rP({x:i.scale,y:a.scale}),o=s.apply({x:n,y:r},{bandAware:!0});return vs(e,"discard")&&!s.isInRange(o)?null:o},ux=(function(t){function e(){return Fhe(this,e),zhe(this,e,arguments)}return Hhe(e,t),Bhe(e,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,s=r.r,o=r.alwaysShow,c=r.clipPathId,l=xr(i),h=xr(a);if($a(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!h)return null;var f=Whe(this.props);if(!f)return null;var m=f.x,g=f.y,b=this.props,y=b.shape,v=b.className,w=vs(this.props,"hidden")?"url(#".concat(c,")"):void 0,_=vL(vL({clipPath:w},Pt(this.props,!0)),{},{cx:m,cy:g});return K.createElement(an,{className:Yt("recharts-reference-dot",v)},e.renderDot(y,_),Pr.renderCallByParent(this.props,{x:m-s,y:g-s,width:2*s,height:2*s}))}}])})(K.Component);cx(ux,"displayName","ReferenceDot");cx(ux,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});cx(ux,"renderDot",function(t,e){var n;return K.isValidElement(t)?n=K.cloneElement(t,e):Dt(t)?n=t(e):n=K.createElement(ef,tT({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),n});function rT(){return rT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},rT.apply(this,arguments)}function Ad(t){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ad(t)}function yL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xL(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yL(Object(n),!0).forEach(function(r){dx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function qhe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xhe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,q9(r.key),r)}}function Khe(t,e,n){return e&&Xhe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Yhe(t,e,n){return e=ey(e),Zhe(t,W9()?Reflect.construct(e,n||[],ey(t).constructor):e.apply(t,n))}function Zhe(t,e){if(e&&(Ad(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jhe(t)}function Jhe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W9=function(){return!!t})()}function ey(t){return ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ey(t)}function Qhe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iT(t,e)}function iT(t,e){return iT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iT(t,e)}function dx(t,e,n){return e=q9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q9(t){var e=epe(t,"string");return Ad(e)=="symbol"?e:e+""}function epe(t,e){if(Ad(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ad(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var tpe=function(e,n,r,i,a){var s=a.x1,o=a.x2,c=a.y1,l=a.y2,h=a.xAxis,f=a.yAxis;if(!h||!f)return null;var m=rP({x:h.scale,y:f.scale}),g={x:e?m.x.apply(s,{position:"start"}):m.x.rangeMin,y:r?m.y.apply(c,{position:"start"}):m.y.rangeMin},b={x:n?m.x.apply(o,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(l,{position:"end"}):m.y.rangeMax};return vs(a,"discard")&&(!m.isInRange(g)||!m.isInRange(b))?null:O9(g,b)},fx=(function(t){function e(){return qhe(this,e),Yhe(this,e,arguments)}return Qhe(e,t),Khe(e,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,s=r.y1,o=r.y2,c=r.className,l=r.alwaysShow,h=r.clipPathId;$a(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=xr(i),m=xr(a),g=xr(s),b=xr(o),y=this.props.shape;if(!f&&!m&&!g&&!b&&!y)return null;var v=tpe(f,m,g,b,this.props);if(!v&&!y)return null;var w=vs(this.props,"hidden")?"url(#".concat(h,")"):void 0;return K.createElement(an,{className:Yt("recharts-reference-area",c)},e.renderRect(y,xL(xL({clipPath:w},Pt(this.props,!0)),v)),Pr.renderCallByParent(this.props,v))}}])})(K.Component);dx(fx,"displayName","ReferenceArea");dx(fx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});dx(fx,"renderRect",function(t,e){var n;return K.isValidElement(t)?n=K.cloneElement(t,e):Dt(t)?n=t(e):n=K.createElement(tP,rT({},e,{className:"recharts-reference-area-rect"})),n});function X9(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function npe(t,e,n){var r={width:t.width+e.width,height:t.height+e.height};return ohe(r,n)}function rpe(t,e,n){var r=n==="width",i=t.x,a=t.y,s=t.width,o=t.height;return e===1?{start:r?i:a,end:r?i+s:a+o}:{start:r?i+s:a+o,end:r?i:a}}function ty(t,e,n,r,i){if(t*e<t*r||t*e>t*i)return!1;var a=n();return t*(e-t*a/2-r)>=0&&t*(e+t*a/2-i)<=0}function ipe(t,e){return X9(t,e+1)}function ape(t,e,n,r,i){for(var a=(r||[]).slice(),s=e.start,o=e.end,c=0,l=1,h=s,f=function(){var b=r==null?void 0:r[c];if(b===void 0)return{v:X9(r,l)};var y=c,v,w=function(){return v===void 0&&(v=n(b,y)),v},_=b.coordinate,E=c===0||ty(t,_,w,h,o);E||(c=0,h=s,l+=1),E&&(h=_+t*(w()/2+i),c+=l)},m;l<=a.length;)if(m=f(),m)return m.v;return[]}function Ip(t){"@babel/helpers - typeof";return Ip=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ip(t)}function bL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bL(Object(n),!0).forEach(function(r){spe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function spe(t,e,n){return e=ope(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ope(t){var e=lpe(t,"string");return Ip(e)=="symbol"?e:e+""}function lpe(t,e){if(Ip(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ip(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cpe(t,e,n,r,i){for(var a=(r||[]).slice(),s=a.length,o=e.start,c=e.end,l=function(m){var g=a[m],b,y=function(){return b===void 0&&(b=n(g,m)),b};if(m===s-1){var v=t*(g.coordinate+t*y()/2-c);a[m]=g=Kr(Kr({},g),{},{tickCoord:v>0?g.coordinate-v*t:g.coordinate})}else a[m]=g=Kr(Kr({},g),{},{tickCoord:g.coordinate});var w=ty(t,g.tickCoord,y,o,c);w&&(c=g.tickCoord-t*(y()/2+i),a[m]=Kr(Kr({},g),{},{isShow:!0}))},h=s-1;h>=0;h--)l(h);return a}function upe(t,e,n,r,i,a){var s=(r||[]).slice(),o=s.length,c=e.start,l=e.end;if(a){var h=r[o-1],f=n(h,o-1),m=t*(h.coordinate+t*f/2-l);s[o-1]=h=Kr(Kr({},h),{},{tickCoord:m>0?h.coordinate-m*t:h.coordinate});var g=ty(t,h.tickCoord,function(){return f},c,l);g&&(l=h.tickCoord-t*(f/2+i),s[o-1]=Kr(Kr({},h),{},{isShow:!0}))}for(var b=a?o-1:o,y=function(_){var E=s[_],M,T=function(){return M===void 0&&(M=n(E,_)),M};if(_===0){var A=t*(E.coordinate-t*T()/2-c);s[_]=E=Kr(Kr({},E),{},{tickCoord:A<0?E.coordinate-A*t:E.coordinate})}else s[_]=E=Kr(Kr({},E),{},{tickCoord:E.coordinate});var N=ty(t,E.tickCoord,T,c,l);N&&(c=E.tickCoord+t*(T()/2+i),s[_]=Kr(Kr({},E),{},{isShow:!0}))},v=0;v<b;v++)y(v);return s}function uP(t,e,n){var r=t.tick,i=t.ticks,a=t.viewBox,s=t.minTickGap,o=t.orientation,c=t.interval,l=t.tickFormatter,h=t.unit,f=t.angle;if(!i||!i.length||!r)return[];if(Je(c)||wo.isSsr)return ipe(i,typeof c=="number"&&Je(c)?c:0);var m=[],g=o==="top"||o==="bottom"?"width":"height",b=h&&g==="width"?Ih(h,{fontSize:e,letterSpacing:n}):{width:0,height:0},y=function(E,M){var T=Dt(l)?l(E.value,M):E.value;return g==="width"?npe(Ih(T,{fontSize:e,letterSpacing:n}),b,f):Ih(T,{fontSize:e,letterSpacing:n})[g]},v=i.length>=2?ui(i[1].coordinate-i[0].coordinate):1,w=rpe(a,v,g);return c==="equidistantPreserveStart"?ape(v,w,y,i,s):(c==="preserveStart"||c==="preserveStartEnd"?m=upe(v,w,y,i,s,c==="preserveStartEnd"):m=cpe(v,w,y,i,s),m.filter(function(_){return _.isShow}))}var dpe=["viewBox"],fpe=["viewBox"],hpe=["ticks"];function Nd(t){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nd(t)}function Gu(){return Gu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Gu.apply(this,arguments)}function wL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ri(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wL(Object(n),!0).forEach(function(r){dP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function g2(t,e){if(t==null)return{};var n=ppe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ppe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function mpe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Y9(r.key),r)}}function gpe(t,e,n){return e&&_L(t.prototype,e),n&&_L(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function vpe(t,e,n){return e=ny(e),ype(t,K9()?Reflect.construct(e,n||[],ny(t).constructor):e.apply(t,n))}function ype(t,e){if(e&&(Nd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xpe(t)}function xpe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function K9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K9=function(){return!!t})()}function ny(t){return ny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ny(t)}function bpe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&aT(t,e)}function aT(t,e){return aT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},aT(t,e)}function dP(t,e,n){return e=Y9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y9(t){var e=wpe(t,"string");return Nd(e)=="symbol"?e:e+""}function wpe(t,e){if(Nd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var rf=(function(t){function e(n){var r;return mpe(this,e),r=vpe(this,e,[n]),r.state={fontSize:"",letterSpacing:""},r}return bpe(e,t),gpe(e,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,s=g2(r,dpe),o=this.props,c=o.viewBox,l=g2(o,fpe);return!Qu(a,c)||!Qu(s,l)||!Qu(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,s=i.y,o=i.width,c=i.height,l=i.orientation,h=i.tickSize,f=i.mirror,m=i.tickMargin,g,b,y,v,w,_,E=f?-1:1,M=r.tickSize||h,T=Je(r.tickCoord)?r.tickCoord:r.coordinate;switch(l){case"top":g=b=r.coordinate,v=s+ +!f*c,y=v-E*M,_=y-E*m,w=T;break;case"left":y=v=r.coordinate,b=a+ +!f*o,g=b-E*M,w=g-E*m,_=T;break;case"right":y=v=r.coordinate,b=a+ +f*o,g=b+E*M,w=g+E*m,_=T;break;default:g=b=r.coordinate,v=s+ +f*c,y=v+E*M,_=y+E*m,w=T;break}return{line:{x1:g,y1:y,x2:b,y2:v},tick:{x:w,y:_}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,s=r.width,o=r.height,c=r.orientation,l=r.mirror,h=r.axisLine,f=ri(ri(ri({},Pt(this.props,!1)),Pt(h,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var m=+(c==="top"&&!l||c==="bottom"&&l);f=ri(ri({},f),{},{x1:i,y1:a+m*o,x2:i+s,y2:a+m*o})}else{var g=+(c==="left"&&!l||c==="right"&&l);f=ri(ri({},f),{},{x1:i+g*s,y1:a,x2:i+g*s,y2:a+o})}return K.createElement("line",Gu({},f,{className:Yt("recharts-cartesian-axis-line",Xi(h,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var s=this,o=this.props,c=o.tickLine,l=o.stroke,h=o.tick,f=o.tickFormatter,m=o.unit,g=uP(ri(ri({},this.props),{},{ticks:r}),i,a),b=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=Pt(this.props,!1),w=Pt(h,!1),_=ri(ri({},v),{},{fill:"none"},Pt(c,!1)),E=g.map(function(M,T){var A=s.getTickLineCoord(M),N=A.line,P=A.tick,R=ri(ri(ri(ri({textAnchor:b,verticalAnchor:y},v),{},{stroke:"none",fill:l},w),P),{},{index:T,payload:M,visibleTicksCount:g.length,tickFormatter:f});return K.createElement(an,Gu({className:"recharts-cartesian-axis-tick",key:"tick-".concat(M.value,"-").concat(M.coordinate,"-").concat(M.tickCoord)},Tc(s.props,M,T)),c&&K.createElement("line",Gu({},_,N,{className:Yt("recharts-cartesian-axis-tick-line",Xi(c,"className"))})),h&&e.renderTickItem(h,R,"".concat(Dt(f)?f(M.value,T):M.value).concat(m||"")))});return K.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,s=i.width,o=i.height,c=i.ticksGenerator,l=i.className,h=i.hide;if(h)return null;var f=this.props,m=f.ticks,g=g2(f,hpe),b=m;return Dt(c)&&(b=m&&m.length>0?c(this.props):c(g)),s<=0||o<=0||!b||!b.length?null:K.createElement(an,{className:Yt("recharts-cartesian-axis",l),ref:function(v){r.layerReference=v}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Pr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var s;return K.isValidElement(r)?s=K.cloneElement(r,i):Dt(r)?s=r(i):s=K.createElement(Ac,Gu({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})(O.Component);dP(rf,"displayName","CartesianAxis");dP(rf,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var _pe=["x1","y1","x2","y2","key"],Spe=["offset"];function Rc(t){"@babel/helpers - typeof";return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rc(t)}function SL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?SL(Object(n),!0).forEach(function(r){Mpe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):SL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Mpe(t,e,n){return e=Epe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Epe(t){var e=Tpe(t,"string");return Rc(e)=="symbol"?e:e+""}function Tpe(t,e){if(Rc(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dc(){return dc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dc.apply(this,arguments)}function ML(t,e){if(t==null)return{};var n=Ape(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ape(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var Npe=function(e){var n=e.fill;if(!n||n==="none")return null;var r=e.fillOpacity,i=e.x,a=e.y,s=e.width,o=e.height,c=e.ry;return K.createElement("rect",{x:i,y:a,ry:c,width:s,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Z9(t,e){var n;if(K.isValidElement(t))n=K.cloneElement(t,e);else if(Dt(t))n=t(e);else{var r=e.x1,i=e.y1,a=e.x2,s=e.y2,o=e.key,c=ML(e,_pe),l=Pt(c,!1);l.offset;var h=ML(l,Spe);n=K.createElement("line",dc({},h,{x1:r,y1:i,x2:a,y2:s,fill:"none",key:o}))}return n}function Ppe(t){var e=t.x,n=t.width,r=t.horizontal,i=r===void 0?!0:r,a=t.horizontalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(o,c){var l=Zr(Zr({},t),{},{x1:e,y1:o,x2:e+n,y2:o,key:"line-".concat(c),index:c});return Z9(i,l)});return K.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Cpe(t){var e=t.y,n=t.height,r=t.vertical,i=r===void 0?!0:r,a=t.verticalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(o,c){var l=Zr(Zr({},t),{},{x1:o,y1:e,x2:o,y2:e+n,key:"line-".concat(c),index:c});return Z9(i,l)});return K.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function Rpe(t){var e=t.horizontalFill,n=t.fillOpacity,r=t.x,i=t.y,a=t.width,s=t.height,o=t.horizontalPoints,c=t.horizontal,l=c===void 0?!0:c;if(!l||!e||!e.length)return null;var h=o.map(function(m){return Math.round(m+i-i)}).sort(function(m,g){return m-g});i!==h[0]&&h.unshift(0);var f=h.map(function(m,g){var b=!h[g+1],y=b?i+s-m:h[g+1]-m;if(y<=0)return null;var v=g%e.length;return K.createElement("rect",{key:"react-".concat(g),y:m,x:r,height:y,width:a,stroke:"none",fill:e[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return K.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function jpe(t){var e=t.vertical,n=e===void 0?!0:e,r=t.verticalFill,i=t.fillOpacity,a=t.x,s=t.y,o=t.width,c=t.height,l=t.verticalPoints;if(!n||!r||!r.length)return null;var h=l.map(function(m){return Math.round(m+a-a)}).sort(function(m,g){return m-g});a!==h[0]&&h.unshift(0);var f=h.map(function(m,g){var b=!h[g+1],y=b?a+o-m:h[g+1]-m;if(y<=0)return null;var v=g%r.length;return K.createElement("rect",{key:"react-".concat(g),x:m,y:s,width:y,height:c,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return K.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var Ope=function(e,n){var r=e.xAxis,i=e.width,a=e.height,s=e.offset;return Wz(uP(Zr(Zr(Zr({},rf.defaultProps),r),{},{ticks:io(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.left,s.left+s.width,n)},Ipe=function(e,n){var r=e.yAxis,i=e.width,a=e.height,s=e.offset;return Wz(uP(Zr(Zr(Zr({},rf.defaultProps),r),{},{ticks:io(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.top,s.top+s.height,n)},mu={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Yi(t){var e,n,r,i,a,s,o=sP(),c=oP(),l=whe(),h=Zr(Zr({},t),{},{stroke:(e=t.stroke)!==null&&e!==void 0?e:mu.stroke,fill:(n=t.fill)!==null&&n!==void 0?n:mu.fill,horizontal:(r=t.horizontal)!==null&&r!==void 0?r:mu.horizontal,horizontalFill:(i=t.horizontalFill)!==null&&i!==void 0?i:mu.horizontalFill,vertical:(a=t.vertical)!==null&&a!==void 0?a:mu.vertical,verticalFill:(s=t.verticalFill)!==null&&s!==void 0?s:mu.verticalFill,x:Je(t.x)?t.x:l.left,y:Je(t.y)?t.y:l.top,width:Je(t.width)?t.width:l.width,height:Je(t.height)?t.height:l.height}),f=h.x,m=h.y,g=h.width,b=h.height,y=h.syncWithTicks,v=h.horizontalValues,w=h.verticalValues,_=yhe(),E=xhe();if(!Je(g)||g<=0||!Je(b)||b<=0||!Je(f)||f!==+f||!Je(m)||m!==+m)return null;var M=h.verticalCoordinatesGenerator||Ope,T=h.horizontalCoordinatesGenerator||Ipe,A=h.horizontalPoints,N=h.verticalPoints;if((!A||!A.length)&&Dt(T)){var P=v&&v.length,R=T({yAxis:E?Zr(Zr({},E),{},{ticks:P?v:E.ticks}):void 0,width:o,height:c,offset:l},P?!0:y);$a(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rc(R),"]")),Array.isArray(R)&&(A=R)}if((!N||!N.length)&&Dt(M)){var F=w&&w.length,D=M({xAxis:_?Zr(Zr({},_),{},{ticks:F?w:_.ticks}):void 0,width:o,height:c,offset:l},F?!0:y);$a(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rc(D),"]")),Array.isArray(D)&&(N=D)}return K.createElement("g",{className:"recharts-cartesian-grid"},K.createElement(Npe,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),K.createElement(Ppe,dc({},h,{offset:l,horizontalPoints:A,xAxis:_,yAxis:E})),K.createElement(Cpe,dc({},h,{offset:l,verticalPoints:N,xAxis:_,yAxis:E})),K.createElement(Rpe,dc({},h,{horizontalPoints:A})),K.createElement(jpe,dc({},h,{verticalPoints:N})))}Yi.displayName="CartesianGrid";var Dpe=["type","layout","connectNulls","ref"],kpe=["key"];function Pd(t){"@babel/helpers - typeof";return Pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pd(t)}function EL(t,e){if(t==null)return{};var n=Lpe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Lpe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Bh(){return Bh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Bh.apply(this,arguments)}function TL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TL(Object(n),!0).forEach(function(r){Fa(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function gu(t){return zpe(t)||Bpe(t)||Upe(t)||Fpe()}function Fpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Upe(t,e){if(t){if(typeof t=="string")return sT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sT(t,e)}}function Bpe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function zpe(t){if(Array.isArray(t))return sT(t)}function sT(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $pe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AL(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Q9(r.key),r)}}function Vpe(t,e,n){return e&&AL(t.prototype,e),n&&AL(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hpe(t,e,n){return e=ry(e),Gpe(t,J9()?Reflect.construct(e,n||[],ry(t).constructor):e.apply(t,n))}function Gpe(t,e){if(e&&(Pd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wpe(t)}function Wpe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function J9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J9=function(){return!!t})()}function ry(t){return ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ry(t)}function qpe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oT(t,e)}function oT(t,e){return oT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oT(t,e)}function Fa(t,e,n){return e=Q9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q9(t){var e=Xpe(t,"string");return Pd(e)=="symbol"?e:e+""}function Xpe(t,e){if(Pd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Pd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var gi=(function(t){function e(){var n;$pe(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Hpe(this,e,[].concat(i)),Fa(n,"state",{isAnimationFinished:!0,totalLength:0}),Fa(n,"generateSimpleStrokeDasharray",function(s,o){return"".concat(o,"px ").concat(s-o,"px")}),Fa(n,"getStrokeDasharray",function(s,o,c){var l=c.reduce(function(w,_){return w+_});if(!l)return n.generateSimpleStrokeDasharray(o,s);for(var h=Math.floor(s/l),f=s%l,m=o-s,g=[],b=0,y=0;b<c.length;y+=c[b],++b)if(y+c[b]>f){g=[].concat(gu(c.slice(0,b)),[f-y]);break}var v=g.length%2===0?[0,m]:[m];return[].concat(gu(e.repeat(c,h)),gu(g),v).map(function(w){return"".concat(w,"px")}).join(", ")}),Fa(n,"id",Bc("recharts-line-")),Fa(n,"pathRef",function(s){n.mainCurve=s}),Fa(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Fa(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return qpe(e,t),Vpe(e,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.points,o=a.xAxis,c=a.yAxis,l=a.layout,h=a.children,f=Ki(h,lm);if(!f)return null;var m=function(y,v){return{x:y.x,y:y.y,value:y.value,errorVal:Yn(y.payload,v)}},g={clipPath:r?"url(#clipPath-".concat(i,")"):null};return K.createElement(an,g,f.map(function(b){return K.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:s,xAxis:o,yAxis:c,layout:l,dataPointFormatter:m})}))}},{key:"renderDots",value:function(r,i,a){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var o=this.props,c=o.dot,l=o.points,h=o.dataKey,f=Pt(this.props,!1),m=Pt(c,!0),g=l.map(function(y,v){var w=zi(zi(zi({key:"dot-".concat(v),r:3},f),m),{},{index:v,cx:y.x,cy:y.y,value:y.value,dataKey:h,payload:y.payload,points:l});return e.renderDotItem(c,w)}),b={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return K.createElement(an,Bh({className:"recharts-line-dots",key:"dots"},b),g)}},{key:"renderCurveStatically",value:function(r,i,a,s){var o=this.props,c=o.type,l=o.layout,h=o.connectNulls;o.ref;var f=EL(o,Dpe),m=zi(zi(zi({},Pt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:r},s),{},{type:c,layout:l,connectNulls:h});return K.createElement(xc,Bh({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var a=this,s=this.props,o=s.points,c=s.strokeDasharray,l=s.isAnimationActive,h=s.animationBegin,f=s.animationDuration,m=s.animationEasing,g=s.animationId,b=s.animateNewValues,y=s.width,v=s.height,w=this.state,_=w.prevPoints,E=w.totalLength;return K.createElement(ba,{begin:h,duration:f,isActive:l,easing:m,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(M){var T=M.t;if(_){var A=_.length/o.length,N=o.map(function(L,q){var I=Math.floor(q*A);if(_[I]){var U=_[I],k=Kn(U.x,L.x),V=Kn(U.y,L.y);return zi(zi({},L),{},{x:k(T),y:V(T)})}if(b){var $=Kn(y*2,L.x),Y=Kn(v/2,L.y);return zi(zi({},L),{},{x:$(T),y:Y(T)})}return zi(zi({},L),{},{x:L.x,y:L.y})});return a.renderCurveStatically(N,r,i)}var P=Kn(0,E),R=P(T),F;if(c){var D="".concat(c).split(/[,\s]+/gim).map(function(L){return parseFloat(L)});F=a.getStrokeDasharray(R,E,D)}else F=a.generateSimpleStrokeDasharray(E,R);return a.renderCurveStatically(o,r,i,{strokeDasharray:F})})}},{key:"renderCurve",value:function(r,i){var a=this.props,s=a.points,o=a.isAnimationActive,c=this.state,l=c.prevPoints,h=c.totalLength;return o&&s&&s.length&&(!l&&h>0||!yl(l,s))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,s=i.dot,o=i.points,c=i.className,l=i.xAxis,h=i.yAxis,f=i.top,m=i.left,g=i.width,b=i.height,y=i.isAnimationActive,v=i.id;if(a||!o||!o.length)return null;var w=this.state.isAnimationFinished,_=o.length===1,E=Yt("recharts-line",c),M=l&&l.allowDataOverflow,T=h&&h.allowDataOverflow,A=M||T,N=Kt(v)?this.id:v,P=(r=Pt(s,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},R=P.r,F=R===void 0?3:R,D=P.strokeWidth,L=D===void 0?2:D,q=WB(s)?s:{},I=q.clipDot,U=I===void 0?!0:I,k=F*2+L;return K.createElement(an,{className:E},M||T?K.createElement("defs",null,K.createElement("clipPath",{id:"clipPath-".concat(N)},K.createElement("rect",{x:M?m:m-g/2,y:T?f:f-b/2,width:M?g:g*2,height:T?b:b*2})),!U&&K.createElement("clipPath",{id:"clipPath-dots-".concat(N)},K.createElement("rect",{x:m-k/2,y:f-k/2,width:g+k,height:b+k}))):null,!_&&this.renderCurve(A,N),this.renderErrorBar(A,N),(_||s)&&this.renderDots(A,U,N),(!y||w)&&Va.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var a=r.length%2!==0?[].concat(gu(r),[0]):r,s=[],o=0;o<i;++o)s=[].concat(gu(s),gu(a));return s}},{key:"renderDotItem",value:function(r,i){var a;if(K.isValidElement(r))a=K.cloneElement(r,i);else if(Dt(r))a=r(i);else{var s=i.key,o=EL(i,kpe),c=Yt("recharts-line-dot",typeof r!="boolean"?r.className:"");a=K.createElement(ef,Bh({key:s},o,{className:c}))}return a}}])})(O.PureComponent);Fa(gi,"displayName","Line");Fa(gi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!wo.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Fa(gi,"getComposedData",function(t){var e=t.props,n=t.xAxis,r=t.yAxis,i=t.xAxisTicks,a=t.yAxisTicks,s=t.dataKey,o=t.bandSize,c=t.displayedData,l=t.offset,h=e.layout,f=c.map(function(m,g){var b=Yn(m,s);return h==="horizontal"?{x:Rv({axis:n,ticks:i,bandSize:o,entry:m,index:g}),y:Kt(b)?null:r.scale(b),value:b,payload:m}:{x:Kt(b)?null:n.scale(b),y:Rv({axis:r,ticks:a,bandSize:o,entry:m,index:g}),value:b,payload:m}});return zi({points:f,layout:h},l)});var Kpe=["layout","type","stroke","connectNulls","isRange","ref"],Ype=["key"],e$;function Cd(t){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cd(t)}function t$(t,e){if(t==null)return{};var n=Zpe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Zpe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function fc(){return fc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fc.apply(this,arguments)}function NL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?NL(Object(n),!0).forEach(function(r){us(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Jpe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PL(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r$(r.key),r)}}function Qpe(t,e,n){return e&&PL(t.prototype,e),n&&PL(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function eme(t,e,n){return e=iy(e),tme(t,n$()?Reflect.construct(e,n||[],iy(t).constructor):e.apply(t,n))}function tme(t,e){if(e&&(Cd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nme(t)}function nme(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n$=function(){return!!t})()}function iy(t){return iy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iy(t)}function rme(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lT(t,e)}function lT(t,e){return lT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lT(t,e)}function us(t,e,n){return e=r$(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r$(t){var e=ime(t,"string");return Cd(e)=="symbol"?e:e+""}function ime(t,e){if(Cd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var wa=(function(t){function e(){var n;Jpe(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=eme(this,e,[].concat(i)),us(n,"state",{isAnimationFinished:!0}),us(n,"id",Bc("recharts-area-")),us(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Dt(s)&&s()}),us(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Dt(s)&&s()}),n}return rme(e,t),Qpe(e,[{key:"renderDots",value:function(r,i,a){var s=this.props.isAnimationActive,o=this.state.isAnimationFinished;if(s&&!o)return null;var c=this.props,l=c.dot,h=c.points,f=c.dataKey,m=Pt(this.props,!1),g=Pt(l,!0),b=h.map(function(v,w){var _=Zo(Zo(Zo({key:"dot-".concat(w),r:3},m),g),{},{index:w,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:h});return e.renderDotItem(l,_)}),y={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return K.createElement(an,fc({className:"recharts-area-dots"},y),b)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,a=i.baseLine,s=i.points,o=i.strokeWidth,c=s[0].x,l=s[s.length-1].x,h=r*Math.abs(c-l),f=ol(s.map(function(m){return m.y||0}));return Je(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(ol(a.map(function(m){return m.y||0})),f)),Je(f)?K.createElement("rect",{x:c<l?c:c-h,y:0,width:h,height:Math.floor(f+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,a=i.baseLine,s=i.points,o=i.strokeWidth,c=s[0].y,l=s[s.length-1].y,h=r*Math.abs(c-l),f=ol(s.map(function(m){return m.x||0}));return Je(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(ol(a.map(function(m){return m.x||0})),f)),Je(f)?K.createElement("rect",{x:0,y:c<l?c:c-h,width:f+(o?parseInt("".concat(o),10):1),height:Math.floor(h)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,a,s){var o=this.props,c=o.layout,l=o.type,h=o.stroke,f=o.connectNulls,m=o.isRange;o.ref;var g=t$(o,Kpe);return K.createElement(an,{clipPath:a?"url(#clipPath-".concat(s,")"):null},K.createElement(xc,fc({},Pt(g,!0),{points:r,connectNulls:f,type:l,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),h!=="none"&&K.createElement(xc,fc({},Pt(this.props,!1),{className:"recharts-area-curve",layout:c,type:l,connectNulls:f,fill:"none",points:r})),h!=="none"&&m&&K.createElement(xc,fc({},Pt(this.props,!1),{className:"recharts-area-curve",layout:c,type:l,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var a=this,s=this.props,o=s.points,c=s.baseLine,l=s.isAnimationActive,h=s.animationBegin,f=s.animationDuration,m=s.animationEasing,g=s.animationId,b=this.state,y=b.prevPoints,v=b.prevBaseLine;return K.createElement(ba,{begin:h,duration:f,isActive:l,easing:m,from:{t:0},to:{t:1},key:"area-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var _=w.t;if(y){var E=y.length/o.length,M=o.map(function(P,R){var F=Math.floor(R*E);if(y[F]){var D=y[F],L=Kn(D.x,P.x),q=Kn(D.y,P.y);return Zo(Zo({},P),{},{x:L(_),y:q(_)})}return P}),T;if(Je(c)&&typeof c=="number"){var A=Kn(v,c);T=A(_)}else if(Kt(c)||Kd(c)){var N=Kn(v,0);T=N(_)}else T=c.map(function(P,R){var F=Math.floor(R*E);if(v[F]){var D=v[F],L=Kn(D.x,P.x),q=Kn(D.y,P.y);return Zo(Zo({},P),{},{x:L(_),y:q(_)})}return P});return a.renderAreaStatically(M,T,r,i)}return K.createElement(an,null,K.createElement("defs",null,K.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(_))),K.createElement(an,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(o,c,r,i)))})}},{key:"renderArea",value:function(r,i){var a=this.props,s=a.points,o=a.baseLine,c=a.isAnimationActive,l=this.state,h=l.prevPoints,f=l.prevBaseLine,m=l.totalLength;return c&&s&&s.length&&(!h&&m>0||!yl(h,s)||!yl(f,o))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(s,o,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,s=i.dot,o=i.points,c=i.className,l=i.top,h=i.left,f=i.xAxis,m=i.yAxis,g=i.width,b=i.height,y=i.isAnimationActive,v=i.id;if(a||!o||!o.length)return null;var w=this.state.isAnimationFinished,_=o.length===1,E=Yt("recharts-area",c),M=f&&f.allowDataOverflow,T=m&&m.allowDataOverflow,A=M||T,N=Kt(v)?this.id:v,P=(r=Pt(s,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},R=P.r,F=R===void 0?3:R,D=P.strokeWidth,L=D===void 0?2:D,q=WB(s)?s:{},I=q.clipDot,U=I===void 0?!0:I,k=F*2+L;return K.createElement(an,{className:E},M||T?K.createElement("defs",null,K.createElement("clipPath",{id:"clipPath-".concat(N)},K.createElement("rect",{x:M?h:h-g/2,y:T?l:l-b/2,width:M?g:g*2,height:T?b:b*2})),!U&&K.createElement("clipPath",{id:"clipPath-dots-".concat(N)},K.createElement("rect",{x:h-k/2,y:l-k/2,width:g+k,height:b+k}))):null,_?null:this.renderArea(A,N),(s||_)&&this.renderDots(A,U,N),(!y||w)&&Va.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(O.PureComponent);e$=wa;us(wa,"displayName","Area");us(wa,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!wo.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});us(wa,"getBaseValue",function(t,e,n,r){var i=t.layout,a=t.baseValue,s=e.props.baseValue,o=s??a;if(Je(o)&&typeof o=="number")return o;var c=i==="horizontal"?r:n,l=c.scale.domain();if(c.type==="number"){var h=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return o==="dataMin"?f:o==="dataMax"||h<0?h:Math.max(Math.min(l[0],l[1]),0)}return o==="dataMin"?l[0]:o==="dataMax"?l[1]:l[0]});us(wa,"getComposedData",function(t){var e=t.props,n=t.item,r=t.xAxis,i=t.yAxis,a=t.xAxisTicks,s=t.yAxisTicks,o=t.bandSize,c=t.dataKey,l=t.stackedData,h=t.dataStartIndex,f=t.displayedData,m=t.offset,g=e.layout,b=l&&l.length,y=e$.getBaseValue(e,n,r,i),v=g==="horizontal",w=!1,_=f.map(function(M,T){var A;b?A=l[h+T]:(A=Yn(M,c),Array.isArray(A)?w=!0:A=[y,A]);var N=A[1]==null||b&&Yn(M,c)==null;return v?{x:Rv({axis:r,ticks:a,bandSize:o,entry:M,index:T}),y:N?null:i.scale(A[1]),value:A,payload:M}:{x:N?null:r.scale(A[1]),y:Rv({axis:i,ticks:s,bandSize:o,entry:M,index:T}),value:A,payload:M}}),E;return b||w?E=_.map(function(M){var T=Array.isArray(M.value)?M.value[0]:null;return v?{x:M.x,y:T!=null&&M.y!=null?i.scale(T):null}:{x:T!=null?r.scale(T):null,y:M.y}}):E=v?i.scale(y):r.scale(y),Zo({points:_,baseLine:E,layout:g,isRange:w},m)});us(wa,"renderDotItem",function(t,e){var n;if(K.isValidElement(t))n=K.cloneElement(t,e);else if(Dt(t))n=t(e);else{var r=Yt("recharts-area-dot",typeof t!="boolean"?t.className:""),i=e.key,a=t$(e,Ype);n=K.createElement(ef,fc({},a,{key:i,className:r}))}return n});function Rd(t){"@babel/helpers - typeof";return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rd(t)}function ame(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sme(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s$(r.key),r)}}function ome(t,e,n){return e&&sme(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function lme(t,e,n){return e=ay(e),cme(t,i$()?Reflect.construct(e,n||[],ay(t).constructor):e.apply(t,n))}function cme(t,e){if(e&&(Rd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ume(t)}function ume(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i$=function(){return!!t})()}function ay(t){return ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ay(t)}function dme(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cT(t,e)}function cT(t,e){return cT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cT(t,e)}function a$(t,e,n){return e=s$(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s$(t){var e=fme(t,"string");return Rd(e)=="symbol"?e:e+""}function fme(t,e){if(Rd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Rd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function uT(){return uT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},uT.apply(this,arguments)}function hme(t){var e=t.xAxisId,n=sP(),r=oP(),i=B9(e);return i==null?null:K.createElement(rf,uT({},i,{className:Yt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(s){return io(s,!0)}}))}var Ur=(function(t){function e(){return ame(this,e),lme(this,e,arguments)}return dme(e,t),ome(e,[{key:"render",value:function(){return K.createElement(hme,this.props)}}])})(K.Component);a$(Ur,"displayName","XAxis");a$(Ur,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function jd(t){"@babel/helpers - typeof";return jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jd(t)}function pme(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mme(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c$(r.key),r)}}function gme(t,e,n){return e&&mme(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function vme(t,e,n){return e=sy(e),yme(t,o$()?Reflect.construct(e,n||[],sy(t).constructor):e.apply(t,n))}function yme(t,e){if(e&&(jd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xme(t)}function xme(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o$=function(){return!!t})()}function sy(t){return sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sy(t)}function bme(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dT(t,e)}function dT(t,e){return dT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dT(t,e)}function l$(t,e,n){return e=c$(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c$(t){var e=wme(t,"string");return jd(e)=="symbol"?e:e+""}function wme(t,e){if(jd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(jd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function fT(){return fT=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fT.apply(this,arguments)}var _me=function(e){var n=e.yAxisId,r=sP(),i=oP(),a=z9(n);return a==null?null:K.createElement(rf,fT({},a,{className:Yt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(o){return io(o,!0)}}))},Br=(function(t){function e(){return pme(this,e),vme(this,e,arguments)}return bme(e,t),gme(e,[{key:"render",value:function(){return K.createElement(_me,this.props)}}])})(K.Component);l$(Br,"displayName","YAxis");l$(Br,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function CL(t){return Tme(t)||Eme(t)||Mme(t)||Sme()}function Sme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mme(t,e){if(t){if(typeof t=="string")return hT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hT(t,e)}}function Eme(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Tme(t){if(Array.isArray(t))return hT(t)}function hT(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var pT=function(e,n,r,i,a){var s=Ki(e,cP),o=Ki(e,ux),c=[].concat(CL(s),CL(o)),l=Ki(e,fx),h="".concat(i,"Id"),f=i[0],m=n;if(c.length&&(m=c.reduce(function(y,v){if(v.props[h]===r&&vs(v.props,"extendDomain")&&Je(v.props[f])){var w=v.props[f];return[Math.min(y[0],w),Math.max(y[1],w)]}return y},m)),l.length){var g="".concat(f,"1"),b="".concat(f,"2");m=l.reduce(function(y,v){if(v.props[h]===r&&vs(v.props,"extendDomain")&&Je(v.props[g])&&Je(v.props[b])){var w=v.props[g],_=v.props[b];return[Math.min(y[0],w,_),Math.max(y[1],w,_)]}return y},m)}return a&&a.length&&(m=a.reduce(function(y,v){return Je(v)?[Math.min(y[0],v),Math.max(y[1],v)]:y},m)),m},v2={exports:{}},RL;function Ame(){return RL||(RL=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,l,h){this.fn=c,this.context=l,this.once=h||!1}function a(c,l,h,f,m){if(typeof h!="function")throw new TypeError("The listener must be a function");var g=new i(h,f||c,m),b=n?n+l:l;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],g]:c._events[b].push(g):(c._events[b]=g,c._eventsCount++),c}function s(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],h,f;if(this._eventsCount===0)return l;for(f in h=this._events)e.call(h,f)&&l.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(h)):l},o.prototype.listeners=function(l){var h=n?n+l:l,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,g=f.length,b=new Array(g);m<g;m++)b[m]=f[m].fn;return b},o.prototype.listenerCount=function(l){var h=n?n+l:l,f=this._events[h];return f?f.fn?1:f.length:0},o.prototype.emit=function(l,h,f,m,g,b){var y=n?n+l:l;if(!this._events[y])return!1;var v=this._events[y],w=arguments.length,_,E;if(v.fn){switch(v.once&&this.removeListener(l,v.fn,void 0,!0),w){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,h),!0;case 3:return v.fn.call(v.context,h,f),!0;case 4:return v.fn.call(v.context,h,f,m),!0;case 5:return v.fn.call(v.context,h,f,m,g),!0;case 6:return v.fn.call(v.context,h,f,m,g,b),!0}for(E=1,_=new Array(w-1);E<w;E++)_[E-1]=arguments[E];v.fn.apply(v.context,_)}else{var M=v.length,T;for(E=0;E<M;E++)switch(v[E].once&&this.removeListener(l,v[E].fn,void 0,!0),w){case 1:v[E].fn.call(v[E].context);break;case 2:v[E].fn.call(v[E].context,h);break;case 3:v[E].fn.call(v[E].context,h,f);break;case 4:v[E].fn.call(v[E].context,h,f,m);break;default:if(!_)for(T=1,_=new Array(w-1);T<w;T++)_[T-1]=arguments[T];v[E].fn.apply(v[E].context,_)}}return!0},o.prototype.on=function(l,h,f){return a(this,l,h,f,!1)},o.prototype.once=function(l,h,f){return a(this,l,h,f,!0)},o.prototype.removeListener=function(l,h,f,m){var g=n?n+l:l;if(!this._events[g])return this;if(!h)return s(this,g),this;var b=this._events[g];if(b.fn)b.fn===h&&(!m||b.once)&&(!f||b.context===f)&&s(this,g);else{for(var y=0,v=[],w=b.length;y<w;y++)(b[y].fn!==h||m&&!b[y].once||f&&b[y].context!==f)&&v.push(b[y]);v.length?this._events[g]=v.length===1?v[0]:v:s(this,g)}return this},o.prototype.removeAllListeners=function(l){var h;return l?(h=n?n+l:l,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,t.exports=o})(v2)),v2.exports}var Nme=Ame();const Pme=Mn(Nme);var y2=new Pme,x2="recharts.syncMouseEvents";function Dp(t){"@babel/helpers - typeof";return Dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dp(t)}function Cme(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rme(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u$(r.key),r)}}function jme(t,e,n){return e&&Rme(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function b2(t,e,n){return e=u$(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u$(t){var e=Ome(t,"string");return Dp(e)=="symbol"?e:e+""}function Ome(t,e){if(Dp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Dp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Ime=(function(){function t(){Cme(this,t),b2(this,"activeIndex",0),b2(this,"coordinateList",[]),b2(this,"layout","horizontal")}return jme(t,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,s=n.container,o=s===void 0?null:s,c=n.layout,l=c===void 0?null:c,h=n.offset,f=h===void 0?null:h,m=n.mouseHandlerCallback,g=m===void 0?null:m;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=o??this.container,this.layout=l??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=g??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,o=i.height,c=this.coordinateList[this.activeIndex].coordinate,l=((n=window)===null||n===void 0?void 0:n.scrollX)||0,h=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=a+c+l,m=s+this.offset.top+o/2+h;this.mouseHandlerCallback({pageX:f,pageY:m})}}}])})();function Dme(t,e,n){if(n==="number"&&e===!0&&Array.isArray(t)){var r=t==null?void 0:t[0],i=t==null?void 0:t[1];if(r&&i&&Je(r)&&Je(i))return!0}return!1}function kme(t,e,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:n.left+.5,y:t==="horizontal"?n.top+.5:e.y-i,width:t==="horizontal"?r:n.width-1,height:t==="horizontal"?n.height-1:r}}function d$(t){var e=t.cx,n=t.cy,r=t.radius,i=t.startAngle,a=t.endAngle,s=Sn(e,n,r,i),o=Sn(e,n,r,a);return{points:[s,o],cx:e,cy:n,radius:r,startAngle:i,endAngle:a}}function Lme(t,e,n){var r,i,a,s;if(t==="horizontal")r=e.x,a=r,i=n.top,s=n.top+n.height;else if(t==="vertical")i=e.y,s=i,r=n.left,a=n.left+n.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var o=e.cx,c=e.cy,l=e.innerRadius,h=e.outerRadius,f=e.angle,m=Sn(o,c,l,f),g=Sn(o,c,h,f);r=m.x,i=m.y,a=g.x,s=g.y}else return d$(e);return[{x:r,y:i},{x:a,y:s}]}function kp(t){"@babel/helpers - typeof";return kp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kp(t)}function jL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function L0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jL(Object(n),!0).forEach(function(r){Fme(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Fme(t,e,n){return e=Ume(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ume(t){var e=Bme(t,"string");return kp(e)=="symbol"?e:e+""}function Bme(t,e){if(kp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(kp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zme(t){var e,n,r=t.element,i=t.tooltipEventType,a=t.isActive,s=t.activeCoordinate,o=t.activePayload,c=t.offset,l=t.activeTooltipIndex,h=t.tooltipAxisBandSize,f=t.layout,m=t.chartName,g=(e=r.props.cursor)!==null&&e!==void 0?e:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!g||!a||!s||m!=="ScatterChart"&&i!=="axis")return null;var b,y=xc;if(m==="ScatterChart")b=s,y=Nue;else if(m==="BarChart")b=kme(f,s,c,h),y=tP;else if(f==="radial"){var v=d$(s),w=v.cx,_=v.cy,E=v.radius,M=v.startAngle,T=v.endAngle;b={cx:w,cy:_,startAngle:M,endAngle:T,innerRadius:E,outerRadius:E},y=a9}else b={points:Lme(f,s,c)},y=xc;var A=L0(L0(L0(L0({stroke:"#ccc",pointerEvents:"none"},c),b),Pt(g,!1)),{},{payload:o,payloadIndex:l,className:Yt("recharts-tooltip-cursor",g.className)});return O.isValidElement(g)?O.cloneElement(g,A):O.createElement(y,A)}var $me=["item"],Vme=["children","className","width","height","style","compact","title","desc"];function Od(t){"@babel/helpers - typeof";return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Od(t)}function Wu(){return Wu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wu.apply(this,arguments)}function OL(t,e){return Wme(t)||Gme(t,e)||h$(t,e)||Hme()}function Hme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gme(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(h){l=!0,i=h}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}function Wme(t){if(Array.isArray(t))return t}function IL(t,e){if(t==null)return{};var n=qme(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function qme(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Xme(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kme(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p$(r.key),r)}}function Yme(t,e,n){return e&&Kme(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zme(t,e,n){return e=oy(e),Jme(t,f$()?Reflect.construct(e,n||[],oy(t).constructor):e.apply(t,n))}function Jme(t,e){if(e&&(Od(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qme(t)}function Qme(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(f$=function(){return!!t})()}function oy(t){return oy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oy(t)}function e0e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mT(t,e)}function mT(t,e){return mT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mT(t,e)}function Id(t){return r0e(t)||n0e(t)||h$(t)||t0e()}function t0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h$(t,e){if(t){if(typeof t=="string")return gT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gT(t,e)}}function n0e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function r0e(t){if(Array.isArray(t))return gT(t)}function gT(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function DL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function je(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?DL(Object(n),!0).forEach(function(r){Vt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Vt(t,e,n){return e=p$(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p$(t){var e=i0e(t,"string");return Od(e)=="symbol"?e:e+""}function i0e(t,e){if(Od(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Od(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var a0e={xAxis:["bottom","top"],yAxis:["left","right"]},s0e={width:"100%",height:"100%"},m$={x:0,y:0};function F0(t){return t}var o0e=function(e,n){return n==="horizontal"?e.x:n==="vertical"?e.y:n==="centric"?e.angle:e.radius},l0e=function(e,n,r,i){var a=n.find(function(h){return h&&h.index===r});if(a){if(e==="horizontal")return{x:a.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:a.coordinate};if(e==="centric"){var s=a.coordinate,o=i.radius;return je(je(je({},i),Sn(i.cx,i.cy,o,s)),{},{angle:s,radius:o})}var c=a.coordinate,l=i.angle;return je(je(je({},i),Sn(i.cx,i.cy,c,l)),{},{angle:l,radius:c})}return m$},hx=function(e,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,s=(r??[]).reduce(function(o,c){var l=c.props.data;return l&&l.length?[].concat(Id(o),Id(l)):o},[]);return s.length>0?s:e&&e.length&&Je(i)&&Je(a)?e.slice(i,a+1):[]};function g$(t){return t==="number"?[0,"auto"]:void 0}var vT=function(e,n,r,i){var a=e.graphicalItems,s=e.tooltipAxis,o=hx(n,e);return r<0||!a||!a.length||r>=o.length?null:a.reduce(function(c,l){var h,f=(h=l.props.data)!==null&&h!==void 0?h:n;f&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=r&&(f=f.slice(e.dataStartIndex,e.dataEndIndex+1));var m;if(s.dataKey&&!s.allowDuplicatedCategory){var g=f===void 0?o:f;m=av(g,s.dataKey,i)}else m=f&&f[r]||o[r];return m?[].concat(Id(c),[Zz(l,m)]):c},[])},kL=function(e,n,r,i){var a=i||{x:e.chartX,y:e.chartY},s=o0e(a,r),o=e.orderedTooltipTicks,c=e.tooltipAxis,l=e.tooltipTicks,h=Jse(s,o,l,c);if(h>=0&&l){var f=l[h]&&l[h].value,m=vT(e,n,h,f),g=l0e(r,o,h,a);return{activeTooltipIndex:h,activeLabel:f,activePayload:m,activeCoordinate:g}}return null},c0e=function(e,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,s=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,l=n.dataEndIndex,h=e.layout,f=e.children,m=e.stackOffset,g=Gz(h,a);return r.reduce(function(b,y){var v,w=y.type.defaultProps!==void 0?je(je({},y.type.defaultProps),y.props):y.props,_=w.type,E=w.dataKey,M=w.allowDataOverflow,T=w.allowDuplicatedCategory,A=w.scale,N=w.ticks,P=w.includeHidden,R=w[s];if(b[R])return b;var F=hx(e.data,{graphicalItems:i.filter(function(H){var te,we=s in H.props?H.props[s]:(te=H.type.defaultProps)===null||te===void 0?void 0:te[s];return we===R}),dataStartIndex:c,dataEndIndex:l}),D=F.length,L,q,I;Dme(w.domain,M,_)&&(L=PE(w.domain,null,M),g&&(_==="number"||A!=="auto")&&(I=kh(F,E,"category")));var U=g$(_);if(!L||L.length===0){var k,V=(k=w.domain)!==null&&k!==void 0?k:U;if(E){if(L=kh(F,E,_),_==="category"&&g){var $=BJ(L);T&&$?(q=L,L=qv(0,D)):T||(L=RD(V,L,y).reduce(function(H,te){return H.indexOf(te)>=0?H:[].concat(Id(H),[te])},[]))}else if(_==="category")T?L=L.filter(function(H){return H!==""&&!Kt(H)}):L=RD(V,L,y).reduce(function(H,te){return H.indexOf(te)>=0||te===""||Kt(te)?H:[].concat(Id(H),[te])},[]);else if(_==="number"){var Y=roe(F,i.filter(function(H){var te,we,Ae=s in H.props?H.props[s]:(te=H.type.defaultProps)===null||te===void 0?void 0:te[s],ne="hide"in H.props?H.props.hide:(we=H.type.defaultProps)===null||we===void 0?void 0:we.hide;return Ae===R&&(P||!ne)}),E,a,h);Y&&(L=Y)}g&&(_==="number"||A!=="auto")&&(I=kh(F,E,"category"))}else g?L=qv(0,D):o&&o[R]&&o[R].hasStack&&_==="number"?L=m==="expand"?[0,1]:Yz(o[R].stackGroups,c,l):L=Hz(F,i.filter(function(H){var te=s in H.props?H.props[s]:H.type.defaultProps[s],we="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return te===R&&(P||!we)}),_,h,!0);if(_==="number")L=pT(f,L,R,a,N),V&&(L=PE(V,L,M));else if(_==="category"&&V){var J=V,W=L.every(function(H){return J.indexOf(H)>=0});W&&(L=J)}}return je(je({},b),{},Vt({},R,je(je({},w),{},{axisType:a,domain:L,categoricalDomain:I,duplicateDomain:q,originalDomain:(v=w.domain)!==null&&v!==void 0?v:U,isCategorical:g,layout:h})))},{})},u0e=function(e,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,s=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,l=n.dataEndIndex,h=e.layout,f=e.children,m=hx(e.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:l}),g=m.length,b=Gz(h,a),y=-1;return r.reduce(function(v,w){var _=w.type.defaultProps!==void 0?je(je({},w.type.defaultProps),w.props):w.props,E=_[s],M=g$("number");if(!v[E]){y++;var T;return b?T=qv(0,g):o&&o[E]&&o[E].hasStack?(T=Yz(o[E].stackGroups,c,l),T=pT(f,T,E,a)):(T=PE(M,Hz(m,r.filter(function(A){var N,P,R=s in A.props?A.props[s]:(N=A.type.defaultProps)===null||N===void 0?void 0:N[s],F="hide"in A.props?A.props.hide:(P=A.type.defaultProps)===null||P===void 0?void 0:P.hide;return R===E&&!F}),"number",h),i.defaultProps.allowDataOverflow),T=pT(f,T,E,a)),je(je({},v),{},Vt({},E,je(je({axisType:a},i.defaultProps),{},{hide:!0,orientation:Xi(a0e,"".concat(a,".").concat(y%2),null),domain:T,originalDomain:M,isCategorical:b,layout:h})))}return v},{})},d0e=function(e,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,s=n.graphicalItems,o=n.stackGroups,c=n.dataStartIndex,l=n.dataEndIndex,h=e.children,f="".concat(i,"Id"),m=Ki(h,a),g={};return m&&m.length?g=c0e(e,{axes:m,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:o,dataStartIndex:c,dataEndIndex:l}):s&&s.length&&(g=u0e(e,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:o,dataStartIndex:c,dataEndIndex:l})),g},f0e=function(e){var n=il(e),r=io(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:NN(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:jv(n,r)}},LL=function(e){var n=e.children,r=e.defaultShowTooltip,i=Vi(n,Sd),a=0,s=0;return e.data&&e.data.length!==0&&(s=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!r}},h0e=function(e){return!e||!e.length?!1:e.some(function(n){var r=oo(n&&n.type);return r&&r.indexOf("Bar")>=0})},FL=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},p0e=function(e,n){var r=e.props,i=e.graphicalItems,a=e.xAxisMap,s=a===void 0?{}:a,o=e.yAxisMap,c=o===void 0?{}:o,l=r.width,h=r.height,f=r.children,m=r.margin||{},g=Vi(f,Sd),b=Vi(f,ms),y=Object.keys(c).reduce(function(T,A){var N=c[A],P=N.orientation;return!N.mirror&&!N.hide?je(je({},T),{},Vt({},P,T[P]+N.width)):T},{left:m.left||0,right:m.right||0}),v=Object.keys(s).reduce(function(T,A){var N=s[A],P=N.orientation;return!N.mirror&&!N.hide?je(je({},T),{},Vt({},P,Xi(T,"".concat(P))+N.height)):T},{top:m.top||0,bottom:m.bottom||0}),w=je(je({},v),y),_=w.bottom;g&&(w.bottom+=g.props.height||Sd.defaultProps.height),b&&n&&(w=toe(w,i,r,n));var E=l-w.left-w.right,M=h-w.top-w.bottom;return je(je({brushBottom:_},w),{},{width:Math.max(E,0),height:Math.max(M,0)})},m0e=function(e,n){if(n==="xAxis")return e[n].width;if(n==="yAxis")return e[n].height},cm=function(e){var n=e.chartName,r=e.GraphicalChild,i=e.defaultTooltipEventType,a=i===void 0?"axis":i,s=e.validateTooltipEventTypes,o=s===void 0?["axis"]:s,c=e.axisComponents,l=e.legendContent,h=e.formatAxisMap,f=e.defaultProps,m=function(w,_){var E=_.graphicalItems,M=_.stackGroups,T=_.offset,A=_.updateId,N=_.dataStartIndex,P=_.dataEndIndex,R=w.barSize,F=w.layout,D=w.barGap,L=w.barCategoryGap,q=w.maxBarSize,I=FL(F),U=I.numericAxisName,k=I.cateAxisName,V=h0e(E),$=[];return E.forEach(function(Y,J){var W=hx(w.data,{graphicalItems:[Y],dataStartIndex:N,dataEndIndex:P}),H=Y.type.defaultProps!==void 0?je(je({},Y.type.defaultProps),Y.props):Y.props,te=H.dataKey,we=H.maxBarSize,Ae=H["".concat(U,"Id")],ne=H["".concat(k,"Id")],de={},pe=c.reduce(function(zt,qe){var Z=_["".concat(qe.axisType,"Map")],z=H["".concat(qe.axisType,"Id")];Z&&Z[z]||qe.axisType==="zAxis"||Cc();var ie=Z[z];return je(je({},zt),{},Vt(Vt({},qe.axisType,ie),"".concat(qe.axisType,"Ticks"),io(ie)))},de),fe=pe[k],ce=pe["".concat(k,"Ticks")],Ce=M&&M[Ae]&&M[Ae].hasStack&&foe(Y,M[Ae].stackGroups),ye=oo(Y.type).indexOf("Bar")>=0,Ze=jv(fe,ce),tt=[],St=V&&Qse({barSize:R,stackGroups:M,totalSize:m0e(pe,k)});if(ye){var lt,kt,re=Kt(we)?q:we,Ht=(lt=(kt=jv(fe,ce,!0))!==null&&kt!==void 0?kt:re)!==null&&lt!==void 0?lt:0;tt=eoe({barGap:D,barCategoryGap:L,bandSize:Ht!==Ze?Ht:Ze,sizeList:St[ne],maxBarSize:re}),Ht!==Ze&&(tt=tt.map(function(zt){return je(je({},zt),{},{position:je(je({},zt.position),{},{offset:zt.position.offset-Ht/2})})}))}var Lt=Y&&Y.type&&Y.type.getComposedData;Lt&&$.push({props:je(je({},Lt(je(je({},pe),{},{displayedData:W,props:w,dataKey:te,item:Y,bandSize:Ze,barPosition:tt,offset:T,stackedData:Ce,layout:F,dataStartIndex:N,dataEndIndex:P}))),{},Vt(Vt(Vt({key:Y.key||"item-".concat(J)},U,pe[U]),k,pe[k]),"animationId",A)),childIndex:ZJ(Y,w.children),item:Y})}),$},g=function(w,_){var E=w.props,M=w.dataStartIndex,T=w.dataEndIndex,A=w.updateId;if(!Gj({props:E}))return null;var N=E.children,P=E.layout,R=E.stackOffset,F=E.data,D=E.reverseStackOrder,L=FL(P),q=L.numericAxisName,I=L.cateAxisName,U=Ki(N,r),k=uoe(F,U,"".concat(q,"Id"),"".concat(I,"Id"),R,D),V=c.reduce(function(H,te){var we="".concat(te.axisType,"Map");return je(je({},H),{},Vt({},we,d0e(E,je(je({},te),{},{graphicalItems:U,stackGroups:te.axisType===q&&k,dataStartIndex:M,dataEndIndex:T}))))},{}),$=p0e(je(je({},V),{},{props:E,graphicalItems:U}),_==null?void 0:_.legendBBox);Object.keys(V).forEach(function(H){V[H]=h(E,V[H],$,H.replace("Map",""),n)});var Y=V["".concat(I,"Map")],J=f0e(Y),W=m(E,je(je({},V),{},{dataStartIndex:M,dataEndIndex:T,updateId:A,graphicalItems:U,stackGroups:k,offset:$}));return je(je({formattedGraphicalItems:W,graphicalItems:U,offset:$,stackGroups:k},J),V)},b=(function(v){function w(_){var E,M,T;return Xme(this,w),T=Zme(this,w,[_]),Vt(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Vt(T,"accessibilityManager",new Ime),Vt(T,"handleLegendBBoxUpdate",function(A){if(A){var N=T.state,P=N.dataStartIndex,R=N.dataEndIndex,F=N.updateId;T.setState(je({legendBBox:A},g({props:T.props,dataStartIndex:P,dataEndIndex:R,updateId:F},je(je({},T.state),{},{legendBBox:A}))))}}),Vt(T,"handleReceiveSyncEvent",function(A,N,P){if(T.props.syncId===A){if(P===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(N)}}),Vt(T,"handleBrushChange",function(A){var N=A.startIndex,P=A.endIndex;if(N!==T.state.dataStartIndex||P!==T.state.dataEndIndex){var R=T.state.updateId;T.setState(function(){return je({dataStartIndex:N,dataEndIndex:P},g({props:T.props,dataStartIndex:N,dataEndIndex:P,updateId:R},T.state))}),T.triggerSyncEvent({dataStartIndex:N,dataEndIndex:P})}}),Vt(T,"handleMouseEnter",function(A){var N=T.getMouseInfo(A);if(N){var P=je(je({},N),{},{isTooltipActive:!0});T.setState(P),T.triggerSyncEvent(P);var R=T.props.onMouseEnter;Dt(R)&&R(P,A)}}),Vt(T,"triggeredAfterMouseMove",function(A){var N=T.getMouseInfo(A),P=N?je(je({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(P),T.triggerSyncEvent(P);var R=T.props.onMouseMove;Dt(R)&&R(P,A)}),Vt(T,"handleItemMouseEnter",function(A){T.setState(function(){return{isTooltipActive:!0,activeItem:A,activePayload:A.tooltipPayload,activeCoordinate:A.tooltipPosition||{x:A.cx,y:A.cy}}})}),Vt(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Vt(T,"handleMouseMove",function(A){A.persist(),T.throttleTriggeredAfterMouseMove(A)}),Vt(T,"handleMouseLeave",function(A){T.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};T.setState(N),T.triggerSyncEvent(N);var P=T.props.onMouseLeave;Dt(P)&&P(N,A)}),Vt(T,"handleOuterEvent",function(A){var N=YJ(A),P=Xi(T.props,"".concat(N));if(N&&Dt(P)){var R,F;/.*touch.*/i.test(N)?F=T.getMouseInfo(A.changedTouches[0]):F=T.getMouseInfo(A),P((R=F)!==null&&R!==void 0?R:{},A)}}),Vt(T,"handleClick",function(A){var N=T.getMouseInfo(A);if(N){var P=je(je({},N),{},{isTooltipActive:!0});T.setState(P),T.triggerSyncEvent(P);var R=T.props.onClick;Dt(R)&&R(P,A)}}),Vt(T,"handleMouseDown",function(A){var N=T.props.onMouseDown;if(Dt(N)){var P=T.getMouseInfo(A);N(P,A)}}),Vt(T,"handleMouseUp",function(A){var N=T.props.onMouseUp;if(Dt(N)){var P=T.getMouseInfo(A);N(P,A)}}),Vt(T,"handleTouchMove",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(A.changedTouches[0])}),Vt(T,"handleTouchStart",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&T.handleMouseDown(A.changedTouches[0])}),Vt(T,"handleTouchEnd",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&T.handleMouseUp(A.changedTouches[0])}),Vt(T,"handleDoubleClick",function(A){var N=T.props.onDoubleClick;if(Dt(N)){var P=T.getMouseInfo(A);N(P,A)}}),Vt(T,"handleContextMenu",function(A){var N=T.props.onContextMenu;if(Dt(N)){var P=T.getMouseInfo(A);N(P,A)}}),Vt(T,"triggerSyncEvent",function(A){T.props.syncId!==void 0&&y2.emit(x2,T.props.syncId,A,T.eventEmitterSymbol)}),Vt(T,"applySyncEvent",function(A){var N=T.props,P=N.layout,R=N.syncMethod,F=T.state.updateId,D=A.dataStartIndex,L=A.dataEndIndex;if(A.dataStartIndex!==void 0||A.dataEndIndex!==void 0)T.setState(je({dataStartIndex:D,dataEndIndex:L},g({props:T.props,dataStartIndex:D,dataEndIndex:L,updateId:F},T.state)));else if(A.activeTooltipIndex!==void 0){var q=A.chartX,I=A.chartY,U=A.activeTooltipIndex,k=T.state,V=k.offset,$=k.tooltipTicks;if(!V)return;if(typeof R=="function")U=R($,A);else if(R==="value"){U=-1;for(var Y=0;Y<$.length;Y++)if($[Y].value===A.activeLabel){U=Y;break}}var J=je(je({},V),{},{x:V.left,y:V.top}),W=Math.min(q,J.x+J.width),H=Math.min(I,J.y+J.height),te=$[U]&&$[U].value,we=vT(T.state,T.props.data,U),Ae=$[U]?{x:P==="horizontal"?$[U].coordinate:W,y:P==="horizontal"?H:$[U].coordinate}:m$;T.setState(je(je({},A),{},{activeLabel:te,activeCoordinate:Ae,activePayload:we,activeTooltipIndex:U}))}else T.setState(A)}),Vt(T,"renderCursor",function(A){var N,P=T.state,R=P.isTooltipActive,F=P.activeCoordinate,D=P.activePayload,L=P.offset,q=P.activeTooltipIndex,I=P.tooltipAxisBandSize,U=T.getTooltipEventType(),k=(N=A.props.active)!==null&&N!==void 0?N:R,V=T.props.layout,$=A.key||"_recharts-cursor";return K.createElement(zme,{key:$,activeCoordinate:F,activePayload:D,activeTooltipIndex:q,chartName:n,element:A,isActive:k,layout:V,offset:L,tooltipAxisBandSize:I,tooltipEventType:U})}),Vt(T,"renderPolarAxis",function(A,N,P){var R=Xi(A,"type.axisType"),F=Xi(T.state,"".concat(R,"Map")),D=A.type.defaultProps,L=D!==void 0?je(je({},D),A.props):A.props,q=F&&F[L["".concat(R,"Id")]];return O.cloneElement(A,je(je({},q),{},{className:Yt(R,q.className),key:A.key||"".concat(N,"-").concat(P),ticks:io(q,!0)}))}),Vt(T,"renderPolarGrid",function(A){var N=A.props,P=N.radialLines,R=N.polarAngles,F=N.polarRadius,D=T.state,L=D.radiusAxisMap,q=D.angleAxisMap,I=il(L),U=il(q),k=U.cx,V=U.cy,$=U.innerRadius,Y=U.outerRadius;return O.cloneElement(A,{polarAngles:Array.isArray(R)?R:io(U,!0).map(function(J){return J.coordinate}),polarRadius:Array.isArray(F)?F:io(I,!0).map(function(J){return J.coordinate}),cx:k,cy:V,innerRadius:$,outerRadius:Y,key:A.key||"polar-grid",radialLines:P})}),Vt(T,"renderLegend",function(){var A=T.state.formattedGraphicalItems,N=T.props,P=N.children,R=N.width,F=N.height,D=T.props.margin||{},L=R-(D.left||0)-(D.right||0),q=$z({children:P,formattedGraphicalItems:A,legendWidth:L,legendContent:l});if(!q)return null;var I=q.item,U=IL(q,$me);return O.cloneElement(I,je(je({},U),{},{chartWidth:R,chartHeight:F,margin:D,onBBoxUpdate:T.handleLegendBBoxUpdate}))}),Vt(T,"renderTooltip",function(){var A,N=T.props,P=N.children,R=N.accessibilityLayer,F=Vi(P,Xn);if(!F)return null;var D=T.state,L=D.isTooltipActive,q=D.activeCoordinate,I=D.activePayload,U=D.activeLabel,k=D.offset,V=(A=F.props.active)!==null&&A!==void 0?A:L;return O.cloneElement(F,{viewBox:je(je({},k),{},{x:k.left,y:k.top}),active:V,label:U,payload:V?I:[],coordinate:q,accessibilityLayer:R})}),Vt(T,"renderBrush",function(A){var N=T.props,P=N.margin,R=N.data,F=T.state,D=F.offset,L=F.dataStartIndex,q=F.dataEndIndex,I=F.updateId;return O.cloneElement(A,{key:A.key||"_recharts-brush",onChange:O0(T.handleBrushChange,A.props.onChange),data:R,x:Je(A.props.x)?A.props.x:D.left,y:Je(A.props.y)?A.props.y:D.top+D.height+D.brushBottom-(P.bottom||0),width:Je(A.props.width)?A.props.width:D.width,startIndex:L,endIndex:q,updateId:"brush-".concat(I)})}),Vt(T,"renderReferenceElement",function(A,N,P){if(!A)return null;var R=T,F=R.clipPathId,D=T.state,L=D.xAxisMap,q=D.yAxisMap,I=D.offset,U=A.type.defaultProps||{},k=A.props,V=k.xAxisId,$=V===void 0?U.xAxisId:V,Y=k.yAxisId,J=Y===void 0?U.yAxisId:Y;return O.cloneElement(A,{key:A.key||"".concat(N,"-").concat(P),xAxis:L[$],yAxis:q[J],viewBox:{x:I.left,y:I.top,width:I.width,height:I.height},clipPathId:F})}),Vt(T,"renderActivePoints",function(A){var N=A.item,P=A.activePoint,R=A.basePoint,F=A.childIndex,D=A.isRange,L=[],q=N.props.key,I=N.item.type.defaultProps!==void 0?je(je({},N.item.type.defaultProps),N.item.props):N.item.props,U=I.activeDot,k=I.dataKey,V=je(je({index:F,dataKey:k,cx:P.x,cy:P.y,r:4,fill:eP(N.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},Pt(U,!1)),sv(U));return L.push(w.renderActiveDot(U,V,"".concat(q,"-activePoint-").concat(F))),R?L.push(w.renderActiveDot(U,je(je({},V),{},{cx:R.x,cy:R.y}),"".concat(q,"-basePoint-").concat(F))):D&&L.push(null),L}),Vt(T,"renderGraphicChild",function(A,N,P){var R=T.filterFormatItem(A,N,P);if(!R)return null;var F=T.getTooltipEventType(),D=T.state,L=D.isTooltipActive,q=D.tooltipAxis,I=D.activeTooltipIndex,U=D.activeLabel,k=T.props.children,V=Vi(k,Xn),$=R.props,Y=$.points,J=$.isRange,W=$.baseLine,H=R.item.type.defaultProps!==void 0?je(je({},R.item.type.defaultProps),R.item.props):R.item.props,te=H.activeDot,we=H.hide,Ae=H.activeBar,ne=H.activeShape,de=!!(!we&&L&&V&&(te||Ae||ne)),pe={};F!=="axis"&&V&&V.props.trigger==="click"?pe={onClick:O0(T.handleItemMouseEnter,A.props.onClick)}:F!=="axis"&&(pe={onMouseLeave:O0(T.handleItemMouseLeave,A.props.onMouseLeave),onMouseEnter:O0(T.handleItemMouseEnter,A.props.onMouseEnter)});var fe=O.cloneElement(A,je(je({},R.props),pe));function ce(qe){return typeof q.dataKey=="function"?q.dataKey(qe.payload):null}if(de)if(I>=0){var Ce,ye;if(q.dataKey&&!q.allowDuplicatedCategory){var Ze=typeof q.dataKey=="function"?ce:"payload.".concat(q.dataKey.toString());Ce=av(Y,Ze,U),ye=J&&W&&av(W,Ze,U)}else Ce=Y==null?void 0:Y[I],ye=J&&W&&W[I];if(ne||Ae){var tt=A.props.activeIndex!==void 0?A.props.activeIndex:I;return[O.cloneElement(A,je(je(je({},R.props),pe),{},{activeIndex:tt})),null,null]}if(!Kt(Ce))return[fe].concat(Id(T.renderActivePoints({item:R,activePoint:Ce,basePoint:ye,childIndex:I,isRange:J})))}else{var St,lt=(St=T.getItemByXY(T.state.activeCoordinate))!==null&&St!==void 0?St:{graphicalItem:fe},kt=lt.graphicalItem,re=kt.item,Ht=re===void 0?A:re,Lt=kt.childIndex,zt=je(je(je({},R.props),pe),{},{activeIndex:Lt});return[O.cloneElement(Ht,zt),null,null]}return J?[fe,null,null]:[fe,null]}),Vt(T,"renderCustomized",function(A,N,P){return O.cloneElement(A,je(je({key:"recharts-customized-".concat(P)},T.props),T.state))}),Vt(T,"renderMap",{CartesianGrid:{handler:F0,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:F0},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:F0},YAxis:{handler:F0},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((E=_.id)!==null&&E!==void 0?E:Bc("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=U6(T.triggeredAfterMouseMove,(M=_.throttleDelay)!==null&&M!==void 0?M:1e3/60),T.state={},T}return e0e(w,v),Yme(w,[{key:"componentDidMount",value:function(){var E,M;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(M=this.props.margin.top)!==null&&M!==void 0?M:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,M=E.children,T=E.data,A=E.height,N=E.layout,P=Vi(M,Xn);if(P){var R=P.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var F=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,D=vT(this.state,T,R,F),L=this.state.tooltipTicks[R].coordinate,q=(this.state.offset.top+A)/2,I=N==="horizontal",U=I?{x:L,y:q}:{y:L,x:q},k=this.state.formattedGraphicalItems.find(function($){var Y=$.item;return Y.type.name==="Scatter"});k&&(U=je(je({},U),k.props.points[R].tooltipPosition),D=k.props.points[R].tooltipPayload);var V={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:F,activePayload:D,activeCoordinate:U};this.setState(V),this.renderCursor(P),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,M){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==M.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var T,A;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0}})}return null}},{key:"componentDidUpdate",value:function(E){YM([Vi(E.children,Xn)],[Vi(this.props.children,Xn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Vi(this.props.children,Xn);if(E&&typeof E.props.shared=="boolean"){var M=E.props.shared?"axis":"item";return o.indexOf(M)>=0?M:a}return a}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var M=this.container,T=M.getBoundingClientRect(),A=Lne(T),N={chartX:Math.round(E.pageX-A.left),chartY:Math.round(E.pageY-A.top)},P=T.width/M.offsetWidth||1,R=this.inRange(N.chartX,N.chartY,P);if(!R)return null;var F=this.state,D=F.xAxisMap,L=F.yAxisMap,q=this.getTooltipEventType(),I=kL(this.state,this.props.data,this.props.layout,R);if(q!=="axis"&&D&&L){var U=il(D).scale,k=il(L).scale,V=U&&U.invert?U.invert(N.chartX):null,$=k&&k.invert?k.invert(N.chartY):null;return je(je({},N),{},{xValue:V,yValue:$},I)}return I?je(je({},N),I):null}},{key:"inRange",value:function(E,M){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=this.props.layout,N=E/T,P=M/T;if(A==="horizontal"||A==="vertical"){var R=this.state.offset,F=N>=R.left&&N<=R.left+R.width&&P>=R.top&&P<=R.top+R.height;return F?{x:N,y:P}:null}var D=this.state,L=D.angleAxisMap,q=D.radiusAxisMap;if(L&&q){var I=il(L);return ID({x:N,y:P},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,M=this.getTooltipEventType(),T=Vi(E,Xn),A={};T&&M==="axis"&&(T.props.trigger==="click"?A={onClick:this.handleClick}:A={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var N=sv(this.props,this.handleOuterEvent);return je(je({},N),A)}},{key:"addListener",value:function(){y2.on(x2,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){y2.removeListener(x2,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,M,T){for(var A=this.state.formattedGraphicalItems,N=0,P=A.length;N<P;N++){var R=A[N];if(R.item===E||R.props.key===E.key||M===oo(R.item.type)&&T===R.childIndex)return R}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,M=this.state.offset,T=M.left,A=M.top,N=M.height,P=M.width;return K.createElement("defs",null,K.createElement("clipPath",{id:E},K.createElement("rect",{x:T,y:A,height:N,width:P})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(M,T){var A=OL(T,2),N=A[0],P=A[1];return je(je({},M),{},Vt({},N,P.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(M,T){var A=OL(T,2),N=A[0],P=A[1];return je(je({},M),{},Vt({},N,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var M;return(M=this.state.xAxisMap)===null||M===void 0||(M=M[E])===null||M===void 0?void 0:M.scale}},{key:"getYScaleByAxisId",value:function(E){var M;return(M=this.state.yAxisMap)===null||M===void 0||(M=M[E])===null||M===void 0?void 0:M.scale}},{key:"getItemByXY",value:function(E){var M=this.state,T=M.formattedGraphicalItems,A=M.activeItem;if(T&&T.length)for(var N=0,P=T.length;N<P;N++){var R=T[N],F=R.props,D=R.item,L=D.type.defaultProps!==void 0?je(je({},D.type.defaultProps),D.props):D.props,q=oo(D.type);if(q==="Bar"){var I=(F.data||[]).find(function($){return cue(E,$)});if(I)return{graphicalItem:R,payload:I}}else if(q==="RadialBar"){var U=(F.data||[]).find(function($){return ID(E,$)});if(U)return{graphicalItem:R,payload:U}}else if(sx(R,A)||ox(R,A)||Cp(R,A)){var k=$de({graphicalItem:R,activeTooltipItem:A,itemData:L.data}),V=L.activeIndex===void 0?k:L.activeIndex;return{graphicalItem:je(je({},R),{},{childIndex:V}),payload:Cp(R,A)?L.data[k]:R.props.data[k]}}}return null}},{key:"render",value:function(){var E=this;if(!Gj(this))return null;var M=this.props,T=M.children,A=M.className,N=M.width,P=M.height,R=M.style,F=M.compact,D=M.title,L=M.desc,q=IL(M,Vme),I=Pt(q,!1);if(F)return K.createElement(fL,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},K.createElement(JM,Wu({},I,{width:N,height:P,title:D,desc:L}),this.renderClipPath(),qj(T,this.renderMap)));if(this.props.accessibilityLayer){var U,k;I.tabIndex=(U=this.props.tabIndex)!==null&&U!==void 0?U:0,I.role=(k=this.props.role)!==null&&k!==void 0?k:"application",I.onKeyDown=function($){E.accessibilityManager.keyboardEvent($)},I.onFocus=function(){E.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return K.createElement(fL,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},K.createElement("div",Wu({className:Yt("recharts-wrapper",A),style:je({position:"relative",cursor:"default",width:N,height:P},R)},V,{ref:function(Y){E.container=Y}}),K.createElement(JM,Wu({},I,{width:N,height:P,title:D,desc:L,style:s0e}),this.renderClipPath(),qj(T,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(O.Component);Vt(b,"displayName",n),Vt(b,"defaultProps",je({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),Vt(b,"getDerivedStateFromProps",function(v,w){var _=v.dataKey,E=v.data,M=v.children,T=v.width,A=v.height,N=v.layout,P=v.stackOffset,R=v.margin,F=w.dataStartIndex,D=w.dataEndIndex;if(w.updateId===void 0){var L=LL(v);return je(je(je({},L),{},{updateId:0},g(je(je({props:v},L),{},{updateId:0}),w)),{},{prevDataKey:_,prevData:E,prevWidth:T,prevHeight:A,prevLayout:N,prevStackOffset:P,prevMargin:R,prevChildren:M})}if(_!==w.prevDataKey||E!==w.prevData||T!==w.prevWidth||A!==w.prevHeight||N!==w.prevLayout||P!==w.prevStackOffset||!Qu(R,w.prevMargin)){var q=LL(v),I={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},U=je(je({},kL(w,E,N)),{},{updateId:w.updateId+1}),k=je(je(je({},q),I),U);return je(je(je({},k),g(je({props:v},k),w)),{},{prevDataKey:_,prevData:E,prevWidth:T,prevHeight:A,prevLayout:N,prevStackOffset:P,prevMargin:R,prevChildren:M})}if(!YM(M,w.prevChildren)){var V,$,Y,J,W=Vi(M,Sd),H=W&&(V=($=W.props)===null||$===void 0?void 0:$.startIndex)!==null&&V!==void 0?V:F,te=W&&(Y=(J=W.props)===null||J===void 0?void 0:J.endIndex)!==null&&Y!==void 0?Y:D,we=H!==F||te!==D,Ae=!Kt(E),ne=Ae&&!we?w.updateId:w.updateId+1;return je(je({updateId:ne},g(je(je({props:v},w),{},{updateId:ne,dataStartIndex:H,dataEndIndex:te}),w)),{},{prevChildren:M,dataStartIndex:H,dataEndIndex:te})}return null}),Vt(b,"renderActiveDot",function(v,w,_){var E;return O.isValidElement(v)?E=O.cloneElement(v,w):Dt(v)?E=v(w):E=K.createElement(ef,w),K.createElement(an,{className:"recharts-active-dot",key:_},E)});var y=O.forwardRef(function(w,_){return K.createElement(b,Wu({},w,{ref:_}))});return y.displayName=b.displayName,y},Dd=cm({chartName:"LineChart",GraphicalChild:gi,axisComponents:[{axisType:"xAxis",AxisComp:Ur},{axisType:"yAxis",AxisComp:Br}],formatAxisMap:nP}),fP=cm({chartName:"BarChart",GraphicalChild:Ms,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ur},{axisType:"yAxis",AxisComp:Br}],formatAxisMap:nP}),v$=cm({chartName:"PieChart",GraphicalChild:js,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:nf},{axisType:"radiusAxis",AxisComp:tf}],formatAxisMap:e9,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),g0e=cm({chartName:"RadarChart",GraphicalChild:wd,axisComponents:[{axisType:"angleAxis",AxisComp:nf},{axisType:"radiusAxis",AxisComp:tf}],formatAxisMap:e9,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),hP=cm({chartName:"AreaChart",GraphicalChild:wa,axisComponents:[{axisType:"xAxis",AxisComp:Ur},{axisType:"yAxis",AxisComp:Br}],formatAxisMap:nP});const pP=O.createContext({});function mP(t){const e=O.useRef(null);return e.current===null&&(e.current=t()),e.current}const v0e=typeof window<"u",y$=v0e?O.useLayoutEffect:O.useEffect,px=O.createContext(null);function gP(t,e){t.indexOf(e)===-1&&t.push(e)}function ly(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Es=(t,e,n)=>n>e?e:n<t?t:n;let vP=()=>{};const xl={},x$=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function b$(t){return typeof t=="object"&&t!==null}const w$=t=>/^0[^.\s]+$/u.test(t);function _$(t){let e;return()=>(e===void 0&&(e=t()),e)}const va=t=>t,y0e=(t,e)=>n=>e(t(n)),um=(...t)=>t.reduce(y0e),Lp=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class yP{constructor(){this.subscriptions=[]}add(e){return gP(this.subscriptions,e),()=>ly(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Zi=t=>t*1e3,ga=t=>t/1e3;function S$(t,e){return e?t*(1e3/e):0}const M$=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,x0e=1e-7,b0e=12;function w0e(t,e,n,r,i){let a,s,o=0;do s=e+(n-e)/2,a=M$(s,r,i)-t,a>0?n=s:e=s;while(Math.abs(a)>x0e&&++o<b0e);return s}function dm(t,e,n,r){if(t===e&&n===r)return va;const i=a=>w0e(a,0,1,t,n);return a=>a===0||a===1?a:M$(i(a),e,r)}const E$=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,T$=t=>e=>1-t(1-e),A$=dm(.33,1.53,.69,.99),xP=T$(A$),N$=E$(xP),P$=t=>t>=1?1:(t*=2)<1?.5*xP(t):.5*(2-Math.pow(2,-10*(t-1))),bP=t=>1-Math.sin(Math.acos(t)),C$=T$(bP),R$=E$(bP),_0e=dm(.42,0,1,1),S0e=dm(0,0,.58,1),j$=dm(.42,0,.58,1),M0e=t=>Array.isArray(t)&&typeof t[0]!="number",O$=t=>Array.isArray(t)&&typeof t[0]=="number",E0e={linear:va,easeIn:_0e,easeInOut:j$,easeOut:S0e,circIn:bP,circInOut:R$,circOut:C$,backIn:xP,backInOut:N$,backOut:A$,anticipate:P$},T0e=t=>typeof t=="string",UL=t=>{if(O$(t)){vP(t.length===4);const[e,n,r,i]=t;return dm(e,n,r,i)}else if(T0e(t))return E0e[t];return t},U0=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function A0e(t,e){let n=new Set,r=new Set,i=!1,a=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(h){s.has(h)&&(l.schedule(h),t()),h(o)}const l={schedule:(h,f=!1,m=!1)=>{const b=m&&i?n:r;return f&&s.add(h),b.add(h),h},cancel:h=>{r.delete(h),s.delete(h)},process:h=>{if(o=h,i){a=!0;return}i=!0;const f=n;n=r,r=f,n.forEach(c),n.clear(),i=!1,a&&(a=!1,l.process(h))}};return l}const N0e=40;function I$(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=U0.reduce((E,M)=>(E[M]=A0e(a),E),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:h,update:f,preRender:m,render:g,postRender:b}=s,y=()=>{const E=xl.useManualTiming,M=E?i.timestamp:performance.now();n=!1,E||(i.delta=r?1e3/60:Math.max(Math.min(M-i.timestamp,N0e),1)),i.timestamp=M,i.isProcessing=!0,o.process(i),c.process(i),l.process(i),h.process(i),f.process(i),m.process(i),g.process(i),b.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(y))},v=()=>{n=!0,r=!0,i.isProcessing||t(y)};return{schedule:U0.reduce((E,M)=>{const T=s[M];return E[M]=(A,N=!1,P=!1)=>(n||v(),T.schedule(A,N,P)),E},{}),cancel:E=>{for(let M=0;M<U0.length;M++)s[U0[M]].cancel(E)},state:i,steps:s}}const{schedule:On,cancel:bl,state:kr,steps:w2}=I$(typeof requestAnimationFrame<"u"?requestAnimationFrame:va,!0);let Ig;function P0e(){Ig=void 0}const hi={now:()=>(Ig===void 0&&hi.set(kr.isProcessing||xl.useManualTiming?kr.timestamp:performance.now()),Ig),set:t=>{Ig=t,queueMicrotask(P0e)}},D$=t=>e=>typeof e=="string"&&e.startsWith(t),k$=D$("--"),C0e=D$("var(--"),wP=t=>C0e(t)?R0e.test(t.split("/*")[0].trim()):!1,R0e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function BL(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const af={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Fp={...af,transform:t=>Es(0,1,t)},B0={...af,default:1},zh=t=>Math.round(t*1e5)/1e5,_P=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function j0e(t){return t==null}const O0e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,SP=(t,e)=>n=>!!(typeof n=="string"&&O0e.test(n)&&n.startsWith(t)||e&&!j0e(n)&&Object.prototype.hasOwnProperty.call(n,e)),L$=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,a,s,o]=r.match(_P);return{[t]:parseFloat(i),[e]:parseFloat(a),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},I0e=t=>Es(0,255,t),_2={...af,transform:t=>Math.round(I0e(t))},hc={test:SP("rgb","red"),parse:L$("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+_2.transform(t)+", "+_2.transform(e)+", "+_2.transform(n)+", "+zh(Fp.transform(r))+")"};function D0e(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const yT={test:SP("#"),parse:D0e,transform:hc.transform},fm=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Jo=fm("deg"),ys=fm("%"),Nt=fm("px"),k0e=fm("vh"),L0e=fm("vw"),zL={...ys,parse:t=>ys.parse(t)/100,transform:t=>ys.transform(t*100)},qu={test:SP("hsl","hue"),parse:L$("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+ys.transform(zh(e))+", "+ys.transform(zh(n))+", "+zh(Fp.transform(r))+")"},ur={test:t=>hc.test(t)||yT.test(t)||qu.test(t),parse:t=>hc.test(t)?hc.parse(t):qu.test(t)?qu.parse(t):yT.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?hc.transform(t):qu.transform(t),getAnimatableNone:t=>{const e=ur.parse(t);return e.alpha=0,ur.transform(e)}},F0e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function U0e(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(_P))==null?void 0:e.length)||0)+(((n=t.match(F0e))==null?void 0:n.length)||0)>0}const F$="number",U$="color",B0e="var",z0e="var(",$L="${}",$0e=/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 kd(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=e.replace($0e,c=>(ur.test(c)?(r.color.push(a),i.push(U$),n.push(ur.parse(c))):c.startsWith(z0e)?(r.var.push(a),i.push(B0e),n.push(c)):(r.number.push(a),i.push(F$),n.push(parseFloat(c))),++a,$L)).split($L);return{values:n,split:o,indexes:r,types:i}}function V0e(t){return kd(t).values}function B$({split:t,types:e}){const n=t.length;return r=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],r[a]!==void 0){const s=e[a];s===F$?i+=zh(r[a]):s===U$?i+=ur.transform(r[a]):i+=r[a]}return i}}function H0e(t){return B$(kd(t))}const G0e=t=>typeof t=="number"?0:ur.test(t)?ur.getAnimatableNone(t):t,W0e=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:G0e(t);function q0e(t){const e=kd(t);return B$(e)(e.values.map((r,i)=>W0e(r,e.split[i])))}const Ha={test:U0e,parse:V0e,createTransformer:H0e,getAnimatableNone:q0e};function S2(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 X0e({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,a=0,s=0;if(!e)i=a=s=n;else{const o=n<.5?n*(1+e):n+e-n*e,c=2*n-o;i=S2(c,o,t+1/3),a=S2(c,o,t),s=S2(c,o,t-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}function cy(t,e){return n=>n>0?e:t}const zn=(t,e,n)=>t+(e-t)*n,M2=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},K0e=[yT,hc,qu],Y0e=t=>K0e.find(e=>e.test(t));function VL(t){const e=Y0e(t);if(!e)return!1;let n=e.parse(t);return e===qu&&(n=X0e(n)),n}const HL=(t,e)=>{const n=VL(t),r=VL(e);if(!n||!r)return cy(t,e);const i={...n};return a=>(i.red=M2(n.red,r.red,a),i.green=M2(n.green,r.green,a),i.blue=M2(n.blue,r.blue,a),i.alpha=zn(n.alpha,r.alpha,a),hc.transform(i))},xT=new Set(["none","hidden"]);function Z0e(t,e){return xT.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function J0e(t,e){return n=>zn(t,e,n)}function MP(t){return typeof t=="number"?J0e:typeof t=="string"?wP(t)?cy:ur.test(t)?HL:tge:Array.isArray(t)?z$:typeof t=="object"?ur.test(t)?HL:Q0e:cy}function z$(t,e){const n=[...t],r=n.length,i=t.map((a,s)=>MP(a)(a,e[s]));return a=>{for(let s=0;s<r;s++)n[s]=i[s](a);return n}}function Q0e(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=MP(t[i])(t[i],e[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function ege(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const a=e.types[i],s=t.indexes[a][r[a]],o=t.values[s]??0;n[i]=o,r[a]++}return n}const tge=(t,e)=>{const n=Ha.createTransformer(e),r=kd(t),i=kd(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?xT.has(t)&&!i.values.length||xT.has(e)&&!r.values.length?Z0e(t,e):um(z$(ege(r,i),i.values),n):cy(t,e)};function $$(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?zn(t,e,n):MP(t)(t,e)}const nge=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>On.update(e,n),stop:()=>bl(e),now:()=>kr.isProcessing?kr.timestamp:hi.now()}},V$=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let a=0;a<i;a++)r+=Math.round(t(a/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},uy=2e4;function EP(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<uy;)e+=n,r=t.next(e);return e>=uy?1/0:e}function rge(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(EP(r),uy);return{type:"keyframes",ease:a=>r.next(i*a).value/e,duration:ga(i)}}const er={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};function bT(t,e){return t*Math.sqrt(1-e*e)}const ige=12;function age(t,e,n){let r=n;for(let i=1;i<ige;i++)r=r-t(r)/e(r);return r}const E2=.001;function sge({duration:t=er.duration,bounce:e=er.bounce,velocity:n=er.velocity,mass:r=er.mass}){let i,a,s=1-e;s=Es(er.minDamping,er.maxDamping,s),t=Es(er.minDuration,er.maxDuration,ga(t)),s<1?(i=l=>{const h=l*s,f=h*t,m=h-n,g=bT(l,s),b=Math.exp(-f);return E2-m/g*b},a=l=>{const f=l*s*t,m=f*n+n,g=Math.pow(s,2)*Math.pow(l,2)*t,b=Math.exp(-f),y=bT(Math.pow(l,2),s);return(-i(l)+E2>0?-1:1)*((m-g)*b)/y}):(i=l=>{const h=Math.exp(-l*t),f=(l-n)*t+1;return-E2+h*f},a=l=>{const h=Math.exp(-l*t),f=(n-l)*(t*t);return h*f});const o=5/t,c=age(i,a,o);if(t=Zi(t),isNaN(c))return{stiffness:er.stiffness,damping:er.damping,duration:t};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:t}}}const oge=["duration","bounce"],lge=["stiffness","damping","mass"];function GL(t,e){return e.some(n=>t[n]!==void 0)}function cge(t){let e={velocity:er.velocity,stiffness:er.stiffness,damping:er.damping,mass:er.mass,isResolvedFromDuration:!1,...t};if(!GL(t,lge)&&GL(t,oge))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Es(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:er.mass,stiffness:i,damping:a}}else{const n=sge({...t,velocity:0});e={...e,...n,mass:er.mass},e.isResolvedFromDuration=!0}return e}function dy(t=er.visualDuration,e=er.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:a},{stiffness:c,damping:l,mass:h,duration:f,velocity:m,isResolvedFromDuration:g}=cge({...n,velocity:-ga(n.velocity||0)}),b=m||0,y=l/(2*Math.sqrt(c*h)),v=s-a,w=ga(Math.sqrt(c/h)),_=Math.abs(v)<5;r||(r=_?er.restSpeed.granular:er.restSpeed.default),i||(i=_?er.restDelta.granular:er.restDelta.default);let E,M,T,A,N,P;if(y<1)T=bT(w,y),A=(b+y*w*v)/T,E=F=>{const D=Math.exp(-y*w*F);return s-D*(A*Math.sin(T*F)+v*Math.cos(T*F))},N=y*w*A+v*T,P=y*w*v-A*T,M=F=>Math.exp(-y*w*F)*(N*Math.sin(T*F)+P*Math.cos(T*F));else if(y===1){E=D=>s-Math.exp(-w*D)*(v+(b+w*v)*D);const F=b+w*v;M=D=>Math.exp(-w*D)*(w*F*D-b)}else{const F=w*Math.sqrt(y*y-1);E=I=>{const U=Math.exp(-y*w*I),k=Math.min(F*I,300);return s-U*((b+y*w*v)*Math.sinh(k)+F*v*Math.cosh(k))/F};const D=(b+y*w*v)/F,L=y*w*D-v*F,q=y*w*v-D*F;M=I=>{const U=Math.exp(-y*w*I),k=Math.min(F*I,300);return U*(L*Math.sinh(k)+q*Math.cosh(k))}}const R={calculatedDuration:g&&f||null,velocity:F=>Zi(M(F)),next:F=>{if(!g&&y<1){const L=Math.exp(-y*w*F),q=Math.sin(T*F),I=Math.cos(T*F),U=s-L*(A*q+v*I),k=Zi(L*(N*q+P*I));return o.done=Math.abs(k)<=r&&Math.abs(s-U)<=i,o.value=o.done?s:U,o}const D=E(F);if(g)o.done=F>=f;else{const L=Zi(M(F));o.done=Math.abs(L)<=r&&Math.abs(s-D)<=i}return o.value=o.done?s:D,o},toString:()=>{const F=Math.min(EP(R),uy),D=V$(L=>R.next(F*L).value,F,30);return F+"ms "+D},toTransition:()=>{}};return R}dy.applyToOptions=t=>{const e=rge(t,100,dy);return t.ease=e.ease,t.duration=Zi(e.duration),t.type="keyframes",t};const uge=5;function H$(t,e,n){const r=Math.max(e-uge,0);return S$(n-t(r),e-r)}function wT({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:h}){const f=t[0],m={done:!1,value:f},g=P=>o!==void 0&&P<o||c!==void 0&&P>c,b=P=>o===void 0?c:c===void 0||Math.abs(o-P)<Math.abs(c-P)?o:c;let y=n*e;const v=f+y,w=s===void 0?v:s(v);w!==v&&(y=w-f);const _=P=>-y*Math.exp(-P/r),E=P=>w+_(P),M=P=>{const R=_(P),F=E(P);m.done=Math.abs(R)<=l,m.value=m.done?w:F};let T,A;const N=P=>{g(m.value)&&(T=P,A=dy({keyframes:[m.value,b(m.value)],velocity:H$(E,P,m.value),damping:i,stiffness:a,restDelta:l,restSpeed:h}))};return N(0),{calculatedDuration:null,next:P=>{let R=!1;return!A&&T===void 0&&(R=!0,M(P),N(P)),T!==void 0&&P>=T?A.next(P-T):(!R&&M(P),m)}}}function dge(t,e,n){const r=[],i=n||xl.mix||$$,a=t.length-1;for(let s=0;s<a;s++){let o=i(t[s],t[s+1]);if(e){const c=Array.isArray(e)?e[s]||va:e;o=um(c,o)}r.push(o)}return r}function fge(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const a=t.length;if(vP(a===e.length),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=dge(e,r,i),c=o.length,l=h=>{if(s&&h<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(h<t[f+1]);f++);const m=Lp(t[f],t[f+1],h);return o[f](m)};return n?h=>l(Es(t[0],t[a-1],h)):l}function hge(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Lp(0,e,r);t.push(zn(n,1,i))}}function pge(t){const e=[0];return hge(e,t.length-1),e}function mge(t,e){return t.map(n=>n*e)}function gge(t,e){return t.map(()=>e||j$).splice(0,t.length-1)}function $h({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=M0e(r)?r.map(UL):UL(r),a={done:!1,value:e[0]},s=mge(n&&n.length===e.length?n:pge(e),t),o=fge(s,e,{ease:Array.isArray(i)?i:gge(e,i)});return{calculatedDuration:t,next:c=>(a.value=o(c),a.done=c>=t,a)}}const vge=t=>t!==null;function mx(t,{repeat:e,repeatType:n="loop"},r,i=1){const a=t.filter(vge),o=i<0||e&&n!=="loop"&&e%2===1?0:a.length-1;return!o||r===void 0?a[o]:r}const yge={decay:wT,inertia:wT,tween:$h,keyframes:$h,spring:dy};function G$(t){typeof t.type=="string"&&(t.type=yge[t.type])}class TP{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 xge=t=>t/100;class fy extends TP{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==hi.now()&&this.tick(hi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;G$(e);const{type:n=$h,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=e;let{keyframes:o}=e;const c=n||$h;c!==$h&&typeof o[0]!="number"&&(this.mixKeyframes=um(xge,$$(o[0],o[1])),o=[0,100]);const l=c({...e,keyframes:o});a==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...o].reverse(),velocity:-s})),l.calculatedDuration===null&&(l.calculatedDuration=EP(l));const{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}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:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:h,repeat:f,repeatType:m,repeatDelay:g,type:b,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const w=this.currentTime-l*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?w<0:w>i;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,M=r;if(f){const P=Math.min(this.currentTime,i)/o;let R=Math.floor(P),F=P%1;!F&&P>=1&&(F=1),F===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(m==="reverse"?(F=1-F,g&&(F-=g/o)):m==="mirror"&&(M=s)),E=Es(0,1,F)*o}let T;_?(this.delayState.value=h[0],T=this.delayState):T=M.next(E),a&&!_&&(T.value=a(T.value));let{done:A}=T;!_&&c!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return N&&b!==wT&&(T.value=mx(h,this.options,v,this.speed)),y&&y(T.value),N&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return ga(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ga(e)}get time(){return ga(this.currentTime)}set time(e){e=Zi(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),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return H$(r=>this.generator.next(r).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(hi.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=ga(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:e=nge,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(a=(i=this.options).onPlay)==null||a.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(hi.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 bge(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const pc=t=>t*180/Math.PI,_T=t=>{const e=pc(Math.atan2(t[1],t[0]));return ST(e)},wge={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:_T,rotateZ:_T,skewX:t=>pc(Math.atan(t[1])),skewY:t=>pc(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ST=t=>(t=t%360,t<0&&(t+=360),t),WL=_T,qL=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),XL=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),_ge={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qL,scaleY:XL,scale:t=>(qL(t)+XL(t))/2,rotateX:t=>ST(pc(Math.atan2(t[6],t[5]))),rotateY:t=>ST(pc(Math.atan2(-t[2],t[0]))),rotateZ:WL,rotate:WL,skewX:t=>pc(Math.atan(t[4])),skewY:t=>pc(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function MT(t){return t.includes("scale")?1:0}function ET(t,e){if(!t||t==="none")return MT(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=_ge,i=n;else{const o=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=wge,i=o}if(!i)return MT(e);const a=r[e],s=i[1].split(",").map(Mge);return typeof a=="function"?a(s):s[a]}const Sge=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ET(n,e)};function Mge(t){return parseFloat(t.trim())}const sf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],of=new Set(sf),KL=t=>t===af||t===Nt,Ege=new Set(["x","y","z"]),Tge=sf.filter(t=>!Ege.has(t));function Age(t){const e=[];return Tge.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const cl={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:r})=>{const i=t.max-t.min;return r==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:r})=>{const i=t.max-t.min;return r==="border-box"?i:i-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})=>ET(e,"x"),y:(t,{transform:e})=>ET(e,"y")};cl.translateX=cl.x;cl.translateY=cl.y;const bc=new Set;let TT=!1,AT=!1,NT=!1;function W$(){if(AT){const t=Array.from(bc).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=Age(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,s])=>{var o;(o=r.getValue(a))==null||o.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}AT=!1,TT=!1,bc.forEach(t=>t.complete(NT)),bc.clear()}function q$(){bc.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(AT=!0)})}function Nge(){NT=!0,q$(),W$(),NT=!1}class AP{constructor(e,n,r,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(bc.add(this),TT||(TT=!0,On.read(q$),On.resolveKeyframes(W$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const a=i==null?void 0:i.get(),s=e[e.length-1];if(a!==void 0)e[0]=a;else if(r&&n){const o=r.readValue(n,s);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=s),i&&a===void 0&&i.set(e[0])}bge(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),bc.delete(this)}cancel(){this.state==="scheduled"&&(bc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Pge=t=>t.startsWith("--");function X$(t,e,n){Pge(e)?t.style.setProperty(e,n):t.style[e]=n}const Cge={};function K$(t,e){const n=_$(t);return()=>Cge[e]??n()}const Rge=K$(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Y$=K$(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Th=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,YL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Th([0,.65,.55,1]),circOut:Th([.55,0,1,.45]),backIn:Th([.31,.01,.66,-.59]),backOut:Th([.33,1.53,.69,.99])};function Z$(t,e){if(t)return typeof t=="function"?Y$()?V$(t,e):"ease-out":O$(t)?Th(t):Array.isArray(t)?t.map(n=>Z$(n,e)||YL.easeOut):YL[t]}function jge(t,e,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const h={[e]:n};c&&(h.offset=c);const f=Z$(o,i);Array.isArray(f)&&(h.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return l&&(m.pseudoElement=l),t.animate(h,m)}function J$(t){return typeof t=="function"&&"applyToOptions"in t}function Oge({type:t,...e}){return J$(t)&&Y$()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Q$ extends TP{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=e;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=e,vP(typeof e.type!="string");const l=Oge(e);this.animation=jge(n,r,i,l,a),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const h=mx(i,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(h),X$(n,r,h),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ga(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ga(e)}get time(){return ga(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Zi(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:r,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Rge()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),va):i(this)}}const eV={anticipate:P$,backInOut:N$,circInOut:R$};function Ige(t){return t in eV}function Dge(t){typeof t.ease=="string"&&Ige(t.ease)&&(t.ease=eV[t.ease])}const T2=10;class kge extends Q${constructor(e){Dge(e),G$(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const o=new fy({...s,autoplay:!1}),c=Math.max(T2,hi.now()-this.startTime),l=Es(0,T2,c-T2),h=o.sample(c).value,{name:f}=this.options;a&&f&&X$(a,f,h),n.setWithVelocity(o.sample(Math.max(0,c-l)).value,h,l),o.stop()}}const ZL=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ha.test(t)||t==="0")&&!t.startsWith("url("));function Lge(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 Fge(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const a=t[t.length-1],s=ZL(i,e),o=ZL(a,e);return!s||!o?!1:Lge(t)||(n==="spring"||J$(n))&&r}function PT(t){t.duration=0,t.type="keyframes"}const tV=new Set(["opacity","clipPath","filter","transform"]),Uge=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Bge(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Uge.test(t[e]))return!0;return!1}const zge=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),$ge=_$(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Vge(t){var f;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:a,type:s,keyframes:o}=t;if(!(((f=e==null?void 0:e.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:h}=e.owner.getProps();return $ge()&&n&&(tV.has(n)||zge.has(n)&&Bge(o))&&(n!=="transform"||!h)&&!l&&!r&&i!=="mirror"&&a!==0&&s!=="inertia"}const Hge=40;class Gge extends TP{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:h,...f}){var b;super(),this.stop=()=>{var y,v;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=hi.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:s,name:c,motionValue:l,element:h,...f},g=(h==null?void 0:h.KeyframeResolver)||AP;this.keyframeResolver=new g(o,(y,v,w)=>this.onKeyframesResolved(y,v,m,!w),c,l,h),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(e,n,r,i){var w,_;this.keyframeResolver=void 0;const{name:a,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:h}=r;this.resolvedAt=hi.now();let f=!0;Fge(e,a,s,o)||(f=!1,(xl.instantAnimations||!c)&&(h==null||h(mx(e,r,n))),e[0]=e[e.length-1],PT(r),r.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Hge?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},b=f&&!l&&Vge(g),y=(_=(w=g.motionValue)==null?void 0:w.owner)==null?void 0:_.current;let v;if(b)try{v=new kge({...g,element:y})}catch{v=new fy(g)}else v=new fy(g);v.finished.then(()=>{this.notifyFinished()}).catch(va),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}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(),Nge()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function nV(t,e,n,r=0,i=1){const a=Array.from(t).sort((l,h)=>l.sortNodePosition(h)).indexOf(e),s=t.size,o=(s-1)*r;return typeof n=="function"?n(a,s):i===1?a*r:o-a*r}const Wge=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qge(t){const e=Wge.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function rV(t,e,n=1){const[r,i]=qge(t);if(!r)return;const a=window.getComputedStyle(e).getPropertyValue(r);if(a){const s=a.trim();return x$(s)?parseFloat(s):s}return wP(i)?rV(i,e,n+1):i}const Xge={type:"spring",stiffness:500,damping:25,restSpeed:10},Kge=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Yge={type:"keyframes",duration:.8},Zge={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jge=(t,{keyframes:e})=>e.length>2?Yge:of.has(t)?t.startsWith("scale")?Kge(e[1]):Xge:Zge;function iV(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function NP(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?iV(n,t):n}const Qge=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function eve(t){for(const e in t)if(!Qge.has(e))return!0;return!1}const PP=(t,e,n,r={},i,a)=>s=>{const o=NP(r,t)||{},c=o.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Zi(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-l,onUpdate:m=>{e.set(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:t,motionValue:e,element:a?void 0:i};eve(o)||Object.assign(h,Jge(t,h)),h.duration&&(h.duration=Zi(h.duration)),h.repeatDelay&&(h.repeatDelay=Zi(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let f=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(PT(h),h.delay===0&&(f=!0)),(xl.instantAnimations||xl.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(f=!0,PT(h),h.delay=0),h.allowFlatten=!o.type&&!o.ease,f&&!a&&e.get()!==void 0){const m=mx(h.keyframes,o);if(m!==void 0){On.update(()=>{h.onUpdate(m),h.onComplete()});return}}return o.isSync?new fy(h):new Gge(h)};function JL(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function CP(t,e,n,r){if(typeof e=="function"){const[i,a]=JL(r);e=e(n!==void 0?n:t.custom,i,a)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,a]=JL(r);e=e(n!==void 0?n:t.custom,i,a)}return e}function wc(t,e,n){const r=t.getProps();return CP(r,e,n!==void 0?n:r.custom,t)}const aV=new Set(["width","height","top","left","right","bottom",...sf]),QL=30,tve=t=>!isNaN(parseFloat(t));class nve{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const i=hi.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=hi.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=tve(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 yP);const r=this.events[e].add(n);return e==="change"?()=>{r(),On.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=hi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>QL)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,QL);return S$(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 Ld(t,e){return new nve(t,e)}const CT=t=>Array.isArray(t);function rve(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ld(n))}function ive(t){return CT(t)?t[t.length-1]||0:t}function ave(t,e){const n=wc(t,e);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const s in a){const o=ive(a[s]);rve(t,s,o)}}const Lr=t=>!!(t&&t.getVelocity);function sve(t){return!!(Lr(t)&&t.add)}function RT(t,e){const n=t.getValue("willChange");if(sve(n))return n.add(e);if(!n&&xl.WillChange){const r=new xl.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function RP(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const ove="framerAppearId",sV="data-"+RP(ove);function oV(t){return t.props[sV]}function lve({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function lV(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:s,...o}=e;const c=t.getDefaultTransition();a=a?iV(a,c):c;const l=a==null?void 0:a.reduceMotion;r&&(a=r);const h=[],f=i&&t.animationState&&t.animationState.getState()[i];for(const m in o){const g=t.getValue(m,t.latestValues[m]??null),b=o[m];if(b===void 0||f&&lve(f,m))continue;const y={delay:n,...NP(a||{},m)},v=g.get();if(v!==void 0&&!g.isAnimating()&&!Array.isArray(b)&&b===v&&!y.velocity){On.update(()=>g.set(b));continue}let w=!1;if(window.MotionHandoffAnimation){const M=oV(t);if(M){const T=window.MotionHandoffAnimation(M,m,On);T!==null&&(y.startTime=T,w=!0)}}RT(t,m);const _=l??t.shouldReduceMotion;g.start(PP(m,g,b,_&&aV.has(m)?{type:!1}:y,t,w));const E=g.animation;E&&h.push(E)}if(s){const m=()=>On.update(()=>{s&&ave(t,s)});h.length?Promise.all(h).then(m):m()}return h}function jT(t,e,n={}){var c;const r=wc(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(lV(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:h=0,staggerChildren:f,staggerDirection:m}=i;return cve(t,e,l,h,f,m,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[l,h]=o==="beforeChildren"?[a,s]:[s,a];return l().then(()=>h())}else return Promise.all([a(),s(n.delay)])}function cve(t,e,n=0,r=0,i=0,a=1,s){const o=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),o.push(jT(c,e,{...s,delay:n+(typeof r=="function"?0:r)+nV(t.variantChildren,c,r,i,a)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(o)}function uve(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(a=>jT(t,a,n));r=Promise.all(i)}else if(typeof e=="string")r=jT(t,e,n);else{const i=typeof e=="function"?wc(t,e,n.custom):e;r=Promise.all(lV(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const dve={test:t=>t==="auto",parse:t=>t},cV=t=>e=>e.test(t),uV=[af,Nt,ys,Jo,L0e,k0e,dve],eF=t=>uV.find(cV(t));function fve(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||w$(t):!0}const hve=new Set(["brightness","contrast","saturate","opacity"]);function pve(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(_P)||[];if(!r)return t;const i=n.replace(r,"");let a=hve.has(e)?1:0;return r!==n&&(a*=100),e+"("+a+i+")"}const mve=/\b([a-z-]*)\(.*?\)/gu,OT={...Ha,getAnimatableNone:t=>{const e=t.match(mve);return e?e.map(pve).join(" "):t}},IT={...Ha,getAnimatableNone:t=>{const e=Ha.parse(t);return Ha.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},tF={...af,transform:Math.round},gve={rotate:Jo,rotateX:Jo,rotateY:Jo,rotateZ:Jo,scale:B0,scaleX:B0,scaleY:B0,scaleZ:B0,skew:Jo,skewX:Jo,skewY:Jo,distance:Nt,translateX:Nt,translateY:Nt,translateZ:Nt,x:Nt,y:Nt,z:Nt,perspective:Nt,transformPerspective:Nt,opacity:Fp,originX:zL,originY:zL,originZ:Nt},jP={borderWidth:Nt,borderTopWidth:Nt,borderRightWidth:Nt,borderBottomWidth:Nt,borderLeftWidth:Nt,borderRadius:Nt,borderTopLeftRadius:Nt,borderTopRightRadius:Nt,borderBottomRightRadius:Nt,borderBottomLeftRadius:Nt,width:Nt,maxWidth:Nt,height:Nt,maxHeight:Nt,top:Nt,right:Nt,bottom:Nt,left:Nt,inset:Nt,insetBlock:Nt,insetBlockStart:Nt,insetBlockEnd:Nt,insetInline:Nt,insetInlineStart:Nt,insetInlineEnd:Nt,padding:Nt,paddingTop:Nt,paddingRight:Nt,paddingBottom:Nt,paddingLeft:Nt,paddingBlock:Nt,paddingBlockStart:Nt,paddingBlockEnd:Nt,paddingInline:Nt,paddingInlineStart:Nt,paddingInlineEnd:Nt,margin:Nt,marginTop:Nt,marginRight:Nt,marginBottom:Nt,marginLeft:Nt,marginBlock:Nt,marginBlockStart:Nt,marginBlockEnd:Nt,marginInline:Nt,marginInlineStart:Nt,marginInlineEnd:Nt,fontSize:Nt,backgroundPositionX:Nt,backgroundPositionY:Nt,...gve,zIndex:tF,fillOpacity:Fp,strokeOpacity:Fp,numOctaves:tF},vve={...jP,color:ur,backgroundColor:ur,outlineColor:ur,fill:ur,stroke:ur,borderColor:ur,borderTopColor:ur,borderRightColor:ur,borderBottomColor:ur,borderLeftColor:ur,filter:OT,WebkitFilter:OT,mask:IT,WebkitMask:IT},dV=t=>vve[t],yve=new Set([OT,IT]);function fV(t,e){let n=dV(t);return yve.has(n)||(n=Ha),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xve=new Set(["auto","none","0"]);function bve(t,e,n){let r=0,i;for(;r<t.length&&!i;){const a=t[r];typeof a=="string"&&!xve.has(a)&&kd(a).values.length&&(i=t[r]),r++}if(i&&n)for(const a of e)t[a]=fV(n,i)}class wve extends AP{constructor(e,n,r,i,a){super(e,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<e.length;h++){let f=e[h];if(typeof f=="string"&&(f=f.trim(),wP(f))){const m=rV(f,n.current);m!==void 0&&(e[h]=m),h===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!aV.has(r)||e.length!==2)return;const[i,a]=e,s=eF(i),o=eF(a),c=BL(i),l=BL(a);if(c!==l&&cl[r]){this.needsMeasurement=!0;return}if(s!==o)if(KL(s)&&KL(o))for(let h=0;h<e.length;h++){const f=e[h];typeof f=="string"&&(e[h]=parseFloat(f))}else cl[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||fve(e[i]))&&r.push(i);r.length&&bve(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cl[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var o;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=r.length-1,s=r[a];r[a]=cl[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{e.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function hV(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const i=(n==null?void 0:n[t])??r.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(r=>r!=null)}const pV=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Dg(t){return b$(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:OP}=I$(queueMicrotask,!1),ka={x:!1,y:!1};function mV(){return ka.x||ka.y}function _ve(t){return t==="x"||t==="y"?ka[t]?null:(ka[t]=!0,()=>{ka[t]=!1}):ka.x||ka.y?null:(ka.x=ka.y=!0,()=>{ka.x=ka.y=!1})}function gV(t,e){const n=hV(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Sve(t){return!(t.pointerType==="touch"||mV())}function Mve(t,e,n={}){const[r,i,a]=gV(t,n);return r.forEach(s=>{let o=!1,c=!1,l;const h=()=>{s.removeEventListener("pointerleave",b)},f=v=>{l&&(l(v),l=void 0),h()},m=v=>{o=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),c&&(c=!1,f(v))},g=()=>{o=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},b=v=>{if(v.pointerType!=="touch"){if(o){c=!0;return}f(v)}},y=v=>{if(!Sve(v))return;c=!1;const w=e(s,v);typeof w=="function"&&(l=w,s.addEventListener("pointerleave",b,i))};s.addEventListener("pointerenter",y,i),s.addEventListener("pointerdown",g,i)}),a}const vV=(t,e)=>e?t===e?!0:vV(t,e.parentElement):!1,IP=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Eve=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Tve(t){return Eve.has(t.tagName)||t.isContentEditable===!0}const Ave=new Set(["INPUT","SELECT","TEXTAREA"]);function Nve(t){return Ave.has(t.tagName)||t.isContentEditable===!0}const kg=new WeakSet;function nF(t){return e=>{e.key==="Enter"&&t(e)}}function A2(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Pve=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=nF(()=>{if(kg.has(n))return;A2(n,"down");const i=nF(()=>{A2(n,"up")}),a=()=>A2(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",a,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function rF(t){return IP(t)&&!mV()}const iF=new WeakSet;function Cve(t,e,n={}){const[r,i,a]=gV(t,n),s=o=>{const c=o.currentTarget;if(!rF(o)||iF.has(o))return;kg.add(c),n.stopPropagation&&iF.add(o);const l=e(c,o),h=(g,b)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),kg.has(c)&&kg.delete(c),rF(g)&&typeof l=="function"&&l(g,{success:b})},f=g=>{h(g,c===window||c===document||n.useGlobalTarget||vV(c,g.target))},m=g=>{h(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,i),Dg(o)&&(o.addEventListener("focus",l=>Pve(l,i)),!Tve(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function DP(t){return b$(t)&&"ownerSVGElement"in t}const Lg=new WeakMap;let Qo;const yV=(t,e,n)=>(r,i)=>i&&i[0]?i[0][t+"Size"]:DP(r)&&"getBBox"in r?r.getBBox()[e]:r[n],Rve=yV("inline","width","offsetWidth"),jve=yV("block","height","offsetHeight");function Ove({target:t,borderBoxSize:e}){var n;(n=Lg.get(t))==null||n.forEach(r=>{r(t,{get width(){return Rve(t,e)},get height(){return jve(t,e)}})})}function Ive(t){t.forEach(Ove)}function Dve(){typeof ResizeObserver>"u"||(Qo=new ResizeObserver(Ive))}function kve(t,e){Qo||Dve();const n=hV(t);return n.forEach(r=>{let i=Lg.get(r);i||(i=new Set,Lg.set(r,i)),i.add(e),Qo==null||Qo.observe(r)}),()=>{n.forEach(r=>{const i=Lg.get(r);i==null||i.delete(e),i!=null&&i.size||Qo==null||Qo.unobserve(r)})}}const Fg=new Set;let Xu;function Lve(){Xu=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Fg.forEach(e=>e(t))},window.addEventListener("resize",Xu)}function Fve(t){return Fg.add(t),Xu||Lve(),()=>{Fg.delete(t),!Fg.size&&typeof Xu=="function"&&(window.removeEventListener("resize",Xu),Xu=void 0)}}function aF(t,e){return typeof t=="function"?Fve(t):kve(t,e)}function Uve(t){return DP(t)&&t.tagName==="svg"}const Bve=[...uV,ur,Ha],zve=t=>Bve.find(cV(t)),sF=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ku=()=>({x:sF(),y:sF()}),oF=()=>({min:0,max:0}),vr=()=>({x:oF(),y:oF()}),$ve=new WeakMap;function gx(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Up(t){return typeof t=="string"||Array.isArray(t)}const kP=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],LP=["initial",...kP];function vx(t){return gx(t.animate)||LP.some(e=>Up(t[e]))}function xV(t){return!!(vx(t)||t.variants)}function Vve(t,e,n){for(const r in e){const i=e[r],a=n[r];if(Lr(i))t.addValue(r,i);else if(Lr(a))t.addValue(r,Ld(i,{owner:t}));else if(a!==i)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=t.getStaticValue(r);t.addValue(r,Ld(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const DT={current:null},bV={current:!1},Hve=typeof window<"u";function Gve(){if(bV.current=!0,!!Hve)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>DT.current=t.matches;t.addEventListener("change",e),e()}else DT.current=!1}const lF=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let hy={};function wV(t){hy=t}function Wve(){return hy}class qve{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:s,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=AP,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=hi.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,On.render(this.render,!1,!0))};const{latestValues:l,renderState:h}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=h,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=vx(n),this.isVariantNode=xV(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in m){const b=m[g];l[g]!==void 0&&Lr(b)&&b.set(l[g])}}mount(e){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,$ve.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(bV.current||Gve(),this.shouldReduceMotion=DT.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),bl(this.notifyUpdate),bl(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 r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&tV.has(e)&&this.current instanceof HTMLElement){const{factory:s,keyframes:o,times:c,ease:l,duration:h}=n.accelerate,f=new Q$({element:this.current,name:e,keyframes:o,times:c,ease:l,duration:Zi(h)}),m=s(f);this.valueSubscriptions.set(e,()=>{m(),f.cancel()});return}const r=of.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&On.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),a&&a(),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 hy){const n=hy[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vr()}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 r=0;r<lF.length;r++){const i=lF[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,s=e[a];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=Vve(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 r=this.values.get(e);n!==r&&(r&&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 r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Ld(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(x$(r)||w$(r))?r=parseFloat(r):!zve(r)&&Ha.test(n)&&(r=fV(e,n)),this.setBaseTarget(e,Lr(r)?r.get():r)),Lr(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=CP(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);s&&(r=s[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Lr(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new yP),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){OP.render(this.render)}}class _V extends qve{constructor(){super(...arguments),this.KeyframeResolver=wve}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Lr(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Nl{constructor(e){this.isMounted=!1,this.node=e}update(){}}function SV({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Xve({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Kve(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function N2(t){return t===void 0||t===1}function kT({scale:t,scaleX:e,scaleY:n}){return!N2(t)||!N2(e)||!N2(n)}function nc(t){return kT(t)||MV(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function MV(t){return cF(t.x)||cF(t.y)}function cF(t){return t&&t!=="0%"}function py(t,e,n){const r=t-n,i=e*r;return n+i}function uF(t,e,n,r,i){return i!==void 0&&(t=py(t,i,r)),py(t,n,r)+e}function LT(t,e=0,n=1,r,i){t.min=uF(t.min,e,n,r,i),t.max=uF(t.max,e,n,r,i)}function EV(t,{x:e,y:n}){LT(t.x,e.translate,e.scale,e.originPoint),LT(t.y,n.translate,n.scale,n.originPoint)}const dF=.999999999999,fF=1.0000000000001;function Yve(t,e,n,r=!1){var o;const i=n.length;if(!i)return;e.x=e.y=1;let a,s;for(let c=0;c<i;c++){a=n[c],s=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(is(t.x,-a.scroll.offset.x),is(t.y,-a.scroll.offset.y)),s&&(e.x*=s.x.scale,e.y*=s.y.scale,EV(t,s)),r&&nc(a.latestValues)&&Ug(t,a.latestValues,(o=a.layout)==null?void 0:o.layoutBox))}e.x<fF&&e.x>dF&&(e.x=1),e.y<fF&&e.y>dF&&(e.y=1)}function is(t,e){t.min+=e,t.max+=e}function hF(t,e,n,r,i=.5){const a=zn(t.min,t.max,i);LT(t,e,n,a,r)}function pF(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Ug(t,e,n){const r=n??t;hF(t.x,pF(e.x,r.x),e.scaleX,e.scale,e.originX),hF(t.y,pF(e.y,r.y),e.scaleY,e.scale,e.originY)}function TV(t,e){return SV(Kve(t.getBoundingClientRect(),e))}function Zve(t,e,n){const r=TV(t,n),{scroll:i}=e;return i&&(is(r.x,i.offset.x),is(r.y,i.offset.y)),r}const Jve={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qve=sf.length;function eye(t,e,n){let r="",i=!0;for(let a=0;a<Qve;a++){const s=sf[a],o=t[s];if(o===void 0)continue;let c=!0;if(typeof o=="number")c=o===(s.startsWith("scale")?1:0);else{const l=parseFloat(o);c=s.startsWith("scale")?l===1:l===0}if(!c||n){const l=pV(o,jP[s]);if(!c){i=!1;const h=Jve[s]||s;r+=`${h}(${l}) `}n&&(e[s]=l)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function FP(t,e,n){const{style:r,vars:i,transformOrigin:a}=t;let s=!1,o=!1;for(const c in e){const l=e[c];if(of.has(c)){s=!0;continue}else if(k$(c)){i[c]=l;continue}else{const h=pV(l,jP[c]);c.startsWith("origin")?(o=!0,a[c]=h):r[c]=h}}if(e.transform||(s||n?r.transform=eye(e,t.transform,n):r.transform&&(r.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:h=0}=a;r.transformOrigin=`${c} ${l} ${h}`}}function AV(t,{style:e,vars:n},r,i){const a=t.style;let s;for(s in e)a[s]=e[s];i==null||i.applyProjectionStyles(a,r);for(s in n)a.setProperty(s,n[s])}function mF(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ah={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Nt.test(t))t=parseFloat(t);else return t;const n=mF(t,e.target.x),r=mF(t,e.target.y);return`${n}% ${r}%`}},tye={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Ha.parse(t);if(i.length>5)return r;const a=Ha.createTransformer(t),s=typeof i[0]!="number"?1:0,o=n.x.scale*e.x,c=n.y.scale*e.y;i[0+s]/=o,i[1+s]/=c;const l=zn(o,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=l),typeof i[3+s]=="number"&&(i[3+s]/=l),a(i)}},FT={borderRadius:{...ah,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ah,borderTopRightRadius:ah,borderBottomLeftRadius:ah,borderBottomRightRadius:ah,boxShadow:tye};function NV(t,{layout:e,layoutId:n}){return of.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!FT[t]||t==="opacity")}function UP(t,e,n){var s;const r=t.style,i=e==null?void 0:e.style,a={};if(!r)return a;for(const o in r)(Lr(r[o])||i&&Lr(i[o])||NV(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(a[o]=r[o]);return a}function nye(t){return window.getComputedStyle(t)}class rye extends _V{constructor(){super(...arguments),this.type="html",this.renderInstance=AV}readValueFromInstance(e,n){var r;if(of.has(n))return(r=this.projection)!=null&&r.isProjecting?MT(n):Sge(e,n);{const i=nye(e),a=(k$(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(e,{transformPagePoint:n}){return TV(e,n)}build(e,n,r){FP(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return UP(e,n,r)}}const iye={offset:"stroke-dashoffset",array:"stroke-dasharray"},aye={offset:"strokeDashoffset",array:"strokeDasharray"};function sye(t,e,n=1,r=0,i=!0){t.pathLength=1;const a=i?iye:aye;t[a.offset]=`${-r}`,t[a.array]=`${e} ${n}`}const oye=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function PV(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...o},c,l,h){if(FP(t,o,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m}=t;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete f.transformBox);for(const g of oye)f[g]!==void 0&&(m[g]=f[g],delete f[g]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&sye(f,i,a,s,!1)}const CV=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"]),RV=t=>typeof t=="string"&&t.toLowerCase()==="svg";function lye(t,e,n,r){AV(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(CV.has(i)?i:RP(i),e.attrs[i])}function jV(t,e,n){const r=UP(t,e,n);for(const i in t)if(Lr(t[i])||Lr(e[i])){const a=sf.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=t[i]}return r}class cye extends _V{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vr}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(of.has(n)){const r=dV(n);return r&&r.default||0}return n=CV.has(n)?n:RP(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return jV(e,n,r)}build(e,n,r){PV(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){lye(e,n,r,i)}mount(e){this.isSVGTag=RV(e.tagName),super.mount(e)}}const uye=LP.length;function OV(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?OV(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<uye;n++){const r=LP[n],i=t.props[r];(Up(i)||i===!1)&&(e[r]=i)}return e}function IV(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const dye=[...kP].reverse(),fye=kP.length;function hye(t){return e=>Promise.all(e.map(({animation:n,options:r})=>uve(t,n,r)))}function pye(t){let e=hye(t),n=gF(),r=!0,i=!1;const a=l=>(h,f)=>{var g;const m=wc(t,f,l==="exit"?(g=t.presenceContext)==null?void 0:g.custom:void 0);if(m){const{transition:b,transitionEnd:y,...v}=m;h={...h,...v,...y}}return h};function s(l){e=l(t)}function o(l){const{props:h}=t,f=OV(t.parent)||{},m=[],g=new Set;let b={},y=1/0;for(let w=0;w<fye;w++){const _=dye[w],E=n[_],M=h[_]!==void 0?h[_]:f[_],T=Up(M),A=_===l?E.isActive:null;A===!1&&(y=w);let N=M===f[_]&&M!==h[_]&&T;if(N&&(r||i)&&t.manuallyAnimateOnMount&&(N=!1),E.protectedKeys={...b},!E.isActive&&A===null||!M&&!E.prevProp||gx(M)||typeof M=="boolean")continue;if(_==="exit"&&E.isActive&&A!==!0){E.prevResolvedValues&&(b={...b,...E.prevResolvedValues});continue}const P=mye(E.prevProp,M);let R=P||_===l&&E.isActive&&!N&&T||w>y&&T,F=!1;const D=Array.isArray(M)?M:[M];let L=D.reduce(a(_),{});A===!1&&(L={});const{prevResolvedValues:q={}}=E,I={...q,...L},U=$=>{R=!0,g.has($)&&(F=!0,g.delete($)),E.needsAnimating[$]=!0;const Y=t.getValue($);Y&&(Y.liveStyle=!1)};for(const $ in I){const Y=L[$],J=q[$];if(b.hasOwnProperty($))continue;let W=!1;CT(Y)&&CT(J)?W=!IV(Y,J):W=Y!==J,W?Y!=null?U($):g.add($):Y!==void 0&&g.has($)?U($):E.protectedKeys[$]=!0}E.prevProp=M,E.prevResolvedValues=L,E.isActive&&(b={...b,...L}),(r||i)&&t.blockInitialAnimation&&(R=!1);const k=N&&P;R&&(!k||F)&&m.push(...D.map($=>{const Y={type:_};if(typeof $=="string"&&(r||i)&&!k&&t.manuallyAnimateOnMount&&t.parent){const{parent:J}=t,W=wc(J,$);if(J.enteringChildren&&W){const{delayChildren:H}=W.transition||{};Y.delay=nV(J.enteringChildren,t,H)}}return{animation:$,options:Y}}))}if(g.size){const w={};if(typeof h.initial!="boolean"){const _=wc(t,Array.isArray(h.initial)?h.initial[0]:h.initial);_&&_.transition&&(w.transition=_.transition)}g.forEach(_=>{const E=t.getBaseTarget(_),M=t.getValue(_);M&&(M.liveStyle=!0),w[_]=E??null}),m.push({animation:w})}let v=!!m.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(v=!1),r=!1,i=!1,v?e(m):Promise.resolve()}function c(l,h){var m;if(n[l].isActive===h)return Promise.resolve();(m=t.variantChildren)==null||m.forEach(g=>{var b;return(b=g.animationState)==null?void 0:b.setActive(l,h)}),n[l].isActive=h;const f=o(l);for(const g in n)n[g].protectedKeys={};return f}return{animateChanges:o,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=gF(),i=!0}}}function mye(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!IV(e,t):!1}function Gl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gF(){return{animate:Gl(!0),whileInView:Gl(),whileHover:Gl(),whileTap:Gl(),whileDrag:Gl(),whileFocus:Gl(),exit:Gl()}}function UT(t,e){t.min=e.min,t.max=e.max}function ja(t,e){UT(t.x,e.x),UT(t.y,e.y)}function vF(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const DV=1e-4,gye=1-DV,vye=1+DV,kV=.01,yye=0-kV,xye=0+kV;function pi(t){return t.max-t.min}function bye(t,e,n){return Math.abs(t-e)<=n}function yF(t,e,n,r=.5){t.origin=r,t.originPoint=zn(e.min,e.max,t.origin),t.scale=pi(n)/pi(e),t.translate=zn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=gye&&t.scale<=vye||isNaN(t.scale))&&(t.scale=1),(t.translate>=yye&&t.translate<=xye||isNaN(t.translate))&&(t.translate=0)}function Vh(t,e,n,r){yF(t.x,e.x,n.x,r?r.originX:void 0),yF(t.y,e.y,n.y,r?r.originY:void 0)}function xF(t,e,n,r=0){const i=r?zn(n.min,n.max,r):n.min;t.min=i+e.min,t.max=t.min+pi(e)}function wye(t,e,n,r){xF(t.x,e.x,n.x,r==null?void 0:r.x),xF(t.y,e.y,n.y,r==null?void 0:r.y)}function bF(t,e,n,r=0){const i=r?zn(n.min,n.max,r):n.min;t.min=e.min-i,t.max=t.min+pi(e)}function my(t,e,n,r){bF(t.x,e.x,n.x,r==null?void 0:r.x),bF(t.y,e.y,n.y,r==null?void 0:r.y)}function wF(t,e,n,r,i){return t-=e,t=py(t,1/n,r),i!==void 0&&(t=py(t,1/i,r)),t}function _ye(t,e=0,n=1,r=.5,i,a=t,s=t){if(ys.test(e)&&(e=parseFloat(e),e=zn(s.min,s.max,e/100)-s.min),typeof e!="number")return;let o=zn(a.min,a.max,r);t===a&&(o-=e),t.min=wF(t.min,e,n,o,i),t.max=wF(t.max,e,n,o,i)}function _F(t,e,[n,r,i],a,s){_ye(t,e[n],e[r],e[i],e.scale,a,s)}const Sye=["x","scaleX","originX"],Mye=["y","scaleY","originY"];function SF(t,e,n,r){_F(t.x,e,Sye,n?n.x:void 0,r?r.x:void 0),_F(t.y,e,Mye,n?n.y:void 0,r?r.y:void 0)}function MF(t){return t.translate===0&&t.scale===1}function LV(t){return MF(t.x)&&MF(t.y)}function EF(t,e){return t.min===e.min&&t.max===e.max}function Eye(t,e){return EF(t.x,e.x)&&EF(t.y,e.y)}function TF(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function FV(t,e){return TF(t.x,e.x)&&TF(t.y,e.y)}function AF(t){return pi(t.x)/pi(t.y)}function NF(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function rs(t){return[t("x"),t("y")]}function Tye(t,e,n){let r="";const i=t.x.translate/e.x,a=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((i||a||s)&&(r=`translate3d(${i}px, ${a}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:h,rotateX:f,rotateY:m,skewX:g,skewY:b}=n;l&&(r=`perspective(${l}px) ${r}`),h&&(r+=`rotate(${h}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),b&&(r+=`skewY(${b}deg) `)}const o=t.x.scale*e.x,c=t.y.scale*e.y;return(o!==1||c!==1)&&(r+=`scale(${o}, ${c})`),r||"none"}const UV=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Aye=UV.length,PF=t=>typeof t=="string"?parseFloat(t):t,CF=t=>typeof t=="number"||Nt.test(t);function Nye(t,e,n,r,i,a){i?(t.opacity=zn(0,n.opacity??1,Pye(r)),t.opacityExit=zn(e.opacity??1,0,Cye(r))):a&&(t.opacity=zn(e.opacity??1,n.opacity??1,r));for(let s=0;s<Aye;s++){const o=UV[s];let c=RF(e,o),l=RF(n,o);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||CF(c)===CF(l)?(t[o]=Math.max(zn(PF(c),PF(l),r),0),(ys.test(l)||ys.test(c))&&(t[o]+="%")):t[o]=l}(e.rotate||n.rotate)&&(t.rotate=zn(e.rotate||0,n.rotate||0,r))}function RF(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Pye=BV(0,.5,C$),Cye=BV(.5,.95,va);function BV(t,e,n){return r=>r<t?0:r>e?1:n(Lp(t,e,r))}function Rye(t,e,n){const r=Lr(t)?t:Ld(t);return r.start(PP("",r,e,n)),r.animation}function Bp(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const jye=(t,e)=>t.depth-e.depth;class Oye{constructor(){this.children=[],this.isDirty=!1}add(e){gP(this.children,e),this.isDirty=!0}remove(e){ly(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jye),this.isDirty=!1,this.children.forEach(e)}}function Iye(t,e){const n=hi.now(),r=({timestamp:i})=>{const a=i-n;a>=e&&(bl(r),t(a-e))};return On.setup(r,!0),()=>bl(r)}function Bg(t){return Lr(t)?t.get():t}class Dye{constructor(){this.members=[]}add(e){gP(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(ly(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(ly(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){var n;for(let r=this.members.indexOf(e)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:a}=r.options,{layoutDependency:s}=e.options;(a===void 0||a!==s)&&(e.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,r,i,a,s;(r=(n=e.options).onExitComplete)==null||r.call(n),(s=(i=e.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||s.call(a)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const zg={hasAnimatedSinceResize:!0,hasEverUpdated:!1},P2=["","X","Y","Z"],kye=1e3;let Lye=0;function C2(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function zV(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=oV(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",On,!(i||a))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&zV(r)}function $V({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=e==null?void 0:e()){this.id=Lye++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Bye),this.nodes.forEach(Wye),this.nodes.forEach(qye),this.nodes.forEach(zye)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Oye)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new yP),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const c=this.eventHandlers.get(s);c&&c.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=DP(s)&&!Uve(s),this.instance=s;const{layoutId:o,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),t){let h,f=0;const m=()=>this.root.updateBlockedByResize=!1;On.read(()=>{f=window.innerWidth}),t(s,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,h&&h(),h=Iye(m,250),zg.hasAnimatedSinceResize&&(zg.hasAnimatedSinceResize=!1,this.nodes.forEach(IF)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||l.getDefaultTransition()||Jye,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=l.getProps(),w=!this.targetLayout||!FV(this.targetLayout,g),_=!f&&m;if(this.options.layoutRoot||this.resumeFrom||_||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...NP(b,"layout"),onPlay:y,onComplete:v};(l.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(h,_)}else f||IF(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),bl(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(Xye),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zV(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const f=this.path[h];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(Vye),this.nodes.forEach(jF);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(OF);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hye),this.nodes.forEach(Gye),this.nodes.forEach(Fye),this.nodes.forEach(Uye)):this.nodes.forEach(OF),this.clearAllSnapshots();const o=hi.now();kr.delta=Es(0,1e3/60,o-kr.timestamp),kr.timestamp=o,kr.isProcessing=!0,w2.update.process(kr),w2.preRender.process(kr),w2.render.process(kr),kr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,OP.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($ye),this.sharedNodes.forEach(Kye)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,On.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){On.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pi(this.snapshot.measuredBox.x)&&!pi(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=vr()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!LV(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,h=l!==this.prevTransformTemplateValue;s&&this.instance&&(o||nc(this.latestValues)||h)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return s&&(c=this.removeTransform(c)),Qye(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:s}=this.options;if(!s)return vr();const o=s.measureViewportBox();if(!(((l=this.scroll)==null?void 0:l.wasRoot)||this.path.some(exe))){const{scroll:h}=this.root;h&&(is(o.x,h.offset.x),is(o.y,h.offset.y))}return o}removeElementScroll(s){var c;const o=vr();if(ja(o,s),(c=this.scroll)!=null&&c.wasRoot)return o;for(let l=0;l<this.path.length;l++){const h=this.path[l],{scroll:f,options:m}=h;h!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&ja(o,s),is(o.x,f.offset.x),is(o.y,f.offset.y))}return o}applyTransform(s,o=!1,c){var h,f;const l=c||vr();ja(l,s);for(let m=0;m<this.path.length;m++){const g=this.path[m];!o&&g.options.layoutScroll&&g.scroll&&g!==g.root&&(is(l.x,-g.scroll.offset.x),is(l.y,-g.scroll.offset.y)),nc(g.latestValues)&&Ug(l,g.latestValues,(h=g.layout)==null?void 0:h.layoutBox)}return nc(this.latestValues)&&Ug(l,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),l}removeTransform(s){var c;const o=vr();ja(o,s);for(let l=0;l<this.path.length;l++){const h=this.path[l];if(!nc(h.latestValues))continue;let f;h.instance&&(kT(h.latestValues)&&h.updateSnapshot(),f=vr(),ja(f,h.measurePageBox())),SF(o,h.latestValues,(c=h.snapshot)==null?void 0:c.layoutBox,f)}return nc(this.latestValues)&&SF(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==kr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var g;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!this.layout||!(h||f))return;this.resolvedRelativeTargetAt=kr.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vr(),this.targetWithTransforms=vr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wye(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ja(this.target,this.layout.layoutBox),EV(this.target,this.targetDelta)):ja(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||kT(this.parent.latestValues)||MV(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,o,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vr(),this.relativeTargetOrigin=vr(),my(this.relativeTargetOrigin,o,c,this.options.layoutAnchor||void 0),ja(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var b;const s=this.getLead(),o=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===kr.timestamp&&(c=!1),c)return;const{layout:l,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||h))return;ja(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Yve(this.layoutCorrected,this.treeScale,this.path,o),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=vr());const{target:g}=s;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vF(this.prevProjectionDelta.x,this.projectionDelta.x),vF(this.prevProjectionDelta.y,this.projectionDelta.y)),Vh(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!NF(this.projectionDelta.x,this.prevProjectionDelta.x)||!NF(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ku(),this.projectionDelta=Ku(),this.projectionDeltaWithTransform=Ku()}setAnimationOrigin(s,o=!1){const c=this.snapshot,l=c?c.latestValues:{},h={...this.latestValues},f=Ku();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const m=vr(),g=c?c.source:void 0,b=this.layout?this.layout.source:void 0,y=g!==b,v=this.getStack(),w=!v||v.members.length<=1,_=!!(y&&!w&&this.options.crossfade===!0&&!this.path.some(Zye));this.animationProgress=0;let E;this.mixTargetDelta=M=>{const T=M/1e3;DF(f.x,s.x,T),DF(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(my(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Yye(this.relativeTarget,this.relativeTargetOrigin,m,T),E&&Eye(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=vr()),ja(E,this.relativeTarget)),y&&(this.animationValues=h,Nye(h,l,this.latestValues,T,_,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var o,c,l;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(l=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||l.stop(),this.pendingAnimation&&(bl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=On.update(()=>{zg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ld(0)),this.motionValue.jump(0,!1),this.currentAnimation=Rye(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),s.onUpdate&&s.onUpdate(h)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(kye),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:c,layout:l,latestValues:h}=s;if(!(!o||!c||!l)){if(this!==s&&this.layout&&l&&VV(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||vr();const f=pi(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const m=pi(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+m}ja(o,c),Ug(o,h),Vh(this.projectionDeltaWithTransform,this.layoutCorrected,o,h)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Dye),this.sharedNodes.get(s).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const l={};c.z&&C2("z",s,l,this.animationValues);for(let h=0;h<P2.length;h++)C2(`rotate${P2[h]}`,s,l,this.animationValues),C2(`skew${P2[h]}`,s,l,this.animationValues);s.render();for(const h in l)s.setStaticValue(h,l[h]),this.animationValues&&(this.animationValues[h]=l[h]);s.scheduleRender()}applyProjectionStyles(s,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Bg(o==null?void 0:o.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Bg(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!nc(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const h=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=Tye(this.projectionDeltaWithTransform,this.treeScale,h);c&&(f=c(h,f)),s.transform=f;const{x:m,y:g}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,l.animationValues?s.opacity=l===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:s.opacity=l===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const b in FT){if(h[b]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:w}=FT[b],_=f==="none"?h[b]:y(h[b],l);if(v){const E=v.length;for(let M=0;M<E;M++)s[v[M]]=_}else w?this.options.visualElement.renderState.vars[b]=_:s[b]=_}this.options.layoutId&&(s.pointerEvents=l===this?Bg(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(jF),this.root.sharedNodes.clear()}}}function Fye(t){t.updateLayout()}function Uye(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:r,measuredBox:i}=t.layout,{animationType:a}=t.options,s=e.source!==t.layout.source;if(a==="size")rs(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=pi(m);m.min=r[f].min,m.max=m.min+g});else if(a==="x"||a==="y"){const f=a==="x"?"y":"x";UT(s?e.measuredBox[f]:e.layoutBox[f],r[f])}else VV(a,e.layoutBox,r)&&rs(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=pi(r[f]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+g)});const o=Ku();Vh(o,r,e.layoutBox);const c=Ku();s?Vh(c,t.applyTransform(i,!0),e.measuredBox):Vh(c,r,e.layoutBox);const l=!LV(o);let h=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:g}=f;if(m&&g){const b=t.options.layoutAnchor||void 0,y=vr();my(y,e.layoutBox,m.layoutBox,b);const v=vr();my(v,r,g.layoutBox,b),FV(y,v)||(h=!0),f.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=y,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Bye(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 zye(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $ye(t){t.clearSnapshot()}function jF(t){t.clearMeasurements()}function Vye(t){t.isLayoutDirty=!0,t.updateLayout()}function OF(t){t.isLayoutDirty=!1}function Hye(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Gye(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function IF(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Wye(t){t.resolveTargetDelta()}function qye(t){t.calcProjection()}function Xye(t){t.resetSkewAndRotation()}function Kye(t){t.removeLeadSnapshot()}function DF(t,e,n){t.translate=zn(e.translate,0,n),t.scale=zn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function kF(t,e,n,r){t.min=zn(e.min,n.min,r),t.max=zn(e.max,n.max,r)}function Yye(t,e,n,r){kF(t.x,e.x,n.x,r),kF(t.y,e.y,n.y,r)}function Zye(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Jye={duration:.45,ease:[.4,0,.1,1]},LF=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),FF=LF("applewebkit/")&&!LF("chrome/")?Math.round:va;function UF(t){t.min=FF(t.min),t.max=FF(t.max)}function Qye(t){UF(t.x),UF(t.y)}function VV(t,e,n){return t==="position"||t==="preserve-aspect"&&!bye(AF(e),AF(n),.2)}function exe(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const txe=$V({attachResizeListener:(t,e)=>Bp(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),R2={current:void 0},HV=$V({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!R2.current){const t=new txe({});t.mount(window),t.setOptions({layoutScroll:!0}),R2.current=t}return R2.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),BP=O.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function BF(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function nxe(...t){return e=>{let n=!1;const r=t.map(i=>{const a=BF(i,e);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():BF(t[i],null)}}}}function rxe(...t){return O.useCallback(nxe(...t),t)}class ixe extends O.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Dg(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Dg(r)&&r.offsetWidth||0,a=Dg(r)&&r.offsetHeight||0,s=getComputedStyle(n),o=this.props.sizeRef.current;o.height=parseFloat(s.height),o.width=parseFloat(s.width),o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left,o.bottom=a-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function axe({children:t,isPresent:e,anchorX:n,anchorY:r,root:i,pop:a}){var m;const s=O.useId(),o=O.useRef(null),c=O.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=O.useContext(BP),h=((m=t.props)==null?void 0:m.ref)??(t==null?void 0:t.ref),f=rxe(o,h);return O.useInsertionEffect(()=>{const{width:g,height:b,top:y,left:v,right:w,bottom:_}=c.current;if(e||a===!1||!o.current||!g||!b)return;const E=n==="left"?`left: ${v}`:`right: ${w}`,M=r==="bottom"?`bottom: ${_}`:`top: ${y}`;o.current.dataset.motionPopId=s;const T=document.createElement("style");l&&(T.nonce=l);const A=i??document.head;return A.appendChild(T),T.sheet&&T.sheet.insertRule(`
[data-motion-pop-id="${s}"] {
position: absolute !important;
width: ${g}px !important;
height: ${b}px !important;
${E}px !important;
${M}px !important;
}
`),()=>{var N;(N=o.current)==null||N.removeAttribute("data-motion-pop-id"),A.contains(T)&&A.removeChild(T)}},[e]),d.jsx(ixe,{isPresent:e,childRef:o,sizeRef:c,pop:a,children:a===!1?t:O.cloneElement(t,{ref:f})})}const sxe=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:s,anchorX:o,anchorY:c,root:l})=>{const h=mP(oxe),f=O.useId();let m=!0,g=O.useMemo(()=>(m=!1,{id:f,initial:e,isPresent:n,custom:i,onExitComplete:b=>{h.set(b,!0);for(const y of h.values())if(!y)return;r&&r()},register:b=>(h.set(b,!1),()=>h.delete(b))}),[n,h,r]);return a&&m&&(g={...g}),O.useMemo(()=>{h.forEach((b,y)=>h.set(y,!1))},[n]),O.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),t=d.jsx(axe,{pop:s==="popLayout",isPresent:n,anchorX:o,anchorY:c,root:l,children:t}),d.jsx(px.Provider,{value:g,children:t})};function oxe(){return new Map}function GV(t=!0){const e=O.useContext(px);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,a=O.useId();O.useEffect(()=>{if(t)return i(a)},[t]);const s=O.useCallback(()=>t&&r&&r(a),[a,r,t]);return!n&&r?[!1,s]:[!0]}const z0=t=>t.key||"";function zF(t){const e=[];return O.Children.forEach(t,n=>{O.isValidElement(n)&&e.push(n)}),e}const mi=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:s=!1,anchorX:o="left",anchorY:c="top",root:l})=>{const[h,f]=GV(s),m=O.useMemo(()=>zF(t),[t]),g=s&&!h?[]:m.map(z0),b=O.useRef(!0),y=O.useRef(m),v=mP(()=>new Map),w=O.useRef(new Set),[_,E]=O.useState(m),[M,T]=O.useState(m);y$(()=>{b.current=!1,y.current=m;for(let P=0;P<M.length;P++){const R=z0(M[P]);g.includes(R)?(v.delete(R),w.current.delete(R)):v.get(R)!==!0&&v.set(R,!1)}},[M,g.length,g.join("-")]);const A=[];if(m!==_){let P=[...m];for(let R=0;R<M.length;R++){const F=M[R],D=z0(F);g.includes(D)||(P.splice(R,0,F),A.push(F))}return a==="wait"&&A.length&&(P=A),T(zF(P)),E(m),null}const{forceRender:N}=O.useContext(pP);return d.jsx(d.Fragment,{children:M.map(P=>{const R=z0(P),F=s&&!h?!1:m===M||g.includes(R),D=()=>{if(w.current.has(R))return;if(v.has(R))w.current.add(R),v.set(R,!0);else return;let L=!0;v.forEach(q=>{q||(L=!1)}),L&&(N==null||N(),T(y.current),s&&(f==null||f()),r&&r())};return d.jsx(sxe,{isPresent:F,initial:!b.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:F?void 0:D,anchorX:o,anchorY:c,children:P},R)})})},WV=O.createContext({strict:!1}),$F={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let VF=!1;function lxe(){if(VF)return;const t={};for(const e in $F)t[e]={isEnabled:n=>$F[e].some(r=>!!n[r])};wV(t),VF=!0}function qV(){return lxe(),Wve()}function cxe(t){const e=qV();for(const n in t)e[n]={...e[n],...t[n]};wV(e)}const uxe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function gy(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||uxe.has(t)}let XV=t=>!gy(t);function dxe(t){typeof t=="function"&&(XV=e=>e.startsWith("on")?!gy(e):t(e))}try{dxe(require("@emotion/is-prop-valid").default)}catch{}function fxe(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||Lr(t[i])||(XV(i)||n===!0&&gy(i)||!e&&!gy(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const yx=O.createContext({});function hxe(t,e){if(vx(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Up(n)?n:void 0,animate:Up(r)?r:void 0}}return t.inherit!==!1?e:{}}function pxe(t){const{initial:e,animate:n}=hxe(t,O.useContext(yx));return O.useMemo(()=>({initial:e,animate:n}),[HF(e),HF(n)])}function HF(t){return Array.isArray(t)?t.join(" "):t}const zP=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function KV(t,e,n){for(const r in e)!Lr(e[r])&&!NV(r,n)&&(t[r]=e[r])}function mxe({transformTemplate:t},e){return O.useMemo(()=>{const n=zP();return FP(n,e,t),Object.assign({},n.vars,n.style)},[e])}function gxe(t,e){const n=t.style||{},r={};return KV(r,n,t),Object.assign(r,mxe(t,e)),r}function vxe(t,e){const n={},r=gxe(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const YV=()=>({...zP(),attrs:{}});function yxe(t,e,n,r){const i=O.useMemo(()=>{const a=YV();return PV(a,e,RV(r),t.transformTemplate,t.style),{...a.attrs,style:{...a.style}}},[e]);if(t.style){const a={};KV(a,t.style,t),i.style={...a,...i.style}}return i}const xxe=["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 $P(t){return typeof t!="string"||t.includes("-")?!1:!!(xxe.indexOf(t)>-1||/[A-Z]/u.test(t))}function bxe(t,e,n,{latestValues:r},i,a=!1,s){const c=(s??$P(t)?yxe:vxe)(e,r,i,t),l=fxe(e,typeof t=="string",a),h=t!==O.Fragment?{...l,...c,ref:n}:{},{children:f}=e,m=O.useMemo(()=>Lr(f)?f.get():f,[f]);return O.createElement(t,{...h,children:m})}function wxe({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:_xe(n,r,i,t),renderState:e()}}function _xe(t,e,n,r){const i={},a=r(t,{});for(const m in a)i[m]=Bg(a[m]);let{initial:s,animate:o}=t;const c=vx(t),l=xV(t);e&&l&&!c&&t.inherit!==!1&&(s===void 0&&(s=e.initial),o===void 0&&(o=e.animate));let h=n?n.initial===!1:!1;h=h||s===!1;const f=h?o:s;if(f&&typeof f!="boolean"&&!gx(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const b=CP(t,m[g]);if(b){const{transitionEnd:y,transition:v,...w}=b;for(const _ in w){let E=w[_];if(Array.isArray(E)){const M=h?E.length-1:0;E=E[M]}E!==null&&(i[_]=E)}for(const _ in y)i[_]=y[_]}}}return i}const ZV=t=>(e,n)=>{const r=O.useContext(yx),i=O.useContext(px),a=()=>wxe(t,e,r,i);return n?a():mP(a)},Sxe=ZV({scrapeMotionValuesFromProps:UP,createRenderState:zP}),Mxe=ZV({scrapeMotionValuesFromProps:jV,createRenderState:YV}),Exe=Symbol.for("motionComponentSymbol");function Txe(t,e,n){const r=O.useRef(n);O.useInsertionEffect(()=>{r.current=n});const i=O.useRef(null);return O.useCallback(a=>{var o;a&&((o=t.onMount)==null||o.call(t,a));const s=r.current;if(typeof s=="function")if(a){const c=s(a);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):s(a);else s&&(s.current=a);e&&(a?e.mount(a):e.unmount())},[e])}const JV=O.createContext({});function Bu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Axe(t,e,n,r,i,a){var E,M;const{visualElement:s}=O.useContext(yx),o=O.useContext(WV),c=O.useContext(px),l=O.useContext(BP),h=l.reducedMotion,f=l.skipAnimations,m=O.useRef(null),g=O.useRef(!1);r=r||o.renderer,!m.current&&r&&(m.current=r(t,{visualState:e,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:h,skipAnimations:f,isSVG:a}),g.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const b=m.current,y=O.useContext(JV);b&&!b.projection&&i&&(b.type==="html"||b.type==="svg")&&Nxe(m.current,n,i,y);const v=O.useRef(!1);O.useInsertionEffect(()=>{b&&v.current&&b.update(n,c)});const w=n[sV],_=O.useRef(!!w&&typeof window<"u"&&!((E=window.MotionHandoffIsComplete)!=null&&E.call(window,w))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,w)));return y$(()=>{g.current=!0,b&&(v.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),_.current&&b.animationState&&b.animationState.animateChanges())}),O.useEffect(()=>{b&&(!_.current&&b.animationState&&b.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,w)}),_.current=!1),b.enteringChildren=void 0)}),b}function Nxe(t,e,n,r){const{layoutId:i,layout:a,drag:s,dragConstraints:o,layoutScroll:c,layoutRoot:l,layoutAnchor:h,layoutCrossfade:f}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:QV(t.parent)),t.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!s||o&&Bu(o),visualElement:t,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:c,layoutRoot:l,layoutAnchor:h})}function QV(t){if(t)return t.options.allowProjection!==!1?t.projection:QV(t.parent)}function j2(t,{forwardMotionProps:e=!1,type:n}={},r,i){r&&cxe(r);const a=n?n==="svg":$P(t),s=a?Mxe:Sxe;function o(l,h){let f;const m={...O.useContext(BP),...l,layoutId:Pxe(l)},{isStatic:g}=m,b=pxe(l),y=s(l,g);if(!g&&typeof window<"u"){Cxe();const v=Rxe(m);f=v.MeasureLayout,b.visualElement=Axe(t,y,m,i,v.ProjectionNode,a)}return d.jsxs(yx.Provider,{value:b,children:[f&&b.visualElement?d.jsx(f,{visualElement:b.visualElement,...m}):null,bxe(t,l,Txe(y,b.visualElement,h),y,g,e,a)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=O.forwardRef(o);return c[Exe]=t,c}function Pxe({layoutId:t}){const e=O.useContext(pP).id;return e&&t!==void 0?e+"-"+t:t}function Cxe(t,e){O.useContext(WV).strict}function Rxe(t){const e=qV(),{drag:n,layout:r}=e;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function jxe(t,e){if(typeof Proxy>"u")return j2;const n=new Map,r=(a,s)=>j2(a,s,t,e),i=(a,s)=>r(a,s);return new Proxy(i,{get:(a,s)=>s==="create"?r:(n.has(s)||n.set(s,j2(s,void 0,t,e)),n.get(s))})}const Oxe=(t,e)=>e.isSVG??$P(t)?new cye(e):new rye(e,{allowProjection:t!==O.Fragment});class Ixe extends Nl{constructor(e){super(e),e.animationState||(e.animationState=pye(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();gx(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 Dxe=0;class kxe extends Nl{constructor(){super(...arguments),this.id=Dxe++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){const{initial:s,custom:o}=this.node.getProps();if(typeof s=="string"){const c=wc(this.node,s,o);if(c){const{transition:l,transitionEnd:h,...f}=c;for(const m in f)(a=this.node.getValue(m))==null||a.jump(f[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Lxe={animation:{Feature:Ixe},exit:{Feature:kxe}};function hm(t){return{point:{x:t.pageX,y:t.pageY}}}const Fxe=t=>e=>IP(e)&&t(e,hm(e));function Hh(t,e,n,r){return Bp(t,e,Fxe(n),r)}const eH=({current:t})=>t?t.ownerDocument.defaultView:null,GF=(t,e)=>Math.abs(t-e);function Uxe(t,e){const n=GF(t.x,e.x),r=GF(t.y,e.y);return Math.sqrt(n**2+r**2)}const WF=new Set(["auto","scroll"]);class tH{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=g=>{this.handleScroll(g.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=$0(this.lastRawMoveEventInfo,this.transformPagePoint));const g=O2(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,y=Uxe(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!y)return;const{point:v}=g,{timestamp:w}=kr;this.history.push({...v,timestamp:w});const{onStart:_,onMove:E}=this.handlers;b||(_&&_(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,g)},this.handlePointerMove=(g,b)=>{this.lastMoveEvent=g,this.lastRawMoveEventInfo=b,this.lastMoveEventInfo=$0(b,this.transformPagePoint),On.update(this.updatePoint,!0)},this.handlePointerUp=(g,b)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=O2(g.type==="pointercancel"?this.lastMoveEventInfo:$0(b,this.transformPagePoint),this.history);this.startEvent&&y&&y(g,_),v&&v(g,_)},!IP(e))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const c=hm(e),l=$0(c,this.transformPagePoint),{point:h}=l,{timestamp:f}=kr;this.history=[{...h,timestamp:f}];const{onSessionStart:m}=n;m&&m(e,O2(l,this.history)),this.removeListeners=um(Hh(this.contextWindow,"pointermove",this.handlePointerMove),Hh(this.contextWindow,"pointerup",this.handlePointerUp),Hh(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(WF.has(r.overflowX)||WF.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:i.x-n.x,y:i.y-n.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,i),On.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),bl(this.updatePoint)}}function $0(t,e){return e?{point:e(t.point)}:t}function qF(t,e){return{x:t.x-e.x,y:t.y-e.y}}function O2({point:t},e){return{point:t,delta:qF(t,nH(e)),offset:qF(t,Bxe(e)),velocity:zxe(e,.1)}}function Bxe(t){return t[0]}function nH(t){return t[t.length-1]}function zxe(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=nH(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Zi(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&i.timestamp-r.timestamp>Zi(e)*2&&(r=t[1]);const a=ga(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function $xe(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?zn(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?zn(n,t,r.max):Math.min(t,n)),t}function XF(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 Vxe(t,{top:e,left:n,bottom:r,right:i}){return{x:XF(t.x,n,i),y:XF(t.y,e,r)}}function KF(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function Hxe(t,e){return{x:KF(t.x,e.x),y:KF(t.y,e.y)}}function Gxe(t,e){let n=.5;const r=pi(t),i=pi(e);return i>r?n=Lp(e.min,e.max-r,t.min):r>i&&(n=Lp(t.min,t.max-i,e.min)),Es(0,1,n)}function Wxe(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 BT=.35;function qxe(t=BT){return t===!1?t=0:t===!0&&(t=BT),{x:YF(t,"left","right"),y:YF(t,"top","bottom")}}function YF(t,e,n){return{min:ZF(t,e),max:ZF(t,n)}}function ZF(t,e){return typeof t=="number"?t:t[e]||0}const Xxe=new WeakMap;class Kxe{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=vr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=f=>{n&&this.snapToCursor(hm(f).point),this.stopAnimation()},s=(f,m)=>{const{drag:g,dragPropagation:b,onDragStart:y}=this.getProps();if(g&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_ve(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rs(w=>{let _=this.getAxisMotionValue(w).get()||0;if(ys.test(_)){const{projection:E}=this.visualElement;if(E&&E.layout){const M=E.layout.layoutBox[w];M&&(_=pi(M)*(parseFloat(_)/100))}}this.originPoint[w]=_}),y&&On.update(()=>y(f,m),!1,!0),RT(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:b,onDirectionLock:y,onDrag:v}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:w}=m;if(b&&this.currentDirection===null){this.currentDirection=Zxe(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",m.point,w),this.updateAxis("y",m.point,w),this.visualElement.render(),v&&On.update(()=>v(f,m),!1,!0)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new tH(e,{onSessionStart:a,onStart:s,onMove:o,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:eH(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&On.postRender(()=>o(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!V0(e,i,this.currentDirection))return;const a=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=$xe(s,this.constraints[e],this.elastic[e])),a.set(s)}resolveConstraints(){var a;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;e&&Bu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=Vxe(r.layoutBox,e):this.constraints=!1,this.elastic=qxe(n),i!==this.constraints&&!Bu(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&rs(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Wxe(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Bu(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Zve(r,i.root,this.visualElement.getTransformPagePoint());let s=Hxe(i.layout.layoutBox,a);if(n){const o=n(Xve(s));this.hasMutatedConstraints=!!o,o&&(s=SV(o))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},l=rs(h=>{if(!V0(h,n,this.currentDirection))return;let f=c&&c[h]||{};(s===!0||s===h)&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,b={type:"inertia",velocity:r?e[h]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(h,b)});return Promise.all(l).then(o)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return RT(this.visualElement,e),r.start(PP(e,r,0,n,this.visualElement,!1))}stopAnimation(){rs(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){rs(n=>{const{drag:r}=this.getProps();if(!V0(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:o}=i.layout.layoutBox[n],c=a.get()||0;a.set(e[n]-zn(s,o,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bu(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};rs(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const c=o.get();i[s]=Gxe({min:c,max:c},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),rs(s=>{if(!V0(s,e,null))return;const o=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];o.set(zn(c,l,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Xxe.set(this.visualElement,this);const e=this.visualElement.current,n=Hh(e,"pointerdown",l=>{const{drag:h,dragListener:f=!0}=this.getProps(),m=l.target,g=m!==e&&Nve(m);h&&f&&!g&&this.start(l)});let r;const i=()=>{const{dragConstraints:l}=this.getProps();Bu(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Yxe(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,s=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),On.read(i);const o=Bp(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:h})=>{this.isDragging&&h&&(rs(f=>{const m=this.getAxisMotionValue(f);m&&(this.originPoint[f]+=l[f].translate,m.set(m.get()+l[f].translate))}),this.visualElement.render())}));return()=>{o(),n(),s(),c&&c(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=BT,dragMomentum:o=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:o}}}function JF(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Yxe(t,e,n){const r=aF(t,JF(n)),i=aF(e,JF(n));return()=>{r(),i()}}function V0(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Zxe(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Jxe extends Nl{constructor(e){super(e),this.removeGroupControls=va,this.removeListeners=va,this.controls=new Kxe(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||va}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const I2=t=>(e,n)=>{t&&On.update(()=>t(e,n),!1,!0)};class Qxe extends Nl{constructor(){super(...arguments),this.removePointerDownListener=va}onPointerDown(e){this.session=new tH(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eH(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:I2(e),onStart:I2(n),onMove:I2(r),onEnd:(a,s)=>{delete this.session,i&&On.postRender(()=>i(a,s))}}}mount(){this.removePointerDownListener=Hh(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let D2=!1;class ebe extends O.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=e;a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),D2&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zg.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,e.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),D2=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==a?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||On.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),OP.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;D2=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rH(t){const[e,n]=GV(),r=O.useContext(pP);return d.jsx(ebe,{...t,layoutGroup:r,switchLayoutGroup:O.useContext(JV),isPresent:e,safeToRemove:n})}const tbe={pan:{Feature:Qxe},drag:{Feature:Jxe,ProjectionNode:HV,MeasureLayout:rH}};function QF(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&On.postRender(()=>a(e,hm(e)))}class nbe extends Nl{mount(){const{current:e}=this.node;e&&(this.unmount=Mve(e,(n,r)=>(QF(this.node,r,"Start"),i=>QF(this.node,i,"End"))))}unmount(){}}class rbe extends Nl{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=um(Bp(this.node.current,"focus",()=>this.onFocus()),Bp(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function eU(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&On.postRender(()=>a(e,hm(e)))}class ibe extends Nl{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Cve(e,(i,a)=>(eU(this.node,a,"Start"),(s,{success:o})=>eU(this.node,s,o?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const zT=new WeakMap,k2=new WeakMap,abe=t=>{const e=zT.get(t.target);e&&e(t)},sbe=t=>{t.forEach(abe)};function obe({root:t,...e}){const n=t||document;k2.has(n)||k2.set(n,{});const r=k2.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(sbe,{root:t,...e})),r[i]}function lbe(t,e,n){const r=obe(e);return zT.set(t,n),r.observe(t),()=>{zT.delete(t),r.unobserve(t)}}const cbe={some:0,all:1};class ube extends Nl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:cbe[i]},o=l=>{const{isIntersecting:h}=l;if(this.isInView===h||(this.isInView=h,a&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:f,onViewportLeave:m}=this.node.getProps(),g=h?f:m;g&&g(l)};this.stopObserver=lbe(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(dbe(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function dbe({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const fbe={inView:{Feature:ube},tap:{Feature:ibe},focus:{Feature:rbe},hover:{Feature:nbe}},hbe={layout:{ProjectionNode:HV,MeasureLayout:rH}},pbe={...Lxe,...fbe,...tbe,...hbe},B=jxe(pbe,Oxe);function mbe({label:t,value:e,icon:n,gradient:r,delay:i=0}){return d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:i,type:"spring",stiffness:100},whileHover:{scale:1.05,y:-5},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6 cursor-pointer group",children:[d.jsx("div",{className:`absolute top-0 right-0 w-32 h-32 bg-gradient-to-br ${r} opacity-10 group-hover:opacity-20 rounded-full blur-2xl transition-opacity duration-300`}),d.jsx(B.div,{className:"absolute inset-0 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent)"},animate:{x:["-100%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("span",{className:"text-sm text-slate-400",children:t}),d.jsx(B.div,{whileHover:{rotate:360},transition:{duration:.5},className:`p-2 rounded-lg bg-gradient-to-br ${r} opacity-80`,children:d.jsx(n,{className:"w-4 h-4 text-white"})})]}),d.jsx(B.div,{initial:{scale:0},animate:{scale:1},transition:{delay:i+.2,type:"spring"},className:"text-3xl font-bold text-white",children:e})]})]})}const gbe=[{label:"活跃用户",value:"128",icon:aZ,color:"from-blue-500 to-cyan-500"},{label:"今日问答",value:"1,536",icon:mY,color:"from-purple-500 to-pink-500"},{label:"模型调用",value:"8,924",icon:Jp,color:"from-green-500 to-emerald-500"},{label:"系统响应",value:"320ms",icon:Qr,color:"from-orange-500 to-red-500"}],vbe=[{time:"00:00",value:280},{time:"04:00",value:200},{time:"08:00",value:350},{time:"12:00",value:420},{time:"16:00",value:380},{time:"20:00",value:290}],L2=[{name:"高炉诊断",value:340},{name:"质量溯源",value:280},{name:"知识检索",value:420},{name:"工艺优化",value:260},{name:"人机协同",value:180}],ybe=[{time:"10:30",user:"张工",action:"执行质量溯源查询",module:"质量溯源",status:"success"},{time:"10:25",user:"系统",action:"自动更新知识图谱 实体+12",module:"知识图谱",status:"info"},{time:"10:20",user:"模型",action:"钢铁Base模型调用成功",module:"模型服务",status:"success"},{time:"10:15",user:"李工",action:"高炉故障诊断完成",module:"高炉诊断",status:"success"},{time:"10:10",user:"系统",action:"边缘节点数据同步完成",module:"数据治理",status:"info"},{time:"10:05",user:"王工",action:"工艺参数优化建议已采纳",module:"工艺优化",status:"warning"}],tU=[{user:"赵工",action:"启动数字孪生实时监控",module:"数字孪生",status:"success"},{user:"系统",action:"模型训练完成准确率提升2.3%",module:"模型服务",status:"success"},{user:"刘工",action:"提交人机协同任务",module:"人机协同",status:"info"},{user:"模型",action:"知识图谱更新完毕新增实体45个",module:"知识图谱",status:"info"},{user:"周工",action:"数据采集任务启动",module:"数据治理",status:"info"},{user:"系统",action:"检测到异常数据波动,已告警",module:"监控中心",status:"warning"},{user:"陈工",action:"批量数据导入完成",module:"数据治理",status:"success"},{user:"模型",action:"预测分析任务已完成",module:"智能决策",status:"success"},{user:"系统",action:"电解槽温度场异常告警",module:"监控中心",status:"warning"},{user:"张工",action:"执行氧化铝配碱量优化",module:"工艺优化",status:"success"},{user:"模型",action:"BERT实体抽取完成 抽取127个",module:"知识工程",status:"info"},{user:"李工",action:"知识融合任务已确认合并14个实体",module:"知识融合",status:"success"}],xbe=[{title:"高炉故障诊断",desc:"智能诊断与预警",path:"/furnace-diagnosis",gradient:"from-blue-500 to-cyan-500",icon:qi,module:"智能决策"},{title:"质量溯源分析",desc:"全流程质量追溯",path:"/quality-tracing",gradient:"from-purple-500 to-pink-500",icon:rY,module:"智能决策"},{title:"知识图谱",desc:"工业知识可视化",path:"/knowledge-graph",gradient:"from-green-500 to-emerald-500",icon:Qh,module:"知识工程"},{title:"智能检索RAG",desc:"知识增强问答",path:"/rag-system",gradient:"from-orange-500 to-red-500",icon:gl,module:"知识工程"},{title:"数字孪生",desc:"3D虚拟工厂",path:"/digital-twin",gradient:"from-cyan-500 to-blue-500",icon:Iy,module:"系统集成"},{title:"人机协同",desc:"AR增强交互",path:"/human-machine",gradient:"from-pink-500 to-rose-500",icon:Gd,module:"智能决策"},{title:"智能转炉",desc:"炼钢优化控制",path:"/intelligent-converter",gradient:"from-yellow-500 to-orange-500",icon:nv,module:"智能决策"},{title:"经济分析",desc:"投资回报评估",path:"/economic-analysis",gradient:"from-indigo-500 to-purple-500",icon:Mc,module:"系统集成"}],bbe=[{title:"高炉故障诊断智能体",desc:"基于知识图谱的故障溯源与诊断建议",path:"/furnace-diagnosis",gradient:"from-red-500 to-orange-500",status:"running",calls:"1,247"},{title:"质量溯源分析智能体",desc:"全流程质量追踪与异常检测",path:"/quality-tracing",gradient:"from-purple-500 to-pink-500",status:"running",calls:"892"},{title:"原料制备优化智能体",desc:"氧化铝配料优化与溶出率预测",path:"/intelligent-converter",gradient:"from-green-500 to-emerald-500",status:"idle",calls:"456"},{title:"人机协同交互智能体",desc:"电解铝AR增强现实辅助",path:"/human-machine",gradient:"from-blue-500 to-cyan-500",status:"running",calls:"723"}];function wbe(){const t=wB(),[e,n]=O.useState(gbe),[r,i]=O.useState(vbe),[a,s]=O.useState(!1),[o,c]=O.useState(ybe),[l,h]=O.useState(null);O.useEffect(()=>{const g=setInterval(()=>{if(Math.random()>.7){const b=tU[Math.floor(Math.random()*tU.length)],y=new Date,v=`${y.getHours().toString().padStart(2,"0")}:${y.getMinutes().toString().padStart(2,"0")}`;c(w=>{const E=[{...b,time:v},...w.slice(0,9)];return h(0),setTimeout(()=>h(null),2e3),E})}},8e3);return()=>clearInterval(g)},[]);const f=()=>{s(!0),Ye.promise(new Promise(g=>setTimeout(g,1500)),{loading:"正在刷新数据...",success:()=>(s(!1),"数据已更新!"),error:"刷新失败"})},m=(g,b)=>{Ye.success(`正在进入 ${b}...`,{duration:1500}),setTimeout(()=>{t(g)},500)};return d.jsxs("div",{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"工作台"}),d.jsx("p",{className:"text-sm text-slate-400",children:"工业大模型系统概览"})]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:f,disabled:a,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white transition-colors disabled:opacity-50",children:[d.jsx(ps,{className:`w-4 h-4 ${a?"animate-spin":""}`}),d.jsx("span",{className:"text-sm",children:a?"刷新中...":"刷新数据"})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((g,b)=>d.jsx(mbe,{label:g.label,value:g.value,icon:g.icon,gradient:g.color,delay:b*.1},g.label))}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"快捷入口"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:xbe.map((g,b)=>d.jsxs(B.button,{onClick:()=>m(g.path,g.title),initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5+b*.05},whileHover:{scale:1.05,y:-5},whileTap:{scale:.98},className:"group relative overflow-hidden rounded-lg bg-slate-800/50 p-5 transition-all text-left",children:[d.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${g.gradient} opacity-0 group-hover:opacity-10 transition-opacity`}),d.jsx(B.div,{className:`absolute inset-0 bg-gradient-to-br ${g.gradient} opacity-0 group-hover:opacity-20`,animate:{scale:[1,1.2,1]},transition:{duration:3,repeat:1/0,ease:"easeInOut"}}),d.jsxs("div",{className:"relative",children:[d.jsx(B.div,{whileHover:{rotate:360},transition:{duration:.6},className:`w-12 h-12 rounded-lg bg-gradient-to-br ${g.gradient} flex items-center justify-center mb-3`,children:d.jsx(g.icon,{className:"w-6 h-6 text-white"})}),d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx("h3",{className:"font-semibold text-white",children:g.title}),d.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-slate-700/50 text-slate-400",children:g.module})]}),d.jsx("p",{className:"text-sm text-slate-400",children:g.desc})]})]},g.title))})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},whileHover:{scale:1.01},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"系统性能监控"}),d.jsxs(B.span,{animate:{opacity:[.7,1,.7]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 text-sm text-green-400",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:3,repeat:1/0,ease:"linear"},children:d.jsx(yr,{className:"w-4 h-4"})}),"运行正常"]})]}),d.jsx(Ci,{width:"100%",height:200,children:d.jsxs(hP,{data:r,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"dashboardPerformanceGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"#3b82f6",stopOpacity:.3}),d.jsx("stop",{offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]}),d.jsxs("linearGradient",{id:"dashboardGlowGradient",x1:"0",y1:"0",x2:"1",y2:"0",children:[d.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:0}),d.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:1}),d.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:0})]})]}),d.jsx(B.g,{animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:1/0},children:d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3})}),d.jsx(Ur,{dataKey:"time",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),d.jsx(B.path,{d:`M 0 200 L ${r.length*80} 200`,stroke:"url(#dashboardGlowGradient)",strokeWidth:3,fill:"none",initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1},transition:{duration:1.5,delay:.5}}),d.jsx(wa,{type:"monotone",dataKey:"value",stroke:"#3b82f6",strokeWidth:2,fill:"url(#dashboardPerformanceGradient)"})]})})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},whileHover:{scale:1.01},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"模块使用统计"}),d.jsxs("span",{className:"text-sm text-slate-400 flex items-center gap-2",children:["今日调用次数",d.jsx(B.span,{animate:{scale:[1,1.2,1]},transition:{duration:1,repeat:1/0},className:"text-purple-400",children:d.jsx(Ni,{className:"w-4 h-4"})})]})]}),d.jsx(Ci,{width:"100%",height:200,children:d.jsxs(fP,{data:L2,children:[d.jsx("defs",{children:d.jsxs("linearGradient",{id:"barGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:1}),d.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:.5})]})}),d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"name",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),L2.map((g,b)=>d.jsx(B.rect,{x:0,y:200-g.value/2,width:50,height:g.value/2,fill:"url(#barGradient)",initial:{scaleY:0,originY:1},animate:{scaleY:1},transition:{delay:.3+b*.1,duration:.5},rx:8},`bar-${b}`)),d.jsx(Ms,{dataKey:"value",fill:"url(#barGradient)",radius:[8,8,0,0],children:L2.map((g,b)=>d.jsx(B.rect,{fill:"#8b5cf6",initial:{scaleY:0},animate:{scaleY:1},transition:{delay:.3+b*.1,duration:.5}},`motion-bar-${b}`))})]})})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.7},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},children:d.jsx(yr,{className:"w-5 h-5 text-green-400"})}),"最近操作记录"]}),d.jsxs(B.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"flex items-center gap-1 text-xs text-slate-400 bg-slate-800/50 px-2 py-1 rounded-full",children:[d.jsx(_s,{className:"w-3 h-3"}),"实时更新"]})]}),d.jsx("div",{className:"space-y-3",children:d.jsx(mi,{mode:"popLayout",children:o.map((g,b)=>d.jsxs(B.div,{layout:!0,initial:{opacity:0,x:-20,scale:.9},animate:{opacity:l===b?[1,.5,1]:1,x:0,scale:1,backgroundColor:l===b?["rgba(34, 197, 94, 0.1)","rgba(34, 197, 94, 0.2)","rgba(34, 197, 94, 0.1)"]:"rgba(30, 41, 59, 0.5)"},exit:{opacity:0,x:20,scale:.9},transition:{duration:.5,layout:{duration:.3}},className:"flex items-center gap-4 p-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 transition-colors",children:[d.jsxs("span",{className:"text-sm text-slate-500 w-16 flex items-center gap-1",children:[d.jsx(_s,{className:"w-3 h-3"}),g.time]}),d.jsxs(B.span,{className:"text-sm text-slate-300 w-20 flex items-center gap-1",animate:g.user==="系统"||g.user==="模型"?{scale:[1,1.05,1]}:{},transition:{duration:1,repeat:1/0},children:[d.jsx(Ec,{className:`w-3 h-3 ${g.user==="系统"?"text-blue-400":"text-purple-400"}`}),g.user]}),d.jsx("span",{className:"text-xs px-2 py-1 rounded bg-slate-700/50 text-slate-400",children:g.module}),d.jsx("span",{className:"flex-1 text-sm text-white",children:g.action}),d.jsxs(B.span,{initial:{scale:0},animate:{scale:1},className:`text-xs px-2 py-1 rounded-full flex items-center gap-1 ${g.status==="success"?"bg-green-500/20 text-green-400":g.status==="warning"?"bg-yellow-500/20 text-yellow-400":"bg-blue-500/20 text-blue-400"}`,children:[g.status==="success"&&d.jsx(yr,{className:"w-3 h-3"}),g.status==="warning"&&d.jsx(qi,{className:"w-3 h-3"}),g.status==="info"&&d.jsx(Ec,{className:"w-3 h-3"}),g.status==="success"?"成功":g.status==="warning"?"警告":"信息"]})]},`${g.time}-${b}`))})}),d.jsx(B.div,{className:"mt-4 flex items-center justify-center gap-1",animate:{opacity:[.3,1,.3]},transition:{duration:2,repeat:1/0},children:[...Array(5)].map((g,b)=>d.jsx(B.div,{className:"w-1.5 h-1.5 rounded-full bg-green-500",animate:{scale:[1,1.5,1],opacity:[.5,1,.5]},transition:{duration:1.5,repeat:1/0,delay:b*.2}},b))})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:10,repeat:1/0,ease:"linear"},children:d.jsx(gl,{className:"w-5 h-5 text-purple-400"})}),"智能体运行状态"]}),d.jsxs(B.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"flex items-center gap-1 text-xs text-green-400 bg-green-500/10 px-2 py-1 rounded-full",children:[d.jsx(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:1.5,repeat:1/0},className:"w-1.5 h-1.5 rounded-full bg-green-400"}),"3/4 在线"]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:bbe.map((g,b)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.9+b*.1},whileHover:{scale:1.03,y:-3},className:"relative overflow-hidden rounded-lg bg-slate-800/50 p-4 cursor-pointer group",onClick:()=>m(g.path,g.title),children:[d.jsx(B.div,{className:`absolute inset-0 bg-gradient-to-br ${g.gradient} opacity-0 group-hover:opacity-10 transition-opacity`}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx(B.div,{className:`w-10 h-10 rounded-lg bg-gradient-to-br ${g.gradient} flex items-center justify-center`,animate:g.status==="running"?{scale:[1,1.1,1]}:{},transition:{duration:2,repeat:1/0},children:d.jsx(gl,{className:"w-5 h-5 text-white"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(B.span,{animate:g.status==="running"?{opacity:[.5,1,.5]}:{},transition:{duration:1.5,repeat:1/0},className:`w-2 h-2 rounded-full ${g.status==="running"?"bg-green-400":"bg-slate-500"}`}),d.jsx("span",{className:`text-xs ${g.status==="running"?"text-green-400":"text-slate-500"}`,children:g.status==="running"?"运行中":"空闲"})]})]}),d.jsx("h3",{className:"font-medium text-white text-sm mb-1",children:g.title}),d.jsx("p",{className:"text-xs text-slate-400 mb-3",children:g.desc}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs text-slate-500",children:"今日调用"}),d.jsx(B.span,{animate:g.status==="running"?{scale:[1,1.1,1]}:{},transition:{duration:2,repeat:1/0},className:"text-sm font-medium text-purple-400",children:g.calls})]})]}),d.jsx(B.div,{className:`absolute bottom-0 left-0 right-0 h-0.5 bg-gradient-to-r ${g.gradient}`,initial:{scaleX:0},whileHover:{scaleX:1},transition:{duration:.3}})]},g.title))})]})]})}const _be=[{label:"炉温",value:"1250°C",status:"normal",trend:"+2°C"},{label:"水温差",value:"+3.5°C",status:"warning",trend:"↑"},{label:"料位",value:"正常",status:"normal",trend:"—"},{label:"风量",value:"正常",status:"normal",trend:"—"}],Sbe=[{time:"10:00",temp:1245},{time:"10:15",temp:1248},{time:"10:30",temp:1250},{time:"10:45",temp:1252},{time:"11:00",temp:1250}],Mbe=[{type:"user",message:"炉况是否顺行?",time:"10:30"},{type:"assistant",message:"目前炉况基本顺行,但请注意冷却壁水温差有上升趋势(当前+3.5°C建议检查冷却水压力。根据历史数据分析水温差持续上升可能预示冷却系统存在堵塞风险。",time:"10:30",confidence:92,sources:["<22><>炉故障知识图谱","实时监控数据","历史案例库"]}],Ebe=[{keywords:["炉温","温度"],response:"当前炉温1250°C处于正常范围内近2小时温度波动±2°C符合稳定炉况特征。建议继续保持当前配煤比和风量配置。",confidence:94,sources:["实时监控数据","温度预测模型","历史运行数据"]},{keywords:["水温","冷却"],response:"冷却壁水温差当前+3.5°C略高于正常值。建议1) 检查冷却水压力是否稳定2) 检查管路是否存在部分堵塞3) 如持续上升需立即停炉检修。",confidence:89,sources:["冷却系统知识库","故障案例库","维护手册"]},{keywords:["料位","装料"],response:"当前料位正常,料线稳定。装料过程顺畅,布料均匀性良好。建议继续监控料位变化,保持当前装料节奏。",confidence:91,sources:["装料系统监控","料位传感器数据"]},{keywords:["风量","送风"],response:"送风系统运行正常,风量稳定,风温控制良好。各风口工作均匀,暂无异常。建议保持当前送风参数。",confidence:93,sources:["送风系统监控","风口检测数据"]}],Tbe=t=>{for(const e of Ebe)if(e.keywords.some(n=>t.includes(n)))return e;return{response:"我已收到您的问题。根据当前监控数据分析,系统运行基本正常。如需具体分析,请提供更详细的问题描述,例如关注的具体参数或异常现象。",confidence:85,sources:["实时监控系统","通用知识库"]}};function Abe(){const[t,e]=O.useState(""),[n,r]=O.useState(!1),[i,a]=O.useState(Mbe),[s,o]=O.useState(_be),[c,l]=O.useState(Sbe);O.useEffect(()=>{const m=setInterval(()=>{o(g=>g.map(b=>{if(b.label==="炉温"){const y=1248+Math.floor(Math.random()*5);return{...b,value:`${y}°C`}}return b})),l(g=>{const b=[...g];b.shift();const v=b[b.length-1].temp+(Math.random()-.5)*3,w=new Date;return b.push({time:`${w.getHours()}:${w.getMinutes().toString().padStart(2,"0")}`,temp:Math.round(v)}),b})},3e3);return()=>clearInterval(m)},[]);const h=()=>{if(t.trim()){const m={type:"user",message:t.trim(),time:new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})};a(g=>[...g,m]),e(""),r(!0),Ye.info("正在分析您的问题...",{duration:1500}),setTimeout(()=>{const g=Tbe(t),b={type:"assistant",message:g.response,time:new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}),confidence:g.confidence,sources:g.sources};a(y=>[...y,b]),r(!1),Ye.success("分析完成!",{duration:2e3})},2e3)}},f=()=>{Ye.promise(new Promise(m=>setTimeout(m,1e3)),{loading:"正在刷新监控数据...",success:"数据已更新!",error:"刷新失败"})};return d.jsxs("div",{className:"h-full p-6 space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-bold text-white mb-1 flex items-center gap-2",children:["高炉故障诊断智能体",d.jsx(B.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:d.jsx(Ec,{className:"w-6 h-6 text-blue-400"})})]}),d.jsx("p",{className:"text-sm text-slate-400",children:"基于知识增强大模型的智能诊断系统"})]}),d.jsxs(B.div,{animate:{boxShadow:["0 0 20px rgba(16, 185, 129, 0.3)","0 0 40px rgba(16, 185, 129, 0.5)","0 0 20px rgba(16, 185, 129, 0.3)"]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-green-500/10 border border-green-500/30",children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:1.5,repeat:1/0},className:"w-2 h-2 bg-green-500 rounded-full"}),d.jsx("span",{className:"text-sm text-green-400",children:"在线"})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 h-[calc(100%-6rem)]",children:[d.jsxs("div",{className:"lg:col-span-2 flex flex-col rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm overflow-hidden",children:[d.jsx("div",{className:"px-6 py-4 border-b border-slate-800/50 bg-slate-900/30",children:d.jsxs("h2",{className:"font-semibold text-white flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:[0,10,-10,0]},transition:{duration:2,repeat:1/0},children:d.jsx(hY,{className:"w-5 h-5 text-blue-400"})}),"智能问答"]})}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-4",children:[d.jsx(mi,{mode:"popLayout",children:i.map((m,g)=>{var b;return d.jsx(B.div,{layout:!0,initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},transition:{delay:g*.05,type:"spring",stiffness:300},className:`flex ${m.type==="user"?"justify-end":"justify-start"}`,children:d.jsxs("div",{className:`max-w-[80%] ${m.type==="user"?"":"space-y-2"}`,children:[d.jsxs(B.div,{initial:{scale:.8},animate:{scale:1},className:`rounded-xl p-4 ${m.type==="user"?"bg-gradient-to-br from-blue-600 to-purple-600 text-white shadow-lg shadow-blue-500/20":"bg-slate-800/50 text-slate-200 border border-slate-700/50"}`,children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[m.type==="user"?d.jsx(B.div,{animate:{scale:[1,1.1,1]},transition:{duration:1,repeat:1/0},children:d.jsx(jB,{className:"w-4 h-4 opacity-70"})}):d.jsx(B.div,{animate:{rotate:[0,360]},transition:{duration:3,repeat:1/0},children:d.jsx(P5,{className:"w-4 h-4 text-blue-400"})}),d.jsx("span",{className:"text-xs opacity-70",children:m.type==="user"?"用户":"智能体"}),d.jsxs(B.span,{className:"text-xs opacity-50 ml-auto flex items-center gap-1",initial:{opacity:0},animate:{opacity:.7},children:[d.jsx(_s,{className:"w-3 h-3"}),m.time]})]}),d.jsx("p",{className:"text-sm leading-relaxed",children:m.message})]}),m.type==="assistant"&&d.jsxs(B.div,{className:"flex flex-wrap gap-2 px-2",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.2},children:[(b=m.sources)==null?void 0:b.map((y,v)=>d.jsxs(B.span,{className:"text-xs px-2 py-1 rounded-full bg-slate-800/50 text-slate-400 border border-slate-700/50 flex items-center gap-1",initial:{scale:0},animate:{scale:1},transition:{delay:.3+v*.1,type:"spring"},children:[d.jsx(vl,{className:"w-3 h-3"}),y]},v)),m.confidence&&d.jsxs(B.span,{className:"text-xs px-2 py-1 rounded-full bg-green-500/20 text-green-400 border border-green-500/30 flex items-center gap-1",initial:{scale:0},animate:{scale:1},transition:{delay:.4,type:"spring"},children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:1,repeat:1/0},children:d.jsx(Cr,{className:"w-3 h-3"})}),"置信度: ",m.confidence,"%"]})]})]})},`${m.time}-${g}`)})}),n&&d.jsx(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex justify-start",children:d.jsx("div",{className:"bg-slate-800/50 rounded-xl p-4 border border-slate-700/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:1,repeat:1/0},children:d.jsx(P5,{className:"w-5 h-5 text-blue-400"})}),d.jsx("div",{className:"flex gap-1",children:[0,150,300].map(m=>d.jsx(B.div,{className:"w-2 h-2 bg-blue-500 rounded-full",animate:{y:[0,-8,0],opacity:[.5,1,.5]},transition:{duration:.8,repeat:1/0,delay:m/1e3}},m))}),d.jsx("span",{className:"text-sm text-slate-400",children:"正在分析..."})]})})})]}),d.jsx("div",{className:"p-4 border-t border-slate-800/50 bg-slate-900/30",children:d.jsxs("div",{className:"flex gap-2",children:[d.jsx(B.input,{type:"text",value:t,onChange:m=>e(m.target.value),onKeyPress:m=>m.key==="Enter"&&h(),placeholder:"输入您的问题...",whileFocus:{scale:1.01},className:"flex-1 px-4 py-3 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-blue-500/50"}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:h,disabled:!t.trim()||n,className:"px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium disabled:opacity-50 disabled:cursor-not-allowed hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center gap-2",children:[d.jsx(UY,{className:"w-5 h-5"}),d.jsx("span",{className:"hidden sm:inline",children:"发送"})]})]})})]}),d.jsxs("div",{className:"space-y-6 overflow-y-auto",children:[d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h3",{className:"font-semibold text-white flex items-center gap-2",children:[d.jsx(_s,{className:"w-4 h-4 text-blue-400"}),"实时监控数据"]}),d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:f,className:"p-1 rounded-lg hover:bg-slate-800/50 transition-colors",children:d.jsx(ps,{className:"w-4 h-4 text-slate-400"})})]}),d.jsx("div",{className:"grid grid-cols-2 gap-3",children:s.map(m=>d.jsxs(B.div,{className:"p-3 rounded-lg bg-slate-800/50 border border-slate-700/50",whileHover:{scale:1.02},children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:m.label}),d.jsxs("div",{className:"flex items-baseline justify-between",children:[d.jsx("span",{className:`font-semibold ${m.status==="warning"?"text-yellow-400":"text-white"}`,children:m.value}),d.jsx("span",{className:"text-xs text-slate-500",children:m.trend})]})]},m.label))})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.1},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Ni,{className:"w-4 h-4 text-green-400"}),"温度趋势"]}),d.jsx(Ci,{width:"100%",height:150,children:d.jsxs(Dd,{data:c,children:[d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"time",stroke:"#94a3b8",fontSize:10}),d.jsx(Br,{stroke:"#94a3b8",fontSize:10,domain:[1240,1255]}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff",fontSize:"12px"}}),d.jsx(gi,{type:"monotone",dataKey:"temp",stroke:"#10b981",strokeWidth:2,dot:{fill:"#10b981",r:4}})]})})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Yh,{className:"w-4 h-4 text-yellow-400"}),"预警信息"]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("div",{className:"p-3 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Yh,{className:"w-4 h-4 text-yellow-400 mt-0.5"}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-yellow-400 font-medium",children:"水温差上升"}),d.jsx("div",{className:"text-xs text-yellow-400/70 mt-1",children:"建议检查冷却水压力"})]})]})}),d.jsx("div",{className:"p-3 rounded-lg bg-green-500/10 border border-green-500/30",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Cr,{className:"w-4 h-4 text-green-400 mt-0.5"}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-green-400 font-medium",children:"系统运行正常"}),d.jsx("div",{className:"text-xs text-green-400/70 mt-1",children:"无其他异常"})]})]})})]})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"快捷操作"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("button",{className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors",children:"📊 查看历史诊断"}),d.jsx("button",{className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors",children:"📚 知识库查询"}),d.jsx("button",{className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors",children:"📄 导出诊断报告"}),d.jsx("button",{className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors",children:"👨‍💼 专家会诊"})]})]})]})]})]})}function pl(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function nU(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function iH(...t){return e=>{let n=!1;const r=t.map(i=>{const a=nU(i,e);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():nU(t[i],null)}}}}function Hc(...t){return O.useCallback(iH(...t),t)}function Nbe(t,e){const n=O.createContext(e),r=a=>{const{children:s,...o}=a,c=O.useMemo(()=>o,Object.values(o));return d.jsx(n.Provider,{value:c,children:s})};r.displayName=t+"Provider";function i(a){const s=O.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${a}\` must be used within \`${t}\``)}return[r,i]}function aH(t,e=[]){let n=[];function r(a,s){const o=O.createContext(s),c=n.length;n=[...n,s];const l=f=>{var w;const{scope:m,children:g,...b}=f,y=((w=m==null?void 0:m[t])==null?void 0:w[c])||o,v=O.useMemo(()=>b,Object.values(b));return d.jsx(y.Provider,{value:v,children:g})};l.displayName=a+"Provider";function h(f,m){var y;const g=((y=m==null?void 0:m[t])==null?void 0:y[c])||o,b=O.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,h]}const i=()=>{const a=n.map(s=>O.createContext(s));return function(o){const c=(o==null?void 0:o[t])||a;return O.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return i.scopeName=t,[r,Pbe(i,...e)]}function Pbe(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((o,{useScope:c,scopeName:l})=>{const f=c(a)[`__scope${l}`];return{...o,...f}},{});return O.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}var vy=globalThis!=null&&globalThis.document?O.useLayoutEffect:()=>{},Cbe=Y8.useId||(()=>{}),Rbe=0;function F2(t){const[e,n]=O.useState(Cbe());return vy(()=>{n(r=>r??String(Rbe++))},[t]),t||(e?`radix-${e}`:"")}function jc(t){const e=O.useRef(t);return O.useEffect(()=>{e.current=t}),O.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function jbe({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=Obe({defaultProp:e,onChange:n}),a=t!==void 0,s=a?t:r,o=jc(n),c=O.useCallback(l=>{if(a){const f=typeof l=="function"?l(t):l;f!==t&&o(f)}else i(l)},[a,t,i,o]);return[s,c]}function Obe({defaultProp:t,onChange:e}){const n=O.useState(t),[r]=n,i=O.useRef(r),a=jc(e);return O.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var VP=O.forwardRef((t,e)=>{const{children:n,...r}=t,i=O.Children.toArray(n),a=i.find(Dbe);if(a){const s=a.props.children,o=i.map(c=>c===a?O.Children.count(s)>1?O.Children.only(null):O.isValidElement(s)?s.props.children:null:c);return d.jsx($T,{...r,ref:e,children:O.isValidElement(s)?O.cloneElement(s,void 0,o):null})}return d.jsx($T,{...r,ref:e,children:n})});VP.displayName="Slot";var $T=O.forwardRef((t,e)=>{const{children:n,...r}=t;if(O.isValidElement(n)){const i=Lbe(n),a=kbe(r,n.props);return n.type!==O.Fragment&&(a.ref=e?iH(e,i):i),O.cloneElement(n,a)}return O.Children.count(n)>1?O.Children.only(null):null});$T.displayName="SlotClone";var Ibe=({children:t})=>d.jsx(d.Fragment,{children:t});function Dbe(t){return O.isValidElement(t)&&t.type===Ibe}function kbe(t,e){const n={...e};for(const r in e){const i=t[r],a=e[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{a(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...t,...n}}function Lbe(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Fbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],qa=Fbe.reduce((t,e)=>{const n=O.forwardRef((r,i)=>{const{asChild:a,...s}=r,o=a?VP:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(o,{...s,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Ube(t,e){t&&kB.flushSync(()=>t.dispatchEvent(e))}function Bbe(t,e=globalThis==null?void 0:globalThis.document){const n=jc(t);O.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var zbe="DismissableLayer",VT="dismissableLayer.update",$be="dismissableLayer.pointerDownOutside",Vbe="dismissableLayer.focusOutside",rU,sH=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oH=O.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...c}=t,l=O.useContext(sH),[h,f]=O.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=O.useState({}),b=Hc(e,N=>f(N)),y=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(v),_=h?y.indexOf(h):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,M=_>=w,T=Wbe(N=>{const P=N.target,R=[...l.branches].some(F=>F.contains(P));!M||R||(i==null||i(N),s==null||s(N),N.defaultPrevented||o==null||o())},m),A=qbe(N=>{const P=N.target;[...l.branches].some(F=>F.contains(P))||(a==null||a(N),s==null||s(N),N.defaultPrevented||o==null||o())},m);return Bbe(N=>{_===l.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&o&&(N.preventDefault(),o()))},m),O.useEffect(()=>{if(h)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(rU=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),iU(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=rU)}},[h,m,n,l]),O.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),iU())},[h,l]),O.useEffect(()=>{const N=()=>g({});return document.addEventListener(VT,N),()=>document.removeEventListener(VT,N)},[]),d.jsx(qa.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...t.style},onFocusCapture:pl(t.onFocusCapture,A.onFocusCapture),onBlurCapture:pl(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:pl(t.onPointerDownCapture,T.onPointerDownCapture)})});oH.displayName=zbe;var Hbe="DismissableLayerBranch",Gbe=O.forwardRef((t,e)=>{const n=O.useContext(sH),r=O.useRef(null),i=Hc(e,r);return O.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(qa.div,{...t,ref:i})});Gbe.displayName=Hbe;function Wbe(t,e=globalThis==null?void 0:globalThis.document){const n=jc(t),r=O.useRef(!1),i=O.useRef(()=>{});return O.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let c=function(){lH($be,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",a),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function qbe(t,e=globalThis==null?void 0:globalThis.document){const n=jc(t),r=O.useRef(!1);return O.useEffect(()=>{const i=a=>{a.target&&!r.current&&lH(Vbe,n,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function iU(){const t=new CustomEvent(VT);document.dispatchEvent(t)}function lH(t,e,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?Ube(i,a):i.dispatchEvent(a)}var U2="focusScope.autoFocusOnMount",B2="focusScope.autoFocusOnUnmount",aU={bubbles:!1,cancelable:!0},Xbe="FocusScope",cH=O.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[o,c]=O.useState(null),l=jc(i),h=jc(a),f=O.useRef(null),m=Hc(e,y=>c(y)),g=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(r){let y=function(E){if(g.paused||!o)return;const M=E.target;o.contains(M)?f.current=M:el(f.current,{select:!0})},v=function(E){if(g.paused||!o)return;const M=E.relatedTarget;M!==null&&(o.contains(M)||el(f.current,{select:!0}))},w=function(E){if(document.activeElement===document.body)for(const T of E)T.removedNodes.length>0&&el(o)};document.addEventListener("focusin",y),document.addEventListener("focusout",v);const _=new MutationObserver(w);return o&&_.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",v),_.disconnect()}}},[r,o,g.paused]),O.useEffect(()=>{if(o){oU.add(g);const y=document.activeElement;if(!o.contains(y)){const w=new CustomEvent(U2,aU);o.addEventListener(U2,l),o.dispatchEvent(w),w.defaultPrevented||(Kbe(e1e(uH(o)),{select:!0}),document.activeElement===y&&el(o))}return()=>{o.removeEventListener(U2,l),setTimeout(()=>{const w=new CustomEvent(B2,aU);o.addEventListener(B2,h),o.dispatchEvent(w),w.defaultPrevented||el(y??document.body,{select:!0}),o.removeEventListener(B2,h),oU.remove(g)},0)}}},[o,l,h,g]);const b=O.useCallback(y=>{if(!n&&!r||g.paused)return;const v=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,w=document.activeElement;if(v&&w){const _=y.currentTarget,[E,M]=Ybe(_);E&&M?!y.shiftKey&&w===M?(y.preventDefault(),n&&el(E,{select:!0})):y.shiftKey&&w===E&&(y.preventDefault(),n&&el(M,{select:!0})):w===_&&y.preventDefault()}},[n,r,g.paused]);return d.jsx(qa.div,{tabIndex:-1,...s,ref:m,onKeyDown:b})});cH.displayName=Xbe;function Kbe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(el(r,{select:e}),document.activeElement!==n)return}function Ybe(t){const e=uH(t),n=sU(e,t),r=sU(e.reverse(),t);return[n,r]}function uH(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function sU(t,e){for(const n of t)if(!Zbe(n,{upTo:e}))return n}function Zbe(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 Jbe(t){return t instanceof HTMLInputElement&&"select"in t}function el(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Jbe(t)&&e&&t.select()}}var oU=Qbe();function Qbe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=lU(t,e),t.unshift(e)},remove(e){var n;t=lU(t,e),(n=t[0])==null||n.resume()}}}function lU(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function e1e(t){return t.filter(e=>e.tagName!=="A")}var t1e="Portal",dH=O.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[i,a]=O.useState(!1);vy(()=>a(!0),[]);const s=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return s?LB.createPortal(d.jsx(qa.div,{...r,ref:e}),s):null});dH.displayName=t1e;function n1e(t,e){return O.useReducer((n,r)=>e[n][r]??n,t)}var xx=t=>{const{present:e,children:n}=t,r=r1e(e),i=typeof n=="function"?n({present:r.isPresent}):O.Children.only(n),a=Hc(r.ref,i1e(i));return typeof n=="function"||r.isPresent?O.cloneElement(i,{ref:a}):null};xx.displayName="Presence";function r1e(t){const[e,n]=O.useState(),r=O.useRef({}),i=O.useRef(t),a=O.useRef("none"),s=t?"mounted":"unmounted",[o,c]=n1e(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{const l=H0(r.current);a.current=o==="mounted"?l:"none"},[o]),vy(()=>{const l=r.current,h=i.current;if(h!==t){const m=a.current,g=H0(l);t?c("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),vy(()=>{if(e){let l;const h=e.ownerDocument.defaultView??window,f=g=>{const y=H0(r.current).includes(g.animationName);if(g.target===e&&y&&(c("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",l=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},m=g=>{g.target===e&&(a.current=H0(r.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{h.clearTimeout(l),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:O.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function H0(t){return(t==null?void 0:t.animationName)||"none"}function i1e(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var z2=0;function a1e(){O.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??cU()),document.body.insertAdjacentElement("beforeend",t[1]??cU()),z2++,()=>{z2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),z2--}},[])}function cU(){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 ss=function(){return ss=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ss.apply(this,arguments)};function fH(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function s1e(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}var $g="right-scroll-bar-position",Vg="width-before-scroll-bar",o1e="with-scroll-bars-hidden",l1e="--removed-body-scroll-bar-size";function $2(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function c1e(t,e){var n=O.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var u1e=typeof window<"u"?O.useLayoutEffect:O.useEffect,uU=new WeakMap;function d1e(t,e){var n=c1e(null,function(r){return t.forEach(function(i){return $2(i,r)})});return u1e(function(){var r=uU.get(n);if(r){var i=new Set(r),a=new Set(t),s=n.current;i.forEach(function(o){a.has(o)||$2(o,null)}),a.forEach(function(o){i.has(o)||$2(o,s)})}uU.set(n,t)},[t]),n}function f1e(t){return t}function h1e(t,e){e===void 0&&(e=f1e);var n=[],r=!1,i={read:function(){if(r)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(a){var s=e(a,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(o){return a(o)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(a),s=n}var c=function(){var h=s;s=[],h.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(h){s.push(h),l()},filter:function(h){return s=s.filter(h),n}}}};return i}function p1e(t){t===void 0&&(t={});var e=h1e(null);return e.options=ss({async:!0,ssr:!1},t),e}var hH=function(t){var e=t.sideCar,n=fH(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return O.createElement(r,ss({},n))};hH.isSideCarExport=!0;function m1e(t,e){return t.useMedium(e),hH}var pH=p1e(),V2=function(){},bx=O.forwardRef(function(t,e){var n=O.useRef(null),r=O.useState({onScrollCapture:V2,onWheelCapture:V2,onTouchMoveCapture:V2}),i=r[0],a=r[1],s=t.forwardProps,o=t.children,c=t.className,l=t.removeScrollBar,h=t.enabled,f=t.shards,m=t.sideCar,g=t.noRelative,b=t.noIsolation,y=t.inert,v=t.allowPinchZoom,w=t.as,_=w===void 0?"div":w,E=t.gapMode,M=fH(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,A=d1e([n,e]),N=ss(ss({},M),i);return O.createElement(O.Fragment,null,h&&O.createElement(T,{sideCar:pH,removeScrollBar:l,shards:f,noRelative:g,noIsolation:b,inert:y,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:E}),s?O.cloneElement(O.Children.only(o),ss(ss({},N),{ref:A})):O.createElement(_,ss({},N,{className:c,ref:A}),o))});bx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bx.classNames={fullWidth:Vg,zeroRight:$g};var g1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function v1e(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=g1e();return e&&t.setAttribute("nonce",e),t}function y1e(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function x1e(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var b1e=function(){var t=0,e=null;return{add:function(n){t==0&&(e=v1e())&&(y1e(e,n),x1e(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},w1e=function(){var t=b1e();return function(e,n){O.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},mH=function(){var t=w1e(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},_1e={left:0,top:0,right:0,gap:0},H2=function(t){return parseInt(t||"",10)||0},S1e=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[H2(n),H2(r),H2(i)]},M1e=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return _1e;var e=S1e(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},E1e=mH(),nd="data-scroll-locked",T1e=function(t,e,n,r){var i=t.left,a=t.top,s=t.right,o=t.gap;return n===void 0&&(n="margin"),`
.`.concat(o1e,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(o,"px ").concat(r,`;
}
body[`).concat(nd,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(a,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(o,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat($g,` {
right: `).concat(o,"px ").concat(r,`;
}
.`).concat(Vg,` {
margin-right: `).concat(o,"px ").concat(r,`;
}
.`).concat($g," .").concat($g,` {
right: 0 `).concat(r,`;
}
.`).concat(Vg," .").concat(Vg,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(nd,`] {
`).concat(l1e,": ").concat(o,`px;
}
`)},dU=function(){var t=parseInt(document.body.getAttribute(nd)||"0",10);return isFinite(t)?t:0},A1e=function(){O.useEffect(function(){return document.body.setAttribute(nd,(dU()+1).toString()),function(){var t=dU()-1;t<=0?document.body.removeAttribute(nd):document.body.setAttribute(nd,t.toString())}},[])},N1e=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;A1e();var a=O.useMemo(function(){return M1e(i)},[i]);return O.createElement(E1e,{styles:T1e(a,!e,i,n?"":"!important")})},HT=!1;if(typeof window<"u")try{var G0=Object.defineProperty({},"passive",{get:function(){return HT=!0,!0}});window.addEventListener("test",G0,G0),window.removeEventListener("test",G0,G0)}catch{HT=!1}var vu=HT?{passive:!1}:!1,P1e=function(t){return t.tagName==="TEXTAREA"},gH=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!P1e(t)&&n[e]==="visible")},C1e=function(t){return gH(t,"overflowY")},R1e=function(t){return gH(t,"overflowX")},fU=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=vH(t,r);if(i){var a=yH(t,r),s=a[1],o=a[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},j1e=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},O1e=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},vH=function(t,e){return t==="v"?C1e(e):R1e(e)},yH=function(t,e){return t==="v"?j1e(e):O1e(e)},I1e=function(t,e){return t==="h"&&e==="rtl"?-1:1},D1e=function(t,e,n,r,i){var a=I1e(t,window.getComputedStyle(e).direction),s=a*r,o=n.target,c=e.contains(o),l=!1,h=s>0,f=0,m=0;do{if(!o)break;var g=yH(t,o),b=g[0],y=g[1],v=g[2],w=y-v-a*b;(b||w)&&vH(t,o)&&(f+=w,m+=b);var _=o.parentNode;o=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(h&&Math.abs(f)<1||!h&&Math.abs(m)<1)&&(l=!0),l},W0=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},hU=function(t){return[t.deltaX,t.deltaY]},pU=function(t){return t&&"current"in t?t.current:t},k1e=function(t,e){return t[0]===e[0]&&t[1]===e[1]},L1e=function(t){return`
.block-interactivity-`.concat(t,` {pointer-events: none;}
.allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},F1e=0,yu=[];function U1e(t){var e=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState(F1e++)[0],a=O.useState(mH)[0],s=O.useRef(t);O.useEffect(function(){s.current=t},[t]),O.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var y=s1e([t.lockRef.current],(t.shards||[]).map(pU),!0).filter(Boolean);return y.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var o=O.useCallback(function(y,v){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var w=W0(y),_=n.current,E="deltaX"in y?y.deltaX:_[0]-w[0],M="deltaY"in y?y.deltaY:_[1]-w[1],T,A=y.target,N=Math.abs(E)>Math.abs(M)?"h":"v";if("touches"in y&&N==="h"&&A.type==="range")return!1;var P=window.getSelection(),R=P&&P.anchorNode,F=R?R===A||R.contains(A):!1;if(F)return!1;var D=fU(N,A);if(!D)return!0;if(D?T=N:(T=N==="v"?"h":"v",D=fU(N,A)),!D)return!1;if(!r.current&&"changedTouches"in y&&(E||M)&&(r.current=T),!T)return!0;var L=r.current||T;return D1e(L,v,y,L==="h"?E:M)},[]),c=O.useCallback(function(y){var v=y;if(!(!yu.length||yu[yu.length-1]!==a)){var w="deltaY"in v?hU(v):W0(v),_=e.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&k1e(T.delta,w)})[0];if(_&&_.should){v.cancelable&&v.preventDefault();return}if(!_){var E=(s.current.shards||[]).map(pU).filter(Boolean).filter(function(T){return T.contains(v.target)}),M=E.length>0?o(v,E[0]):!s.current.noIsolation;M&&v.cancelable&&v.preventDefault()}}},[]),l=O.useCallback(function(y,v,w,_){var E={name:y,delta:v,target:w,should:_,shadowParent:B1e(w)};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(M){return M!==E})},1)},[]),h=O.useCallback(function(y){n.current=W0(y),r.current=void 0},[]),f=O.useCallback(function(y){l(y.type,hU(y),y.target,o(y,t.lockRef.current))},[]),m=O.useCallback(function(y){l(y.type,W0(y),y.target,o(y,t.lockRef.current))},[]);O.useEffect(function(){return yu.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,vu),document.addEventListener("touchmove",c,vu),document.addEventListener("touchstart",h,vu),function(){yu=yu.filter(function(y){return y!==a}),document.removeEventListener("wheel",c,vu),document.removeEventListener("touchmove",c,vu),document.removeEventListener("touchstart",h,vu)}},[]);var g=t.removeScrollBar,b=t.inert;return O.createElement(O.Fragment,null,b?O.createElement(a,{styles:L1e(i)}):null,g?O.createElement(N1e,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function B1e(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const z1e=m1e(pH,U1e);var xH=O.forwardRef(function(t,e){return O.createElement(bx,ss({},t,{ref:e,sideCar:z1e}))});xH.classNames=bx.classNames;var $1e=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},xu=new WeakMap,q0=new WeakMap,X0={},G2=0,bH=function(t){return t&&(t.host||bH(t.parentNode))},V1e=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=bH(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},H1e=function(t,e,n,r){var i=V1e(e,Array.isArray(t)?t:[t]);X0[n]||(X0[n]=new WeakMap);var a=X0[n],s=[],o=new Set,c=new Set(i),l=function(f){!f||o.has(f)||(o.add(f),l(f.parentNode))};i.forEach(l);var h=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(o.has(m))h(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",y=(xu.get(m)||0)+1,v=(a.get(m)||0)+1;xu.set(m,y),a.set(m,v),s.push(m),y===1&&b&&q0.set(m,!0),v===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return h(e),o.clear(),G2++,function(){s.forEach(function(f){var m=xu.get(f)-1,g=a.get(f)-1;xu.set(f,m),a.set(f,g),m||(q0.has(f)||f.removeAttribute(r),q0.delete(f)),g||f.removeAttribute(n)}),G2--,G2||(xu=new WeakMap,xu=new WeakMap,q0=new WeakMap,X0={})}},G1e=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=$1e(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),H1e(r,i,n,"aria-hidden")):function(){return null}},HP="Dialog",[wH]=aH(HP),[W1e,Xa]=wH(HP),_H=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,o=O.useRef(null),c=O.useRef(null),[l=!1,h]=jbe({prop:r,defaultProp:i,onChange:a});return d.jsx(W1e,{scope:e,triggerRef:o,contentRef:c,contentId:F2(),titleId:F2(),descriptionId:F2(),open:l,onOpenChange:h,onOpenToggle:O.useCallback(()=>h(f=>!f),[h]),modal:s,children:n})};_H.displayName=HP;var SH="DialogTrigger",q1e=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Xa(SH,n),a=Hc(e,i.triggerRef);return d.jsx(qa.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":qP(i.open),...r,ref:a,onClick:pl(t.onClick,i.onOpenToggle)})});q1e.displayName=SH;var GP="DialogPortal",[X1e,MH]=wH(GP,{forceMount:void 0}),EH=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,a=Xa(GP,e);return d.jsx(X1e,{scope:e,forceMount:n,children:O.Children.map(r,s=>d.jsx(xx,{present:n||a.open,children:d.jsx(dH,{asChild:!0,container:i,children:s})}))})};EH.displayName=GP;var yy="DialogOverlay",TH=O.forwardRef((t,e)=>{const n=MH(yy,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,a=Xa(yy,t.__scopeDialog);return a.modal?d.jsx(xx,{present:r||a.open,children:d.jsx(K1e,{...i,ref:e})}):null});TH.displayName=yy;var K1e=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Xa(yy,n);return d.jsx(xH,{as:VP,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(qa.div,{"data-state":qP(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Oc="DialogContent",AH=O.forwardRef((t,e)=>{const n=MH(Oc,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,a=Xa(Oc,t.__scopeDialog);return d.jsx(xx,{present:r||a.open,children:a.modal?d.jsx(Y1e,{...i,ref:e}):d.jsx(Z1e,{...i,ref:e})})});AH.displayName=Oc;var Y1e=O.forwardRef((t,e)=>{const n=Xa(Oc,t.__scopeDialog),r=O.useRef(null),i=Hc(e,n.contentRef,r);return O.useEffect(()=>{const a=r.current;if(a)return G1e(a)},[]),d.jsx(NH,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pl(t.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:pl(t.onPointerDownOutside,a=>{const s=a.detail.originalEvent,o=s.button===0&&s.ctrlKey===!0;(s.button===2||o)&&a.preventDefault()}),onFocusOutside:pl(t.onFocusOutside,a=>a.preventDefault())})}),Z1e=O.forwardRef((t,e)=>{const n=Xa(Oc,t.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return d.jsx(NH,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=t.onCloseAutoFocus)==null||s.call(t,a),a.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,l;(c=t.onInteractOutside)==null||c.call(t,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),NH=O.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,o=Xa(Oc,n),c=O.useRef(null),l=Hc(e,c);return a1e(),d.jsxs(d.Fragment,{children:[d.jsx(cH,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(oH,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":qP(o.open),...s,ref:l,onDismiss:()=>o.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(J1e,{titleId:o.titleId}),d.jsx(ewe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),WP="DialogTitle",PH=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Xa(WP,n);return d.jsx(qa.h2,{id:i.titleId,...r,ref:e})});PH.displayName=WP;var CH="DialogDescription",RH=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Xa(CH,n);return d.jsx(qa.p,{id:i.descriptionId,...r,ref:e})});RH.displayName=CH;var jH="DialogClose",OH=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Xa(jH,n);return d.jsx(qa.button,{type:"button",...r,ref:e,onClick:pl(t.onClick,()=>i.onOpenChange(!1))})});OH.displayName=jH;function qP(t){return t?"open":"closed"}var IH="DialogTitleWarning",[vRe,DH]=Nbe(IH,{contentName:Oc,titleName:WP,docsSlug:"dialog"}),J1e=({titleId:t})=>{const e=DH(IH),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return O.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Q1e="DialogDescriptionWarning",ewe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${DH(Q1e).contentName}}.`;return O.useEffect(()=>{var a;const i=(a=t.current)==null?void 0:a.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},twe=_H,nwe=EH,rwe=TH,iwe=AH,awe=PH,swe=RH,owe=OH;const XP="-",lwe=t=>{const e=uwe(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{const o=s.split(XP);return o[0]===""&&o.length!==1&&o.shift(),kH(o,e)||cwe(s)},getConflictingClassGroupIds:(s,o)=>{const c=n[s]||[];return o&&r[s]?[...c,...r[s]]:c}}},kH=(t,e)=>{var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?kH(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const a=t.join(XP);return(s=e.validators.find(({validator:o})=>o(a)))==null?void 0:s.classGroupId},mU=/^\[(.+)\]$/,cwe=t=>{if(mU.test(t)){const e=mU.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},uwe=t=>{const{theme:e,classGroups:n}=t,r={nextPart:new Map,validators:[]};for(const i in n)GT(n[i],r,i,e);return r},GT=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const a=i===""?e:gU(e,i);a.classGroupId=n;return}if(typeof i=="function"){if(dwe(i)){GT(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,s])=>{GT(s,gU(e,a),n,r)})})},gU=(t,e)=>{let n=t;return e.split(XP).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},dwe=t=>t.isThemeGetter,fwe=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(a,s)=>{n.set(a,s),e++,e>t&&(e=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return i(a,s),s},set(a,s){n.has(a)?n.set(a,s):i(a,s)}}},WT="!",qT=":",hwe=qT.length,pwe=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=i=>{const a=[];let s=0,o=0,c=0,l;for(let b=0;b<i.length;b++){let y=i[b];if(s===0&&o===0){if(y===qT){a.push(i.slice(c,b)),c=b+hwe;continue}if(y==="/"){l=b;continue}}y==="["?s++:y==="]"?s--:y==="("?o++:y===")"&&o--}const h=a.length===0?i:i.substring(c),f=mwe(h),m=f!==h,g=l&&l>c?l-c:void 0;return{modifiers:a,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:g}};if(e){const i=e+qT,a=r;r=s=>s.startsWith(i)?a(s.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},mwe=t=>t.endsWith(WT)?t.substring(0,t.length-1):t.startsWith(WT)?t.substring(1):t,gwe=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let a=[];return r.forEach(s=>{s[0]==="["||e[s]?(i.push(...a.sort(),s),a=[]):a.push(s)}),i.push(...a.sort()),i}},vwe=t=>({cache:fwe(t.cacheSize),parseClassName:pwe(t),sortModifiers:gwe(t),...lwe(t)}),ywe=/\s+/,xwe=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=e,s=[],o=t.trim().split(ywe);let c="";for(let l=o.length-1;l>=0;l-=1){const h=o[l],{isExternal:f,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:y}=n(h);if(f){c=h+(c.length>0?" "+c:c);continue}let v=!!y,w=r(v?b.substring(0,y):b);if(!w){if(!v){c=h+(c.length>0?" "+c:c);continue}if(w=r(b),!w){c=h+(c.length>0?" "+c:c);continue}v=!1}const _=a(m).join(":"),E=g?_+WT:_,M=E+w;if(s.includes(M))continue;s.push(M);const T=i(w,v);for(let A=0;A<T.length;++A){const N=T[A];s.push(E+N)}c=h+(c.length>0?" "+c:c)}return c};function bwe(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=LH(e))&&(r&&(r+=" "),r+=n);return r}const LH=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=LH(t[r]))&&(n&&(n+=" "),n+=e);return n};function wwe(t,...e){let n,r,i,a=s;function s(c){const l=e.reduce((h,f)=>f(h),t());return n=vwe(l),r=n.cache.get,i=n.cache.set,a=o,o(c)}function o(c){const l=r(c);if(l)return l;const h=xwe(c,n);return i(c,h),h}return function(){return a(bwe.apply(null,arguments))}}const mr=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},FH=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,UH=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_we=/^\d+\/\d+$/,Swe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mwe=/\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$/,Ewe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Twe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Awe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bu=t=>_we.test(t),on=t=>!!t&&!Number.isNaN(Number(t)),Vo=t=>!!t&&Number.isInteger(Number(t)),W2=t=>t.endsWith("%")&&on(t.slice(0,-1)),Hs=t=>Swe.test(t),Nwe=()=>!0,Pwe=t=>Mwe.test(t)&&!Ewe.test(t),BH=()=>!1,Cwe=t=>Twe.test(t),Rwe=t=>Awe.test(t),jwe=t=>!Tt(t)&&!At(t),Owe=t=>lf(t,VH,BH),Tt=t=>FH.test(t),Wl=t=>lf(t,HH,Pwe),q2=t=>lf(t,Fwe,on),vU=t=>lf(t,zH,BH),Iwe=t=>lf(t,$H,Rwe),K0=t=>lf(t,GH,Cwe),At=t=>UH.test(t),sh=t=>cf(t,HH),Dwe=t=>cf(t,Uwe),yU=t=>cf(t,zH),kwe=t=>cf(t,VH),Lwe=t=>cf(t,$H),Y0=t=>cf(t,GH,!0),lf=(t,e,n)=>{const r=FH.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},cf=(t,e,n=!1)=>{const r=UH.exec(t);return r?r[1]?e(r[1]):n:!1},zH=t=>t==="position"||t==="percentage",$H=t=>t==="image"||t==="url",VH=t=>t==="length"||t==="size"||t==="bg-size",HH=t=>t==="length",Fwe=t=>t==="number",Uwe=t=>t==="family-name",GH=t=>t==="shadow",Bwe=()=>{const t=mr("color"),e=mr("font"),n=mr("text"),r=mr("font-weight"),i=mr("tracking"),a=mr("leading"),s=mr("breakpoint"),o=mr("container"),c=mr("spacing"),l=mr("radius"),h=mr("shadow"),f=mr("inset-shadow"),m=mr("text-shadow"),g=mr("drop-shadow"),b=mr("blur"),y=mr("perspective"),v=mr("aspect"),w=mr("ease"),_=mr("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...M(),At,Tt],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[At,Tt,c],R=()=>[bu,"full","auto",...P()],F=()=>[Vo,"none","subgrid",At,Tt],D=()=>["auto",{span:["full",Vo,At,Tt]},Vo,At,Tt],L=()=>[Vo,"auto",At,Tt],q=()=>["auto","min","max","fr",At,Tt],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...P()],V=()=>[bu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],$=()=>[t,At,Tt],Y=()=>[...M(),yU,vU,{position:[At,Tt]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",kwe,Owe,{size:[At,Tt]}],H=()=>[W2,sh,Wl],te=()=>["","none","full",l,At,Tt],we=()=>["",on,sh,Wl],Ae=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[on,W2,yU,vU],pe=()=>["","none",b,At,Tt],fe=()=>["none",on,At,Tt],ce=()=>["none",on,At,Tt],Ce=()=>[on,At,Tt],ye=()=>[bu,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hs],breakpoint:[Hs],color:[Nwe],container:[Hs],"drop-shadow":[Hs],ease:["in","out","in-out"],font:[jwe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hs],shadow:[Hs],spacing:["px",on],text:[Hs],"text-shadow":[Hs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bu,Tt,At,v]}],container:["container"],columns:[{columns:[on,Tt,At,o]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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"],sr:["sr-only","not-sr-only"],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:T()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Vo,"auto",At,Tt]}],basis:[{basis:[bu,"full","auto",o,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[on,bu,"auto","initial","none",Tt]}],grow:[{grow:["",on,At,Tt]}],shrink:[{shrink:["",on,At,Tt]}],order:[{order:[Vo,"first","last","none",At,Tt]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[o,"screen",...V()]}],"min-w":[{"min-w":[o,"screen","none",...V()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...V()]}],h:[{h:["screen",...V()]}],"min-h":[{"min-h":["screen","none",...V()]}],"max-h":[{"max-h":["screen",...V()]}],"font-size":[{text:["base",n,sh,Wl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,At,q2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",W2,Tt]}],"font-family":[{font:[Dwe,Tt,e]}],"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:[i,At,Tt]}],"line-clamp":[{"line-clamp":[on,"none",At,q2]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",At,Tt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",At,Tt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[on,"from-font","auto",At,Wl]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[on,"auto",At,Tt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",At,Tt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",At,Tt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vo,At,Tt],radial:["",At,Tt],conic:[Vo,At,Tt]},Lwe,Iwe]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:we()}],"border-w-x":[{"border-x":we()}],"border-w-y":[{"border-y":we()}],"border-w-s":[{"border-s":we()}],"border-w-e":[{"border-e":we()}],"border-w-t":[{"border-t":we()}],"border-w-r":[{"border-r":we()}],"border-w-b":[{"border-b":we()}],"border-w-l":[{"border-l":we()}],"divide-x":[{"divide-x":we()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":we()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ae(),"hidden","none"]}],"divide-style":[{divide:[...Ae(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[on,At,Tt]}],"outline-w":[{outline:["",on,sh,Wl]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",h,Y0,K0]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",f,Y0,K0]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:we()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[on,Wl]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":we()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",m,Y0,K0]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[on,At,Tt]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[on]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[At,Tt]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[on]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",At,Tt]}],filter:[{filter:["","none",At,Tt]}],blur:[{blur:pe()}],brightness:[{brightness:[on,At,Tt]}],contrast:[{contrast:[on,At,Tt]}],"drop-shadow":[{"drop-shadow":["","none",g,Y0,K0]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",on,At,Tt]}],"hue-rotate":[{"hue-rotate":[on,At,Tt]}],invert:[{invert:["",on,At,Tt]}],saturate:[{saturate:[on,At,Tt]}],sepia:[{sepia:["",on,At,Tt]}],"backdrop-filter":[{"backdrop-filter":["","none",At,Tt]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[on,At,Tt]}],"backdrop-contrast":[{"backdrop-contrast":[on,At,Tt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",on,At,Tt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[on,At,Tt]}],"backdrop-invert":[{"backdrop-invert":["",on,At,Tt]}],"backdrop-opacity":[{"backdrop-opacity":[on,At,Tt]}],"backdrop-saturate":[{"backdrop-saturate":[on,At,Tt]}],"backdrop-sepia":[{"backdrop-sepia":["",on,At,Tt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",At,Tt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[on,"initial",At,Tt]}],ease:[{ease:["linear","initial",w,At,Tt]}],delay:[{delay:[on,At,Tt]}],animate:[{animate:["none",_,At,Tt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,At,Tt]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[At,Tt,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","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",At,Tt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",At,Tt]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[on,sh,Wl,q2]}],stroke:[{stroke:["none",...$()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zwe=wwe(Bwe);function uf(...t){return zwe(Yt(t))}function $we({...t}){return d.jsx(twe,{"data-slot":"dialog",...t})}function Vwe({...t}){return d.jsx(nwe,{"data-slot":"dialog-portal",...t})}function Hwe({className:t,...e}){return d.jsx(rwe,{"data-slot":"dialog-overlay",className:uf("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function Gwe({className:t,children:e,...n}){return d.jsxs(Vwe,{"data-slot":"dialog-portal",children:[d.jsx(Hwe,{}),d.jsxs(iwe,{"data-slot":"dialog-content",className:uf("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[e,d.jsxs(owe,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(IB,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Wwe({className:t,...e}){return d.jsx("div",{"data-slot":"dialog-header",className:uf("flex flex-col gap-2 text-center sm:text-left",t),...e})}function qwe({className:t,...e}){return d.jsx(awe,{"data-slot":"dialog-title",className:uf("text-lg leading-none font-semibold",t),...e})}function Xwe({className:t,...e}){return d.jsx(swe,{"data-slot":"dialog-description",className:uf("text-muted-foreground text-sm",t),...e})}var Kwe={value:()=>{}};function pm(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Hg(n)}function Hg(t){this._=t}function Ywe(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Hg.prototype=pm.prototype={constructor:Hg,on:function(t,e){var n=this._,r=Ywe(t+"",n),i,a=-1,s=r.length;if(arguments.length<2){for(;++a<s;)if((i=(t=r[a]).type)&&(i=Zwe(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(t=r[a]).type)n[i]=xU(n[i],t.name,e);else if(e==null)for(i in n)n[i]=xU(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Hg(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};function Zwe(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function xU(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Kwe,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var XT="http://www.w3.org/1999/xhtml";const bU={svg:"http://www.w3.org/2000/svg",xhtml:XT,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wx(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),bU.hasOwnProperty(e)?{space:bU[e],local:t}:t}function Jwe(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===XT&&e.documentElement.namespaceURI===XT?e.createElement(t):e.createElementNS(n,t)}}function Qwe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function WH(t){var e=wx(t);return(e.local?Qwe:Jwe)(e)}function e_e(){}function KP(t){return t==null?e_e:function(){return this.querySelector(t)}}function t_e(t){typeof t!="function"&&(t=KP(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],s=a.length,o=r[i]=new Array(s),c,l,h=0;h<s;++h)(c=a[h])&&(l=t.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),o[h]=l);return new Qi(r,this._parents)}function n_e(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function r_e(){return[]}function qH(t){return t==null?r_e:function(){return this.querySelectorAll(t)}}function i_e(t){return function(){return n_e(t.apply(this,arguments))}}function a_e(t){typeof t=="function"?t=i_e(t):t=qH(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var s=e[a],o=s.length,c,l=0;l<o;++l)(c=s[l])&&(r.push(t.call(c,c.__data__,l,s)),i.push(c));return new Qi(r,i)}function XH(t){return function(){return this.matches(t)}}function KH(t){return function(e){return e.matches(t)}}var s_e=Array.prototype.find;function o_e(t){return function(){return s_e.call(this.children,t)}}function l_e(){return this.firstElementChild}function c_e(t){return this.select(t==null?l_e:o_e(typeof t=="function"?t:KH(t)))}var u_e=Array.prototype.filter;function d_e(){return Array.from(this.children)}function f_e(t){return function(){return u_e.call(this.children,t)}}function h_e(t){return this.selectAll(t==null?d_e:f_e(typeof t=="function"?t:KH(t)))}function p_e(t){typeof t!="function"&&(t=XH(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],s=a.length,o=r[i]=[],c,l=0;l<s;++l)(c=a[l])&&t.call(c,c.__data__,l,a)&&o.push(c);return new Qi(r,this._parents)}function YH(t){return new Array(t.length)}function m_e(){return new Qi(this._enter||this._groups.map(YH),this._parents)}function xy(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}xy.prototype={constructor:xy,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function g_e(t){return function(){return t}}function v_e(t,e,n,r,i,a){for(var s=0,o,c=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new xy(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function y_e(t,e,n,r,i,a,s){var o,c,l=new Map,h=e.length,f=a.length,m=new Array(h),g;for(o=0;o<h;++o)(c=e[o])&&(m[o]=g=s.call(c,c.__data__,o,e)+"",l.has(g)?i[o]=c:l.set(g,c));for(o=0;o<f;++o)g=s.call(t,a[o],o,a)+"",(c=l.get(g))?(r[o]=c,c.__data__=a[o],l.delete(g)):n[o]=new xy(t,a[o]);for(o=0;o<h;++o)(c=e[o])&&l.get(m[o])===c&&(i[o]=c)}function x_e(t){return t.__data__}function b_e(t,e){if(!arguments.length)return Array.from(this,x_e);var n=e?y_e:v_e,r=this._parents,i=this._groups;typeof t!="function"&&(t=g_e(t));for(var a=i.length,s=new Array(a),o=new Array(a),c=new Array(a),l=0;l<a;++l){var h=r[l],f=i[l],m=f.length,g=w_e(t.call(h,h&&h.__data__,l,r)),b=g.length,y=o[l]=new Array(b),v=s[l]=new Array(b),w=c[l]=new Array(m);n(h,f,y,v,w,g,e);for(var _=0,E=0,M,T;_<b;++_)if(M=y[_]){for(_>=E&&(E=_+1);!(T=v[E])&&++E<b;);M._next=T||null}}return s=new Qi(s,r),s._enter=o,s._exit=c,s}function w_e(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function __e(){return new Qi(this._exit||this._groups.map(YH),this._parents)}function S_e(t,e,n){var r=this.enter(),i=this,a=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function M_e(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,s=Math.min(i,a),o=new Array(i),c=0;c<s;++c)for(var l=n[c],h=r[c],f=l.length,m=o[c]=new Array(f),g,b=0;b<f;++b)(g=l[b]||h[b])&&(m[b]=g);for(;c<i;++c)o[c]=n[c];return new Qi(o,this._parents)}function E_e(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,a=r[i],s;--i>=0;)(s=r[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function T_e(t){t||(t=A_e);function e(f,m){return f&&m?t(f.__data__,m.__data__):!f-!m}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var s=n[a],o=s.length,c=i[a]=new Array(o),l,h=0;h<o;++h)(l=s[h])&&(c[h]=l);c.sort(e)}return new Qi(i,this._parents).order()}function A_e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function N_e(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function P_e(){return Array.from(this)}function C_e(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var s=r[i];if(s)return s}return null}function R_e(){let t=0;for(const e of this)++t;return t}function j_e(){return!this.node()}function O_e(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,s=i.length,o;a<s;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this}function I_e(t){return function(){this.removeAttribute(t)}}function D_e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function k_e(t,e){return function(){this.setAttribute(t,e)}}function L_e(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function F_e(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function U_e(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function B_e(t,e){var n=wx(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?D_e:I_e:typeof e=="function"?n.local?U_e:F_e:n.local?L_e:k_e)(n,e))}function ZH(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function z_e(t){return function(){this.style.removeProperty(t)}}function $_e(t,e,n){return function(){this.style.setProperty(t,e,n)}}function V_e(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function H_e(t,e,n){return arguments.length>1?this.each((e==null?z_e:typeof e=="function"?V_e:$_e)(t,e,n??"")):Fd(this.node(),t)}function Fd(t,e){return t.style.getPropertyValue(e)||ZH(t).getComputedStyle(t,null).getPropertyValue(e)}function G_e(t){return function(){delete this[t]}}function W_e(t,e){return function(){this[t]=e}}function q_e(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function X_e(t,e){return arguments.length>1?this.each((e==null?G_e:typeof e=="function"?q_e:W_e)(t,e)):this.node()[t]}function JH(t){return t.trim().split(/^|\s+/)}function YP(t){return t.classList||new QH(t)}function QH(t){this._node=t,this._names=JH(t.getAttribute("class")||"")}QH.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function eG(t,e){for(var n=YP(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function tG(t,e){for(var n=YP(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function K_e(t){return function(){eG(this,t)}}function Y_e(t){return function(){tG(this,t)}}function Z_e(t,e){return function(){(e.apply(this,arguments)?eG:tG)(this,t)}}function J_e(t,e){var n=JH(t+"");if(arguments.length<2){for(var r=YP(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Z_e:e?K_e:Y_e)(n,e))}function Q_e(){this.textContent=""}function eSe(t){return function(){this.textContent=t}}function tSe(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function nSe(t){return arguments.length?this.each(t==null?Q_e:(typeof t=="function"?tSe:eSe)(t)):this.node().textContent}function rSe(){this.innerHTML=""}function iSe(t){return function(){this.innerHTML=t}}function aSe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function sSe(t){return arguments.length?this.each(t==null?rSe:(typeof t=="function"?aSe:iSe)(t)):this.node().innerHTML}function oSe(){this.nextSibling&&this.parentNode.appendChild(this)}function lSe(){return this.each(oSe)}function cSe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uSe(){return this.each(cSe)}function dSe(t){var e=typeof t=="function"?t:WH(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function fSe(){return null}function hSe(t,e){var n=typeof t=="function"?t:WH(t),r=e==null?fSe:typeof e=="function"?e:KP(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pSe(){var t=this.parentNode;t&&t.removeChild(this)}function mSe(){return this.each(pSe)}function gSe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function vSe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ySe(t){return this.select(t?vSe:gSe)}function xSe(t){return arguments.length?this.property("__data__",t):this.node().__data__}function bSe(t){return function(e){t.call(this,e,this.__data__)}}function wSe(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function _Se(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,a;n<i;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++r]=a;++r?e.length=r:delete this.__on}}}function SSe(t,e,n){return function(){var r=this.__on,i,a=bSe(e);if(r){for(var s=0,o=r.length;s<o;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=e;return}}this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function MSe(t,e,n){var r=wSe(t+""),i,a=r.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,l=o.length,h;c<l;++c)for(i=0,h=o[c];i<a;++i)if((s=r[i]).type===h.type&&s.name===h.name)return h.value}return}for(o=e?SSe:_Se,i=0;i<a;++i)this.each(o(r[i],e,n));return this}function nG(t,e,n){var r=ZH(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ESe(t,e){return function(){return nG(this,t,e)}}function TSe(t,e){return function(){return nG(this,t,e.apply(this,arguments))}}function ASe(t,e){return this.each((typeof e=="function"?TSe:ESe)(t,e))}function*NSe(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length,s;i<a;++i)(s=r[i])&&(yield s)}var rG=[null];function Qi(t,e){this._groups=t,this._parents=e}function mm(){return new Qi([[document.documentElement]],rG)}function PSe(){return this}Qi.prototype=mm.prototype={constructor:Qi,select:t_e,selectAll:a_e,selectChild:c_e,selectChildren:h_e,filter:p_e,data:b_e,enter:m_e,exit:__e,join:S_e,merge:M_e,selection:PSe,order:E_e,sort:T_e,call:N_e,nodes:P_e,node:C_e,size:R_e,empty:j_e,each:O_e,attr:B_e,style:H_e,property:X_e,classed:J_e,text:nSe,html:sSe,raise:lSe,lower:uSe,append:dSe,insert:hSe,remove:mSe,clone:ySe,datum:xSe,on:MSe,dispatch:ASe,[Symbol.iterator]:NSe};function oi(t){return typeof t=="string"?new Qi([[document.querySelector(t)]],[document.documentElement]):new Qi([[t]],rG)}function CSe(t){let e;for(;e=t.sourceEvent;)t=e;return t}function eo(t,e){if(t=CSe(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const RSe={passive:!1},zp={capture:!0,passive:!1};function X2(t){t.stopImmediatePropagation()}function rd(t){t.preventDefault(),t.stopImmediatePropagation()}function iG(t){var e=t.document.documentElement,n=oi(t).on("dragstart.drag",rd,zp);"onselectstart"in e?n.on("selectstart.drag",rd,zp):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function aG(t,e){var n=t.document.documentElement,r=oi(t).on("dragstart.drag",null);e&&(r.on("click.drag",rd,zp),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Z0=t=>()=>t;function KT(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:a,x:s,y:o,dx:c,dy:l,dispatch:h}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:h}})}KT.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function jSe(t){return!t.ctrlKey&&!t.button}function OSe(){return this.parentNode}function ISe(t,e){return e??{x:t.x,y:t.y}}function DSe(){return navigator.maxTouchPoints||"ontouchstart"in this}function kSe(){var t=jSe,e=OSe,n=ISe,r=DSe,i={},a=pm("start","drag","end"),s=0,o,c,l,h,f=0;function m(M){M.on("mousedown.drag",g).filter(r).on("touchstart.drag",v).on("touchmove.drag",w,RSe).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(M,T){if(!(h||!t.call(this,M,T))){var A=E(this,e.call(this,M,T),M,T,"mouse");A&&(oi(M.view).on("mousemove.drag",b,zp).on("mouseup.drag",y,zp),iG(M.view),X2(M),l=!1,o=M.clientX,c=M.clientY,A("start",M))}}function b(M){if(rd(M),!l){var T=M.clientX-o,A=M.clientY-c;l=T*T+A*A>f}i.mouse("drag",M)}function y(M){oi(M.view).on("mousemove.drag mouseup.drag",null),aG(M.view,l),rd(M),i.mouse("end",M)}function v(M,T){if(t.call(this,M,T)){var A=M.changedTouches,N=e.call(this,M,T),P=A.length,R,F;for(R=0;R<P;++R)(F=E(this,N,M,T,A[R].identifier,A[R]))&&(X2(M),F("start",M,A[R]))}}function w(M){var T=M.changedTouches,A=T.length,N,P;for(N=0;N<A;++N)(P=i[T[N].identifier])&&(rd(M),P("drag",M,T[N]))}function _(M){var T=M.changedTouches,A=T.length,N,P;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),N=0;N<A;++N)(P=i[T[N].identifier])&&(X2(M),P("end",M,T[N]))}function E(M,T,A,N,P,R){var F=a.copy(),D=eo(R||A,T),L,q,I;if((I=n.call(M,new KT("beforestart",{sourceEvent:A,target:m,identifier:P,active:s,x:D[0],y:D[1],dx:0,dy:0,dispatch:F}),N))!=null)return L=I.x-D[0]||0,q=I.y-D[1]||0,function U(k,V,$){var Y=D,J;switch(k){case"start":i[P]=U,J=s++;break;case"end":delete i[P],--s;case"drag":D=eo($||V,T),J=s;break}F.call(k,M,new KT(k,{sourceEvent:V,subject:I,target:m,identifier:P,active:J,x:D[0]+L,y:D[1]+q,dx:D[0]-Y[0],dy:D[1]-Y[1],dispatch:F}),N)}}return m.filter=function(M){return arguments.length?(t=typeof M=="function"?M:Z0(!!M),m):t},m.container=function(M){return arguments.length?(e=typeof M=="function"?M:Z0(M),m):e},m.subject=function(M){return arguments.length?(n=typeof M=="function"?M:Z0(M),m):n},m.touchable=function(M){return arguments.length?(r=typeof M=="function"?M:Z0(!!M),m):r},m.on=function(){var M=a.on.apply(a,arguments);return M===a?m:M},m.clickDistance=function(M){return arguments.length?(f=(M=+M)*M,m):Math.sqrt(f)},m}var Ud=0,Ah=0,oh=0,sG=1e3,by,Nh,wy=0,Ic=0,_x=0,$p=typeof performance=="object"&&performance.now?performance:Date,oG=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ZP(){return Ic||(oG(LSe),Ic=$p.now()+_x)}function LSe(){Ic=0}function _y(){this._call=this._time=this._next=null}_y.prototype=JP.prototype={constructor:_y,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ZP():+n)+(e==null?0:+e),!this._next&&Nh!==this&&(Nh?Nh._next=this:by=this,Nh=this),this._call=t,this._time=n,YT()},stop:function(){this._call&&(this._call=null,this._time=1/0,YT())}};function JP(t,e,n){var r=new _y;return r.restart(t,e,n),r}function FSe(){ZP(),++Ud;for(var t=by,e;t;)(e=Ic-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ud}function wU(){Ic=(wy=$p.now())+_x,Ud=Ah=0;try{FSe()}finally{Ud=0,BSe(),Ic=0}}function USe(){var t=$p.now(),e=t-wy;e>sG&&(_x-=e,wy=t)}function BSe(){for(var t,e=by,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:by=n);Nh=t,YT(r)}function YT(t){if(!Ud){Ah&&(Ah=clearTimeout(Ah));var e=t-Ic;e>24?(t<1/0&&(Ah=setTimeout(wU,t-$p.now()-_x)),oh&&(oh=clearInterval(oh))):(oh||(wy=$p.now(),oh=setInterval(USe,sG)),Ud=1,oG(wU))}}function _U(t,e,n){var r=new _y;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var zSe=pm("start","end","cancel","interrupt"),$Se=[],lG=0,SU=1,ZT=2,Gg=3,MU=4,JT=5,Wg=6;function Sx(t,e,n,r,i,a){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;VSe(t,n,{name:e,index:r,group:i,on:zSe,tween:$Se,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:lG})}function QP(t,e){var n=Ka(t,e);if(n.state>lG)throw new Error("too late; already scheduled");return n}function Os(t,e){var n=Ka(t,e);if(n.state>Gg)throw new Error("too late; already running");return n}function Ka(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function VSe(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=JP(a,0,n.time);function a(l){n.state=SU,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var h,f,m,g;if(n.state!==SU)return c();for(h in r)if(g=r[h],g.name===n.name){if(g.state===Gg)return _U(s);g.state===MU?(g.state=Wg,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete r[h]):+h<e&&(g.state=Wg,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete r[h])}if(_U(function(){n.state===Gg&&(n.state=MU,n.timer.restart(o,n.delay,n.time),o(l))}),n.state=ZT,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ZT){for(n.state=Gg,i=new Array(m=n.tween.length),h=0,f=-1;h<m;++h)(g=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}function o(l){for(var h=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=JT,1),f=-1,m=i.length;++f<m;)i[f].call(t,h);n.state===JT&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Wg,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function qg(t,e){var n=t.__transition,r,i,a=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){a=!1;continue}i=r.state>ZT&&r.state<JT,r.state=Wg,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}a&&delete t.__transition}}function HSe(t){return this.each(function(){qg(this,t)})}function GSe(t,e){var n,r;return function(){var i=Os(this,t),a=i.tween;if(a!==n){r=n=a;for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function WSe(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=Os(this,t),s=a.tween;if(s!==r){i=(r=s).slice();for(var o={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=o;break}c===l&&i.push(o)}a.tween=i}}function qSe(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ka(this.node(),n).tween,i=0,a=r.length,s;i<a;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?GSe:WSe)(n,t,e))}function eC(t,e,n){var r=t._id;return t.each(function(){var i=Os(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Ka(i,r).value[e]}}function cG(t,e){var n;return(typeof e=="number"?Ua:e instanceof Nc?bv:(n=Nc(e))?(e=n,bv):Z6)(t,e)}function XSe(t){return function(){this.removeAttribute(t)}}function KSe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function YSe(t,e,n){var r,i=n+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===r?a:a=e(r=s,n)}}function ZSe(t,e,n){var r,i=n+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?a:a=e(r=s,n)}}function JSe(t,e,n){var r,i,a;return function(){var s,o=n(this),c;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=o+"",s===c?null:s===r&&c===i?a:(i=c,a=e(r=s,o)))}}function QSe(t,e,n){var r,i,a;return function(){var s,o=n(this),c;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=o+"",s===c?null:s===r&&c===i?a:(i=c,a=e(r=s,o)))}}function e2e(t,e){var n=wx(t),r=n==="transform"?qre:cG;return this.attrTween(t,typeof e=="function"?(n.local?QSe:JSe)(n,r,eC(this,"attr."+t,e)):e==null?(n.local?KSe:XSe)(n):(n.local?ZSe:YSe)(n,r,e))}function t2e(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function n2e(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function r2e(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&n2e(t,a)),n}return i._value=e,i}function i2e(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&t2e(t,a)),n}return i._value=e,i}function a2e(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=wx(t);return this.tween(n,(r.local?r2e:i2e)(r,e))}function s2e(t,e){return function(){QP(this,t).delay=+e.apply(this,arguments)}}function o2e(t,e){return e=+e,function(){QP(this,t).delay=e}}function l2e(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?s2e:o2e)(e,t)):Ka(this.node(),e).delay}function c2e(t,e){return function(){Os(this,t).duration=+e.apply(this,arguments)}}function u2e(t,e){return e=+e,function(){Os(this,t).duration=e}}function d2e(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?c2e:u2e)(e,t)):Ka(this.node(),e).duration}function f2e(t,e){if(typeof e!="function")throw new Error;return function(){Os(this,t).ease=e}}function h2e(t){var e=this._id;return arguments.length?this.each(f2e(e,t)):Ka(this.node(),e).ease}function p2e(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Os(this,t).ease=n}}function m2e(t){if(typeof t!="function")throw new Error;return this.each(p2e(this._id,t))}function g2e(t){typeof t!="function"&&(t=XH(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],s=a.length,o=r[i]=[],c,l=0;l<s;++l)(c=a[l])&&t.call(c,c.__data__,l,a)&&o.push(c);return new go(r,this._parents,this._name,this._id)}function v2e(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),s=new Array(r),o=0;o<a;++o)for(var c=e[o],l=n[o],h=c.length,f=s[o]=new Array(h),m,g=0;g<h;++g)(m=c[g]||l[g])&&(f[g]=m);for(;o<r;++o)s[o]=e[o];return new go(s,this._parents,this._name,this._id)}function y2e(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function x2e(t,e,n){var r,i,a=y2e(e)?QP:Os;return function(){var s=a(this,t),o=s.on;o!==r&&(i=(r=o).copy()).on(e,n),s.on=i}}function b2e(t,e){var n=this._id;return arguments.length<2?Ka(this.node(),n).on.on(t):this.each(x2e(n,t,e))}function w2e(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function _2e(){return this.on("end.remove",w2e(this._id))}function S2e(t){var e=this._name,n=this._id;typeof t!="function"&&(t=KP(t));for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s)for(var o=r[s],c=o.length,l=a[s]=new Array(c),h,f,m=0;m<c;++m)(h=o[m])&&(f=t.call(h,h.__data__,m,o))&&("__data__"in h&&(f.__data__=h.__data__),l[m]=f,Sx(l[m],e,n,m,l,Ka(h,n)));return new go(a,this._parents,e,n)}function M2e(t){var e=this._name,n=this._id;typeof t!="function"&&(t=qH(t));for(var r=this._groups,i=r.length,a=[],s=[],o=0;o<i;++o)for(var c=r[o],l=c.length,h,f=0;f<l;++f)if(h=c[f]){for(var m=t.call(h,h.__data__,f,c),g,b=Ka(h,n),y=0,v=m.length;y<v;++y)(g=m[y])&&Sx(g,e,n,y,m,b);a.push(m),s.push(h)}return new go(a,s,e,n)}var E2e=mm.prototype.constructor;function T2e(){return new E2e(this._groups,this._parents)}function A2e(t,e){var n,r,i;return function(){var a=Fd(this,t),s=(this.style.removeProperty(t),Fd(this,t));return a===s?null:a===n&&s===r?i:i=e(n=a,r=s)}}function uG(t){return function(){this.style.removeProperty(t)}}function N2e(t,e,n){var r,i=n+"",a;return function(){var s=Fd(this,t);return s===i?null:s===r?a:a=e(r=s,n)}}function P2e(t,e,n){var r,i,a;return function(){var s=Fd(this,t),o=n(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(t),Fd(this,t))),s===c?null:s===r&&c===i?a:(i=c,a=e(r=s,o))}}function C2e(t,e){var n,r,i,a="style."+e,s="end."+a,o;return function(){var c=Os(this,t),l=c.on,h=c.value[a]==null?o||(o=uG(e)):void 0;(l!==n||i!==h)&&(r=(n=l).copy()).on(s,i=h),c.on=r}}function R2e(t,e,n){var r=(t+="")=="transform"?Wre:cG;return e==null?this.styleTween(t,A2e(t,r)).on("end.style."+t,uG(t)):typeof e=="function"?this.styleTween(t,P2e(t,r,eC(this,"style."+t,e))).each(C2e(this._id,t)):this.styleTween(t,N2e(t,r,e),n).on("end.style."+t,null)}function j2e(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function O2e(t,e,n){var r,i;function a(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&j2e(t,s,n)),r}return a._value=e,a}function I2e(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,O2e(t,e,n??""))}function D2e(t){return function(){this.textContent=t}}function k2e(t){return function(){var e=t(this);this.textContent=e??""}}function L2e(t){return this.tween("text",typeof t=="function"?k2e(eC(this,"text",t)):D2e(t==null?"":t+""))}function F2e(t){return function(e){this.textContent=t.call(this,e)}}function U2e(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&F2e(i)),e}return r._value=t,r}function B2e(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,U2e(t))}function z2e(){for(var t=this._name,e=this._id,n=dG(),r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,c,l=0;l<o;++l)if(c=s[l]){var h=Ka(c,e);Sx(c,t,n,l,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new go(r,this._parents,t,n)}function $2e(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,s){var o={value:s},c={value:function(){--i===0&&a()}};n.each(function(){var l=Os(this,r),h=l.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(c)),l.on=e}),i===0&&a()})}var V2e=0;function go(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function dG(){return++V2e}var Gs=mm.prototype;go.prototype={constructor:go,select:S2e,selectAll:M2e,selectChild:Gs.selectChild,selectChildren:Gs.selectChildren,filter:g2e,merge:v2e,selection:T2e,transition:z2e,call:Gs.call,nodes:Gs.nodes,node:Gs.node,size:Gs.size,empty:Gs.empty,each:Gs.each,on:b2e,attr:e2e,attrTween:a2e,style:R2e,styleTween:I2e,text:L2e,textTween:B2e,remove:_2e,tween:qSe,delay:l2e,duration:d2e,ease:h2e,easeVarying:m2e,end:$2e,[Symbol.iterator]:Gs[Symbol.iterator]};function H2e(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var G2e={time:null,delay:0,duration:250,ease:H2e};function W2e(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function q2e(t){var e,n;t instanceof go?(e=t._id,t=t._name):(e=dG(),(n=G2e).time=ZP(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,c,l=0;l<o;++l)(c=s[l])&&Sx(c,t,e,l,s,n||W2e(c,e));return new go(r,this._parents,t,e)}mm.prototype.interrupt=HSe;mm.prototype.transition=q2e;function X2e(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var a,s=n.length,o,c=0,l=0;for(a=0;a<s;++a)o=n[a],c+=o.x,l+=o.y;for(c=(c/s-t)*r,l=(l/s-e)*r,a=0;a<s;++a)o=n[a],o.x-=c,o.y-=l}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(t=+a,i):t},i.y=function(a){return arguments.length?(e=+a,i):e},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function K2e(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return fG(this.cover(e,n),e,n,t)}function fG(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a=t._root,s={data:r},o=t._x0,c=t._y0,l=t._x1,h=t._y1,f,m,g,b,y,v,w,_;if(!a)return t._root=s,t;for(;a.length;)if((y=e>=(f=(o+l)/2))?o=f:l=f,(v=n>=(m=(c+h)/2))?c=m:h=m,i=a,!(a=a[w=v<<1|y]))return i[w]=s,t;if(g=+t._x.call(null,a.data),b=+t._y.call(null,a.data),e===g&&n===b)return s.next=a,i?i[w]=s:t._root=s,t;do i=i?i[w]=new Array(4):t._root=new Array(4),(y=e>=(f=(o+l)/2))?o=f:l=f,(v=n>=(m=(c+h)/2))?c=m:h=m;while((w=v<<1|y)===(_=(b>=m)<<1|g>=f));return i[_]=a,i[w]=s,t}function Y2e(t){var e,n,r=t.length,i,a,s=new Array(r),o=new Array(r),c=1/0,l=1/0,h=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(a=+this._y.call(null,e))||(s[n]=i,o[n]=a,i<c&&(c=i),i>h&&(h=i),a<l&&(l=a),a>f&&(f=a));if(c>h||l>f)return this;for(this.cover(c,l).cover(h,f),n=0;n<r;++n)fG(this,s[n],o[n],t[n]);return this}function Z2e(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var s=i-n||1,o=this._root,c,l;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,c=new Array(4),c[l]=o,o=c,s*=2,l){case 0:i=n+s,a=r+s;break;case 1:n=i-s,a=r+s;break;case 2:i=n+s,r=a-s;break;case 3:n=i-s,r=a-s;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function J2e(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function Q2e(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ci(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function eMe(t,e,n){var r,i=this._x0,a=this._y0,s,o,c,l,h=this._x1,f=this._y1,m=[],g=this._root,b,y;for(g&&m.push(new ci(g,i,a,h,f)),n==null?n=1/0:(i=t-n,a=e-n,h=t+n,f=e+n,n*=n);b=m.pop();)if(!(!(g=b.node)||(s=b.x0)>h||(o=b.y0)>f||(c=b.x1)<i||(l=b.y1)<a))if(g.length){var v=(s+c)/2,w=(o+l)/2;m.push(new ci(g[3],v,w,c,l),new ci(g[2],s,w,v,l),new ci(g[1],v,o,c,w),new ci(g[0],s,o,v,w)),(y=(e>=w)<<1|t>=v)&&(b=m[m.length-1],m[m.length-1]=m[m.length-1-y],m[m.length-1-y]=b)}else{var _=t-+this._x.call(null,g.data),E=e-+this._y.call(null,g.data),M=_*_+E*E;if(M<n){var T=Math.sqrt(n=M);i=t-T,a=e-T,h=t+T,f=e+T,r=g.data}}return r}function tMe(t){if(isNaN(h=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,a,s=this._x0,o=this._y0,c=this._x1,l=this._y1,h,f,m,g,b,y,v,w;if(!n)return this;if(n.length)for(;;){if((b=h>=(m=(s+c)/2))?s=m:c=m,(y=f>=(g=(o+l)/2))?o=g:l=g,e=n,!(n=n[v=y<<1|b]))return this;if(!n.length)break;(e[v+1&3]||e[v+2&3]||e[v+3&3])&&(r=e,w=v)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):e?(a?e[v]=a:delete e[v],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[w]=n:this._root=n),this):(this._root=a,this)}function nMe(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function rMe(){return this._root}function iMe(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function aMe(t){var e=[],n,r=this._root,i,a,s,o,c;for(r&&e.push(new ci(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,a=n.x0,s=n.y0,o=n.x1,c=n.y1)&&r.length){var l=(a+o)/2,h=(s+c)/2;(i=r[3])&&e.push(new ci(i,l,h,o,c)),(i=r[2])&&e.push(new ci(i,a,h,l,c)),(i=r[1])&&e.push(new ci(i,l,s,o,h)),(i=r[0])&&e.push(new ci(i,a,s,l,h))}return this}function sMe(t){var e=[],n=[],r;for(this._root&&e.push(new ci(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var a,s=r.x0,o=r.y0,c=r.x1,l=r.y1,h=(s+c)/2,f=(o+l)/2;(a=i[0])&&e.push(new ci(a,s,o,h,f)),(a=i[1])&&e.push(new ci(a,h,o,c,f)),(a=i[2])&&e.push(new ci(a,s,f,h,l)),(a=i[3])&&e.push(new ci(a,h,f,c,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function oMe(t){return t[0]}function lMe(t){return arguments.length?(this._x=t,this):this._x}function cMe(t){return t[1]}function uMe(t){return arguments.length?(this._y=t,this):this._y}function tC(t,e,n){var r=new nC(e??oMe,n??cMe,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function nC(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function EU(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var yi=tC.prototype=nC.prototype;yi.copy=function(){var t=new nC(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=EU(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=EU(r));return t};yi.add=K2e;yi.addAll=Y2e;yi.cover=Z2e;yi.data=J2e;yi.extent=Q2e;yi.find=eMe;yi.remove=tMe;yi.removeAll=nMe;yi.root=rMe;yi.size=iMe;yi.visit=aMe;yi.visitAfter=sMe;yi.x=lMe;yi.y=uMe;function _c(t){return function(){return t}}function ul(t){return(t()-.5)*1e-6}function dMe(t){return t.x+t.vx}function fMe(t){return t.y+t.vy}function hMe(t){var e,n,r,i=1,a=1;typeof t!="function"&&(t=_c(t==null?1:+t));function s(){for(var l,h=e.length,f,m,g,b,y,v,w=0;w<a;++w)for(f=tC(e,dMe,fMe).visitAfter(o),l=0;l<h;++l)m=e[l],y=n[m.index],v=y*y,g=m.x+m.vx,b=m.y+m.vy,f.visit(_);function _(E,M,T,A,N){var P=E.data,R=E.r,F=y+R;if(P){if(P.index>m.index){var D=g-P.x-P.vx,L=b-P.y-P.vy,q=D*D+L*L;q<F*F&&(D===0&&(D=ul(r),q+=D*D),L===0&&(L=ul(r),q+=L*L),q=(F-(q=Math.sqrt(q)))/q*i,m.vx+=(D*=q)*(F=(R*=R)/(v+R)),m.vy+=(L*=q)*F,P.vx-=D*(F=1-F),P.vy-=L*F)}return}return M>g+F||A<g-F||T>b+F||N<b-F}}function o(l){if(l.data)return l.r=n[l.data.index];for(var h=l.r=0;h<4;++h)l[h]&&l[h].r>l.r&&(l.r=l[h].r)}function c(){if(e){var l,h=e.length,f;for(n=new Array(h),l=0;l<h;++l)f=e[l],n[f.index]=+t(f,l,e)}}return s.initialize=function(l,h){e=l,r=h,c()},s.iterations=function(l){return arguments.length?(a=+l,s):a},s.strength=function(l){return arguments.length?(i=+l,s):i},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:_c(+l),c(),s):t},s}function pMe(t){return t.index}function TU(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function mMe(t){var e=pMe,n=f,r,i=_c(30),a,s,o,c,l,h=1;t==null&&(t=[]);function f(v){return 1/Math.min(o[v.source.index],o[v.target.index])}function m(v){for(var w=0,_=t.length;w<h;++w)for(var E=0,M,T,A,N,P,R,F;E<_;++E)M=t[E],T=M.source,A=M.target,N=A.x+A.vx-T.x-T.vx||ul(l),P=A.y+A.vy-T.y-T.vy||ul(l),R=Math.sqrt(N*N+P*P),R=(R-a[E])/R*v*r[E],N*=R,P*=R,A.vx-=N*(F=c[E]),A.vy-=P*F,T.vx+=N*(F=1-F),T.vy+=P*F}function g(){if(s){var v,w=s.length,_=t.length,E=new Map(s.map((T,A)=>[e(T,A,s),T])),M;for(v=0,o=new Array(w);v<_;++v)M=t[v],M.index=v,typeof M.source!="object"&&(M.source=TU(E,M.source)),typeof M.target!="object"&&(M.target=TU(E,M.target)),o[M.source.index]=(o[M.source.index]||0)+1,o[M.target.index]=(o[M.target.index]||0)+1;for(v=0,c=new Array(_);v<_;++v)M=t[v],c[v]=o[M.source.index]/(o[M.source.index]+o[M.target.index]);r=new Array(_),b(),a=new Array(_),y()}}function b(){if(s)for(var v=0,w=t.length;v<w;++v)r[v]=+n(t[v],v,t)}function y(){if(s)for(var v=0,w=t.length;v<w;++v)a[v]=+i(t[v],v,t)}return m.initialize=function(v,w){s=v,l=w,g()},m.links=function(v){return arguments.length?(t=v,g(),m):t},m.id=function(v){return arguments.length?(e=v,m):e},m.iterations=function(v){return arguments.length?(h=+v,m):h},m.strength=function(v){return arguments.length?(n=typeof v=="function"?v:_c(+v),b(),m):n},m.distance=function(v){return arguments.length?(i=typeof v=="function"?v:_c(+v),y(),m):i},m}const gMe=1664525,vMe=1013904223,AU=4294967296;function yMe(){let t=1;return()=>(t=(gMe*t+vMe)%AU)/AU}function xMe(t){return t.x}function bMe(t){return t.y}var wMe=10,_Me=Math.PI*(3-Math.sqrt(5));function SMe(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,s=.6,o=new Map,c=JP(f),l=pm("tick","end"),h=yMe();t==null&&(t=[]);function f(){m(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function m(y){var v,w=t.length,_;y===void 0&&(y=1);for(var E=0;E<y;++E)for(n+=(a-n)*i,o.forEach(function(M){M(n)}),v=0;v<w;++v)_=t[v],_.fx==null?_.x+=_.vx*=s:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=s:(_.y=_.fy,_.vy=0);return e}function g(){for(var y=0,v=t.length,w;y<v;++y){if(w=t[y],w.index=y,w.fx!=null&&(w.x=w.fx),w.fy!=null&&(w.y=w.fy),isNaN(w.x)||isNaN(w.y)){var _=wMe*Math.sqrt(.5+y),E=y*_Me;w.x=_*Math.cos(E),w.y=_*Math.sin(E)}(isNaN(w.vx)||isNaN(w.vy))&&(w.vx=w.vy=0)}}function b(y){return y.initialize&&y.initialize(t,h),y}return g(),e={tick:m,restart:function(){return c.restart(f),e},stop:function(){return c.stop(),e},nodes:function(y){return arguments.length?(t=y,g(),o.forEach(b),e):t},alpha:function(y){return arguments.length?(n=+y,e):n},alphaMin:function(y){return arguments.length?(r=+y,e):r},alphaDecay:function(y){return arguments.length?(i=+y,e):+i},alphaTarget:function(y){return arguments.length?(a=+y,e):a},velocityDecay:function(y){return arguments.length?(s=1-y,e):1-s},randomSource:function(y){return arguments.length?(h=y,o.forEach(b),e):h},force:function(y,v){return arguments.length>1?(v==null?o.delete(y):o.set(y,b(v)),e):o.get(y)},find:function(y,v,w){var _=0,E=t.length,M,T,A,N,P;for(w==null?w=1/0:w*=w,_=0;_<E;++_)N=t[_],M=y-N.x,T=v-N.y,A=M*M+T*T,A<w&&(P=N,w=A);return P},on:function(y,v){return arguments.length>1?(l.on(y,v),e):l.on(y)}}}function MMe(){var t,e,n,r,i=_c(-30),a,s=1,o=1/0,c=.81;function l(g){var b,y=t.length,v=tC(t,xMe,bMe).visitAfter(f);for(r=g,b=0;b<y;++b)e=t[b],v.visit(m)}function h(){if(t){var g,b=t.length,y;for(a=new Array(b),g=0;g<b;++g)y=t[g],a[y.index]=+i(y,g,t)}}function f(g){var b=0,y,v,w=0,_,E,M;if(g.length){for(_=E=M=0;M<4;++M)(y=g[M])&&(v=Math.abs(y.value))&&(b+=y.value,w+=v,_+=v*y.x,E+=v*y.y);g.x=_/w,g.y=E/w}else{y=g,y.x=y.data.x,y.y=y.data.y;do b+=a[y.data.index];while(y=y.next)}g.value=b}function m(g,b,y,v){if(!g.value)return!0;var w=g.x-e.x,_=g.y-e.y,E=v-b,M=w*w+_*_;if(E*E/c<M)return M<o&&(w===0&&(w=ul(n),M+=w*w),_===0&&(_=ul(n),M+=_*_),M<s&&(M=Math.sqrt(s*M)),e.vx+=w*g.value*r/M,e.vy+=_*g.value*r/M),!0;if(g.length||M>=o)return;(g.data!==e||g.next)&&(w===0&&(w=ul(n),M+=w*w),_===0&&(_=ul(n),M+=_*_),M<s&&(M=Math.sqrt(s*M)));do g.data!==e&&(E=a[g.data.index]*r/M,e.vx+=w*E,e.vy+=_*E);while(g=g.next)}return l.initialize=function(g,b){t=g,n=b,h()},l.strength=function(g){return arguments.length?(i=typeof g=="function"?g:_c(+g),h(),l):i},l.distanceMin=function(g){return arguments.length?(s=g*g,l):Math.sqrt(s)},l.distanceMax=function(g){return arguments.length?(o=g*g,l):Math.sqrt(o)},l.theta=function(g){return arguments.length?(c=g*g,l):Math.sqrt(c)},l}const J0=t=>()=>t;function EMe(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ao(t,e,n){this.k=t,this.x=e,this.y=n}ao.prototype={constructor:ao,scale:function(t){return t===1?this:new ao(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ao(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Gh=new ao(1,0,0);ao.prototype;function K2(t){t.stopImmediatePropagation()}function lh(t){t.preventDefault(),t.stopImmediatePropagation()}function TMe(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function AMe(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function NU(){return this.__zoom||Gh}function NMe(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function PMe(){return navigator.maxTouchPoints||"ontouchstart"in this}function CMe(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function Y2(){var t=TMe,e=AMe,n=CMe,r=NMe,i=PMe,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,c=Zre,l=pm("start","zoom","end"),h,f,m,g=500,b=150,y=0,v=10;function w(I){I.property("__zoom",NU).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",F).filter(i).on("touchstart.zoom",D).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(I,U,k,V){var $=I.selection?I.selection():I;$.property("__zoom",NU),I!==$?T(I,U,k,V):$.interrupt().each(function(){A(this,arguments).event(V).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},w.scaleBy=function(I,U,k,V){w.scaleTo(I,function(){var $=this.__zoom.k,Y=typeof U=="function"?U.apply(this,arguments):U;return $*Y},k,V)},w.scaleTo=function(I,U,k,V){w.transform(I,function(){var $=e.apply(this,arguments),Y=this.__zoom,J=k==null?M($):typeof k=="function"?k.apply(this,arguments):k,W=Y.invert(J),H=typeof U=="function"?U.apply(this,arguments):U;return n(E(_(Y,H),J,W),$,s)},k,V)},w.translateBy=function(I,U,k,V){w.transform(I,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof k=="function"?k.apply(this,arguments):k),e.apply(this,arguments),s)},null,V)},w.translateTo=function(I,U,k,V,$){w.transform(I,function(){var Y=e.apply(this,arguments),J=this.__zoom,W=V==null?M(Y):typeof V=="function"?V.apply(this,arguments):V;return n(Gh.translate(W[0],W[1]).scale(J.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof k=="function"?-k.apply(this,arguments):-k),Y,s)},V,$)};function _(I,U){return U=Math.max(a[0],Math.min(a[1],U)),U===I.k?I:new ao(U,I.x,I.y)}function E(I,U,k){var V=U[0]-k[0]*I.k,$=U[1]-k[1]*I.k;return V===I.x&&$===I.y?I:new ao(I.k,V,$)}function M(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function T(I,U,k,V){I.on("start.zoom",function(){A(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(V).end()}).tween("zoom",function(){var $=this,Y=arguments,J=A($,Y).event(V),W=e.apply($,Y),H=k==null?M(W):typeof k=="function"?k.apply($,Y):k,te=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),we=$.__zoom,Ae=typeof U=="function"?U.apply($,Y):U,ne=c(we.invert(H).concat(te/we.k),Ae.invert(H).concat(te/Ae.k));return function(de){if(de===1)de=Ae;else{var pe=ne(de),fe=te/pe[2];de=new ao(fe,H[0]-pe[0]*fe,H[1]-pe[1]*fe)}J.zoom(null,de)}})}function A(I,U,k){return!k&&I.__zooming||new N(I,U)}function N(I,U){this.that=I,this.args=U,this.active=0,this.sourceEvent=null,this.extent=e.apply(I,U),this.taps=0}N.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,U){return this.mouse&&I!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var U=oi(this.that).datum();l.call(I,this.that,new EMe(I,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:l}),U)}};function P(I,...U){if(!t.apply(this,arguments))return;var k=A(this,U).event(I),V=this.__zoom,$=Math.max(a[0],Math.min(a[1],V.k*Math.pow(2,r.apply(this,arguments)))),Y=eo(I);if(k.wheel)(k.mouse[0][0]!==Y[0]||k.mouse[0][1]!==Y[1])&&(k.mouse[1]=V.invert(k.mouse[0]=Y)),clearTimeout(k.wheel);else{if(V.k===$)return;k.mouse=[Y,V.invert(Y)],qg(this),k.start()}lh(I),k.wheel=setTimeout(J,b),k.zoom("mouse",n(E(_(V,$),k.mouse[0],k.mouse[1]),k.extent,s));function J(){k.wheel=null,k.end()}}function R(I,...U){if(m||!t.apply(this,arguments))return;var k=I.currentTarget,V=A(this,U,!0).event(I),$=oi(I.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",te,!0),Y=eo(I,k),J=I.clientX,W=I.clientY;iG(I.view),K2(I),V.mouse=[Y,this.__zoom.invert(Y)],qg(this),V.start();function H(we){if(lh(we),!V.moved){var Ae=we.clientX-J,ne=we.clientY-W;V.moved=Ae*Ae+ne*ne>y}V.event(we).zoom("mouse",n(E(V.that.__zoom,V.mouse[0]=eo(we,k),V.mouse[1]),V.extent,s))}function te(we){$.on("mousemove.zoom mouseup.zoom",null),aG(we.view,V.moved),lh(we),V.event(we).end()}}function F(I,...U){if(t.apply(this,arguments)){var k=this.__zoom,V=eo(I.changedTouches?I.changedTouches[0]:I,this),$=k.invert(V),Y=k.k*(I.shiftKey?.5:2),J=n(E(_(k,Y),V,$),e.apply(this,U),s);lh(I),o>0?oi(this).transition().duration(o).call(T,J,V,I):oi(this).call(w.transform,J,V,I)}}function D(I,...U){if(t.apply(this,arguments)){var k=I.touches,V=k.length,$=A(this,U,I.changedTouches.length===V).event(I),Y,J,W,H;for(K2(I),J=0;J<V;++J)W=k[J],H=eo(W,this),H=[H,this.__zoom.invert(H),W.identifier],$.touch0?!$.touch1&&$.touch0[2]!==H[2]&&($.touch1=H,$.taps=0):($.touch0=H,Y=!0,$.taps=1+!!h);h&&(h=clearTimeout(h)),Y&&($.taps<2&&(f=H[0],h=setTimeout(function(){h=null},g)),qg(this),$.start())}}function L(I,...U){if(this.__zooming){var k=A(this,U).event(I),V=I.changedTouches,$=V.length,Y,J,W,H;for(lh(I),Y=0;Y<$;++Y)J=V[Y],W=eo(J,this),k.touch0&&k.touch0[2]===J.identifier?k.touch0[0]=W:k.touch1&&k.touch1[2]===J.identifier&&(k.touch1[0]=W);if(J=k.that.__zoom,k.touch1){var te=k.touch0[0],we=k.touch0[1],Ae=k.touch1[0],ne=k.touch1[1],de=(de=Ae[0]-te[0])*de+(de=Ae[1]-te[1])*de,pe=(pe=ne[0]-we[0])*pe+(pe=ne[1]-we[1])*pe;J=_(J,Math.sqrt(de/pe)),W=[(te[0]+Ae[0])/2,(te[1]+Ae[1])/2],H=[(we[0]+ne[0])/2,(we[1]+ne[1])/2]}else if(k.touch0)W=k.touch0[0],H=k.touch0[1];else return;k.zoom("touch",n(E(J,W,H),k.extent,s))}}function q(I,...U){if(this.__zooming){var k=A(this,U).event(I),V=I.changedTouches,$=V.length,Y,J;for(K2(I),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),Y=0;Y<$;++Y)J=V[Y],k.touch0&&k.touch0[2]===J.identifier?delete k.touch0:k.touch1&&k.touch1[2]===J.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(J=eo(J,this),Math.hypot(f[0]-J[0],f[1]-J[1])<v)){var W=oi(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return w.wheelDelta=function(I){return arguments.length?(r=typeof I=="function"?I:J0(+I),w):r},w.filter=function(I){return arguments.length?(t=typeof I=="function"?I:J0(!!I),w):t},w.touchable=function(I){return arguments.length?(i=typeof I=="function"?I:J0(!!I),w):i},w.extent=function(I){return arguments.length?(e=typeof I=="function"?I:J0([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),w):e},w.scaleExtent=function(I){return arguments.length?(a[0]=+I[0],a[1]=+I[1],w):[a[0],a[1]]},w.translateExtent=function(I){return arguments.length?(s[0][0]=+I[0][0],s[1][0]=+I[1][0],s[0][1]=+I[0][1],s[1][1]=+I[1][1],w):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},w.constrain=function(I){return arguments.length?(n=I,w):n},w.duration=function(I){return arguments.length?(o=+I,w):o},w.interpolate=function(I){return arguments.length?(c=I,w):c},w.on=function(){var I=l.on.apply(l,arguments);return I===l?w:I},w.clickDistance=function(I){return arguments.length?(y=(I=+I)*I,w):Math.sqrt(y)},w.tapDistance=function(I){return arguments.length?(v=+I,w):v},w}const Ws={fault:{label:"故障",color:"#ef4444",gradient:"from-red-500 to-orange-500"},symptom:{label:"症状",color:"#f59e0b",gradient:"from-yellow-500 to-amber-500"},cause:{label:"原因",color:"#3b82f6",gradient:"from-blue-500 to-cyan-500"},solution:{label:"解决方案",color:"#10b981",gradient:"from-green-500 to-emerald-500"},prevention:{label:"预防措施",color:"#a855f7",gradient:"from-purple-500 to-pink-500"}},Ho=[{id:1,label:"给煤机故障",type:"fault",description:"给煤机无法正常启动或运行中断",connections:4},{id:2,label:"跳闸",type:"symptom",description:"设备意外停机保护动作",connections:3},{id:3,label:"皮带松紧不当",type:"cause",description:"输送带张力异常导致打滑",connections:2},{id:4,label:"检查皮带",type:"solution",description:"调整皮带张紧装置",connections:1},{id:5,label:"定期维护",type:"prevention",description:"建立周期性检修计划",connections:1},{id:6,label:"电机过热",type:"fault",description:"电机温度超过额定值",connections:3},{id:7,label:"停机",type:"symptom",description:"系统停止运行",connections:2},{id:8,label:"散热不良",type:"cause",description:"冷却系统效率下降",connections:2},{id:9,label:"清理风扇",type:"solution",description:"清除散热器灰尘杂物",connections:1},{id:10,label:"冷却水不足",type:"cause",description:"冷却液位过低或循环不畅",connections:2},{id:11,label:"补充冷却液",type:"solution",description:"添加或更换冷却液",connections:1},{id:12,label:"磨损严重",type:"fault",description:"部件磨损导致性能下降",connections:2}],Z2=[{source:1,target:2,label:"表现"},{source:1,target:3,label:"由于"},{source:2,target:4,label:"对策"},{source:3,target:5,label:"预防"},{source:6,target:7,label:"表现"},{source:6,target:8,label:"由于"},{source:8,target:9,label:"对策"},{source:6,target:10,label:"由于"},{source:10,target:11,label:"对策"},{source:12,target:7,label:"导致"}],RMe=[{label:"实体总数",value:"1,067"},{label:"关系总数",value:"1,249"},{label:"故障类型",value:"45种"},{label:"图谱类型",value:"钢铁"}],jMe=[{query:"给煤机皮带跑偏",result:"已找到5个相关节点",timestamp:"10:30"},{query:"过热器故障",result:"已找到3个相关节点",timestamp:"10:25"},{query:"磨煤机跳闸",result:"已找到4个相关节点",timestamp:"10:20"}];function OMe(){var q;const[t,e]=O.useState(""),[n,r]=O.useState(null),[i,a]=O.useState(!1),[s,o]=O.useState(jMe),[c,l]=O.useState(!1),[h,f]=O.useState(null),[m,g]=O.useState(new Set),[b,y]=O.useState(new Set(Object.keys(Ws))),[v,w]=O.useState(null),_=O.useRef(null),E=O.useRef(null),M=O.useCallback(()=>{if(!_.current||!E.current)return;const I=oi(_.current);I.selectAll("*").remove();const U=E.current.clientWidth,k=E.current.clientHeight;I.attr("width",U).attr("height",k);const V=I.append("g"),$=Y2().scaleExtent([.3,3]).on("zoom",ce=>{V.attr("transform",ce.transform)});I.call($);const Y=I.append("defs");Object.entries(Ws).forEach(([ce,Ce])=>{const ye=Y.append("radialGradient").attr("id",`gradient-${ce}`).attr("cx","30%").attr("cy","30%");ye.append("stop").attr("offset","0%").attr("stop-color",Ce.color).attr("stop-opacity",.8),ye.append("stop").attr("offset","100%").attr("stop-color",Ce.color).attr("stop-opacity",.4)});const J=Ho.filter(ce=>b.has(ce.type)),W=new Set(J.map(ce=>ce.id)),H=Z2.filter(ce=>{const Ce=typeof ce.source=="number"?ce.source:ce.source.id,ye=typeof ce.target=="number"?ce.target:ce.target.id;return W.has(Ce)&&W.has(ye)}),te=J.map(ce=>({...ce})),we=H.map(ce=>({...ce})),Ae=SMe(te).force("link",mMe(we).id(ce=>ce.id).distance(150)).force("charge",MMe().strength(-400)).force("center",X2e(U/2,k/2)).force("collision",hMe().radius(60));w(Ae);const ne=V.append("g").attr("class","links").selectAll("line").data(we).enter().append("g").attr("class","link-group"),de=ne.append("line").attr("stroke","#475569").attr("stroke-width",2).attr("stroke-opacity",.6),pe=ne.append("text").attr("fill","#94a3b8").attr("font-size",10).attr("text-anchor","middle").attr("dy",-5).text(ce=>ce.label),fe=V.append("g").attr("class","nodes").selectAll("g").data(te).enter().append("g").attr("class","node-group").style("cursor","pointer").call(kSe().on("start",(ce,Ce)=>{ce.active||Ae.alphaTarget(.3).restart(),Ce.fx=Ce.x,Ce.fy=Ce.y}).on("drag",(ce,Ce)=>{Ce.fx=ce.x,Ce.fy=ce.y}).on("end",(ce,Ce)=>{ce.active||Ae.alphaTarget(0),Ce.fx=null,Ce.fy=null}));fe.append("circle").attr("r",40).attr("fill",ce=>`url(#gradient-${ce.type})`).attr("stroke",ce=>Ws[ce.type].color).attr("stroke-width",3).attr("stroke-opacity",.8),fe.append("text").attr("text-anchor","middle").attr("dy","0.35em").attr("fill","#fff").attr("font-size",11).attr("font-weight","bold").text(ce=>ce.label.length>8?ce.label.slice(0,8)+"...":ce.label),fe.on("mouseover",function(ce,Ce){oi(this).select("circle").transition().duration(200).attr("r",50).attr("stroke-width",4),f(Ce.id);const ye=new Set;ye.add(Ce.id),we.forEach(Ze=>{Ze.source.id===Ce.id&&ye.add(Ze.target.id),Ze.target.id===Ce.id&&ye.add(Ze.source.id)}),g(ye)}),fe.on("mouseout",function(){oi(this).select("circle").transition().duration(200).attr("r",40).attr("stroke-width",3),f(null),g(new Set)}),fe.on("click",function(ce,Ce){ce.stopPropagation(),r(Ce),a(!0),Ye.success(`已选择节点: ${Ce.label}`,{duration:2e3})}),fe.on("dblclick",function(ce,Ce){ce.stopPropagation();const ye=new Set;ye.add(Ce.id),we.forEach(Ze=>{Ze.source.id===Ce.id&&ye.add(Ze.target.id),Ze.target.id===Ce.id&&ye.add(Ze.source.id)}),te.forEach(Ze=>{const tt=V.selectAll(".node-group").filter(St=>St.id===Ze.id);ye.has(Ze.id)?tt.select("circle").transition().duration(300).attr("stroke-width",4).attr("stroke",Ws[Ze.type].color):tt.select("circle").transition().duration(300).attr("stroke-width",1).attr("stroke","#475569").attr("opacity",.3)}),Ye.info(`已展开 ${Ce.label} 的关联节点`,{duration:1500})}),I.on("click",()=>{r(null),a(!1),fe.select("circle").transition().duration(300).attr("stroke-width",3).attr("stroke",ce=>Ws[ce.type].color).attr("opacity",1)}),Ae.on("tick",()=>{de.attr("x1",ce=>ce.source.x).attr("y1",ce=>ce.source.y).attr("x2",ce=>ce.target.x).attr("y2",ce=>ce.target.y),pe.attr("x",ce=>(ce.source.x+ce.target.x)/2).attr("y",ce=>(ce.source.y+ce.target.y)/2),fe.attr("transform",ce=>`translate(${ce.x},${ce.y})`)}),I.call($.transform,Gh.translate(0,0).scale(1))},[b]);O.useEffect(()=>{M()},[]),O.useEffect(()=>{if(v)return()=>{v.stop()}},[v]),O.useEffect(()=>{const I=()=>{E.current&&_.current&&oi(_.current).attr("width",E.current.clientWidth).attr("height",E.current.clientHeight)};return window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[]);const T=()=>{t.trim()&&(l(!0),Ye.promise(new Promise(I=>setTimeout(I,1200)),{loading:"正在搜索知识图谱...",success:()=>{const I={query:t,result:`已找到 ${Math.floor(Math.random()*5)+3} 个相关节点`,timestamp:new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})};o(k=>[I,...k.slice(0,4)]);const U=Ho.find(k=>k.label.includes(t)||k.description.includes(t));return U&&(r(U),a(!0)),e(""),l(!1),"找到相关节点"},error:"搜索失败"}))},A=()=>{Ye.promise(new Promise(I=>setTimeout(I,1500)),{loading:"正在导出图谱数据...",success:"导出成功!文件已保存",error:"导出失败"})},N=()=>{Ye.info("新建抽取任务窗口即将打开",{duration:2e3})},P=()=>{Ye.info("查看抽取结果",{duration:2e3})},R=()=>{Ye.promise(new Promise(I=>setTimeout(I,2e3)),{loading:"正在执行知识融合...",success:"知识融合完成!新增实体 12 个",error:"融合失败"})},F=()=>{Ye.promise(new Promise(I=>setTimeout(I,1800)),{loading:"正在正在进行质量评估...",success:"评估完成!质量得分: 92/100",error:"评估失败"})},D=I=>{y(U=>{const k=new Set(U);return k.has(I)?k.size>1&&k.delete(I):k.add(I),k}),Ye.info("图谱筛选已更新",{duration:1e3})},L=I=>{const U=[];return Z2.forEach(k=>{const V=typeof k.source=="number"?k.source:k.source.id,$=typeof k.target=="number"?k.target:k.target.id;V===I&&U.push($),$===I&&U.push(V)}),U};return d.jsxs("div",{className:"h-full p-6 space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"工业知识图谱"}),d.jsx("p",{className:"text-sm text-slate-400",children:"高炉系统故障知识可视化"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:A,className:"px-3 py-1.5 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 flex items-center gap-2 transition-colors",children:[d.jsx(Fc,{className:"w-4 h-4"}),"导出"]}),d.jsx("span",{className:"text-sm text-slate-400",children:"D3.js 力导向图引擎"})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-[calc(100%-6rem)]",children:[d.jsxs("div",{className:"space-y-6 overflow-y-auto",children:[d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"图谱统计概览"}),d.jsx("div",{className:"space-y-3",children:RMe.map(I=>d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:I.label}),d.jsx("span",{className:"text-lg font-bold text-white",children:I.value})]},I.label))})]}),d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"图谱搜索"}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:"text",value:t,onChange:I=>e(I.target.value),onKeyPress:I=>I.key==="Enter"&&T(),placeholder:"输入故障现象...",disabled:c,className:"w-full px-4 py-2 pl-10 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-blue-500/50 disabled:opacity-50"}),d.jsx(Ju,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"})]}),d.jsx(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:T,disabled:!t.trim()||c,className:"w-full mt-3 px-4 py-2 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white text-sm font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:c?"搜索中...":"🔍 搜索"})]}),d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.15},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"节点类型筛选"}),d.jsx("div",{className:"space-y-2",children:Object.entries(Ws).map(([I,U])=>d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>D(I),className:`w-full px-3 py-2 rounded-lg transition-all flex items-center gap-2 ${b.has(I)?"bg-slate-800/80 border border-slate-600":"bg-slate-800/30 border border-transparent opacity-50"}`,children:[d.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:U.color}}),d.jsx("span",{className:"text-sm text-slate-300 flex-1 text-left",children:U.label}),b.has(I)&&d.jsx("span",{className:"text-xs text-green-400",children:"✓"})]},I))})]}),d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"搜索历史"}),d.jsx("div",{className:"space-y-2",children:s.map((I,U)=>d.jsxs(B.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:U*.05},className:"p-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 transition-colors cursor-pointer",whileHover:{x:5},onClick:()=>e(I.query),children:[d.jsx("div",{className:"text-sm text-white mb-1",children:I.query}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{className:"text-xs text-slate-400",children:I.result}),d.jsx("div",{className:"text-xs text-slate-500",children:I.timestamp})]})]},U))})]}),d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"知识抽取任务"}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(B.button,{whileHover:{scale:1.02,x:5},whileTap:{scale:.98},onClick:N,className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors flex items-center gap-2",children:[d.jsx(RB,{className:"w-4 h-4"}),"新建抽取任务"]}),d.jsx(B.button,{whileHover:{scale:1.02,x:5},whileTap:{scale:.98},onClick:P,className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors",children:"📊 查看抽取结果"}),d.jsx(B.button,{whileHover:{scale:1.02,x:5},whileTap:{scale:.98},onClick:R,className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors",children:"🔀 知识融合"}),d.jsx(B.button,{whileHover:{scale:1.02,x:5},whileTap:{scale:.98},onClick:F,className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 text-left transition-colors",children:"✓ 质量评估"})]})]})]}),d.jsxs("div",{className:"lg:col-span-3 rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm overflow-hidden flex flex-col",children:[d.jsxs("div",{className:"px-6 py-4 border-b border-slate-800/50 bg-slate-900/30 flex items-center justify-between",children:[d.jsxs("h2",{className:"font-semibold text-white flex items-center gap-2",children:[d.jsx(Qh,{className:"w-5 h-5 text-blue-400"}),"知识图谱可视化区域",h&&d.jsxs(B.span,{initial:{opacity:0},animate:{opacity:1},className:"ml-2 px-2 py-1 rounded bg-blue-500/20 text-blue-400 text-xs",children:["悬停: ",(q=Ho.find(I=>I.id===h))==null?void 0:q.label]})]}),d.jsx("div",{className:"flex items-center gap-2 text-xs text-slate-400",children:d.jsx("span",{children:"拖拽节点移动 | 双击展开关联"})})]}),d.jsxs("div",{ref:E,className:"flex-1 relative bg-slate-950/50 overflow-hidden",children:[d.jsx("svg",{ref:_,className:"w-full h-full"}),d.jsxs("div",{className:"absolute bottom-4 right-4 flex flex-col gap-2",children:[d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>{_.current&&oi(_.current).transition().call(Y2().transform,Gh.scale(1.2))},className:"p-2 rounded-lg bg-slate-800/80 hover:bg-slate-700 transition-colors",children:d.jsx(DB,{className:"w-4 h-4 text-slate-300"})}),d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>{_.current&&oi(_.current).transition().call(Y2().transform,Gh.scale(.8))},className:"p-2 rounded-lg bg-slate-800/80 hover:bg-slate-700 transition-colors",children:d.jsx(yZ,{className:"w-4 h-4 text-slate-300"})}),d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>M(),className:"p-2 rounded-lg bg-slate-800/80 hover:bg-slate-700 transition-colors",children:d.jsx(Jh,{className:"w-4 h-4 text-slate-300"})})]})]}),d.jsxs("div",{className:"px-6 py-4 border-t border-slate-800/50 bg-slate-900/30 flex items-center gap-6 flex-wrap",children:[Object.entries(Ws).map(([I,U])=>d.jsxs("div",{className:`flex items-center gap-2 transition-opacity ${b.has(I)?"opacity-100":"opacity-40"}`,children:[d.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:U.color}}),d.jsx("span",{className:"text-xs text-slate-400",children:U.label})]},I)),d.jsxs("div",{className:"ml-auto text-xs text-slate-500",children:["当前显示 ",Ho.filter(I=>b.has(I.type)).length," 个节点 |"," ",Z2.filter(I=>{var U,k;return b.has(((U=Ho.find(V=>V.id===I.source))==null?void 0:U.type)||"")&&b.has(((k=Ho.find(V=>V.id===I.target))==null?void 0:k.type)||"")}).length," 条关系"]})]})]})]}),d.jsx($we,{open:i,onOpenChange:a,children:d.jsxs(Gwe,{className:"bg-slate-900 border-slate-800",children:[d.jsxs(Wwe,{children:[d.jsxs(qwe,{className:"text-white flex items-center gap-2",children:[d.jsx(Qh,{className:"w-5 h-5 text-blue-400"}),n==null?void 0:n.label]}),d.jsx(Xwe,{className:"text-slate-400",children:"节点详情信息"})]}),n&&d.jsxs("div",{className:"space-y-4 mt-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`inline-flex px-3 py-1 rounded-full bg-gradient-to-br ${Ws[n.type].gradient} text-white text-sm`,children:Ws[n.type].label}),d.jsxs("div",{className:"text-sm text-slate-400",children:["关联节点: ",L(n.id).length," 个"]})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-2",children:"详细描述"}),d.jsx("div",{className:"text-sm text-slate-300 p-3 rounded-lg bg-slate-800/50",children:n.description})]}),L(n.id).length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-2",children:"关联节点"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:L(n.id).map(I=>{const U=Ho.find(k=>k.id===I);return U?d.jsx(B.span,{whileHover:{scale:1.05},className:`px-2 py-1 rounded text-xs cursor-pointer ${m.has(I)?"bg-blue-500/30 text-blue-300 border border-blue-500/50":"bg-slate-800 text-slate-300 border border-slate-700"}`,onClick:()=>{const k=Ho.find(V=>V.id===I);k&&r(k)},children:U.label},I):null})})]}),d.jsxs("div",{className:"flex gap-2 pt-2",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.info("编辑功能开发中"),className:"flex-1 px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-700 text-white text-sm transition-colors flex items-center justify-center gap-1",children:[d.jsx(XY,{className:"w-4 h-4"}),"编辑节点"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{a(!1),Ye.success("已定位节点")},className:"flex-1 px-4 py-2 rounded-lg bg-slate-700 hover:bg-slate-600 text-white text-sm transition-colors flex items-center justify-center gap-1",children:[d.jsx(Gd,{className:"w-4 h-4"}),"定位节点"]}),d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{a(!1),Ye.error("删除功能已禁用")},className:"px-4 py-2 rounded-lg bg-red-600/50 text-red-300 text-sm transition-colors flex items-center justify-center gap-1 cursor-not-allowed",disabled:!0,children:d.jsx(JY,{className:"w-4 h-4"})})]})]})]})})]})}const PU=[{value:"bm25",label:"BM25"},{value:"dense",label:"Dense Retrieval"},{value:"hybrid",label:"BM25 + Dense"}],CU=[{value:"all",label:"全量知识库"},{value:"steel",label:"钢铁行业"},{value:"nonferrous",label:"有色冶金"}],RU=[{relevance:.92,source:"高炉故障知识图谱",content:"冷却壁水温差上升可能预示冷却系统堵塞应立即检查冷却水压力和流量确保冷却系统正常运行。历史数据显示水温差持续上升超过5°C时故障概率达到78%。"},{relevance:.87,source:"故障案例库",content:"2025年3月案例某高炉冷却壁水温差异常上升经检查发现冷却水管路部分堵塞清理后恢复正常。建议定期进行管路清洁维护。"},{relevance:.81,source:"操作手册",content:"冷却壁系统维护规程每周检查冷却水压力每月检查水质每季度进行管路清洁。正常运行时水温差应控制在2-3°C范围内。"}];function IMe(){const[t,e]=O.useState(""),[n,r]=O.useState("hybrid"),[i,a]=O.useState("all"),[s,o]=O.useState(!1),[c,l]=O.useState(!1),[h,f]=O.useState(""),[m,g]=O.useState(RU),[b,y]=O.useState(0),[v,w]=O.useState("query"),[_,E]=O.useState("");O.useEffect(()=>{if(h&&c){E("");let N=0;const P=setInterval(()=>{N<=h.length?(E(h.slice(0,N)),N++):clearInterval(P)},30);return()=>clearInterval(P)}},[h,c]);const M=()=>{if(t.trim()){o(!0),l(!1),y(0),w("query"),Ye.info("开始检索知识库...",{duration:1500}),setTimeout(()=>{w("retrieval"),y(25)},400);let N=0;const P=setInterval(()=>{N+=5,N>=90?(clearInterval(P),y(90)):N<30?y(N):N<60?(w("retrieval"),y(30+(N-30))):N<85?(w("rerank"),y(60+(N-60))):(w("generate"),y(85+(N-85)))},150);setTimeout(()=>{clearInterval(P),y(100),w("generate");const R=["目前炉况基本顺行,但请注意冷却壁水温差有上升趋势(当前+3.5°C建议检查冷却水压力。根据历史数据分析和相关案例水温差持续上升可能预示冷却系统存在堵塞风险应立即进行检查。建议参考操作手册中的维护规程进行系统性排查。","根据检索到的知识库信息,该问题涉及到多个方面。首先从实时监控数据来看,系统运行基本正常。其次结合历史案例分析,建议关注关键参数的变化趋势,及时采取预防措施。","基于RAG增强检索我为您找到了相关的解决方案和案例。建议结合当前实际情况参考历史经验进行处理。同时建议定期维护相关设备降低故障发生概率。"];f(R[Math.floor(Math.random()*R.length)]),l(!0),o(!1),g(RU.map(F=>({...F,relevance:.75+Math.random()*.2}))),Ye.success("检索完成!已生成智能答案",{duration:2e3})},1800)}},T=()=>{e(""),l(!1),f(""),y(0),Ye.info("已清空输入",{duration:1e3})},A=()=>{navigator.clipboard.writeText(h),Ye.success("答案已复制到剪贴板",{duration:2e3})};return d.jsxs("div",{className:"h-full p-6 space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"知识检索增强生成系统 (RAG)"}),d.jsx("p",{className:"text-sm text-slate-400",children:"结合知识库检索与大模型生成的智能问答"})]}),d.jsxs(B.div,{animate:{boxShadow:["0 0 20px rgba(59, 130, 246, 0.3)","0 0 40px rgba(147, 51, 234, 0.5)","0 0 20px rgba(59, 130, 246, 0.3)"]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-gradient-to-r from-blue-500/10 to-purple-500/10 border border-blue-500/30",children:[d.jsx(Ec,{className:"w-4 h-4 text-blue-400"}),d.jsx("span",{className:"text-sm text-blue-400",children:"RAG 引擎"})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 h-[calc(100%-6rem)]",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6 overflow-y-auto",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h2",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Ju,{className:"w-5 h-5 text-blue-400"}),"检索式问答"]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{children:d.jsx("textarea",{value:t,onChange:N=>e(N.target.value),placeholder:"请输入您的问题...",rows:4,disabled:s,className:"w-full px-4 py-3 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-blue-500/50 resize-none disabled:opacity-50"})}),d.jsxs("div",{className:"flex gap-4",children:[d.jsxs("div",{className:"flex-1",children:[d.jsx("label",{className:"text-sm text-slate-400 mb-2 block",children:"检索策略"}),d.jsx("select",{value:n,onChange:N=>{var P;r(N.target.value),Ye.info(`已切换到 ${(P=PU.find(R=>R.value===N.target.value))==null?void 0:P.label}`,{duration:1500})},disabled:s,className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white focus:outline-none focus:ring-2 focus:ring-blue-500/50 disabled:opacity-50",children:PU.map(N=>d.jsx("option",{value:N.value,children:N.label},N.value))})]}),d.jsxs("div",{className:"flex-1",children:[d.jsx("label",{className:"text-sm text-slate-400 mb-2 block",children:"知识库范围"}),d.jsx("select",{value:i,onChange:N=>{var P;a(N.target.value),Ye.info(`已切换到 ${(P=CU.find(R=>R.value===N.target.value))==null?void 0:P.label}`,{duration:1500})},disabled:s,className:"w-full px-4 py-2 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white focus:outline-none focus:ring-2 focus:ring-blue-500/50 disabled:opacity-50",children:CU.map(N=>d.jsx("option",{value:N.value,children:N.label},N.value))})]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:M,disabled:!t.trim()||s,className:"flex-1 px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium disabled:opacity-50 disabled:cursor-not-allowed hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:s?d.jsxs(d.Fragment,{children:[d.jsx(CB,{className:"w-5 h-5 animate-spin"}),"检索中..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Ju,{className:"w-5 h-5"}),"开始检索"]})}),d.jsx(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:T,disabled:s,className:"px-6 py-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white font-medium disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:"清空"})]}),s&&d.jsxs(B.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"space-y-3",children:[d.jsx("div",{className:"flex items-center justify-between gap-2",children:[{key:"query",label:"Query",icon:Ju},{key:"retrieval",label:"检索",icon:vl},{key:"rerank",label:"重排",icon:nv},{key:"generate",label:"生成",icon:gl}].map((N,P)=>{const R=v===N.key,F=N.key==="query"&&["retrieval","rerank","generate"].includes(v)||N.key==="retrieval"&&["rerank","generate"].includes(v)||N.key==="rerank"&&v==="generate"||N.key==="generate"&&v==="generate";return d.jsxs("div",{className:"flex items-center flex-1",children:[d.jsxs(B.div,{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs ${F?"bg-green-500/20 text-green-400":R?"bg-blue-500/20 text-blue-400":"bg-slate-800/50 text-slate-500"}`,animate:R?{scale:[1,1.05,1]}:{},transition:{duration:1,repeat:1/0},children:[R&&d.jsx(B.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:d.jsx(N.icon,{className:"w-3 h-3"})}),F&&d.jsx(Cr,{className:"w-3 h-3"}),d.jsx("span",{className:"hidden sm:inline",children:N.label})]}),P<3&&d.jsx(B.div,{animate:{x:[0,5,0]},transition:{duration:1,repeat:1/0},className:"mx-1 text-slate-600",children:d.jsx(OK,{className:"w-3 h-3"})})]},N.key)})}),d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center justify-between text-sm",children:[d.jsx("span",{className:"text-slate-400",children:"检索进度"}),d.jsxs(B.span,{className:"text-blue-400 font-medium",animate:{opacity:[.7,1,.7]},transition:{duration:1,repeat:1/0},children:[b,"%"]})]}),d.jsx("div",{className:"relative h-2 bg-slate-800/50 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${b}%`},className:"absolute inset-y-0 left-0 rounded-full bg-gradient-to-r from-blue-500 via-purple-500 to-blue-500",style:{backgroundSize:"200% 100%"},children:d.jsx(B.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent",animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}})})})]})]})]})]}),d.jsx(mi,{children:c&&h&&d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"rounded-xl bg-gradient-to-br from-blue-900/20 to-purple-900/20 border border-blue-500/30 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h3",{className:"font-semibold text-white flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:3,repeat:1/0,ease:"linear"},children:d.jsx(Ec,{className:"w-5 h-5 text-blue-400"})}),"智能生成答案",d.jsx(B.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"px-2 py-0.5 rounded-full bg-green-500/20 text-green-400 text-xs",children:"AI Generated"})]}),d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:A,className:"px-3 py-1 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 transition-colors",children:"📋 复制"})]}),d.jsxs("div",{className:"relative",children:[d.jsx("p",{className:"text-slate-200 leading-relaxed",children:_}),d.jsx(B.span,{animate:{opacity:[1,0,1]},transition:{duration:.8,repeat:1/0},className:"inline-block w-2 h-4 bg-blue-400 ml-1"})]})]})}),d.jsx(mi,{children:c&&d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Mc,{className:"w-5 h-5 text-green-400"}),"检索结果 (",m.length,")"]}),d.jsx("div",{className:"space-y-4",children:m.map((N,P)=>d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:P*.15},whileHover:{x:5,boxShadow:"0 0 20px rgba(59, 130, 246, 0.2)"},className:"p-4 rounded-lg bg-slate-800/50 border border-slate-700/50 hover:border-blue-500/50 transition-all cursor-pointer relative overflow-hidden",children:[d.jsx(B.div,{className:"absolute inset-0 opacity-0 hover:opacity-100 transition-opacity",style:{background:"linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%)"}}),d.jsxs("div",{className:"flex items-center justify-between mb-2 relative",children:[d.jsx(B.span,{animate:P===0?{scale:[1,1.02,1]}:{},transition:{duration:2,repeat:1/0},className:"text-sm font-medium text-blue-400",children:N.source}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-slate-400",children:"相关度"}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("div",{className:"w-16 h-2 bg-slate-700/50 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${N.relevance*100}%`},transition:{delay:P*.1+.3,duration:.5},className:`h-full rounded-full relative ${N.relevance>.9?"bg-green-500":N.relevance>.8?"bg-blue-500":"bg-yellow-500"}`,children:d.jsx(B.div,{className:"absolute inset-0 bg-white/30",animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}})})}),d.jsxs(B.span,{initial:{scale:1.3,color:"#60a5fa"},animate:{scale:1,color:"#ffffff"},className:"text-xs text-white font-medium",children:[Math.round(N.relevance*100),"%"]},N.relevance)]})]})]}),d.jsx("p",{className:"text-sm text-slate-300 leading-relaxed relative",children:N.content})]},P))})]})})]}),d.jsxs("div",{className:"space-y-6 overflow-y-auto",children:[d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"系统状态"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"检索引擎"}),d.jsxs("span",{className:"flex items-center gap-2 text-sm text-green-400",children:[d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),"在线"]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"大模型"}),d.jsxs("span",{className:"flex items-center gap-2 text-sm text-green-400",children:[d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),"在线"]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"知识库"}),d.jsxs("span",{className:"flex items-center gap-2 text-sm text-green-400",children:[d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),"在线"]})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.1},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"检索统计"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-2xl font-bold text-white",children:"10TB+"}),d.jsx("div",{className:"text-xs text-slate-400 mt-1",children:"语料库总量"})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-lg font-bold text-white",children:"3TB"}),d.jsx("div",{className:"text-xs text-slate-400 mt-1",children:"文本数据"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-lg font-bold text-white",children:"4TB"}),d.jsx("div",{className:"text-xs text-slate-400 mt-1",children:"图像数据"})]})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"搜索历史"}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 transition-colors cursor-pointer",children:[d.jsx("div",{className:"text-sm text-white mb-1",children:"炉温异常分析"}),d.jsx("div",{className:"text-xs text-slate-400",children:"10:30"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 transition-colors cursor-pointer",children:[d.jsx("div",{className:"text-sm text-white mb-1",children:"质量指标优化建议"}),d.jsx("div",{className:"text-xs text-slate-400",children:"10:15"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 transition-colors cursor-pointer",children:[d.jsx("div",{className:"text-sm text-white mb-1",children:"设备维护周期查询"}),d.jsx("div",{className:"text-xs text-slate-400",children:"09:45"})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.3},className:"rounded-xl bg-gradient-to-br from-blue-900/30 to-purple-900/30 border border-blue-500/30 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-3 flex items-center gap-2",children:[d.jsx(Mc,{className:"w-4 h-4 text-blue-400"}),"使用提示"]}),d.jsxs("ul",{className:"space-y-2 text-xs text-slate-300",children:[d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"支持自然语言提问"})]}),d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"可选择不同检索策略"})]}),d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"答案基于知识库检索"})]}),d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"查看检索来源提升可信度"})]})]})]})]})]})]})}const DMe=[{name:"炼铁",status:"normal",load:85,temp:1250},{name:"炼钢",status:"normal",load:92,temp:1650},{name:"连铸",status:"normal",load:88,temp:1520},{name:"热轧",status:"normal",load:90,temp:1180},{name:"冷轧",status:"normal",load:78,temp:850}],kMe=[{time:"08:00",t1:1245,t2:1648,t3:1518},{time:"10:00",t1:1248,t2:1650,t3:1520},{time:"12:00",t1:1250,t2:1652,t3:1522},{time:"14:00",t1:1252,t2:1649,t3:1519},{time:"16:00",t1:1250,t2:1650,t3:1520}],LMe=[{hour:"00",value:820},{hour:"04",value:780},{hour:"08",value:950},{hour:"12",value:1020},{hour:"16",value:980},{hour:"20",value:890}],FMe=[{id:1,type:"warning",message:"高炉1#冷却水温差偏高",time:"10:35",handled:!1},{id:2,type:"info",message:"连铸2#定期维护提醒",time:"10:20",handled:!1},{id:3,type:"success",message:"炼钢3#工艺优化已完成",time:"10:15",handled:!0},{id:4,type:"warning",message:"热轧设备温度波动",time:"10:05",handled:!0}],UMe=[{name:"高炉 #1",status:"running",efficiency:94,uptime:"99.2%"},{name:"高炉 #2",status:"running",efficiency:92,uptime:"98.8%"},{name:"转炉 #1",status:"running",efficiency:96,uptime:"99.5%"},{name:"转炉 #2",status:"maintenance",efficiency:0,uptime:"—"},{name:"连铸 #1",status:"running",efficiency:91,uptime:"98.3%"},{name:"连铸 #2",status:"running",efficiency:93,uptime:"99.1%"}];function BMe(){const[t,e]=O.useState(new Date),[n,r]=O.useState(FMe),[i,a]=O.useState(DMe),[s,o]=O.useState(kMe);O.useEffect(()=>{const f=setInterval(()=>{e(new Date)},1e3);return()=>clearInterval(f)},[]),O.useEffect(()=>{const f=setInterval(()=>{a(m=>m.map(g=>({...g,load:Math.max(70,Math.min(100,g.load+(Math.random()-.5)*5)),temp:g.temp+(Math.random()-.5)*10}))),o(m=>{const g=[...m];g.shift();const b=g[g.length-1];return g.push({time:new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}),t1:b.t1+(Math.random()-.5)*5,t2:b.t2+(Math.random()-.5)*5,t3:b.t3+(Math.random()-.5)*5}),g})},3e3);return()=>clearInterval(f)},[]);const c=f=>{r(m=>m.map(g=>g.id===f?{...g,handled:!g.handled}:g)),Ye.success("报警状态已更新",{duration:2e3})},l=()=>{Ye.promise(new Promise(f=>setTimeout(f,1e3)),{loading:"刷新监控数据...",success:"数据已更新!",error:"刷新失败"})},h=()=>{const f=n.filter(m=>!m.handled).length;f>0?Ye.warning(`您有 ${f} 条未处理报警`,{duration:3e3}):Ye.success("暂无未处理报警",{duration:2e3})};return d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"可视化监控中心"}),d.jsx("p",{className:"text-sm text-slate-400",children:"全厂实时状态监控与数据分析"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:h,className:"p-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 transition-colors relative",children:[d.jsx(Oy,{className:"w-5 h-5 text-slate-300"}),n.filter(f=>!f.handled).length>0&&d.jsx("span",{className:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full text-xs flex items-center justify-center text-white",children:n.filter(f=>!f.handled).length})]}),d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:l,className:"p-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 transition-colors",children:d.jsx(ps,{className:"w-5 h-5 text-slate-300"})}),d.jsxs(B.div,{animate:{boxShadow:["0 0 20px rgba(16, 185, 129, 0.3)","0 0 40px rgba(16, 185, 129, 0.5)","0 0 20px rgba(16, 185, 129, 0.3)"]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-green-500/10 border border-green-500/30",children:[d.jsx(yr,{className:"w-4 h-4 text-green-400"}),d.jsx("span",{className:"text-sm text-green-400",children:"系统运行正常"})]}),d.jsxs("div",{className:"text-right",children:[d.jsx("div",{className:"text-sm text-slate-400",children:"当前时间"}),d.jsx("div",{className:"text-lg font-semibold text-white font-mono",children:t.toLocaleTimeString("zh-CN")})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:8,repeat:1/0,ease:"linear"},children:d.jsx(Qr,{className:"w-5 h-5 text-blue-400"})}),"工艺流程监控"]}),d.jsx("div",{className:"flex items-center gap-4 text-xs",children:d.jsxs(B.div,{className:"flex items-center gap-2 text-slate-400",animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},children:[d.jsx(_s,{className:"w-4 h-4"}),d.jsx("span",{children:"数据实时更新中"})]})})]}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none rounded-lg",children:[...Array(8)].map((f,m)=>d.jsx(B.div,{className:"absolute h-0.5 bg-gradient-to-r from-transparent via-blue-500/30 to-transparent",initial:{left:"-20%",top:`${15+m*12}%`,width:"10%"},animate:{left:"100%"},transition:{duration:3+m*.5,repeat:1/0,delay:m*.4,ease:"linear"}},m))}),d.jsx("div",{className:"flex items-center justify-between gap-4",children:i.map((f,m)=>d.jsxs("div",{className:"flex items-center flex-1",children:[d.jsxs(B.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:m*.1},whileHover:{scale:1.05,boxShadow:"0 0 30px rgba(59, 130, 246, 0.3)"},className:"flex-1 p-4 rounded-lg bg-slate-800/50 border border-slate-700/50 cursor-pointer hover:border-blue-500/50 transition-all relative overflow-hidden",onClick:()=>Ye.info(`${f.name}阶段详情`,{duration:2e3}),children:[d.jsx(B.div,{className:"absolute inset-0 opacity-20",animate:{background:["radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%)","radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%)","radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%)"]},transition:{duration:4,repeat:1/0}}),d.jsxs("div",{className:"flex items-center justify-between mb-2 relative",children:[d.jsx("span",{className:"font-semibold text-white",children:f.name}),d.jsx(B.div,{animate:{scale:[1,1.2,1],boxShadow:f.status==="normal"?["0 0 5px rgba(34, 197, 94, 0.5)","0 0 15px rgba(34, 197, 94, 0.8)","0 0 5px rgba(34, 197, 94, 0.5)"]:["0 0 5px rgba(234, 179, 8, 0.5)","0 0 15px rgba(234, 179, 8, 0.8)","0 0 5px rgba(234, 179, 8, 0.5)"]},transition:{duration:1.5,repeat:1/0},className:`w-3 h-3 rounded-full ${f.status==="normal"?"bg-green-500":"bg-yellow-500"}`})]}),d.jsxs("div",{className:"space-y-1 relative",children:[d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsxs("span",{className:"text-slate-400 flex items-center gap-1",children:[d.jsx(Zh,{className:"w-3 h-3"}),"负荷率"]}),d.jsxs(B.span,{initial:{scale:1.2,color:"#60a5fa"},animate:{scale:1,color:"#60a5fa"},className:"font-medium",children:[Math.round(f.load),"%"]},f.load)]}),d.jsx("div",{className:"w-full h-2 bg-slate-700/50 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${f.load}%`},transition:{duration:.5},className:`h-full rounded-full relative ${f.load>90?"bg-red-500":f.load>75?"bg-yellow-500":"bg-green-500"}`,children:d.jsx(B.div,{className:"absolute inset-0 bg-white/30",animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}})})}),d.jsxs("div",{className:"flex justify-between text-sm mt-2",children:[d.jsxs("span",{className:"text-slate-400 flex items-center gap-1",children:[d.jsx(rv,{className:"w-3 h-3"}),"温度"]}),d.jsxs(B.span,{initial:{scale:1.1},animate:{scale:1},className:"text-orange-400 font-medium",children:[Math.round(f.temp),"°C"]},f.temp)]})]})]}),m<i.length-1&&d.jsxs("div",{className:"mx-2 flex items-center relative",children:[d.jsx(B.div,{animate:{x:[0,8,0],opacity:[.3,1,.3]},transition:{duration:1.5,repeat:1/0},className:"text-slate-600 relative",children:"→"}),d.jsx("div",{className:"absolute -top-2 left-1/2",children:d.jsx(B.div,{className:"w-1.5 h-1.5 rounded-full bg-blue-400/50",animate:{x:[0,20,0],y:[0,-5,0]},transition:{duration:1,repeat:1/0}})})]})]},f.name))})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"温度趋势监控"}),d.jsxs("div",{className:"flex gap-3 text-xs",children:[d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),d.jsx("span",{className:"text-slate-400",children:"炼铁"})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-purple-500"}),d.jsx("span",{className:"text-slate-400",children:"炼钢"})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"}),d.jsx("span",{className:"text-slate-400",children:"连铸"})]})]})]}),d.jsx(Ci,{width:"100%",height:200,children:d.jsxs(Dd,{data:s,children:[d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"time",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),d.jsx(gi,{type:"monotone",dataKey:"t1",stroke:"#3b82f6",strokeWidth:2,dot:{r:3}}),d.jsx(gi,{type:"monotone",dataKey:"t2",stroke:"#8b5cf6",strokeWidth:2,dot:{r:3}}),d.jsx(gi,{type:"monotone",dataKey:"t3",stroke:"#10b981",strokeWidth:2,dot:{r:3}})]})})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"产量统计"}),d.jsx("span",{className:"text-sm text-slate-400",children:"单位: 吨/小时"})]}),d.jsx(Ci,{width:"100%",height:200,children:d.jsxs(fP,{data:LMe,children:[d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"hour",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),d.jsx(Ms,{dataKey:"value",fill:"#10b981",radius:[8,8,0,0]})]})})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"lg:col-span-2 rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"报警中心"}),d.jsxs("div",{className:"flex gap-3 text-sm",children:[d.jsxs("span",{className:"px-3 py-1 rounded-full bg-yellow-500/20 text-yellow-400",children:[n.filter(f=>!f.handled).length," 待处理"]}),d.jsxs("span",{className:"px-3 py-1 rounded-full bg-green-500/20 text-green-400",children:[n.filter(f=>f.handled).length," 已处理"]})]})]}),d.jsx("div",{className:"space-y-2",children:d.jsx(mi,{mode:"popLayout",children:n.map(f=>d.jsxs(B.div,{layout:!0,initial:{opacity:0,x:-50,scale:.8},animate:{opacity:1,x:0,scale:1,backgroundColor:!f.handled&&f.type==="warning"?["rgba(234, 179, 8, 0.05)","rgba(234, 179, 8, 0.1)","rgba(234, 179, 8, 0.05)"]:"rgba(30, 41, 59, 0.5)"},exit:{opacity:0,x:50,scale:.8},transition:{duration:.4},className:`flex items-center justify-between p-4 rounded-lg border ${f.handled?"bg-slate-800/30":"bg-slate-800/50"} ${f.type==="warning"?"border-yellow-500/30":f.type==="success"?"border-green-500/30":"border-blue-500/30"}`,children:[d.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[d.jsxs(B.div,{animate:f.type==="warning"?{rotate:[-5,5,-5,5,0],scale:[1,1.1,1]}:{},transition:{duration:.5},children:[f.type==="warning"&&d.jsx(qi,{className:"w-5 h-5 text-yellow-400"}),f.type==="success"&&d.jsx(Cr,{className:"w-5 h-5 text-green-400"}),f.type==="info"&&d.jsx(yr,{className:"w-5 h-5 text-blue-400"})]}),d.jsxs("div",{className:"flex-1",children:[d.jsx(B.div,{className:`font-medium ${f.handled?"text-slate-500":"text-white"}`,animate:f.handled?{}:{opacity:[.8,1,.8]},transition:{duration:2,repeat:1/0},children:f.message}),d.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-1",children:[d.jsx(_s,{className:"w-3 h-3"}),f.time]})]})]}),f.handled?d.jsxs(B.span,{initial:{opacity:0},animate:{opacity:1},className:"text-sm text-slate-500 flex items-center gap-1",children:[d.jsx(Cr,{className:"w-4 h-4"}),"已完成"]}):d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},className:"px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium transition-colors",onClick:()=>c(f.id),children:"处理"})]},f.id))})})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"设备状态"}),d.jsx("div",{className:"space-y-3",children:UMe.map((f,m)=>d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50 border border-slate-700/50",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"text-sm font-medium text-white",children:f.name}),d.jsxs("span",{className:`flex items-center gap-1 text-xs px-2 py-1 rounded-full ${f.status==="running"?"bg-green-500/20 text-green-400":"bg-orange-500/20 text-orange-400"}`,children:[d.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${f.status==="running"?"bg-green-500":"bg-orange-500"}`}),f.status==="running"?"运行中":"维护中"]})]}),f.status==="running"&&d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex justify-between text-xs",children:[d.jsx("span",{className:"text-slate-400",children:"效率"}),d.jsxs("span",{className:"text-white",children:[f.efficiency,"%"]})]}),d.jsxs("div",{className:"flex justify-between text-xs",children:[d.jsx("span",{className:"text-slate-400",children:"正常运行时间"}),d.jsx("span",{className:"text-white",children:f.uptime})]})]})]},m))})]})]})]})}const J2=[{name:"炼铁",status:"normal",icon:"🔥",temp:1450,efficiency:98},{name:"炼钢",status:"normal",icon:"⚙️",temp:1650,efficiency:97},{name:"连铸",status:"warning",icon:"💧",temp:1520,efficiency:85},{name:"热轧",status:"recovered",icon:"🌡️",temp:1100,efficiency:94},{name:"冷轧",status:"normal",icon:"❄️",temp:20,efficiency:99}];function zMe(){const[t,e]=O.useState("PL20260403001"),[n,r]=O.useState(!0),[i,a]=O.useState([]),[s,o]=O.useState(null),[c,l]=O.useState(0),[h,f]=O.useState([]),m=O.useRef(null);O.useEffect(()=>{if(!n)return;const b=setTimeout(()=>{a([0,1,2,3,4])},500),y=setInterval(()=>{const _=Array.from({length:3},(E,M)=>({id:Date.now()+M,x:Math.random()*100,y:50+Math.random()*30,delay:Math.random()*.5}));f(E=>[...E.slice(-20),..._])},300);let v=0;const w=setInterval(()=>{v+=2,l(v),v>=100&&clearInterval(w)},30);return()=>{clearTimeout(b),clearInterval(y),clearInterval(w)}},[n]);const g=b=>{switch(b){case"warning":return{bg:"from-yellow-500/20 to-orange-500/20",border:"border-yellow-500",glow:"shadow-yellow-500/30",text:"text-yellow-400"};case"recovered":return{bg:"from-blue-500/20 to-cyan-500/20",border:"border-blue-500",glow:"shadow-blue-500/30",text:"text-blue-400"};default:return{bg:"from-green-500/20 to-emerald-500/20",border:"border-green-500",glow:"shadow-green-500/30",text:"text-green-400"}}};return d.jsxs("div",{className:"h-full p-6 space-y-6",children:[d.jsx("div",{className:"flex items-center justify-between",children:d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"质量溯源分析智能体"}),d.jsx("p",{className:"text-sm text-slate-400",children:"全流程产品质量追溯与分析"})]})}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"font-semibold text-white mb-4",children:"溯源查询"}),d.jsxs("div",{className:"flex gap-3",children:[d.jsx("input",{type:"text",value:t,onChange:b=>e(b.target.value),placeholder:"请输入产品批号...",className:"flex-1 px-4 py-3 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-blue-500/50"}),d.jsxs("button",{onClick:()=>{if(!t.trim()){Ye.error("请输入产品批号");return}Ye.promise(new Promise(b=>setTimeout(b,1500)),{loading:"正在查询产品质量追溯信息...",success:()=>(r(!0),"查询完成!"),error:"查询失败"})},className:"px-8 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center gap-2",children:[d.jsx(Ju,{className:"w-5 h-5"}),"查询"]})]})]}),n&&d.jsxs(d.Fragment,{children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"font-semibold text-white mb-4",children:"溯源结果"}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"p-6 rounded-xl bg-gradient-to-br from-yellow-900/20 to-orange-900/20 border border-yellow-500/30",children:d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsx("div",{className:"p-3 rounded-full bg-yellow-500/20",children:d.jsx(qi,{className:"w-6 h-6 text-yellow-400"})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h3",{className:"text-lg font-semibold text-yellow-400 mb-2",children:"⚠️ 发现质量异常 - 抗拉强度偏低"}),d.jsxs("div",{className:"space-y-2 text-sm text-slate-300",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"产品批号:"}),d.jsx("span",{className:"font-medium text-white",children:t})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"检测时间:"}),d.jsx("span",{children:"2026-04-03 14:30"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"异常指标:"}),d.jsx("span",{className:"text-yellow-400",children:"抗拉强度 458 MPa (标准值: ≥480 MPa)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"超标程度:"}),d.jsx("span",{className:"text-red-400",children:"偏低 4.6%"})]})]})]})]})}),d.jsx("div",{className:"p-6 rounded-xl bg-gradient-to-br from-red-900/20 to-orange-900/20 border border-red-500/30",children:d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsx("div",{className:"p-3 rounded-full bg-red-500/20",children:d.jsx(WM,{className:"w-6 h-6 text-red-400"})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h3",{className:"text-lg font-semibold text-red-400 mb-2",children:"🔴 发现质量异常 - 延伸率不合格"}),d.jsxs("div",{className:"space-y-2 text-sm text-slate-300",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"产品批号:"}),d.jsx("span",{className:"font-medium text-white",children:t})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"检测时间:"}),d.jsx("span",{children:"2026-04-03 14:30"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"异常指标:"}),d.jsx("span",{className:"text-red-400",children:"延伸率 18.2% (标准值: ≥22%)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"超标程度:"}),d.jsx("span",{className:"text-red-400",children:"偏低 17.3%"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-slate-400",children:"可能原因:"}),d.jsx("span",{className:"text-orange-400",children:"连铸段冷却速度过快"})]})]})]})]})})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-6",children:[d.jsx("h2",{className:"font-semibold text-white",children:"溯源路径"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-slate-400",children:"追溯进度"}),d.jsx("div",{className:"w-32 h-2 bg-slate-800 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${c}%`},className:"h-full bg-gradient-to-r from-green-500 to-cyan-500"})}),d.jsxs("span",{className:"text-xs text-cyan-400",children:[c,"%"]})]})]}),d.jsxs("div",{className:"relative overflow-hidden rounded-xl bg-slate-950/50 p-4",children:[d.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-10",ref:m,children:[d.jsxs("defs",{children:[d.jsx("pattern",{id:"qualityGrid",width:"20",height:"20",patternUnits:"userSpaceOnUse",children:d.jsx("path",{d:"M 20 0 L 0 0 0 20",fill:"none",stroke:"rgba(6, 182, 212, 0.3)",strokeWidth:"0.5"})}),d.jsxs("linearGradient",{id:"flowGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d.jsx("stop",{offset:"0%",stopColor:"#10b981",children:d.jsx("animate",{attributeName:"offset",values:"-1;1",dur:"2s",repeatCount:"indefinite"})}),d.jsx("stop",{offset:"50%",stopColor:"#06b6d4",children:d.jsx("animate",{attributeName:"offset",values:"-0.5;1.5",dur:"2s",repeatCount:"indefinite"})}),d.jsx("stop",{offset:"100%",stopColor:"#3b82f6",children:d.jsx("animate",{attributeName:"offset",values:"0;2",dur:"2s",repeatCount:"indefinite"})})]}),d.jsxs("filter",{id:"glow",children:[d.jsx("feGaussianBlur",{stdDeviation:"3",result:"coloredBlur"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"coloredBlur"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),d.jsx("rect",{width:"100%",height:"100%",fill:"url(#qualityGrid)"})]}),d.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:h.map(b=>d.jsx(B.div,{initial:{left:"0%",opacity:0},animate:{left:"100%",opacity:[0,1,1,0]},transition:{duration:3,delay:b.delay,ease:"linear"},className:"absolute w-1.5 h-1.5 rounded-full bg-cyan-400/60",style:{top:`${b.y}%`}},b.id))}),d.jsx("div",{className:"relative flex justify-between items-start",children:J2.map((b,y)=>{const v=g(b.status),w=s===y,_=i.includes(y);return d.jsxs(B.div,{initial:{opacity:0,scale:.8},animate:{opacity:_?1:0,scale:_?1:.8},transition:{delay:.3+y*.2,duration:.5},onMouseEnter:()=>o(y),onMouseLeave:()=>o(null),className:"flex flex-col items-center cursor-pointer z-10",children:[d.jsxs(B.div,{animate:{scale:w?1.1:1,boxShadow:[`0 0 ${w?30:20}px rgba(${b.status==="warning"?"234, 179, 8":b.status==="recovered"?"59, 130, 246":"16, 185, 129"}, ${w?.5:.3})`]},className:`relative w-28 h-28 rounded-full flex items-center justify-center bg-gradient-to-br ${v.bg} border-4 ${v.border} ${v.glow} transition-all`,children:[b.status==="warning"&&d.jsx(B.svg,{animate:{rotate:360},transition:{duration:3,repeat:1/0,ease:"linear"},className:"absolute inset-0 w-full h-full",children:d.jsx("circle",{cx:"56",cy:"56",r:"52",fill:"none",stroke:"#eab308",strokeWidth:"2",strokeDasharray:"8 4",opacity:"0.5"})}),d.jsx(B.div,{animate:{scale:[.8,1,.8],opacity:[.3,.6,.3]},transition:{duration:2,repeat:1/0},className:`absolute w-16 h-16 rounded-full ${b.status==="warning"?"bg-yellow-500/20":b.status==="recovered"?"bg-blue-500/20":"bg-green-500/20"}`}),d.jsxs("div",{className:"relative z-10 text-center",children:[d.jsx(B.div,{animate:w?{scale:[1,1.2,1]}:{},transition:{duration:.5},className:"text-3xl mb-1",children:b.icon}),d.jsx("div",{className:`text-sm font-bold ${v.text}`,children:b.name})]}),b.status!=="normal"&&d.jsx(B.div,{animate:{scale:[1,1.2,1],opacity:[.5,1,.5]},transition:{duration:1.5,repeat:1/0},className:`absolute -top-1 -right-1 w-6 h-6 rounded-full flex items-center justify-center ${b.status==="warning"?"bg-yellow-500":"bg-blue-500"}`,children:b.status==="warning"?d.jsx(qi,{className:"w-4 h-4 text-white"}):d.jsx(Cr,{className:"w-4 h-4 text-white"})})]}),d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:w?1:0,y:w?0:10},className:"absolute top-full mt-2 px-3 py-2 rounded-lg bg-slate-900/95 border border-slate-700/50 backdrop-blur-sm whitespace-nowrap",children:[d.jsxs("div",{className:"text-xs text-slate-400 mb-1",children:["温度: ",b.temp,"°C"]}),d.jsxs("div",{className:"text-xs text-slate-400",children:["效率: ",b.efficiency,"%"]})]}),d.jsx("div",{className:"mt-4",children:b.status==="warning"?d.jsx(B.div,{animate:{y:[0,-3,0]},transition:{duration:1,repeat:1/0},children:d.jsx(qi,{className:"w-6 h-6 text-yellow-400"})}):d.jsx(Cr,{className:"w-6 h-6 text-green-400"})}),y<J2.length-1&&d.jsxs("div",{className:"absolute top-14 left-1/2 w-full h-1",children:[d.jsx("svg",{className:"w-full h-full",preserveAspectRatio:"none",children:d.jsx(B.path,{d:`M 0 0 L ${100/(J2.length-1)*2}% 0`,fill:"none",stroke:"url(#flowGradient)",strokeWidth:"2",strokeDasharray:"6 3",initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1},transition:{delay:.5+y*.2,duration:.5},filter:"url(#glow)"})}),d.jsx(B.div,{animate:{left:["0%","100%"]},transition:{duration:1.5,repeat:1/0,delay:1+y*.3,ease:"linear"},className:"absolute top-0 w-2 h-2 rounded-full bg-cyan-400 -translate-y-1/2"})]})]},b.name)})})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.7},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"font-semibold text-white mb-4",children:"根因分析"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"p-6 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[d.jsx("div",{className:"p-2 rounded-lg bg-red-500/20",children:d.jsx(qi,{className:"w-5 h-5 text-red-400"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-white mb-1",children:"异常工序"}),d.jsx("p",{className:"text-sm text-slate-400",children:"连铸工序"})]})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"问题描述"}),d.jsx("div",{className:"text-sm text-white",children:"结晶器冷却水温差过大"})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"影响参数"}),d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsx("span",{className:"text-slate-300",children:"冷却水温差"}),d.jsx("span",{className:"text-red-400",children:"12.5°C (标准: ≤8°C)"})]}),d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsx("span",{className:"text-slate-300",children:"拉速波动"}),d.jsx("span",{className:"text-yellow-400",children:"±0.15 m/min"})]})]})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"发生时间"}),d.jsx("div",{className:"text-sm text-white",children:"2026-04-03 09:15 - 10:30"})]})]})]}),d.jsxs("div",{className:"p-6 rounded-xl bg-slate-800/50 border border-green-700/50",children:[d.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[d.jsx("div",{className:"p-2 rounded-lg bg-green-500/20",children:d.jsx(Cr,{className:"w-5 h-5 text-green-400"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-white mb-1",children:"建议措施"}),d.jsx("p",{className:"text-sm text-green-400",children:"已生成改进方案"})]})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-2",children:"立即措施"}),d.jsxs("ul",{className:"space-y-2",children:[d.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-300",children:[d.jsx("span",{className:"text-green-400 mt-0.5",children:"•"}),d.jsx("span",{children:"检查结晶器冷却系统,排查堵塞点"})]}),d.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-300",children:[d.jsx("span",{className:"text-green-400 mt-0.5",children:"•"}),d.jsx("span",{children:"调整水流分配,确保均匀冷却"})]}),d.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-300",children:[d.jsx("span",{className:"text-green-400 mt-0.5",children:"•"}),d.jsx("span",{children:"优化拉速控制策略"})]})]})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-2",children:"预防措施"}),d.jsxs("ul",{className:"space-y-2",children:[d.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-300",children:[d.jsx("span",{className:"text-blue-400 mt-0.5",children:"•"}),d.jsx("span",{children:"建立冷却水温差实时监控预警"})]}),d.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-300",children:[d.jsx("span",{className:"text-blue-400 mt-0.5",children:"•"}),d.jsx("span",{children:"增加冷却系统维护频次"})]})]})]})]})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8},className:"flex gap-4",children:[d.jsx("button",{onClick:()=>{Ye.promise(new Promise(b=>setTimeout(b,2e3)),{loading:"正在生成质量追溯报告...",success:()=>"报告已生成并下载到本地",error:"报告生成失败"})},className:"flex-1 px-6 py-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white font-medium border border-slate-700/50 transition-colors",children:"📄 导出详细报告"}),d.jsx("button",{onClick:()=>{Ye.info("正在加载历史关联数据...",{duration:1500}),setTimeout(()=>{Ye.success("已加载近30天关联记录")},1500)},className:"flex-1 px-6 py-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white font-medium border border-slate-700/50 transition-colors",children:"📊 查看历史关联"}),d.jsx("button",{onClick:()=>{Ye.promise(new Promise(b=>setTimeout(b,2500)),{loading:"正在进行深度分析...",success:()=>"分析完成发现3个潜在风险点",error:"分析失败"})},className:"flex-1 px-6 py-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white font-medium border border-slate-700/50 transition-colors",children:"🔍 深度分析"}),d.jsx("button",{onClick:()=>{Ye.promise(new Promise(b=>setTimeout(b,1500)),{loading:"正在提交专家复核申请...",success:"已提交给质量部张工预计2小时内回复",error:"提交失败,请重试"})},className:"flex-1 px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all",children:"👨‍💼 专家复核"})]})]})]})}var rC="Progress",iC=100,[$Me]=aH(rC),[VMe,HMe]=$Me(rC),hG=O.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=GMe,...s}=t;(i||i===0)&&!jU(i)&&console.error(WMe(`${i}`,"Progress"));const o=jU(i)?i:iC;r!==null&&!OU(r,o)&&console.error(qMe(`${r}`,"Progress"));const c=OU(r,o)?r:null,l=Sy(c)?a(c,o):void 0;return d.jsx(VMe,{scope:n,value:c,max:o,children:d.jsx(qa.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":Sy(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":gG(c,o),"data-value":c??void 0,"data-max":o,...s,ref:e})})});hG.displayName=rC;var pG="ProgressIndicator",mG=O.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,i=HMe(pG,n);return d.jsx(qa.div,{"data-state":gG(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:e})});mG.displayName=pG;function GMe(t,e){return`${Math.round(t/e*100)}%`}function gG(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Sy(t){return typeof t=="number"}function jU(t){return Sy(t)&&!isNaN(t)&&t>0}function OU(t,e){return Sy(t)&&!isNaN(t)&&t<=e&&t>=0}function WMe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${iC}\`.`}function qMe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${iC} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var XMe=hG,KMe=mG;function YMe({className:t,value:e,...n}){return d.jsx(XMe,{"data-slot":"progress",className:uf("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...n,children:d.jsx(KMe,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})})}const IU=[{label:"铝硅比 A/S",value:"8.5",unit:""},{label:"配碱量",value:"220",unit:"kg/t"},{label:"溶出率",value:"94.2",unit:"%"},{label:"溶出温度",value:"245",unit:"°C"}],ZMe=[{subject:"溶出率",current:94.2,optimized:94.8,fullMark:100},{subject:"能耗",current:65,optimized:85,fullMark:100},{subject:"成本",current:70,optimized:88,fullMark:100},{subject:"稳定性",current:80,optimized:92,fullMark:100},{subject:"安全性",current:95,optimized:98,fullMark:100}],JMe=[{date:"2026-03-15",situation:"A/S=8.5, 配碱量220kg/t",result:"溶出率94.3%, 能耗偏高",recommendation:"降低配碱量至210kg/t"},{date:"2026-02-28",situation:"A/S=8.3, 配碱量215kg/t",result:"溶出率93.8%, 能耗适中",recommendation:"保持当前参数"},{date:"2026-02-10",situation:"A/S=8.7, 配碱量225kg/t",result:"溶出率94.5%, 能耗过高",recommendation:"优化配碱量"}];function QMe(){const[t,e]=O.useState(!1),[n,r]=O.useState(0),[i,a]=O.useState(!1),[s,o]=O.useState(IU),c=()=>{e(!0),r(0),a(!1),Ye.info("开始工艺参数优化...",{duration:1500});const m=setInterval(()=>{r(g=>g>=95?(clearInterval(m),95):g+5)},200);setTimeout(()=>{clearInterval(m),r(100),e(!1),a(!0),Ye.success("优化完成!已生成最优参数方案",{duration:3e3})},4e3)},l=()=>{Ye.promise(new Promise(m=>{setTimeout(()=>{o([{label:"铝硅比 A/S",value:"8.3",unit:""},{label:"配碱量",value:"210",unit:"kg/t"},{label:"溶出率",value:"94.8",unit:"%"},{label:"溶出温度",value:"243",unit:"°C"}]),m(!0)},2e3)}),{loading:"正在应用优化参数...",success:"参数已更新!预计提升效率 3.2%",error:"应用失败"})},h=()=>{Ye.info("参数已重置为初始值",{duration:2e3}),o(IU),a(!1)},f=()=>{Ye.promise(new Promise(m=>setTimeout(m,2500)),{loading:"正在运行工艺仿真...",success:"仿真完成!预测结果:溶出率 94.8%,能耗降低 8%",error:"仿真失败"})};return d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"氧化铝原料制备工艺优化智能体"}),d.jsx("p",{className:"text-sm text-slate-400",children:"基于知识增强与多目标优化的智能决策系统"})]}),d.jsxs(B.div,{animate:{boxShadow:["0 0 20px rgba(16, 185, 129, 0.3)","0 0 40px rgba(16, 185, 129, 0.5)","0 0 20px rgba(16, 185, 129, 0.3)"]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-gradient-to-r from-green-500/10 to-emerald-500/10 border border-green-500/30",children:[d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),d.jsx("span",{className:"text-sm text-green-400",children:"优化引擎运行中"})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"font-semibold text-white",children:"当前工况参数"}),d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:h,className:"px-3 py-1.5 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 transition-colors",children:d.jsx(ps,{className:"w-4 h-4"})})]}),d.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:s.map((m,g)=>d.jsxs(B.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:g*.1},whileHover:{scale:1.02},className:"p-6 rounded-xl bg-slate-800/50 border border-slate-700/50 cursor-pointer",onClick:()=>Ye.info(`${m.label}: ${m.value}${m.unit}`,{duration:2e3}),children:[d.jsx("div",{className:"text-sm text-slate-400 mb-2",children:m.label}),d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx("span",{className:"text-3xl font-bold text-white",children:m.value}),m.unit&&d.jsx("span",{className:"text-sm text-slate-400",children:m.unit})]})]},m.label))})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"font-semibold text-white mb-4",children:"优化控制"}),d.jsxs("div",{className:"flex gap-3",children:[d.jsx(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:c,disabled:t,className:"flex-1 px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium disabled:opacity-50 disabled:cursor-not-allowed hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:t?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"优化中..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Wd,{className:"w-5 h-5"}),"开始优化"]})}),d.jsx(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:f,disabled:t,className:"px-6 py-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white font-medium disabled:opacity-50 transition-all",children:"工艺仿真"}),i&&d.jsxs(B.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},whileHover:{scale:1.02},whileTap:{scale:.98},onClick:l,className:"px-6 py-3 rounded-lg bg-green-600 hover:bg-green-700 text-white font-medium transition-all flex items-center gap-2",children:[d.jsx(Cr,{className:"w-5 h-5"}),"应用优化"]})]}),t&&d.jsxs(B.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mt-4 space-y-2",children:[d.jsxs("div",{className:"flex items-center justify-between text-sm",children:[d.jsx("span",{className:"text-slate-400",children:"优化进度"}),d.jsxs("span",{className:"text-blue-400",children:[n,"%"]})]}),d.jsx(YMe,{value:n,className:"h-2"}),d.jsxs("div",{className:"text-xs text-slate-500",children:[n<30&&"正在分析当前工况...",n>=30&&n<60&&"检索历史案例库...",n>=60&&n<90&&"计算多目标优化方案...",n>=90&&"生成优化建议..."]})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-gradient-to-br from-blue-900/30 to-cyan-900/30 border border-blue-500/30 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-start gap-3 mb-6",children:[d.jsx("div",{className:"p-3 rounded-full bg-blue-500/20",children:d.jsx(ep,{className:"w-6 h-6 text-blue-400"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"font-semibold text-white mb-1",children:"智能优化建议"}),d.jsx("p",{className:"text-sm text-blue-400",children:"基于历史数据与机理模型分析"})]})]}),d.jsx(mi,{mode:"wait",children:i?d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"space-y-4",children:[d.jsxs("div",{className:"p-4 rounded-lg bg-blue-500/10 border border-blue-500/30",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx(Cr,{className:"w-5 h-5 text-green-400"}),d.jsx("div",{className:"font-semibold text-white",children:"优化方案"})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-300",children:"铝硅比 A/S"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-slate-500",children:"8.5"}),d.jsx("span",{className:"text-blue-400",children:"→"}),d.jsx("span",{className:"text-sm font-semibold text-green-400",children:"8.3"})]})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-300",children:"配碱量"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-slate-500",children:"220 kg/t"}),d.jsx("span",{className:"text-blue-400",children:"→"}),d.jsx("span",{className:"text-sm font-semibold text-green-400",children:"210 kg/t"})]})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-300",children:"溶出温度"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-slate-500",children:"245°C"}),d.jsx("span",{className:"text-blue-400",children:"→"}),d.jsx("span",{className:"text-sm font-semibold text-green-400",children:"243°C"})]})]})]})]}),d.jsxs("div",{className:"p-4 rounded-lg bg-green-500/10 border border-green-500/30",children:[d.jsx("div",{className:"font-semibold text-white mb-2",children:"预期收益"}),d.jsxs("ul",{className:"space-y-2 text-sm text-slate-300",children:[d.jsxs("li",{className:"flex items-center gap-2",children:[d.jsx(Ni,{className:"w-4 h-4 text-green-400"}),"溶出率提升94.2% → 94.8% (+0.6%)"]}),d.jsxs("li",{className:"flex items-center gap-2",children:[d.jsx(WM,{className:"w-4 h-4 text-green-400"}),"能耗降低:约 8%"]}),d.jsxs("li",{className:"flex items-center gap-2",children:[d.jsx(WM,{className:"w-4 h-4 text-green-400"}),"单吨成本降低:约 12 元"]})]})]})]},"results"):d.jsx(B.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"space-y-4",children:d.jsxs("div",{className:"p-4 rounded-lg bg-slate-800/30",children:[d.jsx("div",{className:"text-sm text-slate-300",children:'点击"开始优化"按钮,系统将:'}),d.jsxs("ul",{className:"mt-3 space-y-2 text-sm text-slate-400",children:[d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"分析当前工况参数"})]}),d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"检索相似历史案例"})]}),d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"计算多目标优化方案"})]}),d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-blue-400",children:"•"}),d.jsx("span",{children:"给出最佳参数建议"})]})]})]})},"waiting")})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"font-semibold text-white mb-4",children:"多目标优化对比"}),d.jsx(Ci,{width:"100%",height:300,children:d.jsxs(g0e,{data:ZMe,children:[d.jsx(p9,{stroke:"#334155"}),d.jsx(nf,{dataKey:"subject",stroke:"#94a3b8",fontSize:12}),d.jsx(tf,{angle:90,domain:[0,100],stroke:"#94a3b8",fontSize:10}),d.jsx(wd,{name:"当前状态",dataKey:"current",stroke:"#3b82f6",fill:"#3b82f6",fillOpacity:.3,strokeWidth:2}),d.jsx(wd,{name:"优化后",dataKey:"optimized",stroke:"#10b981",fill:"#10b981",fillOpacity:.3,strokeWidth:2})]})}),d.jsxs("div",{className:"flex items-center justify-center gap-6 mt-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),d.jsx("span",{className:"text-sm text-slate-400",children:"当前状态"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"}),d.jsx("span",{className:"text-sm text-slate-400",children:"优化后"})]})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"font-semibold text-white mb-4",children:"多目标优化模式"}),d.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[d.jsxs("button",{className:"p-4 rounded-lg bg-slate-800/50 hover:bg-gradient-to-br hover:from-blue-900/30 hover:to-cyan-900/30 border border-slate-700/50 hover:border-blue-500/30 transition-all text-left group",children:[d.jsx("div",{className:"font-medium text-white mb-1 group-hover:text-blue-400",children:"质量优先"}),d.jsx("div",{className:"text-xs text-slate-400",children:"最大化溶出率"})]}),d.jsxs("button",{className:"p-4 rounded-lg bg-gradient-to-br from-green-900/30 to-emerald-900/30 border-2 border-green-500/50 text-left",children:[d.jsxs("div",{className:"flex items-center justify-between mb-1",children:[d.jsx("div",{className:"font-medium text-green-400",children:"能耗优先"}),d.jsx("div",{className:"text-xs px-2 py-0.5 rounded-full bg-green-500/20 text-green-400",children:"当前"})]}),d.jsx("div",{className:"text-xs text-green-400/70",children:"最小化能源消耗"})]}),d.jsxs("button",{className:"p-4 rounded-lg bg-slate-800/50 hover:bg-gradient-to-br hover:from-purple-900/30 hover:to-pink-900/30 border border-slate-700/50 hover:border-purple-500/30 transition-all text-left group",children:[d.jsx("div",{className:"font-medium text-white mb-1 group-hover:text-purple-400",children:"成本优先"}),d.jsx("div",{className:"text-xs text-slate-400",children:"最小化生产成本"})]}),d.jsxs("button",{className:"p-4 rounded-lg bg-slate-800/50 hover:bg-gradient-to-br hover:from-orange-900/30 hover:to-red-900/30 border border-slate-700/50 hover:border-orange-500/30 transition-all text-left group",children:[d.jsx("div",{className:"font-medium text-white mb-1 group-hover:text-orange-400",children:"均衡模式"}),d.jsx("div",{className:"text-xs text-slate-400",children:"综合平衡各指标"})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"font-semibold text-white mb-4",children:"历史最优案例"}),d.jsx("div",{className:"space-y-3",children:JMe.map((m,g)=>d.jsxs("div",{className:"p-4 rounded-lg bg-slate-800/50 border border-slate-700/50 hover:border-slate-600/50 transition-colors",children:[d.jsxs("div",{className:"flex items-start justify-between mb-3",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium text-white mb-1",children:m.situation}),d.jsx("div",{className:"text-xs text-slate-400",children:m.date})]}),d.jsx("button",{className:"px-3 py-1 rounded-lg bg-blue-600/20 hover:bg-blue-600/30 text-xs text-blue-400 transition-colors",children:"应用"})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-400",children:"实际效果: "}),d.jsx("span",{className:"text-slate-300",children:m.result})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-400",children:"专家建议: "}),d.jsx("span",{className:"text-green-400",children:m.recommendation})]})]})]},g))})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"flex gap-4",children:[d.jsx("button",{className:"flex-1 px-6 py-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white font-medium border border-slate-700/50 transition-colors",children:"📊 查看历史案例"}),d.jsx("button",{className:"flex-1 px-6 py-3 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white font-medium border border-slate-700/50 transition-colors",children:"📄 生成操作指令"}),d.jsx("button",{className:"flex-1 px-6 py-3 rounded-lg bg-gradient-to-r from-green-600 to-emerald-600 text-white font-medium hover:shadow-lg hover:shadow-green-500/20 transition-all",children:"✓ 确认执行优化方案"})]})]})}const DU=[{id:1,name:"钢铁行业基础大模型",version:"v1.0",params:"7B",status:"deployed",accuracy:92,trainingData:"5TB",lastUpdated:"2027-06-30",framework:"PyTorch 2.0",gpuMemory:"24GB",inferenceSpeed:"45ms",requests:125680,trend:[88,89,91,90,92,92]},{id:2,name:"有色冶金行业基础大模型",version:"v1.0",params:"7B",status:"deployed",accuracy:89,trainingData:"5TB",lastUpdated:"2027-06-30",framework:"PyTorch 2.0",gpuMemory:"24GB",inferenceSpeed:"52ms",requests:98420,trend:[85,86,87,88,89,89]},{id:3,name:"高炉诊断专用模型",version:"v2.1",params:"3B",status:"training",accuracy:94,trainingData:"2TB",lastUpdated:"2027-07-15",framework:"TensorFlow 2.12",gpuMemory:"16GB",inferenceSpeed:"28ms",requests:45230,trend:[78,82,86,89,92,94]},{id:4,name:"连铸质量预测模型",version:"v1.2",params:"1.5B",status:"deployed",accuracy:96,trainingData:"800GB",lastUpdated:"2027-07-10",framework:"PyTorch 2.0",gpuMemory:"12GB",inferenceSpeed:"18ms",requests:234560,trend:[90,92,93,95,96,96]}],eEe=[{epoch:0,loss:2.5,accuracy:65},{epoch:20,loss:1.8,accuracy:75},{epoch:40,loss:1.2,accuracy:82},{epoch:60,loss:.6,accuracy:88},{epoch:80,loss:.3,accuracy:92},{epoch:100,loss:.15,accuracy:94}];function tEe(){const[t,e]=O.useState(DU[2]),[n,r]=O.useState(null),[i,a]=O.useState({x:0,y:0}),s=O.useRef([]),o=(l,h)=>{const f=s.current[h];if(!f)return;const m=f.getBoundingClientRect(),g=l.clientX-m.left,b=l.clientY-m.top,y=m.width/2,v=m.height/2,w=(b-v)/10,_=(y-g)/10;a({x:w,y:_})},c=()=>{a({x:0,y:0})};return d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"模型管理中心"}),d.jsx("p",{className:"text-sm text-slate-400",children:"大模型训练、部署与性能监控"})]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},className:"px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center gap-2",children:[d.jsx(Dy,{className:"w-5 h-5"}),"新建训练任务"]})]}),d.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{icon:gl,label:"模型总数",value:"12",color:"from-blue-500 to-cyan-500"},{icon:jg,label:"部署节点",value:"28",color:"from-purple-500 to-pink-500"},{icon:yr,label:"总请求量",value:"2.4M",color:"from-green-500 to-emerald-500"},{icon:Zh,label:"平均延迟",value:"36ms",color:"from-orange-500 to-red-500"}].map((l,h)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:h*.1},whileHover:{scale:1.05,y:-5},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-4",children:[d.jsx("div",{className:`absolute top-0 right-0 w-20 h-20 bg-gradient-to-br ${l.color} opacity-10 rounded-full blur-2xl`}),d.jsxs("div",{className:"relative flex items-center gap-4",children:[d.jsx("div",{className:`w-12 h-12 rounded-xl bg-gradient-to-br ${l.color} flex items-center justify-center`,children:d.jsx(l.icon,{className:"w-6 h-6 text-white"})}),d.jsxs("div",{children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:l.label}),d.jsx(B.div,{initial:{scale:1.2},animate:{scale:1},className:"text-2xl font-bold text-white",children:l.value})]})]})]},l.label))}),d.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-4 gap-6",children:DU.map((l,h)=>d.jsxs(B.div,{ref:f=>{f&&(s.current[h]=f)},initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:h*.1},whileHover:{scale:1.02},onHoverStart:()=>r(l.id),onHoverEnd:()=>r(null),onMouseMove:f=>o(f,h),onMouseLeave:c,onClick:()=>e(l),style:{transform:n===l.id?`perspective(1000px) rotateX(${i.x}deg) rotateY(${i.y}deg) scale(1.02)`:"none",transition:n===l.id?"transform 0.1s ease-out":"transform 0.3s ease-out"},className:`relative overflow-hidden rounded-xl backdrop-blur-sm p-6 cursor-pointer transition-all ${t.id===l.id?"bg-gradient-to-br from-blue-900/60 to-purple-900/60 border-2 border-blue-500/50 shadow-lg shadow-blue-500/20":"bg-slate-900/50 border border-slate-800/50 hover:border-slate-700/50"}`,children:[d.jsx("div",{className:"absolute inset-0 opacity-30",children:d.jsxs("svg",{className:"w-full h-full",preserveAspectRatio:"none",children:[d.jsx("defs",{children:d.jsxs("radialGradient",{id:`modelGradient${l.id}`,cx:"50%",cy:"50%",r:"50%",children:[d.jsx("stop",{offset:"0%",stopColor:l.status==="deployed"?"#10b981":"#f59e0b",stopOpacity:"0.3"}),d.jsx("stop",{offset:"100%",stopColor:"transparent",stopOpacity:"0"})]})}),d.jsx("rect",{width:"100%",height:"100%",fill:`url(#modelGradient${l.id})`})]})}),d.jsx("div",{className:"absolute top-4 right-4",children:l.status==="deployed"?d.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 rounded-full bg-green-500/20 border border-green-500/30",children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:1.5,repeat:1/0},className:"w-2 h-2 bg-green-500 rounded-full"}),d.jsx("span",{className:"text-xs text-green-400",children:"已部署"})]}):d.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 rounded-full bg-yellow-500/20 border border-yellow-500/30",children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:1.5,repeat:1/0},className:"w-2 h-2 bg-yellow-500 rounded-full"}),d.jsx("span",{className:"text-xs text-yellow-400",children:"训练中"})]})}),d.jsxs(B.div,{animate:n===l.id?{scale:[1,1.1,1]}:{},transition:{duration:2,repeat:n===l.id?1/0:0},className:`w-16 h-16 rounded-2xl mb-4 flex items-center justify-center relative ${l.status==="deployed"?"bg-gradient-to-br from-green-500/20 to-emerald-500/20":"bg-gradient-to-br from-yellow-500/20 to-orange-500/20"}`,children:[d.jsx(gl,{className:`w-8 h-8 ${l.status==="deployed"?"text-green-400":"text-yellow-400"}`}),l.status==="training"&&d.jsx(B.div,{animate:{rotate:360},transition:{duration:3,repeat:1/0,ease:"linear"},className:"absolute inset-0 border-2 border-dashed border-yellow-500/30 rounded-2xl"}),d.jsx("div",{className:`absolute inset-0 blur-xl opacity-50 ${l.status==="deployed"?"bg-green-500/20":"bg-yellow-500/20"}`})]}),d.jsxs("div",{className:"relative space-y-4",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-white mb-1 line-clamp-1",children:l.name}),d.jsxs("p",{className:"text-xs text-slate-400",children:[l.version," · ",l.framework]})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[d.jsxs("div",{className:"text-center p-2 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"参数量"}),d.jsx("div",{className:"text-sm font-semibold text-white",children:l.params})]}),d.jsxs("div",{className:"text-center p-2 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"GPU"}),d.jsx("div",{className:"text-sm font-semibold text-white",children:l.gpuMemory})]}),d.jsxs("div",{className:"text-center p-2 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"延迟"}),d.jsx("div",{className:"text-sm font-semibold text-cyan-400",children:l.inferenceSpeed})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center text-xs text-slate-400 mb-1",children:[d.jsx("span",{children:"准确率"}),d.jsxs(B.span,{initial:{scale:1.3,color:"#10b981"},animate:{scale:1,color:"#ffffff"},className:"font-semibold",children:[l.accuracy,"%"]},l.accuracy)]}),d.jsx("div",{className:"w-full h-2 bg-slate-800 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${l.accuracy}%`},transition:{delay:.5+h*.1,duration:1},className:"h-full bg-gradient-to-r from-green-500 to-emerald-500"})})]}),d.jsx("div",{className:"h-10 rounded-lg bg-slate-800/50 p-1 overflow-hidden",children:d.jsxs("svg",{className:"w-full h-full",preserveAspectRatio:"none",children:[d.jsx("defs",{children:d.jsxs("linearGradient",{id:`trendGradient${l.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3"}),d.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0"})]})}),d.jsx("path",{d:`M 0 ${40-l.trend[0]*.4} ${l.trend.map((f,m)=>`L ${m/(l.trend.length-1)*100} ${40-f*.4}`).join(" ")} L 100 40 L 0 40 Z`,fill:`url(#trendGradient${l.id})`}),d.jsx("path",{d:`M 0 ${40-l.trend[0]*.4} ${l.trend.map((f,m)=>`L ${m/(l.trend.length-1)*100} ${40-f*.4}`).join(" ")}`,fill:"none",stroke:"#10b981",strokeWidth:"2"}),d.jsx(B.circle,{initial:{scale:0},animate:{scale:1},transition:{delay:1+h*.1},cx:"100",cy:40-l.trend[l.trend.length-1]*.4,r:"3",fill:"#10b981"})]})}),d.jsxs("div",{className:"flex justify-between items-center text-xs text-slate-500",children:[d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(PB,{className:"w-3 h-3"}),d.jsx("span",{children:l.trainingData})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(yr,{className:"w-3 h-3"}),d.jsxs("span",{children:[(l.requests/1e3).toFixed(1),"K"]})]})]})]}),t.id===l.id&&d.jsx(B.div,{initial:{opacity:0},animate:{opacity:1},className:"absolute inset-0 border-2 border-blue-500/30 rounded-xl pointer-events-none",children:d.jsx(B.div,{animate:{boxShadow:["inset 0 0 20px rgba(59, 130, 246, 0.1)","inset 0 0 40px rgba(59, 130, 246, 0.2)","inset 0 0 20px rgba(59, 130, 246, 0.1)"]},transition:{duration:2,repeat:1/0},className:"absolute inset-0 rounded-xl"})})]},l.id))}),t&&d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"训练进度"}),t.status==="training"&&d.jsxs("div",{className:"flex gap-2",children:[d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>Ye.info("训练已暂停",{duration:2e3}),className:"p-2 rounded-lg bg-yellow-500/20 hover:bg-yellow-500/30 transition-colors",children:d.jsx(Qp,{className:"w-4 h-4 text-yellow-400"})}),d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>{Ye.promise(new Promise(l=>setTimeout(l,1e3)),{loading:"正在停止训练...",success:"训练已停止",error:"停止失败"})},className:"p-2 rounded-lg bg-red-500/20 hover:bg-red-500/30 transition-colors",children:d.jsx(IB,{className:"w-4 h-4 text-red-400"})})]})]}),t.status==="training"?d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"p-4 rounded-lg bg-slate-800/50",children:[d.jsxs("div",{className:"flex justify-between items-center mb-2",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"Epoch 68/100"}),d.jsx("span",{className:"text-sm text-blue-400",children:"68%"})]}),d.jsx("div",{className:"w-full h-2 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{className:"h-full bg-gradient-to-r from-blue-500 to-purple-500",initial:{width:0},animate:{width:"68%"},transition:{duration:1}})})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"Loss"}),d.jsx("div",{className:"text-lg font-bold text-white",children:"0.023"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"F1 Score"}),d.jsx("div",{className:"text-lg font-bold text-green-400",children:"0.91"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"ETA"}),d.jsx("div",{className:"text-lg font-bold text-blue-400",children:"2.5h"})]})]})]}):d.jsxs("div",{className:"text-center py-8",children:[d.jsx(Jp,{className:"w-12 h-12 text-green-400 mx-auto mb-3"}),d.jsx("p",{className:"text-sm text-slate-400",children:"模型已部署完成"})]}),d.jsx(Ci,{width:"100%",height:200,className:"mt-4",children:d.jsxs(Dd,{data:eEe,children:[d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"epoch",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),d.jsx(gi,{type:"monotone",dataKey:"accuracy",stroke:"#10b981",strokeWidth:2,dot:{r:3}}),d.jsx(gi,{type:"monotone",dataKey:"loss",stroke:"#ef4444",strokeWidth:2,dot:{r:3}})]})})]}),d.jsxs("div",{className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"模型详情"}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"p-4 rounded-lg bg-slate-800/50",children:[d.jsx("h3",{className:"text-sm font-medium text-white mb-3",children:"性能指标"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"准确率 (Accuracy)"}),d.jsxs("span",{className:"text-sm font-semibold text-green-400",children:[t.accuracy,"%"]})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"精确率 (Precision)"}),d.jsx("span",{className:"text-sm font-semibold text-green-400",children:"93%"})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"召回率 (Recall)"}),d.jsx("span",{className:"text-sm font-semibold text-green-400",children:"89%"})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"F1 分数"}),d.jsx("span",{className:"text-sm font-semibold text-green-400",children:"0.91"})]})]})]}),d.jsxs("div",{className:"p-4 rounded-lg bg-slate-800/50",children:[d.jsx("h3",{className:"text-sm font-medium text-white mb-3",children:"部署信息"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"推理延迟"}),d.jsx("span",{className:"text-sm font-semibold text-white",children:"320ms"})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"吞吐量"}),d.jsx("span",{className:"text-sm font-semibold text-white",children:"45 req/s"})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"GPU利用率"}),d.jsx("span",{className:"text-sm font-semibold text-white",children:"78%"})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"部署节点"}),d.jsx("span",{className:"text-sm font-semibold text-white",children:"3个"})]})]})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.promise(new Promise(l=>setTimeout(l,2e3)),{loading:"正在导出模型文件...",success:()=>"模型已导出到 /models/export/",error:"导出失败"})},className:"flex-1 px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white text-sm font-medium transition-colors flex items-center justify-center gap-2",children:[d.jsx(Fc,{className:"w-4 h-4"}),"导出模型"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.promise(new Promise(l=>setTimeout(l,2500)),{loading:"正在部署模型...",success:()=>"模型部署成功,已上线服务",error:"部署失败"})},className:"flex-1 px-4 py-2 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white text-sm font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:[d.jsx(Qr,{className:"w-4 h-4"}),"微调模型"]})]})]})]})]})]})}/**
* @license
* Copyright 2010-2026 Three.js Authors
* SPDX-License-Identifier: MIT
*/const aC="183",nEe=0,kU=1,rEe=2,Wh=1,sC=2,Ph=3,wl=0,Ri=1,os=2,co=0,id=1,QT=2,LU=3,FU=4,iEe=5,ac=100,aEe=101,sEe=102,oEe=103,lEe=104,cEe=200,uEe=201,dEe=202,fEe=203,eA=204,tA=205,hEe=206,pEe=207,mEe=208,gEe=209,vEe=210,yEe=211,xEe=212,bEe=213,wEe=214,nA=0,rA=1,iA=2,Bd=3,aA=4,sA=5,oA=6,lA=7,vG=0,_Ee=1,SEe=2,xs=0,yG=1,xG=2,bG=3,oC=4,wG=5,_G=6,SG=7,MG=300,Dc=301,zd=302,Q2=303,eM=304,Mx=306,cA=1e3,so=1001,uA=1002,Fr=1003,MEe=1004,Q0=1005,Jr=1006,tM=1007,mc=1008,Wi=1009,EG=1010,TG=1011,Vp=1012,lC=1013,Ts=1014,ds=1015,vo=1016,cC=1017,uC=1018,Hp=1020,AG=35902,NG=35899,PG=1021,CG=1022,za=1023,yo=1026,gc=1027,RG=1028,dC=1029,$d=1030,fC=1031,hC=1033,Xg=33776,Kg=33777,Yg=33778,Zg=33779,dA=35840,fA=35841,hA=35842,pA=35843,mA=36196,gA=37492,vA=37496,yA=37488,xA=37489,bA=37490,wA=37491,_A=37808,SA=37809,MA=37810,EA=37811,TA=37812,AA=37813,NA=37814,PA=37815,CA=37816,RA=37817,jA=37818,OA=37819,IA=37820,DA=37821,kA=36492,LA=36494,FA=36495,UA=36283,BA=36284,zA=36285,$A=36286,EEe=3200,jG=0,TEe=1,al="",fa="srgb",Vd="srgb-linear",My="linear",Pn="srgb",wu=7680,UU=519,AEe=512,NEe=513,PEe=514,pC=515,CEe=516,REe=517,mC=518,jEe=519,VA=35044,BU="300 es",fs=2e3,Gp=2001;function OEe(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Ey(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function IEe(){const t=Ey("canvas");return t.style.display="block",t}const zU={};function Ty(...t){const e="THREE."+t.shift();console.log(e,...t)}function OG(t){const e=t[0];if(typeof e=="string"&&e.startsWith("TSL:")){const n=t[1];n&&n.isStackTrace?t[0]+=" "+n.getLocation():t[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return t}function Jt(...t){t=OG(t);const e="THREE."+t.shift();{const n=t[0];n&&n.isStackTrace?console.warn(n.getError(e)):console.warn(e,...t)}}function pn(...t){t=OG(t);const e="THREE."+t.shift();{const n=t[0];n&&n.isStackTrace?console.error(n.getError(e)):console.error(e,...t)}}function Ay(...t){const e=t.join(" ");e in zU||(zU[e]=!0,Jt(...t))}function DEe(t,e,n){return new Promise(function(r,i){function a(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}}setTimeout(a,n)})}const kEe={[nA]:rA,[iA]:oA,[aA]:lA,[Bd]:sA,[rA]:nA,[oA]:iA,[lA]:aA,[sA]:Bd};class df{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){const r=this._listeners;return r===void 0?!1:r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){const r=this._listeners;if(r===void 0)return;const i=r[e];if(i!==void 0){const a=i.indexOf(n);a!==-1&&i.splice(a,1)}}dispatchEvent(e){const n=this._listeners;if(n===void 0)return;const r=n[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let a=0,s=i.length;a<s;a++)i[a].call(this,e);e.target=null}}}const qr=["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"],nM=Math.PI/180,HA=180/Math.PI;function ml(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(qr[t&255]+qr[t>>8&255]+qr[t>>16&255]+qr[t>>24&255]+"-"+qr[e&255]+qr[e>>8&255]+"-"+qr[e>>16&15|64]+qr[e>>24&255]+"-"+qr[n&63|128]+qr[n>>8&255]+"-"+qr[n>>16&255]+qr[n>>24&255]+qr[r&255]+qr[r>>8&255]+qr[r>>16&255]+qr[r>>24&255]).toLowerCase()}function dn(t,e,n){return Math.max(e,Math.min(n,t))}function LEe(t,e){return(t%e+e)%e}function rM(t,e,n){return(1-n)*t+n*e}function ls(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 Cn(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 nn{constructor(e=0,n=0){nn.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[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=dn(this.x,e.x,n.x),this.y=dn(this.y,e.y,n.y),this}clampScalar(e,n){return this.x=dn(this.x,e,n),this.y=dn(this.y,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(dn(r,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 r=this.dot(e)/n;return Math.acos(dn(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}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,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,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 r=Math.cos(n),i=Math.sin(n),a=this.x-e.x,s=this.y-e.y;return this.x=a*r-s*i+e.x,this.y=a*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ff{constructor(e=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=r,this._w=i}static slerpFlat(e,n,r,i,a,s,o){let c=r[i+0],l=r[i+1],h=r[i+2],f=r[i+3],m=a[s+0],g=a[s+1],b=a[s+2],y=a[s+3];if(f!==y||c!==m||l!==g||h!==b){let v=c*m+l*g+h*b+f*y;v<0&&(m=-m,g=-g,b=-b,y=-y,v=-v);let w=1-o;if(v<.9995){const _=Math.acos(v),E=Math.sin(_);w=Math.sin(w*_)/E,o=Math.sin(o*_)/E,c=c*w+m*o,l=l*w+g*o,h=h*w+b*o,f=f*w+y*o}else{c=c*w+m*o,l=l*w+g*o,h=h*w+b*o,f=f*w+y*o;const _=1/Math.sqrt(c*c+l*l+h*h+f*f);c*=_,l*=_,h*=_,f*=_}}e[n]=c,e[n+1]=l,e[n+2]=h,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,a,s){const o=r[i],c=r[i+1],l=r[i+2],h=r[i+3],f=a[s],m=a[s+1],g=a[s+2],b=a[s+3];return e[n]=o*b+h*f+c*g-l*m,e[n+1]=c*b+h*m+l*f-o*g,e[n+2]=l*b+h*g+o*m-c*f,e[n+3]=h*b-o*f-c*m-l*g,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,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,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 r=e._x,i=e._y,a=e._z,s=e._order,o=Math.cos,c=Math.sin,l=o(r/2),h=o(i/2),f=o(a/2),m=c(r/2),g=c(i/2),b=c(a/2);switch(s){case"XYZ":this._x=m*h*f+l*g*b,this._y=l*g*f-m*h*b,this._z=l*h*b+m*g*f,this._w=l*h*f-m*g*b;break;case"YXZ":this._x=m*h*f+l*g*b,this._y=l*g*f-m*h*b,this._z=l*h*b-m*g*f,this._w=l*h*f+m*g*b;break;case"ZXY":this._x=m*h*f-l*g*b,this._y=l*g*f+m*h*b,this._z=l*h*b+m*g*f,this._w=l*h*f-m*g*b;break;case"ZYX":this._x=m*h*f-l*g*b,this._y=l*g*f+m*h*b,this._z=l*h*b-m*g*f,this._w=l*h*f+m*g*b;break;case"YZX":this._x=m*h*f+l*g*b,this._y=l*g*f+m*h*b,this._z=l*h*b-m*g*f,this._w=l*h*f-m*g*b;break;case"XZY":this._x=m*h*f-l*g*b,this._y=l*g*f-m*h*b,this._z=l*h*b+m*g*f,this._w=l*h*f+m*g*b;break;default:Jt("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],a=n[8],s=n[1],o=n[5],c=n[9],l=n[2],h=n[6],f=n[10],m=r+o+f;if(m>0){const g=.5/Math.sqrt(m+1);this._w=.25/g,this._x=(h-c)*g,this._y=(a-l)*g,this._z=(s-i)*g}else if(r>o&&r>f){const g=2*Math.sqrt(1+r-o-f);this._w=(h-c)/g,this._x=.25*g,this._y=(i+s)/g,this._z=(a+l)/g}else if(o>f){const g=2*Math.sqrt(1+o-r-f);this._w=(a-l)/g,this._x=(i+s)/g,this._y=.25*g,this._z=(c+h)/g}else{const g=2*Math.sqrt(1+f-r-o);this._w=(s-i)/g,this._x=(a+l)/g,this._y=(c+h)/g,this._z=.25*g}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return r<1e-8?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(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=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(dn(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),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 r=e._x,i=e._y,a=e._z,s=e._w,o=n._x,c=n._y,l=n._z,h=n._w;return this._x=r*h+s*o+i*l-a*c,this._y=i*h+s*c+a*o-r*l,this._z=a*h+s*l+r*c-i*o,this._w=s*h-r*o-i*c-a*l,this._onChangeCallback(),this}slerp(e,n){let r=e._x,i=e._y,a=e._z,s=e._w,o=this.dot(e);o<0&&(r=-r,i=-i,a=-a,s=-s,o=-o);let c=1-n;if(o<.9995){const l=Math.acos(o),h=Math.sin(l);c=Math.sin(c*l)/h,n=Math.sin(n*l)/h,this._x=this._x*c+r*n,this._y=this._y*c+i*n,this._z=this._z*c+a*n,this._w=this._w*c+s*n,this._onChangeCallback()}else this._x=this._x*c+r*n,this._y=this._y*c+i*n,this._z=this._z*c+a*n,this._w=this._w*c+s*n,this.normalize();return this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),a=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),a*Math.sin(n),a*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 me{constructor(e=0,n=0,r=0){me.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion($U.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion($U.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,a=e.elements;return this.x=a[0]*n+a[3]*r+a[6]*i,this.y=a[1]*n+a[4]*r+a[7]*i,this.z=a[2]*n+a[5]*r+a[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,a=e.elements,s=1/(a[3]*n+a[7]*r+a[11]*i+a[15]);return this.x=(a[0]*n+a[4]*r+a[8]*i+a[12])*s,this.y=(a[1]*n+a[5]*r+a[9]*i+a[13])*s,this.z=(a[2]*n+a[6]*r+a[10]*i+a[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,a=e.x,s=e.y,o=e.z,c=e.w,l=2*(s*i-o*r),h=2*(o*n-a*i),f=2*(a*r-s*n);return this.x=n+c*l+s*f-o*h,this.y=r+c*h+o*l-a*f,this.z=i+c*f+a*h-s*l,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,r=this.y,i=this.z,a=e.elements;return this.x=a[0]*n+a[4]*r+a[8]*i,this.y=a[1]*n+a[5]*r+a[9]*i,this.z=a[2]*n+a[6]*r+a[10]*i,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=dn(this.x,e.x,n.x),this.y=dn(this.y,e.y,n.y),this.z=dn(this.z,e.z,n.z),this}clampScalar(e,n){return this.x=dn(this.x,e,n),this.y=dn(this.y,e,n),this.z=dn(this.z,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(dn(r,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,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,a=e.z,s=n.x,o=n.y,c=n.z;return this.x=i*c-a*o,this.y=a*s-r*c,this.z=r*o-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return iM.copy(this).projectOnVector(e),this.sub(iM)}reflect(e){return this.sub(iM.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 r=this.dot(e)/n;return Math.acos(dn(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}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,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,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(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,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,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(e),this.y=n,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const iM=new me,$U=new ff;class tn{constructor(e,n,r,i,a,s,o,c,l){tn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,a,s,o,c,l)}set(e,n,r,i,a,s,o,c,l){const h=this.elements;return h[0]=e,h[1]=i,h[2]=o,h[3]=n,h[4]=a,h[5]=c,h[6]=r,h[7]=s,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.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 r=e.elements,i=n.elements,a=this.elements,s=r[0],o=r[3],c=r[6],l=r[1],h=r[4],f=r[7],m=r[2],g=r[5],b=r[8],y=i[0],v=i[3],w=i[6],_=i[1],E=i[4],M=i[7],T=i[2],A=i[5],N=i[8];return a[0]=s*y+o*_+c*T,a[3]=s*v+o*E+c*A,a[6]=s*w+o*M+c*N,a[1]=l*y+h*_+f*T,a[4]=l*v+h*E+f*A,a[7]=l*w+h*M+f*N,a[2]=m*y+g*_+b*T,a[5]=m*v+g*E+b*A,a[8]=m*w+g*M+b*N,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],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],c=e[6],l=e[7],h=e[8];return n*s*h-n*o*l-r*a*h+r*o*c+i*a*l-i*s*c}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],c=e[6],l=e[7],h=e[8],f=h*s-o*l,m=o*c-h*a,g=l*a-s*c,b=n*f+r*m+i*g;if(b===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/b;return e[0]=f*y,e[1]=(i*l-h*r)*y,e[2]=(o*r-i*s)*y,e[3]=m*y,e[4]=(h*n-i*c)*y,e[5]=(i*a-o*n)*y,e[6]=g*y,e[7]=(r*c-l*n)*y,e[8]=(s*n-r*a)*y,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,r,i,a,s,o){const c=Math.cos(a),l=Math.sin(a);return this.set(r*c,r*l,-r*(c*s+l*o)+s+e,-i*l,i*c,-i*(-l*s+c*o)+o+n,0,0,1),this}scale(e,n){return this.premultiply(aM.makeScale(e,n)),this}rotate(e){return this.premultiply(aM.makeRotation(-e)),this}translate(e,n){return this.premultiply(aM.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),r=Math.sin(e);return this.set(n,-r,0,r,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,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const aM=new tn,VU=new tn().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),HU=new tn().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function FEe(){const t={enabled:!0,workingColorSpace:Vd,spaces:{},convert:function(i,a,s){return this.enabled===!1||a===s||!a||!s||(this.spaces[a].transfer===Pn&&(i.r=uo(i.r),i.g=uo(i.g),i.b=uo(i.b)),this.spaces[a].primaries!==this.spaces[s].primaries&&(i.applyMatrix3(this.spaces[a].toXYZ),i.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===Pn&&(i.r=ad(i.r),i.g=ad(i.g),i.b=ad(i.b))),i},workingToColorSpace:function(i,a){return this.convert(i,this.workingColorSpace,a)},colorSpaceToWorking:function(i,a){return this.convert(i,a,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===al?My:this.spaces[i].transfer},getToneMappingMode:function(i){return this.spaces[i].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(i,a=this.workingColorSpace){return i.fromArray(this.spaces[a].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,a,s){return i.copy(this.spaces[a].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,a){return Ay("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),t.workingToColorSpace(i,a)},toWorkingColorSpace:function(i,a){return Ay("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),t.colorSpaceToWorking(i,a)}},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return t.define({[Vd]:{primaries:e,whitePoint:r,transfer:My,toXYZ:VU,fromXYZ:HU,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:fa},outputColorSpaceConfig:{drawingBufferColorSpace:fa}},[fa]:{primaries:e,whitePoint:r,transfer:Pn,toXYZ:VU,fromXYZ:HU,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:fa}}}),t}const vn=FEe();function uo(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function ad(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let _u;class UEe{static getDataURL(e,n="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let r;if(e instanceof HTMLCanvasElement)r=e;else{_u===void 0&&(_u=Ey("canvas")),_u.width=e.width,_u.height=e.height;const i=_u.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),r=_u}return r.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=Ey("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),a=i.data;for(let s=0;s<a.length;s++)a[s]=uo(a[s]/255)*255;return r.putImageData(i,0,0),n}else if(e.data){const n=e.data.slice(0);for(let r=0;r<n.length;r++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[r]=Math.floor(uo(n[r]/255)*255):n[r]=uo(n[r]);return{data:n,width:e.width,height:e.height}}else return Jt("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let BEe=0;class gC{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:BEe++}),this.uuid=ml(),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):typeof VideoFrame<"u"&&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 r={uuid:this.uuid,url:""},i=this.data;if(i!==null){let a;if(Array.isArray(i)){a=[];for(let s=0,o=i.length;s<o;s++)i[s].isDataTexture?a.push(sM(i[s].image)):a.push(sM(i[s]))}else a=sM(i);r.url=a}return n||(e.images[this.uuid]=r),r}}function sM(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?UEe.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(Jt("Texture: Unable to serialize Texture."),{})}let zEe=0;const oM=new me;class vi extends df{constructor(e=vi.DEFAULT_IMAGE,n=vi.DEFAULT_MAPPING,r=so,i=so,a=Jr,s=mc,o=za,c=Wi,l=vi.DEFAULT_ANISOTROPY,h=al){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:zEe++}),this.uuid=ml(),this.name="",this.source=new gC(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=a,this.minFilter=s,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=c,this.offset=new nn(0,0),this.repeat=new nn(1,1),this.center=new nn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new tn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,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(oM).x}get height(){return this.source.getSize(oM).y}get depth(){return this.source.getSize(oM).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 r=e[n];if(r===void 0){Jt(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){Jt(`Texture.setValues(): property '${n}' does not exist.`);continue}i&&r&&i.isVector2&&r.isVector2||i&&r&&i.isVector3&&r.isVector3||i&&r&&i.isMatrix3&&r.isMatrix3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const r={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&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==MG)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case cA:e.x=e.x-Math.floor(e.x);break;case so:e.x=e.x<0?0:1;break;case uA: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 cA:e.y=e.y-Math.floor(e.y);break;case so:e.y=e.y<0?0:1;break;case uA: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++}}vi.DEFAULT_IMAGE=null;vi.DEFAULT_MAPPING=MG;vi.DEFAULT_ANISOTROPY=1;class nr{constructor(e=0,n=0,r=0,i=1){nr.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}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,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,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,r=this.y,i=this.z,a=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*a,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*a,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*a,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*a,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,r,i,a;const c=e.elements,l=c[0],h=c[4],f=c[8],m=c[1],g=c[5],b=c[9],y=c[2],v=c[6],w=c[10];if(Math.abs(h-m)<.01&&Math.abs(f-y)<.01&&Math.abs(b-v)<.01){if(Math.abs(h+m)<.1&&Math.abs(f+y)<.1&&Math.abs(b+v)<.1&&Math.abs(l+g+w-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const E=(l+1)/2,M=(g+1)/2,T=(w+1)/2,A=(h+m)/4,N=(f+y)/4,P=(b+v)/4;return E>M&&E>T?E<.01?(r=0,i=.707106781,a=.707106781):(r=Math.sqrt(E),i=A/r,a=N/r):M>T?M<.01?(r=.707106781,i=0,a=.707106781):(i=Math.sqrt(M),r=A/i,a=P/i):T<.01?(r=.707106781,i=.707106781,a=0):(a=Math.sqrt(T),r=N/a,i=P/a),this.set(r,i,a,n),this}let _=Math.sqrt((v-b)*(v-b)+(f-y)*(f-y)+(m-h)*(m-h));return Math.abs(_)<.001&&(_=1),this.x=(v-b)/_,this.y=(f-y)/_,this.z=(m-h)/_,this.w=Math.acos((l+g+w-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=dn(this.x,e.x,n.x),this.y=dn(this.y,e.y,n.y),this.z=dn(this.z,e.z,n.z),this.w=dn(this.w,e.w,n.w),this}clampScalar(e,n){return this.x=dn(this.x,e,n),this.y=dn(this.y,e,n),this.z=dn(this.z,e,n),this.w=dn(this.w,e,n),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(dn(r,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,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,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 $Ee extends df{constructor(e=1,n=1,r={}){super(),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Jr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},r),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=r.depth,this.scissor=new nr(0,0,e,n),this.scissorTest=!1,this.viewport=new nr(0,0,e,n),this.textures=[];const i={width:e,height:n,depth:r.depth},a=new vi(i),s=r.count;for(let o=0;o<s;o++)this.textures[o]=a.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].renderTarget=this;this._setTextureOptions(r),this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.resolveDepthBuffer=r.resolveDepthBuffer,this.resolveStencilBuffer=r.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=r.depthTexture,this.samples=r.samples,this.multiview=r.multiview}_setTextureOptions(e={}){const n={minFilter:Jr,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 r=0;r<this.textures.length;r++)this.textures[r].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,r=1){if(this.width!==e||this.height!==n||this.depth!==r){this.width=e,this.height=n,this.depth=r;for(let i=0,a=this.textures.length;i<a;i++)this.textures[i].image.width=e,this.textures[i].image.height=n,this.textures[i].image.depth=r,this.textures[i].isData3DTexture!==!0&&(this.textures[i].isArrayTexture=this.textures[i].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,r=e.textures.length;n<r;n++){this.textures[n]=e.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0,this.textures[n].renderTarget=this;const i=Object.assign({},e.textures[n].image);this.textures[n].source=new gC(i)}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 bs extends $Ee{constructor(e=1,n=1,r={}){super(e,n,r),this.isWebGLRenderTarget=!0}}class IG extends vi{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=Fr,this.minFilter=Fr,this.wrapR=so,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class VEe extends vi{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=Fr,this.minFilter=Fr,this.wrapR=so,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Ln{constructor(e,n,r,i,a,s,o,c,l,h,f,m,g,b,y,v){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,r,i,a,s,o,c,l,h,f,m,g,b,y,v)}set(e,n,r,i,a,s,o,c,l,h,f,m,g,b,y,v){const w=this.elements;return w[0]=e,w[4]=n,w[8]=r,w[12]=i,w[1]=a,w[5]=s,w[9]=o,w[13]=c,w[2]=l,w[6]=h,w[10]=f,w[14]=m,w[3]=g,w[7]=b,w[11]=y,w[15]=v,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,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[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,r){return this.determinant()===0?(e.set(1,0,0),n.set(0,1,0),r.set(0,0,1),this):(e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this)}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const n=this.elements,r=e.elements,i=1/Su.setFromMatrixColumn(e,0).length(),a=1/Su.setFromMatrixColumn(e,1).length(),s=1/Su.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*a,n[5]=r[5]*a,n[6]=r[6]*a,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,a=e.z,s=Math.cos(r),o=Math.sin(r),c=Math.cos(i),l=Math.sin(i),h=Math.cos(a),f=Math.sin(a);if(e.order==="XYZ"){const m=s*h,g=s*f,b=o*h,y=o*f;n[0]=c*h,n[4]=-c*f,n[8]=l,n[1]=g+b*l,n[5]=m-y*l,n[9]=-o*c,n[2]=y-m*l,n[6]=b+g*l,n[10]=s*c}else if(e.order==="YXZ"){const m=c*h,g=c*f,b=l*h,y=l*f;n[0]=m+y*o,n[4]=b*o-g,n[8]=s*l,n[1]=s*f,n[5]=s*h,n[9]=-o,n[2]=g*o-b,n[6]=y+m*o,n[10]=s*c}else if(e.order==="ZXY"){const m=c*h,g=c*f,b=l*h,y=l*f;n[0]=m-y*o,n[4]=-s*f,n[8]=b+g*o,n[1]=g+b*o,n[5]=s*h,n[9]=y-m*o,n[2]=-s*l,n[6]=o,n[10]=s*c}else if(e.order==="ZYX"){const m=s*h,g=s*f,b=o*h,y=o*f;n[0]=c*h,n[4]=b*l-g,n[8]=m*l+y,n[1]=c*f,n[5]=y*l+m,n[9]=g*l-b,n[2]=-l,n[6]=o*c,n[10]=s*c}else if(e.order==="YZX"){const m=s*c,g=s*l,b=o*c,y=o*l;n[0]=c*h,n[4]=y-m*f,n[8]=b*f+g,n[1]=f,n[5]=s*h,n[9]=-o*h,n[2]=-l*h,n[6]=g*f+b,n[10]=m-y*f}else if(e.order==="XZY"){const m=s*c,g=s*l,b=o*c,y=o*l;n[0]=c*h,n[4]=-f,n[8]=l*h,n[1]=m*f+y,n[5]=s*h,n[9]=g*f-b,n[2]=b*f-g,n[6]=o*h,n[10]=y*f+m}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(HEe,e,GEe)}lookAt(e,n,r){const i=this.elements;return Ui.subVectors(e,n),Ui.lengthSq()===0&&(Ui.z=1),Ui.normalize(),Go.crossVectors(r,Ui),Go.lengthSq()===0&&(Math.abs(r.z)===1?Ui.x+=1e-4:Ui.z+=1e-4,Ui.normalize(),Go.crossVectors(r,Ui)),Go.normalize(),eg.crossVectors(Ui,Go),i[0]=Go.x,i[4]=eg.x,i[8]=Ui.x,i[1]=Go.y,i[5]=eg.y,i[9]=Ui.y,i[2]=Go.z,i[6]=eg.z,i[10]=Ui.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,a=this.elements,s=r[0],o=r[4],c=r[8],l=r[12],h=r[1],f=r[5],m=r[9],g=r[13],b=r[2],y=r[6],v=r[10],w=r[14],_=r[3],E=r[7],M=r[11],T=r[15],A=i[0],N=i[4],P=i[8],R=i[12],F=i[1],D=i[5],L=i[9],q=i[13],I=i[2],U=i[6],k=i[10],V=i[14],$=i[3],Y=i[7],J=i[11],W=i[15];return a[0]=s*A+o*F+c*I+l*$,a[4]=s*N+o*D+c*U+l*Y,a[8]=s*P+o*L+c*k+l*J,a[12]=s*R+o*q+c*V+l*W,a[1]=h*A+f*F+m*I+g*$,a[5]=h*N+f*D+m*U+g*Y,a[9]=h*P+f*L+m*k+g*J,a[13]=h*R+f*q+m*V+g*W,a[2]=b*A+y*F+v*I+w*$,a[6]=b*N+y*D+v*U+w*Y,a[10]=b*P+y*L+v*k+w*J,a[14]=b*R+y*q+v*V+w*W,a[3]=_*A+E*F+M*I+T*$,a[7]=_*N+E*D+M*U+T*Y,a[11]=_*P+E*L+M*k+T*J,a[15]=_*R+E*q+M*V+T*W,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],r=e[4],i=e[8],a=e[12],s=e[1],o=e[5],c=e[9],l=e[13],h=e[2],f=e[6],m=e[10],g=e[14],b=e[3],y=e[7],v=e[11],w=e[15],_=c*g-l*m,E=o*g-l*f,M=o*m-c*f,T=s*g-l*h,A=s*m-c*h,N=s*f-o*h;return n*(y*_-v*E+w*M)-r*(b*_-v*T+w*A)+i*(b*E-y*T+w*N)-a*(b*M-y*A+v*N)}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,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],c=e[6],l=e[7],h=e[8],f=e[9],m=e[10],g=e[11],b=e[12],y=e[13],v=e[14],w=e[15],_=n*o-r*s,E=n*c-i*s,M=n*l-a*s,T=r*c-i*o,A=r*l-a*o,N=i*l-a*c,P=h*y-f*b,R=h*v-m*b,F=h*w-g*b,D=f*v-m*y,L=f*w-g*y,q=m*w-g*v,I=_*q-E*L+M*D+T*F-A*R+N*P;if(I===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const U=1/I;return e[0]=(o*q-c*L+l*D)*U,e[1]=(i*L-r*q-a*D)*U,e[2]=(y*N-v*A+w*T)*U,e[3]=(m*A-f*N-g*T)*U,e[4]=(c*F-s*q-l*R)*U,e[5]=(n*q-i*F+a*R)*U,e[6]=(v*M-b*N-w*E)*U,e[7]=(h*N-m*M+g*E)*U,e[8]=(s*L-o*F+l*P)*U,e[9]=(r*F-n*L-a*P)*U,e[10]=(b*A-y*M+w*_)*U,e[11]=(f*M-h*A-g*_)*U,e[12]=(o*R-s*D-c*P)*U,e[13]=(n*D-r*R+i*P)*U,e[14]=(y*E-b*T-v*_)*U,e[15]=(h*T-f*E+m*_)*U,this}scale(e){const n=this.elements,r=e.x,i=e.y,a=e.z;return n[0]*=r,n[4]*=i,n[8]*=a,n[1]*=r,n[5]*=i,n[9]*=a,n[2]*=r,n[6]*=i,n[10]*=a,n[3]*=r,n[7]*=i,n[11]*=a,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){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,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),a=1-r,s=e.x,o=e.y,c=e.z,l=a*s,h=a*o;return this.set(l*s+r,l*o-i*c,l*c+i*o,0,l*o+i*c,h*o+r,h*c-i*s,0,l*c-i*o,h*c+i*s,a*c*c+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,a,s){return this.set(1,r,a,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,a=n._x,s=n._y,o=n._z,c=n._w,l=a+a,h=s+s,f=o+o,m=a*l,g=a*h,b=a*f,y=s*h,v=s*f,w=o*f,_=c*l,E=c*h,M=c*f,T=r.x,A=r.y,N=r.z;return i[0]=(1-(y+w))*T,i[1]=(g+M)*T,i[2]=(b-E)*T,i[3]=0,i[4]=(g-M)*A,i[5]=(1-(m+w))*A,i[6]=(v+_)*A,i[7]=0,i[8]=(b+E)*N,i[9]=(v-_)*N,i[10]=(1-(m+y))*N,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;e.x=i[12],e.y=i[13],e.z=i[14];const a=this.determinant();if(a===0)return r.set(1,1,1),n.identity(),this;let s=Su.set(i[0],i[1],i[2]).length();const o=Su.set(i[4],i[5],i[6]).length(),c=Su.set(i[8],i[9],i[10]).length();a<0&&(s=-s),Oa.copy(this);const l=1/s,h=1/o,f=1/c;return Oa.elements[0]*=l,Oa.elements[1]*=l,Oa.elements[2]*=l,Oa.elements[4]*=h,Oa.elements[5]*=h,Oa.elements[6]*=h,Oa.elements[8]*=f,Oa.elements[9]*=f,Oa.elements[10]*=f,n.setFromRotationMatrix(Oa),r.x=s,r.y=o,r.z=c,this}makePerspective(e,n,r,i,a,s,o=fs,c=!1){const l=this.elements,h=2*a/(n-e),f=2*a/(r-i),m=(n+e)/(n-e),g=(r+i)/(r-i);let b,y;if(c)b=a/(s-a),y=s*a/(s-a);else if(o===fs)b=-(s+a)/(s-a),y=-2*s*a/(s-a);else if(o===Gp)b=-s/(s-a),y=-s*a/(s-a);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=h,l[4]=0,l[8]=m,l[12]=0,l[1]=0,l[5]=f,l[9]=g,l[13]=0,l[2]=0,l[6]=0,l[10]=b,l[14]=y,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,a,s,o=fs,c=!1){const l=this.elements,h=2/(n-e),f=2/(r-i),m=-(n+e)/(n-e),g=-(r+i)/(r-i);let b,y;if(c)b=1/(s-a),y=s/(s-a);else if(o===fs)b=-2/(s-a),y=-(s+a)/(s-a);else if(o===Gp)b=-1/(s-a),y=-a/(s-a);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=h,l[4]=0,l[8]=0,l[12]=m,l[1]=0,l[5]=f,l[9]=0,l[13]=g,l[2]=0,l[6]=0,l[10]=b,l[14]=y,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const Su=new me,Oa=new Ln,HEe=new me(0,0,0),GEe=new me(1,1,1),Go=new me,eg=new me,Ui=new me,GU=new Ln,WU=new ff;class As{constructor(e=0,n=0,r=0,i=As.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}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,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,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,r=!0){const i=e.elements,a=i[0],s=i[4],o=i[8],c=i[1],l=i[5],h=i[9],f=i[2],m=i[6],g=i[10];switch(n){case"XYZ":this._y=Math.asin(dn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(m,l),this._z=0);break;case"YXZ":this._x=Math.asin(-dn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,g),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,a),this._z=0);break;case"ZXY":this._x=Math.asin(dn(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-f,g),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(c,a));break;case"ZYX":this._y=Math.asin(-dn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(m,g),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(dn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-f,a)):(this._x=0,this._y=Math.atan2(o,g));break;case"XZY":this._z=Math.asin(-dn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(m,l),this._y=Math.atan2(o,a)):(this._x=Math.atan2(-h,g),this._y=0);break;default:Jt("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return GU.makeRotationFromQuaternion(e),this.setFromRotationMatrix(GU,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return WU.setFromEuler(this),this.setFromQuaternion(WU,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}}As.DEFAULT_ORDER="XYZ";class vC{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let WEe=0;const qU=new me,Mu=new ff,qs=new Ln,tg=new me,ch=new me,qEe=new me,XEe=new ff,XU=new me(1,0,0),KU=new me(0,1,0),YU=new me(0,0,1),ZU={type:"added"},KEe={type:"removed"},Eu={type:"childadded",child:null},lM={type:"childremoved",child:null};class br extends df{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:WEe++}),this.uuid=ml(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=br.DEFAULT_UP.clone();const e=new me,n=new As,r=new ff,i=new me(1,1,1);function a(){r.setFromEuler(n,!1)}function s(){n.setFromQuaternion(r,void 0,!1)}n._onChange(a),r._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Ln},normalMatrix:{value:new tn}}),this.matrix=new Ln,this.matrixWorld=new Ln,this.matrixAutoUpdate=br.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=br.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new vC,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.static=!1,this.userData={},this.pivot=null}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 Mu.setFromAxisAngle(e,n),this.quaternion.multiply(Mu),this}rotateOnWorldAxis(e,n){return Mu.setFromAxisAngle(e,n),this.quaternion.premultiply(Mu),this}rotateX(e){return this.rotateOnAxis(XU,e)}rotateY(e){return this.rotateOnAxis(KU,e)}rotateZ(e){return this.rotateOnAxis(YU,e)}translateOnAxis(e,n){return qU.copy(e).applyQuaternion(this.quaternion),this.position.add(qU.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(XU,e)}translateY(e){return this.translateOnAxis(KU,e)}translateZ(e){return this.translateOnAxis(YU,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(qs.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?tg.copy(e):tg.set(e,n,r);const i=this.parent;this.updateWorldMatrix(!0,!1),ch.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?qs.lookAt(ch,tg,this.up):qs.lookAt(tg,ch,this.up),this.quaternion.setFromRotationMatrix(qs),i&&(qs.extractRotation(i.matrixWorld),Mu.setFromRotationMatrix(qs),this.quaternion.premultiply(Mu.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(pn("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(ZU),Eu.child=e,this.dispatchEvent(Eu),Eu.child=null):pn("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(KEe),lM.child=e,this.dispatchEvent(lM),lM.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),qs.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),qs.multiply(e.parent.matrixWorld)),e.applyMatrix4(qs),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(ZU),Eu.child=e,this.dispatchEvent(Eu),Eu.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 r=0,i=this.children.length;r<i;r++){const s=this.children[r].getObjectByProperty(e,n);if(s!==void 0)return s}}getObjectsByProperty(e,n,r=[]){this[e]===n&&r.push(this);const i=this.children;for(let a=0,s=i.length;a<s;a++)i[a].getObjectsByProperty(e,n,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ch,e,qEe),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ch,XEe,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 r=0,i=n.length;r<i;r++)n[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].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);const e=this.pivot;if(e!==null){const n=e.x,r=e.y,i=e.z,a=this.matrix.elements;a[12]+=n-a[0]*n-a[4]*r-a[8]*i,a[13]+=r-a[1]*n-a[5]*r-a[9]*i,a[14]+=i-a[2]*n-a[6]*r-a[10]*i}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].updateMatrixWorld(e)}updateWorldMatrix(e,n){const r=this.parent;if(e===!0&&r!==null&&r.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 i=this.children;for(let a=0,s=i.length;a<s;a++)i[a].updateWorldMatrix(!1,!0)}}toJSON(e){const n=e===void 0||typeof e=="string",r={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),this.static!==!1&&(i.static=this.static),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.pivot!==null&&(i.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(i.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(i.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(o=>({...o})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function a(o,c){return o[c.uuid]===void 0&&(o[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=a(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const c=o.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l<h;l++){const f=c[l];a(e.shapes,f)}else a(e.shapes,c)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let c=0,l=this.material.length;c<l;c++)o.push(a(e.materials,this.material[c]));i.material=o}else i.material=a(e.materials,this.material);if(this.children.length>0){i.children=[];for(let o=0;o<this.children.length;o++)i.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let o=0;o<this.animations.length;o++){const c=this.animations[o];i.animations.push(a(e.animations,c))}}if(n){const o=s(e.geometries),c=s(e.materials),l=s(e.textures),h=s(e.images),f=s(e.shapes),m=s(e.skeletons),g=s(e.animations),b=s(e.nodes);o.length>0&&(r.geometries=o),c.length>0&&(r.materials=c),l.length>0&&(r.textures=l),h.length>0&&(r.images=h),f.length>0&&(r.shapes=f),m.length>0&&(r.skeletons=m),g.length>0&&(r.animations=g),b.length>0&&(r.nodes=b)}return r.object=i,r;function s(o){const c=[];for(const l in o){const h=o[l];delete h.metadata,c.push(h)}return c}}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),e.pivot!==null&&(this.pivot=e.pivot.clone()),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.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r<e.children.length;r++){const i=e.children[r];this.add(i.clone())}return this}}br.DEFAULT_UP=new me(0,1,0);br.DEFAULT_MATRIX_AUTO_UPDATE=!0;br.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class Zn extends br{constructor(){super(),this.isGroup=!0,this.type="Group"}}const YEe={type:"move"};class cM{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Zn,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 Zn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new me,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new me),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Zn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new me,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new me),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 r of e.hand.values())this._getHandJoint(n,r)}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,r){let i=null,a=null,s=null;const o=this._targetRay,c=this._grip,l=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(l&&e.hand){s=!0;for(const y of e.hand.values()){const v=n.getJointPose(y,r),w=this._getHandJoint(l,y);v!==null&&(w.matrix.fromArray(v.transform.matrix),w.matrix.decompose(w.position,w.rotation,w.scale),w.matrixWorldNeedsUpdate=!0,w.jointRadius=v.radius),w.visible=v!==null}const h=l.joints["index-finger-tip"],f=l.joints["thumb-tip"],m=h.position.distanceTo(f.position),g=.02,b=.005;l.inputState.pinching&&m>g+b?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&m<=g-b&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(a=n.getPose(e.gripSpace,r),a!==null&&(c.matrix.fromArray(a.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,a.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(a.linearVelocity)):c.hasLinearVelocity=!1,a.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(a.angularVelocity)):c.hasAngularVelocity=!1));o!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&a!==null&&(i=a),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(YEe)))}return o!==null&&(o.visible=i!==null),c!==null&&(c.visible=a!==null),l!==null&&(l.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Zn;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}const DG={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},Wo={h:0,s:0,l:0},ng={h:0,s:0,l:0};function uM(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 en{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=fa){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,vn.colorSpaceToWorking(this,n),this}setRGB(e,n,r,i=vn.workingColorSpace){return this.r=e,this.g=n,this.b=r,vn.colorSpaceToWorking(this,i),this}setHSL(e,n,r,i=vn.workingColorSpace){if(e=LEe(e,1),n=dn(n,0,1),r=dn(r,0,1),n===0)this.r=this.g=this.b=r;else{const a=r<=.5?r*(1+n):r+n-r*n,s=2*r-a;this.r=uM(s,a,e+1/3),this.g=uM(s,a,e),this.b=uM(s,a,e-1/3)}return vn.colorSpaceToWorking(this,i),this}setStyle(e,n=fa){function r(a){a!==void 0&&parseFloat(a)<1&&Jt("Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let a;const s=i[1],o=i[2];switch(s){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(a[4]),this.setRGB(Math.min(255,parseInt(a[1],10))/255,Math.min(255,parseInt(a[2],10))/255,Math.min(255,parseInt(a[3],10))/255,n);if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(a[4]),this.setRGB(Math.min(100,parseInt(a[1],10))/100,Math.min(100,parseInt(a[2],10))/100,Math.min(100,parseInt(a[3],10))/100,n);break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(a[4]),this.setHSL(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,n);break;default:Jt("Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const a=i[1],s=a.length;if(s===3)return this.setRGB(parseInt(a.charAt(0),16)/15,parseInt(a.charAt(1),16)/15,parseInt(a.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(a,16),n);Jt("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=fa){const r=DG[e.toLowerCase()];return r!==void 0?this.setHex(r,n):Jt("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=uo(e.r),this.g=uo(e.g),this.b=uo(e.b),this}copyLinearToSRGB(e){return this.r=ad(e.r),this.g=ad(e.g),this.b=ad(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=fa){return vn.workingToColorSpace(Xr.copy(this),e),Math.round(dn(Xr.r*255,0,255))*65536+Math.round(dn(Xr.g*255,0,255))*256+Math.round(dn(Xr.b*255,0,255))}getHexString(e=fa){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=vn.workingColorSpace){vn.workingToColorSpace(Xr.copy(this),n);const r=Xr.r,i=Xr.g,a=Xr.b,s=Math.max(r,i,a),o=Math.min(r,i,a);let c,l;const h=(o+s)/2;if(o===s)c=0,l=0;else{const f=s-o;switch(l=h<=.5?f/(s+o):f/(2-s-o),s){case r:c=(i-a)/f+(i<a?6:0);break;case i:c=(a-r)/f+2;break;case a:c=(r-i)/f+4;break}c/=6}return e.h=c,e.s=l,e.l=h,e}getRGB(e,n=vn.workingColorSpace){return vn.workingToColorSpace(Xr.copy(this),n),e.r=Xr.r,e.g=Xr.g,e.b=Xr.b,e}getStyle(e=fa){vn.workingToColorSpace(Xr.copy(this),e);const n=Xr.r,r=Xr.g,i=Xr.b;return e!==fa?`color(${e} ${n.toFixed(3)} ${r.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(r*255)},${Math.round(i*255)})`}offsetHSL(e,n,r){return this.getHSL(Wo),this.setHSL(Wo.h+e,Wo.s+n,Wo.l+r)}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,r){return this.r=e.r+(n.r-e.r)*r,this.g=e.g+(n.g-e.g)*r,this.b=e.b+(n.b-e.b)*r,this}lerpHSL(e,n){this.getHSL(Wo),e.getHSL(ng);const r=rM(Wo.h,ng.h,n),i=rM(Wo.s,ng.s,n),a=rM(Wo.l,ng.l,n);return this.setHSL(r,i,a),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,r=this.g,i=this.b,a=e.elements;return this.r=a[0]*n+a[3]*r+a[6]*i,this.g=a[1]*n+a[4]*r+a[7]*i,this.b=a[2]*n+a[5]*r+a[8]*i,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 Xr=new en;en.NAMES=DG;class Ex{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new en(e),this.near=n,this.far=r}clone(){return new Ex(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class yC extends br{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 As,this.environmentIntensity=1,this.environmentRotation=new As,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}}const Ia=new me,Xs=new me,dM=new me,Ks=new me,Tu=new me,Au=new me,JU=new me,fM=new me,hM=new me,pM=new me,mM=new nr,gM=new nr,vM=new nr;class pa{constructor(e=new me,n=new me,r=new me){this.a=e,this.b=n,this.c=r}static getNormal(e,n,r,i){i.subVectors(r,n),Ia.subVectors(e,n),i.cross(Ia);const a=i.lengthSq();return a>0?i.multiplyScalar(1/Math.sqrt(a)):i.set(0,0,0)}static getBarycoord(e,n,r,i,a){Ia.subVectors(i,n),Xs.subVectors(r,n),dM.subVectors(e,n);const s=Ia.dot(Ia),o=Ia.dot(Xs),c=Ia.dot(dM),l=Xs.dot(Xs),h=Xs.dot(dM),f=s*l-o*o;if(f===0)return a.set(0,0,0),null;const m=1/f,g=(l*c-o*h)*m,b=(s*h-o*c)*m;return a.set(1-g-b,b,g)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,Ks)===null?!1:Ks.x>=0&&Ks.y>=0&&Ks.x+Ks.y<=1}static getInterpolation(e,n,r,i,a,s,o,c){return this.getBarycoord(e,n,r,i,Ks)===null?(c.x=0,c.y=0,"z"in c&&(c.z=0),"w"in c&&(c.w=0),null):(c.setScalar(0),c.addScaledVector(a,Ks.x),c.addScaledVector(s,Ks.y),c.addScaledVector(o,Ks.z),c)}static getInterpolatedAttribute(e,n,r,i,a,s){return mM.setScalar(0),gM.setScalar(0),vM.setScalar(0),mM.fromBufferAttribute(e,n),gM.fromBufferAttribute(e,r),vM.fromBufferAttribute(e,i),s.setScalar(0),s.addScaledVector(mM,a.x),s.addScaledVector(gM,a.y),s.addScaledVector(vM,a.z),s}static isFrontFacing(e,n,r,i){return Ia.subVectors(r,n),Xs.subVectors(e,n),Ia.cross(Xs).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),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 Ia.subVectors(this.c,this.b),Xs.subVectors(this.a,this.b),Ia.cross(Xs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return pa.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return pa.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,a){return pa.getInterpolation(e,this.a,this.b,this.c,n,r,i,a)}containsPoint(e){return pa.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return pa.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,a=this.c;let s,o;Tu.subVectors(i,r),Au.subVectors(a,r),fM.subVectors(e,r);const c=Tu.dot(fM),l=Au.dot(fM);if(c<=0&&l<=0)return n.copy(r);hM.subVectors(e,i);const h=Tu.dot(hM),f=Au.dot(hM);if(h>=0&&f<=h)return n.copy(i);const m=c*f-h*l;if(m<=0&&c>=0&&h<=0)return s=c/(c-h),n.copy(r).addScaledVector(Tu,s);pM.subVectors(e,a);const g=Tu.dot(pM),b=Au.dot(pM);if(b>=0&&g<=b)return n.copy(a);const y=g*l-c*b;if(y<=0&&l>=0&&b<=0)return o=l/(l-b),n.copy(r).addScaledVector(Au,o);const v=h*b-g*f;if(v<=0&&f-h>=0&&g-b>=0)return JU.subVectors(a,i),o=(f-h)/(f-h+(g-b)),n.copy(i).addScaledVector(JU,o);const w=1/(v+y+m);return s=y*w,o=m*w,n.copy(r).addScaledVector(Tu,s).addScaledVector(Au,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class gm{constructor(e=new me(1/0,1/0,1/0),n=new me(-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,r=e.length;n<r;n+=3)this.expandByPoint(Da.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,r=e.count;n<r;n++)this.expandByPoint(Da.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,r=e.length;n<r;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const r=Da.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),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 r=e.geometry;if(r!==void 0){const a=r.getAttribute("position");if(n===!0&&a!==void 0&&e.isInstancedMesh!==!0)for(let s=0,o=a.count;s<o;s++)e.isMesh===!0?e.getVertexPosition(s,Da):Da.fromBufferAttribute(a,s),Da.applyMatrix4(e.matrixWorld),this.expandByPoint(Da);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),rg.copy(e.boundingBox)):(r.boundingBox===null&&r.computeBoundingBox(),rg.copy(r.boundingBox)),rg.applyMatrix4(e.matrixWorld),this.union(rg)}const i=e.children;for(let a=0,s=i.length;a<s;a++)this.expandByObject(i[a],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,Da),Da.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(uh),ig.subVectors(this.max,uh),Nu.subVectors(e.a,uh),Pu.subVectors(e.b,uh),Cu.subVectors(e.c,uh),qo.subVectors(Pu,Nu),Xo.subVectors(Cu,Pu),ql.subVectors(Nu,Cu);let n=[0,-qo.z,qo.y,0,-Xo.z,Xo.y,0,-ql.z,ql.y,qo.z,0,-qo.x,Xo.z,0,-Xo.x,ql.z,0,-ql.x,-qo.y,qo.x,0,-Xo.y,Xo.x,0,-ql.y,ql.x,0];return!yM(n,Nu,Pu,Cu,ig)||(n=[1,0,0,0,1,0,0,0,1],!yM(n,Nu,Pu,Cu,ig))?!1:(ag.crossVectors(qo,Xo),n=[ag.x,ag.y,ag.z],yM(n,Nu,Pu,Cu,ig))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Da).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Da).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:(Ys[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ys[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ys[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ys[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ys[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ys[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ys[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ys[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ys),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 Ys=[new me,new me,new me,new me,new me,new me,new me,new me],Da=new me,rg=new gm,Nu=new me,Pu=new me,Cu=new me,qo=new me,Xo=new me,ql=new me,uh=new me,ig=new me,ag=new me,Xl=new me;function yM(t,e,n,r,i){for(let a=0,s=t.length-3;a<=s;a+=3){Xl.fromArray(t,a);const o=i.x*Math.abs(Xl.x)+i.y*Math.abs(Xl.y)+i.z*Math.abs(Xl.z),c=e.dot(Xl),l=n.dot(Xl),h=r.dot(Xl);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>o)return!1}return!0}const lr=new me,sg=new nn;let ZEe=0;class Ji{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:ZEe++}),this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=VA,this.updateRanges=[],this.gpuType=ds,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,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,a=this.itemSize;i<a;i++)this.array[e+i]=n.array[r+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,r=this.count;n<r;n++)sg.fromBufferAttribute(this,n),sg.applyMatrix3(e),this.setXY(n,sg.x,sg.y);else if(this.itemSize===3)for(let n=0,r=this.count;n<r;n++)lr.fromBufferAttribute(this,n),lr.applyMatrix3(e),this.setXYZ(n,lr.x,lr.y,lr.z);return this}applyMatrix4(e){for(let n=0,r=this.count;n<r;n++)lr.fromBufferAttribute(this,n),lr.applyMatrix4(e),this.setXYZ(n,lr.x,lr.y,lr.z);return this}applyNormalMatrix(e){for(let n=0,r=this.count;n<r;n++)lr.fromBufferAttribute(this,n),lr.applyNormalMatrix(e),this.setXYZ(n,lr.x,lr.y,lr.z);return this}transformDirection(e){for(let n=0,r=this.count;n<r;n++)lr.fromBufferAttribute(this,n),lr.transformDirection(e),this.setXYZ(n,lr.x,lr.y,lr.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let r=this.array[e*this.itemSize+n];return this.normalized&&(r=ls(r,this.array)),r}setComponent(e,n,r){return this.normalized&&(r=Cn(r,this.array)),this.array[e*this.itemSize+n]=r,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=ls(n,this.array)),n}setX(e,n){return this.normalized&&(n=Cn(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=ls(n,this.array)),n}setY(e,n){return this.normalized&&(n=Cn(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=ls(n,this.array)),n}setZ(e,n){return this.normalized&&(n=Cn(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=ls(n,this.array)),n}setW(e,n){return this.normalized&&(n=Cn(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,r){return e*=this.itemSize,this.normalized&&(n=Cn(n,this.array),r=Cn(r,this.array)),this.array[e+0]=n,this.array[e+1]=r,this}setXYZ(e,n,r,i){return e*=this.itemSize,this.normalized&&(n=Cn(n,this.array),r=Cn(r,this.array),i=Cn(i,this.array)),this.array[e+0]=n,this.array[e+1]=r,this.array[e+2]=i,this}setXYZW(e,n,r,i,a){return e*=this.itemSize,this.normalized&&(n=Cn(n,this.array),r=Cn(r,this.array),i=Cn(i,this.array),a=Cn(a,this.array)),this.array[e+0]=n,this.array[e+1]=r,this.array[e+2]=i,this.array[e+3]=a,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!==VA&&(e.usage=this.usage),e}}class kG extends Ji{constructor(e,n,r){super(new Uint16Array(e),n,r)}}class LG extends Ji{constructor(e,n,r){super(new Uint32Array(e),n,r)}}class $n extends Ji{constructor(e,n,r){super(new Float32Array(e),n,r)}}const JEe=new gm,dh=new me,xM=new me;class vm{constructor(e=new me,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 r=this.center;n!==void 0?r.copy(n):JEe.setFromPoints(e).getCenter(r);let i=0;for(let a=0,s=e.length;a<s;a++)i=Math.max(i,r.distanceToSquared(e[a]));return this.radius=Math.sqrt(i),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 r=this.center.distanceToSquared(e);return n.copy(e),r>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;dh.subVectors(e,this.center);const n=dh.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(dh,i/r),this.radius+=i}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):(xM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(dh.copy(e.center).add(xM)),this.expandByPoint(dh.copy(e.center).sub(xM))),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}}let QEe=0;const ua=new Ln,bM=new br,Ru=new me,Bi=new gm,fh=new gm,Ar=new me;class jr extends df{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:QEe++}),this.uuid=ml(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,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(OEe(e)?LG:kG)(e,1):this.index=e,this}setIndirect(e,n=0){return this.indirect=e,this.indirectOffset=n,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}addGroup(e,n,r=0){this.groups.push({start:e,count:n,materialIndex:r})}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 r=this.attributes.normal;if(r!==void 0){const a=new tn().getNormalMatrix(e);r.applyNormalMatrix(a),r.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ua.makeRotationFromQuaternion(e),this.applyMatrix4(ua),this}rotateX(e){return ua.makeRotationX(e),this.applyMatrix4(ua),this}rotateY(e){return ua.makeRotationY(e),this.applyMatrix4(ua),this}rotateZ(e){return ua.makeRotationZ(e),this.applyMatrix4(ua),this}translate(e,n,r){return ua.makeTranslation(e,n,r),this.applyMatrix4(ua),this}scale(e,n,r){return ua.makeScale(e,n,r),this.applyMatrix4(ua),this}lookAt(e){return bM.lookAt(e),bM.updateMatrix(),this.applyMatrix4(bM.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ru).negate(),this.translate(Ru.x,Ru.y,Ru.z),this}setFromPoints(e){const n=this.getAttribute("position");if(n===void 0){const r=[];for(let i=0,a=e.length;i<a;i++){const s=e[i];r.push(s.x,s.y,s.z||0)}this.setAttribute("position",new $n(r,3))}else{const r=Math.min(e.length,n.count);for(let i=0;i<r;i++){const a=e[i];n.setXYZ(i,a.x,a.y,a.z||0)}e.length>n.count&&Jt("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 gm);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){pn("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new me(-1/0,-1/0,-1/0),new me(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let r=0,i=n.length;r<i;r++){const a=n[r];Bi.setFromBufferAttribute(a),this.morphTargetsRelative?(Ar.addVectors(this.boundingBox.min,Bi.min),this.boundingBox.expandByPoint(Ar),Ar.addVectors(this.boundingBox.max,Bi.max),this.boundingBox.expandByPoint(Ar)):(this.boundingBox.expandByPoint(Bi.min),this.boundingBox.expandByPoint(Bi.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&pn('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 vm);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){pn("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new me,1/0);return}if(e){const r=this.boundingSphere.center;if(Bi.setFromBufferAttribute(e),n)for(let a=0,s=n.length;a<s;a++){const o=n[a];fh.setFromBufferAttribute(o),this.morphTargetsRelative?(Ar.addVectors(Bi.min,fh.min),Bi.expandByPoint(Ar),Ar.addVectors(Bi.max,fh.max),Bi.expandByPoint(Ar)):(Bi.expandByPoint(fh.min),Bi.expandByPoint(fh.max))}Bi.getCenter(r);let i=0;for(let a=0,s=e.count;a<s;a++)Ar.fromBufferAttribute(e,a),i=Math.max(i,r.distanceToSquared(Ar));if(n)for(let a=0,s=n.length;a<s;a++){const o=n[a],c=this.morphTargetsRelative;for(let l=0,h=o.count;l<h;l++)Ar.fromBufferAttribute(o,l),c&&(Ru.fromBufferAttribute(e,l),Ar.add(Ru)),i=Math.max(i,r.distanceToSquared(Ar))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&pn('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){pn("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const r=n.position,i=n.normal,a=n.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Ji(new Float32Array(4*r.count),4));const s=this.getAttribute("tangent"),o=[],c=[];for(let P=0;P<r.count;P++)o[P]=new me,c[P]=new me;const l=new me,h=new me,f=new me,m=new nn,g=new nn,b=new nn,y=new me,v=new me;function w(P,R,F){l.fromBufferAttribute(r,P),h.fromBufferAttribute(r,R),f.fromBufferAttribute(r,F),m.fromBufferAttribute(a,P),g.fromBufferAttribute(a,R),b.fromBufferAttribute(a,F),h.sub(l),f.sub(l),g.sub(m),b.sub(m);const D=1/(g.x*b.y-b.x*g.y);isFinite(D)&&(y.copy(h).multiplyScalar(b.y).addScaledVector(f,-g.y).multiplyScalar(D),v.copy(f).multiplyScalar(g.x).addScaledVector(h,-b.x).multiplyScalar(D),o[P].add(y),o[R].add(y),o[F].add(y),c[P].add(v),c[R].add(v),c[F].add(v))}let _=this.groups;_.length===0&&(_=[{start:0,count:e.count}]);for(let P=0,R=_.length;P<R;++P){const F=_[P],D=F.start,L=F.count;for(let q=D,I=D+L;q<I;q+=3)w(e.getX(q+0),e.getX(q+1),e.getX(q+2))}const E=new me,M=new me,T=new me,A=new me;function N(P){T.fromBufferAttribute(i,P),A.copy(T);const R=o[P];E.copy(R),E.sub(T.multiplyScalar(T.dot(R))).normalize(),M.crossVectors(A,R);const D=M.dot(c[P])<0?-1:1;s.setXYZW(P,E.x,E.y,E.z,D)}for(let P=0,R=_.length;P<R;++P){const F=_[P],D=F.start,L=F.count;for(let q=D,I=D+L;q<I;q+=3)N(e.getX(q+0)),N(e.getX(q+1)),N(e.getX(q+2))}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let r=this.getAttribute("normal");if(r===void 0)r=new Ji(new Float32Array(n.count*3),3),this.setAttribute("normal",r);else for(let m=0,g=r.count;m<g;m++)r.setXYZ(m,0,0,0);const i=new me,a=new me,s=new me,o=new me,c=new me,l=new me,h=new me,f=new me;if(e)for(let m=0,g=e.count;m<g;m+=3){const b=e.getX(m+0),y=e.getX(m+1),v=e.getX(m+2);i.fromBufferAttribute(n,b),a.fromBufferAttribute(n,y),s.fromBufferAttribute(n,v),h.subVectors(s,a),f.subVectors(i,a),h.cross(f),o.fromBufferAttribute(r,b),c.fromBufferAttribute(r,y),l.fromBufferAttribute(r,v),o.add(h),c.add(h),l.add(h),r.setXYZ(b,o.x,o.y,o.z),r.setXYZ(y,c.x,c.y,c.z),r.setXYZ(v,l.x,l.y,l.z)}else for(let m=0,g=n.count;m<g;m+=3)i.fromBufferAttribute(n,m+0),a.fromBufferAttribute(n,m+1),s.fromBufferAttribute(n,m+2),h.subVectors(s,a),f.subVectors(i,a),h.cross(f),r.setXYZ(m+0,h.x,h.y,h.z),r.setXYZ(m+1,h.x,h.y,h.z),r.setXYZ(m+2,h.x,h.y,h.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,r=e.count;n<r;n++)Ar.fromBufferAttribute(e,n),Ar.normalize(),e.setXYZ(n,Ar.x,Ar.y,Ar.z)}toNonIndexed(){function e(o,c){const l=o.array,h=o.itemSize,f=o.normalized,m=new l.constructor(c.length*h);let g=0,b=0;for(let y=0,v=c.length;y<v;y++){o.isInterleavedBufferAttribute?g=c[y]*o.data.stride+o.offset:g=c[y]*h;for(let w=0;w<h;w++)m[b++]=l[g++]}return new Ji(m,h,f)}if(this.index===null)return Jt("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new jr,r=this.index.array,i=this.attributes;for(const o in i){const c=i[o],l=e(c,r);n.setAttribute(o,l)}const a=this.morphAttributes;for(const o in a){const c=[],l=a[o];for(let h=0,f=l.length;h<f;h++){const m=l[h],g=e(m,r);c.push(g)}n.morphAttributes[o]=c}n.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let o=0,c=s.length;o<c;o++){const l=s[o];n.addGroup(l.start,l.count,l.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 c=this.parameters;for(const l in c)c[l]!==void 0&&(e[l]=c[l]);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 r=this.attributes;for(const c in r){const l=r[c];e.data.attributes[c]=l.toJSON(e.data)}const i={};let a=!1;for(const c in this.morphAttributes){const l=this.morphAttributes[c],h=[];for(let f=0,m=l.length;f<m;f++){const g=l[f];h.push(g.toJSON(e.data))}h.length>0&&(i[c]=h,a=!0)}a&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.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 r=e.index;r!==null&&this.setIndex(r.clone());const i=e.attributes;for(const l in i){const h=i[l];this.setAttribute(l,h.clone(n))}const a=e.morphAttributes;for(const l in a){const h=[],f=a[l];for(let m=0,g=f.length;m<g;m++)h.push(f[m].clone(n));this.morphAttributes[l]=h}this.morphTargetsRelative=e.morphTargetsRelative;const s=e.groups;for(let l=0,h=s.length;l<h;l++){const f=s[l];this.addGroup(f.start,f.count,f.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const c=e.boundingSphere;return c!==null&&(this.boundingSphere=c.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}class eTe{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=VA,this.updateRanges=[],this.version=0,this.uuid=ml()}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.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,a=this.stride;i<a;i++)this.array[e+i]=n.array[r+i];return this}set(e,n=0){return this.array.set(e,n),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ml()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const n=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),r=new this.constructor(n,this.stride);return r.setUsage(this.usage),r}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ml()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ii=new me;class Ny{constructor(e,n,r,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=n,this.offset=r,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let n=0,r=this.data.count;n<r;n++)ii.fromBufferAttribute(this,n),ii.applyMatrix4(e),this.setXYZ(n,ii.x,ii.y,ii.z);return this}applyNormalMatrix(e){for(let n=0,r=this.count;n<r;n++)ii.fromBufferAttribute(this,n),ii.applyNormalMatrix(e),this.setXYZ(n,ii.x,ii.y,ii.z);return this}transformDirection(e){for(let n=0,r=this.count;n<r;n++)ii.fromBufferAttribute(this,n),ii.transformDirection(e),this.setXYZ(n,ii.x,ii.y,ii.z);return this}getComponent(e,n){let r=this.array[e*this.data.stride+this.offset+n];return this.normalized&&(r=ls(r,this.array)),r}setComponent(e,n,r){return this.normalized&&(r=Cn(r,this.array)),this.data.array[e*this.data.stride+this.offset+n]=r,this}setX(e,n){return this.normalized&&(n=Cn(n,this.array)),this.data.array[e*this.data.stride+this.offset]=n,this}setY(e,n){return this.normalized&&(n=Cn(n,this.array)),this.data.array[e*this.data.stride+this.offset+1]=n,this}setZ(e,n){return this.normalized&&(n=Cn(n,this.array)),this.data.array[e*this.data.stride+this.offset+2]=n,this}setW(e,n){return this.normalized&&(n=Cn(n,this.array)),this.data.array[e*this.data.stride+this.offset+3]=n,this}getX(e){let n=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(n=ls(n,this.array)),n}getY(e){let n=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(n=ls(n,this.array)),n}getZ(e){let n=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(n=ls(n,this.array)),n}getW(e){let n=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(n=ls(n,this.array)),n}setXY(e,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(n=Cn(n,this.array),r=Cn(r,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=r,this}setXYZ(e,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(n=Cn(n,this.array),r=Cn(r,this.array),i=Cn(i,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=r,this.data.array[e+2]=i,this}setXYZW(e,n,r,i,a){return e=e*this.data.stride+this.offset,this.normalized&&(n=Cn(n,this.array),r=Cn(r,this.array),i=Cn(i,this.array),a=Cn(a,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=r,this.data.array[e+2]=i,this.data.array[e+3]=a,this}clone(e){if(e===void 0){Ty("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let r=0;r<this.count;r++){const i=r*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)n.push(this.data.array[i+a])}return new Ji(new this.array.constructor(n),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Ny(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){Ty("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let r=0;r<this.count;r++){const i=r*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)n.push(this.data.array[i+a])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:n,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}let tTe=0;class Pl extends df{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:tTe++}),this.uuid=ml(),this.name="",this.type="Material",this.blending=id,this.side=wl,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=eA,this.blendDst=tA,this.blendEquation=ac,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new en(0,0,0),this.blendAlpha=0,this.depthFunc=Bd,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=UU,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=wu,this.stencilZFail=wu,this.stencilZPass=wu,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 r=e[n];if(r===void 0){Jt(`Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){Jt(`Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(r.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(r.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==id&&(r.blending=this.blending),this.side!==wl&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==eA&&(r.blendSrc=this.blendSrc),this.blendDst!==tA&&(r.blendDst=this.blendDst),this.blendEquation!==ac&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==Bd&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==UU&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==wu&&(r.stencilFail=this.stencilFail),this.stencilZFail!==wu&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==wu&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.allowOverride===!1&&(r.allowOverride=!1),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(a){const s=[];for(const o in a){const c=a[o];delete c.metadata,s.push(c)}return s}if(n){const a=i(e.textures),s=i(e.images);a.length>0&&(r.textures=a),s.length>0&&(r.images=s)}return r}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 r=null;if(n!==null){const i=n.length;r=new Array(i);for(let a=0;a!==i;++a)r[a]=n[a].clone()}return this.clippingPlanes=r,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.allowOverride=e.allowOverride,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 FG extends Pl{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new en(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let ju;const hh=new me,Ou=new me,Iu=new me,Du=new nn,ph=new nn,UG=new Ln,og=new me,mh=new me,lg=new me,QU=new nn,wM=new nn,e8=new nn;class nTe extends br{constructor(e=new FG){if(super(),this.isSprite=!0,this.type="Sprite",ju===void 0){ju=new jr;const n=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),r=new eTe(n,5);ju.setIndex([0,1,2,0,2,3]),ju.setAttribute("position",new Ny(r,3,0,!1)),ju.setAttribute("uv",new Ny(r,2,3,!1))}this.geometry=ju,this.material=e,this.center=new nn(.5,.5),this.count=1}raycast(e,n){e.camera===null&&pn('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ou.setFromMatrixScale(this.matrixWorld),UG.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Iu.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Ou.multiplyScalar(-Iu.z);const r=this.material.rotation;let i,a;r!==0&&(a=Math.cos(r),i=Math.sin(r));const s=this.center;cg(og.set(-.5,-.5,0),Iu,s,Ou,i,a),cg(mh.set(.5,-.5,0),Iu,s,Ou,i,a),cg(lg.set(.5,.5,0),Iu,s,Ou,i,a),QU.set(0,0),wM.set(1,0),e8.set(1,1);let o=e.ray.intersectTriangle(og,mh,lg,!1,hh);if(o===null&&(cg(mh.set(-.5,.5,0),Iu,s,Ou,i,a),wM.set(0,1),o=e.ray.intersectTriangle(og,lg,mh,!1,hh),o===null))return;const c=e.ray.origin.distanceTo(hh);c<e.near||c>e.far||n.push({distance:c,point:hh.clone(),uv:pa.getInterpolation(hh,og,mh,lg,QU,wM,e8,new nn),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function cg(t,e,n,r,i,a){Du.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(ph.x=a*Du.x-i*Du.y,ph.y=i*Du.x+a*Du.y):ph.copy(Du),t.copy(e),t.x+=ph.x,t.y+=ph.y,t.applyMatrix4(UG)}const Zs=new me,_M=new me,ug=new me,Ko=new me,SM=new me,dg=new me,MM=new me;class Tx{constructor(e=new me,n=new me(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,Zs)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Zs.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Zs.copy(this.origin).addScaledVector(this.direction,n),Zs.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){_M.copy(e).add(n).multiplyScalar(.5),ug.copy(n).sub(e).normalize(),Ko.copy(this.origin).sub(_M);const a=e.distanceTo(n)*.5,s=-this.direction.dot(ug),o=Ko.dot(this.direction),c=-Ko.dot(ug),l=Ko.lengthSq(),h=Math.abs(1-s*s);let f,m,g,b;if(h>0)if(f=s*c-o,m=s*o-c,b=a*h,f>=0)if(m>=-b)if(m<=b){const y=1/h;f*=y,m*=y,g=f*(f+s*m+2*o)+m*(s*f+m+2*c)+l}else m=a,f=Math.max(0,-(s*m+o)),g=-f*f+m*(m+2*c)+l;else m=-a,f=Math.max(0,-(s*m+o)),g=-f*f+m*(m+2*c)+l;else m<=-b?(f=Math.max(0,-(-s*a+o)),m=f>0?-a:Math.min(Math.max(-a,-c),a),g=-f*f+m*(m+2*c)+l):m<=b?(f=0,m=Math.min(Math.max(-a,-c),a),g=m*(m+2*c)+l):(f=Math.max(0,-(s*a+o)),m=f>0?a:Math.min(Math.max(-a,-c),a),g=-f*f+m*(m+2*c)+l);else m=s>0?-a:a,f=Math.max(0,-(s*m+o)),g=-f*f+m*(m+2*c)+l;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(_M).addScaledVector(ug,m),g}intersectSphere(e,n){Zs.subVectors(e.center,this.origin);const r=Zs.dot(this.direction),i=Zs.dot(Zs)-r*r,a=e.radius*e.radius;if(i>a)return null;const s=Math.sqrt(a-i),o=r-s,c=r+s;return c<0?null:o<0?this.at(c,n):this.at(o,n)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,a,s,o,c;const l=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,m=this.origin;return l>=0?(r=(e.min.x-m.x)*l,i=(e.max.x-m.x)*l):(r=(e.max.x-m.x)*l,i=(e.min.x-m.x)*l),h>=0?(a=(e.min.y-m.y)*h,s=(e.max.y-m.y)*h):(a=(e.max.y-m.y)*h,s=(e.min.y-m.y)*h),r>s||a>i||((a>r||isNaN(r))&&(r=a),(s<i||isNaN(i))&&(i=s),f>=0?(o=(e.min.z-m.z)*f,c=(e.max.z-m.z)*f):(o=(e.max.z-m.z)*f,c=(e.min.z-m.z)*f),r>c||o>i)||((o>r||r!==r)&&(r=o),(c<i||i!==i)&&(i=c),i<0)?null:this.at(r>=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,Zs)!==null}intersectTriangle(e,n,r,i,a){SM.subVectors(n,e),dg.subVectors(r,e),MM.crossVectors(SM,dg);let s=this.direction.dot(MM),o;if(s>0){if(i)return null;o=1}else if(s<0)o=-1,s=-s;else return null;Ko.subVectors(this.origin,e);const c=o*this.direction.dot(dg.crossVectors(Ko,dg));if(c<0)return null;const l=o*this.direction.dot(SM.cross(Ko));if(l<0||c+l>s)return null;const h=-o*Ko.dot(MM);return h<0?null:this.at(h/s,a)}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 dl extends Pl{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new en(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 As,this.combine=vG,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 t8=new Ln,Kl=new Tx,fg=new vm,n8=new me,hg=new me,pg=new me,mg=new me,EM=new me,gg=new me,r8=new me,vg=new me;class _e extends br{constructor(e=new jr,n=new dl){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,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,s=i.length;a<s;a++){const o=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=a}}}}getVertexPosition(e,n){const r=this.geometry,i=r.attributes.position,a=r.morphAttributes.position,s=r.morphTargetsRelative;n.fromBufferAttribute(i,e);const o=this.morphTargetInfluences;if(a&&o){gg.set(0,0,0);for(let c=0,l=a.length;c<l;c++){const h=o[c],f=a[c];h!==0&&(EM.fromBufferAttribute(f,e),s?gg.addScaledVector(EM,h):gg.addScaledVector(EM.sub(n),h))}n.add(gg)}return n}raycast(e,n){const r=this.geometry,i=this.material,a=this.matrixWorld;i!==void 0&&(r.boundingSphere===null&&r.computeBoundingSphere(),fg.copy(r.boundingSphere),fg.applyMatrix4(a),Kl.copy(e.ray).recast(e.near),!(fg.containsPoint(Kl.origin)===!1&&(Kl.intersectSphere(fg,n8)===null||Kl.origin.distanceToSquared(n8)>(e.far-e.near)**2))&&(t8.copy(a).invert(),Kl.copy(e.ray).applyMatrix4(t8),!(r.boundingBox!==null&&Kl.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,Kl)))}_computeIntersections(e,n,r){let i;const a=this.geometry,s=this.material,o=a.index,c=a.attributes.position,l=a.attributes.uv,h=a.attributes.uv1,f=a.attributes.normal,m=a.groups,g=a.drawRange;if(o!==null)if(Array.isArray(s))for(let b=0,y=m.length;b<y;b++){const v=m[b],w=s[v.materialIndex],_=Math.max(v.start,g.start),E=Math.min(o.count,Math.min(v.start+v.count,g.start+g.count));for(let M=_,T=E;M<T;M+=3){const A=o.getX(M),N=o.getX(M+1),P=o.getX(M+2);i=yg(this,w,e,r,l,h,f,A,N,P),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=v.materialIndex,n.push(i))}}else{const b=Math.max(0,g.start),y=Math.min(o.count,g.start+g.count);for(let v=b,w=y;v<w;v+=3){const _=o.getX(v),E=o.getX(v+1),M=o.getX(v+2);i=yg(this,s,e,r,l,h,f,_,E,M),i&&(i.faceIndex=Math.floor(v/3),n.push(i))}}else if(c!==void 0)if(Array.isArray(s))for(let b=0,y=m.length;b<y;b++){const v=m[b],w=s[v.materialIndex],_=Math.max(v.start,g.start),E=Math.min(c.count,Math.min(v.start+v.count,g.start+g.count));for(let M=_,T=E;M<T;M+=3){const A=M,N=M+1,P=M+2;i=yg(this,w,e,r,l,h,f,A,N,P),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=v.materialIndex,n.push(i))}}else{const b=Math.max(0,g.start),y=Math.min(c.count,g.start+g.count);for(let v=b,w=y;v<w;v+=3){const _=v,E=v+1,M=v+2;i=yg(this,s,e,r,l,h,f,_,E,M),i&&(i.faceIndex=Math.floor(v/3),n.push(i))}}}}function rTe(t,e,n,r,i,a,s,o){let c;if(e.side===Ri?c=r.intersectTriangle(s,a,i,!0,o):c=r.intersectTriangle(i,a,s,e.side===wl,o),c===null)return null;vg.copy(o),vg.applyMatrix4(t.matrixWorld);const l=n.ray.origin.distanceTo(vg);return l<n.near||l>n.far?null:{distance:l,point:vg.clone(),object:t}}function yg(t,e,n,r,i,a,s,o,c,l){t.getVertexPosition(o,hg),t.getVertexPosition(c,pg),t.getVertexPosition(l,mg);const h=rTe(t,e,n,r,hg,pg,mg,r8);if(h){const f=new me;pa.getBarycoord(r8,hg,pg,mg,f),i&&(h.uv=pa.getInterpolatedAttribute(i,o,c,l,f,new nn)),a&&(h.uv1=pa.getInterpolatedAttribute(a,o,c,l,f,new nn)),s&&(h.normal=pa.getInterpolatedAttribute(s,o,c,l,f,new me),h.normal.dot(r.direction)>0&&h.normal.multiplyScalar(-1));const m={a:o,b:c,c:l,normal:new me,materialIndex:0};pa.getNormal(hg,pg,mg,m.normal),h.face=m,h.barycoord=f}return h}class iTe extends vi{constructor(e=null,n=1,r=1,i,a,s,o,c,l=Fr,h=Fr,f,m){super(null,s,o,c,l,h,i,a,f,m),this.isDataTexture=!0,this.image={data:e,width:n,height:r},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const TM=new me,aTe=new me,sTe=new tn;class rc{constructor(e=new me(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,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=TM.subVectors(r,n).cross(aTe.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,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 r=e.delta(TM),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/i;return a<0||a>1?null:n.copy(e.start).addScaledVector(r,a)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<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 r=n||sTe.getNormalMatrix(e),i=this.coplanarPoint(TM).applyMatrix4(e),a=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(a),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 Yl=new vm,oTe=new nn(.5,.5),xg=new me;class xC{constructor(e=new rc,n=new rc,r=new rc,i=new rc,a=new rc,s=new rc){this.planes=[e,n,r,i,a,s]}set(e,n,r,i,a,s){const o=this.planes;return o[0].copy(e),o[1].copy(n),o[2].copy(r),o[3].copy(i),o[4].copy(a),o[5].copy(s),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=fs,r=!1){const i=this.planes,a=e.elements,s=a[0],o=a[1],c=a[2],l=a[3],h=a[4],f=a[5],m=a[6],g=a[7],b=a[8],y=a[9],v=a[10],w=a[11],_=a[12],E=a[13],M=a[14],T=a[15];if(i[0].setComponents(l-s,g-h,w-b,T-_).normalize(),i[1].setComponents(l+s,g+h,w+b,T+_).normalize(),i[2].setComponents(l+o,g+f,w+y,T+E).normalize(),i[3].setComponents(l-o,g-f,w-y,T-E).normalize(),r)i[4].setComponents(c,m,v,M).normalize(),i[5].setComponents(l-c,g-m,w-v,T-M).normalize();else if(i[4].setComponents(l-c,g-m,w-v,T-M).normalize(),n===fs)i[5].setComponents(l+c,g+m,w+v,T+M).normalize();else if(n===Gp)i[5].setComponents(c,m,v,M).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(),Yl.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Yl.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Yl)}intersectsSprite(e){Yl.center.set(0,0,0);const n=oTe.distanceTo(e.center);return Yl.radius=.7071067811865476+n,Yl.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yl)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let a=0;a<6;a++)if(n[a].distanceToPoint(r)<i)return!1;return!0}intersectsBox(e){const n=this.planes;for(let r=0;r<6;r++){const i=n[r];if(xg.x=i.normal.x>0?e.max.x:e.min.x,xg.y=i.normal.y>0?e.max.y:e.min.y,xg.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(xg)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class BG extends Pl{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new en(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Py=new me,Cy=new me,i8=new Ln,gh=new Tx,bg=new vm,AM=new me,a8=new me;class lTe extends br{constructor(e=new jr,n=new BG){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=n,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,r=[0];for(let i=1,a=n.count;i<a;i++)Py.fromBufferAttribute(n,i-1),Cy.fromBufferAttribute(n,i),r[i]=r[i-1],r[i]+=Py.distanceTo(Cy);e.setAttribute("lineDistance",new $n(r,1))}else Jt("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,n){const r=this.geometry,i=this.matrixWorld,a=e.params.Line.threshold,s=r.drawRange;if(r.boundingSphere===null&&r.computeBoundingSphere(),bg.copy(r.boundingSphere),bg.applyMatrix4(i),bg.radius+=a,e.ray.intersectsSphere(bg)===!1)return;i8.copy(i).invert(),gh.copy(e.ray).applyMatrix4(i8);const o=a/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,l=this.isLineSegments?2:1,h=r.index,m=r.attributes.position;if(h!==null){const g=Math.max(0,s.start),b=Math.min(h.count,s.start+s.count);for(let y=g,v=b-1;y<v;y+=l){const w=h.getX(y),_=h.getX(y+1),E=wg(this,e,gh,c,w,_,y);E&&n.push(E)}if(this.isLineLoop){const y=h.getX(b-1),v=h.getX(g),w=wg(this,e,gh,c,y,v,b-1);w&&n.push(w)}}else{const g=Math.max(0,s.start),b=Math.min(m.count,s.start+s.count);for(let y=g,v=b-1;y<v;y+=l){const w=wg(this,e,gh,c,y,y+1,y);w&&n.push(w)}if(this.isLineLoop){const y=wg(this,e,gh,c,b-1,g,b-1);y&&n.push(y)}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,s=i.length;a<s;a++){const o=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=a}}}}}function wg(t,e,n,r,i,a,s){const o=t.geometry.attributes.position;if(Py.fromBufferAttribute(o,i),Cy.fromBufferAttribute(o,a),n.distanceSqToSegment(Py,Cy,AM,a8)>r)return;AM.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(AM);if(!(l<e.near||l>e.far))return{distance:l,point:a8.clone().applyMatrix4(t.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:t}}const s8=new me,o8=new me;class cTe extends lTe{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,r=[];for(let i=0,a=n.count;i<a;i+=2)s8.fromBufferAttribute(n,i),o8.fromBufferAttribute(n,i+1),r[i]=i===0?0:r[i-1],r[i+1]=r[i]+s8.distanceTo(o8);e.setAttribute("lineDistance",new $n(r,1))}else Jt("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class zG extends Pl{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new en(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const l8=new Ln,GA=new Tx,_g=new vm,Sg=new me;class uTe extends br{constructor(e=new jr,n=new zG){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=n,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,n){const r=this.geometry,i=this.matrixWorld,a=e.params.Points.threshold,s=r.drawRange;if(r.boundingSphere===null&&r.computeBoundingSphere(),_g.copy(r.boundingSphere),_g.applyMatrix4(i),_g.radius+=a,e.ray.intersectsSphere(_g)===!1)return;l8.copy(i).invert(),GA.copy(e.ray).applyMatrix4(l8);const o=a/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,l=r.index,f=r.attributes.position;if(l!==null){const m=Math.max(0,s.start),g=Math.min(l.count,s.start+s.count);for(let b=m,y=g;b<y;b++){const v=l.getX(b);Sg.fromBufferAttribute(f,v),c8(Sg,v,c,i,e,n,this)}}else{const m=Math.max(0,s.start),g=Math.min(f.count,s.start+s.count);for(let b=m,y=g;b<y;b++)Sg.fromBufferAttribute(f,b),c8(Sg,b,c,i,e,n,this)}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,s=i.length;a<s;a++){const o=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=a}}}}}function c8(t,e,n,r,i,a,s){const o=GA.distanceSqToPoint(t);if(o<n){const c=new me;GA.closestPointToPoint(t,c),c.applyMatrix4(r);const l=i.ray.origin.distanceTo(c);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:c,index:e,face:null,faceIndex:null,barycoord:null,object:s})}}class $G extends vi{constructor(e=[],n=Dc,r,i,a,s,o,c,l,h){super(e,n,r,i,a,s,o,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Wp extends vi{constructor(e,n,r=Ts,i,a,s,o=Fr,c=Fr,l,h=yo,f=1){if(h!==yo&&h!==gc)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const m={width:e,height:n,depth:f};super(m,i,a,s,o,c,h,r,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new gC(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 dTe extends Wp{constructor(e,n=Ts,r=Dc,i,a,s=Fr,o=Fr,c,l=yo){const h={width:e,height:e,depth:1},f=[h,h,h,h,h,h];super(e,e,n,r,i,a,s,o,c,l),this.image=f,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class VG extends vi{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class cn extends jr{constructor(e=1,n=1,r=1,i=1,a=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:a,depthSegments:s};const o=this;i=Math.floor(i),a=Math.floor(a),s=Math.floor(s);const c=[],l=[],h=[],f=[];let m=0,g=0;b("z","y","x",-1,-1,r,n,e,s,a,0),b("z","y","x",1,-1,r,n,-e,s,a,1),b("x","z","y",1,1,e,r,n,i,s,2),b("x","z","y",1,-1,e,r,-n,i,s,3),b("x","y","z",1,-1,e,n,r,i,a,4),b("x","y","z",-1,-1,e,n,-r,i,a,5),this.setIndex(c),this.setAttribute("position",new $n(l,3)),this.setAttribute("normal",new $n(h,3)),this.setAttribute("uv",new $n(f,2));function b(y,v,w,_,E,M,T,A,N,P,R){const F=M/N,D=T/P,L=M/2,q=T/2,I=A/2,U=N+1,k=P+1;let V=0,$=0;const Y=new me;for(let J=0;J<k;J++){const W=J*D-q;for(let H=0;H<U;H++){const te=H*F-L;Y[y]=te*_,Y[v]=W*E,Y[w]=I,l.push(Y.x,Y.y,Y.z),Y[y]=0,Y[v]=0,Y[w]=A>0?1:-1,h.push(Y.x,Y.y,Y.z),f.push(H/N),f.push(1-J/P),V+=1}}for(let J=0;J<P;J++)for(let W=0;W<N;W++){const H=m+W+U*J,te=m+W+U*(J+1),we=m+(W+1)+U*(J+1),Ae=m+(W+1)+U*J;c.push(H,te,Ae),c.push(te,we,Ae),$+=6}o.addGroup(g,$,R),g+=$,m+=V}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new cn(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}class at extends jr{constructor(e=1,n=1,r=1,i=32,a=1,s=!1,o=0,c=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:n,height:r,radialSegments:i,heightSegments:a,openEnded:s,thetaStart:o,thetaLength:c};const l=this;i=Math.floor(i),a=Math.floor(a);const h=[],f=[],m=[],g=[];let b=0;const y=[],v=r/2;let w=0;_(),s===!1&&(e>0&&E(!0),n>0&&E(!1)),this.setIndex(h),this.setAttribute("position",new $n(f,3)),this.setAttribute("normal",new $n(m,3)),this.setAttribute("uv",new $n(g,2));function _(){const M=new me,T=new me;let A=0;const N=(n-e)/r;for(let P=0;P<=a;P++){const R=[],F=P/a,D=F*(n-e)+e;for(let L=0;L<=i;L++){const q=L/i,I=q*c+o,U=Math.sin(I),k=Math.cos(I);T.x=D*U,T.y=-F*r+v,T.z=D*k,f.push(T.x,T.y,T.z),M.set(U,N,k).normalize(),m.push(M.x,M.y,M.z),g.push(q,1-F),R.push(b++)}y.push(R)}for(let P=0;P<i;P++)for(let R=0;R<a;R++){const F=y[R][P],D=y[R+1][P],L=y[R+1][P+1],q=y[R][P+1];(e>0||R!==0)&&(h.push(F,D,q),A+=3),(n>0||R!==a-1)&&(h.push(D,L,q),A+=3)}l.addGroup(w,A,0),w+=A}function E(M){const T=b,A=new nn,N=new me;let P=0;const R=M===!0?e:n,F=M===!0?1:-1;for(let L=1;L<=i;L++)f.push(0,v*F,0),m.push(0,F,0),g.push(.5,.5),b++;const D=b;for(let L=0;L<=i;L++){const I=L/i*c+o,U=Math.cos(I),k=Math.sin(I);N.x=R*k,N.y=v*F,N.z=R*U,f.push(N.x,N.y,N.z),m.push(0,F,0),A.x=U*.5+.5,A.y=k*.5*F+.5,g.push(A.x,A.y),b++}for(let L=0;L<i;L++){const q=T+L,I=D+L;M===!0?h.push(I,I+1,q):h.push(I+1,I,q),P+=3}l.addGroup(w,P,M===!0?1:2),w+=P}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new at(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class kc extends at{constructor(e=1,n=1,r=32,i=1,a=!1,s=0,o=Math.PI*2){super(0,e,n,r,i,a,s,o),this.type="ConeGeometry",this.parameters={radius:e,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:s,thetaLength:o}}static fromJSON(e){return new kc(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ym extends jr{constructor(e=1,n=1,r=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:r,heightSegments:i};const a=e/2,s=n/2,o=Math.floor(r),c=Math.floor(i),l=o+1,h=c+1,f=e/o,m=n/c,g=[],b=[],y=[],v=[];for(let w=0;w<h;w++){const _=w*m-s;for(let E=0;E<l;E++){const M=E*f-a;b.push(M,-_,0),y.push(0,0,1),v.push(E/o),v.push(1-w/c)}}for(let w=0;w<c;w++)for(let _=0;_<o;_++){const E=_+l*w,M=_+l*(w+1),T=_+1+l*(w+1),A=_+1+l*w;g.push(E,M,A),g.push(M,T,A)}this.setIndex(g),this.setAttribute("position",new $n(b,3)),this.setAttribute("normal",new $n(y,3)),this.setAttribute("uv",new $n(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ym(e.width,e.height,e.widthSegments,e.heightSegments)}}class bC extends jr{constructor(e=.5,n=1,r=32,i=1,a=0,s=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:n,thetaSegments:r,phiSegments:i,thetaStart:a,thetaLength:s},r=Math.max(3,r),i=Math.max(1,i);const o=[],c=[],l=[],h=[];let f=e;const m=(n-e)/i,g=new me,b=new nn;for(let y=0;y<=i;y++){for(let v=0;v<=r;v++){const w=a+v/r*s;g.x=f*Math.cos(w),g.y=f*Math.sin(w),c.push(g.x,g.y,g.z),l.push(0,0,1),b.x=(g.x/n+1)/2,b.y=(g.y/n+1)/2,h.push(b.x,b.y)}f+=m}for(let y=0;y<i;y++){const v=y*(r+1);for(let w=0;w<r;w++){const _=w+v,E=_,M=_+r+1,T=_+r+2,A=_+1;o.push(E,M,A),o.push(M,T,A)}}this.setIndex(o),this.setAttribute("position",new $n(c,3)),this.setAttribute("normal",new $n(l,3)),this.setAttribute("uv",new $n(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new bC(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Ga extends jr{constructor(e=1,n=32,r=16,i=0,a=Math.PI*2,s=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:n,heightSegments:r,phiStart:i,phiLength:a,thetaStart:s,thetaLength:o},n=Math.max(3,Math.floor(n)),r=Math.max(2,Math.floor(r));const c=Math.min(s+o,Math.PI);let l=0;const h=[],f=new me,m=new me,g=[],b=[],y=[],v=[];for(let w=0;w<=r;w++){const _=[],E=w/r;let M=0;w===0&&s===0?M=.5/n:w===r&&c===Math.PI&&(M=-.5/n);for(let T=0;T<=n;T++){const A=T/n;f.x=-e*Math.cos(i+A*a)*Math.sin(s+E*o),f.y=e*Math.cos(s+E*o),f.z=e*Math.sin(i+A*a)*Math.sin(s+E*o),b.push(f.x,f.y,f.z),m.copy(f).normalize(),y.push(m.x,m.y,m.z),v.push(A+M,1-E),_.push(l++)}h.push(_)}for(let w=0;w<r;w++)for(let _=0;_<n;_++){const E=h[w][_+1],M=h[w][_],T=h[w+1][_],A=h[w+1][_+1];(w!==0||s>0)&&g.push(E,M,A),(w!==r-1||c<Math.PI)&&g.push(M,T,A)}this.setIndex(g),this.setAttribute("position",new $n(b,3)),this.setAttribute("normal",new $n(y,3)),this.setAttribute("uv",new $n(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ga(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class zr extends jr{constructor(e=1,n=.4,r=12,i=48,a=Math.PI*2,s=0,o=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:n,radialSegments:r,tubularSegments:i,arc:a,thetaStart:s,thetaLength:o},r=Math.floor(r),i=Math.floor(i);const c=[],l=[],h=[],f=[],m=new me,g=new me,b=new me;for(let y=0;y<=r;y++){const v=s+y/r*o;for(let w=0;w<=i;w++){const _=w/i*a;g.x=(e+n*Math.cos(v))*Math.cos(_),g.y=(e+n*Math.cos(v))*Math.sin(_),g.z=n*Math.sin(v),l.push(g.x,g.y,g.z),m.x=e*Math.cos(_),m.y=e*Math.sin(_),b.subVectors(g,m).normalize(),h.push(b.x,b.y,b.z),f.push(w/i),f.push(y/r)}}for(let y=1;y<=r;y++)for(let v=1;v<=i;v++){const w=(i+1)*y+v-1,_=(i+1)*(y-1)+v-1,E=(i+1)*(y-1)+v,M=(i+1)*y+v;c.push(w,_,M),c.push(_,E,M)}this.setIndex(c),this.setAttribute("position",new $n(l,3)),this.setAttribute("normal",new $n(h,3)),this.setAttribute("uv",new $n(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new zr(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}function Hd(t){const e={};for(const n in t){e[n]={};for(const r in t[n]){const i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(Jt("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][r]=null):e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}function ai(t){const e={};for(let n=0;n<t.length;n++){const r=Hd(t[n]);for(const i in r)e[i]=r[i]}return e}function fTe(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function HG(t){const e=t.getRenderTarget();return e===null?t.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:vn.workingColorSpace}const hTe={clone:Hd,merge:ai};var pTe=`void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,mTe=`void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class Ns extends Pl{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=pTe,this.fragmentShader=mTe,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=Hd(e.uniforms),this.uniformsGroups=fTe(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.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const s=this.uniforms[i].value;s&&s.isTexture?n.uniforms[i]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?n.uniforms[i]={type:"c",value:s.getHex()}:s&&s.isVector2?n.uniforms[i]={type:"v2",value:s.toArray()}:s&&s.isVector3?n.uniforms[i]={type:"v3",value:s.toArray()}:s&&s.isVector4?n.uniforms[i]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?n.uniforms[i]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?n.uniforms[i]={type:"m4",value:s.toArray()}:n.uniforms[i]={value:s}}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 r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class gTe extends Ns{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Oe extends Pl{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new en(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new en(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=jG,this.normalScale=new nn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new As,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class vTe extends Pl{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=EEe,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 yTe extends Pl{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class wC extends br{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new en(e),this.intensity=n}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,n}}const NM=new Ln,u8=new me,d8=new me;class GG{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new nn(512,512),this.mapType=Wi,this.map=null,this.mapPass=null,this.matrix=new Ln,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new xC,this._frameExtents=new nn(1,1),this._viewportCount=1,this._viewports=[new nr(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,r=this.matrix;u8.setFromMatrixPosition(e.matrixWorld),n.position.copy(u8),d8.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(d8),n.updateMatrixWorld(),NM.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(NM,n.coordinateSystem,n.reversedDepth),n.coordinateSystem===Gp||n.reversedDepth?r.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(NM)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}const Mg=new me,Eg=new ff,ts=new me;class WG extends br{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ln,this.projectionMatrix=new Ln,this.projectionMatrixInverse=new Ln,this.coordinateSystem=fs,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.matrixWorld.decompose(Mg,Eg,ts),ts.x===1&&ts.y===1&&ts.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Mg,Eg,ts.set(1,1,1)).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorld.decompose(Mg,Eg,ts),ts.x===1&&ts.y===1&&ts.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Mg,Eg,ts.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}}const Yo=new me,f8=new nn,h8=new nn;class li extends WG{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,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=HA*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(nM*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return HA*2*Math.atan(Math.tan(nM*.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,r){Yo.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Yo.x,Yo.y).multiplyScalar(-e/Yo.z),Yo.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(Yo.x,Yo.y).multiplyScalar(-e/Yo.z)}getViewSize(e,n){return this.getViewBounds(e,f8,h8),n.subVectors(h8,f8)}setViewOffset(e,n,r,i,a,s){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=r,this.view.offsetY=i,this.view.width=a,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(nM*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,a=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const c=s.fullWidth,l=s.fullHeight;a+=s.offsetX*i/c,n-=s.offsetY*r/l,i*=s.width/c,r*=s.height/l}const o=this.filmOffset;o!==0&&(a+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+i,n,n-r,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}}class xTe extends GG{constructor(){super(new li(90,1,.5,500)),this.isPointLightShadow=!0}}class Sc extends wC{constructor(e,n,r=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=i,this.shadow=new xTe}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const n=super.toJSON(e);return n.object.distance=this.distance,n.object.decay=this.decay,n.object.shadow=this.shadow.toJSON(),n}}class _C extends WG{constructor(e=-1,n=1,r=1,i=-1,a=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=a,this.far=s,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,r,i,a,s){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=r,this.view.offsetY=i,this.view.width=a,this.view.height=s,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),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let a=r-e,s=r+e,o=i+n,c=i-n;if(this.view!==null&&this.view.enabled){const l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a+=l*this.view.offsetX,s=a+l*this.view.width,o-=h*this.view.offsetY,c=o-h*this.view.height}this.projectionMatrix.makeOrthographic(a,s,o,c,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 bTe extends GG{constructor(){super(new _C(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class SC extends wC{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(br.DEFAULT_UP),this.updateMatrix(),this.target=new br,this.shadow=new bTe}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const n=super.toJSON(e);return n.object.shadow=this.shadow.toJSON(),n.object.target=this.target.uuid,n}}class MC extends wC{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}const ku=-90,Lu=1;class wTe extends br{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new li(ku,Lu,e,n);i.layers=this.layers,this.add(i);const a=new li(ku,Lu,e,n);a.layers=this.layers,this.add(a);const s=new li(ku,Lu,e,n);s.layers=this.layers,this.add(s);const o=new li(ku,Lu,e,n);o.layers=this.layers,this.add(o);const c=new li(ku,Lu,e,n);c.layers=this.layers,this.add(c);const l=new li(ku,Lu,e,n);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,a,s,o,c]=n;for(const l of n)this.remove(l);if(e===fs)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),a.up.set(0,0,-1),a.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===Gp)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),a.up.set(0,0,1),a.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const l of n)this.add(l),l.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[a,s,o,c,l,h]=this.children,f=e.getRenderTarget(),m=e.getActiveCubeFace(),g=e.getActiveMipmapLevel(),b=e.xr.enabled;e.xr.enabled=!1;const y=r.texture.generateMipmaps;r.texture.generateMipmaps=!1;let v=!1;e.isWebGLRenderer===!0?v=e.state.buffers.depth.getReversed():v=e.reversedDepthBuffer,e.setRenderTarget(r,0,i),v&&e.autoClear===!1&&e.clearDepth(),e.render(n,a),e.setRenderTarget(r,1,i),v&&e.autoClear===!1&&e.clearDepth(),e.render(n,s),e.setRenderTarget(r,2,i),v&&e.autoClear===!1&&e.clearDepth(),e.render(n,o),e.setRenderTarget(r,3,i),v&&e.autoClear===!1&&e.clearDepth(),e.render(n,c),e.setRenderTarget(r,4,i),v&&e.autoClear===!1&&e.clearDepth(),e.render(n,l),r.texture.generateMipmaps=y,e.setRenderTarget(r,5,i),v&&e.autoClear===!1&&e.clearDepth(),e.render(n,h),e.setRenderTarget(f,m,g),e.xr.enabled=b,r.texture.needsPMREMUpdate=!0}}class _Te extends li{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}const p8=new Ln;class STe{constructor(e,n,r=0,i=1/0){this.ray=new Tx(e,n),this.near=r,this.far=i,this.camera=null,this.layers=new vC,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,n){this.ray.set(e,n)}setFromCamera(e,n){n.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(n).sub(this.ray.origin).normalize(),this.camera=n):n.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld),this.camera=n):pn("Raycaster: Unsupported camera type: "+n.type)}setFromXRController(e){return p8.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(p8),this}intersectObject(e,n=!0,r=[]){return WA(e,this,r,n),r.sort(m8),r}intersectObjects(e,n=!0,r=[]){for(let i=0,a=e.length;i<a;i++)WA(e[i],this,r,n);return r.sort(m8),r}}function m8(t,e){return t.distance-e.distance}function WA(t,e,n,r){let i=!0;if(t.layers.test(e.layers)&&t.raycast(e,n)===!1&&(i=!1),i===!0&&r===!0){const a=t.children;for(let s=0,o=a.length;s<o;s++)WA(a[s],e,n,!0)}}class MTe{constructor(e=1,n=0,r=0){this.radius=e,this.phi=n,this.theta=r}set(e,n,r){return this.radius=e,this.phi=n,this.theta=r,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=dn(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,r){return this.radius=Math.sqrt(e*e+n*n+r*r),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,r),this.phi=Math.acos(dn(n/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class EC extends cTe{constructor(e=10,n=10,r=4473924,i=8947848){r=new en(r),i=new en(i);const a=n/2,s=e/n,o=e/2,c=[],l=[];for(let m=0,g=0,b=-o;m<=n;m++,b+=s){c.push(-o,0,b,o,0,b),c.push(b,0,-o,b,0,o);const y=m===a?r:i;y.toArray(l,g),g+=3,y.toArray(l,g),g+=3,y.toArray(l,g),g+=3,y.toArray(l,g),g+=3}const h=new jr;h.setAttribute("position",new $n(c,3)),h.setAttribute("color",new $n(l,3));const f=new BG({vertexColors:!0,toneMapped:!1});super(h,f),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}function g8(t,e,n,r){const i=ETe(r);switch(n){case PG:return t*e;case RG:return t*e/i.components*i.byteLength;case dC:return t*e/i.components*i.byteLength;case $d:return t*e*2/i.components*i.byteLength;case fC:return t*e*2/i.components*i.byteLength;case CG:return t*e*3/i.components*i.byteLength;case za:return t*e*4/i.components*i.byteLength;case hC:return t*e*4/i.components*i.byteLength;case Xg:case Kg:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Yg:case Zg:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case fA:case pA:return Math.max(t,16)*Math.max(e,8)/4;case dA:case hA:return Math.max(t,8)*Math.max(e,8)/2;case mA:case gA:case yA:case xA:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case vA:case bA:case wA:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case _A:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case SA:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case MA:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case EA:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case TA:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case AA:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case NA:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case PA:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case CA:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case RA:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case jA:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case OA:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case IA:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case DA:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case kA:case LA:case FA:return Math.ceil(t/4)*Math.ceil(e/4)*16;case UA:case BA:return Math.ceil(t/4)*Math.ceil(e/4)*8;case zA:case $A:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function ETe(t){switch(t){case Wi:case EG:return{byteLength:1,components:1};case Vp:case TG:case vo:return{byteLength:2,components:1};case cC:case uC:return{byteLength:2,components:4};case Ts:case lC:case ds:return{byteLength:4,components:1};case AG:case NG:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:aC}}));typeof window<"u"&&(window.__THREE__?Jt("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=aC);/**
* @license
* Copyright 2010-2026 Three.js Authors
* SPDX-License-Identifier: MIT
*/function qG(){let t=null,e=!1,n=null,r=null;function i(a,s){n(a,s),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(a){n=a},setContext:function(a){t=a}}}function TTe(t){const e=new WeakMap;function n(o,c){const l=o.array,h=o.usage,f=l.byteLength,m=t.createBuffer();t.bindBuffer(c,m),t.bufferData(c,l,h),o.onUploadCallback();let g;if(l instanceof Float32Array)g=t.FLOAT;else if(typeof Float16Array<"u"&&l instanceof Float16Array)g=t.HALF_FLOAT;else if(l instanceof Uint16Array)o.isFloat16BufferAttribute?g=t.HALF_FLOAT:g=t.UNSIGNED_SHORT;else if(l instanceof Int16Array)g=t.SHORT;else if(l instanceof Uint32Array)g=t.UNSIGNED_INT;else if(l instanceof Int32Array)g=t.INT;else if(l instanceof Int8Array)g=t.BYTE;else if(l instanceof Uint8Array)g=t.UNSIGNED_BYTE;else if(l instanceof Uint8ClampedArray)g=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+l);return{buffer:m,type:g,bytesPerElement:l.BYTES_PER_ELEMENT,version:o.version,size:f}}function r(o,c,l){const h=c.array,f=c.updateRanges;if(t.bindBuffer(l,o),f.length===0)t.bufferSubData(l,0,h);else{f.sort((g,b)=>g.start-b.start);let m=0;for(let g=1;g<f.length;g++){const b=f[m],y=f[g];y.start<=b.start+b.count+1?b.count=Math.max(b.count,y.start+y.count-b.start):(++m,f[m]=y)}f.length=m+1;for(let g=0,b=f.length;g<b;g++){const y=f[g];t.bufferSubData(l,y.start*h.BYTES_PER_ELEMENT,h,y.start,y.count)}c.clearUpdateRanges()}c.onUploadCallback()}function i(o){return o.isInterleavedBufferAttribute&&(o=o.data),e.get(o)}function a(o){o.isInterleavedBufferAttribute&&(o=o.data);const c=e.get(o);c&&(t.deleteBuffer(c.buffer),e.delete(o))}function s(o,c){if(o.isInterleavedBufferAttribute&&(o=o.data),o.isGLBufferAttribute){const h=e.get(o);(!h||h.version<o.version)&&e.set(o,{buffer:o.buffer,type:o.type,bytesPerElement:o.elementSize,version:o.version});return}const l=e.get(o);if(l===void 0)e.set(o,n(o,c));else if(l.version<o.version){if(l.size!==o.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.");r(l.buffer,o,c),l.version=o.version}}return{get:i,remove:a,update:s}}var ATe=`#ifdef USE_ALPHAHASH
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
#endif`,NTe=`#ifdef USE_ALPHAHASH
const float ALPHA_HASH_SCALE = 0.05;
float hash2D( vec2 value ) {
return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
}
float hash3D( vec3 value ) {
return hash2D( vec2( hash2D( value.xy ), value.z ) );
}
float getAlphaHashThreshold( vec3 position ) {
float maxDeriv = max(
length( dFdx( position.xyz ) ),
length( dFdy( position.xyz ) )
);
float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
vec2 pixScales = vec2(
exp2( floor( log2( pixScale ) ) ),
exp2( ceil( log2( pixScale ) ) )
);
vec2 alpha = vec2(
hash3D( floor( pixScales.x * position.xyz ) ),
hash3D( floor( pixScales.y * position.xyz ) )
);
float lerpFactor = fract( log2( pixScale ) );
float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
float a = min( lerpFactor, 1.0 - lerpFactor );
vec3 cases = vec3(
x * x / ( 2.0 * a * ( 1.0 - a ) ),
( x - 0.5 * a ) / ( 1.0 - a ),
1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
);
float threshold = ( x < ( 1.0 - a ) )
? ( ( x < a ) ? cases.x : cases.y )
: cases.z;
return clamp( threshold , 1.0e-6, 1.0 );
}
#endif`,PTe=`#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
#endif`,CTe=`#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,RTe=`#ifdef USE_ALPHATEST
#ifdef ALPHA_TO_COVERAGE
diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
if ( diffuseColor.a == 0.0 ) discard;
#else
if ( diffuseColor.a < alphaTest ) discard;
#endif
#endif`,jTe=`#ifdef USE_ALPHATEST
uniform float alphaTest;
#endif`,OTe=`#ifdef USE_AOMAP
float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
reflectedLight.indirectDiffuse *= ambientOcclusion;
#if defined( USE_CLEARCOAT )
clearcoatSpecularIndirect *= ambientOcclusion;
#endif
#if defined( USE_SHEEN )
sheenSpecularIndirect *= ambientOcclusion;
#endif
#if defined( USE_ENVMAP ) && defined( STANDARD )
float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
#endif
#endif`,ITe=`#ifdef USE_AOMAP
uniform sampler2D aoMap;
uniform float aoMapIntensity;
#endif`,DTe=`#ifdef USE_BATCHING
#if ! defined( GL_ANGLE_multi_draw )
#define gl_DrawID _gl_DrawID
uniform int _gl_DrawID;
#endif
uniform highp sampler2D batchingTexture;
uniform highp usampler2D batchingIdTexture;
mat4 getBatchingMatrix( const in float i ) {
int size = textureSize( batchingTexture, 0 ).x;
int j = int( i ) * 4;
int x = j % size;
int y = j / size;
vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
return mat4( v1, v2, v3, v4 );
}
float getIndirectIndex( const in int i ) {
int size = textureSize( batchingIdTexture, 0 ).x;
int x = i % size;
int y = i / size;
return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
}
#endif
#ifdef USE_BATCHING_COLOR
uniform sampler2D batchingColorTexture;
vec4 getBatchingColor( const in float i ) {
int size = textureSize( batchingColorTexture, 0 ).x;
int j = int( i );
int x = j % size;
int y = j / size;
return texelFetch( batchingColorTexture, ivec2( x, y ), 0 );
}
#endif`,kTe=`#ifdef USE_BATCHING
mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
#endif`,LTe=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
vPosition = vec3( position );
#endif`,FTe=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
vec3 objectTangent = vec3( tangent.xyz );
#endif`,UTe=`float G_BlinnPhong_Implicit( ) {
return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
vec3 halfDir = normalize( lightDir + viewDir );
float dotNH = saturate( dot( normal, halfDir ) );
float dotVH = saturate( dot( viewDir, halfDir ) );
vec3 F = F_Schlick( specularColor, 1.0, dotVH );
float G = G_BlinnPhong_Implicit( );
float D = D_BlinnPhong( shininess, dotNH );
return F * ( G * D );
} // validated`,BTe=`#ifdef USE_IRIDESCENCE
const mat3 XYZ_TO_REC709 = mat3(
3.2404542, -0.9692660, 0.0556434,
-1.5371385, 1.8760108, -0.2040259,
-0.4985314, 0.0415560, 1.0572252
);
vec3 Fresnel0ToIor( vec3 fresnel0 ) {
vec3 sqrtF0 = sqrt( fresnel0 );
return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
}
vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
}
float IorToFresnel0( float transmittedIor, float incidentIor ) {
return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
}
vec3 evalSensitivity( float OPD, vec3 shift ) {
float phase = 2.0 * PI * OPD * 1.0e-9;
vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
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 ) );
xyz /= 1.0685e-7;
vec3 rgb = XYZ_TO_REC709 * xyz;
return rgb;
}
vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
vec3 I;
float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
float cosTheta2Sq = 1.0 - sinTheta2Sq;
if ( cosTheta2Sq < 0.0 ) {
return vec3( 1.0 );
}
float cosTheta2 = sqrt( cosTheta2Sq );
float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
float R12 = F_Schlick( R0, 1.0, cosTheta1 );
float T121 = 1.0 - R12;
float phi12 = 0.0;
if ( iridescenceIOR < outsideIOR ) phi12 = PI;
float phi21 = PI - phi12;
vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
vec3 phi23 = vec3( 0.0 );
if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
vec3 phi = vec3( phi21 ) + phi23;
vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
vec3 r123 = sqrt( R123 );
vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
vec3 C0 = R12 + Rs;
I = C0;
vec3 Cm = Rs - T121;
for ( int m = 1; m <= 2; ++ m ) {
Cm *= r123;
vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
I += Cm * Sm;
}
return max( I, vec3( 0.0 ) );
}
#endif`,zTe=`#ifdef USE_BUMPMAP
uniform sampler2D bumpMap;
uniform float bumpScale;
vec2 dHdxy_fwd() {
vec2 dSTdx = dFdx( vBumpMapUv );
vec2 dSTdy = dFdy( vBumpMapUv );
float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
return vec2( dBx, dBy );
}
vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
vec3 vN = surf_norm;
vec3 R1 = cross( vSigmaY, vN );
vec3 R2 = cross( vN, vSigmaX );
float fDet = dot( vSigmaX, R1 ) * faceDirection;
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
return normalize( abs( fDet ) * surf_norm - vGrad );
}
#endif`,$Te=`#if NUM_CLIPPING_PLANES > 0
vec4 plane;
#ifdef ALPHA_TO_COVERAGE
float distanceToPlane, distanceGradient;
float clipOpacity = 1.0;
#pragma unroll_loop_start
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
distanceGradient = fwidth( distanceToPlane ) / 2.0;
clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
if ( clipOpacity == 0.0 ) discard;
}
#pragma unroll_loop_end
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
float unionClipOpacity = 1.0;
#pragma unroll_loop_start
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
distanceGradient = fwidth( distanceToPlane ) / 2.0;
unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
}
#pragma unroll_loop_end
clipOpacity *= 1.0 - unionClipOpacity;
#endif
diffuseColor.a *= clipOpacity;
if ( diffuseColor.a == 0.0 ) discard;
#else
#pragma unroll_loop_start
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
}
#pragma unroll_loop_end
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
bool clipped = true;
#pragma unroll_loop_start
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
}
#pragma unroll_loop_end
if ( clipped ) discard;
#endif
#endif
#endif`,VTe=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,HTe=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
#endif`,GTe=`#if NUM_CLIPPING_PLANES > 0
vClipPosition = - mvPosition.xyz;
#endif`,WTe=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
diffuseColor *= vColor;
#endif`,qTe=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#endif`,XTe=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
varying vec4 vColor;
#endif`,KTe=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
vColor = vec4( 1.0 );
#endif
#ifdef USE_COLOR_ALPHA
vColor *= color;
#elif defined( USE_COLOR )
vColor.rgb *= color;
#endif
#ifdef USE_INSTANCING_COLOR
vColor.rgb *= instanceColor.rgb;
#endif
#ifdef USE_BATCHING_COLOR
vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) );
#endif`,YTe=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
vec3 pow2( const in vec3 x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
highp float rand( const in vec2 uv ) {
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
return fract( sin( sn ) * c );
}
#ifdef HIGH_PRECISION
float precisionSafeLength( vec3 v ) { return length( v ); }
#else
float precisionSafeLength( vec3 v ) {
float maxComponent = max3( abs( v ) );
return length( v / maxComponent ) * maxComponent;
}
#endif
struct IncidentLight {
vec3 color;
vec3 direction;
bool visible;
};
struct ReflectedLight {
vec3 directDiffuse;
vec3 directSpecular;
vec3 indirectDiffuse;
vec3 indirectSpecular;
};
#ifdef USE_ALPHAHASH
varying vec3 vPosition;
#endif
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
bool isPerspectiveMatrix( mat4 m ) {
return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
return vec2( u, v );
}
vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
}
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
} // validated`,ZTe=`#ifdef ENVMAP_TYPE_CUBE_UV
#define cubeUV_minMipLevel 4.0
#define cubeUV_minTileSize 16.0
float getFace( vec3 direction ) {
vec3 absDirection = abs( direction );
float face = - 1.0;
if ( absDirection.x > absDirection.z ) {
if ( absDirection.x > absDirection.y )
face = direction.x > 0.0 ? 0.0 : 3.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
} else {
if ( absDirection.z > absDirection.y )
face = direction.z > 0.0 ? 2.0 : 5.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
}
return face;
}
vec2 getUV( vec3 direction, float face ) {
vec2 uv;
if ( face == 0.0 ) {
uv = vec2( direction.z, direction.y ) / abs( direction.x );
} else if ( face == 1.0 ) {
uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
} else if ( face == 2.0 ) {
uv = vec2( - direction.x, direction.y ) / abs( direction.z );
} else if ( face == 3.0 ) {
uv = vec2( - direction.z, direction.y ) / abs( direction.x );
} else if ( face == 4.0 ) {
uv = vec2( - direction.x, direction.z ) / abs( direction.y );
} else {
uv = vec2( direction.x, direction.y ) / abs( direction.z );
}
return 0.5 * ( uv + 1.0 );
}
vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
float face = getFace( direction );
float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
mipInt = max( mipInt, cubeUV_minMipLevel );
float faceSize = exp2( mipInt );
highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
if ( face > 2.0 ) {
uv.y += faceSize;
face -= 3.0;
}
uv.x += face * faceSize;
uv.x += filterInt * 3.0 * cubeUV_minTileSize;
uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
uv.x *= CUBEUV_TEXEL_WIDTH;
uv.y *= CUBEUV_TEXEL_HEIGHT;
#ifdef texture2DGradEXT
return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
#else
return texture2D( envMap, uv ).rgb;
#endif
}
#define cubeUV_r0 1.0
#define cubeUV_m0 - 2.0
#define cubeUV_r1 0.8
#define cubeUV_m1 - 1.0
#define cubeUV_r4 0.4
#define cubeUV_m4 2.0
#define cubeUV_r5 0.305
#define cubeUV_m5 3.0
#define cubeUV_r6 0.21
#define cubeUV_m6 4.0
float roughnessToMip( float roughness ) {
float mip = 0.0;
if ( roughness >= cubeUV_r1 ) {
mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
} else if ( roughness >= cubeUV_r4 ) {
mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
} else if ( roughness >= cubeUV_r5 ) {
mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
} else if ( roughness >= cubeUV_r6 ) {
mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
} else {
mip = - 2.0 * log2( 1.16 * roughness ); }
return mip;
}
vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
float mipF = fract( mip );
float mipInt = floor( mip );
vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
if ( mipF == 0.0 ) {
return vec4( color0, 1.0 );
} else {
vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
return vec4( mix( color0, color1, mipF ), 1.0 );
}
}
#endif`,JTe=`vec3 transformedNormal = objectNormal;
#ifdef USE_TANGENT
vec3 transformedTangent = objectTangent;
#endif
#ifdef USE_BATCHING
mat3 bm = mat3( batchingMatrix );
transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
transformedNormal = bm * transformedNormal;
#ifdef USE_TANGENT
transformedTangent = bm * transformedTangent;
#endif
#endif
#ifdef USE_INSTANCING
mat3 im = mat3( instanceMatrix );
transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
transformedNormal = im * transformedNormal;
#ifdef USE_TANGENT
transformedTangent = im * transformedTangent;
#endif
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
#ifdef FLIP_SIDED
transformedTangent = - transformedTangent;
#endif
#endif`,QTe=`#ifdef USE_DISPLACEMENTMAP
uniform sampler2D displacementMap;
uniform float displacementScale;
uniform float displacementBias;
#endif`,eAe=`#ifdef USE_DISPLACEMENTMAP
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
#endif`,tAe=`#ifdef USE_EMISSIVEMAP
vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
emissiveColor = sRGBTransferEOTF( emissiveColor );
#endif
totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,nAe=`#ifdef USE_EMISSIVEMAP
uniform sampler2D emissiveMap;
#endif`,rAe="gl_FragColor = linearToOutputTexel( gl_FragColor );",iAe=`vec4 LinearTransferOETF( in vec4 value ) {
return value;
}
vec4 sRGBTransferEOTF( in vec4 value ) {
return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
}
vec4 sRGBTransferOETF( in vec4 value ) {
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 );
}`,aAe=`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vec3 cameraToFrag;
if ( isOrthographic ) {
cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToFrag = normalize( vWorldPosition - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vec3 reflectVec = reflect( cameraToFrag, worldNormal );
#else
vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
#endif
#else
vec3 reflectVec = vReflect;
#endif
#ifdef ENVMAP_TYPE_CUBE
vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
#ifdef ENVMAP_BLENDING_MULTIPLY
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_MIX )
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_ADD )
outgoingLight += envColor.xyz * specularStrength * reflectivity;
#endif
#endif
#endif`,sAe=`#ifdef USE_ENVMAP
uniform float envMapIntensity;
uniform float flipEnvMap;
uniform mat3 envMapRotation;
#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#else
uniform sampler2D envMap;
#endif
#endif`,oAe=`#ifdef USE_ENVMAP
uniform float reflectivity;
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
uniform float refractionRatio;
#else
varying vec3 vReflect;
#endif
#endif`,lAe=`#ifdef USE_ENVMAP
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
#else
varying vec3 vReflect;
uniform float refractionRatio;
#endif
#endif`,cAe=`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vWorldPosition = worldPosition.xyz;
#else
vec3 cameraToVertex;
if ( isOrthographic ) {
cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vReflect = reflect( cameraToVertex, worldNormal );
#else
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
#endif
#endif
#endif`,uAe=`#ifdef USE_FOG
vFogDepth = - mvPosition.z;
#endif`,dAe=`#ifdef USE_FOG
varying float vFogDepth;
#endif`,fAe=`#ifdef USE_FOG
#ifdef FOG_EXP2
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
#else
float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
#endif
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,hAe=`#ifdef USE_FOG
uniform vec3 fogColor;
varying float vFogDepth;
#ifdef FOG_EXP2
uniform float fogDensity;
#else
uniform float fogNear;
uniform float fogFar;
#endif
#endif`,pAe=`#ifdef USE_GRADIENTMAP
uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
float dotNL = dot( normal, lightDirection );
vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
#ifdef USE_GRADIENTMAP
return vec3( texture2D( gradientMap, coord ).r );
#else
vec2 fw = fwidth( coord ) * 0.5;
return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
#endif
}`,mAe=`#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightMapIntensity;
#endif`,gAe=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularStrength = specularStrength;`,vAe=`varying vec3 vViewPosition;
struct LambertMaterial {
vec3 diffuseColor;
float specularStrength;
};
void 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 ) {
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void 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 ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Lambert
#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,yAe=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
#if defined( USE_LIGHT_PROBES )
uniform vec3 lightProbe[ 9 ];
#endif
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
float x = normal.x, y = normal.y, z = normal.z;
vec3 result = shCoefficients[ 0 ] * 0.886227;
result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
vec3 irradiance = ambientLightColor;
return irradiance;
}
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
if ( cutoffDistance > 0.0 ) {
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
}
return distanceFalloff;
}
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
return smoothstep( coneCosine, penumbraCosine, angleCosine );
}
#if NUM_DIR_LIGHTS > 0
struct DirectionalLight {
vec3 direction;
vec3 color;
};
uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
light.color = directionalLight.color;
light.direction = directionalLight.direction;
light.visible = true;
}
#endif
#if NUM_POINT_LIGHTS > 0
struct PointLight {
vec3 position;
vec3 color;
float distance;
float decay;
};
uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
vec3 lVector = pointLight.position - geometryPosition;
light.direction = normalize( lVector );
float lightDistance = length( lVector );
light.color = pointLight.color;
light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
light.visible = ( light.color != vec3( 0.0 ) );
}
#endif
#if NUM_SPOT_LIGHTS > 0
struct SpotLight {
vec3 position;
vec3 direction;
vec3 color;
float distance;
float decay;
float coneCos;
float penumbraCos;
};
uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
vec3 lVector = spotLight.position - geometryPosition;
light.direction = normalize( lVector );
float angleCos = dot( light.direction, spotLight.direction );
float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
if ( spotAttenuation > 0.0 ) {
float lightDistance = length( lVector );
light.color = spotLight.color * spotAttenuation;
light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
light.visible = ( light.color != vec3( 0.0 ) );
} else {
light.color = vec3( 0.0 );
light.visible = false;
}
}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
struct RectAreaLight {
vec3 color;
vec3 position;
vec3 halfWidth;
vec3 halfHeight;
};
uniform sampler2D ltc_1; uniform sampler2D ltc_2;
uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
struct HemisphereLight {
vec3 direction;
vec3 skyColor;
vec3 groundColor;
};
uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
float dotNL = dot( normal, hemiLight.direction );
float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
return irradiance;
}
#endif`,xAe=`#ifdef USE_ENVMAP
vec3 getIBLIrradiance( const in vec3 normal ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
return PI * envMapColor.rgb * envMapIntensity;
#else
return vec3( 0.0 );
#endif
}
vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 reflectVec = reflect( - viewDir, normal );
reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
return envMapColor.rgb * envMapIntensity;
#else
return vec3( 0.0 );
#endif
}
#ifdef USE_ANISOTROPY
vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 bentNormal = cross( bitangent, viewDir );
bentNormal = normalize( cross( bentNormal, bitangent ) );
bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
return getIBLRadiance( viewDir, bentNormal, roughness );
#else
return vec3( 0.0 );
#endif
}
#endif
#endif`,bAe=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,wAe=`varying vec3 vViewPosition;
struct ToonMaterial {
vec3 diffuseColor;
};
void 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 ) {
vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void 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 ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Toon
#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,_Ae=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,SAe=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
vec3 diffuseColor;
vec3 specularColor;
float specularShininess;
float specularStrength;
};
void 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 ) {
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void 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 ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_BlinnPhong
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,MAe=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );
material.metalness = metalnessFactor;
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
material.roughness = min( material.roughness, 1.0 );
#ifdef IOR
material.ior = ior;
#ifdef USE_SPECULAR
float specularIntensityFactor = specularIntensity;
vec3 specularColorFactor = specularColor;
#ifdef USE_SPECULAR_COLORMAP
specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
#endif
material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
#else
float specularIntensityFactor = 1.0;
vec3 specularColorFactor = vec3( 1.0 );
material.specularF90 = 1.0;
#endif
material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;
material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );
#else
material.specularColor = vec3( 0.04 );
material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );
material.specularF90 = 1.0;
#endif
#ifdef USE_CLEARCOAT
material.clearcoat = clearcoat;
material.clearcoatRoughness = clearcoatRoughness;
material.clearcoatF0 = vec3( 0.04 );
material.clearcoatF90 = 1.0;
#ifdef USE_CLEARCOATMAP
material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
#endif
material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
material.clearcoatRoughness += geometryRoughness;
material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_DISPERSION
material.dispersion = dispersion;
#endif
#ifdef USE_IRIDESCENCE
material.iridescence = iridescence;
material.iridescenceIOR = iridescenceIOR;
#ifdef USE_IRIDESCENCEMAP
material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
#else
material.iridescenceThickness = iridescenceThicknessMaximum;
#endif
#endif
#ifdef USE_SHEEN
material.sheenColor = sheenColor;
#ifdef USE_SHEEN_COLORMAP
material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
#endif
material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );
#ifdef USE_SHEEN_ROUGHNESSMAP
material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
#endif
#endif
#ifdef USE_ANISOTROPY
#ifdef USE_ANISOTROPYMAP
mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
#else
vec2 anisotropyV = anisotropyVector;
#endif
material.anisotropy = length( anisotropyV );
if( material.anisotropy == 0.0 ) {
anisotropyV = vec2( 1.0, 0.0 );
} else {
anisotropyV /= material.anisotropy;
material.anisotropy = saturate( material.anisotropy );
}
material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
#endif`,EAe=`uniform sampler2D dfgLUT;
struct PhysicalMaterial {
vec3 diffuseColor;
vec3 diffuseContribution;
vec3 specularColor;
vec3 specularColorBlended;
float roughness;
float metalness;
float specularF90;
float dispersion;
#ifdef USE_CLEARCOAT
float clearcoat;
float clearcoatRoughness;
vec3 clearcoatF0;
float clearcoatF90;
#endif
#ifdef USE_IRIDESCENCE
float iridescence;
float iridescenceIOR;
float iridescenceThickness;
vec3 iridescenceFresnel;
vec3 iridescenceF0;
vec3 iridescenceFresnelDielectric;
vec3 iridescenceFresnelMetallic;
#endif
#ifdef USE_SHEEN
vec3 sheenColor;
float sheenRoughness;
#endif
#ifdef IOR
float ior;
#endif
#ifdef USE_TRANSMISSION
float transmission;
float transmissionAlpha;
float thickness;
float attenuationDistance;
vec3 attenuationColor;
#endif
#ifdef USE_ANISOTROPY
float anisotropy;
float alphaT;
vec3 anisotropyT;
vec3 anisotropyB;
#endif
};
vec3 clearcoatSpecularDirect = vec3( 0.0 );
vec3 clearcoatSpecularIndirect = vec3( 0.0 );
vec3 sheenSpecularDirect = vec3( 0.0 );
vec3 sheenSpecularIndirect = vec3(0.0 );
vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
float x2 = x * x;
float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
}
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
float a2 = pow2( alpha );
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
float a2 = pow2( alpha );
float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
return RECIPROCAL_PI * a2 / pow2( denom );
}
#ifdef USE_ANISOTROPY
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 ) {
float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
float v = 0.5 / ( gv + gl );
return v;
}
float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
float a2 = alphaT * alphaB;
highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
highp float v2 = dot( v, v );
float w2 = a2 / v2;
return RECIPROCAL_PI * a2 * pow2 ( w2 );
}
#endif
#ifdef USE_CLEARCOAT
vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
vec3 f0 = material.clearcoatF0;
float f90 = material.clearcoatF90;
float roughness = material.clearcoatRoughness;
float alpha = pow2( roughness );
vec3 halfDir = normalize( lightDir + viewDir );
float dotNL = saturate( dot( normal, lightDir ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float dotVH = saturate( dot( viewDir, halfDir ) );
vec3 F = F_Schlick( f0, f90, dotVH );
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
float D = D_GGX( alpha, dotNH );
return F * ( V * D );
}
#endif
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
vec3 f0 = material.specularColorBlended;
float f90 = material.specularF90;
float roughness = material.roughness;
float alpha = pow2( roughness );
vec3 halfDir = normalize( lightDir + viewDir );
float dotNL = saturate( dot( normal, lightDir ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float dotVH = saturate( dot( viewDir, halfDir ) );
vec3 F = F_Schlick( f0, f90, dotVH );
#ifdef USE_IRIDESCENCE
F = mix( F, material.iridescenceFresnel, material.iridescence );
#endif
#ifdef USE_ANISOTROPY
float dotTL = dot( material.anisotropyT, lightDir );
float dotTV = dot( material.anisotropyT, viewDir );
float dotTH = dot( material.anisotropyT, halfDir );
float dotBL = dot( material.anisotropyB, lightDir );
float dotBV = dot( material.anisotropyB, viewDir );
float dotBH = dot( material.anisotropyB, halfDir );
float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
#else
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
float D = D_GGX( alpha, dotNH );
#endif
return F * ( V * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
const float LUT_SIZE = 64.0;
const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
const float LUT_BIAS = 0.5 / LUT_SIZE;
float dotNV = saturate( dot( N, V ) );
vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
uv = uv * LUT_SCALE + LUT_BIAS;
return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
float l = length( f );
return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
float x = dot( v1, v2 );
float y = abs( x );
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
float b = 3.4175940 + ( 4.1616724 + y ) * y;
float v = a / b;
float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
vec3 lightNormal = cross( v1, v2 );
if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
vec3 T1, T2;
T1 = normalize( V - N * dot( V, N ) );
T2 = - cross( N, T1 );
mat3 mat = mInv * transpose( mat3( T1, T2, N ) );
vec3 coords[ 4 ];
coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
coords[ 0 ] = normalize( coords[ 0 ] );
coords[ 1 ] = normalize( coords[ 1 ] );
coords[ 2 ] = normalize( coords[ 2 ] );
coords[ 3 ] = normalize( coords[ 3 ] );
vec3 vectorFormFactor = vec3( 0.0 );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
return vec3( result );
}
#if defined( USE_SHEEN )
float D_Charlie( float roughness, float dotNH ) {
float alpha = pow2( roughness );
float invAlpha = 1.0 / alpha;
float cos2h = dotNH * dotNH;
float sin2h = max( 1.0 - cos2h, 0.0078125 );
return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
}
float V_Neubelt( float dotNV, float dotNL ) {
return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
}
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
vec3 halfDir = normalize( lightDir + viewDir );
float dotNL = saturate( dot( normal, lightDir ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float D = D_Charlie( sheenRoughness, dotNH );
float V = V_Neubelt( dotNV, dotNL );
return sheenColor * ( D * V );
}
#endif
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
float dotNV = saturate( dot( normal, viewDir ) );
float r2 = roughness * roughness;
float rInv = 1.0 / ( roughness + 0.1 );
float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;
float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;
float DG = exp( a * dotNV + b );
return saturate( DG );
}
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
float dotNV = saturate( dot( normal, viewDir ) );
vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;
return specularColor * fab.x + specularF90 * fab.y;
}
#ifdef USE_IRIDESCENCE
void 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 ) {
#else
void 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 ) {
#endif
float dotNV = saturate( dot( normal, viewDir ) );
vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;
#ifdef USE_IRIDESCENCE
vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
#else
vec3 Fr = specularColor;
#endif
vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
float Ess = fab.x + fab.y;
float Ems = 1.0 - Ess;
vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
singleScatter += FssEss;
multiScatter += Fms * Ems;
}
vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
float dotNL = saturate( dot( normal, lightDir ) );
float dotNV = saturate( dot( normal, viewDir ) );
vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;
vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;
vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;
vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;
float Ess_V = dfgV.x + dfgV.y;
float Ess_L = dfgL.x + dfgL.y;
float Ems_V = 1.0 - Ess_V;
float Ems_L = 1.0 - Ess_L;
vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;
vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );
float compensationFactor = Ems_V * Ems_L;
vec3 multiScatter = Fms * compensationFactor;
return singleScatter + multiScatter;
}
#if NUM_RECT_AREA_LIGHTS > 0
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 ) {
vec3 normal = geometryNormal;
vec3 viewDir = geometryViewDir;
vec3 position = geometryPosition;
vec3 lightPos = rectAreaLight.position;
vec3 halfWidth = rectAreaLight.halfWidth;
vec3 halfHeight = rectAreaLight.halfHeight;
vec3 lightColor = rectAreaLight.color;
float roughness = material.roughness;
vec3 rectCoords[ 4 ];
rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
vec2 uv = LTC_Uv( normal, viewDir, roughness );
vec4 t1 = texture2D( ltc_1, uv );
vec4 t2 = texture2D( ltc_2, uv );
mat3 mInv = mat3(
vec3( t1.x, 0, t1.y ),
vec3( 0, 1, 0 ),
vec3( t1.z, 0, t1.w )
);
vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y );
reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
#ifdef USE_CLEARCOAT
vec3 Ncc = geometryClearcoatNormal;
vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness );
vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat );
vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat );
mat3 mInvClearcoat = mat3(
vec3( t1Clearcoat.x, 0, t1Clearcoat.y ),
vec3( 0, 1, 0 ),
vec3( t1Clearcoat.z, 0, t1Clearcoat.w )
);
vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y;
clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords );
#endif
}
#endif
void 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 ) {
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
#ifdef USE_CLEARCOAT
float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
vec3 ccIrradiance = dotNLcc * directLight.color;
clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
#endif
#ifdef USE_SHEEN
sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );
float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );
irradiance *= sheenEnergyComp;
#endif
reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );
}
void 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 ) {
vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );
#ifdef USE_SHEEN
float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;
diffuse *= sheenEnergyComp;
#endif
reflectedLight.indirectDiffuse += diffuse;
}
void 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) {
#ifdef USE_CLEARCOAT
clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
#endif
#ifdef USE_SHEEN
sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;
#endif
vec3 singleScatteringDielectric = vec3( 0.0 );
vec3 multiScatteringDielectric = vec3( 0.0 );
vec3 singleScatteringMetallic = vec3( 0.0 );
vec3 multiScatteringMetallic = vec3( 0.0 );
#ifdef USE_IRIDESCENCE
computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );
computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );
#else
computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );
computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );
#endif
vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );
vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );
vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;
vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );
vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
vec3 indirectSpecular = radiance * singleScattering;
indirectSpecular += multiScattering * cosineWeightedIrradiance;
vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;
#ifdef USE_SHEEN
float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;
indirectSpecular *= sheenEnergyComp;
indirectDiffuse *= sheenEnergyComp;
#endif
reflectedLight.indirectSpecular += indirectSpecular;
reflectedLight.indirectDiffuse += indirectDiffuse;
}
#define RE_Direct RE_Direct_Physical
#define RE_Direct_RectArea RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,TAe=`
vec3 geometryPosition = - vViewPosition;
vec3 geometryNormal = normal;
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
vec3 geometryClearcoatNormal = vec3( 0.0 );
#ifdef USE_CLEARCOAT
geometryClearcoatNormal = clearcoatNormal;
#endif
#ifdef USE_IRIDESCENCE
float dotNVi = saturate( dot( normal, geometryViewDir ) );
if ( material.iridescenceThickness == 0.0 ) {
material.iridescence = 0.0;
} else {
material.iridescence = saturate( material.iridescence );
}
if ( material.iridescence > 0.0 ) {
material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );
material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );
material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
}
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
PointLight pointLight;
#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
PointLightShadow pointLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
pointLight = pointLights[ i ];
getPointLightInfo( pointLight, geometryPosition, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )
pointLightShadow = pointLightShadows[ i ];
directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
#endif
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
SpotLight spotLight;
vec4 spotColor;
vec3 spotLightCoord;
bool inSpotLightMap;
#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
spotLight = spotLights[ i ];
getSpotLightInfo( spotLight, geometryPosition, directLight );
#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
#else
#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
#endif
#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
#endif
#undef SPOT_LIGHT_MAP_INDEX
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
spotLightShadow = spotLightShadows[ i ];
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
DirectionalLight directionalLight;
#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
directionalLight = directionalLights[ i ];
getDirectionalLightInfo( directionalLight, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
directionalLightShadow = directionalLightShadows[ i ];
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
RectAreaLight rectAreaLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
rectAreaLight = rectAreaLights[ i ];
RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
vec3 iblIrradiance = vec3( 0.0 );
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
#if defined( USE_LIGHT_PROBES )
irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
#endif
#if ( NUM_HEMI_LIGHTS > 0 )
#pragma unroll_loop_start
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
}
#pragma unroll_loop_end
#endif
#endif
#if defined( RE_IndirectSpecular )
vec3 radiance = vec3( 0.0 );
vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,AAe=`#if defined( RE_IndirectDiffuse )
#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
irradiance += lightMapIrradiance;
#endif
#if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV )
#if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG )
iblIrradiance += getIBLIrradiance( geometryNormal );
#endif
#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
#ifdef USE_ANISOTROPY
radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
#else
radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
#endif
#ifdef USE_CLEARCOAT
clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
#endif
#endif`,NAe=`#if defined( RE_IndirectDiffuse )
#if defined( LAMBERT ) || defined( PHONG )
irradiance += iblIrradiance;
#endif
RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif`,PAe=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,CAe=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
uniform float logDepthBufFC;
varying float vFragDepth;
varying float vIsPerspective;
#endif`,RAe=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
varying float vFragDepth;
varying float vIsPerspective;
#endif`,jAe=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
vFragDepth = 1.0 + gl_Position.w;
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
#endif`,OAe=`#ifdef USE_MAP
vec4 sampledDiffuseColor = texture2D( map, vMapUv );
#ifdef DECODE_VIDEO_TEXTURE
sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
#endif
diffuseColor *= sampledDiffuseColor;
#endif`,IAe=`#ifdef USE_MAP
uniform sampler2D map;
#endif`,DAe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
#if defined( USE_POINTS_UV )
vec2 uv = vUv;
#else
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
#endif
#endif
#ifdef USE_MAP
diffuseColor *= texture2D( map, uv );
#endif
#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,kAe=`#if defined( USE_POINTS_UV )
varying vec2 vUv;
#else
#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
uniform mat3 uvTransform;
#endif
#endif
#ifdef USE_MAP
uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,LAe=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
metalnessFactor *= texelMetalness.b;
#endif`,FAe=`#ifdef USE_METALNESSMAP
uniform sampler2D metalnessMap;
#endif`,UAe=`#ifdef USE_INSTANCING_MORPH
float morphTargetInfluences[ MORPHTARGETS_COUNT ];
float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
}
#endif`,BAe=`#if defined( USE_MORPHCOLORS )
vColor *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
#if defined( USE_COLOR_ALPHA )
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
#elif defined( USE_COLOR )
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
#endif
}
#endif`,zAe=`#ifdef USE_MORPHNORMALS
objectNormal *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
}
#endif`,$Ae=`#ifdef USE_MORPHTARGETS
#ifndef USE_INSTANCING_MORPH
uniform float morphTargetBaseInfluence;
uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
#endif
uniform sampler2DArray morphTargetsTexture;
uniform ivec2 morphTargetsTextureSize;
vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
int y = texelIndex / morphTargetsTextureSize.x;
int x = texelIndex - y * morphTargetsTextureSize.x;
ivec3 morphUV = ivec3( x, y, morphTargetIndex );
return texelFetch( morphTargetsTexture, morphUV, 0 );
}
#endif`,VAe=`#ifdef USE_MORPHTARGETS
transformed *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
}
#endif`,HAe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
vec3 fdx = dFdx( vViewPosition );
vec3 fdy = dFdy( vViewPosition );
vec3 normal = normalize( cross( fdx, fdy ) );
#else
vec3 normal = normalize( vNormal );
#ifdef DOUBLE_SIDED
normal *= faceDirection;
#endif
#endif
#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
#ifdef USE_TANGENT
mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
#else
mat3 tbn = getTangentFrame( - vViewPosition, normal,
#if defined( USE_NORMALMAP )
vNormalMapUv
#elif defined( USE_CLEARCOAT_NORMALMAP )
vClearcoatNormalMapUv
#else
vUv
#endif
);
#endif
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
tbn[0] *= faceDirection;
tbn[1] *= faceDirection;
#endif
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
#ifdef USE_TANGENT
mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
#else
mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
#endif
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
tbn2[0] *= faceDirection;
tbn2[1] *= faceDirection;
#endif
#endif
vec3 nonPerturbedNormal = normal;`,GAe=`#ifdef USE_NORMALMAP_OBJECTSPACE
normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
#ifdef FLIP_SIDED
normal = - normal;
#endif
#ifdef DOUBLE_SIDED
normal = normal * faceDirection;
#endif
normal = normalize( normalMatrix * normal );
#elif defined( USE_NORMALMAP_TANGENTSPACE )
vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
mapN.xy *= normalScale;
normal = normalize( tbn * mapN );
#elif defined( USE_BUMPMAP )
normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,WAe=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,qAe=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,XAe=`#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#ifdef USE_TANGENT
vTangent = normalize( transformedTangent );
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
#endif
#endif`,KAe=`#ifdef USE_NORMALMAP
uniform sampler2D normalMap;
uniform vec2 normalScale;
#endif
#ifdef USE_NORMALMAP_OBJECTSPACE
uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
vec3 q0 = dFdx( eye_pos.xyz );
vec3 q1 = dFdy( eye_pos.xyz );
vec2 st0 = dFdx( uv.st );
vec2 st1 = dFdy( uv.st );
vec3 N = surf_norm;
vec3 q1perp = cross( q1, N );
vec3 q0perp = cross( N, q0 );
vec3 T = q1perp * st0.x + q0perp * st1.x;
vec3 B = q1perp * st0.y + q0perp * st1.y;
float det = max( dot( T, T ), dot( B, B ) );
float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
return mat3( T * scale, B * scale, N );
}
#endif`,YAe=`#ifdef USE_CLEARCOAT
vec3 clearcoatNormal = nonPerturbedNormal;
#endif`,ZAe=`#ifdef USE_CLEARCOAT_NORMALMAP
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
clearcoatMapN.xy *= clearcoatNormalScale;
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
#endif`,JAe=`#ifdef USE_CLEARCOATMAP
uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
uniform sampler2D clearcoatNormalMap;
uniform vec2 clearcoatNormalScale;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
uniform sampler2D clearcoatRoughnessMap;
#endif`,QAe=`#ifdef USE_IRIDESCENCEMAP
uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
uniform sampler2D iridescenceThicknessMap;
#endif`,eNe=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,tNe=`vec3 packNormalToRGB( const in vec3 normal ) {
return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
const float Inv255 = 1. / 255.;
const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
vec4 packDepthToRGBA( const in float v ) {
if( v <= 0.0 )
return vec4( 0., 0., 0., 0. );
if( v >= 1.0 )
return vec4( 1., 1., 1., 1. );
float vuf;
float af = modf( v * PackFactors.a, vuf );
float bf = modf( vuf * ShiftRight8, vuf );
float gf = modf( vuf * ShiftRight8, vuf );
return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
}
vec3 packDepthToRGB( const in float v ) {
if( v <= 0.0 )
return vec3( 0., 0., 0. );
if( v >= 1.0 )
return vec3( 1., 1., 1. );
float vuf;
float bf = modf( v * PackFactors.b, vuf );
float gf = modf( vuf * ShiftRight8, vuf );
return vec3( vuf * Inv255, gf * PackUpscale, bf );
}
vec2 packDepthToRG( const in float v ) {
if( v <= 0.0 )
return vec2( 0., 0. );
if( v >= 1.0 )
return vec2( 1., 1. );
float vuf;
float gf = modf( v * 256., vuf );
return vec2( vuf * Inv255, gf );
}
float unpackRGBAToDepth( const in vec4 v ) {
return dot( v, UnpackFactors4 );
}
float unpackRGBToDepth( const in vec3 v ) {
return dot( v, UnpackFactors3 );
}
float unpackRGToDepth( const in vec2 v ) {
return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
}
vec4 pack2HalfToRGBA( const in vec2 v ) {
vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
}
vec2 unpackRGBATo2Half( const in vec4 v ) {
return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
#ifdef USE_REVERSED_DEPTH_BUFFER
return depth * ( far - near ) - far;
#else
return depth * ( near - far ) - near;
#endif
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
#ifdef USE_REVERSED_DEPTH_BUFFER
return ( near * far ) / ( ( near - far ) * depth - near );
#else
return ( near * far ) / ( ( far - near ) * depth - far );
#endif
}`,nNe=`#ifdef PREMULTIPLIED_ALPHA
gl_FragColor.rgb *= gl_FragColor.a;
#endif`,rNe=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
mvPosition = batchingMatrix * mvPosition;
#endif
#ifdef USE_INSTANCING
mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,iNe=`#ifdef DITHERING
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,aNe=`#ifdef DITHERING
vec3 dithering( vec3 color ) {
float grid_position = rand( gl_FragCoord.xy );
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
return color + dither_shift_RGB;
}
#endif`,sNe=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
roughnessFactor *= texelRoughness.g;
#endif`,oNe=`#ifdef USE_ROUGHNESSMAP
uniform sampler2D roughnessMap;
#endif`,lNe=`#if NUM_SPOT_LIGHT_COORDS > 0
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#if NUM_SPOT_LIGHT_MAPS > 0
uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
#endif
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
#if defined( SHADOWMAP_TYPE_PCF )
uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
#else
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
#endif
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowIntensity;
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
#if defined( SHADOWMAP_TYPE_PCF )
uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
#else
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
struct SpotLightShadow {
float shadowIntensity;
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
#if defined( SHADOWMAP_TYPE_PCF )
uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
#elif defined( SHADOWMAP_TYPE_BASIC )
uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
#endif
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowIntensity;
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
#if defined( SHADOWMAP_TYPE_PCF )
float interleavedGradientNoise( vec2 position ) {
return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );
}
vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {
const float goldenAngle = 2.399963229728653;
float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );
float theta = float( sampleIndex ) * goldenAngle + phi;
return vec2( cos( theta ), sin( theta ) ) * r;
}
#endif
#if defined( SHADOWMAP_TYPE_PCF )
float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
float shadow = 1.0;
shadowCoord.xyz /= shadowCoord.w;
shadowCoord.z += shadowBias;
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
if ( frustumTest ) {
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
float radius = shadowRadius * texelSize.x;
float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;
shadow = (
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +
texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )
) * 0.2;
}
return mix( 1.0, shadow, shadowIntensity );
}
#elif defined( SHADOWMAP_TYPE_VSM )
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
float shadow = 1.0;
shadowCoord.xyz /= shadowCoord.w;
#ifdef USE_REVERSED_DEPTH_BUFFER
shadowCoord.z -= shadowBias;
#else
shadowCoord.z += shadowBias;
#endif
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
if ( frustumTest ) {
vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;
float mean = distribution.x;
float variance = distribution.y * distribution.y;
#ifdef USE_REVERSED_DEPTH_BUFFER
float hard_shadow = step( mean, shadowCoord.z );
#else
float hard_shadow = step( shadowCoord.z, mean );
#endif
if ( hard_shadow == 1.0 ) {
shadow = 1.0;
} else {
variance = max( variance, 0.0000001 );
float d = shadowCoord.z - mean;
float p_max = variance / ( variance + d * d );
p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );
shadow = max( hard_shadow, p_max );
}
}
return mix( 1.0, shadow, shadowIntensity );
}
#else
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
float shadow = 1.0;
shadowCoord.xyz /= shadowCoord.w;
#ifdef USE_REVERSED_DEPTH_BUFFER
shadowCoord.z -= shadowBias;
#else
shadowCoord.z += shadowBias;
#endif
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
if ( frustumTest ) {
float depth = texture2D( shadowMap, shadowCoord.xy ).r;
#ifdef USE_REVERSED_DEPTH_BUFFER
shadow = step( depth, shadowCoord.z );
#else
shadow = step( shadowCoord.z, depth );
#endif
}
return mix( 1.0, shadow, shadowIntensity );
}
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
#if defined( SHADOWMAP_TYPE_PCF )
float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
float shadow = 1.0;
vec3 lightToPosition = shadowCoord.xyz;
vec3 bd3D = normalize( lightToPosition );
vec3 absVec = abs( lightToPosition );
float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );
if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {
#ifdef USE_REVERSED_DEPTH_BUFFER
float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
dp -= shadowBias;
#else
float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
dp += shadowBias;
#endif
float texelSize = shadowRadius / shadowMapSize.x;
vec3 absDir = abs( bd3D );
vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );
tangent = normalize( cross( bd3D, tangent ) );
vec3 bitangent = cross( bd3D, tangent );
float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;
vec2 sample0 = vogelDiskSample( 0, 5, phi );
vec2 sample1 = vogelDiskSample( 1, 5, phi );
vec2 sample2 = vogelDiskSample( 2, 5, phi );
vec2 sample3 = vogelDiskSample( 3, 5, phi );
vec2 sample4 = vogelDiskSample( 4, 5, phi );
shadow = (
texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) +
texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) +
texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) +
texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) +
texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) )
) * 0.2;
}
return mix( 1.0, shadow, shadowIntensity );
}
#elif defined( SHADOWMAP_TYPE_BASIC )
float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
float shadow = 1.0;
vec3 lightToPosition = shadowCoord.xyz;
vec3 absVec = abs( lightToPosition );
float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );
if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {
float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
dp += shadowBias;
vec3 bd3D = normalize( lightToPosition );
float depth = textureCube( shadowMap, bd3D ).r;
#ifdef USE_REVERSED_DEPTH_BUFFER
depth = 1.0 - depth;
#endif
shadow = step( dp, depth );
}
return mix( 1.0, shadow, shadowIntensity );
}
#endif
#endif
#endif`,cNe=`#if NUM_SPOT_LIGHT_COORDS > 0
uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowIntensity;
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
struct SpotLightShadow {
float shadowIntensity;
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowIntensity;
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
#endif`,uNe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
vec4 shadowWorldPosition;
#endif
#if defined( USE_SHADOWMAP )
#if NUM_DIR_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#endif
#if NUM_SPOT_LIGHT_COORDS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
shadowWorldPosition = worldPosition;
#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
#endif
vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif`,dNe=`float getShadowMask() {
float shadow = 1.0;
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
directionalLight = directionalLightShadows[ i ];
shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
spotLight = spotLightShadows[ i ];
shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )
PointLightShadow pointLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
pointLight = pointLightShadows[ i ];
shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
}
#pragma unroll_loop_end
#endif
#endif
return shadow;
}`,fNe=`#ifdef USE_SKINNING
mat4 boneMatX = getBoneMatrix( skinIndex.x );
mat4 boneMatY = getBoneMatrix( skinIndex.y );
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,hNe=`#ifdef USE_SKINNING
uniform mat4 bindMatrix;
uniform mat4 bindMatrixInverse;
uniform highp sampler2D boneTexture;
mat4 getBoneMatrix( const in float i ) {
int size = textureSize( boneTexture, 0 ).x;
int j = int( i ) * 4;
int x = j % size;
int y = j / size;
vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
return mat4( v1, v2, v3, v4 );
}
#endif`,pNe=`#ifdef USE_SKINNING
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
vec4 skinned = vec4( 0.0 );
skinned += boneMatX * skinVertex * skinWeight.x;
skinned += boneMatY * skinVertex * skinWeight.y;
skinned += boneMatZ * skinVertex * skinWeight.z;
skinned += boneMatW * skinVertex * skinWeight.w;
transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,mNe=`#ifdef USE_SKINNING
mat4 skinMatrix = mat4( 0.0 );
skinMatrix += skinWeight.x * boneMatX;
skinMatrix += skinWeight.y * boneMatY;
skinMatrix += skinWeight.z * boneMatZ;
skinMatrix += skinWeight.w * boneMatW;
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
#ifdef USE_TANGENT
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#endif
#endif`,gNe=`float specularStrength;
#ifdef USE_SPECULARMAP
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
specularStrength = texelSpecular.r;
#else
specularStrength = 1.0;
#endif`,vNe=`#ifdef USE_SPECULARMAP
uniform sampler2D specularMap;
#endif`,yNe=`#if defined( TONE_MAPPING )
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,xNe=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
return saturate( toneMappingExposure * color );
}
vec3 ReinhardToneMapping( vec3 color ) {
color *= toneMappingExposure;
return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 CineonToneMapping( vec3 color ) {
color *= toneMappingExposure;
color = max( vec3( 0.0 ), color - 0.004 );
return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
const mat3 ACESInputMat = mat3(
vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),
vec3( 0.04823, 0.01566, 0.83777 )
);
const mat3 ACESOutputMat = mat3(
vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),
vec3( -0.07367, -0.00605, 1.07602 )
);
color *= toneMappingExposure / 0.6;
color = ACESInputMat * color;
color = RRTAndODTFit( color );
color = ACESOutputMat * color;
return saturate( color );
}
const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
vec3( 1.6605, - 0.1246, - 0.0182 ),
vec3( - 0.5876, 1.1329, - 0.1006 ),
vec3( - 0.0728, - 0.0083, 1.1187 )
);
const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
vec3( 0.6274, 0.0691, 0.0164 ),
vec3( 0.3293, 0.9195, 0.0880 ),
vec3( 0.0433, 0.0113, 0.8956 )
);
vec3 agxDefaultContrastApprox( vec3 x ) {
vec3 x2 = x * x;
vec3 x4 = x2 * x2;
return + 15.5 * x4 * x2
- 40.14 * x4 * x
+ 31.96 * x4
- 6.868 * x2 * x
+ 0.4298 * x2
+ 0.1191 * x
- 0.00232;
}
vec3 AgXToneMapping( vec3 color ) {
const mat3 AgXInsetMatrix = mat3(
vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
);
const mat3 AgXOutsetMatrix = mat3(
vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
);
const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;
color *= toneMappingExposure;
color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
color = AgXInsetMatrix * color;
color = max( color, 1e-10 ); color = log2( color );
color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
color = clamp( color, 0.0, 1.0 );
color = agxDefaultContrastApprox( color );
color = AgXOutsetMatrix * color;
color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
color = clamp( color, 0.0, 1.0 );
return color;
}
vec3 NeutralToneMapping( vec3 color ) {
const float StartCompression = 0.8 - 0.04;
const float Desaturation = 0.15;
color *= toneMappingExposure;
float x = min( color.r, min( color.g, color.b ) );
float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
color -= offset;
float peak = max( color.r, max( color.g, color.b ) );
if ( peak < StartCompression ) return color;
float d = 1. - StartCompression;
float newPeak = 1. - d * d / ( peak + d - StartCompression );
color *= newPeak / peak;
float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
return mix( color, vec3( newPeak ), g );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,bNe=`#ifdef USE_TRANSMISSION
material.transmission = transmission;
material.transmissionAlpha = 1.0;
material.thickness = thickness;
material.attenuationDistance = attenuationDistance;
material.attenuationColor = attenuationColor;
#ifdef USE_TRANSMISSIONMAP
material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
#endif
#ifdef USE_THICKNESSMAP
material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
#endif
vec3 pos = vWorldPosition;
vec3 v = normalize( cameraPosition - pos );
vec3 n = inverseTransformDirection( normal, viewMatrix );
vec4 transmitted = getIBLVolumeRefraction(
n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,
pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
material.attenuationColor, material.attenuationDistance );
material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
#endif`,wNe=`#ifdef USE_TRANSMISSION
uniform float transmission;
uniform float thickness;
uniform float attenuationDistance;
uniform vec3 attenuationColor;
#ifdef USE_TRANSMISSIONMAP
uniform sampler2D transmissionMap;
#endif
#ifdef USE_THICKNESSMAP
uniform sampler2D thicknessMap;
#endif
uniform vec2 transmissionSamplerSize;
uniform sampler2D transmissionSamplerMap;
uniform mat4 modelMatrix;
uniform mat4 projectionMatrix;
varying vec3 vWorldPosition;
float w0( float a ) {
return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
}
float w1( float a ) {
return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );
}
float w2( float a ){
return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
}
float w3( float a ) {
return ( 1.0 / 6.0 ) * ( a * a * a );
}
float g0( float a ) {
return w0( a ) + w1( a );
}
float g1( float a ) {
return w2( a ) + w3( a );
}
float h0( float a ) {
return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
}
float h1( float a ) {
return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
}
vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
uv = uv * texelSize.zw + 0.5;
vec2 iuv = floor( uv );
vec2 fuv = fract( uv );
float g0x = g0( fuv.x );
float g1x = g1( fuv.x );
float h0x = h0( fuv.x );
float h1x = h1( fuv.x );
float h0y = h0( fuv.y );
float h1y = h1( fuv.y );
vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
}
vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
vec2 fLodSizeInv = 1.0 / fLodSize;
vec2 cLodSizeInv = 1.0 / cLodSize;
vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
return mix( fSample, cSample, fract( lod ) );
}
vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
vec3 modelScale;
modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
return normalize( refractionVector ) * thickness * modelScale;
}
float applyIorToRoughness( const in float roughness, const in float ior ) {
return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
}
vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
}
vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
if ( isinf( attenuationDistance ) ) {
return vec3( 1.0 );
} else {
vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;
}
}
vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
const in vec3 attenuationColor, const in float attenuationDistance ) {
vec4 transmittedLight;
vec3 transmittance;
#ifdef USE_DISPERSION
float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
for ( int i = 0; i < 3; i ++ ) {
vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
vec3 refractedRayExit = position + transmissionRay;
vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
vec2 refractionCoords = ndcPos.xy / ndcPos.w;
refractionCoords += 1.0;
refractionCoords /= 2.0;
vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
transmittedLight[ i ] = transmissionSample[ i ];
transmittedLight.a += transmissionSample.a;
transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
}
transmittedLight.a /= 3.0;
#else
vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
vec3 refractedRayExit = position + transmissionRay;
vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
vec2 refractionCoords = ndcPos.xy / ndcPos.w;
refractionCoords += 1.0;
refractionCoords /= 2.0;
transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
#endif
vec3 attenuatedColor = transmittance * transmittedLight.rgb;
vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
}
#endif`,_Ne=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
varying vec2 vUv;
#endif
#ifdef USE_MAP
varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
varying vec2 vNormalMapUv;
#endif
#ifdef USE_EMISSIVEMAP
varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_SPECULARMAP
varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
uniform mat3 transmissionMapTransform;
varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
uniform mat3 thicknessMapTransform;
varying vec2 vThicknessMapUv;
#endif`,SNe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
varying vec2 vUv;
#endif
#ifdef USE_MAP
uniform mat3 mapTransform;
varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
uniform mat3 alphaMapTransform;
varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
uniform mat3 lightMapTransform;
varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
uniform mat3 aoMapTransform;
varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
uniform mat3 bumpMapTransform;
varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
uniform mat3 normalMapTransform;
varying vec2 vNormalMapUv;
#endif
#ifdef USE_DISPLACEMENTMAP
uniform mat3 displacementMapTransform;
varying vec2 vDisplacementMapUv;
#endif
#ifdef USE_EMISSIVEMAP
uniform mat3 emissiveMapTransform;
varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
uniform mat3 metalnessMapTransform;
varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
uniform mat3 roughnessMapTransform;
varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
uniform mat3 anisotropyMapTransform;
varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
uniform mat3 clearcoatMapTransform;
varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
uniform mat3 clearcoatNormalMapTransform;
varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
uniform mat3 clearcoatRoughnessMapTransform;
varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
uniform mat3 sheenColorMapTransform;
varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
uniform mat3 sheenRoughnessMapTransform;
varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
uniform mat3 iridescenceMapTransform;
varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
uniform mat3 iridescenceThicknessMapTransform;
varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SPECULARMAP
uniform mat3 specularMapTransform;
varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
uniform mat3 specularColorMapTransform;
varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
uniform mat3 specularIntensityMapTransform;
varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
uniform mat3 transmissionMapTransform;
varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
uniform mat3 thicknessMapTransform;
varying vec2 vThicknessMapUv;
#endif`,MNe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
vUv = vec3( uv, 1 ).xy;
#endif
#ifdef USE_MAP
vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ALPHAMAP
vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_LIGHTMAP
vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_AOMAP
vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_BUMPMAP
vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_NORMALMAP
vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_DISPLACEMENTMAP
vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_EMISSIVEMAP
vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_METALNESSMAP
vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ROUGHNESSMAP
vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ANISOTROPYMAP
vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOATMAP
vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCEMAP
vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_COLORMAP
vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULARMAP
vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_COLORMAP
vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_TRANSMISSIONMAP
vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_THICKNESSMAP
vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
#endif`,ENe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
vec4 worldPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
worldPosition = batchingMatrix * worldPosition;
#endif
#ifdef USE_INSTANCING
worldPosition = instanceMatrix * worldPosition;
#endif
worldPosition = modelMatrix * worldPosition;
#endif`;const TNe=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,ANe=`uniform sampler2D t2D;
uniform float backgroundIntensity;
varying vec2 vUv;
void main() {
vec4 texColor = texture2D( t2D, vUv );
#ifdef DECODE_VIDEO_TEXTURE
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 );
#endif
texColor.rgb *= backgroundIntensity;
gl_FragColor = texColor;
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,NNe=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,PNe=`#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#elif defined( ENVMAP_TYPE_CUBE_UV )
uniform sampler2D envMap;
#endif
uniform float flipEnvMap;
uniform float backgroundBlurriness;
uniform float backgroundIntensity;
uniform mat3 backgroundRotation;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
#ifdef ENVMAP_TYPE_CUBE
vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
#else
vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
#endif
texColor.rgb *= backgroundIntensity;
gl_FragColor = texColor;
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,CNe=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,RNe=`uniform samplerCube tCube;
uniform float tFlip;
uniform float opacity;
varying vec3 vWorldDirection;
void main() {
vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
gl_FragColor = texColor;
gl_FragColor.a *= opacity;
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,jNe=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
#include <uv_vertex>
#include <batching_vertex>
#include <skinbase_vertex>
#include <morphinstance_vertex>
#ifdef USE_DISPLACEMENTMAP
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vHighPrecisionZW = gl_Position.zw;
}`,ONe=`#if DEPTH_PACKING == 3200
uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
vec4 diffuseColor = vec4( 1.0 );
#include <clipping_planes_fragment>
#if DEPTH_PACKING == 3200
diffuseColor.a = opacity;
#endif
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <logdepthbuf_fragment>
#ifdef USE_REVERSED_DEPTH_BUFFER
float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];
#else
float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;
#endif
#if DEPTH_PACKING == 3200
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
#elif DEPTH_PACKING == 3201
gl_FragColor = packDepthToRGBA( fragCoordZ );
#elif DEPTH_PACKING == 3202
gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
#elif DEPTH_PACKING == 3203
gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
#endif
}`,INe=`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <batching_vertex>
#include <skinbase_vertex>
#include <morphinstance_vertex>
#ifdef USE_DISPLACEMENTMAP
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <worldpos_vertex>
#include <clipping_planes_vertex>
vWorldPosition = worldPosition.xyz;
}`,DNe=`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
vec4 diffuseColor = vec4( 1.0 );
#include <clipping_planes_fragment>
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
float dist = length( vWorldPosition - referencePosition );
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
dist = saturate( dist );
gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );
}`,kNe=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}`,LNe=`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
gl_FragColor = texture2D( tEquirect, sampleUV );
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,FNe=`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
vLineDistance = scale * lineDistance;
#include <uv_vertex>
#include <color_vertex>
#include <morphinstance_vertex>
#include <morphcolor_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}`,UNe=`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
if ( mod( vLineDistance, totalSize ) > dashSize ) {
discard;
}
vec3 outgoingLight = vec3( 0.0 );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
outgoingLight = diffuseColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}`,BNe=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphinstance_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <worldpos_vertex>
#include <envmap_vertex>
#include <fog_vertex>
}`,zNe=`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <specularmap_fragment>
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
#else
reflectedLight.indirectDiffuse += vec3( 1.0 );
#endif
#include <aomap_fragment>
reflectedLight.indirectDiffuse *= diffuseColor.rgb;
vec3 outgoingLight = reflectedLight.indirectDiffuse;
#include <envmap_fragment>
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,$Ne=`#define LAMBERT
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphinstance_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,VNe=`#define LAMBERT
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_lambert_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <specularmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_lambert_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
#include <envmap_fragment>
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,HNe=`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphinstance_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
vViewPosition = - mvPosition.xyz;
}`,GNe=`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
vec3 viewDir = normalize( vViewPosition );
vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
vec3 y = cross( viewDir, x );
vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
#ifdef USE_MATCAP
vec4 matcapColor = texture2D( matcap, uv );
#else
vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
#endif
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,WNe=`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
varying vec3 vViewPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphinstance_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
vViewPosition = - mvPosition.xyz;
#endif
}`,qNe=`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
varying vec3 vViewPosition;
#endif
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
#include <clipping_planes_fragment>
#include <logdepthbuf_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );
#ifdef OPAQUE
gl_FragColor.a = 1.0;
#endif
}`,XNe=`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphinstance_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,KNe=`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <specularmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_phong_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
#include <envmap_fragment>
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,YNe=`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
varying vec3 vWorldPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphinstance_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
#ifdef USE_TRANSMISSION
vWorldPosition = worldPosition.xyz;
#endif
}`,ZNe=`#define STANDARD
#ifdef PHYSICAL
#define IOR
#define USE_SPECULAR
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef IOR
uniform float ior;
#endif
#ifdef USE_SPECULAR
uniform float specularIntensity;
uniform vec3 specularColor;
#ifdef USE_SPECULAR_COLORMAP
uniform sampler2D specularColorMap;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
uniform sampler2D specularIntensityMap;
#endif
#endif
#ifdef USE_CLEARCOAT
uniform float clearcoat;
uniform float clearcoatRoughness;
#endif
#ifdef USE_DISPERSION
uniform float dispersion;
#endif
#ifdef USE_IRIDESCENCE
uniform float iridescence;
uniform float iridescenceIOR;
uniform float iridescenceThicknessMinimum;
uniform float iridescenceThicknessMaximum;
#endif
#ifdef USE_SHEEN
uniform vec3 sheenColor;
uniform float sheenRoughness;
#ifdef USE_SHEEN_COLORMAP
uniform sampler2D sheenColorMap;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
uniform sampler2D sheenRoughnessMap;
#endif
#endif
#ifdef USE_ANISOTROPY
uniform vec2 anisotropyVector;
#ifdef USE_ANISOTROPYMAP
uniform sampler2D anisotropyMap;
#endif
#endif
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <iridescence_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_physical_pars_fragment>
#include <transmission_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <iridescence_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <roughnessmap_fragment>
#include <metalnessmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <clearcoat_normal_fragment_begin>
#include <clearcoat_normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_physical_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
#include <transmission_fragment>
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
#ifdef USE_SHEEN
outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;
#endif
#ifdef USE_CLEARCOAT
float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
#endif
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,JNe=`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphinstance_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,QNe=`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_toon_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,ePe=`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
#ifdef USE_POINTS_UV
varying vec2 vUv;
uniform mat3 uvTransform;
#endif
void main() {
#ifdef USE_POINTS_UV
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
#endif
#include <color_vertex>
#include <morphinstance_vertex>
#include <morphcolor_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <project_vertex>
gl_PointSize = size;
#ifdef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
#endif
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <worldpos_vertex>
#include <fog_vertex>
}`,tPe=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
#include <logdepthbuf_fragment>
#include <map_particle_fragment>
#include <color_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
outgoingLight = diffuseColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}`,nPe=`#include <common>
#include <batching_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphinstance_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,rPe=`uniform vec3 color;
uniform float opacity;
#include <common>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <logdepthbuf_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
#include <logdepthbuf_fragment>
gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}`,iPe=`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
vec4 mvPosition = modelViewMatrix[ 3 ];
vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
#ifndef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
if ( isPerspective ) scale *= - mvPosition.z;
#endif
vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
vec2 rotatedPosition;
rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
mvPosition.xy += rotatedPosition;
gl_Position = projectionMatrix * mvPosition;
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}`,aPe=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
outgoingLight = diffuseColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
}`,rn={alphahash_fragment:ATe,alphahash_pars_fragment:NTe,alphamap_fragment:PTe,alphamap_pars_fragment:CTe,alphatest_fragment:RTe,alphatest_pars_fragment:jTe,aomap_fragment:OTe,aomap_pars_fragment:ITe,batching_pars_vertex:DTe,batching_vertex:kTe,begin_vertex:LTe,beginnormal_vertex:FTe,bsdfs:UTe,iridescence_fragment:BTe,bumpmap_pars_fragment:zTe,clipping_planes_fragment:$Te,clipping_planes_pars_fragment:VTe,clipping_planes_pars_vertex:HTe,clipping_planes_vertex:GTe,color_fragment:WTe,color_pars_fragment:qTe,color_pars_vertex:XTe,color_vertex:KTe,common:YTe,cube_uv_reflection_fragment:ZTe,defaultnormal_vertex:JTe,displacementmap_pars_vertex:QTe,displacementmap_vertex:eAe,emissivemap_fragment:tAe,emissivemap_pars_fragment:nAe,colorspace_fragment:rAe,colorspace_pars_fragment:iAe,envmap_fragment:aAe,envmap_common_pars_fragment:sAe,envmap_pars_fragment:oAe,envmap_pars_vertex:lAe,envmap_physical_pars_fragment:xAe,envmap_vertex:cAe,fog_vertex:uAe,fog_pars_vertex:dAe,fog_fragment:fAe,fog_pars_fragment:hAe,gradientmap_pars_fragment:pAe,lightmap_pars_fragment:mAe,lights_lambert_fragment:gAe,lights_lambert_pars_fragment:vAe,lights_pars_begin:yAe,lights_toon_fragment:bAe,lights_toon_pars_fragment:wAe,lights_phong_fragment:_Ae,lights_phong_pars_fragment:SAe,lights_physical_fragment:MAe,lights_physical_pars_fragment:EAe,lights_fragment_begin:TAe,lights_fragment_maps:AAe,lights_fragment_end:NAe,logdepthbuf_fragment:PAe,logdepthbuf_pars_fragment:CAe,logdepthbuf_pars_vertex:RAe,logdepthbuf_vertex:jAe,map_fragment:OAe,map_pars_fragment:IAe,map_particle_fragment:DAe,map_particle_pars_fragment:kAe,metalnessmap_fragment:LAe,metalnessmap_pars_fragment:FAe,morphinstance_vertex:UAe,morphcolor_vertex:BAe,morphnormal_vertex:zAe,morphtarget_pars_vertex:$Ae,morphtarget_vertex:VAe,normal_fragment_begin:HAe,normal_fragment_maps:GAe,normal_pars_fragment:WAe,normal_pars_vertex:qAe,normal_vertex:XAe,normalmap_pars_fragment:KAe,clearcoat_normal_fragment_begin:YAe,clearcoat_normal_fragment_maps:ZAe,clearcoat_pars_fragment:JAe,iridescence_pars_fragment:QAe,opaque_fragment:eNe,packing:tNe,premultiplied_alpha_fragment:nNe,project_vertex:rNe,dithering_fragment:iNe,dithering_pars_fragment:aNe,roughnessmap_fragment:sNe,roughnessmap_pars_fragment:oNe,shadowmap_pars_fragment:lNe,shadowmap_pars_vertex:cNe,shadowmap_vertex:uNe,shadowmask_pars_fragment:dNe,skinbase_vertex:fNe,skinning_pars_vertex:hNe,skinning_vertex:pNe,skinnormal_vertex:mNe,specularmap_fragment:gNe,specularmap_pars_fragment:vNe,tonemapping_fragment:yNe,tonemapping_pars_fragment:xNe,transmission_fragment:bNe,transmission_pars_fragment:wNe,uv_pars_fragment:_Ne,uv_pars_vertex:SNe,uv_vertex:MNe,worldpos_vertex:ENe,background_vert:TNe,background_frag:ANe,backgroundCube_vert:NNe,backgroundCube_frag:PNe,cube_vert:CNe,cube_frag:RNe,depth_vert:jNe,depth_frag:ONe,distance_vert:INe,distance_frag:DNe,equirect_vert:kNe,equirect_frag:LNe,linedashed_vert:FNe,linedashed_frag:UNe,meshbasic_vert:BNe,meshbasic_frag:zNe,meshlambert_vert:$Ne,meshlambert_frag:VNe,meshmatcap_vert:HNe,meshmatcap_frag:GNe,meshnormal_vert:WNe,meshnormal_frag:qNe,meshphong_vert:XNe,meshphong_frag:KNe,meshphysical_vert:YNe,meshphysical_frag:ZNe,meshtoon_vert:JNe,meshtoon_frag:QNe,points_vert:ePe,points_frag:tPe,shadow_vert:nPe,shadow_frag:rPe,sprite_vert:iPe,sprite_frag:aPe},dt={common:{diffuse:{value:new en(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new tn},alphaMap:{value:null},alphaMapTransform:{value:new tn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new tn}},envmap:{envMap:{value:null},envMapRotation:{value:new tn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new tn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new tn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new tn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new tn},normalScale:{value:new nn(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new tn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new tn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new tn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new tn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new en(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},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 en(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new tn},alphaTest:{value:0},uvTransform:{value:new tn}},sprite:{diffuse:{value:new en(16777215)},opacity:{value:1},center:{value:new nn(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new tn},alphaMap:{value:null},alphaMapTransform:{value:new tn},alphaTest:{value:0}}},as={basic:{uniforms:ai([dt.common,dt.specularmap,dt.envmap,dt.aomap,dt.lightmap,dt.fog]),vertexShader:rn.meshbasic_vert,fragmentShader:rn.meshbasic_frag},lambert:{uniforms:ai([dt.common,dt.specularmap,dt.envmap,dt.aomap,dt.lightmap,dt.emissivemap,dt.bumpmap,dt.normalmap,dt.displacementmap,dt.fog,dt.lights,{emissive:{value:new en(0)},envMapIntensity:{value:1}}]),vertexShader:rn.meshlambert_vert,fragmentShader:rn.meshlambert_frag},phong:{uniforms:ai([dt.common,dt.specularmap,dt.envmap,dt.aomap,dt.lightmap,dt.emissivemap,dt.bumpmap,dt.normalmap,dt.displacementmap,dt.fog,dt.lights,{emissive:{value:new en(0)},specular:{value:new en(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:rn.meshphong_vert,fragmentShader:rn.meshphong_frag},standard:{uniforms:ai([dt.common,dt.envmap,dt.aomap,dt.lightmap,dt.emissivemap,dt.bumpmap,dt.normalmap,dt.displacementmap,dt.roughnessmap,dt.metalnessmap,dt.fog,dt.lights,{emissive:{value:new en(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:rn.meshphysical_vert,fragmentShader:rn.meshphysical_frag},toon:{uniforms:ai([dt.common,dt.aomap,dt.lightmap,dt.emissivemap,dt.bumpmap,dt.normalmap,dt.displacementmap,dt.gradientmap,dt.fog,dt.lights,{emissive:{value:new en(0)}}]),vertexShader:rn.meshtoon_vert,fragmentShader:rn.meshtoon_frag},matcap:{uniforms:ai([dt.common,dt.bumpmap,dt.normalmap,dt.displacementmap,dt.fog,{matcap:{value:null}}]),vertexShader:rn.meshmatcap_vert,fragmentShader:rn.meshmatcap_frag},points:{uniforms:ai([dt.points,dt.fog]),vertexShader:rn.points_vert,fragmentShader:rn.points_frag},dashed:{uniforms:ai([dt.common,dt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:rn.linedashed_vert,fragmentShader:rn.linedashed_frag},depth:{uniforms:ai([dt.common,dt.displacementmap]),vertexShader:rn.depth_vert,fragmentShader:rn.depth_frag},normal:{uniforms:ai([dt.common,dt.bumpmap,dt.normalmap,dt.displacementmap,{opacity:{value:1}}]),vertexShader:rn.meshnormal_vert,fragmentShader:rn.meshnormal_frag},sprite:{uniforms:ai([dt.sprite,dt.fog]),vertexShader:rn.sprite_vert,fragmentShader:rn.sprite_frag},background:{uniforms:{uvTransform:{value:new tn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:rn.background_vert,fragmentShader:rn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new tn}},vertexShader:rn.backgroundCube_vert,fragmentShader:rn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:rn.cube_vert,fragmentShader:rn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:rn.equirect_vert,fragmentShader:rn.equirect_frag},distance:{uniforms:ai([dt.common,dt.displacementmap,{referencePosition:{value:new me},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:rn.distance_vert,fragmentShader:rn.distance_frag},shadow:{uniforms:ai([dt.lights,dt.fog,{color:{value:new en(0)},opacity:{value:1}}]),vertexShader:rn.shadow_vert,fragmentShader:rn.shadow_frag}};as.physical={uniforms:ai([as.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new tn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new tn},clearcoatNormalScale:{value:new nn(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new tn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new tn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new tn},sheen:{value:0},sheenColor:{value:new en(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new tn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new tn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new tn},transmissionSamplerSize:{value:new nn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new tn},attenuationDistance:{value:0},attenuationColor:{value:new en(0)},specularColor:{value:new en(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new tn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new tn},anisotropyVector:{value:new nn},anisotropyMap:{value:null},anisotropyMapTransform:{value:new tn}}]),vertexShader:rn.meshphysical_vert,fragmentShader:rn.meshphysical_frag};const Tg={r:0,b:0,g:0},Zl=new As,sPe=new Ln;function oPe(t,e,n,r,i,a){const s=new en(0);let o=i===!0?0:1,c,l,h=null,f=0,m=null;function g(_){let E=_.isScene===!0?_.background:null;if(E&&E.isTexture){const M=_.backgroundBlurriness>0;E=e.get(E,M)}return E}function b(_){let E=!1;const M=g(_);M===null?v(s,o):M&&M.isColor&&(v(M,1),E=!0);const T=t.xr.getEnvironmentBlendMode();T==="additive"?n.buffers.color.setClear(0,0,0,1,a):T==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,a),(t.autoClear||E)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function y(_,E){const M=g(E);M&&(M.isCubeTexture||M.mapping===Mx)?(l===void 0&&(l=new _e(new cn(1,1,1),new Ns({name:"BackgroundCubeMaterial",uniforms:Hd(as.backgroundCube.uniforms),vertexShader:as.backgroundCube.vertexShader,fragmentShader:as.backgroundCube.fragmentShader,side:Ri,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(T,A,N){this.matrixWorld.copyPosition(N.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),Zl.copy(E.backgroundRotation),Zl.x*=-1,Zl.y*=-1,Zl.z*=-1,M.isCubeTexture&&M.isRenderTargetTexture===!1&&(Zl.y*=-1,Zl.z*=-1),l.material.uniforms.envMap.value=M,l.material.uniforms.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,l.material.uniforms.backgroundBlurriness.value=E.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=E.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(sPe.makeRotationFromEuler(Zl)),l.material.toneMapped=vn.getTransfer(M.colorSpace)!==Pn,(h!==M||f!==M.version||m!==t.toneMapping)&&(l.material.needsUpdate=!0,h=M,f=M.version,m=t.toneMapping),l.layers.enableAll(),_.unshift(l,l.geometry,l.material,0,0,null)):M&&M.isTexture&&(c===void 0&&(c=new _e(new ym(2,2),new Ns({name:"BackgroundMaterial",uniforms:Hd(as.background.uniforms),vertexShader:as.background.vertexShader,fragmentShader:as.background.fragmentShader,side:wl,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=M,c.material.uniforms.backgroundIntensity.value=E.backgroundIntensity,c.material.toneMapped=vn.getTransfer(M.colorSpace)!==Pn,M.matrixAutoUpdate===!0&&M.updateMatrix(),c.material.uniforms.uvTransform.value.copy(M.matrix),(h!==M||f!==M.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,h=M,f=M.version,m=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null))}function v(_,E){_.getRGB(Tg,HG(t)),n.buffers.color.setClear(Tg.r,Tg.g,Tg.b,E,a)}function w(){l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return s},setClearColor:function(_,E=1){s.set(_),o=E,v(s,o)},getClearAlpha:function(){return o},setClearAlpha:function(_){o=_,v(s,o)},render:b,addToRenderList:y,dispose:w}}function lPe(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=m(null);let a=i,s=!1;function o(D,L,q,I,U){let k=!1;const V=f(D,I,q,L);a!==V&&(a=V,l(a.object)),k=g(D,I,q,U),k&&b(D,I,q,U),U!==null&&e.update(U,t.ELEMENT_ARRAY_BUFFER),(k||s)&&(s=!1,M(D,L,q,I),U!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(U).buffer))}function c(){return t.createVertexArray()}function l(D){return t.bindVertexArray(D)}function h(D){return t.deleteVertexArray(D)}function f(D,L,q,I){const U=I.wireframe===!0;let k=r[L.id];k===void 0&&(k={},r[L.id]=k);const V=D.isInstancedMesh===!0?D.id:0;let $=k[V];$===void 0&&($={},k[V]=$);let Y=$[q.id];Y===void 0&&(Y={},$[q.id]=Y);let J=Y[U];return J===void 0&&(J=m(c()),Y[U]=J),J}function m(D){const L=[],q=[],I=[];for(let U=0;U<n;U++)L[U]=0,q[U]=0,I[U]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:q,attributeDivisors:I,object:D,attributes:{},index:null}}function g(D,L,q,I){const U=a.attributes,k=L.attributes;let V=0;const $=q.getAttributes();for(const Y in $)if($[Y].location>=0){const W=U[Y];let H=k[Y];if(H===void 0&&(Y==="instanceMatrix"&&D.instanceMatrix&&(H=D.instanceMatrix),Y==="instanceColor"&&D.instanceColor&&(H=D.instanceColor)),W===void 0||W.attribute!==H||H&&W.data!==H.data)return!0;V++}return a.attributesNum!==V||a.index!==I}function b(D,L,q,I){const U={},k=L.attributes;let V=0;const $=q.getAttributes();for(const Y in $)if($[Y].location>=0){let W=k[Y];W===void 0&&(Y==="instanceMatrix"&&D.instanceMatrix&&(W=D.instanceMatrix),Y==="instanceColor"&&D.instanceColor&&(W=D.instanceColor));const H={};H.attribute=W,W&&W.data&&(H.data=W.data),U[Y]=H,V++}a.attributes=U,a.attributesNum=V,a.index=I}function y(){const D=a.newAttributes;for(let L=0,q=D.length;L<q;L++)D[L]=0}function v(D){w(D,0)}function w(D,L){const q=a.newAttributes,I=a.enabledAttributes,U=a.attributeDivisors;q[D]=1,I[D]===0&&(t.enableVertexAttribArray(D),I[D]=1),U[D]!==L&&(t.vertexAttribDivisor(D,L),U[D]=L)}function _(){const D=a.newAttributes,L=a.enabledAttributes;for(let q=0,I=L.length;q<I;q++)L[q]!==D[q]&&(t.disableVertexAttribArray(q),L[q]=0)}function E(D,L,q,I,U,k,V){V===!0?t.vertexAttribIPointer(D,L,q,U,k):t.vertexAttribPointer(D,L,q,I,U,k)}function M(D,L,q,I){y();const U=I.attributes,k=q.getAttributes(),V=L.defaultAttributeValues;for(const $ in k){const Y=k[$];if(Y.location>=0){let J=U[$];if(J===void 0&&($==="instanceMatrix"&&D.instanceMatrix&&(J=D.instanceMatrix),$==="instanceColor"&&D.instanceColor&&(J=D.instanceColor)),J!==void 0){const W=J.normalized,H=J.itemSize,te=e.get(J);if(te===void 0)continue;const we=te.buffer,Ae=te.type,ne=te.bytesPerElement,de=Ae===t.INT||Ae===t.UNSIGNED_INT||J.gpuType===lC;if(J.isInterleavedBufferAttribute){const pe=J.data,fe=pe.stride,ce=J.offset;if(pe.isInstancedInterleavedBuffer){for(let Ce=0;Ce<Y.locationSize;Ce++)w(Y.location+Ce,pe.meshPerAttribute);D.isInstancedMesh!==!0&&I._maxInstanceCount===void 0&&(I._maxInstanceCount=pe.meshPerAttribute*pe.count)}else for(let Ce=0;Ce<Y.locationSize;Ce++)v(Y.location+Ce);t.bindBuffer(t.ARRAY_BUFFER,we);for(let Ce=0;Ce<Y.locationSize;Ce++)E(Y.location+Ce,H/Y.locationSize,Ae,W,fe*ne,(ce+H/Y.locationSize*Ce)*ne,de)}else{if(J.isInstancedBufferAttribute){for(let pe=0;pe<Y.locationSize;pe++)w(Y.location+pe,J.meshPerAttribute);D.isInstancedMesh!==!0&&I._maxInstanceCount===void 0&&(I._maxInstanceCount=J.meshPerAttribute*J.count)}else for(let pe=0;pe<Y.locationSize;pe++)v(Y.location+pe);t.bindBuffer(t.ARRAY_BUFFER,we);for(let pe=0;pe<Y.locationSize;pe++)E(Y.location+pe,H/Y.locationSize,Ae,W,H*ne,H/Y.locationSize*pe*ne,de)}}else if(V!==void 0){const W=V[$];if(W!==void 0)switch(W.length){case 2:t.vertexAttrib2fv(Y.location,W);break;case 3:t.vertexAttrib3fv(Y.location,W);break;case 4:t.vertexAttrib4fv(Y.location,W);break;default:t.vertexAttrib1fv(Y.location,W)}}}}_()}function T(){R();for(const D in r){const L=r[D];for(const q in L){const I=L[q];for(const U in I){const k=I[U];for(const V in k)h(k[V].object),delete k[V];delete I[U]}}delete r[D]}}function A(D){if(r[D.id]===void 0)return;const L=r[D.id];for(const q in L){const I=L[q];for(const U in I){const k=I[U];for(const V in k)h(k[V].object),delete k[V];delete I[U]}}delete r[D.id]}function N(D){for(const L in r){const q=r[L];for(const I in q){const U=q[I];if(U[D.id]===void 0)continue;const k=U[D.id];for(const V in k)h(k[V].object),delete k[V];delete U[D.id]}}}function P(D){for(const L in r){const q=r[L],I=D.isInstancedMesh===!0?D.id:0,U=q[I];if(U!==void 0){for(const k in U){const V=U[k];for(const $ in V)h(V[$].object),delete V[$];delete U[k]}delete q[I],Object.keys(q).length===0&&delete r[L]}}}function R(){F(),s=!0,a!==i&&(a=i,l(a.object))}function F(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:o,reset:R,resetDefaultState:F,dispose:T,releaseStatesOfGeometry:A,releaseStatesOfObject:P,releaseStatesOfProgram:N,initAttributes:y,enableAttribute:v,disableUnusedAttributes:_}}function cPe(t,e,n){let r;function i(l){r=l}function a(l,h){t.drawArrays(r,l,h),n.update(h,r,1)}function s(l,h,f){f!==0&&(t.drawArraysInstanced(r,l,h,f),n.update(h,r,f))}function o(l,h,f){if(f===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(r,l,0,h,0,f);let g=0;for(let b=0;b<f;b++)g+=h[b];n.update(g,r,1)}function c(l,h,f,m){if(f===0)return;const g=e.get("WEBGL_multi_draw");if(g===null)for(let b=0;b<l.length;b++)s(l[b],h[b],m[b]);else{g.multiDrawArraysInstancedWEBGL(r,l,0,h,0,m,0,f);let b=0;for(let y=0;y<f;y++)b+=h[y]*m[y];n.update(b,r,1)}}this.setMode=i,this.render=a,this.renderInstances=s,this.renderMultiDraw=o,this.renderMultiDrawInstances=c}function uPe(t,e,n,r){let i;function a(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const N=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(N.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(N){return!(N!==za&&r.convert(N)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT))}function o(N){const P=N===vo&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(N!==Wi&&r.convert(N)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&N!==ds&&!P)}function c(N){if(N==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";N="mediump"}return N==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let l=n.precision!==void 0?n.precision:"highp";const h=c(l);h!==l&&(Jt("WebGLRenderer:",l,"not supported, using",h,"instead."),l=h);const f=n.logarithmicDepthBuffer===!0,m=n.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),g=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),b=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),y=t.getParameter(t.MAX_TEXTURE_SIZE),v=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),w=t.getParameter(t.MAX_VERTEX_ATTRIBS),_=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),E=t.getParameter(t.MAX_VARYING_VECTORS),M=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),T=t.getParameter(t.MAX_SAMPLES),A=t.getParameter(t.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:c,textureFormatReadable:s,textureTypeReadable:o,precision:l,logarithmicDepthBuffer:f,reversedDepthBuffer:m,maxTextures:g,maxVertexTextures:b,maxTextureSize:y,maxCubemapSize:v,maxAttributes:w,maxVertexUniforms:_,maxVaryings:E,maxFragmentUniforms:M,maxSamples:T,samples:A}}function dPe(t){const e=this;let n=null,r=0,i=!1,a=!1;const s=new rc,o=new tn,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,m){const g=f.length!==0||m||r!==0||i;return i=m,r=f.length,g},this.beginShadows=function(){a=!0,h(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(f,m){n=h(f,m,0)},this.setState=function(f,m,g){const b=f.clippingPlanes,y=f.clipIntersection,v=f.clipShadows,w=t.get(f);if(!i||b===null||b.length===0||a&&!v)a?h(null):l();else{const _=a?0:r,E=_*4;let M=w.clippingState||null;c.value=M,M=h(b,m,E,g);for(let T=0;T!==E;++T)M[T]=n[T];w.clippingState=M,this.numIntersection=y?this.numPlanes:0,this.numPlanes+=_}};function l(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function h(f,m,g,b){const y=f!==null?f.length:0;let v=null;if(y!==0){if(v=c.value,b!==!0||v===null){const w=g+y*4,_=m.matrixWorldInverse;o.getNormalMatrix(_),(v===null||v.length<w)&&(v=new Float32Array(w));for(let E=0,M=g;E!==y;++E,M+=4)s.copy(f[E]).applyMatrix4(_,o),s.normal.toArray(v,M),v[M+3]=s.constant}c.value=v,c.needsUpdate=!0}return e.numPlanes=y,e.numIntersection=0,v}}const fl=4,v8=[.125,.215,.35,.446,.526,.582],sc=20,fPe=256,vh=new _C,y8=new en;let PM=null,CM=0,RM=0,jM=!1;const hPe=new me;class x8{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,n=0,r=.1,i=100,a={}){const{size:s=256,position:o=hPe}=a;PM=this._renderer.getRenderTarget(),CM=this._renderer.getActiveCubeFace(),RM=this._renderer.getActiveMipmapLevel(),jM=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(s);const c=this._allocateTargets();return c.depthBuffer=!0,this._sceneToCubeUV(e,r,i,c,o),n>0&&this._blur(c,0,0,n),this._applyPMREM(c),this._cleanup(c),c}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=_8(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=w8(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.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._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(PM,CM,RM),this._renderer.xr.enabled=jM,e.scissorTest=!1,Fu(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===Dc||e.mapping===zd?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),PM=this._renderer.getRenderTarget(),CM=this._renderer.getActiveCubeFace(),RM=this._renderer.getActiveMipmapLevel(),jM=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const r=n||this._allocateTargets();return this._textureToCubeUV(e,r),this._applyPMREM(r),this._cleanup(r),r}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,r={magFilter:Jr,minFilter:Jr,generateMipmaps:!1,type:vo,format:za,colorSpace:Vd,depthBuffer:!1},i=b8(e,n,r);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=b8(e,n,r);const{_lodMax:a}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=pPe(a)),this._blurMaterial=gPe(a,e,n),this._ggxMaterial=mPe(a,e,n)}return i}_compileMaterial(e){const n=new _e(new jr,e);this._renderer.compile(n,vh)}_sceneToCubeUV(e,n,r,i,a){const c=new li(90,1,n,r),l=[1,-1,1,1,1,1],h=[1,1,1,-1,-1,-1],f=this._renderer,m=f.autoClear,g=f.toneMapping;f.getClearColor(y8),f.toneMapping=xs,f.autoClear=!1,f.state.buffers.depth.getReversed()&&(f.setRenderTarget(i),f.clearDepth(),f.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new _e(new cn,new dl({name:"PMREM.Background",side:Ri,depthWrite:!1,depthTest:!1})));const y=this._backgroundBox,v=y.material;let w=!1;const _=e.background;_?_.isColor&&(v.color.copy(_),e.background=null,w=!0):(v.color.copy(y8),w=!0);for(let E=0;E<6;E++){const M=E%3;M===0?(c.up.set(0,l[E],0),c.position.set(a.x,a.y,a.z),c.lookAt(a.x+h[E],a.y,a.z)):M===1?(c.up.set(0,0,l[E]),c.position.set(a.x,a.y,a.z),c.lookAt(a.x,a.y+h[E],a.z)):(c.up.set(0,l[E],0),c.position.set(a.x,a.y,a.z),c.lookAt(a.x,a.y,a.z+h[E]));const T=this._cubeSize;Fu(i,M*T,E>2?T:0,T,T),f.setRenderTarget(i),w&&f.render(y,c),f.render(e,c)}f.toneMapping=g,f.autoClear=m,e.background=_}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===Dc||e.mapping===zd;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=_8()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=w8());const a=i?this._cubemapMaterial:this._equirectMaterial,s=this._lodMeshes[0];s.material=a;const o=a.uniforms;o.envMap.value=e;const c=this._cubeSize;Fu(n,0,0,3*c,2*c),r.setRenderTarget(n),r.render(s,vh)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodMeshes.length;for(let a=1;a<i;a++)this._applyGGXFilter(e,a-1,a);n.autoClear=r}_applyGGXFilter(e,n,r){const i=this._renderer,a=this._pingPongRenderTarget,s=this._ggxMaterial,o=this._lodMeshes[r];o.material=s;const c=s.uniforms,l=r/(this._lodMeshes.length-1),h=n/(this._lodMeshes.length-1),f=Math.sqrt(l*l-h*h),m=0+l*1.25,g=f*m,{_lodMax:b}=this,y=this._sizeLods[r],v=3*y*(r>b-fl?r-b+fl:0),w=4*(this._cubeSize-y);c.envMap.value=e.texture,c.roughness.value=g,c.mipInt.value=b-n,Fu(a,v,w,3*y,2*y),i.setRenderTarget(a),i.render(o,vh),c.envMap.value=a.texture,c.roughness.value=0,c.mipInt.value=b-r,Fu(e,v,w,3*y,2*y),i.setRenderTarget(e),i.render(o,vh)}_blur(e,n,r,i,a){const s=this._pingPongRenderTarget;this._halfBlur(e,s,n,r,i,"latitudinal",a),this._halfBlur(s,e,r,r,i,"longitudinal",a)}_halfBlur(e,n,r,i,a,s,o){const c=this._renderer,l=this._blurMaterial;s!=="latitudinal"&&s!=="longitudinal"&&pn("blur direction must be either latitudinal or longitudinal!");const h=3,f=this._lodMeshes[i];f.material=l;const m=l.uniforms,g=this._sizeLods[r]-1,b=isFinite(a)?Math.PI/(2*g):2*Math.PI/(2*sc-1),y=a/b,v=isFinite(a)?1+Math.floor(h*y):sc;v>sc&&Jt(`sigmaRadians, ${a}, is too large and will clip, as it requested ${v} samples when the maximum is set to ${sc}`);const w=[];let _=0;for(let N=0;N<sc;++N){const P=N/y,R=Math.exp(-P*P/2);w.push(R),N===0?_+=R:N<v&&(_+=2*R)}for(let N=0;N<w.length;N++)w[N]=w[N]/_;m.envMap.value=e.texture,m.samples.value=v,m.weights.value=w,m.latitudinal.value=s==="latitudinal",o&&(m.poleAxis.value=o);const{_lodMax:E}=this;m.dTheta.value=b,m.mipInt.value=E-r;const M=this._sizeLods[i],T=3*M*(i>E-fl?i-E+fl:0),A=4*(this._cubeSize-M);Fu(n,T,A,3*M,2*M),c.setRenderTarget(n),c.render(f,vh)}}function pPe(t){const e=[],n=[],r=[];let i=t;const a=t-fl+1+v8.length;for(let s=0;s<a;s++){const o=Math.pow(2,i);e.push(o);let c=1/o;s>t-fl?c=v8[s-t+fl-1]:s===0&&(c=0),n.push(c);const l=1/(o-2),h=-l,f=1+l,m=[h,h,f,h,f,f,h,h,f,f,h,f],g=6,b=6,y=3,v=2,w=1,_=new Float32Array(y*b*g),E=new Float32Array(v*b*g),M=new Float32Array(w*b*g);for(let A=0;A<g;A++){const N=A%3*2/3-1,P=A>2?0:-1,R=[N,P,0,N+2/3,P,0,N+2/3,P+1,0,N,P,0,N+2/3,P+1,0,N,P+1,0];_.set(R,y*b*A),E.set(m,v*b*A);const F=[A,A,A,A,A,A];M.set(F,w*b*A)}const T=new jr;T.setAttribute("position",new Ji(_,y)),T.setAttribute("uv",new Ji(E,v)),T.setAttribute("faceIndex",new Ji(M,w)),r.push(new _e(T,null)),i>fl&&i--}return{lodMeshes:r,sizeLods:e,sigmas:n}}function b8(t,e,n){const r=new bs(t,e,n);return r.texture.mapping=Mx,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Fu(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function mPe(t,e,n){return new Ns({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:fPe,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:Ax(),fragmentShader:`
precision highp float;
precision highp int;
varying vec3 vOutputDirection;
uniform sampler2D envMap;
uniform float roughness;
uniform float mipInt;
#define ENVMAP_TYPE_CUBE_UV
#include <cube_uv_reflection_fragment>
#define PI 3.14159265359
// Van der Corput radical inverse
float radicalInverse_VdC(uint bits) {
bits = (bits << 16u) | (bits >> 16u);
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
return float(bits) * 2.3283064365386963e-10; // / 0x100000000
}
// Hammersley sequence
vec2 hammersley(uint i, uint N) {
return vec2(float(i) / float(N), radicalInverse_VdC(i));
}
// GGX VNDF importance sampling (Eric Heitz 2018)
// "Sampling the GGX Distribution of Visible Normals"
// https://jcgt.org/published/0007/04/01/
vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {
float alpha = roughness * roughness;
// Section 4.1: Orthonormal basis
vec3 T1 = vec3(1.0, 0.0, 0.0);
vec3 T2 = cross(V, T1);
// Section 4.2: Parameterization of projected area
float r = sqrt(Xi.x);
float phi = 2.0 * PI * Xi.y;
float t1 = r * cos(phi);
float t2 = r * sin(phi);
float s = 0.5 * (1.0 + V.z);
t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;
// Section 4.3: Reprojection onto hemisphere
vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V;
// Section 3.4: Transform back to ellipsoid configuration
return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));
}
void main() {
vec3 N = normalize(vOutputDirection);
vec3 V = N; // Assume view direction equals normal for pre-filtering
vec3 prefilteredColor = vec3(0.0);
float totalWeight = 0.0;
// For very low roughness, just sample the environment directly
if (roughness < 0.001) {
gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);
return;
}
// Tangent space basis for VNDF sampling
vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
vec3 tangent = normalize(cross(up, N));
vec3 bitangent = cross(N, tangent);
for(uint i = 0u; i < uint(GGX_SAMPLES); i++) {
vec2 Xi = hammersley(i, uint(GGX_SAMPLES));
// For PMREM, V = N, so in tangent space V is always (0, 0, 1)
vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);
// Transform H back to world space
vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);
vec3 L = normalize(2.0 * dot(V, H) * H - V);
float NdotL = max(dot(N, L), 0.0);
if(NdotL > 0.0) {
// Sample environment at fixed mip level
// VNDF importance sampling handles the distribution filtering
vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);
// Weight by NdotL for the split-sum approximation
// VNDF PDF naturally accounts for the visible microfacet distribution
prefilteredColor += sampleColor * NdotL;
totalWeight += NdotL;
}
}
if (totalWeight > 0.0) {
prefilteredColor = prefilteredColor / totalWeight;
}
gl_FragColor = vec4(prefilteredColor, 1.0);
}
`,blending:co,depthTest:!1,depthWrite:!1})}function gPe(t,e,n){const r=new Float32Array(sc),i=new me(0,1,0);return new Ns({name:"SphericalGaussianBlur",defines:{n:sc,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Ax(),fragmentShader:`
precision mediump float;
precision mediump int;
varying vec3 vOutputDirection;
uniform sampler2D envMap;
uniform int samples;
uniform float weights[ n ];
uniform bool latitudinal;
uniform float dTheta;
uniform float mipInt;
uniform vec3 poleAxis;
#define ENVMAP_TYPE_CUBE_UV
#include <cube_uv_reflection_fragment>
vec3 getSample( float theta, vec3 axis ) {
float cosTheta = cos( theta );
// Rodrigues' axis-angle rotation
vec3 sampleDirection = vOutputDirection * cosTheta
+ cross( axis, vOutputDirection ) * sin( theta )
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
return bilinearCubeUV( envMap, sampleDirection, mipInt );
}
void main() {
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
}
axis = normalize( axis );
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
for ( int i = 1; i < n; i++ ) {
if ( i >= samples ) {
break;
}
float theta = dTheta * float( i );
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
}
}
`,blending:co,depthTest:!1,depthWrite:!1})}function w8(){return new Ns({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Ax(),fragmentShader:`
precision mediump float;
precision mediump int;
varying vec3 vOutputDirection;
uniform sampler2D envMap;
#include <common>
void main() {
vec3 outputDirection = normalize( vOutputDirection );
vec2 uv = equirectUv( outputDirection );
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
}
`,blending:co,depthTest:!1,depthWrite:!1})}function _8(){return new Ns({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Ax(),fragmentShader:`
precision mediump float;
precision mediump int;
uniform float flipEnvMap;
varying vec3 vOutputDirection;
uniform samplerCube envMap;
void main() {
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
}
`,blending:co,depthTest:!1,depthWrite:!1})}function Ax(){return`
precision mediump float;
precision mediump int;
attribute float faceIndex;
varying vec3 vOutputDirection;
// RH coordinate system; PMREM face-indexing convention
vec3 getDirection( vec2 uv, float face ) {
uv = 2.0 * uv - 1.0;
vec3 direction = vec3( uv, 1.0 );
if ( face == 0.0 ) {
direction = direction.zyx; // ( 1, v, u ) pos x
} else if ( face == 1.0 ) {
direction = direction.xzy;
direction.xz *= -1.0; // ( -u, 1, -v ) pos y
} else if ( face == 2.0 ) {
direction.x *= -1.0; // ( -u, v, 1 ) pos z
} else if ( face == 3.0 ) {
direction = direction.zyx;
direction.xz *= -1.0; // ( -1, v, -u ) neg x
} else if ( face == 4.0 ) {
direction = direction.xzy;
direction.xy *= -1.0; // ( -u, -1, v ) neg y
} else if ( face == 5.0 ) {
direction.z *= -1.0; // ( u, v, -1 ) neg z
}
return direction;
}
void main() {
vOutputDirection = getDirection( uv, faceIndex );
gl_Position = vec4( position, 1.0 );
}
`}class XG extends bs{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new $G(i),this._setTextureOptions(n),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:`
varying vec3 vWorldDirection;
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}
`,fragmentShader:`
uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
gl_FragColor = texture2D( tEquirect, sampleUV );
}
`},i=new cn(5,5,5),a=new Ns({name:"CubemapFromEquirect",uniforms:Hd(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Ri,blending:co});a.uniforms.tEquirect.value=n;const s=new _e(i,a),o=n.minFilter;return n.minFilter===mc&&(n.minFilter=Jr),new wTe(1,10,this).update(e,s),n.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(e,n=!0,r=!0,i=!0){const a=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(n,r,i);e.setRenderTarget(a)}}function vPe(t){let e=new WeakMap,n=new WeakMap,r=null;function i(m,g=!1){return m==null?null:g?s(m):a(m)}function a(m){if(m&&m.isTexture){const g=m.mapping;if(g===Q2||g===eM)if(e.has(m)){const b=e.get(m).texture;return o(b,m.mapping)}else{const b=m.image;if(b&&b.height>0){const y=new XG(b.height);return y.fromEquirectangularTexture(t,m),e.set(m,y),m.addEventListener("dispose",l),o(y.texture,m.mapping)}else return null}}return m}function s(m){if(m&&m.isTexture){const g=m.mapping,b=g===Q2||g===eM,y=g===Dc||g===zd;if(b||y){let v=n.get(m);const w=v!==void 0?v.texture.pmremVersion:0;if(m.isRenderTargetTexture&&m.pmremVersion!==w)return r===null&&(r=new x8(t)),v=b?r.fromEquirectangular(m,v):r.fromCubemap(m,v),v.texture.pmremVersion=m.pmremVersion,n.set(m,v),v.texture;if(v!==void 0)return v.texture;{const _=m.image;return b&&_&&_.height>0||y&&_&&c(_)?(r===null&&(r=new x8(t)),v=b?r.fromEquirectangular(m):r.fromCubemap(m),v.texture.pmremVersion=m.pmremVersion,n.set(m,v),m.addEventListener("dispose",h),v.texture):null}}}return m}function o(m,g){return g===Q2?m.mapping=Dc:g===eM&&(m.mapping=zd),m}function c(m){let g=0;const b=6;for(let y=0;y<b;y++)m[y]!==void 0&&g++;return g===b}function l(m){const g=m.target;g.removeEventListener("dispose",l);const b=e.get(g);b!==void 0&&(e.delete(g),b.dispose())}function h(m){const g=m.target;g.removeEventListener("dispose",h);const b=n.get(g);b!==void 0&&(n.delete(g),b.dispose())}function f(){e=new WeakMap,n=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:i,dispose:f}}function yPe(t){const e={};function n(r){if(e[r]!==void 0)return e[r];const i=t.getExtension(r);return e[r]=i,i}return{has:function(r){return n(r)!==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(r){const i=n(r);return i===null&&Ay("WebGLRenderer: "+r+" extension not supported."),i}}}function xPe(t,e,n,r){const i={},a=new WeakMap;function s(f){const m=f.target;m.index!==null&&e.remove(m.index);for(const b in m.attributes)e.remove(m.attributes[b]);m.removeEventListener("dispose",s),delete i[m.id];const g=a.get(m);g&&(e.remove(g),a.delete(m)),r.releaseStatesOfGeometry(m),m.isInstancedBufferGeometry===!0&&delete m._maxInstanceCount,n.memory.geometries--}function o(f,m){return i[m.id]===!0||(m.addEventListener("dispose",s),i[m.id]=!0,n.memory.geometries++),m}function c(f){const m=f.attributes;for(const g in m)e.update(m[g],t.ARRAY_BUFFER)}function l(f){const m=[],g=f.index,b=f.attributes.position;let y=0;if(b===void 0)return;if(g!==null){const _=g.array;y=g.version;for(let E=0,M=_.length;E<M;E+=3){const T=_[E+0],A=_[E+1],N=_[E+2];m.push(T,A,A,N,N,T)}}else{const _=b.array;y=b.version;for(let E=0,M=_.length/3-1;E<M;E+=3){const T=E+0,A=E+1,N=E+2;m.push(T,A,A,N,N,T)}}const v=new(b.count>=65535?LG:kG)(m,1);v.version=y;const w=a.get(f);w&&e.remove(w),a.set(f,v)}function h(f){const m=a.get(f);if(m){const g=f.index;g!==null&&m.version<g.version&&l(f)}else l(f);return a.get(f)}return{get:o,update:c,getWireframeAttribute:h}}function bPe(t,e,n){let r;function i(m){r=m}let a,s;function o(m){a=m.type,s=m.bytesPerElement}function c(m,g){t.drawElements(r,g,a,m*s),n.update(g,r,1)}function l(m,g,b){b!==0&&(t.drawElementsInstanced(r,g,a,m*s,b),n.update(g,r,b))}function h(m,g,b){if(b===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(r,g,0,a,m,0,b);let v=0;for(let w=0;w<b;w++)v+=g[w];n.update(v,r,1)}function f(m,g,b,y){if(b===0)return;const v=e.get("WEBGL_multi_draw");if(v===null)for(let w=0;w<m.length;w++)l(m[w]/s,g[w],y[w]);else{v.multiDrawElementsInstancedWEBGL(r,g,0,a,m,0,y,0,b);let w=0;for(let _=0;_<b;_++)w+=g[_]*y[_];n.update(w,r,1)}}this.setMode=i,this.setIndex=o,this.render=c,this.renderInstances=l,this.renderMultiDraw=h,this.renderMultiDrawInstances=f}function wPe(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function r(a,s,o){switch(n.calls++,s){case t.TRIANGLES:n.triangles+=o*(a/3);break;case t.LINES:n.lines+=o*(a/2);break;case t.LINE_STRIP:n.lines+=o*(a-1);break;case t.LINE_LOOP:n.lines+=o*a;break;case t.POINTS:n.points+=o*a;break;default:pn("WebGLInfo: Unknown draw mode:",s);break}}function i(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:i,update:r}}function _Pe(t,e,n){const r=new WeakMap,i=new nr;function a(s,o,c){const l=s.morphTargetInfluences,h=o.morphAttributes.position||o.morphAttributes.normal||o.morphAttributes.color,f=h!==void 0?h.length:0;let m=r.get(o);if(m===void 0||m.count!==f){let F=function(){P.dispose(),r.delete(o),o.removeEventListener("dispose",F)};var g=F;m!==void 0&&m.texture.dispose();const b=o.morphAttributes.position!==void 0,y=o.morphAttributes.normal!==void 0,v=o.morphAttributes.color!==void 0,w=o.morphAttributes.position||[],_=o.morphAttributes.normal||[],E=o.morphAttributes.color||[];let M=0;b===!0&&(M=1),y===!0&&(M=2),v===!0&&(M=3);let T=o.attributes.position.count*M,A=1;T>e.maxTextureSize&&(A=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);const N=new Float32Array(T*A*4*f),P=new IG(N,T,A,f);P.type=ds,P.needsUpdate=!0;const R=M*4;for(let D=0;D<f;D++){const L=w[D],q=_[D],I=E[D],U=T*A*4*D;for(let k=0;k<L.count;k++){const V=k*R;b===!0&&(i.fromBufferAttribute(L,k),N[U+V+0]=i.x,N[U+V+1]=i.y,N[U+V+2]=i.z,N[U+V+3]=0),y===!0&&(i.fromBufferAttribute(q,k),N[U+V+4]=i.x,N[U+V+5]=i.y,N[U+V+6]=i.z,N[U+V+7]=0),v===!0&&(i.fromBufferAttribute(I,k),N[U+V+8]=i.x,N[U+V+9]=i.y,N[U+V+10]=i.z,N[U+V+11]=I.itemSize===4?i.w:1)}}m={count:f,texture:P,size:new nn(T,A)},r.set(o,m),o.addEventListener("dispose",F)}if(s.isInstancedMesh===!0&&s.morphTexture!==null)c.getUniforms().setValue(t,"morphTexture",s.morphTexture,n);else{let b=0;for(let v=0;v<l.length;v++)b+=l[v];const y=o.morphTargetsRelative?1:1-b;c.getUniforms().setValue(t,"morphTargetBaseInfluence",y),c.getUniforms().setValue(t,"morphTargetInfluences",l)}c.getUniforms().setValue(t,"morphTargetsTexture",m.texture,n),c.getUniforms().setValue(t,"morphTargetsTextureSize",m.size)}return{update:a}}function SPe(t,e,n,r,i){let a=new WeakMap;function s(l){const h=i.render.frame,f=l.geometry,m=e.get(l,f);if(a.get(m)!==h&&(e.update(m),a.set(m,h)),l.isInstancedMesh&&(l.hasEventListener("dispose",c)===!1&&l.addEventListener("dispose",c),a.get(l)!==h&&(n.update(l.instanceMatrix,t.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,t.ARRAY_BUFFER),a.set(l,h))),l.isSkinnedMesh){const g=l.skeleton;a.get(g)!==h&&(g.update(),a.set(g,h))}return m}function o(){a=new WeakMap}function c(l){const h=l.target;h.removeEventListener("dispose",c),r.releaseStatesOfObject(h),n.remove(h.instanceMatrix),h.instanceColor!==null&&n.remove(h.instanceColor)}return{update:s,dispose:o}}const MPe={[yG]:"LINEAR_TONE_MAPPING",[xG]:"REINHARD_TONE_MAPPING",[bG]:"CINEON_TONE_MAPPING",[oC]:"ACES_FILMIC_TONE_MAPPING",[_G]:"AGX_TONE_MAPPING",[SG]:"NEUTRAL_TONE_MAPPING",[wG]:"CUSTOM_TONE_MAPPING"};function EPe(t,e,n,r,i){const a=new bs(e,n,{type:t,depthBuffer:r,stencilBuffer:i}),s=new bs(e,n,{type:vo,depthBuffer:!1,stencilBuffer:!1}),o=new jr;o.setAttribute("position",new $n([-1,3,0,-1,-1,0,3,-1,0],3)),o.setAttribute("uv",new $n([0,2,0,0,2,0],2));const c=new gTe({uniforms:{tDiffuse:{value:null}},vertexShader:`
precision highp float;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
attribute vec3 position;
attribute vec2 uv;
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,fragmentShader:`
precision highp float;
uniform sampler2D tDiffuse;
varying vec2 vUv;
#include <tonemapping_pars_fragment>
#include <colorspace_pars_fragment>
void main() {
gl_FragColor = texture2D( tDiffuse, vUv );
#ifdef LINEAR_TONE_MAPPING
gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );
#elif defined( REINHARD_TONE_MAPPING )
gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );
#elif defined( CINEON_TONE_MAPPING )
gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );
#elif defined( ACES_FILMIC_TONE_MAPPING )
gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );
#elif defined( AGX_TONE_MAPPING )
gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );
#elif defined( NEUTRAL_TONE_MAPPING )
gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
#elif defined( CUSTOM_TONE_MAPPING )
gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );
#endif
#ifdef SRGB_TRANSFER
gl_FragColor = sRGBTransferOETF( gl_FragColor );
#endif
}`,depthTest:!1,depthWrite:!1}),l=new _e(o,c),h=new _C(-1,1,1,-1,0,1);let f=null,m=null,g=!1,b,y=null,v=[],w=!1;this.setSize=function(_,E){a.setSize(_,E),s.setSize(_,E);for(let M=0;M<v.length;M++){const T=v[M];T.setSize&&T.setSize(_,E)}},this.setEffects=function(_){v=_,w=v.length>0&&v[0].isRenderPass===!0;const E=a.width,M=a.height;for(let T=0;T<v.length;T++){const A=v[T];A.setSize&&A.setSize(E,M)}},this.begin=function(_,E){if(g||_.toneMapping===xs&&v.length===0)return!1;if(y=E,E!==null){const M=E.width,T=E.height;(a.width!==M||a.height!==T)&&this.setSize(M,T)}return w===!1&&_.setRenderTarget(a),b=_.toneMapping,_.toneMapping=xs,!0},this.hasRenderPass=function(){return w},this.end=function(_,E){_.toneMapping=b,g=!0;let M=a,T=s;for(let A=0;A<v.length;A++){const N=v[A];if(N.enabled!==!1&&(N.render(_,T,M,E),N.needsSwap!==!1)){const P=M;M=T,T=P}}if(f!==_.outputColorSpace||m!==_.toneMapping){f=_.outputColorSpace,m=_.toneMapping,c.defines={},vn.getTransfer(f)===Pn&&(c.defines.SRGB_TRANSFER="");const A=MPe[m];A&&(c.defines[A]=""),c.needsUpdate=!0}c.uniforms.tDiffuse.value=M.texture,_.setRenderTarget(y),_.render(l,h),y=null,g=!1},this.isCompositing=function(){return g},this.dispose=function(){a.dispose(),s.dispose(),o.dispose(),c.dispose()}}const KG=new vi,qA=new Wp(1,1),YG=new IG,ZG=new VEe,JG=new $G,S8=[],M8=[],E8=new Float32Array(16),T8=new Float32Array(9),A8=new Float32Array(4);function hf(t,e,n){const r=t[0];if(r<=0||r>0)return t;const i=e*n;let a=S8[i];if(a===void 0&&(a=new Float32Array(i),S8[i]=a),e!==0){r.toArray(a,0);for(let s=1,o=0;s!==e;++s)o+=n,t[s].toArray(a,o)}return a}function wr(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function _r(t,e){for(let n=0,r=e.length;n<r;n++)t[n]=e[n]}function Nx(t,e){let n=M8[e];n===void 0&&(n=new Int32Array(e),M8[e]=n);for(let r=0;r!==e;++r)n[r]=t.allocateTextureUnit();return n}function TPe(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function APe(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(wr(n,e))return;t.uniform2fv(this.addr,e),_r(n,e)}}function NPe(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(wr(n,e))return;t.uniform3fv(this.addr,e),_r(n,e)}}function PPe(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(wr(n,e))return;t.uniform4fv(this.addr,e),_r(n,e)}}function CPe(t,e){const n=this.cache,r=e.elements;if(r===void 0){if(wr(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),_r(n,e)}else{if(wr(n,r))return;A8.set(r),t.uniformMatrix2fv(this.addr,!1,A8),_r(n,r)}}function RPe(t,e){const n=this.cache,r=e.elements;if(r===void 0){if(wr(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),_r(n,e)}else{if(wr(n,r))return;T8.set(r),t.uniformMatrix3fv(this.addr,!1,T8),_r(n,r)}}function jPe(t,e){const n=this.cache,r=e.elements;if(r===void 0){if(wr(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),_r(n,e)}else{if(wr(n,r))return;E8.set(r),t.uniformMatrix4fv(this.addr,!1,E8),_r(n,r)}}function OPe(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function IPe(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(wr(n,e))return;t.uniform2iv(this.addr,e),_r(n,e)}}function DPe(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(wr(n,e))return;t.uniform3iv(this.addr,e),_r(n,e)}}function kPe(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(wr(n,e))return;t.uniform4iv(this.addr,e),_r(n,e)}}function LPe(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function FPe(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(wr(n,e))return;t.uniform2uiv(this.addr,e),_r(n,e)}}function UPe(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(wr(n,e))return;t.uniform3uiv(this.addr,e),_r(n,e)}}function BPe(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(wr(n,e))return;t.uniform4uiv(this.addr,e),_r(n,e)}}function zPe(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i);let a;this.type===t.SAMPLER_2D_SHADOW?(qA.compareFunction=n.isReversedDepthBuffer()?mC:pC,a=qA):a=KG,n.setTexture2D(e||a,i)}function $Pe(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(e||ZG,i)}function VPe(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(e||JG,i)}function HPe(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(e||YG,i)}function GPe(t){switch(t){case 5126:return TPe;case 35664:return APe;case 35665:return NPe;case 35666:return PPe;case 35674:return CPe;case 35675:return RPe;case 35676:return jPe;case 5124:case 35670:return OPe;case 35667:case 35671:return IPe;case 35668:case 35672:return DPe;case 35669:case 35673:return kPe;case 5125:return LPe;case 36294:return FPe;case 36295:return UPe;case 36296:return BPe;case 35678:case 36198:case 36298:case 36306:case 35682:return zPe;case 35679:case 36299:case 36307:return $Pe;case 35680:case 36300:case 36308:case 36293:return VPe;case 36289:case 36303:case 36311:case 36292:return HPe}}function WPe(t,e){t.uniform1fv(this.addr,e)}function qPe(t,e){const n=hf(e,this.size,2);t.uniform2fv(this.addr,n)}function XPe(t,e){const n=hf(e,this.size,3);t.uniform3fv(this.addr,n)}function KPe(t,e){const n=hf(e,this.size,4);t.uniform4fv(this.addr,n)}function YPe(t,e){const n=hf(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function ZPe(t,e){const n=hf(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function JPe(t,e){const n=hf(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function QPe(t,e){t.uniform1iv(this.addr,e)}function eCe(t,e){t.uniform2iv(this.addr,e)}function tCe(t,e){t.uniform3iv(this.addr,e)}function nCe(t,e){t.uniform4iv(this.addr,e)}function rCe(t,e){t.uniform1uiv(this.addr,e)}function iCe(t,e){t.uniform2uiv(this.addr,e)}function aCe(t,e){t.uniform3uiv(this.addr,e)}function sCe(t,e){t.uniform4uiv(this.addr,e)}function oCe(t,e,n){const r=this.cache,i=e.length,a=Nx(n,i);wr(r,a)||(t.uniform1iv(this.addr,a),_r(r,a));let s;this.type===t.SAMPLER_2D_SHADOW?s=qA:s=KG;for(let o=0;o!==i;++o)n.setTexture2D(e[o]||s,a[o])}function lCe(t,e,n){const r=this.cache,i=e.length,a=Nx(n,i);wr(r,a)||(t.uniform1iv(this.addr,a),_r(r,a));for(let s=0;s!==i;++s)n.setTexture3D(e[s]||ZG,a[s])}function cCe(t,e,n){const r=this.cache,i=e.length,a=Nx(n,i);wr(r,a)||(t.uniform1iv(this.addr,a),_r(r,a));for(let s=0;s!==i;++s)n.setTextureCube(e[s]||JG,a[s])}function uCe(t,e,n){const r=this.cache,i=e.length,a=Nx(n,i);wr(r,a)||(t.uniform1iv(this.addr,a),_r(r,a));for(let s=0;s!==i;++s)n.setTexture2DArray(e[s]||YG,a[s])}function dCe(t){switch(t){case 5126:return WPe;case 35664:return qPe;case 35665:return XPe;case 35666:return KPe;case 35674:return YPe;case 35675:return ZPe;case 35676:return JPe;case 5124:case 35670:return QPe;case 35667:case 35671:return eCe;case 35668:case 35672:return tCe;case 35669:case 35673:return nCe;case 5125:return rCe;case 36294:return iCe;case 36295:return aCe;case 36296:return sCe;case 35678:case 36198:case 36298:case 36306:case 35682:return oCe;case 35679:case 36299:case 36307:return lCe;case 35680:case 36300:case 36308:case 36293:return cCe;case 36289:case 36303:case 36311:case 36292:return uCe}}class fCe{constructor(e,n,r){this.id=e,this.addr=r,this.cache=[],this.type=n.type,this.setValue=GPe(n.type)}}class hCe{constructor(e,n,r){this.id=e,this.addr=r,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=dCe(n.type)}}class pCe{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,r){const i=this.seq;for(let a=0,s=i.length;a!==s;++a){const o=i[a];o.setValue(e,n[o.id],r)}}}const OM=/(\w+)(\])?(\[|\.)?/g;function N8(t,e){t.seq.push(e),t.map[e.id]=e}function mCe(t,e,n){const r=t.name,i=r.length;for(OM.lastIndex=0;;){const a=OM.exec(r),s=OM.lastIndex;let o=a[1];const c=a[2]==="]",l=a[3];if(c&&(o=o|0),l===void 0||l==="["&&s+2===i){N8(n,l===void 0?new fCe(o,t,e):new hCe(o,t,e));break}else{let f=n.map[o];f===void 0&&(f=new pCe(o),N8(n,f)),n=f}}}class Jg{constructor(e,n){this.seq=[],this.map={};const r=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let s=0;s<r;++s){const o=e.getActiveUniform(n,s),c=e.getUniformLocation(n,o.name);mCe(o,c,this)}const i=[],a=[];for(const s of this.seq)s.type===e.SAMPLER_2D_SHADOW||s.type===e.SAMPLER_CUBE_SHADOW||s.type===e.SAMPLER_2D_ARRAY_SHADOW?i.push(s):a.push(s);i.length>0&&(this.seq=i.concat(a))}setValue(e,n,r,i){const a=this.map[n];a!==void 0&&a.setValue(e,r,i)}setOptional(e,n,r){const i=n[r];i!==void 0&&this.setValue(e,r,i)}static upload(e,n,r,i){for(let a=0,s=n.length;a!==s;++a){const o=n[a],c=r[o.id];c.needsUpdate!==!1&&o.setValue(e,c.value,i)}}static seqWithValue(e,n){const r=[];for(let i=0,a=e.length;i!==a;++i){const s=e[i];s.id in n&&r.push(s)}return r}}function P8(t,e,n){const r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),r}const gCe=37297;let vCe=0;function yCe(t,e){const n=t.split(`
`),r=[],i=Math.max(e-6,0),a=Math.min(e+6,n.length);for(let s=i;s<a;s++){const o=s+1;r.push(`${o===e?">":" "} ${o}: ${n[s]}`)}return r.join(`
`)}const C8=new tn;function xCe(t){vn._getMatrix(C8,vn.workingColorSpace,t);const e=`mat3( ${C8.elements.map(n=>n.toFixed(4))} )`;switch(vn.getTransfer(t)){case My:return[e,"LinearTransferOETF"];case Pn:return[e,"sRGBTransferOETF"];default:return Jt("WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function R8(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),a=(t.getShaderInfoLog(e)||"").trim();if(r&&a==="")return"";const s=/ERROR: 0:(\d+)/.exec(a);if(s){const o=parseInt(s[1]);return n.toUpperCase()+`
`+a+`
`+yCe(t.getShaderSource(e),o)}else return a}function bCe(t,e){const n=xCe(e);return[`vec4 ${t}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join(`
`)}const wCe={[yG]:"Linear",[xG]:"Reinhard",[bG]:"Cineon",[oC]:"ACESFilmic",[_G]:"AgX",[SG]:"Neutral",[wG]:"Custom"};function _Ce(t,e){const n=wCe[e];return n===void 0?(Jt("WebGLProgram: Unsupported toneMapping:",e),"vec3 "+t+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Ag=new me;function SCe(){vn.getLuminanceCoefficients(Ag);const t=Ag.x.toFixed(4),e=Ag.y.toFixed(4),n=Ag.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${t}, ${e}, ${n} );`," return dot( weights, rgb );","}"].join(`
`)}function MCe(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Ch).join(`
`)}function ECe(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(`
`)}function TCe(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){const a=t.getActiveAttrib(e,i),s=a.name;let o=1;a.type===t.FLOAT_MAT2&&(o=2),a.type===t.FLOAT_MAT3&&(o=3),a.type===t.FLOAT_MAT4&&(o=4),n[s]={type:a.type,location:t.getAttribLocation(e,s),locationSize:o}}return n}function Ch(t){return t!==""}function j8(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 O8(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const ACe=/^[ \t]*#include +<([\w\d./]+)>/gm;function XA(t){return t.replace(ACe,PCe)}const NCe=new Map;function PCe(t,e){let n=rn[e];if(n===void 0){const r=NCe.get(e);if(r!==void 0)n=rn[r],Jt('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return XA(n)}const CCe=/#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 I8(t){return t.replace(CCe,RCe)}function RCe(t,e,n,r){let i="";for(let a=parseInt(e);a<parseInt(n);a++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function D8(t){let e=`precision ${t.precision} float;
precision ${t.precision} int;
precision ${t.precision} sampler2D;
precision ${t.precision} samplerCube;
precision ${t.precision} sampler3D;
precision ${t.precision} sampler2DArray;
precision ${t.precision} sampler2DShadow;
precision ${t.precision} samplerCubeShadow;
precision ${t.precision} sampler2DArrayShadow;
precision ${t.precision} isampler2D;
precision ${t.precision} isampler3D;
precision ${t.precision} isamplerCube;
precision ${t.precision} isampler2DArray;
precision ${t.precision} usampler2D;
precision ${t.precision} usampler3D;
precision ${t.precision} usamplerCube;
precision ${t.precision} usampler2DArray;
`;return t.precision==="highp"?e+=`
#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
#define LOW_PRECISION`),e}const jCe={[Wh]:"SHADOWMAP_TYPE_PCF",[Ph]:"SHADOWMAP_TYPE_VSM"};function OCe(t){return jCe[t.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const ICe={[Dc]:"ENVMAP_TYPE_CUBE",[zd]:"ENVMAP_TYPE_CUBE",[Mx]:"ENVMAP_TYPE_CUBE_UV"};function DCe(t){return t.envMap===!1?"ENVMAP_TYPE_CUBE":ICe[t.envMapMode]||"ENVMAP_TYPE_CUBE"}const kCe={[zd]:"ENVMAP_MODE_REFRACTION"};function LCe(t){return t.envMap===!1?"ENVMAP_MODE_REFLECTION":kCe[t.envMapMode]||"ENVMAP_MODE_REFLECTION"}const FCe={[vG]:"ENVMAP_BLENDING_MULTIPLY",[_Ee]:"ENVMAP_BLENDING_MIX",[SEe]:"ENVMAP_BLENDING_ADD"};function UCe(t){return t.envMap===!1?"ENVMAP_BLENDING_NONE":FCe[t.combine]||"ENVMAP_BLENDING_NONE"}function BCe(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,r=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}function zCe(t,e,n,r){const i=t.getContext(),a=n.defines;let s=n.vertexShader,o=n.fragmentShader;const c=OCe(n),l=DCe(n),h=LCe(n),f=UCe(n),m=BCe(n),g=MCe(n),b=ECe(a),y=i.createProgram();let v,w,_=n.glslVersion?"#version "+n.glslVersion+`
`:"";n.isRawShaderMaterial?(v=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(Ch).join(`
`),v.length>0&&(v+=`
`),w=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(Ch).join(`
`),w.length>0&&(w+=`
`)):(v=[D8(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.extensionClipCullDistance?"#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 "+h:"",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 "+c:"",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",`
`].filter(Ch).join(`
`),w=[D8(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.envMap?"#define "+h:"",n.envMap?"#define "+f:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.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?"#define USE_COLOR":"",n.vertexAlphas||n.batchingColor?"#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 "+c:"",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!==xs?"#define TONE_MAPPING":"",n.toneMapping!==xs?rn.tonemapping_pars_fragment:"",n.toneMapping!==xs?_Ce("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",rn.colorspace_pars_fragment,bCe("linearToOutputTexel",n.outputColorSpace),SCe(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
`].filter(Ch).join(`
`)),s=XA(s),s=j8(s,n),s=O8(s,n),o=XA(o),o=j8(o,n),o=O8(o,n),s=I8(s),o=I8(o),n.isRawShaderMaterial!==!0&&(_=`#version 300 es
`,v=[g,"#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+v,w=["#define varying in",n.glslVersion===BU?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===BU?"":"#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(`
`)+`
`+w);const E=_+v+s,M=_+w+o,T=P8(i,i.VERTEX_SHADER,E),A=P8(i,i.FRAGMENT_SHADER,M);i.attachShader(y,T),i.attachShader(y,A),n.index0AttributeName!==void 0?i.bindAttribLocation(y,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(y,0,"position"),i.linkProgram(y);function N(D){if(t.debug.checkShaderErrors){const L=i.getProgramInfoLog(y)||"",q=i.getShaderInfoLog(T)||"",I=i.getShaderInfoLog(A)||"",U=L.trim(),k=q.trim(),V=I.trim();let $=!0,Y=!0;if(i.getProgramParameter(y,i.LINK_STATUS)===!1)if($=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,y,T,A);else{const J=R8(i,T,"vertex"),W=R8(i,A,"fragment");pn("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(y,i.VALIDATE_STATUS)+`
Material Name: `+D.name+`
Material Type: `+D.type+`
Program Info Log: `+U+`
`+J+`
`+W)}else U!==""?Jt("WebGLProgram: Program Info Log:",U):(k===""||V==="")&&(Y=!1);Y&&(D.diagnostics={runnable:$,programLog:U,vertexShader:{log:k,prefix:v},fragmentShader:{log:V,prefix:w}})}i.deleteShader(T),i.deleteShader(A),P=new Jg(i,y),R=TCe(i,y)}let P;this.getUniforms=function(){return P===void 0&&N(this),P};let R;this.getAttributes=function(){return R===void 0&&N(this),R};let F=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return F===!1&&(F=i.getProgramParameter(y,gCe)),F},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(y),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=vCe++,this.cacheKey=e,this.usedTimes=1,this.program=y,this.vertexShader=T,this.fragmentShader=A,this}let $Ce=0;class VCe{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),a=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(a)===!1&&(s.add(a),a.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.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 r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new HCe(e),n.set(e,r)),r}}class HCe{constructor(e){this.id=$Ce++,this.code=e,this.usedTimes=0}}function GCe(t,e,n,r,i,a){const s=new vC,o=new VCe,c=new Set,l=[],h=new Map,f=r.logarithmicDepthBuffer;let m=r.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",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 b(P){return c.add(P),P===0?"uv":`uv${P}`}function y(P,R,F,D,L){const q=D.fog,I=L.geometry,U=P.isMeshStandardMaterial||P.isMeshLambertMaterial||P.isMeshPhongMaterial?D.environment:null,k=P.isMeshStandardMaterial||P.isMeshLambertMaterial&&!P.envMap||P.isMeshPhongMaterial&&!P.envMap,V=e.get(P.envMap||U,k),$=V&&V.mapping===Mx?V.image.height:null,Y=g[P.type];P.precision!==null&&(m=r.getMaxPrecision(P.precision),m!==P.precision&&Jt("WebGLProgram.getParameters:",P.precision,"not supported, using",m,"instead."));const J=I.morphAttributes.position||I.morphAttributes.normal||I.morphAttributes.color,W=J!==void 0?J.length:0;let H=0;I.morphAttributes.position!==void 0&&(H=1),I.morphAttributes.normal!==void 0&&(H=2),I.morphAttributes.color!==void 0&&(H=3);let te,we,Ae,ne;if(Y){const Qt=as[Y];te=Qt.vertexShader,we=Qt.fragmentShader}else te=P.vertexShader,we=P.fragmentShader,o.update(P),Ae=o.getVertexShaderID(P),ne=o.getFragmentShaderID(P);const de=t.getRenderTarget(),pe=t.state.buffers.depth.getReversed(),fe=L.isInstancedMesh===!0,ce=L.isBatchedMesh===!0,Ce=!!P.map,ye=!!P.matcap,Ze=!!V,tt=!!P.aoMap,St=!!P.lightMap,lt=!!P.bumpMap,kt=!!P.normalMap,re=!!P.displacementMap,Ht=!!P.emissiveMap,Lt=!!P.metalnessMap,zt=!!P.roughnessMap,qe=P.anisotropy>0,Z=P.clearcoat>0,z=P.dispersion>0,ie=P.iridescence>0,Ee=P.sheen>0,Pe=P.transmission>0,ge=qe&&!!P.anisotropyMap,Xe=Z&&!!P.clearcoatMap,Le=Z&&!!P.clearcoatNormalMap,ft=Z&&!!P.clearcoatRoughnessMap,nt=ie&&!!P.iridescenceMap,Ue=ie&&!!P.iridescenceThicknessMap,ke=Ee&&!!P.sheenColorMap,Fe=Ee&&!!P.sheenRoughnessMap,ze=!!P.specularMap,He=!!P.specularColorMap,vt=!!P.specularIntensityMap,ae=Pe&&!!P.transmissionMap,Re=Pe&&!!P.thicknessMap,Ie=!!P.gradientMap,rt=!!P.alphaMap,$e=P.alphaTest>0,he=!!P.alphaHash,Qe=!!P.extensions;let ht=xs;P.toneMapped&&(de===null||de.isXRRenderTarget===!0)&&(ht=t.toneMapping);const Gt={shaderID:Y,shaderType:P.type,shaderName:P.name,vertexShader:te,fragmentShader:we,defines:P.defines,customVertexShaderID:Ae,customFragmentShaderID:ne,isRawShaderMaterial:P.isRawShaderMaterial===!0,glslVersion:P.glslVersion,precision:m,batching:ce,batchingColor:ce&&L._colorsTexture!==null,instancing:fe,instancingColor:fe&&L.instanceColor!==null,instancingMorph:fe&&L.morphTexture!==null,outputColorSpace:de===null?t.outputColorSpace:de.isXRRenderTarget===!0?de.texture.colorSpace:Vd,alphaToCoverage:!!P.alphaToCoverage,map:Ce,matcap:ye,envMap:Ze,envMapMode:Ze&&V.mapping,envMapCubeUVHeight:$,aoMap:tt,lightMap:St,bumpMap:lt,normalMap:kt,displacementMap:re,emissiveMap:Ht,normalMapObjectSpace:kt&&P.normalMapType===TEe,normalMapTangentSpace:kt&&P.normalMapType===jG,metalnessMap:Lt,roughnessMap:zt,anisotropy:qe,anisotropyMap:ge,clearcoat:Z,clearcoatMap:Xe,clearcoatNormalMap:Le,clearcoatRoughnessMap:ft,dispersion:z,iridescence:ie,iridescenceMap:nt,iridescenceThicknessMap:Ue,sheen:Ee,sheenColorMap:ke,sheenRoughnessMap:Fe,specularMap:ze,specularColorMap:He,specularIntensityMap:vt,transmission:Pe,transmissionMap:ae,thicknessMap:Re,gradientMap:Ie,opaque:P.transparent===!1&&P.blending===id&&P.alphaToCoverage===!1,alphaMap:rt,alphaTest:$e,alphaHash:he,combine:P.combine,mapUv:Ce&&b(P.map.channel),aoMapUv:tt&&b(P.aoMap.channel),lightMapUv:St&&b(P.lightMap.channel),bumpMapUv:lt&&b(P.bumpMap.channel),normalMapUv:kt&&b(P.normalMap.channel),displacementMapUv:re&&b(P.displacementMap.channel),emissiveMapUv:Ht&&b(P.emissiveMap.channel),metalnessMapUv:Lt&&b(P.metalnessMap.channel),roughnessMapUv:zt&&b(P.roughnessMap.channel),anisotropyMapUv:ge&&b(P.anisotropyMap.channel),clearcoatMapUv:Xe&&b(P.clearcoatMap.channel),clearcoatNormalMapUv:Le&&b(P.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ft&&b(P.clearcoatRoughnessMap.channel),iridescenceMapUv:nt&&b(P.iridescenceMap.channel),iridescenceThicknessMapUv:Ue&&b(P.iridescenceThicknessMap.channel),sheenColorMapUv:ke&&b(P.sheenColorMap.channel),sheenRoughnessMapUv:Fe&&b(P.sheenRoughnessMap.channel),specularMapUv:ze&&b(P.specularMap.channel),specularColorMapUv:He&&b(P.specularColorMap.channel),specularIntensityMapUv:vt&&b(P.specularIntensityMap.channel),transmissionMapUv:ae&&b(P.transmissionMap.channel),thicknessMapUv:Re&&b(P.thicknessMap.channel),alphaMapUv:rt&&b(P.alphaMap.channel),vertexTangents:!!I.attributes.tangent&&(kt||qe),vertexColors:P.vertexColors,vertexAlphas:P.vertexColors===!0&&!!I.attributes.color&&I.attributes.color.itemSize===4,pointsUvs:L.isPoints===!0&&!!I.attributes.uv&&(Ce||rt),fog:!!q,useFog:P.fog===!0,fogExp2:!!q&&q.isFogExp2,flatShading:P.wireframe===!1&&(P.flatShading===!0||I.attributes.normal===void 0&&kt===!1&&(P.isMeshLambertMaterial||P.isMeshPhongMaterial||P.isMeshStandardMaterial||P.isMeshPhysicalMaterial)),sizeAttenuation:P.sizeAttenuation===!0,logarithmicDepthBuffer:f,reversedDepthBuffer:pe,skinning:L.isSkinnedMesh===!0,morphTargets:I.morphAttributes.position!==void 0,morphNormals:I.morphAttributes.normal!==void 0,morphColors:I.morphAttributes.color!==void 0,morphTargetsCount:W,morphTextureStride:H,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numLightProbes:R.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:P.dithering,shadowMapEnabled:t.shadowMap.enabled&&F.length>0,shadowMapType:t.shadowMap.type,toneMapping:ht,decodeVideoTexture:Ce&&P.map.isVideoTexture===!0&&vn.getTransfer(P.map.colorSpace)===Pn,decodeVideoTextureEmissive:Ht&&P.emissiveMap.isVideoTexture===!0&&vn.getTransfer(P.emissiveMap.colorSpace)===Pn,premultipliedAlpha:P.premultipliedAlpha,doubleSided:P.side===os,flipSided:P.side===Ri,useDepthPacking:P.depthPacking>=0,depthPacking:P.depthPacking||0,index0AttributeName:P.index0AttributeName,extensionClipCullDistance:Qe&&P.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Qe&&P.extensions.multiDraw===!0||ce)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:P.customProgramCacheKey()};return Gt.vertexUv1s=c.has(1),Gt.vertexUv2s=c.has(2),Gt.vertexUv3s=c.has(3),c.clear(),Gt}function v(P){const R=[];if(P.shaderID?R.push(P.shaderID):(R.push(P.customVertexShaderID),R.push(P.customFragmentShaderID)),P.defines!==void 0)for(const F in P.defines)R.push(F),R.push(P.defines[F]);return P.isRawShaderMaterial===!1&&(w(R,P),_(R,P),R.push(t.outputColorSpace)),R.push(P.customProgramCacheKey),R.join()}function w(P,R){P.push(R.precision),P.push(R.outputColorSpace),P.push(R.envMapMode),P.push(R.envMapCubeUVHeight),P.push(R.mapUv),P.push(R.alphaMapUv),P.push(R.lightMapUv),P.push(R.aoMapUv),P.push(R.bumpMapUv),P.push(R.normalMapUv),P.push(R.displacementMapUv),P.push(R.emissiveMapUv),P.push(R.metalnessMapUv),P.push(R.roughnessMapUv),P.push(R.anisotropyMapUv),P.push(R.clearcoatMapUv),P.push(R.clearcoatNormalMapUv),P.push(R.clearcoatRoughnessMapUv),P.push(R.iridescenceMapUv),P.push(R.iridescenceThicknessMapUv),P.push(R.sheenColorMapUv),P.push(R.sheenRoughnessMapUv),P.push(R.specularMapUv),P.push(R.specularColorMapUv),P.push(R.specularIntensityMapUv),P.push(R.transmissionMapUv),P.push(R.thicknessMapUv),P.push(R.combine),P.push(R.fogExp2),P.push(R.sizeAttenuation),P.push(R.morphTargetsCount),P.push(R.morphAttributeCount),P.push(R.numDirLights),P.push(R.numPointLights),P.push(R.numSpotLights),P.push(R.numSpotLightMaps),P.push(R.numHemiLights),P.push(R.numRectAreaLights),P.push(R.numDirLightShadows),P.push(R.numPointLightShadows),P.push(R.numSpotLightShadows),P.push(R.numSpotLightShadowsWithMaps),P.push(R.numLightProbes),P.push(R.shadowMapType),P.push(R.toneMapping),P.push(R.numClippingPlanes),P.push(R.numClipIntersection),P.push(R.depthPacking)}function _(P,R){s.disableAll(),R.instancing&&s.enable(0),R.instancingColor&&s.enable(1),R.instancingMorph&&s.enable(2),R.matcap&&s.enable(3),R.envMap&&s.enable(4),R.normalMapObjectSpace&&s.enable(5),R.normalMapTangentSpace&&s.enable(6),R.clearcoat&&s.enable(7),R.iridescence&&s.enable(8),R.alphaTest&&s.enable(9),R.vertexColors&&s.enable(10),R.vertexAlphas&&s.enable(11),R.vertexUv1s&&s.enable(12),R.vertexUv2s&&s.enable(13),R.vertexUv3s&&s.enable(14),R.vertexTangents&&s.enable(15),R.anisotropy&&s.enable(16),R.alphaHash&&s.enable(17),R.batching&&s.enable(18),R.dispersion&&s.enable(19),R.batchingColor&&s.enable(20),R.gradientMap&&s.enable(21),P.push(s.mask),s.disableAll(),R.fog&&s.enable(0),R.useFog&&s.enable(1),R.flatShading&&s.enable(2),R.logarithmicDepthBuffer&&s.enable(3),R.reversedDepthBuffer&&s.enable(4),R.skinning&&s.enable(5),R.morphTargets&&s.enable(6),R.morphNormals&&s.enable(7),R.morphColors&&s.enable(8),R.premultipliedAlpha&&s.enable(9),R.shadowMapEnabled&&s.enable(10),R.doubleSided&&s.enable(11),R.flipSided&&s.enable(12),R.useDepthPacking&&s.enable(13),R.dithering&&s.enable(14),R.transmission&&s.enable(15),R.sheen&&s.enable(16),R.opaque&&s.enable(17),R.pointsUvs&&s.enable(18),R.decodeVideoTexture&&s.enable(19),R.decodeVideoTextureEmissive&&s.enable(20),R.alphaToCoverage&&s.enable(21),P.push(s.mask)}function E(P){const R=g[P.type];let F;if(R){const D=as[R];F=hTe.clone(D.uniforms)}else F=P.uniforms;return F}function M(P,R){let F=h.get(R);return F!==void 0?++F.usedTimes:(F=new zCe(t,R,P,i),l.push(F),h.set(R,F)),F}function T(P){if(--P.usedTimes===0){const R=l.indexOf(P);l[R]=l[l.length-1],l.pop(),h.delete(P.cacheKey),P.destroy()}}function A(P){o.remove(P)}function N(){o.dispose()}return{getParameters:y,getProgramCacheKey:v,getUniforms:E,acquireProgram:M,releaseProgram:T,releaseShaderCache:A,programs:l,dispose:N}}function WCe(){let t=new WeakMap;function e(s){return t.has(s)}function n(s){let o=t.get(s);return o===void 0&&(o={},t.set(s,o)),o}function r(s){t.delete(s)}function i(s,o,c){t.get(s)[o]=c}function a(){t=new WeakMap}return{has:e,get:n,remove:r,update:i,dispose:a}}function qCe(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.materialVariant!==e.materialVariant?t.materialVariant-e.materialVariant:t.z!==e.z?t.z-e.z:t.id-e.id}function k8(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 L8(){const t=[];let e=0;const n=[],r=[],i=[];function a(){e=0,n.length=0,r.length=0,i.length=0}function s(m){let g=0;return m.isInstancedMesh&&(g+=2),m.isSkinnedMesh&&(g+=1),g}function o(m,g,b,y,v,w){let _=t[e];return _===void 0?(_={id:m.id,object:m,geometry:g,material:b,materialVariant:s(m),groupOrder:y,renderOrder:m.renderOrder,z:v,group:w},t[e]=_):(_.id=m.id,_.object=m,_.geometry=g,_.material=b,_.materialVariant=s(m),_.groupOrder=y,_.renderOrder=m.renderOrder,_.z=v,_.group=w),e++,_}function c(m,g,b,y,v,w){const _=o(m,g,b,y,v,w);b.transmission>0?r.push(_):b.transparent===!0?i.push(_):n.push(_)}function l(m,g,b,y,v,w){const _=o(m,g,b,y,v,w);b.transmission>0?r.unshift(_):b.transparent===!0?i.unshift(_):n.unshift(_)}function h(m,g){n.length>1&&n.sort(m||qCe),r.length>1&&r.sort(g||k8),i.length>1&&i.sort(g||k8)}function f(){for(let m=e,g=t.length;m<g;m++){const b=t[m];if(b.id===null)break;b.id=null,b.object=null,b.geometry=null,b.material=null,b.group=null}}return{opaque:n,transmissive:r,transparent:i,init:a,push:c,unshift:l,finish:f,sort:h}}function XCe(){let t=new WeakMap;function e(r,i){const a=t.get(r);let s;return a===void 0?(s=new L8,t.set(r,[s])):i>=a.length?(s=new L8,a.push(s)):s=a[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function KCe(){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 me,color:new en};break;case"SpotLight":n={position:new me,direction:new me,color:new en,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new me,color:new en,distance:0,decay:0};break;case"HemisphereLight":n={direction:new me,skyColor:new en,groundColor:new en};break;case"RectAreaLight":n={color:new en,position:new me,halfWidth:new me,halfHeight:new me};break}return t[e.id]=n,n}}}function YCe(){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 nn};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new nn};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new nn,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let ZCe=0;function JCe(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function QCe(t){const e=new KCe,n=YCe(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let l=0;l<9;l++)r.probe.push(new me);const i=new me,a=new Ln,s=new Ln;function o(l){let h=0,f=0,m=0;for(let R=0;R<9;R++)r.probe[R].set(0,0,0);let g=0,b=0,y=0,v=0,w=0,_=0,E=0,M=0,T=0,A=0,N=0;l.sort(JCe);for(let R=0,F=l.length;R<F;R++){const D=l[R],L=D.color,q=D.intensity,I=D.distance;let U=null;if(D.shadow&&D.shadow.map&&(D.shadow.map.texture.format===$d?U=D.shadow.map.texture:U=D.shadow.map.depthTexture||D.shadow.map.texture),D.isAmbientLight)h+=L.r*q,f+=L.g*q,m+=L.b*q;else if(D.isLightProbe){for(let k=0;k<9;k++)r.probe[k].addScaledVector(D.sh.coefficients[k],q);N++}else if(D.isDirectionalLight){const k=e.get(D);if(k.color.copy(D.color).multiplyScalar(D.intensity),D.castShadow){const V=D.shadow,$=n.get(D);$.shadowIntensity=V.intensity,$.shadowBias=V.bias,$.shadowNormalBias=V.normalBias,$.shadowRadius=V.radius,$.shadowMapSize=V.mapSize,r.directionalShadow[g]=$,r.directionalShadowMap[g]=U,r.directionalShadowMatrix[g]=D.shadow.matrix,_++}r.directional[g]=k,g++}else if(D.isSpotLight){const k=e.get(D);k.position.setFromMatrixPosition(D.matrixWorld),k.color.copy(L).multiplyScalar(q),k.distance=I,k.coneCos=Math.cos(D.angle),k.penumbraCos=Math.cos(D.angle*(1-D.penumbra)),k.decay=D.decay,r.spot[y]=k;const V=D.shadow;if(D.map&&(r.spotLightMap[T]=D.map,T++,V.updateMatrices(D),D.castShadow&&A++),r.spotLightMatrix[y]=V.matrix,D.castShadow){const $=n.get(D);$.shadowIntensity=V.intensity,$.shadowBias=V.bias,$.shadowNormalBias=V.normalBias,$.shadowRadius=V.radius,$.shadowMapSize=V.mapSize,r.spotShadow[y]=$,r.spotShadowMap[y]=U,M++}y++}else if(D.isRectAreaLight){const k=e.get(D);k.color.copy(L).multiplyScalar(q),k.halfWidth.set(D.width*.5,0,0),k.halfHeight.set(0,D.height*.5,0),r.rectArea[v]=k,v++}else if(D.isPointLight){const k=e.get(D);if(k.color.copy(D.color).multiplyScalar(D.intensity),k.distance=D.distance,k.decay=D.decay,D.castShadow){const V=D.shadow,$=n.get(D);$.shadowIntensity=V.intensity,$.shadowBias=V.bias,$.shadowNormalBias=V.normalBias,$.shadowRadius=V.radius,$.shadowMapSize=V.mapSize,$.shadowCameraNear=V.camera.near,$.shadowCameraFar=V.camera.far,r.pointShadow[b]=$,r.pointShadowMap[b]=U,r.pointShadowMatrix[b]=D.shadow.matrix,E++}r.point[b]=k,b++}else if(D.isHemisphereLight){const k=e.get(D);k.skyColor.copy(D.color).multiplyScalar(q),k.groundColor.copy(D.groundColor).multiplyScalar(q),r.hemi[w]=k,w++}}v>0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=dt.LTC_FLOAT_1,r.rectAreaLTC2=dt.LTC_FLOAT_2):(r.rectAreaLTC1=dt.LTC_HALF_1,r.rectAreaLTC2=dt.LTC_HALF_2)),r.ambient[0]=h,r.ambient[1]=f,r.ambient[2]=m;const P=r.hash;(P.directionalLength!==g||P.pointLength!==b||P.spotLength!==y||P.rectAreaLength!==v||P.hemiLength!==w||P.numDirectionalShadows!==_||P.numPointShadows!==E||P.numSpotShadows!==M||P.numSpotMaps!==T||P.numLightProbes!==N)&&(r.directional.length=g,r.spot.length=y,r.rectArea.length=v,r.point.length=b,r.hemi.length=w,r.directionalShadow.length=_,r.directionalShadowMap.length=_,r.pointShadow.length=E,r.pointShadowMap.length=E,r.spotShadow.length=M,r.spotShadowMap.length=M,r.directionalShadowMatrix.length=_,r.pointShadowMatrix.length=E,r.spotLightMatrix.length=M+T-A,r.spotLightMap.length=T,r.numSpotLightShadowsWithMaps=A,r.numLightProbes=N,P.directionalLength=g,P.pointLength=b,P.spotLength=y,P.rectAreaLength=v,P.hemiLength=w,P.numDirectionalShadows=_,P.numPointShadows=E,P.numSpotShadows=M,P.numSpotMaps=T,P.numLightProbes=N,r.version=ZCe++)}function c(l,h){let f=0,m=0,g=0,b=0,y=0;const v=h.matrixWorldInverse;for(let w=0,_=l.length;w<_;w++){const E=l[w];if(E.isDirectionalLight){const M=r.directional[f];M.direction.setFromMatrixPosition(E.matrixWorld),i.setFromMatrixPosition(E.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(v),f++}else if(E.isSpotLight){const M=r.spot[g];M.position.setFromMatrixPosition(E.matrixWorld),M.position.applyMatrix4(v),M.direction.setFromMatrixPosition(E.matrixWorld),i.setFromMatrixPosition(E.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(v),g++}else if(E.isRectAreaLight){const M=r.rectArea[b];M.position.setFromMatrixPosition(E.matrixWorld),M.position.applyMatrix4(v),s.identity(),a.copy(E.matrixWorld),a.premultiply(v),s.extractRotation(a),M.halfWidth.set(E.width*.5,0,0),M.halfHeight.set(0,E.height*.5,0),M.halfWidth.applyMatrix4(s),M.halfHeight.applyMatrix4(s),b++}else if(E.isPointLight){const M=r.point[m];M.position.setFromMatrixPosition(E.matrixWorld),M.position.applyMatrix4(v),m++}else if(E.isHemisphereLight){const M=r.hemi[y];M.direction.setFromMatrixPosition(E.matrixWorld),M.direction.transformDirection(v),y++}}}return{setup:o,setupView:c,state:r}}function F8(t){const e=new QCe(t),n=[],r=[];function i(h){l.camera=h,n.length=0,r.length=0}function a(h){n.push(h)}function s(h){r.push(h)}function o(){e.setup(n)}function c(h){e.setupView(n,h)}const l={lightsArray:n,shadowsArray:r,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:l,setupLights:o,setupLightsView:c,pushLight:a,pushShadow:s}}function e3e(t){let e=new WeakMap;function n(i,a=0){const s=e.get(i);let o;return s===void 0?(o=new F8(t),e.set(i,[o])):a>=s.length?(o=new F8(t),s.push(o)):o=s[a],o}function r(){e=new WeakMap}return{get:n,dispose:r}}const t3e=`void main() {
gl_Position = vec4( position, 1.0 );
}`,n3e=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
void main() {
const float samples = float( VSM_SAMPLES );
float mean = 0.0;
float squared_mean = 0.0;
float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
for ( float i = 0.0; i < samples; i ++ ) {
float uvOffset = uvStart + i * uvStride;
#ifdef HORIZONTAL_PASS
vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;
mean += distribution.x;
squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
#else
float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;
mean += depth;
squared_mean += depth * depth;
#endif
}
mean = mean / samples;
squared_mean = squared_mean / samples;
float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );
gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );
}`,r3e=[new me(1,0,0),new me(-1,0,0),new me(0,1,0),new me(0,-1,0),new me(0,0,1),new me(0,0,-1)],i3e=[new me(0,-1,0),new me(0,-1,0),new me(0,0,1),new me(0,0,-1),new me(0,-1,0),new me(0,-1,0)],U8=new Ln,yh=new me,IM=new me;function a3e(t,e,n){let r=new xC;const i=new nn,a=new nn,s=new nr,o=new vTe,c=new yTe,l={},h=n.maxTextureSize,f={[wl]:Ri,[Ri]:wl,[os]:os},m=new Ns({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new nn},radius:{value:4}},vertexShader:t3e,fragmentShader:n3e}),g=m.clone();g.defines.HORIZONTAL_PASS=1;const b=new jr;b.setAttribute("position",new Ji(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new _e(b,m),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Wh;let w=this.type;this.render=function(A,N,P){if(v.enabled===!1||v.autoUpdate===!1&&v.needsUpdate===!1||A.length===0)return;this.type===sC&&(Jt("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=Wh);const R=t.getRenderTarget(),F=t.getActiveCubeFace(),D=t.getActiveMipmapLevel(),L=t.state;L.setBlending(co),L.buffers.depth.getReversed()===!0?L.buffers.color.setClear(0,0,0,0):L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);const q=w!==this.type;q&&N.traverse(function(I){I.material&&(Array.isArray(I.material)?I.material.forEach(U=>U.needsUpdate=!0):I.material.needsUpdate=!0)});for(let I=0,U=A.length;I<U;I++){const k=A[I],V=k.shadow;if(V===void 0){Jt("WebGLShadowMap:",k,"has no shadow.");continue}if(V.autoUpdate===!1&&V.needsUpdate===!1)continue;i.copy(V.mapSize);const $=V.getFrameExtents();i.multiply($),a.copy(V.mapSize),(i.x>h||i.y>h)&&(i.x>h&&(a.x=Math.floor(h/$.x),i.x=a.x*$.x,V.mapSize.x=a.x),i.y>h&&(a.y=Math.floor(h/$.y),i.y=a.y*$.y,V.mapSize.y=a.y));const Y=t.state.buffers.depth.getReversed();if(V.camera._reversedDepth=Y,V.map===null||q===!0){if(V.map!==null&&(V.map.depthTexture!==null&&(V.map.depthTexture.dispose(),V.map.depthTexture=null),V.map.dispose()),this.type===Ph){if(k.isPointLight){Jt("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}V.map=new bs(i.x,i.y,{format:$d,type:vo,minFilter:Jr,magFilter:Jr,generateMipmaps:!1}),V.map.texture.name=k.name+".shadowMap",V.map.depthTexture=new Wp(i.x,i.y,ds),V.map.depthTexture.name=k.name+".shadowMapDepth",V.map.depthTexture.format=yo,V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=Fr,V.map.depthTexture.magFilter=Fr}else k.isPointLight?(V.map=new XG(i.x),V.map.depthTexture=new dTe(i.x,Ts)):(V.map=new bs(i.x,i.y),V.map.depthTexture=new Wp(i.x,i.y,Ts)),V.map.depthTexture.name=k.name+".shadowMap",V.map.depthTexture.format=yo,this.type===Wh?(V.map.depthTexture.compareFunction=Y?mC:pC,V.map.depthTexture.minFilter=Jr,V.map.depthTexture.magFilter=Jr):(V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=Fr,V.map.depthTexture.magFilter=Fr);V.camera.updateProjectionMatrix()}const J=V.map.isWebGLCubeRenderTarget?6:1;for(let W=0;W<J;W++){if(V.map.isWebGLCubeRenderTarget)t.setRenderTarget(V.map,W),t.clear();else{W===0&&(t.setRenderTarget(V.map),t.clear());const H=V.getViewport(W);s.set(a.x*H.x,a.y*H.y,a.x*H.z,a.y*H.w),L.viewport(s)}if(k.isPointLight){const H=V.camera,te=V.matrix,we=k.distance||H.far;we!==H.far&&(H.far=we,H.updateProjectionMatrix()),yh.setFromMatrixPosition(k.matrixWorld),H.position.copy(yh),IM.copy(H.position),IM.add(r3e[W]),H.up.copy(i3e[W]),H.lookAt(IM),H.updateMatrixWorld(),te.makeTranslation(-yh.x,-yh.y,-yh.z),U8.multiplyMatrices(H.projectionMatrix,H.matrixWorldInverse),V._frustum.setFromProjectionMatrix(U8,H.coordinateSystem,H.reversedDepth)}else V.updateMatrices(k);r=V.getFrustum(),M(N,P,V.camera,k,this.type)}V.isPointLightShadow!==!0&&this.type===Ph&&_(V,P),V.needsUpdate=!1}w=this.type,v.needsUpdate=!1,t.setRenderTarget(R,F,D)};function _(A,N){const P=e.update(y);m.defines.VSM_SAMPLES!==A.blurSamples&&(m.defines.VSM_SAMPLES=A.blurSamples,g.defines.VSM_SAMPLES=A.blurSamples,m.needsUpdate=!0,g.needsUpdate=!0),A.mapPass===null&&(A.mapPass=new bs(i.x,i.y,{format:$d,type:vo})),m.uniforms.shadow_pass.value=A.map.depthTexture,m.uniforms.resolution.value=A.mapSize,m.uniforms.radius.value=A.radius,t.setRenderTarget(A.mapPass),t.clear(),t.renderBufferDirect(N,null,P,m,y,null),g.uniforms.shadow_pass.value=A.mapPass.texture,g.uniforms.resolution.value=A.mapSize,g.uniforms.radius.value=A.radius,t.setRenderTarget(A.map),t.clear(),t.renderBufferDirect(N,null,P,g,y,null)}function E(A,N,P,R){let F=null;const D=P.isPointLight===!0?A.customDistanceMaterial:A.customDepthMaterial;if(D!==void 0)F=D;else if(F=P.isPointLight===!0?c:o,t.localClippingEnabled&&N.clipShadows===!0&&Array.isArray(N.clippingPlanes)&&N.clippingPlanes.length!==0||N.displacementMap&&N.displacementScale!==0||N.alphaMap&&N.alphaTest>0||N.map&&N.alphaTest>0||N.alphaToCoverage===!0){const L=F.uuid,q=N.uuid;let I=l[L];I===void 0&&(I={},l[L]=I);let U=I[q];U===void 0&&(U=F.clone(),I[q]=U,N.addEventListener("dispose",T)),F=U}if(F.visible=N.visible,F.wireframe=N.wireframe,R===Ph?F.side=N.shadowSide!==null?N.shadowSide:N.side:F.side=N.shadowSide!==null?N.shadowSide:f[N.side],F.alphaMap=N.alphaMap,F.alphaTest=N.alphaToCoverage===!0?.5:N.alphaTest,F.map=N.map,F.clipShadows=N.clipShadows,F.clippingPlanes=N.clippingPlanes,F.clipIntersection=N.clipIntersection,F.displacementMap=N.displacementMap,F.displacementScale=N.displacementScale,F.displacementBias=N.displacementBias,F.wireframeLinewidth=N.wireframeLinewidth,F.linewidth=N.linewidth,P.isPointLight===!0&&F.isMeshDistanceMaterial===!0){const L=t.properties.get(F);L.light=P}return F}function M(A,N,P,R,F){if(A.visible===!1)return;if(A.layers.test(N.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&F===Ph)&&(!A.frustumCulled||r.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,A.matrixWorld);const q=e.update(A),I=A.material;if(Array.isArray(I)){const U=q.groups;for(let k=0,V=U.length;k<V;k++){const $=U[k],Y=I[$.materialIndex];if(Y&&Y.visible){const J=E(A,Y,R,F);A.onBeforeShadow(t,A,N,P,q,J,$),t.renderBufferDirect(P,null,q,J,A,$),A.onAfterShadow(t,A,N,P,q,J,$)}}}else if(I.visible){const U=E(A,I,R,F);A.onBeforeShadow(t,A,N,P,q,U,null),t.renderBufferDirect(P,null,q,U,A,null),A.onAfterShadow(t,A,N,P,q,U,null)}}const L=A.children;for(let q=0,I=L.length;q<I;q++)M(L[q],N,P,R,F)}function T(A){A.target.removeEventListener("dispose",T);for(const P in l){const R=l[P],F=A.target.uuid;F in R&&(R[F].dispose(),delete R[F])}}}function s3e(t,e){function n(){let ae=!1;const Re=new nr;let Ie=null;const rt=new nr(0,0,0,0);return{setMask:function($e){Ie!==$e&&!ae&&(t.colorMask($e,$e,$e,$e),Ie=$e)},setLocked:function($e){ae=$e},setClear:function($e,he,Qe,ht,Gt){Gt===!0&&($e*=ht,he*=ht,Qe*=ht),Re.set($e,he,Qe,ht),rt.equals(Re)===!1&&(t.clearColor($e,he,Qe,ht),rt.copy(Re))},reset:function(){ae=!1,Ie=null,rt.set(-1,0,0,0)}}}function r(){let ae=!1,Re=!1,Ie=null,rt=null,$e=null;return{setReversed:function(he){if(Re!==he){const Qe=e.get("EXT_clip_control");he?Qe.clipControlEXT(Qe.LOWER_LEFT_EXT,Qe.ZERO_TO_ONE_EXT):Qe.clipControlEXT(Qe.LOWER_LEFT_EXT,Qe.NEGATIVE_ONE_TO_ONE_EXT),Re=he;const ht=$e;$e=null,this.setClear(ht)}},getReversed:function(){return Re},setTest:function(he){he?de(t.DEPTH_TEST):pe(t.DEPTH_TEST)},setMask:function(he){Ie!==he&&!ae&&(t.depthMask(he),Ie=he)},setFunc:function(he){if(Re&&(he=kEe[he]),rt!==he){switch(he){case nA:t.depthFunc(t.NEVER);break;case rA:t.depthFunc(t.ALWAYS);break;case iA:t.depthFunc(t.LESS);break;case Bd:t.depthFunc(t.LEQUAL);break;case aA:t.depthFunc(t.EQUAL);break;case sA:t.depthFunc(t.GEQUAL);break;case oA:t.depthFunc(t.GREATER);break;case lA:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}rt=he}},setLocked:function(he){ae=he},setClear:function(he){$e!==he&&($e=he,Re&&(he=1-he),t.clearDepth(he))},reset:function(){ae=!1,Ie=null,rt=null,$e=null,Re=!1}}}function i(){let ae=!1,Re=null,Ie=null,rt=null,$e=null,he=null,Qe=null,ht=null,Gt=null;return{setTest:function(Qt){ae||(Qt?de(t.STENCIL_TEST):pe(t.STENCIL_TEST))},setMask:function(Qt){Re!==Qt&&!ae&&(t.stencilMask(Qt),Re=Qt)},setFunc:function(Qt,mn,En){(Ie!==Qt||rt!==mn||$e!==En)&&(t.stencilFunc(Qt,mn,En),Ie=Qt,rt=mn,$e=En)},setOp:function(Qt,mn,En){(he!==Qt||Qe!==mn||ht!==En)&&(t.stencilOp(Qt,mn,En),he=Qt,Qe=mn,ht=En)},setLocked:function(Qt){ae=Qt},setClear:function(Qt){Gt!==Qt&&(t.clearStencil(Qt),Gt=Qt)},reset:function(){ae=!1,Re=null,Ie=null,rt=null,$e=null,he=null,Qe=null,ht=null,Gt=null}}}const a=new n,s=new r,o=new i,c=new WeakMap,l=new WeakMap;let h={},f={},m=new WeakMap,g=[],b=null,y=!1,v=null,w=null,_=null,E=null,M=null,T=null,A=null,N=new en(0,0,0),P=0,R=!1,F=null,D=null,L=null,q=null,I=null;const U=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let k=!1,V=0;const $=t.getParameter(t.VERSION);$.indexOf("WebGL")!==-1?(V=parseFloat(/^WebGL (\d)/.exec($)[1]),k=V>=1):$.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec($)[1]),k=V>=2);let Y=null,J={};const W=t.getParameter(t.SCISSOR_BOX),H=t.getParameter(t.VIEWPORT),te=new nr().fromArray(W),we=new nr().fromArray(H);function Ae(ae,Re,Ie,rt){const $e=new Uint8Array(4),he=t.createTexture();t.bindTexture(ae,he),t.texParameteri(ae,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(ae,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Qe=0;Qe<Ie;Qe++)ae===t.TEXTURE_3D||ae===t.TEXTURE_2D_ARRAY?t.texImage3D(Re,0,t.RGBA,1,1,rt,0,t.RGBA,t.UNSIGNED_BYTE,$e):t.texImage2D(Re+Qe,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,$e);return he}const ne={};ne[t.TEXTURE_2D]=Ae(t.TEXTURE_2D,t.TEXTURE_2D,1),ne[t.TEXTURE_CUBE_MAP]=Ae(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),ne[t.TEXTURE_2D_ARRAY]=Ae(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),ne[t.TEXTURE_3D]=Ae(t.TEXTURE_3D,t.TEXTURE_3D,1,1),a.setClear(0,0,0,1),s.setClear(1),o.setClear(0),de(t.DEPTH_TEST),s.setFunc(Bd),lt(!1),kt(kU),de(t.CULL_FACE),tt(co);function de(ae){h[ae]!==!0&&(t.enable(ae),h[ae]=!0)}function pe(ae){h[ae]!==!1&&(t.disable(ae),h[ae]=!1)}function fe(ae,Re){return f[ae]!==Re?(t.bindFramebuffer(ae,Re),f[ae]=Re,ae===t.DRAW_FRAMEBUFFER&&(f[t.FRAMEBUFFER]=Re),ae===t.FRAMEBUFFER&&(f[t.DRAW_FRAMEBUFFER]=Re),!0):!1}function ce(ae,Re){let Ie=g,rt=!1;if(ae){Ie=m.get(Re),Ie===void 0&&(Ie=[],m.set(Re,Ie));const $e=ae.textures;if(Ie.length!==$e.length||Ie[0]!==t.COLOR_ATTACHMENT0){for(let he=0,Qe=$e.length;he<Qe;he++)Ie[he]=t.COLOR_ATTACHMENT0+he;Ie.length=$e.length,rt=!0}}else Ie[0]!==t.BACK&&(Ie[0]=t.BACK,rt=!0);rt&&t.drawBuffers(Ie)}function Ce(ae){return b!==ae?(t.useProgram(ae),b=ae,!0):!1}const ye={[ac]:t.FUNC_ADD,[aEe]:t.FUNC_SUBTRACT,[sEe]:t.FUNC_REVERSE_SUBTRACT};ye[oEe]=t.MIN,ye[lEe]=t.MAX;const Ze={[cEe]:t.ZERO,[uEe]:t.ONE,[dEe]:t.SRC_COLOR,[eA]:t.SRC_ALPHA,[vEe]:t.SRC_ALPHA_SATURATE,[mEe]:t.DST_COLOR,[hEe]:t.DST_ALPHA,[fEe]:t.ONE_MINUS_SRC_COLOR,[tA]:t.ONE_MINUS_SRC_ALPHA,[gEe]:t.ONE_MINUS_DST_COLOR,[pEe]:t.ONE_MINUS_DST_ALPHA,[yEe]:t.CONSTANT_COLOR,[xEe]:t.ONE_MINUS_CONSTANT_COLOR,[bEe]:t.CONSTANT_ALPHA,[wEe]:t.ONE_MINUS_CONSTANT_ALPHA};function tt(ae,Re,Ie,rt,$e,he,Qe,ht,Gt,Qt){if(ae===co){y===!0&&(pe(t.BLEND),y=!1);return}if(y===!1&&(de(t.BLEND),y=!0),ae!==iEe){if(ae!==v||Qt!==R){if((w!==ac||M!==ac)&&(t.blendEquation(t.FUNC_ADD),w=ac,M=ac),Qt)switch(ae){case id:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case QT:t.blendFunc(t.ONE,t.ONE);break;case LU:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case FU:t.blendFuncSeparate(t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ZERO,t.ONE);break;default:pn("WebGLState: Invalid blending: ",ae);break}else switch(ae){case id:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case QT:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE,t.ONE,t.ONE);break;case LU:pn("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case FU:pn("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:pn("WebGLState: Invalid blending: ",ae);break}_=null,E=null,T=null,A=null,N.set(0,0,0),P=0,v=ae,R=Qt}return}$e=$e||Re,he=he||Ie,Qe=Qe||rt,(Re!==w||$e!==M)&&(t.blendEquationSeparate(ye[Re],ye[$e]),w=Re,M=$e),(Ie!==_||rt!==E||he!==T||Qe!==A)&&(t.blendFuncSeparate(Ze[Ie],Ze[rt],Ze[he],Ze[Qe]),_=Ie,E=rt,T=he,A=Qe),(ht.equals(N)===!1||Gt!==P)&&(t.blendColor(ht.r,ht.g,ht.b,Gt),N.copy(ht),P=Gt),v=ae,R=!1}function St(ae,Re){ae.side===os?pe(t.CULL_FACE):de(t.CULL_FACE);let Ie=ae.side===Ri;Re&&(Ie=!Ie),lt(Ie),ae.blending===id&&ae.transparent===!1?tt(co):tt(ae.blending,ae.blendEquation,ae.blendSrc,ae.blendDst,ae.blendEquationAlpha,ae.blendSrcAlpha,ae.blendDstAlpha,ae.blendColor,ae.blendAlpha,ae.premultipliedAlpha),s.setFunc(ae.depthFunc),s.setTest(ae.depthTest),s.setMask(ae.depthWrite),a.setMask(ae.colorWrite);const rt=ae.stencilWrite;o.setTest(rt),rt&&(o.setMask(ae.stencilWriteMask),o.setFunc(ae.stencilFunc,ae.stencilRef,ae.stencilFuncMask),o.setOp(ae.stencilFail,ae.stencilZFail,ae.stencilZPass)),Ht(ae.polygonOffset,ae.polygonOffsetFactor,ae.polygonOffsetUnits),ae.alphaToCoverage===!0?de(t.SAMPLE_ALPHA_TO_COVERAGE):pe(t.SAMPLE_ALPHA_TO_COVERAGE)}function lt(ae){F!==ae&&(ae?t.frontFace(t.CW):t.frontFace(t.CCW),F=ae)}function kt(ae){ae!==nEe?(de(t.CULL_FACE),ae!==D&&(ae===kU?t.cullFace(t.BACK):ae===rEe?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):pe(t.CULL_FACE),D=ae}function re(ae){ae!==L&&(k&&t.lineWidth(ae),L=ae)}function Ht(ae,Re,Ie){ae?(de(t.POLYGON_OFFSET_FILL),(q!==Re||I!==Ie)&&(q=Re,I=Ie,s.getReversed()&&(Re=-Re),t.polygonOffset(Re,Ie))):pe(t.POLYGON_OFFSET_FILL)}function Lt(ae){ae?de(t.SCISSOR_TEST):pe(t.SCISSOR_TEST)}function zt(ae){ae===void 0&&(ae=t.TEXTURE0+U-1),Y!==ae&&(t.activeTexture(ae),Y=ae)}function qe(ae,Re,Ie){Ie===void 0&&(Y===null?Ie=t.TEXTURE0+U-1:Ie=Y);let rt=J[Ie];rt===void 0&&(rt={type:void 0,texture:void 0},J[Ie]=rt),(rt.type!==ae||rt.texture!==Re)&&(Y!==Ie&&(t.activeTexture(Ie),Y=Ie),t.bindTexture(ae,Re||ne[ae]),rt.type=ae,rt.texture=Re)}function Z(){const ae=J[Y];ae!==void 0&&ae.type!==void 0&&(t.bindTexture(ae.type,null),ae.type=void 0,ae.texture=void 0)}function z(){try{t.compressedTexImage2D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function ie(){try{t.compressedTexImage3D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function Ee(){try{t.texSubImage2D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function Pe(){try{t.texSubImage3D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function ge(){try{t.compressedTexSubImage2D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function Xe(){try{t.compressedTexSubImage3D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function Le(){try{t.texStorage2D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function ft(){try{t.texStorage3D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function nt(){try{t.texImage2D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function Ue(){try{t.texImage3D(...arguments)}catch(ae){pn("WebGLState:",ae)}}function ke(ae){te.equals(ae)===!1&&(t.scissor(ae.x,ae.y,ae.z,ae.w),te.copy(ae))}function Fe(ae){we.equals(ae)===!1&&(t.viewport(ae.x,ae.y,ae.z,ae.w),we.copy(ae))}function ze(ae,Re){let Ie=l.get(Re);Ie===void 0&&(Ie=new WeakMap,l.set(Re,Ie));let rt=Ie.get(ae);rt===void 0&&(rt=t.getUniformBlockIndex(Re,ae.name),Ie.set(ae,rt))}function He(ae,Re){const rt=l.get(Re).get(ae);c.get(Re)!==rt&&(t.uniformBlockBinding(Re,rt,ae.__bindingPointIndex),c.set(Re,rt))}function vt(){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(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),s.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),h={},Y=null,J={},f={},m=new WeakMap,g=[],b=null,y=!1,v=null,w=null,_=null,E=null,M=null,T=null,A=null,N=new en(0,0,0),P=0,R=!1,F=null,D=null,L=null,q=null,I=null,te.set(0,0,t.canvas.width,t.canvas.height),we.set(0,0,t.canvas.width,t.canvas.height),a.reset(),s.reset(),o.reset()}return{buffers:{color:a,depth:s,stencil:o},enable:de,disable:pe,bindFramebuffer:fe,drawBuffers:ce,useProgram:Ce,setBlending:tt,setMaterial:St,setFlipSided:lt,setCullFace:kt,setLineWidth:re,setPolygonOffset:Ht,setScissorTest:Lt,activeTexture:zt,bindTexture:qe,unbindTexture:Z,compressedTexImage2D:z,compressedTexImage3D:ie,texImage2D:nt,texImage3D:Ue,updateUBOMapping:ze,uniformBlockBinding:He,texStorage2D:Le,texStorage3D:ft,texSubImage2D:Ee,texSubImage3D:Pe,compressedTexSubImage2D:ge,compressedTexSubImage3D:Xe,scissor:ke,viewport:Fe,reset:vt}}function o3e(t,e,n,r,i,a,s){const o=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,c=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),l=new nn,h=new WeakMap;let f;const m=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function b(Z,z){return g?new OffscreenCanvas(Z,z):Ey("canvas")}function y(Z,z,ie){let Ee=1;const Pe=qe(Z);if((Pe.width>ie||Pe.height>ie)&&(Ee=ie/Math.max(Pe.width,Pe.height)),Ee<1)if(typeof HTMLImageElement<"u"&&Z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Z instanceof ImageBitmap||typeof VideoFrame<"u"&&Z instanceof VideoFrame){const ge=Math.floor(Ee*Pe.width),Xe=Math.floor(Ee*Pe.height);f===void 0&&(f=b(ge,Xe));const Le=z?b(ge,Xe):f;return Le.width=ge,Le.height=Xe,Le.getContext("2d").drawImage(Z,0,0,ge,Xe),Jt("WebGLRenderer: Texture has been resized from ("+Pe.width+"x"+Pe.height+") to ("+ge+"x"+Xe+")."),Le}else return"data"in Z&&Jt("WebGLRenderer: Image in DataTexture is too big ("+Pe.width+"x"+Pe.height+")."),Z;return Z}function v(Z){return Z.generateMipmaps}function w(Z){t.generateMipmap(Z)}function _(Z){return Z.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:Z.isWebGL3DRenderTarget?t.TEXTURE_3D:Z.isWebGLArrayRenderTarget||Z.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function E(Z,z,ie,Ee,Pe=!1){if(Z!==null){if(t[Z]!==void 0)return t[Z];Jt("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Z+"'")}let ge=z;if(z===t.RED&&(ie===t.FLOAT&&(ge=t.R32F),ie===t.HALF_FLOAT&&(ge=t.R16F),ie===t.UNSIGNED_BYTE&&(ge=t.R8)),z===t.RED_INTEGER&&(ie===t.UNSIGNED_BYTE&&(ge=t.R8UI),ie===t.UNSIGNED_SHORT&&(ge=t.R16UI),ie===t.UNSIGNED_INT&&(ge=t.R32UI),ie===t.BYTE&&(ge=t.R8I),ie===t.SHORT&&(ge=t.R16I),ie===t.INT&&(ge=t.R32I)),z===t.RG&&(ie===t.FLOAT&&(ge=t.RG32F),ie===t.HALF_FLOAT&&(ge=t.RG16F),ie===t.UNSIGNED_BYTE&&(ge=t.RG8)),z===t.RG_INTEGER&&(ie===t.UNSIGNED_BYTE&&(ge=t.RG8UI),ie===t.UNSIGNED_SHORT&&(ge=t.RG16UI),ie===t.UNSIGNED_INT&&(ge=t.RG32UI),ie===t.BYTE&&(ge=t.RG8I),ie===t.SHORT&&(ge=t.RG16I),ie===t.INT&&(ge=t.RG32I)),z===t.RGB_INTEGER&&(ie===t.UNSIGNED_BYTE&&(ge=t.RGB8UI),ie===t.UNSIGNED_SHORT&&(ge=t.RGB16UI),ie===t.UNSIGNED_INT&&(ge=t.RGB32UI),ie===t.BYTE&&(ge=t.RGB8I),ie===t.SHORT&&(ge=t.RGB16I),ie===t.INT&&(ge=t.RGB32I)),z===t.RGBA_INTEGER&&(ie===t.UNSIGNED_BYTE&&(ge=t.RGBA8UI),ie===t.UNSIGNED_SHORT&&(ge=t.RGBA16UI),ie===t.UNSIGNED_INT&&(ge=t.RGBA32UI),ie===t.BYTE&&(ge=t.RGBA8I),ie===t.SHORT&&(ge=t.RGBA16I),ie===t.INT&&(ge=t.RGBA32I)),z===t.RGB&&(ie===t.UNSIGNED_INT_5_9_9_9_REV&&(ge=t.RGB9_E5),ie===t.UNSIGNED_INT_10F_11F_11F_REV&&(ge=t.R11F_G11F_B10F)),z===t.RGBA){const Xe=Pe?My:vn.getTransfer(Ee);ie===t.FLOAT&&(ge=t.RGBA32F),ie===t.HALF_FLOAT&&(ge=t.RGBA16F),ie===t.UNSIGNED_BYTE&&(ge=Xe===Pn?t.SRGB8_ALPHA8:t.RGBA8),ie===t.UNSIGNED_SHORT_4_4_4_4&&(ge=t.RGBA4),ie===t.UNSIGNED_SHORT_5_5_5_1&&(ge=t.RGB5_A1)}return(ge===t.R16F||ge===t.R32F||ge===t.RG16F||ge===t.RG32F||ge===t.RGBA16F||ge===t.RGBA32F)&&e.get("EXT_color_buffer_float"),ge}function M(Z,z){let ie;return Z?z===null||z===Ts||z===Hp?ie=t.DEPTH24_STENCIL8:z===ds?ie=t.DEPTH32F_STENCIL8:z===Vp&&(ie=t.DEPTH24_STENCIL8,Jt("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):z===null||z===Ts||z===Hp?ie=t.DEPTH_COMPONENT24:z===ds?ie=t.DEPTH_COMPONENT32F:z===Vp&&(ie=t.DEPTH_COMPONENT16),ie}function T(Z,z){return v(Z)===!0||Z.isFramebufferTexture&&Z.minFilter!==Fr&&Z.minFilter!==Jr?Math.log2(Math.max(z.width,z.height))+1:Z.mipmaps!==void 0&&Z.mipmaps.length>0?Z.mipmaps.length:Z.isCompressedTexture&&Array.isArray(Z.image)?z.mipmaps.length:1}function A(Z){const z=Z.target;z.removeEventListener("dispose",A),P(z),z.isVideoTexture&&h.delete(z)}function N(Z){const z=Z.target;z.removeEventListener("dispose",N),F(z)}function P(Z){const z=r.get(Z);if(z.__webglInit===void 0)return;const ie=Z.source,Ee=m.get(ie);if(Ee){const Pe=Ee[z.__cacheKey];Pe.usedTimes--,Pe.usedTimes===0&&R(Z),Object.keys(Ee).length===0&&m.delete(ie)}r.remove(Z)}function R(Z){const z=r.get(Z);t.deleteTexture(z.__webglTexture);const ie=Z.source,Ee=m.get(ie);delete Ee[z.__cacheKey],s.memory.textures--}function F(Z){const z=r.get(Z);if(Z.depthTexture&&(Z.depthTexture.dispose(),r.remove(Z.depthTexture)),Z.isWebGLCubeRenderTarget)for(let Ee=0;Ee<6;Ee++){if(Array.isArray(z.__webglFramebuffer[Ee]))for(let Pe=0;Pe<z.__webglFramebuffer[Ee].length;Pe++)t.deleteFramebuffer(z.__webglFramebuffer[Ee][Pe]);else t.deleteFramebuffer(z.__webglFramebuffer[Ee]);z.__webglDepthbuffer&&t.deleteRenderbuffer(z.__webglDepthbuffer[Ee])}else{if(Array.isArray(z.__webglFramebuffer))for(let Ee=0;Ee<z.__webglFramebuffer.length;Ee++)t.deleteFramebuffer(z.__webglFramebuffer[Ee]);else t.deleteFramebuffer(z.__webglFramebuffer);if(z.__webglDepthbuffer&&t.deleteRenderbuffer(z.__webglDepthbuffer),z.__webglMultisampledFramebuffer&&t.deleteFramebuffer(z.__webglMultisampledFramebuffer),z.__webglColorRenderbuffer)for(let Ee=0;Ee<z.__webglColorRenderbuffer.length;Ee++)z.__webglColorRenderbuffer[Ee]&&t.deleteRenderbuffer(z.__webglColorRenderbuffer[Ee]);z.__webglDepthRenderbuffer&&t.deleteRenderbuffer(z.__webglDepthRenderbuffer)}const ie=Z.textures;for(let Ee=0,Pe=ie.length;Ee<Pe;Ee++){const ge=r.get(ie[Ee]);ge.__webglTexture&&(t.deleteTexture(ge.__webglTexture),s.memory.textures--),r.remove(ie[Ee])}r.remove(Z)}let D=0;function L(){D=0}function q(){const Z=D;return Z>=i.maxTextures&&Jt("WebGLTextures: Trying to use "+Z+" texture units while this GPU supports only "+i.maxTextures),D+=1,Z}function I(Z){const z=[];return z.push(Z.wrapS),z.push(Z.wrapT),z.push(Z.wrapR||0),z.push(Z.magFilter),z.push(Z.minFilter),z.push(Z.anisotropy),z.push(Z.internalFormat),z.push(Z.format),z.push(Z.type),z.push(Z.generateMipmaps),z.push(Z.premultiplyAlpha),z.push(Z.flipY),z.push(Z.unpackAlignment),z.push(Z.colorSpace),z.join()}function U(Z,z){const ie=r.get(Z);if(Z.isVideoTexture&&Lt(Z),Z.isRenderTargetTexture===!1&&Z.isExternalTexture!==!0&&Z.version>0&&ie.__version!==Z.version){const Ee=Z.image;if(Ee===null)Jt("WebGLRenderer: Texture marked for update but no image data found.");else if(Ee.complete===!1)Jt("WebGLRenderer: Texture marked for update but image is incomplete");else{ne(ie,Z,z);return}}else Z.isExternalTexture&&(ie.__webglTexture=Z.sourceTexture?Z.sourceTexture:null);n.bindTexture(t.TEXTURE_2D,ie.__webglTexture,t.TEXTURE0+z)}function k(Z,z){const ie=r.get(Z);if(Z.isRenderTargetTexture===!1&&Z.version>0&&ie.__version!==Z.version){ne(ie,Z,z);return}else Z.isExternalTexture&&(ie.__webglTexture=Z.sourceTexture?Z.sourceTexture:null);n.bindTexture(t.TEXTURE_2D_ARRAY,ie.__webglTexture,t.TEXTURE0+z)}function V(Z,z){const ie=r.get(Z);if(Z.isRenderTargetTexture===!1&&Z.version>0&&ie.__version!==Z.version){ne(ie,Z,z);return}n.bindTexture(t.TEXTURE_3D,ie.__webglTexture,t.TEXTURE0+z)}function $(Z,z){const ie=r.get(Z);if(Z.isCubeDepthTexture!==!0&&Z.version>0&&ie.__version!==Z.version){de(ie,Z,z);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ie.__webglTexture,t.TEXTURE0+z)}const Y={[cA]:t.REPEAT,[so]:t.CLAMP_TO_EDGE,[uA]:t.MIRRORED_REPEAT},J={[Fr]:t.NEAREST,[MEe]:t.NEAREST_MIPMAP_NEAREST,[Q0]:t.NEAREST_MIPMAP_LINEAR,[Jr]:t.LINEAR,[tM]:t.LINEAR_MIPMAP_NEAREST,[mc]:t.LINEAR_MIPMAP_LINEAR},W={[AEe]:t.NEVER,[jEe]:t.ALWAYS,[NEe]:t.LESS,[pC]:t.LEQUAL,[PEe]:t.EQUAL,[mC]:t.GEQUAL,[CEe]:t.GREATER,[REe]:t.NOTEQUAL};function H(Z,z){if(z.type===ds&&e.has("OES_texture_float_linear")===!1&&(z.magFilter===Jr||z.magFilter===tM||z.magFilter===Q0||z.magFilter===mc||z.minFilter===Jr||z.minFilter===tM||z.minFilter===Q0||z.minFilter===mc)&&Jt("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(Z,t.TEXTURE_WRAP_S,Y[z.wrapS]),t.texParameteri(Z,t.TEXTURE_WRAP_T,Y[z.wrapT]),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,Y[z.wrapR]),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,J[z.magFilter]),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,J[z.minFilter]),z.compareFunction&&(t.texParameteri(Z,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(Z,t.TEXTURE_COMPARE_FUNC,W[z.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(z.magFilter===Fr||z.minFilter!==Q0&&z.minFilter!==mc||z.type===ds&&e.has("OES_texture_float_linear")===!1)return;if(z.anisotropy>1||r.get(z).__currentAnisotropy){const ie=e.get("EXT_texture_filter_anisotropic");t.texParameterf(Z,ie.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(z.anisotropy,i.getMaxAnisotropy())),r.get(z).__currentAnisotropy=z.anisotropy}}}function te(Z,z){let ie=!1;Z.__webglInit===void 0&&(Z.__webglInit=!0,z.addEventListener("dispose",A));const Ee=z.source;let Pe=m.get(Ee);Pe===void 0&&(Pe={},m.set(Ee,Pe));const ge=I(z);if(ge!==Z.__cacheKey){Pe[ge]===void 0&&(Pe[ge]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,ie=!0),Pe[ge].usedTimes++;const Xe=Pe[Z.__cacheKey];Xe!==void 0&&(Pe[Z.__cacheKey].usedTimes--,Xe.usedTimes===0&&R(z)),Z.__cacheKey=ge,Z.__webglTexture=Pe[ge].texture}return ie}function we(Z,z,ie){return Math.floor(Math.floor(Z/ie)/z)}function Ae(Z,z,ie,Ee){const ge=Z.updateRanges;if(ge.length===0)n.texSubImage2D(t.TEXTURE_2D,0,0,0,z.width,z.height,ie,Ee,z.data);else{ge.sort((Ue,ke)=>Ue.start-ke.start);let Xe=0;for(let Ue=1;Ue<ge.length;Ue++){const ke=ge[Xe],Fe=ge[Ue],ze=ke.start+ke.count,He=we(Fe.start,z.width,4),vt=we(ke.start,z.width,4);Fe.start<=ze+1&&He===vt&&we(Fe.start+Fe.count-1,z.width,4)===He?ke.count=Math.max(ke.count,Fe.start+Fe.count-ke.start):(++Xe,ge[Xe]=Fe)}ge.length=Xe+1;const Le=t.getParameter(t.UNPACK_ROW_LENGTH),ft=t.getParameter(t.UNPACK_SKIP_PIXELS),nt=t.getParameter(t.UNPACK_SKIP_ROWS);t.pixelStorei(t.UNPACK_ROW_LENGTH,z.width);for(let Ue=0,ke=ge.length;Ue<ke;Ue++){const Fe=ge[Ue],ze=Math.floor(Fe.start/4),He=Math.ceil(Fe.count/4),vt=ze%z.width,ae=Math.floor(ze/z.width),Re=He,Ie=1;t.pixelStorei(t.UNPACK_SKIP_PIXELS,vt),t.pixelStorei(t.UNPACK_SKIP_ROWS,ae),n.texSubImage2D(t.TEXTURE_2D,0,vt,ae,Re,Ie,ie,Ee,z.data)}Z.clearUpdateRanges(),t.pixelStorei(t.UNPACK_ROW_LENGTH,Le),t.pixelStorei(t.UNPACK_SKIP_PIXELS,ft),t.pixelStorei(t.UNPACK_SKIP_ROWS,nt)}}function ne(Z,z,ie){let Ee=t.TEXTURE_2D;(z.isDataArrayTexture||z.isCompressedArrayTexture)&&(Ee=t.TEXTURE_2D_ARRAY),z.isData3DTexture&&(Ee=t.TEXTURE_3D);const Pe=te(Z,z),ge=z.source;n.bindTexture(Ee,Z.__webglTexture,t.TEXTURE0+ie);const Xe=r.get(ge);if(ge.version!==Xe.__version||Pe===!0){n.activeTexture(t.TEXTURE0+ie);const Le=vn.getPrimaries(vn.workingColorSpace),ft=z.colorSpace===al?null:vn.getPrimaries(z.colorSpace),nt=z.colorSpace===al||Le===ft?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,z.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,z.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,nt);let Ue=y(z.image,!1,i.maxTextureSize);Ue=zt(z,Ue);const ke=a.convert(z.format,z.colorSpace),Fe=a.convert(z.type);let ze=E(z.internalFormat,ke,Fe,z.colorSpace,z.isVideoTexture);H(Ee,z);let He;const vt=z.mipmaps,ae=z.isVideoTexture!==!0,Re=Xe.__version===void 0||Pe===!0,Ie=ge.dataReady,rt=T(z,Ue);if(z.isDepthTexture)ze=M(z.format===gc,z.type),Re&&(ae?n.texStorage2D(t.TEXTURE_2D,1,ze,Ue.width,Ue.height):n.texImage2D(t.TEXTURE_2D,0,ze,Ue.width,Ue.height,0,ke,Fe,null));else if(z.isDataTexture)if(vt.length>0){ae&&Re&&n.texStorage2D(t.TEXTURE_2D,rt,ze,vt[0].width,vt[0].height);for(let $e=0,he=vt.length;$e<he;$e++)He=vt[$e],ae?Ie&&n.texSubImage2D(t.TEXTURE_2D,$e,0,0,He.width,He.height,ke,Fe,He.data):n.texImage2D(t.TEXTURE_2D,$e,ze,He.width,He.height,0,ke,Fe,He.data);z.generateMipmaps=!1}else ae?(Re&&n.texStorage2D(t.TEXTURE_2D,rt,ze,Ue.width,Ue.height),Ie&&Ae(z,Ue,ke,Fe)):n.texImage2D(t.TEXTURE_2D,0,ze,Ue.width,Ue.height,0,ke,Fe,Ue.data);else if(z.isCompressedTexture)if(z.isCompressedArrayTexture){ae&&Re&&n.texStorage3D(t.TEXTURE_2D_ARRAY,rt,ze,vt[0].width,vt[0].height,Ue.depth);for(let $e=0,he=vt.length;$e<he;$e++)if(He=vt[$e],z.format!==za)if(ke!==null)if(ae){if(Ie)if(z.layerUpdates.size>0){const Qe=g8(He.width,He.height,z.format,z.type);for(const ht of z.layerUpdates){const Gt=He.data.subarray(ht*Qe/He.data.BYTES_PER_ELEMENT,(ht+1)*Qe/He.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,$e,0,0,ht,He.width,He.height,1,ke,Gt)}z.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,$e,0,0,0,He.width,He.height,Ue.depth,ke,He.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,$e,ze,He.width,He.height,Ue.depth,0,He.data,0,0);else Jt("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else ae?Ie&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,$e,0,0,0,He.width,He.height,Ue.depth,ke,Fe,He.data):n.texImage3D(t.TEXTURE_2D_ARRAY,$e,ze,He.width,He.height,Ue.depth,0,ke,Fe,He.data)}else{ae&&Re&&n.texStorage2D(t.TEXTURE_2D,rt,ze,vt[0].width,vt[0].height);for(let $e=0,he=vt.length;$e<he;$e++)He=vt[$e],z.format!==za?ke!==null?ae?Ie&&n.compressedTexSubImage2D(t.TEXTURE_2D,$e,0,0,He.width,He.height,ke,He.data):n.compressedTexImage2D(t.TEXTURE_2D,$e,ze,He.width,He.height,0,He.data):Jt("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ae?Ie&&n.texSubImage2D(t.TEXTURE_2D,$e,0,0,He.width,He.height,ke,Fe,He.data):n.texImage2D(t.TEXTURE_2D,$e,ze,He.width,He.height,0,ke,Fe,He.data)}else if(z.isDataArrayTexture)if(ae){if(Re&&n.texStorage3D(t.TEXTURE_2D_ARRAY,rt,ze,Ue.width,Ue.height,Ue.depth),Ie)if(z.layerUpdates.size>0){const $e=g8(Ue.width,Ue.height,z.format,z.type);for(const he of z.layerUpdates){const Qe=Ue.data.subarray(he*$e/Ue.data.BYTES_PER_ELEMENT,(he+1)*$e/Ue.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,he,Ue.width,Ue.height,1,ke,Fe,Qe)}z.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,Ue.width,Ue.height,Ue.depth,ke,Fe,Ue.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,ze,Ue.width,Ue.height,Ue.depth,0,ke,Fe,Ue.data);else if(z.isData3DTexture)ae?(Re&&n.texStorage3D(t.TEXTURE_3D,rt,ze,Ue.width,Ue.height,Ue.depth),Ie&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,Ue.width,Ue.height,Ue.depth,ke,Fe,Ue.data)):n.texImage3D(t.TEXTURE_3D,0,ze,Ue.width,Ue.height,Ue.depth,0,ke,Fe,Ue.data);else if(z.isFramebufferTexture){if(Re)if(ae)n.texStorage2D(t.TEXTURE_2D,rt,ze,Ue.width,Ue.height);else{let $e=Ue.width,he=Ue.height;for(let Qe=0;Qe<rt;Qe++)n.texImage2D(t.TEXTURE_2D,Qe,ze,$e,he,0,ke,Fe,null),$e>>=1,he>>=1}}else if(vt.length>0){if(ae&&Re){const $e=qe(vt[0]);n.texStorage2D(t.TEXTURE_2D,rt,ze,$e.width,$e.height)}for(let $e=0,he=vt.length;$e<he;$e++)He=vt[$e],ae?Ie&&n.texSubImage2D(t.TEXTURE_2D,$e,0,0,ke,Fe,He):n.texImage2D(t.TEXTURE_2D,$e,ze,ke,Fe,He);z.generateMipmaps=!1}else if(ae){if(Re){const $e=qe(Ue);n.texStorage2D(t.TEXTURE_2D,rt,ze,$e.width,$e.height)}Ie&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,ke,Fe,Ue)}else n.texImage2D(t.TEXTURE_2D,0,ze,ke,Fe,Ue);v(z)&&w(Ee),Xe.__version=ge.version,z.onUpdate&&z.onUpdate(z)}Z.__version=z.version}function de(Z,z,ie){if(z.image.length!==6)return;const Ee=te(Z,z),Pe=z.source;n.bindTexture(t.TEXTURE_CUBE_MAP,Z.__webglTexture,t.TEXTURE0+ie);const ge=r.get(Pe);if(Pe.version!==ge.__version||Ee===!0){n.activeTexture(t.TEXTURE0+ie);const Xe=vn.getPrimaries(vn.workingColorSpace),Le=z.colorSpace===al?null:vn.getPrimaries(z.colorSpace),ft=z.colorSpace===al||Xe===Le?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,z.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,z.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,ft);const nt=z.isCompressedTexture||z.image[0].isCompressedTexture,Ue=z.image[0]&&z.image[0].isDataTexture,ke=[];for(let he=0;he<6;he++)!nt&&!Ue?ke[he]=y(z.image[he],!0,i.maxCubemapSize):ke[he]=Ue?z.image[he].image:z.image[he],ke[he]=zt(z,ke[he]);const Fe=ke[0],ze=a.convert(z.format,z.colorSpace),He=a.convert(z.type),vt=E(z.internalFormat,ze,He,z.colorSpace),ae=z.isVideoTexture!==!0,Re=ge.__version===void 0||Ee===!0,Ie=Pe.dataReady;let rt=T(z,Fe);H(t.TEXTURE_CUBE_MAP,z);let $e;if(nt){ae&&Re&&n.texStorage2D(t.TEXTURE_CUBE_MAP,rt,vt,Fe.width,Fe.height);for(let he=0;he<6;he++){$e=ke[he].mipmaps;for(let Qe=0;Qe<$e.length;Qe++){const ht=$e[Qe];z.format!==za?ze!==null?ae?Ie&&n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe,0,0,ht.width,ht.height,ze,ht.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe,vt,ht.width,ht.height,0,ht.data):Jt("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ae?Ie&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe,0,0,ht.width,ht.height,ze,He,ht.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe,vt,ht.width,ht.height,0,ze,He,ht.data)}}}else{if($e=z.mipmaps,ae&&Re){$e.length>0&&rt++;const he=qe(ke[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,rt,vt,he.width,he.height)}for(let he=0;he<6;he++)if(Ue){ae?Ie&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,ke[he].width,ke[he].height,ze,He,ke[he].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,vt,ke[he].width,ke[he].height,0,ze,He,ke[he].data);for(let Qe=0;Qe<$e.length;Qe++){const Gt=$e[Qe].image[he].image;ae?Ie&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe+1,0,0,Gt.width,Gt.height,ze,He,Gt.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe+1,vt,Gt.width,Gt.height,0,ze,He,Gt.data)}}else{ae?Ie&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,ze,He,ke[he]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,vt,ze,He,ke[he]);for(let Qe=0;Qe<$e.length;Qe++){const ht=$e[Qe];ae?Ie&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe+1,0,0,ze,He,ht.image[he]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+he,Qe+1,vt,ze,He,ht.image[he])}}}v(z)&&w(t.TEXTURE_CUBE_MAP),ge.__version=Pe.version,z.onUpdate&&z.onUpdate(z)}Z.__version=z.version}function pe(Z,z,ie,Ee,Pe,ge){const Xe=a.convert(ie.format,ie.colorSpace),Le=a.convert(ie.type),ft=E(ie.internalFormat,Xe,Le,ie.colorSpace),nt=r.get(z),Ue=r.get(ie);if(Ue.__renderTarget=z,!nt.__hasExternalTextures){const ke=Math.max(1,z.width>>ge),Fe=Math.max(1,z.height>>ge);Pe===t.TEXTURE_3D||Pe===t.TEXTURE_2D_ARRAY?n.texImage3D(Pe,ge,ft,ke,Fe,z.depth,0,Xe,Le,null):n.texImage2D(Pe,ge,ft,ke,Fe,0,Xe,Le,null)}n.bindFramebuffer(t.FRAMEBUFFER,Z),Ht(z)?o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Ee,Pe,Ue.__webglTexture,0,re(z)):(Pe===t.TEXTURE_2D||Pe>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Pe<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,Ee,Pe,Ue.__webglTexture,ge),n.bindFramebuffer(t.FRAMEBUFFER,null)}function fe(Z,z,ie){if(t.bindRenderbuffer(t.RENDERBUFFER,Z),z.depthBuffer){const Ee=z.depthTexture,Pe=Ee&&Ee.isDepthTexture?Ee.type:null,ge=M(z.stencilBuffer,Pe),Xe=z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;Ht(z)?o.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,re(z),ge,z.width,z.height):ie?t.renderbufferStorageMultisample(t.RENDERBUFFER,re(z),ge,z.width,z.height):t.renderbufferStorage(t.RENDERBUFFER,ge,z.width,z.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,Xe,t.RENDERBUFFER,Z)}else{const Ee=z.textures;for(let Pe=0;Pe<Ee.length;Pe++){const ge=Ee[Pe],Xe=a.convert(ge.format,ge.colorSpace),Le=a.convert(ge.type),ft=E(ge.internalFormat,Xe,Le,ge.colorSpace);Ht(z)?o.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,re(z),ft,z.width,z.height):ie?t.renderbufferStorageMultisample(t.RENDERBUFFER,re(z),ft,z.width,z.height):t.renderbufferStorage(t.RENDERBUFFER,ft,z.width,z.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function ce(Z,z,ie){const Ee=z.isWebGLCubeRenderTarget===!0;if(n.bindFramebuffer(t.FRAMEBUFFER,Z),!(z.depthTexture&&z.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Pe=r.get(z.depthTexture);if(Pe.__renderTarget=z,(!Pe.__webglTexture||z.depthTexture.image.width!==z.width||z.depthTexture.image.height!==z.height)&&(z.depthTexture.image.width=z.width,z.depthTexture.image.height=z.height,z.depthTexture.needsUpdate=!0),Ee){if(Pe.__webglInit===void 0&&(Pe.__webglInit=!0,z.depthTexture.addEventListener("dispose",A)),Pe.__webglTexture===void 0){Pe.__webglTexture=t.createTexture(),n.bindTexture(t.TEXTURE_CUBE_MAP,Pe.__webglTexture),H(t.TEXTURE_CUBE_MAP,z.depthTexture);const nt=a.convert(z.depthTexture.format),Ue=a.convert(z.depthTexture.type);let ke;z.depthTexture.format===yo?ke=t.DEPTH_COMPONENT24:z.depthTexture.format===gc&&(ke=t.DEPTH24_STENCIL8);for(let Fe=0;Fe<6;Fe++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Fe,0,ke,z.width,z.height,0,nt,Ue,null)}}else U(z.depthTexture,0);const ge=Pe.__webglTexture,Xe=re(z),Le=Ee?t.TEXTURE_CUBE_MAP_POSITIVE_X+ie:t.TEXTURE_2D,ft=z.depthTexture.format===gc?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;if(z.depthTexture.format===yo)Ht(z)?o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ft,Le,ge,0,Xe):t.framebufferTexture2D(t.FRAMEBUFFER,ft,Le,ge,0);else if(z.depthTexture.format===gc)Ht(z)?o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ft,Le,ge,0,Xe):t.framebufferTexture2D(t.FRAMEBUFFER,ft,Le,ge,0);else throw new Error("Unknown depthTexture format")}function Ce(Z){const z=r.get(Z),ie=Z.isWebGLCubeRenderTarget===!0;if(z.__boundDepthTexture!==Z.depthTexture){const Ee=Z.depthTexture;if(z.__depthDisposeCallback&&z.__depthDisposeCallback(),Ee){const Pe=()=>{delete z.__boundDepthTexture,delete z.__depthDisposeCallback,Ee.removeEventListener("dispose",Pe)};Ee.addEventListener("dispose",Pe),z.__depthDisposeCallback=Pe}z.__boundDepthTexture=Ee}if(Z.depthTexture&&!z.__autoAllocateDepthBuffer)if(ie)for(let Ee=0;Ee<6;Ee++)ce(z.__webglFramebuffer[Ee],Z,Ee);else{const Ee=Z.texture.mipmaps;Ee&&Ee.length>0?ce(z.__webglFramebuffer[0],Z,0):ce(z.__webglFramebuffer,Z,0)}else if(ie){z.__webglDepthbuffer=[];for(let Ee=0;Ee<6;Ee++)if(n.bindFramebuffer(t.FRAMEBUFFER,z.__webglFramebuffer[Ee]),z.__webglDepthbuffer[Ee]===void 0)z.__webglDepthbuffer[Ee]=t.createRenderbuffer(),fe(z.__webglDepthbuffer[Ee],Z,!1);else{const Pe=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ge=z.__webglDepthbuffer[Ee];t.bindRenderbuffer(t.RENDERBUFFER,ge),t.framebufferRenderbuffer(t.FRAMEBUFFER,Pe,t.RENDERBUFFER,ge)}}else{const Ee=Z.texture.mipmaps;if(Ee&&Ee.length>0?n.bindFramebuffer(t.FRAMEBUFFER,z.__webglFramebuffer[0]):n.bindFramebuffer(t.FRAMEBUFFER,z.__webglFramebuffer),z.__webglDepthbuffer===void 0)z.__webglDepthbuffer=t.createRenderbuffer(),fe(z.__webglDepthbuffer,Z,!1);else{const Pe=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ge=z.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,ge),t.framebufferRenderbuffer(t.FRAMEBUFFER,Pe,t.RENDERBUFFER,ge)}}n.bindFramebuffer(t.FRAMEBUFFER,null)}function ye(Z,z,ie){const Ee=r.get(Z);z!==void 0&&pe(Ee.__webglFramebuffer,Z,Z.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ie!==void 0&&Ce(Z)}function Ze(Z){const z=Z.texture,ie=r.get(Z),Ee=r.get(z);Z.addEventListener("dispose",N);const Pe=Z.textures,ge=Z.isWebGLCubeRenderTarget===!0,Xe=Pe.length>1;if(Xe||(Ee.__webglTexture===void 0&&(Ee.__webglTexture=t.createTexture()),Ee.__version=z.version,s.memory.textures++),ge){ie.__webglFramebuffer=[];for(let Le=0;Le<6;Le++)if(z.mipmaps&&z.mipmaps.length>0){ie.__webglFramebuffer[Le]=[];for(let ft=0;ft<z.mipmaps.length;ft++)ie.__webglFramebuffer[Le][ft]=t.createFramebuffer()}else ie.__webglFramebuffer[Le]=t.createFramebuffer()}else{if(z.mipmaps&&z.mipmaps.length>0){ie.__webglFramebuffer=[];for(let Le=0;Le<z.mipmaps.length;Le++)ie.__webglFramebuffer[Le]=t.createFramebuffer()}else ie.__webglFramebuffer=t.createFramebuffer();if(Xe)for(let Le=0,ft=Pe.length;Le<ft;Le++){const nt=r.get(Pe[Le]);nt.__webglTexture===void 0&&(nt.__webglTexture=t.createTexture(),s.memory.textures++)}if(Z.samples>0&&Ht(Z)===!1){ie.__webglMultisampledFramebuffer=t.createFramebuffer(),ie.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ie.__webglMultisampledFramebuffer);for(let Le=0;Le<Pe.length;Le++){const ft=Pe[Le];ie.__webglColorRenderbuffer[Le]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,ie.__webglColorRenderbuffer[Le]);const nt=a.convert(ft.format,ft.colorSpace),Ue=a.convert(ft.type),ke=E(ft.internalFormat,nt,Ue,ft.colorSpace,Z.isXRRenderTarget===!0),Fe=re(Z);t.renderbufferStorageMultisample(t.RENDERBUFFER,Fe,ke,Z.width,Z.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+Le,t.RENDERBUFFER,ie.__webglColorRenderbuffer[Le])}t.bindRenderbuffer(t.RENDERBUFFER,null),Z.depthBuffer&&(ie.__webglDepthRenderbuffer=t.createRenderbuffer(),fe(ie.__webglDepthRenderbuffer,Z,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(ge){n.bindTexture(t.TEXTURE_CUBE_MAP,Ee.__webglTexture),H(t.TEXTURE_CUBE_MAP,z);for(let Le=0;Le<6;Le++)if(z.mipmaps&&z.mipmaps.length>0)for(let ft=0;ft<z.mipmaps.length;ft++)pe(ie.__webglFramebuffer[Le][ft],Z,z,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Le,ft);else pe(ie.__webglFramebuffer[Le],Z,z,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Le,0);v(z)&&w(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(Xe){for(let Le=0,ft=Pe.length;Le<ft;Le++){const nt=Pe[Le],Ue=r.get(nt);let ke=t.TEXTURE_2D;(Z.isWebGL3DRenderTarget||Z.isWebGLArrayRenderTarget)&&(ke=Z.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(ke,Ue.__webglTexture),H(ke,nt),pe(ie.__webglFramebuffer,Z,nt,t.COLOR_ATTACHMENT0+Le,ke,0),v(nt)&&w(ke)}n.unbindTexture()}else{let Le=t.TEXTURE_2D;if((Z.isWebGL3DRenderTarget||Z.isWebGLArrayRenderTarget)&&(Le=Z.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(Le,Ee.__webglTexture),H(Le,z),z.mipmaps&&z.mipmaps.length>0)for(let ft=0;ft<z.mipmaps.length;ft++)pe(ie.__webglFramebuffer[ft],Z,z,t.COLOR_ATTACHMENT0,Le,ft);else pe(ie.__webglFramebuffer,Z,z,t.COLOR_ATTACHMENT0,Le,0);v(z)&&w(Le),n.unbindTexture()}Z.depthBuffer&&Ce(Z)}function tt(Z){const z=Z.textures;for(let ie=0,Ee=z.length;ie<Ee;ie++){const Pe=z[ie];if(v(Pe)){const ge=_(Z),Xe=r.get(Pe).__webglTexture;n.bindTexture(ge,Xe),w(ge),n.unbindTexture()}}}const St=[],lt=[];function kt(Z){if(Z.samples>0){if(Ht(Z)===!1){const z=Z.textures,ie=Z.width,Ee=Z.height;let Pe=t.COLOR_BUFFER_BIT;const ge=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Xe=r.get(Z),Le=z.length>1;if(Le)for(let nt=0;nt<z.length;nt++)n.bindFramebuffer(t.FRAMEBUFFER,Xe.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+nt,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,Xe.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+nt,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,Xe.__webglMultisampledFramebuffer);const ft=Z.texture.mipmaps;ft&&ft.length>0?n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Xe.__webglFramebuffer[0]):n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Xe.__webglFramebuffer);for(let nt=0;nt<z.length;nt++){if(Z.resolveDepthBuffer&&(Z.depthBuffer&&(Pe|=t.DEPTH_BUFFER_BIT),Z.stencilBuffer&&Z.resolveStencilBuffer&&(Pe|=t.STENCIL_BUFFER_BIT)),Le){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,Xe.__webglColorRenderbuffer[nt]);const Ue=r.get(z[nt]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,Ue,0)}t.blitFramebuffer(0,0,ie,Ee,0,0,ie,Ee,Pe,t.NEAREST),c===!0&&(St.length=0,lt.length=0,St.push(t.COLOR_ATTACHMENT0+nt),Z.depthBuffer&&Z.resolveDepthBuffer===!1&&(St.push(ge),lt.push(ge),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,lt)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,St))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),Le)for(let nt=0;nt<z.length;nt++){n.bindFramebuffer(t.FRAMEBUFFER,Xe.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+nt,t.RENDERBUFFER,Xe.__webglColorRenderbuffer[nt]);const Ue=r.get(z[nt]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,Xe.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+nt,t.TEXTURE_2D,Ue,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Xe.__webglMultisampledFramebuffer)}else if(Z.depthBuffer&&Z.resolveDepthBuffer===!1&&c){const z=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[z])}}}function re(Z){return Math.min(i.maxSamples,Z.samples)}function Ht(Z){const z=r.get(Z);return Z.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&z.__useRenderToTexture!==!1}function Lt(Z){const z=s.render.frame;h.get(Z)!==z&&(h.set(Z,z),Z.update())}function zt(Z,z){const ie=Z.colorSpace,Ee=Z.format,Pe=Z.type;return Z.isCompressedTexture===!0||Z.isVideoTexture===!0||ie!==Vd&&ie!==al&&(vn.getTransfer(ie)===Pn?(Ee!==za||Pe!==Wi)&&Jt("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):pn("WebGLTextures: Unsupported texture color space:",ie)),z}function qe(Z){return typeof HTMLImageElement<"u"&&Z instanceof HTMLImageElement?(l.width=Z.naturalWidth||Z.width,l.height=Z.naturalHeight||Z.height):typeof VideoFrame<"u"&&Z instanceof VideoFrame?(l.width=Z.displayWidth,l.height=Z.displayHeight):(l.width=Z.width,l.height=Z.height),l}this.allocateTextureUnit=q,this.resetTextureUnits=L,this.setTexture2D=U,this.setTexture2DArray=k,this.setTexture3D=V,this.setTextureCube=$,this.rebindTextures=ye,this.setupRenderTarget=Ze,this.updateRenderTargetMipmap=tt,this.updateMultisampleRenderTarget=kt,this.setupDepthRenderbuffer=Ce,this.setupFrameBufferTexture=pe,this.useMultisampledRTT=Ht,this.isReversedDepthBuffer=function(){return n.buffers.depth.getReversed()}}function l3e(t,e){function n(r,i=al){let a;const s=vn.getTransfer(i);if(r===Wi)return t.UNSIGNED_BYTE;if(r===cC)return t.UNSIGNED_SHORT_4_4_4_4;if(r===uC)return t.UNSIGNED_SHORT_5_5_5_1;if(r===AG)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===NG)return t.UNSIGNED_INT_10F_11F_11F_REV;if(r===EG)return t.BYTE;if(r===TG)return t.SHORT;if(r===Vp)return t.UNSIGNED_SHORT;if(r===lC)return t.INT;if(r===Ts)return t.UNSIGNED_INT;if(r===ds)return t.FLOAT;if(r===vo)return t.HALF_FLOAT;if(r===PG)return t.ALPHA;if(r===CG)return t.RGB;if(r===za)return t.RGBA;if(r===yo)return t.DEPTH_COMPONENT;if(r===gc)return t.DEPTH_STENCIL;if(r===RG)return t.RED;if(r===dC)return t.RED_INTEGER;if(r===$d)return t.RG;if(r===fC)return t.RG_INTEGER;if(r===hC)return t.RGBA_INTEGER;if(r===Xg||r===Kg||r===Yg||r===Zg)if(s===Pn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===Xg)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Kg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Yg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Zg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===Xg)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Kg)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Yg)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Zg)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===dA||r===fA||r===hA||r===pA)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===dA)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===fA)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===hA)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===pA)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===mA||r===gA||r===vA||r===yA||r===xA||r===bA||r===wA)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===mA||r===gA)return s===Pn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===vA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC;if(r===yA)return a.COMPRESSED_R11_EAC;if(r===xA)return a.COMPRESSED_SIGNED_R11_EAC;if(r===bA)return a.COMPRESSED_RG11_EAC;if(r===wA)return a.COMPRESSED_SIGNED_RG11_EAC}else return null;if(r===_A||r===SA||r===MA||r===EA||r===TA||r===AA||r===NA||r===PA||r===CA||r===RA||r===jA||r===OA||r===IA||r===DA)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===_A)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===SA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===MA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===EA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===TA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===AA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===NA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===PA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===CA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===RA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===jA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===OA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===IA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===DA)return s===Pn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===kA||r===LA||r===FA)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===kA)return s===Pn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===LA)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===FA)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===UA||r===BA||r===zA||r===$A)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===UA)return a.COMPRESSED_RED_RGTC1_EXT;if(r===BA)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===zA)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===$A)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===Hp?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}const c3e=`
void main() {
gl_Position = vec4( position, 1.0 );
}`,u3e=`
uniform sampler2DArray depthColor;
uniform float depthWidth;
uniform float depthHeight;
void main() {
vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
if ( coord.x >= 1.0 ) {
gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
} else {
gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
}
}`;class d3e{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n){if(this.texture===null){const r=new VG(e.texture);(e.depthNear!==n.depthNear||e.depthFar!==n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,r=new Ns({vertexShader:c3e,fragmentShader:u3e,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new _e(new ym(20,20),r)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class f3e extends df{constructor(e,n){super();const r=this;let i=null,a=1,s=null,o="local-floor",c=1,l=null,h=null,f=null,m=null,g=null,b=null;const y=typeof XRWebGLBinding<"u",v=new d3e,w={},_=n.getContextAttributes();let E=null,M=null;const T=[],A=[],N=new nn;let P=null;const R=new li;R.viewport=new nr;const F=new li;F.viewport=new nr;const D=[R,F],L=new _Te;let q=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ne){let de=T[ne];return de===void 0&&(de=new cM,T[ne]=de),de.getTargetRaySpace()},this.getControllerGrip=function(ne){let de=T[ne];return de===void 0&&(de=new cM,T[ne]=de),de.getGripSpace()},this.getHand=function(ne){let de=T[ne];return de===void 0&&(de=new cM,T[ne]=de),de.getHandSpace()};function U(ne){const de=A.indexOf(ne.inputSource);if(de===-1)return;const pe=T[de];pe!==void 0&&(pe.update(ne.inputSource,ne.frame,l||s),pe.dispatchEvent({type:ne.type,data:ne.inputSource}))}function k(){i.removeEventListener("select",U),i.removeEventListener("selectstart",U),i.removeEventListener("selectend",U),i.removeEventListener("squeeze",U),i.removeEventListener("squeezestart",U),i.removeEventListener("squeezeend",U),i.removeEventListener("end",k),i.removeEventListener("inputsourceschange",V);for(let ne=0;ne<T.length;ne++){const de=A[ne];de!==null&&(A[ne]=null,T[ne].disconnect(de))}q=null,I=null,v.reset();for(const ne in w)delete w[ne];e.setRenderTarget(E),g=null,m=null,f=null,i=null,M=null,Ae.stop(),r.isPresenting=!1,e.setPixelRatio(P),e.setSize(N.width,N.height,!1),r.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(ne){a=ne,r.isPresenting===!0&&Jt("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ne){o=ne,r.isPresenting===!0&&Jt("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(ne){l=ne},this.getBaseLayer=function(){return m!==null?m:g},this.getBinding=function(){return f===null&&y&&(f=new XRWebGLBinding(i,n)),f},this.getFrame=function(){return b},this.getSession=function(){return i},this.setSession=async function(ne){if(i=ne,i!==null){if(E=e.getRenderTarget(),i.addEventListener("select",U),i.addEventListener("selectstart",U),i.addEventListener("selectend",U),i.addEventListener("squeeze",U),i.addEventListener("squeezestart",U),i.addEventListener("squeezeend",U),i.addEventListener("end",k),i.addEventListener("inputsourceschange",V),_.xrCompatible!==!0&&await n.makeXRCompatible(),P=e.getPixelRatio(),e.getSize(N),y&&"createProjectionLayer"in XRWebGLBinding.prototype){let pe=null,fe=null,ce=null;_.depth&&(ce=_.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,pe=_.stencil?gc:yo,fe=_.stencil?Hp:Ts);const Ce={colorFormat:n.RGBA8,depthFormat:ce,scaleFactor:a};f=this.getBinding(),m=f.createProjectionLayer(Ce),i.updateRenderState({layers:[m]}),e.setPixelRatio(1),e.setSize(m.textureWidth,m.textureHeight,!1),M=new bs(m.textureWidth,m.textureHeight,{format:za,type:Wi,depthTexture:new Wp(m.textureWidth,m.textureHeight,fe,void 0,void 0,void 0,void 0,void 0,void 0,pe),stencilBuffer:_.stencil,colorSpace:e.outputColorSpace,samples:_.antialias?4:0,resolveDepthBuffer:m.ignoreDepthValues===!1,resolveStencilBuffer:m.ignoreDepthValues===!1})}else{const pe={antialias:_.antialias,alpha:!0,depth:_.depth,stencil:_.stencil,framebufferScaleFactor:a};g=new XRWebGLLayer(i,n,pe),i.updateRenderState({baseLayer:g}),e.setPixelRatio(1),e.setSize(g.framebufferWidth,g.framebufferHeight,!1),M=new bs(g.framebufferWidth,g.framebufferHeight,{format:za,type:Wi,colorSpace:e.outputColorSpace,stencilBuffer:_.stencil,resolveDepthBuffer:g.ignoreDepthValues===!1,resolveStencilBuffer:g.ignoreDepthValues===!1})}M.isXRRenderTarget=!0,this.setFoveation(c),l=null,s=await i.requestReferenceSpace(o),Ae.setContext(i),Ae.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return v.getDepthTexture()};function V(ne){for(let de=0;de<ne.removed.length;de++){const pe=ne.removed[de],fe=A.indexOf(pe);fe>=0&&(A[fe]=null,T[fe].disconnect(pe))}for(let de=0;de<ne.added.length;de++){const pe=ne.added[de];let fe=A.indexOf(pe);if(fe===-1){for(let Ce=0;Ce<T.length;Ce++)if(Ce>=A.length){A.push(pe),fe=Ce;break}else if(A[Ce]===null){A[Ce]=pe,fe=Ce;break}if(fe===-1)break}const ce=T[fe];ce&&ce.connect(pe)}}const $=new me,Y=new me;function J(ne,de,pe){$.setFromMatrixPosition(de.matrixWorld),Y.setFromMatrixPosition(pe.matrixWorld);const fe=$.distanceTo(Y),ce=de.projectionMatrix.elements,Ce=pe.projectionMatrix.elements,ye=ce[14]/(ce[10]-1),Ze=ce[14]/(ce[10]+1),tt=(ce[9]+1)/ce[5],St=(ce[9]-1)/ce[5],lt=(ce[8]-1)/ce[0],kt=(Ce[8]+1)/Ce[0],re=ye*lt,Ht=ye*kt,Lt=fe/(-lt+kt),zt=Lt*-lt;if(de.matrixWorld.decompose(ne.position,ne.quaternion,ne.scale),ne.translateX(zt),ne.translateZ(Lt),ne.matrixWorld.compose(ne.position,ne.quaternion,ne.scale),ne.matrixWorldInverse.copy(ne.matrixWorld).invert(),ce[10]===-1)ne.projectionMatrix.copy(de.projectionMatrix),ne.projectionMatrixInverse.copy(de.projectionMatrixInverse);else{const qe=ye+Lt,Z=Ze+Lt,z=re-zt,ie=Ht+(fe-zt),Ee=tt*Ze/Z*qe,Pe=St*Ze/Z*qe;ne.projectionMatrix.makePerspective(z,ie,Ee,Pe,qe,Z),ne.projectionMatrixInverse.copy(ne.projectionMatrix).invert()}}function W(ne,de){de===null?ne.matrixWorld.copy(ne.matrix):ne.matrixWorld.multiplyMatrices(de.matrixWorld,ne.matrix),ne.matrixWorldInverse.copy(ne.matrixWorld).invert()}this.updateCamera=function(ne){if(i===null)return;let de=ne.near,pe=ne.far;v.texture!==null&&(v.depthNear>0&&(de=v.depthNear),v.depthFar>0&&(pe=v.depthFar)),L.near=F.near=R.near=de,L.far=F.far=R.far=pe,(q!==L.near||I!==L.far)&&(i.updateRenderState({depthNear:L.near,depthFar:L.far}),q=L.near,I=L.far),L.layers.mask=ne.layers.mask|6,R.layers.mask=L.layers.mask&-5,F.layers.mask=L.layers.mask&-3;const fe=ne.parent,ce=L.cameras;W(L,fe);for(let Ce=0;Ce<ce.length;Ce++)W(ce[Ce],fe);ce.length===2?J(L,R,F):L.projectionMatrix.copy(R.projectionMatrix),H(ne,L,fe)};function H(ne,de,pe){pe===null?ne.matrix.copy(de.matrixWorld):(ne.matrix.copy(pe.matrixWorld),ne.matrix.invert(),ne.matrix.multiply(de.matrixWorld)),ne.matrix.decompose(ne.position,ne.quaternion,ne.scale),ne.updateMatrixWorld(!0),ne.projectionMatrix.copy(de.projectionMatrix),ne.projectionMatrixInverse.copy(de.projectionMatrixInverse),ne.isPerspectiveCamera&&(ne.fov=HA*2*Math.atan(1/ne.projectionMatrix.elements[5]),ne.zoom=1)}this.getCamera=function(){return L},this.getFoveation=function(){if(!(m===null&&g===null))return c},this.setFoveation=function(ne){c=ne,m!==null&&(m.fixedFoveation=ne),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=ne)},this.hasDepthSensing=function(){return v.texture!==null},this.getDepthSensingMesh=function(){return v.getMesh(L)},this.getCameraTexture=function(ne){return w[ne]};let te=null;function we(ne,de){if(h=de.getViewerPose(l||s),b=de,h!==null){const pe=h.views;g!==null&&(e.setRenderTargetFramebuffer(M,g.framebuffer),e.setRenderTarget(M));let fe=!1;pe.length!==L.cameras.length&&(L.cameras.length=0,fe=!0);for(let Ze=0;Ze<pe.length;Ze++){const tt=pe[Ze];let St=null;if(g!==null)St=g.getViewport(tt);else{const kt=f.getViewSubImage(m,tt);St=kt.viewport,Ze===0&&(e.setRenderTargetTextures(M,kt.colorTexture,kt.depthStencilTexture),e.setRenderTarget(M))}let lt=D[Ze];lt===void 0&&(lt=new li,lt.layers.enable(Ze),lt.viewport=new nr,D[Ze]=lt),lt.matrix.fromArray(tt.transform.matrix),lt.matrix.decompose(lt.position,lt.quaternion,lt.scale),lt.projectionMatrix.fromArray(tt.projectionMatrix),lt.projectionMatrixInverse.copy(lt.projectionMatrix).invert(),lt.viewport.set(St.x,St.y,St.width,St.height),Ze===0&&(L.matrix.copy(lt.matrix),L.matrix.decompose(L.position,L.quaternion,L.scale)),fe===!0&&L.cameras.push(lt)}const ce=i.enabledFeatures;if(ce&&ce.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&y){f=r.getBinding();const Ze=f.getDepthInformation(pe[0]);Ze&&Ze.isValid&&Ze.texture&&v.init(Ze,i.renderState)}if(ce&&ce.includes("camera-access")&&y){e.state.unbindTexture(),f=r.getBinding();for(let Ze=0;Ze<pe.length;Ze++){const tt=pe[Ze].camera;if(tt){let St=w[tt];St||(St=new VG,w[tt]=St);const lt=f.getCameraImage(tt);St.sourceTexture=lt}}}}for(let pe=0;pe<T.length;pe++){const fe=A[pe],ce=T[pe];fe!==null&&ce!==void 0&&ce.update(fe,de,l||s)}te&&te(ne,de),de.detectedPlanes&&r.dispatchEvent({type:"planesdetected",data:de}),b=null}const Ae=new qG;Ae.setAnimationLoop(we),this.setAnimationLoop=function(ne){te=ne},this.dispose=function(){}}}const Jl=new As,h3e=new Ln;function p3e(t,e){function n(v,w){v.matrixAutoUpdate===!0&&v.updateMatrix(),w.value.copy(v.matrix)}function r(v,w){w.color.getRGB(v.fogColor.value,HG(t)),w.isFog?(v.fogNear.value=w.near,v.fogFar.value=w.far):w.isFogExp2&&(v.fogDensity.value=w.density)}function i(v,w,_,E,M){w.isMeshBasicMaterial?a(v,w):w.isMeshLambertMaterial?(a(v,w),w.envMap&&(v.envMapIntensity.value=w.envMapIntensity)):w.isMeshToonMaterial?(a(v,w),f(v,w)):w.isMeshPhongMaterial?(a(v,w),h(v,w),w.envMap&&(v.envMapIntensity.value=w.envMapIntensity)):w.isMeshStandardMaterial?(a(v,w),m(v,w),w.isMeshPhysicalMaterial&&g(v,w,M)):w.isMeshMatcapMaterial?(a(v,w),b(v,w)):w.isMeshDepthMaterial?a(v,w):w.isMeshDistanceMaterial?(a(v,w),y(v,w)):w.isMeshNormalMaterial?a(v,w):w.isLineBasicMaterial?(s(v,w),w.isLineDashedMaterial&&o(v,w)):w.isPointsMaterial?c(v,w,_,E):w.isSpriteMaterial?l(v,w):w.isShadowMaterial?(v.color.value.copy(w.color),v.opacity.value=w.opacity):w.isShaderMaterial&&(w.uniformsNeedUpdate=!1)}function a(v,w){v.opacity.value=w.opacity,w.color&&v.diffuse.value.copy(w.color),w.emissive&&v.emissive.value.copy(w.emissive).multiplyScalar(w.emissiveIntensity),w.map&&(v.map.value=w.map,n(w.map,v.mapTransform)),w.alphaMap&&(v.alphaMap.value=w.alphaMap,n(w.alphaMap,v.alphaMapTransform)),w.bumpMap&&(v.bumpMap.value=w.bumpMap,n(w.bumpMap,v.bumpMapTransform),v.bumpScale.value=w.bumpScale,w.side===Ri&&(v.bumpScale.value*=-1)),w.normalMap&&(v.normalMap.value=w.normalMap,n(w.normalMap,v.normalMapTransform),v.normalScale.value.copy(w.normalScale),w.side===Ri&&v.normalScale.value.negate()),w.displacementMap&&(v.displacementMap.value=w.displacementMap,n(w.displacementMap,v.displacementMapTransform),v.displacementScale.value=w.displacementScale,v.displacementBias.value=w.displacementBias),w.emissiveMap&&(v.emissiveMap.value=w.emissiveMap,n(w.emissiveMap,v.emissiveMapTransform)),w.specularMap&&(v.specularMap.value=w.specularMap,n(w.specularMap,v.specularMapTransform)),w.alphaTest>0&&(v.alphaTest.value=w.alphaTest);const _=e.get(w),E=_.envMap,M=_.envMapRotation;E&&(v.envMap.value=E,Jl.copy(M),Jl.x*=-1,Jl.y*=-1,Jl.z*=-1,E.isCubeTexture&&E.isRenderTargetTexture===!1&&(Jl.y*=-1,Jl.z*=-1),v.envMapRotation.value.setFromMatrix4(h3e.makeRotationFromEuler(Jl)),v.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=w.reflectivity,v.ior.value=w.ior,v.refractionRatio.value=w.refractionRatio),w.lightMap&&(v.lightMap.value=w.lightMap,v.lightMapIntensity.value=w.lightMapIntensity,n(w.lightMap,v.lightMapTransform)),w.aoMap&&(v.aoMap.value=w.aoMap,v.aoMapIntensity.value=w.aoMapIntensity,n(w.aoMap,v.aoMapTransform))}function s(v,w){v.diffuse.value.copy(w.color),v.opacity.value=w.opacity,w.map&&(v.map.value=w.map,n(w.map,v.mapTransform))}function o(v,w){v.dashSize.value=w.dashSize,v.totalSize.value=w.dashSize+w.gapSize,v.scale.value=w.scale}function c(v,w,_,E){v.diffuse.value.copy(w.color),v.opacity.value=w.opacity,v.size.value=w.size*_,v.scale.value=E*.5,w.map&&(v.map.value=w.map,n(w.map,v.uvTransform)),w.alphaMap&&(v.alphaMap.value=w.alphaMap,n(w.alphaMap,v.alphaMapTransform)),w.alphaTest>0&&(v.alphaTest.value=w.alphaTest)}function l(v,w){v.diffuse.value.copy(w.color),v.opacity.value=w.opacity,v.rotation.value=w.rotation,w.map&&(v.map.value=w.map,n(w.map,v.mapTransform)),w.alphaMap&&(v.alphaMap.value=w.alphaMap,n(w.alphaMap,v.alphaMapTransform)),w.alphaTest>0&&(v.alphaTest.value=w.alphaTest)}function h(v,w){v.specular.value.copy(w.specular),v.shininess.value=Math.max(w.shininess,1e-4)}function f(v,w){w.gradientMap&&(v.gradientMap.value=w.gradientMap)}function m(v,w){v.metalness.value=w.metalness,w.metalnessMap&&(v.metalnessMap.value=w.metalnessMap,n(w.metalnessMap,v.metalnessMapTransform)),v.roughness.value=w.roughness,w.roughnessMap&&(v.roughnessMap.value=w.roughnessMap,n(w.roughnessMap,v.roughnessMapTransform)),w.envMap&&(v.envMapIntensity.value=w.envMapIntensity)}function g(v,w,_){v.ior.value=w.ior,w.sheen>0&&(v.sheenColor.value.copy(w.sheenColor).multiplyScalar(w.sheen),v.sheenRoughness.value=w.sheenRoughness,w.sheenColorMap&&(v.sheenColorMap.value=w.sheenColorMap,n(w.sheenColorMap,v.sheenColorMapTransform)),w.sheenRoughnessMap&&(v.sheenRoughnessMap.value=w.sheenRoughnessMap,n(w.sheenRoughnessMap,v.sheenRoughnessMapTransform))),w.clearcoat>0&&(v.clearcoat.value=w.clearcoat,v.clearcoatRoughness.value=w.clearcoatRoughness,w.clearcoatMap&&(v.clearcoatMap.value=w.clearcoatMap,n(w.clearcoatMap,v.clearcoatMapTransform)),w.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=w.clearcoatRoughnessMap,n(w.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),w.clearcoatNormalMap&&(v.clearcoatNormalMap.value=w.clearcoatNormalMap,n(w.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(w.clearcoatNormalScale),w.side===Ri&&v.clearcoatNormalScale.value.negate())),w.dispersion>0&&(v.dispersion.value=w.dispersion),w.iridescence>0&&(v.iridescence.value=w.iridescence,v.iridescenceIOR.value=w.iridescenceIOR,v.iridescenceThicknessMinimum.value=w.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=w.iridescenceThicknessRange[1],w.iridescenceMap&&(v.iridescenceMap.value=w.iridescenceMap,n(w.iridescenceMap,v.iridescenceMapTransform)),w.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=w.iridescenceThicknessMap,n(w.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),w.transmission>0&&(v.transmission.value=w.transmission,v.transmissionSamplerMap.value=_.texture,v.transmissionSamplerSize.value.set(_.width,_.height),w.transmissionMap&&(v.transmissionMap.value=w.transmissionMap,n(w.transmissionMap,v.transmissionMapTransform)),v.thickness.value=w.thickness,w.thicknessMap&&(v.thicknessMap.value=w.thicknessMap,n(w.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=w.attenuationDistance,v.attenuationColor.value.copy(w.attenuationColor)),w.anisotropy>0&&(v.anisotropyVector.value.set(w.anisotropy*Math.cos(w.anisotropyRotation),w.anisotropy*Math.sin(w.anisotropyRotation)),w.anisotropyMap&&(v.anisotropyMap.value=w.anisotropyMap,n(w.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=w.specularIntensity,v.specularColor.value.copy(w.specularColor),w.specularColorMap&&(v.specularColorMap.value=w.specularColorMap,n(w.specularColorMap,v.specularColorMapTransform)),w.specularIntensityMap&&(v.specularIntensityMap.value=w.specularIntensityMap,n(w.specularIntensityMap,v.specularIntensityMapTransform))}function b(v,w){w.matcap&&(v.matcap.value=w.matcap)}function y(v,w){const _=e.get(w).light;v.referencePosition.value.setFromMatrixPosition(_.matrixWorld),v.nearDistance.value=_.shadow.camera.near,v.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function m3e(t,e,n,r){let i={},a={},s=[];const o=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function c(_,E){const M=E.program;r.uniformBlockBinding(_,M)}function l(_,E){let M=i[_.id];M===void 0&&(b(_),M=h(_),i[_.id]=M,_.addEventListener("dispose",v));const T=E.program;r.updateUBOMapping(_,T);const A=e.render.frame;a[_.id]!==A&&(m(_),a[_.id]=A)}function h(_){const E=f();_.__bindingPointIndex=E;const M=t.createBuffer(),T=_.__size,A=_.usage;return t.bindBuffer(t.UNIFORM_BUFFER,M),t.bufferData(t.UNIFORM_BUFFER,T,A),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,E,M),M}function f(){for(let _=0;_<o;_++)if(s.indexOf(_)===-1)return s.push(_),_;return pn("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function m(_){const E=i[_.id],M=_.uniforms,T=_.__cache;t.bindBuffer(t.UNIFORM_BUFFER,E);for(let A=0,N=M.length;A<N;A++){const P=Array.isArray(M[A])?M[A]:[M[A]];for(let R=0,F=P.length;R<F;R++){const D=P[R];if(g(D,A,R,T)===!0){const L=D.__offset,q=Array.isArray(D.value)?D.value:[D.value];let I=0;for(let U=0;U<q.length;U++){const k=q[U],V=y(k);typeof k=="number"||typeof k=="boolean"?(D.__data[0]=k,t.bufferSubData(t.UNIFORM_BUFFER,L+I,D.__data)):k.isMatrix3?(D.__data[0]=k.elements[0],D.__data[1]=k.elements[1],D.__data[2]=k.elements[2],D.__data[3]=0,D.__data[4]=k.elements[3],D.__data[5]=k.elements[4],D.__data[6]=k.elements[5],D.__data[7]=0,D.__data[8]=k.elements[6],D.__data[9]=k.elements[7],D.__data[10]=k.elements[8],D.__data[11]=0):(k.toArray(D.__data,I),I+=V.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,L,D.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function g(_,E,M,T){const A=_.value,N=E+"_"+M;if(T[N]===void 0)return typeof A=="number"||typeof A=="boolean"?T[N]=A:T[N]=A.clone(),!0;{const P=T[N];if(typeof A=="number"||typeof A=="boolean"){if(P!==A)return T[N]=A,!0}else if(P.equals(A)===!1)return P.copy(A),!0}return!1}function b(_){const E=_.uniforms;let M=0;const T=16;for(let N=0,P=E.length;N<P;N++){const R=Array.isArray(E[N])?E[N]:[E[N]];for(let F=0,D=R.length;F<D;F++){const L=R[F],q=Array.isArray(L.value)?L.value:[L.value];for(let I=0,U=q.length;I<U;I++){const k=q[I],V=y(k),$=M%T,Y=$%V.boundary,J=$+Y;M+=Y,J!==0&&T-J<V.storage&&(M+=T-J),L.__data=new Float32Array(V.storage/Float32Array.BYTES_PER_ELEMENT),L.__offset=M,M+=V.storage}}}const A=M%T;return A>0&&(M+=T-A),_.__size=M,_.__cache={},this}function y(_){const E={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(E.boundary=4,E.storage=4):_.isVector2?(E.boundary=8,E.storage=8):_.isVector3||_.isColor?(E.boundary=16,E.storage=12):_.isVector4?(E.boundary=16,E.storage=16):_.isMatrix3?(E.boundary=48,E.storage=48):_.isMatrix4?(E.boundary=64,E.storage=64):_.isTexture?Jt("WebGLRenderer: Texture samplers can not be part of an uniforms group."):Jt("WebGLRenderer: Unsupported uniform value type.",_),E}function v(_){const E=_.target;E.removeEventListener("dispose",v);const M=s.indexOf(E.__bindingPointIndex);s.splice(M,1),t.deleteBuffer(i[E.id]),delete i[E.id],delete a[E.id]}function w(){for(const _ in i)t.deleteBuffer(i[_]);s=[],i={},a={}}return{bind:c,update:l,dispose:w}}const g3e=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let ns=null;function v3e(){return ns===null&&(ns=new iTe(g3e,16,16,$d,vo),ns.name="DFG_LUT",ns.minFilter=Jr,ns.magFilter=Jr,ns.wrapS=so,ns.wrapT=so,ns.generateMipmaps=!1,ns.needsUpdate=!0),ns}class TC{constructor(e={}){const{canvas:n=IEe(),context:r=null,depth:i=!0,stencil:a=!1,alpha:s=!1,antialias:o=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:l=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:f=!1,reversedDepthBuffer:m=!1,outputBufferType:g=Wi}=e;this.isWebGLRenderer=!0;let b;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");b=r.getContextAttributes().alpha}else b=s;const y=g,v=new Set([hC,fC,dC]),w=new Set([Wi,Ts,Vp,Hp,cC,uC]),_=new Uint32Array(4),E=new Int32Array(4);let M=null,T=null;const A=[],N=[];let P=null;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=xs,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const R=this;let F=!1;this._outputColorSpace=fa;let D=0,L=0,q=null,I=-1,U=null;const k=new nr,V=new nr;let $=null;const Y=new en(0);let J=0,W=n.width,H=n.height,te=1,we=null,Ae=null;const ne=new nr(0,0,W,H),de=new nr(0,0,W,H);let pe=!1;const fe=new xC;let ce=!1,Ce=!1;const ye=new Ln,Ze=new me,tt=new nr,St={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let lt=!1;function kt(){return q===null?te:1}let re=r;function Ht(X,ue){return n.getContext(X,ue)}try{const X={alpha:!0,depth:i,stencil:a,antialias:o,premultipliedAlpha:c,preserveDrawingBuffer:l,powerPreference:h,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${aC}`),n.addEventListener("webglcontextlost",Qe,!1),n.addEventListener("webglcontextrestored",ht,!1),n.addEventListener("webglcontextcreationerror",Gt,!1),re===null){const ue="webgl2";if(re=Ht(ue,X),re===null)throw Ht(ue)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(X){throw pn("WebGLRenderer: "+X.message),X}let Lt,zt,qe,Z,z,ie,Ee,Pe,ge,Xe,Le,ft,nt,Ue,ke,Fe,ze,He,vt,ae,Re,Ie,rt;function $e(){Lt=new yPe(re),Lt.init(),Re=new l3e(re,Lt),zt=new uPe(re,Lt,e,Re),qe=new s3e(re,Lt),zt.reversedDepthBuffer&&m&&qe.buffers.depth.setReversed(!0),Z=new wPe(re),z=new WCe,ie=new o3e(re,Lt,qe,z,zt,Re,Z),Ee=new vPe(R),Pe=new TTe(re),Ie=new lPe(re,Pe),ge=new xPe(re,Pe,Z,Ie),Xe=new SPe(re,ge,Pe,Ie,Z),He=new _Pe(re,zt,ie),ke=new dPe(z),Le=new GCe(R,Ee,Lt,zt,Ie,ke),ft=new p3e(R,z),nt=new XCe,Ue=new e3e(Lt),ze=new oPe(R,Ee,qe,Xe,b,c),Fe=new a3e(R,Xe,zt),rt=new m3e(re,Z,zt,qe),vt=new cPe(re,Lt,Z),ae=new bPe(re,Lt,Z),Z.programs=Le.programs,R.capabilities=zt,R.extensions=Lt,R.properties=z,R.renderLists=nt,R.shadowMap=Fe,R.state=qe,R.info=Z}$e(),y!==Wi&&(P=new EPe(y,n.width,n.height,i,a));const he=new f3e(R,re);this.xr=he,this.getContext=function(){return re},this.getContextAttributes=function(){return re.getContextAttributes()},this.forceContextLoss=function(){const X=Lt.get("WEBGL_lose_context");X&&X.loseContext()},this.forceContextRestore=function(){const X=Lt.get("WEBGL_lose_context");X&&X.restoreContext()},this.getPixelRatio=function(){return te},this.setPixelRatio=function(X){X!==void 0&&(te=X,this.setSize(W,H,!1))},this.getSize=function(X){return X.set(W,H)},this.setSize=function(X,ue,Te=!0){if(he.isPresenting){Jt("WebGLRenderer: Can't change size while VR device is presenting.");return}W=X,H=ue,n.width=Math.floor(X*te),n.height=Math.floor(ue*te),Te===!0&&(n.style.width=X+"px",n.style.height=ue+"px"),P!==null&&P.setSize(n.width,n.height),this.setViewport(0,0,X,ue)},this.getDrawingBufferSize=function(X){return X.set(W*te,H*te).floor()},this.setDrawingBufferSize=function(X,ue,Te){W=X,H=ue,te=Te,n.width=Math.floor(X*Te),n.height=Math.floor(ue*Te),this.setViewport(0,0,X,ue)},this.setEffects=function(X){if(y===Wi){console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(X){for(let ue=0;ue<X.length;ue++)if(X[ue].isOutputPass===!0){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}P.setEffects(X||[])},this.getCurrentViewport=function(X){return X.copy(k)},this.getViewport=function(X){return X.copy(ne)},this.setViewport=function(X,ue,Te,ve){X.isVector4?ne.set(X.x,X.y,X.z,X.w):ne.set(X,ue,Te,ve),qe.viewport(k.copy(ne).multiplyScalar(te).round())},this.getScissor=function(X){return X.copy(de)},this.setScissor=function(X,ue,Te,ve){X.isVector4?de.set(X.x,X.y,X.z,X.w):de.set(X,ue,Te,ve),qe.scissor(V.copy(de).multiplyScalar(te).round())},this.getScissorTest=function(){return pe},this.setScissorTest=function(X){qe.setScissorTest(pe=X)},this.setOpaqueSort=function(X){we=X},this.setTransparentSort=function(X){Ae=X},this.getClearColor=function(X){return X.copy(ze.getClearColor())},this.setClearColor=function(){ze.setClearColor(...arguments)},this.getClearAlpha=function(){return ze.getClearAlpha()},this.setClearAlpha=function(){ze.setClearAlpha(...arguments)},this.clear=function(X=!0,ue=!0,Te=!0){let ve=0;if(X){let be=!1;if(q!==null){const ot=q.texture.format;be=v.has(ot)}if(be){const ot=q.texture.type,ct=w.has(ot),it=ze.getClearColor(),ut=ze.getClearAlpha(),Ke=it.r,pt=it.g,Wt=it.b;ct?(_[0]=Ke,_[1]=pt,_[2]=Wt,_[3]=ut,re.clearBufferuiv(re.COLOR,0,_)):(E[0]=Ke,E[1]=pt,E[2]=Wt,E[3]=ut,re.clearBufferiv(re.COLOR,0,E))}else ve|=re.COLOR_BUFFER_BIT}ue&&(ve|=re.DEPTH_BUFFER_BIT),Te&&(ve|=re.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),ve!==0&&re.clear(ve)},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",Qe,!1),n.removeEventListener("webglcontextrestored",ht,!1),n.removeEventListener("webglcontextcreationerror",Gt,!1),ze.dispose(),nt.dispose(),Ue.dispose(),z.dispose(),Ee.dispose(),Xe.dispose(),Ie.dispose(),rt.dispose(),Le.dispose(),he.dispose(),he.removeEventListener("sessionstart",Se),he.removeEventListener("sessionend",De),Ge.stop()};function Qe(X){X.preventDefault(),Ty("WebGLRenderer: Context Lost."),F=!0}function ht(){Ty("WebGLRenderer: Context Restored."),F=!1;const X=Z.autoReset,ue=Fe.enabled,Te=Fe.autoUpdate,ve=Fe.needsUpdate,be=Fe.type;$e(),Z.autoReset=X,Fe.enabled=ue,Fe.autoUpdate=Te,Fe.needsUpdate=ve,Fe.type=be}function Gt(X){pn("WebGLRenderer: A WebGL context could not be created. Reason: ",X.statusMessage)}function Qt(X){const ue=X.target;ue.removeEventListener("dispose",Qt),mn(ue)}function mn(X){En(X),z.remove(X)}function En(X){const ue=z.get(X).programs;ue!==void 0&&(ue.forEach(function(Te){Le.releaseProgram(Te)}),X.isShaderMaterial&&Le.releaseShaderCache(X))}this.renderBufferDirect=function(X,ue,Te,ve,be,ot){ue===null&&(ue=St);const ct=be.isMesh&&be.matrixWorld.determinant()<0,it=sn(X,ue,Te,ve,be);qe.setMaterial(ve,ct);let ut=Te.index,Ke=1;if(ve.wireframe===!0){if(ut=ge.getWireframeAttribute(Te),ut===void 0)return;Ke=2}const pt=Te.drawRange,Wt=Te.attributes.position;let bt=pt.start*Ke,Ft=(pt.start+pt.count)*Ke;ot!==null&&(bt=Math.max(bt,ot.start*Ke),Ft=Math.min(Ft,(ot.start+ot.count)*Ke)),ut!==null?(bt=Math.max(bt,0),Ft=Math.min(Ft,ut.count)):Wt!=null&&(bt=Math.max(bt,0),Ft=Math.min(Ft,Wt.count));const wn=Ft-bt;if(wn<0||wn===1/0)return;Ie.setup(be,ve,it,Te,ut);let Tn,fn=vt;if(ut!==null&&(Tn=Pe.get(ut),fn=ae,fn.setIndex(Tn)),be.isMesh)ve.wireframe===!0?(qe.setLineWidth(ve.wireframeLinewidth*kt()),fn.setMode(re.LINES)):fn.setMode(re.TRIANGLES);else if(be.isLine){let rr=ve.linewidth;rr===void 0&&(rr=1),qe.setLineWidth(rr*kt()),be.isLineSegments?fn.setMode(re.LINES):be.isLineLoop?fn.setMode(re.LINE_LOOP):fn.setMode(re.LINE_STRIP)}else be.isPoints?fn.setMode(re.POINTS):be.isSprite&&fn.setMode(re.TRIANGLES);if(be.isBatchedMesh)if(be._multiDrawInstances!==null)Ay("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),fn.renderMultiDrawInstances(be._multiDrawStarts,be._multiDrawCounts,be._multiDrawCount,be._multiDrawInstances);else if(Lt.get("WEBGL_multi_draw"))fn.renderMultiDraw(be._multiDrawStarts,be._multiDrawCounts,be._multiDrawCount);else{const rr=be._multiDrawStarts,jt=be._multiDrawCounts,ei=be._multiDrawCount,hn=ut?Pe.get(ut).bytesPerElement:1,xi=z.get(ve).currentProgram.getUniforms();for(let bi=0;bi<ei;bi++)xi.setValue(re,"_gl_DrawID",bi),fn.render(rr[bi]/hn,jt[bi])}else if(be.isInstancedMesh)fn.renderInstances(bt,wn,be.count);else if(Te.isInstancedBufferGeometry){const rr=Te._maxInstanceCount!==void 0?Te._maxInstanceCount:1/0,jt=Math.min(Te.instanceCount,rr);fn.renderInstances(bt,wn,jt)}else fn.render(bt,wn)};function Oi(X,ue,Te){X.transparent===!0&&X.side===os&&X.forceSinglePass===!1?(X.side=Ri,X.needsUpdate=!0,$t(X,ue,Te),X.side=wl,X.needsUpdate=!0,$t(X,ue,Te),X.side=os):$t(X,ue,Te)}this.compile=function(X,ue,Te=null){Te===null&&(Te=X),T=Ue.get(Te),T.init(ue),N.push(T),Te.traverseVisible(function(be){be.isLight&&be.layers.test(ue.layers)&&(T.pushLight(be),be.castShadow&&T.pushShadow(be))}),X!==Te&&X.traverseVisible(function(be){be.isLight&&be.layers.test(ue.layers)&&(T.pushLight(be),be.castShadow&&T.pushShadow(be))}),T.setupLights();const ve=new Set;return X.traverse(function(be){if(!(be.isMesh||be.isPoints||be.isLine||be.isSprite))return;const ot=be.material;if(ot)if(Array.isArray(ot))for(let ct=0;ct<ot.length;ct++){const it=ot[ct];Oi(it,Te,be),ve.add(it)}else Oi(ot,Te,be),ve.add(ot)}),T=N.pop(),ve},this.compileAsync=function(X,ue,Te=null){const ve=this.compile(X,ue,Te);return new Promise(be=>{function ot(){if(ve.forEach(function(ct){z.get(ct).currentProgram.isReady()&&ve.delete(ct)}),ve.size===0){be(X);return}setTimeout(ot,10)}Lt.get("KHR_parallel_shader_compile")!==null?ot():setTimeout(ot,10)})};let ee=null;function oe(X){ee&&ee(X)}function Se(){Ge.stop()}function De(){Ge.start()}const Ge=new qG;Ge.setAnimationLoop(oe),typeof self<"u"&&Ge.setContext(self),this.setAnimationLoop=function(X){ee=X,he.setAnimationLoop(X),X===null?Ge.stop():Ge.start()},he.addEventListener("sessionstart",Se),he.addEventListener("sessionend",De),this.render=function(X,ue){if(ue!==void 0&&ue.isCamera!==!0){pn("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(F===!0)return;const Te=he.enabled===!0&&he.isPresenting===!0,ve=P!==null&&(q===null||Te)&&P.begin(R,q);if(X.matrixWorldAutoUpdate===!0&&X.updateMatrixWorld(),ue.parent===null&&ue.matrixWorldAutoUpdate===!0&&ue.updateMatrixWorld(),he.enabled===!0&&he.isPresenting===!0&&(P===null||P.isCompositing()===!1)&&(he.cameraAutoUpdate===!0&&he.updateCamera(ue),ue=he.getCamera()),X.isScene===!0&&X.onBeforeRender(R,X,ue,q),T=Ue.get(X,N.length),T.init(ue),N.push(T),ye.multiplyMatrices(ue.projectionMatrix,ue.matrixWorldInverse),fe.setFromProjectionMatrix(ye,fs,ue.reversedDepth),Ce=this.localClippingEnabled,ce=ke.init(this.clippingPlanes,Ce),M=nt.get(X,A.length),M.init(),A.push(M),he.enabled===!0&&he.isPresenting===!0){const ct=R.xr.getDepthSensingMesh();ct!==null&&Mt(ct,ue,-1/0,R.sortObjects)}Mt(X,ue,0,R.sortObjects),M.finish(),R.sortObjects===!0&&M.sort(we,Ae),lt=he.enabled===!1||he.isPresenting===!1||he.hasDepthSensing()===!1,lt&&ze.addToRenderList(M,X),this.info.render.frame++,ce===!0&&ke.beginShadows();const be=T.state.shadowsArray;if(Fe.render(be,X,ue),ce===!0&&ke.endShadows(),this.info.autoReset===!0&&this.info.reset(),(ve&&P.hasRenderPass())===!1){const ct=M.opaque,it=M.transmissive;if(T.setupLights(),ue.isArrayCamera){const ut=ue.cameras;if(it.length>0)for(let Ke=0,pt=ut.length;Ke<pt;Ke++){const Wt=ut[Ke];mt(ct,it,X,Wt)}lt&&ze.render(X);for(let Ke=0,pt=ut.length;Ke<pt;Ke++){const Wt=ut[Ke];It(M,X,Wt,Wt.viewport)}}else it.length>0&&mt(ct,it,X,ue),lt&&ze.render(X),It(M,X,ue)}q!==null&&L===0&&(ie.updateMultisampleRenderTarget(q),ie.updateRenderTargetMipmap(q)),ve&&P.end(R),X.isScene===!0&&X.onAfterRender(R,X,ue),Ie.resetDefaultState(),I=-1,U=null,N.pop(),N.length>0?(T=N[N.length-1],ce===!0&&ke.setGlobalState(R.clippingPlanes,T.state.camera)):T=null,A.pop(),A.length>0?M=A[A.length-1]:M=null};function Mt(X,ue,Te,ve){if(X.visible===!1)return;if(X.layers.test(ue.layers)){if(X.isGroup)Te=X.renderOrder;else if(X.isLOD)X.autoUpdate===!0&&X.update(ue);else if(X.isLight)T.pushLight(X),X.castShadow&&T.pushShadow(X);else if(X.isSprite){if(!X.frustumCulled||fe.intersectsSprite(X)){ve&&tt.setFromMatrixPosition(X.matrixWorld).applyMatrix4(ye);const ct=Xe.update(X),it=X.material;it.visible&&M.push(X,ct,it,Te,tt.z,null)}}else if((X.isMesh||X.isLine||X.isPoints)&&(!X.frustumCulled||fe.intersectsObject(X))){const ct=Xe.update(X),it=X.material;if(ve&&(X.boundingSphere!==void 0?(X.boundingSphere===null&&X.computeBoundingSphere(),tt.copy(X.boundingSphere.center)):(ct.boundingSphere===null&&ct.computeBoundingSphere(),tt.copy(ct.boundingSphere.center)),tt.applyMatrix4(X.matrixWorld).applyMatrix4(ye)),Array.isArray(it)){const ut=ct.groups;for(let Ke=0,pt=ut.length;Ke<pt;Ke++){const Wt=ut[Ke],bt=it[Wt.materialIndex];bt&&bt.visible&&M.push(X,ct,bt,Te,tt.z,Wt)}}else it.visible&&M.push(X,ct,it,Te,tt.z,null)}}const ot=X.children;for(let ct=0,it=ot.length;ct<it;ct++)Mt(ot[ct],ue,Te,ve)}function It(X,ue,Te,ve){const{opaque:be,transmissive:ot,transparent:ct}=X;T.setupLightsView(Te),ce===!0&&ke.setGlobalState(R.clippingPlanes,Te),ve&&qe.viewport(k.copy(ve)),be.length>0&&yt(be,ue,Te),ot.length>0&&yt(ot,ue,Te),ct.length>0&&yt(ct,ue,Te),qe.buffers.depth.setTest(!0),qe.buffers.depth.setMask(!0),qe.buffers.color.setMask(!0),qe.setPolygonOffset(!1)}function mt(X,ue,Te,ve){if((Te.isScene===!0?Te.overrideMaterial:null)!==null)return;if(T.state.transmissionRenderTarget[ve.id]===void 0){const bt=Lt.has("EXT_color_buffer_half_float")||Lt.has("EXT_color_buffer_float");T.state.transmissionRenderTarget[ve.id]=new bs(1,1,{generateMipmaps:!0,type:bt?vo:Wi,minFilter:mc,samples:Math.max(4,zt.samples),stencilBuffer:a,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:vn.workingColorSpace})}const ot=T.state.transmissionRenderTarget[ve.id],ct=ve.viewport||k;ot.setSize(ct.z*R.transmissionResolutionScale,ct.w*R.transmissionResolutionScale);const it=R.getRenderTarget(),ut=R.getActiveCubeFace(),Ke=R.getActiveMipmapLevel();R.setRenderTarget(ot),R.getClearColor(Y),J=R.getClearAlpha(),J<1&&R.setClearColor(16777215,.5),R.clear(),lt&&ze.render(Te);const pt=R.toneMapping;R.toneMapping=xs;const Wt=ve.viewport;if(ve.viewport!==void 0&&(ve.viewport=void 0),T.setupLightsView(ve),ce===!0&&ke.setGlobalState(R.clippingPlanes,ve),yt(X,Te,ve),ie.updateMultisampleRenderTarget(ot),ie.updateRenderTargetMipmap(ot),Lt.has("WEBGL_multisampled_render_to_texture")===!1){let bt=!1;for(let Ft=0,wn=ue.length;Ft<wn;Ft++){const Tn=ue[Ft],{object:fn,geometry:rr,material:jt,group:ei}=Tn;if(jt.side===os&&fn.layers.test(ve.layers)){const hn=jt.side;jt.side=Ri,jt.needsUpdate=!0,xt(fn,Te,ve,rr,jt,ei),jt.side=hn,jt.needsUpdate=!0,bt=!0}}bt===!0&&(ie.updateMultisampleRenderTarget(ot),ie.updateRenderTargetMipmap(ot))}R.setRenderTarget(it,ut,Ke),R.setClearColor(Y,J),Wt!==void 0&&(ve.viewport=Wt),R.toneMapping=pt}function yt(X,ue,Te){const ve=ue.isScene===!0?ue.overrideMaterial:null;for(let be=0,ot=X.length;be<ot;be++){const ct=X[be],{object:it,geometry:ut,group:Ke}=ct;let pt=ct.material;pt.allowOverride===!0&&ve!==null&&(pt=ve),it.layers.test(Te.layers)&&xt(it,ue,Te,ut,pt,Ke)}}function xt(X,ue,Te,ve,be,ot){X.onBeforeRender(R,ue,Te,ve,be,ot),X.modelViewMatrix.multiplyMatrices(Te.matrixWorldInverse,X.matrixWorld),X.normalMatrix.getNormalMatrix(X.modelViewMatrix),be.onBeforeRender(R,ue,Te,ve,X,ot),be.transparent===!0&&be.side===os&&be.forceSinglePass===!1?(be.side=Ri,be.needsUpdate=!0,R.renderBufferDirect(Te,ue,ve,be,X,ot),be.side=wl,be.needsUpdate=!0,R.renderBufferDirect(Te,ue,ve,be,X,ot),be.side=os):R.renderBufferDirect(Te,ue,ve,be,X,ot),X.onAfterRender(R,ue,Te,ve,be,ot)}function $t(X,ue,Te){ue.isScene!==!0&&(ue=St);const ve=z.get(X),be=T.state.lights,ot=T.state.shadowsArray,ct=be.state.version,it=Le.getParameters(X,be.state,ot,ue,Te),ut=Le.getProgramCacheKey(it);let Ke=ve.programs;ve.environment=X.isMeshStandardMaterial||X.isMeshLambertMaterial||X.isMeshPhongMaterial?ue.environment:null,ve.fog=ue.fog;const pt=X.isMeshStandardMaterial||X.isMeshLambertMaterial&&!X.envMap||X.isMeshPhongMaterial&&!X.envMap;ve.envMap=Ee.get(X.envMap||ve.environment,pt),ve.envMapRotation=ve.environment!==null&&X.envMap===null?ue.environmentRotation:X.envMapRotation,Ke===void 0&&(X.addEventListener("dispose",Qt),Ke=new Map,ve.programs=Ke);let Wt=Ke.get(ut);if(Wt!==void 0){if(ve.currentProgram===Wt&&ve.lightsStateVersion===ct)return Zt(X,it),Wt}else it.uniforms=Le.getUniforms(X),X.onBeforeCompile(it,R),Wt=Le.acquireProgram(it,ut),Ke.set(ut,Wt),ve.uniforms=it.uniforms;const bt=ve.uniforms;return(!X.isShaderMaterial&&!X.isRawShaderMaterial||X.clipping===!0)&&(bt.clippingPlanes=ke.uniform),Zt(X,it),ve.needsLights=Gn(X),ve.lightsStateVersion=ct,ve.needsLights&&(bt.ambientLightColor.value=be.state.ambient,bt.lightProbe.value=be.state.probe,bt.directionalLights.value=be.state.directional,bt.directionalLightShadows.value=be.state.directionalShadow,bt.spotLights.value=be.state.spot,bt.spotLightShadows.value=be.state.spotShadow,bt.rectAreaLights.value=be.state.rectArea,bt.ltc_1.value=be.state.rectAreaLTC1,bt.ltc_2.value=be.state.rectAreaLTC2,bt.pointLights.value=be.state.point,bt.pointLightShadows.value=be.state.pointShadow,bt.hemisphereLights.value=be.state.hemi,bt.directionalShadowMatrix.value=be.state.directionalShadowMatrix,bt.spotLightMatrix.value=be.state.spotLightMatrix,bt.spotLightMap.value=be.state.spotLightMap,bt.pointShadowMatrix.value=be.state.pointShadowMatrix),ve.currentProgram=Wt,ve.uniformsList=null,Wt}function Ct(X){if(X.uniformsList===null){const ue=X.currentProgram.getUniforms();X.uniformsList=Jg.seqWithValue(ue.seq,X.uniforms)}return X.uniformsList}function Zt(X,ue){const Te=z.get(X);Te.outputColorSpace=ue.outputColorSpace,Te.batching=ue.batching,Te.batchingColor=ue.batchingColor,Te.instancing=ue.instancing,Te.instancingColor=ue.instancingColor,Te.instancingMorph=ue.instancingMorph,Te.skinning=ue.skinning,Te.morphTargets=ue.morphTargets,Te.morphNormals=ue.morphNormals,Te.morphColors=ue.morphColors,Te.morphTargetsCount=ue.morphTargetsCount,Te.numClippingPlanes=ue.numClippingPlanes,Te.numIntersection=ue.numClipIntersection,Te.vertexAlphas=ue.vertexAlphas,Te.vertexTangents=ue.vertexTangents,Te.toneMapping=ue.toneMapping}function sn(X,ue,Te,ve,be){ue.isScene!==!0&&(ue=St),ie.resetTextureUnits();const ot=ue.fog,ct=ve.isMeshStandardMaterial||ve.isMeshLambertMaterial||ve.isMeshPhongMaterial?ue.environment:null,it=q===null?R.outputColorSpace:q.isXRRenderTarget===!0?q.texture.colorSpace:Vd,ut=ve.isMeshStandardMaterial||ve.isMeshLambertMaterial&&!ve.envMap||ve.isMeshPhongMaterial&&!ve.envMap,Ke=Ee.get(ve.envMap||ct,ut),pt=ve.vertexColors===!0&&!!Te.attributes.color&&Te.attributes.color.itemSize===4,Wt=!!Te.attributes.tangent&&(!!ve.normalMap||ve.anisotropy>0),bt=!!Te.morphAttributes.position,Ft=!!Te.morphAttributes.normal,wn=!!Te.morphAttributes.color;let Tn=xs;ve.toneMapped&&(q===null||q.isXRRenderTarget===!0)&&(Tn=R.toneMapping);const fn=Te.morphAttributes.position||Te.morphAttributes.normal||Te.morphAttributes.color,rr=fn!==void 0?fn.length:0,jt=z.get(ve),ei=T.state.lights;if(ce===!0&&(Ce===!0||X!==U)){const ir=X===U&&ve.id===I;ke.setState(ve,X,ir)}let hn=!1;ve.version===jt.__version?(jt.needsLights&&jt.lightsStateVersion!==ei.state.version||jt.outputColorSpace!==it||be.isBatchedMesh&&jt.batching===!1||!be.isBatchedMesh&&jt.batching===!0||be.isBatchedMesh&&jt.batchingColor===!0&&be.colorTexture===null||be.isBatchedMesh&&jt.batchingColor===!1&&be.colorTexture!==null||be.isInstancedMesh&&jt.instancing===!1||!be.isInstancedMesh&&jt.instancing===!0||be.isSkinnedMesh&&jt.skinning===!1||!be.isSkinnedMesh&&jt.skinning===!0||be.isInstancedMesh&&jt.instancingColor===!0&&be.instanceColor===null||be.isInstancedMesh&&jt.instancingColor===!1&&be.instanceColor!==null||be.isInstancedMesh&&jt.instancingMorph===!0&&be.morphTexture===null||be.isInstancedMesh&&jt.instancingMorph===!1&&be.morphTexture!==null||jt.envMap!==Ke||ve.fog===!0&&jt.fog!==ot||jt.numClippingPlanes!==void 0&&(jt.numClippingPlanes!==ke.numPlanes||jt.numIntersection!==ke.numIntersection)||jt.vertexAlphas!==pt||jt.vertexTangents!==Wt||jt.morphTargets!==bt||jt.morphNormals!==Ft||jt.morphColors!==wn||jt.toneMapping!==Tn||jt.morphTargetsCount!==rr)&&(hn=!0):(hn=!0,jt.__version=ve.version);let xi=jt.currentProgram;hn===!0&&(xi=$t(ve,ue,be));let bi=!1,Ii=!1,So=!1;const _n=xi.getUniforms(),qt=jt.uniforms;if(qe.useProgram(xi.program)&&(bi=!0,Ii=!0,So=!0),ve.id!==I&&(I=ve.id,Ii=!0),bi||U!==X){qe.buffers.depth.getReversed()&&X.reversedDepth!==!0&&(X._reversedDepth=!0,X.updateProjectionMatrix()),_n.setValue(re,"projectionMatrix",X.projectionMatrix),_n.setValue(re,"viewMatrix",X.matrixWorldInverse);const ea=_n.map.cameraPosition;ea!==void 0&&ea.setValue(re,Ze.setFromMatrixPosition(X.matrixWorld)),zt.logarithmicDepthBuffer&&_n.setValue(re,"logDepthBufFC",2/(Math.log(X.far+1)/Math.LN2)),(ve.isMeshPhongMaterial||ve.isMeshToonMaterial||ve.isMeshLambertMaterial||ve.isMeshBasicMaterial||ve.isMeshStandardMaterial||ve.isShaderMaterial)&&_n.setValue(re,"isOrthographic",X.isOrthographicCamera===!0),U!==X&&(U=X,Ii=!0,So=!0)}if(jt.needsLights&&(ei.state.directionalShadowMap.length>0&&_n.setValue(re,"directionalShadowMap",ei.state.directionalShadowMap,ie),ei.state.spotShadowMap.length>0&&_n.setValue(re,"spotShadowMap",ei.state.spotShadowMap,ie),ei.state.pointShadowMap.length>0&&_n.setValue(re,"pointShadowMap",ei.state.pointShadowMap,ie)),be.isSkinnedMesh){_n.setOptional(re,be,"bindMatrix"),_n.setOptional(re,be,"bindMatrixInverse");const ir=be.skeleton;ir&&(ir.boneTexture===null&&ir.computeBoneTexture(),_n.setValue(re,"boneTexture",ir.boneTexture,ie))}be.isBatchedMesh&&(_n.setOptional(re,be,"batchingTexture"),_n.setValue(re,"batchingTexture",be._matricesTexture,ie),_n.setOptional(re,be,"batchingIdTexture"),_n.setValue(re,"batchingIdTexture",be._indirectTexture,ie),_n.setOptional(re,be,"batchingColorTexture"),be._colorsTexture!==null&&_n.setValue(re,"batchingColorTexture",be._colorsTexture,ie));const Ma=Te.morphAttributes;if((Ma.position!==void 0||Ma.normal!==void 0||Ma.color!==void 0)&&He.update(be,Te,xi),(Ii||jt.receiveShadow!==be.receiveShadow)&&(jt.receiveShadow=be.receiveShadow,_n.setValue(re,"receiveShadow",be.receiveShadow)),(ve.isMeshStandardMaterial||ve.isMeshLambertMaterial||ve.isMeshPhongMaterial)&&ve.envMap===null&&ue.environment!==null&&(qt.envMapIntensity.value=ue.environmentIntensity),qt.dfgLUT!==void 0&&(qt.dfgLUT.value=v3e()),Ii&&(_n.setValue(re,"toneMappingExposure",R.toneMappingExposure),jt.needsLights&&Jn(qt,So),ot&&ve.fog===!0&&ft.refreshFogUniforms(qt,ot),ft.refreshMaterialUniforms(qt,ve,te,H,T.state.transmissionRenderTarget[X.id]),Jg.upload(re,Ct(jt),qt,ie)),ve.isShaderMaterial&&ve.uniformsNeedUpdate===!0&&(Jg.upload(re,Ct(jt),qt,ie),ve.uniformsNeedUpdate=!1),ve.isSpriteMaterial&&_n.setValue(re,"center",be.center),_n.setValue(re,"modelViewMatrix",be.modelViewMatrix),_n.setValue(re,"normalMatrix",be.normalMatrix),_n.setValue(re,"modelMatrix",be.matrixWorld),ve.isShaderMaterial||ve.isRawShaderMaterial){const ir=ve.uniformsGroups;for(let ea=0,Is=ir.length;ea<Is;ea++){const pf=ir[ea];rt.update(pf,xi),rt.bind(pf,xi)}}return xi}function Jn(X,ue){X.ambientLightColor.needsUpdate=ue,X.lightProbe.needsUpdate=ue,X.directionalLights.needsUpdate=ue,X.directionalLightShadows.needsUpdate=ue,X.pointLights.needsUpdate=ue,X.pointLightShadows.needsUpdate=ue,X.spotLights.needsUpdate=ue,X.spotLightShadows.needsUpdate=ue,X.rectAreaLights.needsUpdate=ue,X.hemisphereLights.needsUpdate=ue}function Gn(X){return X.isMeshLambertMaterial||X.isMeshToonMaterial||X.isMeshPhongMaterial||X.isMeshStandardMaterial||X.isShadowMaterial||X.isShaderMaterial&&X.lights===!0}this.getActiveCubeFace=function(){return D},this.getActiveMipmapLevel=function(){return L},this.getRenderTarget=function(){return q},this.setRenderTargetTextures=function(X,ue,Te){const ve=z.get(X);ve.__autoAllocateDepthBuffer=X.resolveDepthBuffer===!1,ve.__autoAllocateDepthBuffer===!1&&(ve.__useRenderToTexture=!1),z.get(X.texture).__webglTexture=ue,z.get(X.depthTexture).__webglTexture=ve.__autoAllocateDepthBuffer?void 0:Te,ve.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(X,ue){const Te=z.get(X);Te.__webglFramebuffer=ue,Te.__useDefaultFramebuffer=ue===void 0};const sr=re.createFramebuffer();this.setRenderTarget=function(X,ue=0,Te=0){q=X,D=ue,L=Te;let ve=null,be=!1,ot=!1;if(X){const it=z.get(X);if(it.__useDefaultFramebuffer!==void 0){qe.bindFramebuffer(re.FRAMEBUFFER,it.__webglFramebuffer),k.copy(X.viewport),V.copy(X.scissor),$=X.scissorTest,qe.viewport(k),qe.scissor(V),qe.setScissorTest($),I=-1;return}else if(it.__webglFramebuffer===void 0)ie.setupRenderTarget(X);else if(it.__hasExternalTextures)ie.rebindTextures(X,z.get(X.texture).__webglTexture,z.get(X.depthTexture).__webglTexture);else if(X.depthBuffer){const pt=X.depthTexture;if(it.__boundDepthTexture!==pt){if(pt!==null&&z.has(pt)&&(X.width!==pt.image.width||X.height!==pt.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");ie.setupDepthRenderbuffer(X)}}const ut=X.texture;(ut.isData3DTexture||ut.isDataArrayTexture||ut.isCompressedArrayTexture)&&(ot=!0);const Ke=z.get(X).__webglFramebuffer;X.isWebGLCubeRenderTarget?(Array.isArray(Ke[ue])?ve=Ke[ue][Te]:ve=Ke[ue],be=!0):X.samples>0&&ie.useMultisampledRTT(X)===!1?ve=z.get(X).__webglMultisampledFramebuffer:Array.isArray(Ke)?ve=Ke[Te]:ve=Ke,k.copy(X.viewport),V.copy(X.scissor),$=X.scissorTest}else k.copy(ne).multiplyScalar(te).floor(),V.copy(de).multiplyScalar(te).floor(),$=pe;if(Te!==0&&(ve=sr),qe.bindFramebuffer(re.FRAMEBUFFER,ve)&&qe.drawBuffers(X,ve),qe.viewport(k),qe.scissor(V),qe.setScissorTest($),be){const it=z.get(X.texture);re.framebufferTexture2D(re.FRAMEBUFFER,re.COLOR_ATTACHMENT0,re.TEXTURE_CUBE_MAP_POSITIVE_X+ue,it.__webglTexture,Te)}else if(ot){const it=ue;for(let ut=0;ut<X.textures.length;ut++){const Ke=z.get(X.textures[ut]);re.framebufferTextureLayer(re.FRAMEBUFFER,re.COLOR_ATTACHMENT0+ut,Ke.__webglTexture,Te,it)}}else if(X!==null&&Te!==0){const it=z.get(X.texture);re.framebufferTexture2D(re.FRAMEBUFFER,re.COLOR_ATTACHMENT0,re.TEXTURE_2D,it.__webglTexture,Te)}I=-1},this.readRenderTargetPixels=function(X,ue,Te,ve,be,ot,ct,it=0){if(!(X&&X.isWebGLRenderTarget)){pn("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ut=z.get(X).__webglFramebuffer;if(X.isWebGLCubeRenderTarget&&ct!==void 0&&(ut=ut[ct]),ut){qe.bindFramebuffer(re.FRAMEBUFFER,ut);try{const Ke=X.textures[it],pt=Ke.format,Wt=Ke.type;if(X.textures.length>1&&re.readBuffer(re.COLOR_ATTACHMENT0+it),!zt.textureFormatReadable(pt)){pn("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!zt.textureTypeReadable(Wt)){pn("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ue>=0&&ue<=X.width-ve&&Te>=0&&Te<=X.height-be&&re.readPixels(ue,Te,ve,be,Re.convert(pt),Re.convert(Wt),ot)}finally{const Ke=q!==null?z.get(q).__webglFramebuffer:null;qe.bindFramebuffer(re.FRAMEBUFFER,Ke)}}},this.readRenderTargetPixelsAsync=async function(X,ue,Te,ve,be,ot,ct,it=0){if(!(X&&X.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ut=z.get(X).__webglFramebuffer;if(X.isWebGLCubeRenderTarget&&ct!==void 0&&(ut=ut[ct]),ut)if(ue>=0&&ue<=X.width-ve&&Te>=0&&Te<=X.height-be){qe.bindFramebuffer(re.FRAMEBUFFER,ut);const Ke=X.textures[it],pt=Ke.format,Wt=Ke.type;if(X.textures.length>1&&re.readBuffer(re.COLOR_ATTACHMENT0+it),!zt.textureFormatReadable(pt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!zt.textureTypeReadable(Wt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const bt=re.createBuffer();re.bindBuffer(re.PIXEL_PACK_BUFFER,bt),re.bufferData(re.PIXEL_PACK_BUFFER,ot.byteLength,re.STREAM_READ),re.readPixels(ue,Te,ve,be,Re.convert(pt),Re.convert(Wt),0);const Ft=q!==null?z.get(q).__webglFramebuffer:null;qe.bindFramebuffer(re.FRAMEBUFFER,Ft);const wn=re.fenceSync(re.SYNC_GPU_COMMANDS_COMPLETE,0);return re.flush(),await DEe(re,wn,4),re.bindBuffer(re.PIXEL_PACK_BUFFER,bt),re.getBufferSubData(re.PIXEL_PACK_BUFFER,0,ot),re.deleteBuffer(bt),re.deleteSync(wn),ot}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(X,ue=null,Te=0){const ve=Math.pow(2,-Te),be=Math.floor(X.image.width*ve),ot=Math.floor(X.image.height*ve),ct=ue!==null?ue.x:0,it=ue!==null?ue.y:0;ie.setTexture2D(X,0),re.copyTexSubImage2D(re.TEXTURE_2D,Te,0,0,ct,it,be,ot),qe.unbindTexture()};const yn=re.createFramebuffer(),$r=re.createFramebuffer();this.copyTextureToTexture=function(X,ue,Te=null,ve=null,be=0,ot=0){let ct,it,ut,Ke,pt,Wt,bt,Ft,wn;const Tn=X.isCompressedTexture?X.mipmaps[ot]:X.image;if(Te!==null)ct=Te.max.x-Te.min.x,it=Te.max.y-Te.min.y,ut=Te.isBox3?Te.max.z-Te.min.z:1,Ke=Te.min.x,pt=Te.min.y,Wt=Te.isBox3?Te.min.z:0;else{const qt=Math.pow(2,-be);ct=Math.floor(Tn.width*qt),it=Math.floor(Tn.height*qt),X.isDataArrayTexture?ut=Tn.depth:X.isData3DTexture?ut=Math.floor(Tn.depth*qt):ut=1,Ke=0,pt=0,Wt=0}ve!==null?(bt=ve.x,Ft=ve.y,wn=ve.z):(bt=0,Ft=0,wn=0);const fn=Re.convert(ue.format),rr=Re.convert(ue.type);let jt;ue.isData3DTexture?(ie.setTexture3D(ue,0),jt=re.TEXTURE_3D):ue.isDataArrayTexture||ue.isCompressedArrayTexture?(ie.setTexture2DArray(ue,0),jt=re.TEXTURE_2D_ARRAY):(ie.setTexture2D(ue,0),jt=re.TEXTURE_2D),re.pixelStorei(re.UNPACK_FLIP_Y_WEBGL,ue.flipY),re.pixelStorei(re.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ue.premultiplyAlpha),re.pixelStorei(re.UNPACK_ALIGNMENT,ue.unpackAlignment);const ei=re.getParameter(re.UNPACK_ROW_LENGTH),hn=re.getParameter(re.UNPACK_IMAGE_HEIGHT),xi=re.getParameter(re.UNPACK_SKIP_PIXELS),bi=re.getParameter(re.UNPACK_SKIP_ROWS),Ii=re.getParameter(re.UNPACK_SKIP_IMAGES);re.pixelStorei(re.UNPACK_ROW_LENGTH,Tn.width),re.pixelStorei(re.UNPACK_IMAGE_HEIGHT,Tn.height),re.pixelStorei(re.UNPACK_SKIP_PIXELS,Ke),re.pixelStorei(re.UNPACK_SKIP_ROWS,pt),re.pixelStorei(re.UNPACK_SKIP_IMAGES,Wt);const So=X.isDataArrayTexture||X.isData3DTexture,_n=ue.isDataArrayTexture||ue.isData3DTexture;if(X.isDepthTexture){const qt=z.get(X),Ma=z.get(ue),ir=z.get(qt.__renderTarget),ea=z.get(Ma.__renderTarget);qe.bindFramebuffer(re.READ_FRAMEBUFFER,ir.__webglFramebuffer),qe.bindFramebuffer(re.DRAW_FRAMEBUFFER,ea.__webglFramebuffer);for(let Is=0;Is<ut;Is++)So&&(re.framebufferTextureLayer(re.READ_FRAMEBUFFER,re.COLOR_ATTACHMENT0,z.get(X).__webglTexture,be,Wt+Is),re.framebufferTextureLayer(re.DRAW_FRAMEBUFFER,re.COLOR_ATTACHMENT0,z.get(ue).__webglTexture,ot,wn+Is)),re.blitFramebuffer(Ke,pt,ct,it,bt,Ft,ct,it,re.DEPTH_BUFFER_BIT,re.NEAREST);qe.bindFramebuffer(re.READ_FRAMEBUFFER,null),qe.bindFramebuffer(re.DRAW_FRAMEBUFFER,null)}else if(be!==0||X.isRenderTargetTexture||z.has(X)){const qt=z.get(X),Ma=z.get(ue);qe.bindFramebuffer(re.READ_FRAMEBUFFER,yn),qe.bindFramebuffer(re.DRAW_FRAMEBUFFER,$r);for(let ir=0;ir<ut;ir++)So?re.framebufferTextureLayer(re.READ_FRAMEBUFFER,re.COLOR_ATTACHMENT0,qt.__webglTexture,be,Wt+ir):re.framebufferTexture2D(re.READ_FRAMEBUFFER,re.COLOR_ATTACHMENT0,re.TEXTURE_2D,qt.__webglTexture,be),_n?re.framebufferTextureLayer(re.DRAW_FRAMEBUFFER,re.COLOR_ATTACHMENT0,Ma.__webglTexture,ot,wn+ir):re.framebufferTexture2D(re.DRAW_FRAMEBUFFER,re.COLOR_ATTACHMENT0,re.TEXTURE_2D,Ma.__webglTexture,ot),be!==0?re.blitFramebuffer(Ke,pt,ct,it,bt,Ft,ct,it,re.COLOR_BUFFER_BIT,re.NEAREST):_n?re.copyTexSubImage3D(jt,ot,bt,Ft,wn+ir,Ke,pt,ct,it):re.copyTexSubImage2D(jt,ot,bt,Ft,Ke,pt,ct,it);qe.bindFramebuffer(re.READ_FRAMEBUFFER,null),qe.bindFramebuffer(re.DRAW_FRAMEBUFFER,null)}else _n?X.isDataTexture||X.isData3DTexture?re.texSubImage3D(jt,ot,bt,Ft,wn,ct,it,ut,fn,rr,Tn.data):ue.isCompressedArrayTexture?re.compressedTexSubImage3D(jt,ot,bt,Ft,wn,ct,it,ut,fn,Tn.data):re.texSubImage3D(jt,ot,bt,Ft,wn,ct,it,ut,fn,rr,Tn):X.isDataTexture?re.texSubImage2D(re.TEXTURE_2D,ot,bt,Ft,ct,it,fn,rr,Tn.data):X.isCompressedTexture?re.compressedTexSubImage2D(re.TEXTURE_2D,ot,bt,Ft,Tn.width,Tn.height,fn,Tn.data):re.texSubImage2D(re.TEXTURE_2D,ot,bt,Ft,ct,it,fn,rr,Tn);re.pixelStorei(re.UNPACK_ROW_LENGTH,ei),re.pixelStorei(re.UNPACK_IMAGE_HEIGHT,hn),re.pixelStorei(re.UNPACK_SKIP_PIXELS,xi),re.pixelStorei(re.UNPACK_SKIP_ROWS,bi),re.pixelStorei(re.UNPACK_SKIP_IMAGES,Ii),ot===0&&ue.generateMipmaps&&re.generateMipmap(jt),qe.unbindTexture()},this.initRenderTarget=function(X){z.get(X).__webglFramebuffer===void 0&&ie.setupRenderTarget(X)},this.initTexture=function(X){X.isCubeTexture?ie.setTextureCube(X,0):X.isData3DTexture?ie.setTexture3D(X,0):X.isDataArrayTexture||X.isCompressedArrayTexture?ie.setTexture2DArray(X,0):ie.setTexture2D(X,0),qe.unbindTexture()},this.resetState=function(){D=0,L=0,q=null,qe.reset(),Ie.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return fs}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=vn._getDrawingBufferColorSpace(e),n.unpackColorSpace=vn._getUnpackColorSpace()}}const DM=[{id:1,name:"料浆制备",position:[-5,0,0],status:"active",temperature:85,pressure:.3,flowRate:120,description:"铝土矿浆料制备工序",icon:"mixer"},{id:2,name:"溶出釜",position:[-1.5,0,0],status:"active",temperature:260,pressure:4.5,flowRate:95,description:"高温高压溶出反应",icon:"pressure"},{id:3,name:"沉降槽",position:[2,0,0],status:"active",temperature:105,pressure:.5,flowRate:85,description:"浆液分离与沉降",icon:"tank"},{id:4,name:"种子分解",position:[5.5,0,0],status:"warning",temperature:75,pressure:.2,flowRate:65,description:"氢氧化铝晶种分解",icon:"tower"},{id:5,name:"蒸发器",position:[2,0,-4],status:"active",temperature:145,pressure:.4,flowRate:55,description:"母液蒸发浓缩",icon:"evaporator"},{id:6,name:"焙烧炉",position:[5.5,0,-4],status:"active",temperature:1200,pressure:.1,flowRate:45,description:"氢氧化铝焙烧成品",icon:"furnace"}],kM={active:{main:1096065,emissive:366185,name:"运行",glow:3462041},warning:{main:16096779,emissive:14251782,name:"预警",glow:16498468},error:{main:15680580,emissive:14427686,name:"报警",glow:16281969}},B8=["主视图","侧视图","俯视图","自由视角"];function y3e(t,e){const n=new at(1.2,1.4,2.5,24),r=new Oe({color:6583435,metalness:.7,roughness:.3}),i=new _e(n,r);i.position.y=.25,i.castShadow=!0,t.add(i);const a=new at(1,1.2,.4,24),s=new Oe({color:4674921,metalness:.8,roughness:.2}),o=new _e(a,s);o.position.y=1.7,o.castShadow=!0,t.add(o);const c=new cn(.6,.8,.6),l=new Oe({color:3900150,metalness:.6,roughness:.4}),h=new _e(c,l);h.position.y=2.3,h.castShadow=!0,t.add(h);const f=new at(.08,.08,1.5,12),m=new Oe({color:9741240,metalness:.9,roughness:.2}),g=new _e(f,m);g.position.y=.8,g.castShadow=!0,t.add(g);const b=new zr(.5,.08,8,24),y=new Oe({color:16096779,metalness:.8,roughness:.2,emissive:16096779,emissiveIntensity:.2}),v=new _e(b,y);v.rotation.x=Math.PI/2,v.position.y=.3,v.castShadow=!0,v.name="impeller",t.add(v);const w=new at(.12,.12,.8,12),_=new Oe({color:9741240,metalness:.9,roughness:.1}),E=new _e(w,_);E.rotation.z=Math.PI/2,E.position.set(-1.4,.8,0),t.add(E);const M=new at(.15,.15,.6,12),T=new _e(M,_);return T.rotation.z=Math.PI/2,T.position.set(1.4,.2,0),t.add(T),{body:i,impeller:v,shaft:g}}function x3e(t,e){const n=new at(1.3,1.3,3.5,24),r=new Oe({color:7893356,metalness:.75,roughness:.25}),i=new _e(n,r);i.position.y=0,i.castShadow=!0,t.add(i);const a=new Ga(1.3,24,12,0,Math.PI*2,0,Math.PI/2),s=new Oe({color:9584654,metalness:.7,roughness:.3}),o=new _e(a,s);o.position.y=1.75,o.castShadow=!0,t.add(o);const c=new Ga(1.3,24,12,0,Math.PI*2,Math.PI/2,Math.PI/2),l=new _e(c,s);l.position.y=-1.75,l.castShadow=!0,t.add(l);const h=new zr(1.35,.08,8,32),f=new Oe({color:16096779,metalness:.9,roughness:.1,emissive:16096779,emissiveIntensity:.3}),m=new _e(h,f);m.rotation.x=Math.PI/2,m.position.y=.8,m.name="ring0",t.add(m);const g=m.clone();g.position.y=-.8,g.name="ring1",t.add(g);const b=new Zn,y=new at(.18,.18,1.2,12),v=new Oe({color:14427686,metalness:.8,roughness:.2}),w=new _e(y,v);w.rotation.z=Math.PI/2,w.position.set(0,1.2,0),b.add(w);const _=new _e(y,v);_.rotation.z=Math.PI/2,_.position.set(0,-1.2,0),b.add(_);const E=new at(.1,.1,.8,12),M=new Oe({color:9741240,metalness:.9,roughness:.1}),T=new _e(E,M);T.position.set(0,0,1.4),b.add(T);const A=new _e(E,M);return A.position.set(0,0,-1.4),b.add(A),t.add(b),{body:i}}function b3e(t,e){const n=new at(1.5,1.2,2.8,32),r=new Oe({color:4674921,metalness:.6,roughness:.4}),i=new _e(n,r);i.position.y=0,i.castShadow=!0,t.add(i);const a=new at(1.2,.9,2.4,32),s=new Oe({color:1981023,metalness:.3,roughness:.7,transparent:!0,opacity:.8}),o=new _e(a,s);o.position.y=.1,t.add(o);const c=new kc(1,1.2,32),l=new Oe({color:3359061,metalness:.5,roughness:.5}),h=new _e(c,l);h.position.y=-1.6,h.castShadow=!0,t.add(h);const f=new at(.12,.12,1.5,12),m=new Oe({color:9741240,metalness:.9,roughness:.1}),g=new _e(f,m);g.position.set(0,2,0),g.castShadow=!0,t.add(g);const b=new zr(1.3,.08,8,32),y=new Oe({color:e.glow,metalness:.8,roughness:.2,emissive:e.emissive,emissiveIntensity:.4}),v=new _e(b,y);return v.rotation.x=Math.PI/2,v.position.y=1,v.name="overflow",t.add(v),{outer:i,overflow:v,inner:o}}function w3e(t,e){const n=new at(1,1.2,4.5,24),r=new Oe({color:5395026,metalness:.7,roughness:.3}),i=new _e(n,r);i.position.y=0,i.castShadow=!0,t.add(i);const a=new at(1.3,1.5,3.5,24),s=new Oe({color:7566195,metalness:.8,roughness:.2,transparent:!0,opacity:.4}),o=new _e(a,s);o.position.y=0,t.add(o);const c=new at(.8,1,.6,24),l=new Oe({color:4144966,metalness:.8,roughness:.2}),h=new _e(c,l);h.position.y=2.5,h.castShadow=!0,t.add(h);const f=new at(.6,.8,.5,24),m=new _e(f,l);m.position.y=-2.3,m.castShadow=!0,t.add(m);for(let y=0;y<4;y++){const v=new zr(1.25,.06,8,32),w=new Oe({color:10592682,metalness:.9,roughness:.1}),_=new _e(v,w);_.rotation.x=Math.PI/2,_.position.y=-1.2+y*.8,t.add(_)}const g=new zr(.6,.05,8,32,Math.PI*3.5),b=new Oe({color:16096779,metalness:.9,roughness:.1});for(let y=0;y<3;y++){const v=new _e(g,b);v.position.y=-.5+y*.6,v.rotation.x=Math.PI/2,v.name=`coil${y}`,t.add(v)}return{body:i}}function _3e(t,e){const n=new at(1.4,1.4,3.2,24),r=new Oe({color:6583435,metalness:.7,roughness:.3}),i=new _e(n,r);i.position.y=0,i.castShadow=!0,t.add(i);const a=new at(.8,.8,2.8,16),s=new Oe({color:9741240,metalness:.9,roughness:.1}),o=new _e(a,s);o.position.y=0,t.add(o);for(let b=0;b<8;b++){const y=new at(.08,.08,2.5,8),v=new Oe({color:16096779,metalness:.8,roughness:.2,emissive:16096779,emissiveIntensity:.2}),w=b/8*Math.PI*2,_=.5,E=new _e(y,v);E.position.set(Math.cos(w)*_,0,Math.sin(w)*_),E.name=`tube_${b}`,t.add(E)}const c=new at(.25,.25,1.5,16),l=new Oe({color:9741240,metalness:.9,roughness:.1}),h=new _e(c,l);h.position.y=2.1,h.castShadow=!0,t.add(h);const f=new cn(1.5,1,.8),m=new Oe({color:4674921,metalness:.7,roughness:.3}),g=new _e(f,m);return g.position.set(0,-2,1.2),g.castShadow=!0,t.add(g),{shell:i}}function S3e(t,e){const n=new cn(2.8,3,2.5),r=new Oe({color:7877903,metalness:.6,roughness:.5}),i=new _e(n,r);i.position.y=0,i.castShadow=!0,t.add(i);const a=new cn(2,2.2,1.5),s=new Oe({color:1841431,metalness:.4,roughness:.8}),o=new _e(a,s);o.position.set(0,-.2,.3),t.add(o);const c=new cn(1.6,1.6,.8),l=new Oe({color:16347926,metalness:.2,roughness:.8,emissive:15357964,emissiveIntensity:.8,transparent:!0,opacity:.9}),h=new _e(c,l);h.position.set(0,-.2,.5),h.name="fireGlow",t.add(h);const f=new at(.3,.4,2.5,16),m=new Oe({color:5722958,metalness:.5,roughness:.6}),g=new _e(f,m);g.position.set(.8,2.5,-.8),g.castShadow=!0,t.add(g);const b=new at(.35,.3,.4,16),y=new _e(b,m);y.position.set(.8,3.9,-.8),t.add(y);for(let E=0;E<3;E++){const M=new zr(1.45,.08,4,32),T=new Oe({color:9584654,metalness:.3,roughness:.9}),A=new _e(M,T);A.rotation.x=Math.PI/2,A.position.y=-.8+E*.8,t.add(A)}const v=new at(.12,.12,1.8,12),w=new Oe({color:6583435,metalness:.8,roughness:.2}),_=new _e(v,w);return _.rotation.z=Math.PI/2,_.position.set(0,-.5,1.4),t.add(_),{mainBody:i,fireGlow:h}}function M3e(t){const e=new Oe({color:3900150,metalness:.7,roughness:.2,transparent:!0,opacity:.8}),n=new at(.12,.12,2.2,12),r=new _e(n,e);r.rotation.z=Math.PI/2,r.position.set(-3.25,.5,0),t.add(r);const i=new at(.12,.12,2.2,12),a=new _e(i,e);a.rotation.z=Math.PI/2,a.position.set(.25,.3,0),t.add(a);const s=new at(.12,.12,2.2,12),o=new _e(s,e);o.rotation.z=Math.PI/2,o.position.set(3.75,.2,0),t.add(o);const c=new at(.1,.1,4,12),l=new _e(c,e);l.position.set(2,0,2),t.add(l);const h=new at(.1,.1,4,12),f=new _e(h,e);f.rotation.z=Math.PI/2,f.position.set(2,1.8,2),t.add(f);const m=new at(.1,.1,4,12),g=new _e(m,e);g.rotation.z=Math.PI/2,g.position.set(3.75,1.8,-2),t.add(g);const b=new at(.1,.1,4,12),y=new _e(b,e);y.position.set(3.75,.3,-2),t.add(y)}function E3e(){const[t,e]=O.useState(!0),[n,r]=O.useState(null),[i,a]=O.useState(0),[s,o]=O.useState(null),c=()=>{switch(console.log("renderTabContent called, activeTab:",l),l){case"factories":return d.jsxs("div",{className:"p-4 space-y-3 border-b border-slate-700",children:[d.jsx("div",{className:"text-center text-cyan-400 text-lg font-bold p-3 bg-cyan-500/20 rounded-lg mb-3",children:"🔧 工厂管理"}),d.jsxs("button",{type:"button",onClick:W,className:"w-full p-2 rounded-lg border border-dashed border-cyan-500/50 bg-cyan-500/5 hover:bg-cyan-500/10 text-cyan-400 text-sm font-medium flex items-center justify-center gap-2 transition-all",children:[d.jsx(jh,{className:"w-4 h-4"}),"创建新工厂"]}),D.map(H=>d.jsxs("div",{className:"p-3 rounded-lg border bg-slate-800/30 border-slate-700/50",children:[d.jsxs("div",{className:"flex items-center justify-between mb-1",children:[d.jsx("span",{className:"font-semibold text-white text-sm",children:H.name}),d.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${H.status==="active"?"bg-emerald-500/20 text-emerald-400":"bg-slate-500/20 text-slate-400"}`,children:H.status==="active"?"运行中":"离线"})]}),d.jsx("p",{className:"text-xs text-slate-400",children:H.location}),d.jsxs("div",{className:"flex gap-2 mt-1 text-xs text-slate-500",children:[d.jsxs("span",{children:["场景: ",H.sceneCount]}),d.jsxs("span",{children:["模型: ",H.modelCount]})]})]},H.id))]});case"scenes":return d.jsxs("div",{className:"p-4 space-y-3 border-b border-slate-700",children:[d.jsx("div",{className:"text-center text-green-400 text-lg font-bold p-3 bg-green-500/20 rounded-lg mb-3",children:"🏭 场景管理"}),d.jsxs("button",{type:"button",onClick:J,className:"w-full p-2 rounded-lg border border-dashed border-green-500/50 bg-green-500/5 hover:bg-green-500/10 text-green-400 text-sm font-medium flex items-center justify-center gap-2",children:[d.jsx(jh,{className:"w-4 h-4"}),"创建新场景"]}),y.map(H=>d.jsxs("div",{className:"p-3 rounded-lg border bg-slate-800/30 border-slate-700/50",children:[d.jsxs("div",{className:"flex items-center justify-between mb-1",children:[d.jsx("span",{className:"font-semibold text-white text-sm",children:H.name}),d.jsxs("span",{className:"text-xs text-slate-400",children:[H.deviceCount,"个设备"]})]}),d.jsx("p",{className:"text-xs text-slate-400",children:H.description})]},H.id))]});case"models":return d.jsxs("div",{className:"p-4 space-y-3 border-b border-slate-700",children:[d.jsx("div",{className:"text-center text-purple-400 text-lg font-bold p-3 bg-purple-500/20 rounded-lg mb-3",children:"📦 模型管理"}),d.jsx("input",{type:"file",accept:".glb,.gltf",onChange:Y,className:"hidden",id:"model-upload"}),d.jsxs("button",{type:"button",onClick:()=>{var H;return(H=document.getElementById("model-upload"))==null?void 0:H.click()},className:"w-full p-2 rounded-lg border border-dashed border-purple-500/50 bg-purple-500/5 hover:bg-purple-500/10 text-purple-400 text-sm font-medium flex items-center justify-center gap-2",children:[d.jsx(Dy,{className:"w-4 h-4"}),"上传3D模型"]}),g.map(H=>d.jsxs("div",{className:"p-3 rounded-lg border bg-slate-800/30 border-slate-700/50",children:[d.jsx("div",{className:"font-semibold text-white text-sm",children:H.name}),d.jsx("div",{className:"text-xs text-slate-400",children:H.deviceType})]},H.id))]});case"templates":return d.jsxs("div",{className:"p-4 space-y-3",children:[d.jsx("div",{className:"text-center text-orange-400 text-lg font-bold p-3 bg-orange-500/20 rounded-lg mb-3",children:"🎨 模板管理"}),w.map(H=>d.jsxs("div",{className:"p-3 rounded-lg border bg-slate-800/30 border-slate-700/50",children:[d.jsx("div",{className:"font-semibold text-white text-sm",children:H.name}),d.jsxs("div",{className:"text-xs text-slate-400",children:["类型: ",H.deviceType," | 温度: ",H.config.temperature,"°C"]})]},H.id))]});default:return null}},[l,h]=O.useState("scenes"),f=O.useRef(null),m=O.useRef(null),[g,b]=O.useState([{id:"1",name:"标准料浆罐",deviceType:"mixer",fileName:"slurry_tank_standard.glb",fileSize:"2.4 MB",uploadTime:"2027-03-15",vertices:15420,triangles:28350},{id:"2",name:"大型溶出釜",deviceType:"pressure",fileName:"pressure_vessel_large.glb",fileSize:"3.8 MB",uploadTime:"2027-03-12",vertices:28450,triangles:52100},{id:"3",name:"高效沉降槽",deviceType:"tank",fileName:"settling_tank_efficient.glb",fileSize:"1.9 MB",uploadTime:"2027-03-10",vertices:12300,triangles:21800},{id:"4",name:"分解塔标准型",deviceType:"tower",fileName:"tower_standard.glb",fileSize:"4.2 MB",uploadTime:"2027-03-08",vertices:35600,triangles:68400},{id:"5",name:"多效蒸发器",deviceType:"evaporator",fileName:"evaporator_multi.glb",fileSize:"2.7 MB",uploadTime:"2027-03-05",vertices:18900,triangles:34200},{id:"6",name:"高温焙烧炉",deviceType:"furnace",fileName:"calcination_furnace_hd.glb",fileSize:"5.1 MB",uploadTime:"2027-03-01",vertices:48200,triangles:92500}]),[y,v]=O.useState([{id:"1",name:"氧化铝生产车间A",description:"拜耳法生产工艺线",deviceCount:6,lastModified:"2027-03-20"},{id:"2",name:"烧结法生产车间",description:"烧结法氧化铝生产线",deviceCount:8,lastModified:"2027-03-18"},{id:"3",name:"综合加工厂",description:"综合氧化铝加工基地",deviceCount:12,lastModified:"2027-03-15"}]),[w,_]=O.useState([{id:"1",name:"标准料浆制备",deviceType:"mixer",config:{temperature:85,pressure:.3,flowRate:120}},{id:"2",name:"高压溶出配置",deviceType:"pressure",config:{temperature:260,pressure:4.5,flowRate:95}},{id:"3",name:"沉降分离配置",deviceType:"tank",config:{temperature:105,pressure:.5,flowRate:85}},{id:"4",name:"种子分解配置",deviceType:"tower",config:{temperature:75,pressure:.2,flowRate:65}},{id:"5",name:"蒸发浓缩配置",deviceType:"evaporator",config:{temperature:145,pressure:.4,flowRate:55}},{id:"6",name:"高温焙烧配置",deviceType:"furnace",config:{temperature:1200,pressure:.1,flowRate:45}}]),[E,M]=O.useState("1"),[T,A]=O.useState(null),[N,P]=O.useState(null),[R,F]=O.useState("mixer");O.useRef(null);const[D,L]=O.useState([{id:"1",name:"第一氧化铝厂",location:"辽宁省沈阳市",sceneCount:3,modelCount:12,status:"active",lastModified:"2027-03-20"},{id:"2",name:"第二氧化铝厂",location:"辽宁省辽阳市",sceneCount:2,modelCount:8,status:"active",lastModified:"2027-03-18"},{id:"3",name:"第三氧化铝厂",location:"内蒙古呼伦贝尔",sceneCount:4,modelCount:15,status:"warning",lastModified:"2027-03-15"},{id:"4",name:"综合加工厂",location:"辽宁省大连市",sceneCount:2,modelCount:6,status:"active",lastModified:"2027-03-10"}]),[q,I]=O.useState(null),[U,k]=O.useState(!1),V=O.useCallback(()=>{if(!f.current)return;const H=f.current,te=H.clientWidth,we=H.clientHeight,Ae=new yC;Ae.background=new en(790298),Ae.fog=new Ex(790298,18,40);const ne=new li(55,te/we,.1,100);ne.position.set(2,10,14),ne.lookAt(0,0,0);const de=new TC({antialias:!0,alpha:!0});de.setSize(te,we),de.setPixelRatio(Math.min(window.devicePixelRatio,2)),de.shadowMap.enabled=!0,de.shadowMap.type=sC,H.appendChild(de.domElement);const pe=new MC(4210784,.6);Ae.add(pe);const fe=new SC(16777215,1.2);fe.position.set(10,20,15),fe.castShadow=!0,fe.shadow.mapSize.width=2048,fe.shadow.mapSize.height=2048,fe.shadow.camera.near=.5,fe.shadow.camera.far=50,fe.shadow.camera.left=-20,fe.shadow.camera.right=20,fe.shadow.camera.top=20,fe.shadow.camera.bottom=-20,Ae.add(fe);const ce=new Sc(3900150,.8,25);ce.position.set(-5,5,5),Ae.add(ce);const Ce=new Sc(16347926,.5,20);Ce.position.set(5,3,-3),Ae.add(Ce);const ye=new EC(25,50,1981023,988970);ye.position.y=-2.5,Ae.add(ye);const Ze=new Map;let tt=null;DM.forEach(ie=>{const Ee=new Zn;Ee.position.set(...ie.position);const Pe=kM[ie.status];let ge={};switch(ie.icon){case"mixer":ge=y3e(Ee);break;case"pressure":ge=x3e(Ee);break;case"tank":ge=b3e(Ee,Pe);break;case"tower":ge=w3e(Ee);break;case"evaporator":ge=_3e(Ee);break;case"furnace":const vt=S3e(Ee);ge=vt,vt.fireGlow&&(tt=vt.fireGlow);break}const Xe=new bC(1.8,2,32),Le=new dl({color:Pe.glow,transparent:!0,opacity:.2,side:os}),ft=new _e(Xe,Le);ft.rotation.x=-Math.PI/2,ft.position.y=-2.3,Ee.add(ft);const nt=new nTe(new FG({opacity:0}));nt.position.y=3,nt.scale.set(3,1,1),nt.visible=!1,Ee.add(nt),Ze.set(ie.id,{group:Ee,components:ge}),Ae.add(Ee)}),M3e(Ae);let St=0,lt=!0;const kt=()=>{const ie=requestAnimationFrame(kt),Ee=Date.now()*.001;lt&&t&&(St+=.003,ne.position.x=Math.sin(St)*14,ne.position.z=Math.cos(St)*14,ne.position.y=10+Math.sin(Ee*.2)*2,ne.lookAt(0,0,0)),Ze.forEach(({group:Pe,components:ge},Xe)=>{const Le=DM.find(Fe=>Fe.id===Xe),ft=kM[Le.status],nt=Date.now()*.001,Ue=Math.sin(nt*2+Xe)*.5+.5;switch(Le.icon){case"mixer":{const Fe=ge.impeller;Fe&&(Fe.rotation.z+=.08);const ze=ge.shaft;ze&&(ze.rotation.z+=.05);const He=ge.body;if((He==null?void 0:He.material)instanceof Oe){const vt=.15+Math.sin(nt*3)*.1;He.material.emissive=new en(ft.emissive),He.material.emissiveIntensity=vt}break}case"pressure":{Pe.children.forEach(ze=>{if(ze.name&&ze.name.startsWith("ring")){const He=ze;if(He.material instanceof Oe){const vt=Math.sin(nt*4+parseInt(ze.name.replace("ring","")))*.5+.5;He.material.emissiveIntensity=.2+vt*.4}}});const Fe=1+Math.sin(nt*2)*.02;Pe.scale.set(Fe,1,Fe);break}case"tank":{const Fe=ge.overflow;(Fe==null?void 0:Fe.material)instanceof Oe&&(Fe.material.emissiveIntensity=.3+Math.sin(nt*1.5)*.3);const ze=ge.inner;ze&&(ze.position.y=.1+Math.sin(nt*.8)*.15);break}case"tower":{Pe.children.forEach(ze=>{if(ze.name&&ze.name.startsWith("coil")){const He=ze;He.rotation.z+=.015}});const Fe=Math.sin(nt*1.2)*.1;Pe.children.forEach(ze=>{if(ze instanceof _e&&ze.geometry.type==="CylinderGeometry"){const He=ze,vt=He.geometry;(vt.parameters.radiusTop===1||vt.parameters.radiusBottom===1.2)&&(He.position.y=Fe)}});break}case"evaporator":{Pe.children.forEach(ze=>{if(ze.name&&ze.name.startsWith("tube_")){const He=ze;if(He.material instanceof Oe){const vt=parseInt(ze.name.replace("tube_","")),ae=Math.sin(nt*3+vt*.5)*.5+.5;He.material.emissiveIntensity=.1+ae*.3}}});const Fe=ge.shell;(Fe==null?void 0:Fe.material)instanceof Oe&&(Fe.material.emissive=new en(16096779),Fe.material.emissiveIntensity=.05+Math.sin(nt*2)*.03);break}case"furnace":{if(tt){const He=.5+Math.sin(nt*5)*.3+Math.random()*.2+Math.sin(nt*13)*.1;tt.material instanceof Oe&&(tt.material.emissiveIntensity=He,tt.material.opacity=.7+Math.random()*.2);const vt=1+Math.sin(nt*8)*.1+Math.random()*.05;tt.scale.set(vt,1+Math.sin(nt*6)*.15,1)}const Fe=ge.mainBody;(Fe==null?void 0:Fe.material)instanceof Oe&&(Fe.material.emissive=new en(16347926),Fe.material.emissiveIntensity=.1+Math.sin(nt*2)*.05);break}}if(Le.status==="warning"){const Fe=Math.sin(nt*10)*.015;Pe.position.x=Le.position[0]+Fe}const ke=Pe.children.find(Fe=>{var ze;return((ze=Fe.geometry)==null?void 0:ze.type)==="RingGeometry"});(ke==null?void 0:ke.material)instanceof dl&&(ke.material.opacity=.15+Ue*.15)}),de.render(Ae,ne),m.current={scene:Ae,camera:ne,renderer:de,meshes:Ze,animationId:ie,fireGlow:tt}};kt();const re=()=>{if(!H||!m.current)return;const{camera:ie,renderer:Ee}=m.current,Pe=H.clientWidth,ge=H.clientHeight;ie.aspect=Pe/ge,ie.updateProjectionMatrix(),Ee.setSize(Pe,ge)};window.addEventListener("resize",re);let Ht=!1,Lt={x:0,y:0};const zt=ie=>{Ht=!0,Lt={x:ie.clientX,y:ie.clientY},lt=!1},qe=ie=>{if(!Ht)return;const Ee=ie.clientX-Lt.x,Pe=ie.clientY-Lt.y,{camera:ge}=m.current,Xe=new MTe;Xe.setFromVector3(ge.position),Xe.theta-=Ee*.005,Xe.phi-=Pe*.005,Xe.phi=Math.max(.1,Math.min(Math.PI-.1,Xe.phi)),ge.position.setFromSpherical(Xe),ge.lookAt(0,0,0),Lt={x:ie.clientX,y:ie.clientY}},Z=()=>{Ht=!1};H.addEventListener("mousedown",zt),H.addEventListener("mousemove",qe),H.addEventListener("mouseup",Z),H.addEventListener("mouseleave",Z);const z=ie=>{ie.preventDefault();const{camera:Ee}=m.current,Pe=Ee.position.length(),ge=Math.max(5,Math.min(30,Pe+ie.deltaY*.01));Ee.position.normalize().multiplyScalar(ge)};return H.addEventListener("wheel",z,{passive:!1}),()=>{window.removeEventListener("resize",re),H.removeEventListener("mousedown",zt),H.removeEventListener("mousemove",qe),H.removeEventListener("mouseup",Z),H.removeEventListener("mouseleave",Z),H.removeEventListener("wheel",z),m.current&&(cancelAnimationFrame(m.current.animationId),m.current.renderer.dispose(),H.removeChild(m.current.renderer.domElement))}},[t]);O.useEffect(()=>V(),[V]);const $=H=>{a(H),Ye.info(`已切换至${B8[H]}`,{duration:1500});const{camera:te}=m.current||{};if(te){switch(H){case 0:te.position.set(2,10,14);break;case 1:te.position.set(15,5,0);break;case 2:te.position.set(0,18,.1);break}te.lookAt(0,0,0)}},Y=H=>{var de,pe;const te=(de=H.target.files)==null?void 0:de[0];if(!te)return;const we=(pe=te.name.split(".").pop())==null?void 0:pe.toLowerCase();if(!["glb","gltf"].includes(we||"")){Ye.error("仅支持 GLB/GLTF 格式的3D模型文件",{duration:2e3});return}if(te.size>50*1024*1024){Ye.error("文件大小不能超过 50MB",{duration:2e3});return}const Ae=(te.size/(1024*1024)).toFixed(1),ne={id:Date.now().toString(),name:te.name.replace(/\.(glb|gltf)$/i,"").replace(/_/g," "),deviceType:"mixer",fileName:te.name,fileSize:`${Ae} MB`,uploadTime:new Date().toISOString().split("T")[0],vertices:15e3,triangles:35e3};b(fe=>[ne,...fe]),Ye.success(`模型 "${ne.name}" 上传成功`,{duration:2e3})},J=()=>{const H={id:Date.now().toString(),name:`新场景 ${y.length+1}`,description:"新建生产场景",deviceCount:0,lastModified:new Date().toISOString().split("T")[0]};v(te=>[H,...te]),M(H.id),Ye.success(`场景 "${H.name}" 创建成功`,{duration:2e3})},W=()=>{console.log("创建工厂被点击");const H={id:Date.now().toString(),name:`新建工厂 ${D.length+1}`,location:"待设置",sceneCount:0,modelCount:0,status:"offline",lastModified:new Date().toISOString().split("T")[0]};L(te=>[H,...te]),I(H.id),Ye.success(`工厂 "${H.name}" 创建成功`,{duration:2e3})};return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsx(B.div,{className:"p-6 border-b border-slate-700/50",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:"p-3 rounded-xl bg-gradient-to-br from-orange-500/20 to-red-500/20 border border-orange-500/30",children:d.jsx(Zu,{className:"w-6 h-6 text-orange-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white",children:"氧化铝数字孪生制作系统"}),d.jsx("p",{className:"text-sm text-slate-400",children:"生产工艺全流程3D可视化监控"})]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-emerald-500/20 border border-emerald-500/30",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 animate-pulse"}),d.jsx("span",{className:"text-sm text-emerald-400 font-medium",children:"实时同步"})]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.info("全屏模式开发中",{duration:1500}),className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 flex items-center gap-2 border border-slate-700/50",children:[d.jsx(Jh,{className:"w-4 h-4"}),"全屏"]})]})]})}),d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("div",{className:"flex-1 relative",children:[d.jsx("div",{ref:f,className:"absolute inset-0"}),d.jsx("div",{className:"absolute top-4 left-4 flex flex-col gap-2",children:d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>e(!t),className:`px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2 transition-all ${t?"bg-emerald-500/20 text-emerald-400 border border-emerald-500/30":"bg-slate-800/50 text-slate-300 border border-slate-700/50"}`,children:[t?d.jsx(Qp,{className:"w-4 h-4"}):d.jsx(Wd,{className:"w-4 h-4"}),t?"暂停旋转":"自动旋转"]})}),d.jsx("div",{className:"absolute top-4 right-4 flex flex-col gap-2",children:B8.map((H,te)=>d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>$(te),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${i===te?"bg-cyan-500/20 text-cyan-400 border border-cyan-500/30":"bg-slate-800/50 text-slate-400 hover:text-white border border-slate-700/50"}`,children:H},H))}),d.jsxs("div",{className:"absolute bottom-4 left-1/2 transform -translate-x-1/2 flex gap-2 bg-slate-900/80 backdrop-blur-sm p-2 rounded-xl border border-slate-700/50",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.info("缩放功能:滚轮调整",{duration:1500}),className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 flex items-center gap-2",children:[d.jsx(DB,{className:"w-4 h-4"}),"缩放"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.success("场景截图已保存",{duration:1500}),className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 flex items-center gap-2",children:[d.jsx(Gd,{className:"w-4 h-4"}),"截图"]})]}),d.jsx("div",{className:"absolute bottom-4 right-4 text-xs text-slate-500 bg-slate-900/60 px-2 py-1 rounded",children:"拖拽旋转 | 滚轮缩放 | 点击设备查看详情"}),d.jsx("div",{className:"absolute bottom-20 left-4 right-80",children:d.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:DM.map(H=>{const te=kM[H.status];return d.jsxs("div",{className:"flex-shrink-0 px-3 py-2 rounded-lg bg-slate-900/90 backdrop-blur-sm border border-slate-700/50 min-w-[100px]",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx("div",{className:"w-2 h-2 rounded-full animate-pulse",style:{backgroundColor:"#"+te.main.toString(16).padStart(6,"0")}}),d.jsx("span",{className:"text-xs text-white font-medium",children:H.name})]}),d.jsxs("div",{className:"flex gap-3 text-[10px] text-slate-400",children:[d.jsxs("span",{children:[H.temperature,"°C"]}),d.jsx("span",{children:H.pressure}),d.jsx("span",{children:H.flowRate})]})]},H.id)})})})]}),d.jsxs(B.div,{className:"w-80 border-l border-slate-700/50 bg-slate-900/50 backdrop-blur-sm flex flex-col",initial:{x:50,opacity:0},animate:{x:0,opacity:1},transition:{delay:.3},children:[d.jsxs("div",{className:"p-4 border-b border-slate-700/50",children:[d.jsx("div",{className:"flex items-center justify-between mb-3",children:d.jsxs("h2",{className:"text-sm font-semibold text-white flex items-center gap-2",children:[d.jsx(jh,{className:"w-4 h-4 text-cyan-400"}),"场景与模型管理"]})}),d.jsxs("div",{className:"flex gap-1 bg-slate-800/50 p-1 rounded-lg",children:[d.jsx("button",{type:"button",onClick:()=>h("scenes"),className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${l==="scenes"?"bg-cyan-500/30 text-cyan-400":"text-slate-400 hover:text-white"}`,children:"场景"}),d.jsx("button",{type:"button",onClick:()=>h("models"),className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${l==="models"?"bg-cyan-500/30 text-cyan-400":"text-slate-400 hover:text-white"}`,children:"模型"}),d.jsx("button",{type:"button",onClick:()=>h("factories"),className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${l==="factories"?"bg-cyan-500/30 text-cyan-400":"text-slate-400 hover:text-white"}`,children:"工厂"}),d.jsx("button",{type:"button",onClick:()=>h("templates"),className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${l==="templates"?"bg-cyan-500/30 text-cyan-400":"text-slate-400 hover:text-white"}`,children:"模板"})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto",style:{minHeight:"200px"},children:d.jsxs("div",{className:"p-2",children:[d.jsxs("div",{className:"text-center text-xs text-cyan-400 mb-2",children:["当前: ",l]}),c()]})})]})]})]})}const z8=[{name:"钢铁-炼铁工序",status:"online",rate:99.8,lastSync:"2秒前"},{name:"钢铁-炼钢工序",status:"online",rate:99.9,lastSync:"1秒前"},{name:"钢铁-连铸工序",status:"online",rate:99.7,lastSync:"3秒前"},{name:"有色-氧化铝工序",status:"online",rate:99.6,lastSync:"2秒前"},{name:"有色-电解铝工序",status:"warning",rate:95.2,lastSync:"15秒前"},{name:"质检图像采集",status:"online",rate:98.5,lastSync:"5秒前"}],LM=[{name:"文本数据",value:3e3,color:"#3b82f6"},{name:"图像数据",value:4e3,color:"#8b5cf6"},{name:"视频数据",value:2e3,color:"#ec4899"},{name:"时序数据",value:800,color:"#10b981"},{name:"音频数据",value:200,color:"#f59e0b"}],T3e=[{time:"10:00",text:1200,image:800,video:400,timeseries:1500},{time:"10:15",text:1350,image:900,video:450,timeseries:1600},{time:"10:30",text:1500,image:1e3,video:500,timeseries:1700},{time:"10:45",text:1400,image:950,video:480,timeseries:1650},{time:"11:00",text:1600,image:1100,video:550,timeseries:1800}],A3e=[{label:"数据完整率",value:98.5,target:95},{label:"采集成功率",value:99.2,target:99},{label:"清洗准确率",value:97.8,target:95},{label:"标注覆盖率",value:94.3,target:90}],N3e=[{id:1,name:"数据采集",icon:vl,status:"active",progress:100,speed:"2.4K/s",color:"#3b82f6"},{id:2,name:"数据清洗",icon:sd,status:"active",progress:85,speed:"2.1K/s",color:"#8b5cf6"},{id:3,name:"格式转换",icon:Qr,status:"active",progress:70,speed:"1.8K/s",color:"#ec4899"},{id:4,name:"质量校验",icon:Cr,status:"pending",progress:45,speed:"1.2K/s",color:"#10b981"},{id:5,name:"数据存储",icon:vl,status:"pending",progress:20,speed:"0.8K/s",color:"#f59e0b"}],$8=[{id:1,type:"text",size:4,delay:0},{id:2,type:"image",size:6,delay:.3},{id:3,type:"video",size:8,delay:.6},{id:4,type:"timeseries",size:5,delay:.9},{id:5,type:"audio",size:3,delay:1.2}];function P3e(){const[t,e]=O.useState(z8[0]),[n,r]=O.useState({text:1600,image:1100,video:550,timeseries:1800}),[i,a]=O.useState(N3e),[s,o]=O.useState(null),[c,l]=O.useState([]),h=O.useRef(null);return O.useRef(null),O.useEffect(()=>{const f=setInterval(()=>{r({text:Math.floor(1400+Math.random()*400),image:Math.floor(900+Math.random()*300),video:Math.floor(450+Math.random()*150),timeseries:Math.floor(1600+Math.random()*400)})},3e3);return()=>clearInterval(f)},[]),O.useEffect(()=>{const m=setInterval(()=>{const g={id:Date.now(),stepId:Math.floor(Math.random()*4)+1,x:0,y:30+Math.random()*40,type:["text","image","video","timeseries"][Math.floor(Math.random()*4)]};l(b=>[...b.slice(-30),g])},200);return()=>clearInterval(m)},[]),d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"多模态数据采集与预处理系统"}),d.jsx("p",{className:"text-sm text-slate-400",children:"覆盖钢铁与有色冶金全流程的数据采集体系"})]}),d.jsxs(B.div,{animate:{boxShadow:["0 0 20px rgba(16, 185, 129, 0.3)","0 0 40px rgba(16, 185, 129, 0.5)","0 0 20px rgba(16, 185, 129, 0.3)"]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-green-500/10 border border-green-500/30",children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:1.5,repeat:1/0},className:"w-2 h-2 bg-green-500 rounded-full"}),d.jsx("span",{className:"text-sm text-green-400",children:"实时采集中"})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[{icon:Mc,label:"文本数据",value:n.text,unit:"条/min",color:"from-blue-500 to-cyan-500"},{icon:oY,label:"图像数据",value:n.image,unit:"张/min",color:"from-purple-500 to-pink-500"},{icon:oZ,label:"视频数据",value:n.video,unit:"帧/min",color:"from-pink-500 to-rose-500"},{icon:yr,label:"时序数据",value:n.timeseries,unit:"点/min",color:"from-green-500 to-emerald-500"},{icon:vY,label:"音频数据",value:120,unit:"段/min",color:"from-orange-500 to-red-500"}].map((f,m)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:m*.1},whileHover:{scale:1.05,y:-5},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-4",children:[d.jsx("div",{className:`absolute top-0 right-0 w-24 h-24 bg-gradient-to-br ${f.color} opacity-10 rounded-full blur-2xl`}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:`w-10 h-10 rounded-lg bg-gradient-to-br ${f.color} flex items-center justify-center mb-2`,children:d.jsx(f.icon,{className:"w-5 h-5 text-white"})}),d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:f.label}),d.jsxs("div",{className:"flex items-baseline gap-1",children:[d.jsx(B.span,{initial:{scale:1.2,color:"#10b981"},animate:{scale:1,color:"#ffffff"},className:"text-xl font-bold text-white",children:f.value},f.value),d.jsx("span",{className:"text-xs text-slate-500",children:f.unit})]})]})]},f.label))}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"实时数据流监控"}),d.jsx(Ci,{width:"100%",height:250,children:d.jsxs(hP,{data:T3e,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"dataCollectionTextGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"#3b82f6",stopOpacity:.3}),d.jsx("stop",{offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]}),d.jsxs("linearGradient",{id:"dataCollectionImageGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"#8b5cf6",stopOpacity:.3}),d.jsx("stop",{offset:"95%",stopColor:"#8b5cf6",stopOpacity:0})]})]}),d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"time",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),d.jsx(ms,{}),d.jsx(wa,{type:"monotone",dataKey:"text",name:"文本",stroke:"#3b82f6",fill:"url(#dataCollectionTextGradient)"}),d.jsx(wa,{type:"monotone",dataKey:"image",name:"图像",stroke:"#8b5cf6",fill:"url(#dataCollectionImageGradient)"})]})})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"数据源状态监控"}),d.jsx("div",{className:"space-y-3",children:z8.map((f,m)=>d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.7+m*.05},whileHover:{scale:1.02},onClick:()=>e(f),className:`p-4 rounded-lg cursor-pointer transition-all ${t.name===f.name?"bg-blue-900/30 border-2 border-blue-500/50":"bg-slate-800/50 border border-slate-700/50 hover:border-slate-600/50"}`,children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[f.status==="online"?d.jsx(iv,{className:"w-5 h-5 text-green-400"}):d.jsx(OB,{className:"w-5 h-5 text-yellow-400"}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium text-white",children:f.name}),d.jsxs("div",{className:"text-xs text-slate-400",children:["最后同步: ",f.lastSync]})]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("div",{className:"text-right",children:[d.jsxs("div",{className:"text-sm font-semibold text-white",children:[f.rate,"%"]}),d.jsx("div",{className:"text-xs text-slate-400",children:"采集率"})]}),f.status==="online"?d.jsx(Cr,{className:"w-5 h-5 text-green-400"}):d.jsx(Yh,{className:"w-5 h-5 text-yellow-400"})]})]}),d.jsx("div",{className:"mt-2 w-full h-1.5 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${f.rate}%`},transition:{duration:1,delay:.5},className:`h-full ${f.status==="online"?"bg-green-500":"bg-yellow-500"}`})})]},f.name))})]})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.5},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"数据质量看板"}),d.jsx("div",{className:"space-y-4",children:A3e.map((f,m)=>d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center mb-2",children:[d.jsx("span",{className:"text-sm text-slate-300",children:f.label}),d.jsxs("span",{className:`text-sm font-semibold ${f.value>=f.target?"text-green-400":"text-yellow-400"}`,children:[f.value,"%"]})]}),d.jsx("div",{className:"w-full h-2 bg-slate-800 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${f.value}%`},transition:{delay:.7+m*.1,duration:1},className:`h-full ${f.value>=f.target?"bg-gradient-to-r from-green-500 to-emerald-500":"bg-gradient-to-r from-yellow-500 to-orange-500"}`})})]},f.label))})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.6},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"数据类型分布"}),d.jsx(Ci,{width:"100%",height:200,children:d.jsxs(v$,{children:[d.jsx(js,{data:LM,cx:"50%",cy:"50%",outerRadius:80,fill:"#8884d8",dataKey:"value",label:!0,children:LM.map((f,m)=>d.jsx(rm,{fill:f.color},`cell-${m}`))}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}})]})}),d.jsx("div",{className:"mt-4 grid grid-cols-2 gap-2",children:LM.map(f=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 rounded",style:{backgroundColor:f.color}}),d.jsx("span",{className:"text-xs text-slate-400",children:f.name})]},f.name))})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.7},ref:h,className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"预处理流水线"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},className:"w-4 h-4 rounded-full border-2 border-cyan-500 border-t-transparent"}),d.jsx("span",{className:"text-xs text-cyan-400",children:"实时运行中"})]})]}),d.jsxs("div",{className:"relative overflow-hidden rounded-xl bg-slate-950/50 p-4 mb-4",children:[d.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-10",children:[d.jsx("defs",{children:d.jsx("pattern",{id:"pipelineGrid",width:"10",height:"10",patternUnits:"userSpaceOnUse",children:d.jsx("path",{d:"M 10 0 L 0 0 0 10",fill:"none",stroke:"rgba(6, 182, 212, 0.3)",strokeWidth:"0.5"})})}),d.jsx("rect",{width:"100%",height:"100%",fill:"url(#pipelineGrid)"})]}),d.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:c.map(f=>{var m;return d.jsx(B.div,{initial:{left:"0%",opacity:0},animate:{left:"100%",opacity:[0,1,1,0]},transition:{duration:2,ease:"linear"},className:"absolute w-1.5 h-1.5 rounded-full",style:{top:`${f.y}%`,backgroundColor:(m=$8.find(g=>g.type===f.type))!=null&&m.size?["#3b82f6","#8b5cf6","#ec4899","#10b981"][$8.findIndex(g=>g.type===f.type)%4]:"#06b6d4"}},f.id)})}),d.jsx("div",{className:"relative flex items-center justify-between",children:i.map((f,m)=>{const g=s===f.id,b=f.status==="completed";return f.status,d.jsxs(B.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:.8+m*.1},onMouseEnter:()=>o(f.id),onMouseLeave:()=>o(null),className:"relative z-10",children:[d.jsxs(B.div,{whileHover:{scale:1.05},animate:{scale:g?1.1:1,boxShadow:[`0 0 ${g?30:15}px ${f.color}40`]},className:`relative w-20 h-20 rounded-xl bg-slate-900/80 border-2 flex flex-col items-center justify-center cursor-pointer transition-all ${b?"border-green-500":g?"border-cyan-400":"border-slate-700"}`,style:{borderColor:g?f.color:void 0},children:[d.jsx(B.div,{animate:g?{scale:[1,1.3,1]}:{},transition:{duration:1,repeat:1/0},className:`absolute -top-1 -right-1 w-4 h-4 rounded-full flex items-center justify-center ${b?"bg-green-500":g?"bg-cyan-400":"bg-slate-600"}`,children:b?d.jsx(Cr,{className:"w-3 h-3 text-white"}):g?d.jsx(Qr,{className:"w-3 h-3 text-white"}):null}),d.jsx(f.icon,{className:"w-6 h-6 mb-1",style:{color:f.color}}),d.jsx("span",{className:"text-xs text-white font-medium",children:f.name})]}),d.jsxs("div",{className:"mt-2",children:[d.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[d.jsx("span",{className:"text-slate-400",children:"进度"}),d.jsxs("span",{style:{color:f.color},children:[f.progress,"%"]})]}),d.jsx("div",{className:"w-20 h-1.5 bg-slate-800 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${f.progress}%`},transition:{duration:1,delay:1+m*.1},className:"h-full rounded-full",style:{backgroundColor:f.color}})})]}),d.jsx("div",{className:"mt-1 text-xs text-slate-500 text-center",children:f.speed}),m<i.length-1&&d.jsx("div",{className:"absolute top-10 left-full w-full flex items-center justify-center z-20",children:d.jsxs(B.div,{animate:{x:[0,5,0],opacity:[.3,1,.3]},transition:{duration:1,repeat:1/0},className:"flex items-center",children:[d.jsx(_h,{className:"w-4 h-4 text-cyan-400"}),d.jsx(B.div,{animate:{width:[4,12,4],opacity:[.5,1,.5]},transition:{duration:.8,repeat:1/0},className:"h-0.5 -ml-2 rounded-full bg-gradient-to-r from-cyan-400 to-transparent"})]})}),d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:g?1:0,y:g?0:10},className:"absolute top-full mt-2 left-1/2 -translate-x-1/2 px-3 py-2 rounded-lg bg-slate-900/95 border border-slate-700/50 backdrop-blur-sm whitespace-nowrap",children:[d.jsxs("div",{className:"text-xs text-slate-400 mb-1",children:["处理速度: ",f.speed]}),d.jsxs("div",{className:"text-xs text-slate-400",children:["状态: ",f.status==="active"?"处理中":f.status==="completed"?"已完成":"等待中"]})]})]},f.id)})}),d.jsxs("div",{className:"mt-4 flex items-center justify-between px-3 py-2 rounded-lg bg-slate-900/80 border border-slate-800/50",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),d.jsx("span",{className:"text-xs text-slate-400",children:"运行正常"})]}),d.jsx("div",{className:"text-xs text-slate-500",children:"|"}),d.jsxs("div",{className:"text-xs text-slate-400",children:["总吞吐量: ",d.jsx("span",{className:"text-cyan-400",children:"8.5K/s"})]})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx(yr,{className:"w-3 h-3 text-green-400"}),d.jsx("span",{className:"text-xs text-green-400",children:"延迟: 23ms"})]})]})]}),d.jsx("div",{className:"grid grid-cols-5 gap-2",children:i.map((f,m)=>d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:1+m*.1},onClick:()=>o(s===f.id?null:f.id),className:`p-3 rounded-lg cursor-pointer transition-all text-center ${s===f.id?"bg-slate-800/80 border border-cyan-500/30":"bg-slate-800/50 border border-slate-700/50 hover:border-slate-600/50"}`,children:[d.jsx("div",{className:"w-8 h-8 rounded-lg mx-auto mb-2 flex items-center justify-center",style:{backgroundColor:`${f.color}20`},children:d.jsx(f.icon,{className:"w-4 h-4",style:{color:f.color}})}),d.jsx("div",{className:"text-xs text-white font-medium mb-1",children:f.name}),d.jsxs("div",{className:"text-xs",style:{color:f.color},children:[f.progress,"%"]})]},f.id))})]})]})]})]})}const FM=[{id:1,name:"炼铁工序",standards:45,completion:100},{id:2,name:"炼钢工序",standards:38,completion:100},{id:3,name:"连铸工序",standards:32,completion:95},{id:4,name:"热轧工序",standards:28,completion:90}],V8=[{id:1,name:"料浆制备",standards:18,completion:100},{id:2,name:"溶出工序",standards:22,completion:100},{id:3,name:"沉降洗涤",standards:20,completion:95},{id:4,name:"种子分解",standards:25,completion:100},{id:5,name:"母液蒸发",standards:15,completion:90},{id:6,name:"氢氧化铝焙烧",standards:19,completion:100}],C3e=[{dataItem:"铁水温度",dataType:"数值型",frequency:"实时",quality:"±5°C",department:"炼铁厂"},{dataItem:"碳含量",dataType:"数值型",frequency:"实时",quality:"±0.02%",department:"炼钢厂"},{dataItem:"结晶器液位",dataType:"数值型",frequency:"实时",quality:"±2mm",department:"连铸厂"},{dataItem:"轧制温度",dataType:"数值型",frequency:"实时",quality:"±10°C",department:"热轧厂"},{dataItem:"铝硅比A/S",dataType:"数值型",frequency:"每小时",quality:"±0.1",department:"氧化铝厂"},{dataItem:"配碱量",dataType:"数值型",frequency:"每批次",quality:"±2kg/t",department:"氧化铝厂"}];function R3e(){const[t,e]=O.useState("steel"),[n,r]=O.useState(FM[0]),[i,a]=O.useState({total:0,implemented:0,inProgress:0,coverage:0}),[s,o]=O.useState(0),c=t==="steel"?FM:V8;return O.useEffect(()=>{const l={total:t==="steel"?256:156,implemented:t==="steel"?243:148,inProgress:t==="steel"?13:8,coverage:t==="steel"?10:6},h=1e3,f=30,m=h/f;let g=0;const b=setInterval(()=>{g++;const y=g/f,v=1-Math.pow(1-y,3);a({total:Math.round(l.total*v),implemented:Math.round(l.implemented*v),inProgress:Math.round(l.inProgress*v),coverage:Math.round(l.coverage*v)}),g>=f&&(clearInterval(b),a(l))},m);return()=>clearInterval(b)},[t]),O.useEffect(()=>{const l=setInterval(()=>{o(h=>(h+1)%c.length)},2e3);return()=>clearInterval(l)},[c.length]),d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"数据治理标准规范"}),d.jsx("p",{className:"text-sm text-slate-400",children:"钢铁与有色冶金行业全流程数据治理标准体系"})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.promise(new Promise(l=>setTimeout(l,2e3)),{loading:"正在导出标准文件...",success:"标准导出成功!",error:"导出失败"})},className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white text-sm font-medium transition-colors flex items-center gap-2",children:[d.jsx(Fc,{className:"w-4 h-4"}),"导出标准"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.promise(new Promise(l=>setTimeout(l,2e3)),{loading:"正在导入标准文件...",success:"标准导入成功!",error:"导入失败"})},className:"px-4 py-2 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white text-sm font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center gap-2",children:[d.jsx(Dy,{className:"w-4 h-4"}),"导入标准"]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex gap-4",children:[d.jsx("button",{onClick:()=>{e("steel"),r(FM[0])},className:`flex-1 py-4 rounded-xl transition-all ${t==="steel"?"bg-gradient-to-br from-blue-900/50 to-purple-900/50 border-2 border-blue-500/50":"bg-slate-900/50 border border-slate-800/50 hover:border-slate-700/50"}`,children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"text-2xl mb-2",children:"🏭"}),d.jsx("div",{className:"text-lg font-semibold text-white",children:"钢铁行业"}),d.jsx("div",{className:"text-sm text-slate-400 mt-1",children:"炼铁-炼钢-连铸-热轧"})]})}),d.jsx("button",{onClick:()=>{e("aluminum"),r(V8[0])},className:`flex-1 py-4 rounded-xl transition-all ${t==="aluminum"?"bg-gradient-to-br from-blue-900/50 to-purple-900/50 border-2 border-blue-500/50":"bg-slate-900/50 border border-slate-800/50 hover:border-slate-700/50"}`,children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"text-2xl mb-2",children:"⚗️"}),d.jsx("div",{className:"text-lg font-semibold text-white",children:"有色冶金"}),d.jsx("div",{className:"text-sm text-slate-400 mt-1",children:"氧化铝-电解铝全流程"})]})})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:8,repeat:1/0,ease:"linear"},children:d.jsx(yr,{className:"w-5 h-5 text-blue-400"})}),"工序数据标准"]}),d.jsxs(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 text-xs text-slate-400",children:[d.jsx(_s,{className:"w-3 h-3"}),d.jsx("span",{children:"数据实时更新"})]})]}),d.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none rounded-xl",children:[...Array(5)].map((l,h)=>d.jsx(B.div,{className:"absolute h-0.5 bg-gradient-to-r from-transparent via-blue-500/20 to-transparent",initial:{left:"-30%",top:`${20+h*15}%`,width:"15%"},animate:{left:"100%"},transition:{duration:4+h*.5,repeat:1/0,delay:h*.3,ease:"linear"}},h))}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 relative",children:c.map((l,h)=>d.jsxs(B.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.3+h*.05},whileHover:{scale:1.05,y:-5},onClick:()=>r(l),className:`relative overflow-hidden rounded-lg p-4 cursor-pointer transition-all ${n.id===l.id?"bg-gradient-to-br from-blue-900/50 to-purple-900/50 border-2 border-blue-500/50":"bg-slate-800/50 border border-slate-700/50 hover:border-slate-600/50"}`,children:[d.jsx(B.div,{className:"absolute top-2 left-2",animate:n.id===l.id?{scale:[1,1.2,1],opacity:[.5,1,.5]}:{},transition:{duration:1.5,repeat:1/0},children:d.jsx("div",{className:`w-2 h-2 rounded-full ${n.id===l.id?"bg-blue-400":"bg-slate-600"}`})}),d.jsx("div",{className:"absolute top-2 right-2",children:l.completion===100?d.jsx(B.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:300},children:d.jsx(tv,{className:"w-5 h-5 text-green-400"})}):d.jsxs(B.div,{animate:{scale:[1,1.1,1]},transition:{duration:1.5,repeat:1/0},className:"px-2 py-0.5 rounded-full bg-yellow-500/20 text-xs text-yellow-400",children:[l.completion,"%"]})}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-semibold text-white mb-2",children:l.name}),d.jsxs("div",{className:"text-xs text-slate-400 mb-2",children:[l.standards," 项标准"]}),d.jsx("div",{className:"w-full h-1.5 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${l.completion}%`},transition:{duration:1,delay:.5},className:`h-full rounded-full relative ${l.completion===100?"bg-gradient-to-r from-green-500 to-emerald-500":"bg-gradient-to-r from-yellow-500 to-orange-500"}`,children:d.jsx(B.div,{className:"absolute inset-0 bg-white/30",animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}})})})]})]},l.id))})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"数据元数据管理"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"当前工序:"}),d.jsx("span",{className:"text-sm font-semibold text-blue-400",children:n.name})]})]}),d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-slate-800",children:[d.jsx("th",{className:"text-left py-3 px-4 text-sm font-semibold text-slate-300",children:"数据项"}),d.jsx("th",{className:"text-left py-3 px-4 text-sm font-semibold text-slate-300",children:"数据类型"}),d.jsx("th",{className:"text-left py-3 px-4 text-sm font-semibold text-slate-300",children:"采集频率"}),d.jsx("th",{className:"text-left py-3 px-4 text-sm font-semibold text-slate-300",children:"质量要求"}),d.jsx("th",{className:"text-left py-3 px-4 text-sm font-semibold text-slate-300",children:"责任部门"}),d.jsx("th",{className:"text-center py-3 px-4 text-sm font-semibold text-slate-300",children:"操作"})]})}),d.jsx("tbody",{children:C3e.map((l,h)=>d.jsxs(B.tr,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.5+h*.05},className:"border-b border-slate-800/50 hover:bg-slate-800/30 transition-colors",children:[d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:l.dataItem}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-300",children:l.dataType}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-300",children:l.frequency}),d.jsx("td",{className:"py-3 px-4",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-xs text-green-400",children:l.quality})}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-300",children:l.department}),d.jsx("td",{className:"py-3 px-4",children:d.jsxs("div",{className:"flex items-center justify-center gap-2",children:[d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>Ye.info(`正在编辑标准: ${l.dataItem}`,{duration:1500}),className:"p-1.5 rounded hover:bg-slate-700 transition-colors",children:d.jsx(EY,{className:"w-4 h-4 text-slate-400"})}),d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>Ye.success(`标准 "${l.dataItem}" 审核通过!`,{duration:1500}),className:"p-1.5 rounded hover:bg-slate-700 transition-colors",children:d.jsx(JK,{className:"w-4 h-4 text-slate-400"})})]})})]},h))})]})})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[{icon:bK,label:"总标准数",value:i.total,color:"from-blue-500 to-cyan-500"},{icon:tv,label:"已实施",value:i.implemented,color:"from-green-500 to-emerald-500"},{icon:sd,label:"制定中",value:i.inProgress,color:"from-yellow-500 to-orange-500"},{icon:vl,label:"覆盖工序",value:i.coverage,color:"from-purple-500 to-pink-500"}].map((l,h)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6+h*.1},whileHover:{scale:1.05,boxShadow:"0 0 30px rgba(59, 130, 246, 0.2)"},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("div",{className:`absolute top-0 right-0 w-24 h-24 bg-gradient-to-br ${l.color} opacity-10 rounded-full blur-2xl`}),d.jsx(B.div,{className:"absolute -top-2 -right-2 w-16 h-16 opacity-20",animate:{rotate:360},transition:{duration:20,repeat:1/0,ease:"linear"},children:d.jsx("div",{className:`w-full h-full bg-gradient-to-br ${l.color} rounded-full blur-xl`})}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:`w-12 h-12 rounded-lg bg-gradient-to-br ${l.color} flex items-center justify-center mb-3`,children:d.jsx(l.icon,{className:"w-6 h-6 text-white"})}),d.jsx("div",{className:"text-sm text-slate-400 mb-1",children:l.label}),d.jsx(B.div,{initial:{scale:1.2,opacity:.5},animate:{scale:1,opacity:1},className:"text-3xl font-bold text-white",children:l.value},l.value),d.jsxs(B.div,{className:"mt-2 flex items-center gap-1 text-xs text-slate-500",animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},children:[d.jsx(Ni,{className:"w-3 h-3"}),d.jsx("span",{children:"实时更新"})]})]})]},l.label))})]})}const UM=[{id:1,name:"高炉故障诊断标准Prompt",category:"故障诊断",description:"用于高炉故障诊断的标准提示词模板",content:`你是一位钢铁行业的资深工程师,擅长高炉故障诊断。
请根据以下症状分析可能的原因:
**实时参数:**
- 炉温:{temperature}
- 水温差:{water_temp_diff}
- 料位:{material_level}
- 风量:{air_volume}
**诊断要求:**
1. 分析当前炉况是否正常
2. 识别潜在风险
3. 给出具体建议
4. 提供预防措施`,variables:["temperature","water_temp_diff","material_level","air_volume"],usage:1245},{id:2,name:"工艺优化建议Prompt",category:"工艺优化",description:"氧化铝工艺参数优化建议生成模板",content:`你是有色冶金领域的工艺专家,专注于氧化铝生产优化。
**当前工况:**
- 铝硅比 A/S{alumina_silica_ratio}
- 配碱量:{alkali_dosage}
- 溶出率:{dissolution_rate}
- 能耗:{energy_consumption}
**优化目标:**
{optimization_target}
请提供:
1. 当前工况分析
2. 优化建议
3. 预期效果
4. 风险评估`,variables:["alumina_silica_ratio","alkali_dosage","dissolution_rate","energy_consumption","optimization_target"],usage:892},{id:3,name:"质量分析标准Prompt",category:"质量分析",description:"产品质量异常分析模板",content:`你是质量管理专家,负责钢铁产品质量溯源分析。
**产品信息:**
- 批号:{batch_number}
- 质量异常:{quality_issue}
- 发现工序:{discovery_stage}
**分析任务:**
1. 溯源可能的问题工序
2. 分析根本原因
3. 提供改进措施
4. 给出预防建议
请基于历史数据和知识图谱进行深度分析。`,variables:["batch_number","quality_issue","discovery_stage"],usage:567}],j3e=["全部","故障诊断","工艺优化","质量分析","人机协同"];function O3e({text:t}){const e=/\{([^}]+)\}/g,n=[];let r=0,i;for(;(i=e.exec(t))!==null;)i.index>r&&n.push(d.jsx("span",{className:"text-slate-300",children:t.slice(r,i.index)},`text-${r}`)),n.push(d.jsx(B.span,{initial:{backgroundColor:"rgba(59, 130, 246, 0.3)"},animate:{backgroundColor:"rgba(59, 130, 246, 0.15)"},transition:{duration:.5},className:"px-1.5 py-0.5 rounded mx-0.5 text-blue-400 font-medium border border-blue-500/30",children:`{${i[1]}}`},`var-${i.index}`)),r=i.index+i[0].length;return r<t.length&&n.push(d.jsx("span",{className:"text-slate-300",children:t.slice(r)},`text-${r}`)),d.jsx(d.Fragment,{children:n.length>0?n:d.jsx("span",{className:"text-slate-500",children:"暂无内容"})})}function I3e(){const[t,e]=O.useState(UM[0]),[n,r]=O.useState(t.content),[i,a]=O.useState("全部"),[s,o]=O.useState(!1),[c,l]=O.useState(""),[h,f]=O.useState(0),[m,g]=O.useState(!1),[b,y]=O.useState(null),[v,w]=O.useState(0),_=i==="全部"?UM:UM.filter(M=>M.category===i);O.useEffect(()=>{if(!s&&t.content){l(""),f(0);let M=0;const T=setInterval(()=>{M++,l(t.content.slice(0,M)),f(Math.min(100,M/t.content.length*100)),M>=t.content.length&&clearInterval(T)},15);return()=>clearInterval(T)}},[t.id,s]),O.useEffect(()=>{if(m){const M=setInterval(()=>{w(T=>T>=100?(clearInterval(M),100):T+Math.random()*15)},200);return()=>clearInterval(M)}},[m]);const E=()=>{m||(g(!0),y(null),w(0),Ye.promise(new Promise(M=>setTimeout(M,2500)),{loading:"正在运行Prompt测试...",success:()=>(g(!1),y(`✅ 测试成功!
输入:工艺参数优化
输出:基于您提供的氧化铝溶出率参数,我建议优化配料比例以提高生产效率...`),"测试运行完成!"),error:"测试运行失败"}))};return d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-bold text-white mb-1 flex items-center gap-2",children:["Prompt工程与自定义模板系统",d.jsx(B.div,{animate:{rotate:[0,360]},transition:{duration:3,repeat:1/0,ease:"linear"},children:d.jsx(Ec,{className:"w-6 h-6 text-purple-400"})})]}),d.jsx("p",{className:"text-sm text-slate-400",children:"智能提示词管理与优化平台"})]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.info("模板创建功能即将开放",{duration:2e3}),className:"px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center gap-2",children:[d.jsx(RB,{className:"w-5 h-5"}),"创建新模板"]})]}),d.jsx(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex gap-2 overflow-x-auto pb-2",children:j3e.map(M=>d.jsx("button",{onClick:()=>a(M),className:`px-4 py-2 rounded-lg whitespace-nowrap transition-all ${i===M?"bg-gradient-to-r from-blue-600 to-purple-600 text-white":"bg-slate-800/50 text-slate-300 hover:bg-slate-800"}`,children:M},M))}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"模板市场"}),_.map((M,T)=>d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:T*.1},whileHover:{scale:1.02},onClick:()=>{e(M),r(M.content),o(!1)},className:`relative overflow-hidden rounded-xl p-4 cursor-pointer transition-all ${t.id===M.id?"bg-gradient-to-br from-blue-900/50 to-purple-900/50 border-2 border-blue-500/50":"bg-slate-900/50 border border-slate-800/50 hover:border-slate-700/50"}`,children:[d.jsx("div",{className:"absolute top-2 right-2",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-purple-500/20 text-xs text-purple-400",children:M.category})}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-white mb-2 pr-20",children:M.name}),d.jsx("p",{className:"text-xs text-slate-400 mb-3",children:M.description}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:d.jsxs("span",{children:["使用: ",M.usage,"次"]})}),d.jsxs("div",{className:"flex gap-1",children:[M.variables.slice(0,3).map((A,N)=>d.jsx("span",{className:"px-2 py-0.5 rounded bg-slate-800/50 text-xs text-blue-400",children:A},N)),M.variables.length>3&&d.jsxs("span",{className:"px-2 py-0.5 rounded bg-slate-800/50 text-xs text-slate-400",children:["+",M.variables.length-3]})]})]})]})]},M.id))]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"lg:col-span-2 space-y-4",children:[d.jsxs("div",{className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"模板编辑器"}),d.jsx("p",{className:"text-sm text-slate-400 mt-1",children:t.name})]}),d.jsx("div",{className:"flex gap-2",children:d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(!s),className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${s?"bg-green-600 text-white":"bg-slate-800/50 hover:bg-slate-800 text-white"}`,children:s?"预览模式":"编辑模式"})})]}),d.jsxs("div",{className:"mb-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("label",{className:"text-sm text-slate-400 flex items-center gap-2",children:[d.jsx(zK,{className:"w-4 h-4"}),"模板内容"]}),!s&&d.jsxs(B.div,{initial:{opacity:0},animate:{opacity:1},className:"flex items-center gap-2 text-xs text-slate-500",children:[d.jsx(Qr,{className:"w-3 h-3 text-blue-400"}),d.jsx("span",{children:"打字机预览"}),d.jsx("div",{className:"w-20 h-1.5 bg-slate-700/50 rounded-full overflow-hidden",children:d.jsx(B.div,{className:"h-full bg-gradient-to-r from-blue-500 to-purple-500",animate:{width:`${h}%`}})}),d.jsxs("span",{children:[Math.round(h),"%"]})]})]}),s?d.jsx(B.textarea,{initial:{opacity:.8},animate:{opacity:1},value:n,onChange:M=>r(M.target.value),className:"w-full h-96 px-4 py-3 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white font-mono text-sm resize-none focus:outline-none focus:border-blue-500/50 transition-colors",placeholder:"输入Prompt模板内容..."}):d.jsx(B.div,{initial:{opacity:0},animate:{opacity:1},className:"w-full h-96 px-4 py-3 rounded-lg bg-slate-800/50 border border-slate-700/50 font-mono text-sm overflow-y-auto whitespace-pre-wrap",children:d.jsx(O3e,{text:c})})]}),d.jsxs("div",{className:"mb-4",children:[d.jsx("label",{className:"text-sm text-slate-400 mb-2 block",children:"变量配置"}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.variables.map((M,T)=>d.jsxs(B.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:.1*T},className:"px-3 py-1.5 rounded-lg bg-slate-800/50 border border-slate-700/50 flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-blue-400",children:`{${M}}`}),d.jsx("button",{className:"text-slate-500 hover:text-slate-300 transition-colors",children:"×"})]},T)),d.jsx(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.info("变量添加功能开发中",{duration:1500}),className:"px-3 py-1.5 rounded-lg bg-slate-800/50 border border-dashed border-slate-700/50 text-sm text-slate-400 hover:text-white hover:border-blue-500/50 transition-all",children:"+ 添加变量"})]})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>{Ye.promise(new Promise(M=>setTimeout(M,1500)),{loading:"正在保存模板...",success:()=>"模板保存成功!",error:"保存失败"})},className:"flex-1 px-4 py-2 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white text-sm font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center justify-center gap-2",children:[d.jsx(IY,{className:"w-4 h-4"}),"保存模板"]}),d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:E,disabled:m,className:"px-4 py-2 rounded-lg bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white text-sm font-medium transition-all flex items-center gap-2 disabled:opacity-50",children:[m?d.jsx(B.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:d.jsx(ps,{className:"w-4 h-4"})}):d.jsx(Wd,{className:"w-4 h-4"}),m?"运行中...":"测试运行"]}),d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>{var T;const M=((T=document.querySelector(".ql-editor"))==null?void 0:T.textContent)||"";navigator.clipboard.writeText(M).then(()=>{Ye.success("Prompt已复制到剪贴板",{duration:1500})})},className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white text-sm font-medium transition-colors flex items-center gap-2",children:[d.jsx(VK,{className:"w-4 h-4"}),"复制"]}),d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>{Ye.promise(new Promise(M=>setTimeout(M,1500)),{loading:"正在导出Prompt模板...",success:()=>"导出成功!已保存至 /exports/prompt-template.json",error:"导出失败"})},className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white text-sm font-medium transition-colors flex items-center gap-2",children:[d.jsx(Fc,{className:"w-4 h-4"}),"导出"]})]}),d.jsxs(mi,{children:[m&&d.jsxs(B.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-4 p-4 rounded-lg bg-slate-800/50 border border-green-500/30",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},className:"w-5 h-5 border-2 border-green-500 border-t-transparent rounded-full"}),d.jsx("span",{className:"text-green-400 font-medium",children:"正在运行测试..."}),d.jsxs("span",{className:"text-green-400/70 text-sm",children:[Math.min(100,Math.round(v)),"%"]})]}),d.jsx("div",{className:"w-full h-2 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{className:"h-full bg-gradient-to-r from-green-500 to-emerald-500",initial:{width:"0%"},animate:{width:`${Math.min(100,v)}%`},transition:{duration:.2}})}),d.jsxs("div",{className:"mt-3 text-sm text-slate-400",children:["正在处理变量: ",t.variables.slice(0,3).join(", "),"..."]})]}),b&&!m&&d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-4 p-4 rounded-lg bg-gradient-to-br from-slate-800/80 to-slate-900/80 border border-green-500/30",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx(RK,{className:"w-5 h-5 text-green-400"}),d.jsx("span",{className:"text-green-400 font-medium",children:"测试结果"})]}),d.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed",children:b})]})]})]}),d.jsx("div",{className:"grid grid-cols-3 gap-4",children:[{label:"总模板数",value:"28",change:"+3"},{label:"本月使用",value:"2,704",change:"+12%"},{label:"平均评分",value:"4.8/5.0",change:"+0.2"}].map((M,T)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3+T*.1},whileHover:{scale:1.05},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-4",children:[d.jsx("div",{className:"text-sm text-slate-400 mb-1",children:M.label}),d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx("span",{className:"text-2xl font-bold text-white",children:M.value}),d.jsx("span",{className:"text-sm text-green-400",children:M.change})]})]},M.label))})]})]})]})}const D3e={id:15,name:"#15 电解槽",voltage:3.82,current:154.2,temperature:962,aluminaFeed:85.5,cryoliteLevel:18.2,anodeCurrent:96.5,bathRatio:2.18,silicon:.035,iron:.042,efficiency:94.8,status:"normal",statusText:"正常运行"},H8=[{time:"08:00",temp:958,voltage:3.78,efficiency:94.2},{time:"09:00",temp:960,voltage:3.8,efficiency:94.5},{time:"10:00",temp:961,voltage:3.81,efficiency:94.6},{time:"11:00",temp:962,voltage:3.82,efficiency:94.8},{time:"12:00",temp:963,voltage:3.83,efficiency:94.9}],k3e=[{id:1,time:"11:45",level:"warning",message:"极距偏低,建议调整阳极位置",cell:15},{id:2,time:"11:30",level:"info",message:"氧化铝供料系统运行正常",cell:15},{id:3,time:"11:15",level:"critical",message:"检测到阳极效应预警",cell:17}];function L3e(){const t=O.useRef(null),e=O.useRef(null),[n,r]=O.useState(D3e),[i,a]=O.useState(null),[s,o]=O.useState(!0),[c,l]=O.useState("overview"),[h,f]=O.useState(!0);O.useEffect(()=>{if(!t.current)return;const y=t.current,v=y.clientWidth,w=y.clientHeight,_=new yC;_.background=new en(659226),_.fog=new Ex(659226,15,40);const E=new li(60,v/w,.1,100);E.position.set(8,6,12),E.lookAt(0,0,0);const M=new TC({antialias:!0,alpha:!0});M.setSize(v,w),M.setPixelRatio(Math.min(window.devicePixelRatio,2)),M.shadowMap.enabled=!0,M.shadowMap.type=sC,y.appendChild(M.domElement);const T=new MC(4210784,.4);_.add(T);const A=new SC(16777215,1);A.position.set(10,15,10),A.castShadow=!0,A.shadow.mapSize.width=2048,A.shadow.mapSize.height=2048,_.add(A);const N=new Sc(3900150,2,20);N.position.set(-5,3,5),_.add(N);const P=new Sc(440020,1.5,15);P.position.set(5,2,-5),_.add(P);const R=new Zn,F=new cn(6,2.5,4),D=new Oe({color:3621201,metalness:.8,roughness:.4}),L=new _e(F,D);L.position.y=.5,L.castShadow=!0,L.receiveShadow=!0,R.add(L);const q=new cn(5.6,2.2,3.6),I=new Oe({color:1981023,metalness:.3,roughness:.7,emissive:661032,emissiveIntensity:.2}),U=new _e(q,I);U.position.y=.6,R.add(U);const k=new cn(5.4,.1,3.4),V=new Oe({color:6514417,metalness:.2,roughness:.3,emissive:5195493,emissiveIntensity:.4,transparent:!0,opacity:.9}),$=new _e(k,V);$.position.y=1.65,R.add($);const Y=new cn(5.5,.15,3.5),J=new dl({color:8490232,transparent:!0,opacity:.3}),W=new _e(Y,J);W.position.y=1.68,R.add(W);const H=new Zn,te=new cn(4.8,.4,.6),we=new Oe({color:2042167,metalness:.9,roughness:.2}),Ae=new _e(te,we);Ae.position.y=2.2,H.add(Ae);const ne=new cn(4.6,.8,.4),de=new Oe({color:3621201,metalness:.5,roughness:.6});for(let Re=0;Re<3;Re++){const Ie=new _e(ne,de);Ie.position.set(0,1.8-Re*.85,0),H.add(Ie)}const pe=new at(.08,.08,3,16),fe=new Oe({color:7041664,metalness:.9,roughness:.3});for(let Re=0;Re<4;Re++){const Ie=new _e(pe,fe);Ie.position.set(-1.8+Re*1.2,3.5,0),H.add(Ie)}H.position.z=0,R.add(H);const ce=new cn(5.2,.15,3.2),Ce=new Oe({color:2042167,metalness:.8,roughness:.4}),ye=new _e(ce,Ce);ye.position.y=.15,R.add(ye);const Ze=new Oe({color:16096779,metalness:.9,roughness:.2,emissive:16096779,emissiveIntensity:.3}),tt=new cn(6.2,.2,.3),St=new _e(tt,Ze);St.position.set(0,.1,2.2),R.add(St);const lt=St.clone();lt.position.z=-2.2,R.add(lt);const kt=new at(.15,.2,.5,16),re=new Oe({color:4937059,metalness:.7,roughness:.5});[[-2.8,-1.25,1.6],[2.8,-1.25,1.6],[-2.8,-1.25,-1.6],[2.8,-1.25,-1.6]].forEach(Re=>{const Ie=new _e(kt,re);Ie.position.set(...Re),R.add(Ie)});const Lt=new Zn,zt=new Ga(.08,16,16),qe=new dl({color:15680580});new dl({color:16096779});const Z=new dl({color:1096065});[{pos:[-1.5,1.5,1.8],temp:965,material:qe},{pos:[1.2,1.5,-1.5],temp:958,material:Z},{pos:[.5,2,0],temp:970,material:qe},{pos:[-.8,.5,1.2],temp:945,material:Z}].forEach(Re=>{const Ie=new _e(zt,Re.material);Ie.position.set(...Re.pos),Lt.add(Ie)}),R.add(Lt),_.add(R);const ie=500,Ee=new jr,Pe=new Float32Array(ie*3),ge=new Float32Array(ie);for(let Re=0;Re<ie;Re++)Pe[Re*3]=(Math.random()-.5)*5,Pe[Re*3+1]=Math.random()*2+.5,Pe[Re*3+2]=(Math.random()-.5)*3,ge[Re]=Math.random()*.05+.02;Ee.setAttribute("position",new Ji(Pe,3)),Ee.setAttribute("size",new Ji(ge,1));const Xe=new zG({color:6333946,size:.05,transparent:!0,opacity:.6,blending:QT}),Le=new uTe(Ee,Xe);_.add(Le);const ft=new EC(20,20,1981023,1981023);ft.position.y=-1.5,_.add(ft),e.current={scene:_,camera:E,renderer:M,electrolyticCell:R,particles:Le,animationId:0,time:0};const nt=()=>{if(!e.current)return;const{scene:Re,camera:Ie,renderer:rt,electrolyticCell:$e,particles:he}=e.current;e.current.time+=.01,s&&($e.rotation.y+=.002),V.emissiveIntensity=.3+Math.sin(e.current.time*2)*.15,J.opacity=.2+Math.sin(e.current.time*3)*.1,Xe.opacity=.4+Math.sin(e.current.time*1.5)*.2;const Qe=he.geometry.attributes.position.array;for(let ht=0;ht<ie;ht++)Qe[ht*3+1]+=.005,Qe[ht*3+1]>2.5&&(Qe[ht*3+1]=.5);he.geometry.attributes.position.needsUpdate=!0,rt.render(Re,Ie),e.current.animationId=requestAnimationFrame(nt)};nt();const Ue=()=>{if(!y||!e.current)return;const Re=y.clientWidth,Ie=y.clientHeight;E.aspect=Re/Ie,E.updateProjectionMatrix(),M.setSize(Re,Ie)};window.addEventListener("resize",Ue);let ke=!1,Fe={x:0,y:0};const ze=Re=>{ke=!0,Fe={x:Re.clientX,y:Re.clientY}},He=Re=>{if(!ke||!e.current)return;const Ie=Re.clientX-Fe.x,rt=Re.clientY-Fe.y;R.rotation.y+=Ie*.01,R.rotation.x+=rt*.005,Fe={x:Re.clientX,y:Re.clientY},o(!1)},vt=()=>{ke=!1};y.addEventListener("mousedown",ze),y.addEventListener("mousemove",He),y.addEventListener("mouseup",vt),y.addEventListener("mouseleave",vt);const ae=Re=>{Re.preventDefault(),E.position.multiplyScalar(1+Re.deltaY*.001)};return y.addEventListener("wheel",ae,{passive:!1}),()=>{window.removeEventListener("resize",Ue),y.removeEventListener("mousedown",ze),y.removeEventListener("mousemove",He),y.removeEventListener("mouseup",vt),y.removeEventListener("mouseleave",vt),y.removeEventListener("wheel",ae),e.current&&(cancelAnimationFrame(e.current.animationId),e.current.renderer.dispose(),y.removeChild(e.current.renderer.domElement))}},[s]),O.useEffect(()=>{const y=setInterval(()=>{r(v=>({...v,voltage:3.75+Math.random()*.15,current:153+Math.random()*3,temperature:958+Math.random()*10,aluminaFeed:82+Math.random()*8,anodeCurrent:94+Math.random()*5,efficiency:93.5+Math.random()*2}))},3e3);return()=>clearInterval(y)},[]);const m=y=>{a(i===y?null:y),Ye.info(`查看 ${y} 详细趋势`,{duration:1500})},g=y=>{switch(y){case"normal":return"text-emerald-400";case"warning":return"text-amber-400";case"critical":return"text-red-500";default:return"text-slate-400"}},b=y=>{switch(y){case"normal":return"bg-emerald-500/20 border-emerald-500/30";case"warning":return"bg-amber-500/20 border-amber-500/30";case"critical":return"bg-red-500/20 border-red-500/30";default:return"bg-slate-500/20 border-slate-500/30"}};return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsx(B.div,{className:"p-6 border-b border-slate-700/50",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:"p-3 rounded-xl bg-gradient-to-br from-cyan-500/20 to-blue-500/20 border border-cyan-500/30",children:d.jsx(Jp,{className:"w-6 h-6 text-cyan-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white",children:"电解槽人机协同VR系统"}),d.jsx("p",{className:"text-sm text-slate-400",children:"基于数字孪生的实时监控与智能交互"})]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-emerald-500/20 border border-emerald-500/30",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 animate-pulse"}),d.jsx("span",{className:"text-sm text-emerald-400 font-medium",children:"VR实时监控"})]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>f(!h),className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 flex items-center gap-2 border border-slate-700/50",children:[d.jsx(Gd,{className:"w-4 h-4"}),h?"隐藏AR":"显示AR"]})]})]})}),d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("div",{className:"flex-1 relative",children:[d.jsx("div",{ref:t,className:"absolute inset-0"}),d.jsx(mi,{children:h&&d.jsxs(B.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 pointer-events-none",children:[d.jsxs(B.div,{className:"absolute top-20 left-8 p-4 rounded-xl bg-slate-900/80 backdrop-blur-sm border border-cyan-500/30 pointer-events-auto",initial:{x:-100,opacity:0},animate:{x:0,opacity:1},transition:{delay:.2},children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(rv,{className:"w-5 h-5 text-red-400"}),d.jsx("span",{className:"text-sm text-slate-400",children:"槽温度"})]}),d.jsxs("div",{className:"text-3xl font-bold text-white",children:[n.temperature.toFixed(1),d.jsx("span",{className:"text-lg text-slate-400 ml-1",children:"°C"})]}),d.jsx("div",{className:"mt-2 text-xs text-slate-500",children:"目标: 960°C"})]}),d.jsxs(B.div,{className:"absolute top-20 right-8 p-4 rounded-xl bg-slate-900/80 backdrop-blur-sm border border-amber-500/30 pointer-events-auto",initial:{x:100,opacity:0},animate:{x:0,opacity:1},transition:{delay:.3},children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(Qr,{className:"w-5 h-5 text-amber-400"}),d.jsx("span",{className:"text-sm text-slate-400",children:"槽电压"})]}),d.jsxs("div",{className:"text-3xl font-bold text-white",children:[n.voltage.toFixed(2),d.jsx("span",{className:"text-lg text-slate-400 ml-1",children:"V"})]}),d.jsx("div",{className:"mt-2 text-xs text-slate-500",children:"目标: 3.8V"})]}),d.jsxs(B.div,{className:"absolute bottom-32 left-8 p-4 rounded-xl bg-slate-900/80 backdrop-blur-sm border border-blue-500/30 pointer-events-auto",initial:{y:50,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4},children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(Zh,{className:"w-5 h-5 text-blue-400"}),d.jsx("span",{className:"text-sm text-slate-400",children:"电流效率"})]}),d.jsxs("div",{className:"text-3xl font-bold text-white",children:[n.efficiency.toFixed(1),d.jsx("span",{className:"text-lg text-slate-400 ml-1",children:"%"})]}),d.jsx("div",{className:"mt-2 h-2 w-full bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500",initial:{width:0},animate:{width:`${n.efficiency}%`},transition:{duration:1}})})]}),d.jsxs(B.div,{className:"absolute bottom-32 right-8 p-4 rounded-xl bg-slate-900/80 backdrop-blur-sm border border-emerald-500/30 pointer-events-auto",initial:{y:50,opacity:0},animate:{y:0,opacity:1},transition:{delay:.5},children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(Oh,{className:"w-5 h-5 text-emerald-400"}),d.jsx("span",{className:"text-sm text-slate-400",children:"氧化铝供料"})]}),d.jsxs("div",{className:"text-3xl font-bold text-white",children:[n.aluminaFeed.toFixed(1),d.jsx("span",{className:"text-lg text-slate-400 ml-1",children:"kg/h"})]})]}),d.jsx(B.div,{className:"absolute top-1/2 left-4 transform -translate-y-1/2",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("div",{className:"p-2 rounded-lg bg-slate-900/60 backdrop-blur-sm border border-slate-600/30",children:d.jsx(yr,{className:"w-4 h-4 text-cyan-400"})}),d.jsx("div",{className:"p-2 rounded-lg bg-slate-900/60 backdrop-blur-sm border border-slate-600/30",children:d.jsx(iv,{className:"w-4 h-4 text-emerald-400"})}),d.jsx("div",{className:"p-2 rounded-lg bg-slate-900/60 backdrop-blur-sm border border-slate-600/30",children:d.jsx(PY,{className:"w-4 h-4 text-amber-400"})})]})})]})}),d.jsxs("div",{className:"absolute bottom-4 left-1/2 transform -translate-x-1/2 flex gap-2",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(!s),className:`px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2 transition-all ${s?"bg-cyan-500/20 text-cyan-400 border border-cyan-500/30":"bg-slate-800/50 text-slate-300 border border-slate-700/50"}`,children:[d.jsx(Jh,{className:"w-4 h-4"}),s?"停止旋转":"自动旋转"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.info("截图已保存到本地",{duration:1500}),className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 flex items-center gap-2 border border-slate-700/50",children:[d.jsx(AK,{className:"w-4 h-4"}),"截图"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.success("已进入全屏VR模式",{duration:1500}),className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-sm text-slate-300 flex items-center gap-2 border border-slate-700/50",children:[d.jsx(Jh,{className:"w-4 h-4"}),"全屏VR"]})]}),d.jsx("div",{className:"absolute top-4 right-4 text-xs text-slate-500",children:"拖拽旋转 | 滚轮缩放"})]}),d.jsxs(B.div,{className:"w-96 border-l border-slate-700/50 bg-slate-900/50 backdrop-blur-sm overflow-y-auto",initial:{x:50,opacity:0},animate:{x:0,opacity:1},transition:{delay:.3},children:[d.jsx("div",{className:"p-4 border-b border-slate-700/50",children:d.jsx("div",{className:"flex gap-2",children:["overview","realtime","history","control"].map(y=>d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>l(y),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${c===y?"bg-cyan-500/20 text-cyan-400 border border-cyan-500/30":"bg-slate-800/50 text-slate-400 hover:text-white border border-slate-700/50"}`,children:[y==="overview"&&"概览",y==="realtime"&&"实时",y==="history"&&"历史",y==="control"&&"控制"]},y))})}),d.jsxs(mi,{mode:"wait",children:[c==="overview"&&d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"p-4 space-y-4",children:[d.jsxs("div",{className:`p-4 rounded-xl border ${b(n.status)}`,children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:`w-3 h-3 rounded-full ${n.status==="normal"?"bg-emerald-400 animate-pulse":n.status==="warning"?"bg-amber-400 animate-pulse":"bg-red-500 animate-pulse"}`}),d.jsx("span",{className:"font-semibold text-white",children:n.name})]}),d.jsx("span",{className:`text-sm font-medium ${g(n.status)}`,children:n.statusText})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"p-2 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"电压"}),d.jsxs("div",{className:"text-lg font-bold text-amber-400",children:[n.voltage.toFixed(2),"V"]})]}),d.jsxs("div",{className:"p-2 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"电流"}),d.jsxs("div",{className:"text-lg font-bold text-blue-400",children:[n.current.toFixed(1),"kA"]})]}),d.jsxs("div",{className:"p-2 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"温度"}),d.jsxs("div",{className:"text-lg font-bold text-red-400",children:[n.temperature.toFixed(0),"°C"]})]}),d.jsxs("div",{className:"p-2 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"效率"}),d.jsxs("div",{className:"text-lg font-bold text-emerald-400",children:[n.efficiency.toFixed(1),"%"]})]})]})]}),d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsxs("h3",{className:"text-sm font-semibold text-white mb-3 flex items-center gap-2",children:[d.jsx(Zu,{className:"w-4 h-4 text-orange-400"}),"工艺参数"]}),d.jsx("div",{className:"space-y-2",children:[{label:"电解质水平",value:n.cryoliteLevel,unit:"cm",icon:Oh},{label:"阳极电流分布",value:n.anodeCurrent,unit:"%",icon:yr},{label:"分子比",value:n.bathRatio,unit:"",icon:Zh},{label:"氧化铝供料",value:n.aluminaFeed,unit:"kg/h",icon:Ni}].map(y=>d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>m(y.label),className:"w-full p-3 rounded-lg bg-slate-900/50 hover:bg-slate-800/80 transition-colors flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(y.icon,{className:"w-4 h-4 text-slate-400"}),d.jsx("span",{className:"text-sm text-slate-300",children:y.label})]}),d.jsxs("span",{className:"text-sm font-semibold text-white",children:[typeof y.value=="number"?y.value.toFixed(1):y.value,d.jsx("span",{className:"text-slate-500 ml-1",children:y.unit})]})]},y.label))})]}),d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:"质量指标"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex justify-between text-xs",children:[d.jsx("span",{className:"text-slate-400",children:"硅含量 (Si)"}),d.jsxs("span",{className:"text-white font-medium",children:[n.silicon.toFixed(3),"%"]})]}),d.jsx("div",{className:"h-2 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500",initial:{width:0},animate:{width:`${n.silicon/.05*100}%`}})})]}),d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex justify-between text-xs",children:[d.jsx("span",{className:"text-slate-400",children:"铁含量 (Fe)"}),d.jsxs("span",{className:"text-white font-medium",children:[n.iron.toFixed(3),"%"]})]}),d.jsx("div",{className:"h-2 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{className:"h-full bg-gradient-to-r from-amber-500 to-orange-500",initial:{width:0},animate:{width:`${n.iron/.05*100}%`}})})]})]})]})]},"overview"),c==="realtime"&&d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"p-4 space-y-4",children:[d.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{label:"温度",value:n.temperature,unit:"°C",color:"text-red-400",bg:"bg-red-500/10 border-red-500/20"},{label:"电压",value:n.voltage,unit:"V",color:"text-amber-400",bg:"bg-amber-500/10 border-amber-500/20"},{label:"电流",value:n.current,unit:"kA",color:"text-blue-400",bg:"bg-blue-500/10 border-blue-500/20"},{label:"效率",value:n.efficiency,unit:"%",color:"text-emerald-400",bg:"bg-emerald-500/10 border-emerald-500/20"},{label:"供料",value:n.aluminaFeed,unit:"kg/h",color:"text-cyan-400",bg:"bg-cyan-500/10 border-cyan-500/20"},{label:"分子比",value:n.bathRatio,unit:"",color:"text-purple-400",bg:"bg-purple-500/10 border-purple-500/20"}].map(y=>d.jsxs(B.div,{whileHover:{scale:1.05},className:`p-3 rounded-xl border ${y.bg} text-center`,children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:y.label}),d.jsxs("div",{className:`text-lg font-bold ${y.color}`,children:[y.value.toFixed(1),d.jsx("span",{className:"text-xs font-normal opacity-70",children:y.unit})]})]},y.label))}),d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsxs("h3",{className:"text-sm font-semibold text-white mb-3 flex items-center gap-2",children:[d.jsx(yr,{className:"w-4 h-4 text-cyan-400"}),"实时数据流"]}),d.jsx("div",{className:"space-y-2 font-mono text-xs",children:[`T:${n.temperature.toFixed(1)}°C ▲`,`V:${n.voltage.toFixed(3)}V ▼`,`I:${n.current.toFixed(1)}kA ●`,`η:${n.efficiency.toFixed(2)}% ▲`,`Al₂O₃:${n.aluminaFeed.toFixed(1)}kg/h`].map((y,v)=>d.jsx(B.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:v*.1},className:"text-slate-300",children:y},v))})]}),d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:"告警信息"}),d.jsx("div",{className:"space-y-2",children:k3e.map(y=>d.jsxs(B.div,{whileHover:{scale:1.02},className:`p-3 rounded-lg border ${y.level==="critical"?"bg-red-500/10 border-red-500/30":y.level==="warning"?"bg-amber-500/10 border-amber-500/30":"bg-blue-500/10 border-blue-500/30"}`,children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.level==="critical"&&d.jsx(qi,{className:"w-4 h-4 text-red-400"}),y.level==="warning"&&d.jsx(qi,{className:"w-4 h-4 text-amber-400"}),y.level==="info"&&d.jsx(Cr,{className:"w-4 h-4 text-blue-400"}),d.jsx("span",{className:"text-xs text-slate-400",children:y.time})]}),d.jsx("p",{className:"text-sm text-white",children:y.message})]},y.id))})]})]},"realtime"),c==="history"&&d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"p-4 space-y-4",children:[d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsx("h3",{className:"text-sm font-semibold text-white mb-4",children:"趋势历史"}),d.jsx("div",{className:"space-y-4",children:["温度趋势","电压趋势","效率趋势"].map((y,v)=>d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between text-xs mb-2",children:[d.jsx("span",{className:"text-slate-400",children:y}),d.jsxs("span",{className:"text-white",children:[v===0?n.temperature.toFixed(0):v===1?n.voltage.toFixed(2):n.efficiency.toFixed(1),v===0?"°C":v===1?"V":"%"]})]}),d.jsx("div",{className:"flex gap-1 items-end h-12",children:H8.map((w,_)=>d.jsx(B.div,{initial:{height:0},animate:{height:`${(v===0?w.temp-950:v===1?w.voltage*25:w.efficiency-90)*3}%`},transition:{delay:_*.1},className:`flex-1 rounded-t ${v===0?"bg-gradient-to-t from-red-500 to-orange-500":v===1?"bg-gradient-to-t from-amber-500 to-yellow-500":"bg-gradient-to-t from-emerald-500 to-cyan-500"}`},_))})]},y))})]}),d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:"历史记录"}),d.jsx("div",{className:"space-y-2",children:H8.map((y,v)=>d.jsxs(B.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:v*.1},className:"p-2 rounded-lg bg-slate-900/50 flex items-center justify-between text-sm",children:[d.jsx("span",{className:"text-slate-400",children:y.time}),d.jsxs("div",{className:"flex gap-4",children:[d.jsxs("span",{className:"text-red-400",children:[y.temp,"°C"]}),d.jsxs("span",{className:"text-amber-400",children:[y.voltage,"V"]}),d.jsxs("span",{className:"text-emerald-400",children:[y.efficiency,"%"]})]})]},v))})]})]},"history"),c==="control"&&d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"p-4 space-y-4",children:[d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsxs("h3",{className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(sd,{className:"w-4 h-4 text-cyan-400"}),"控制系统"]}),d.jsx("div",{className:"space-y-3",children:[{label:"自动模式",enabled:!0,icon:Qr},{label:"极距调整",enabled:!0,icon:yr},{label:"氧化铝供料",enabled:!0,icon:Oh},{label:"温度控制",enabled:!0,icon:rv}].map(y=>d.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-slate-900/50",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(y.icon,{className:"w-4 h-4 text-slate-400"}),d.jsx("span",{className:"text-sm text-white",children:y.label})]}),d.jsx(B.div,{whileTap:{scale:.95},className:`w-12 h-6 rounded-full p-1 transition-colors ${y.enabled?"bg-emerald-500":"bg-slate-600"}`,children:d.jsx(B.div,{animate:{x:y.enabled?24:0},className:"w-4 h-4 rounded-full bg-white shadow-md"})})]},y.label))})]}),d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>Ye.success("控制指令已下发:开始优化调节",{duration:2e3}),className:"w-full p-4 rounded-xl bg-gradient-to-r from-cyan-500/20 to-blue-500/20 border border-cyan-500/30 text-cyan-400 font-medium flex items-center justify-center gap-2",children:[d.jsx(Qr,{className:"w-5 h-5"}),"智能优化调节"]}),d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>Ye.info("已启动远程专家会诊模式",{duration:2e3}),className:"w-full p-4 rounded-xl bg-gradient-to-r from-purple-500/20 to-pink-500/20 border border-purple-500/30 text-purple-400 font-medium flex items-center justify-center gap-2",children:[d.jsx(cZ,{className:"w-5 h-5"}),"远程专家会诊"]}),d.jsxs("div",{className:"p-4 rounded-xl bg-slate-800/50 border border-slate-700/50",children:[d.jsx("h3",{className:"text-sm font-semibold text-white mb-3",children:"控制日志"}),d.jsxs("div",{className:"space-y-2 text-xs text-slate-400",children:[d.jsx("div",{children:"12:00 - 系统自动调节极距 +0.5mm"}),d.jsx("div",{children:"11:55 - 氧化铝供料量调整 +2.3kg/h"}),d.jsx("div",{children:"11:50 - 温度控制回路优化完成"}),d.jsx("div",{children:"11:45 - 收到手动调节指令"})]})]})]},"control")]})]})]})]})}const Ng={blowingTime:"15:30",oxygenConsumption:4800,steelTemp:1650,carbonContent:.04},F3e=[{time:0,actual:1580,predicted:1580},{time:5,actual:1605,predicted:1600},{time:10,actual:1625,predicted:1623},{time:15,actual:1650,predicted:1648},{time:20,actual:null,predicted:1660},{time:25,actual:null,predicted:1665}],U3e=[{time:0,actual:.45,predicted:.45},{time:5,actual:.32,predicted:.33},{time:10,actual:.18,predicted:.19},{time:15,actual:.04,predicted:.045},{time:20,actual:null,predicted:.032},{time:25,actual:null,predicted:.028}],G8=[{phase:"初期",action:"保持高枪位氧气流量40000 Nm³/h",reasoning:"初期需要快速升温和脱碳",confidence:95},{phase:"中期",action:"增加氧气流量10%至44000 Nm³/h",reasoning:"当前碳含量偏高,需要加速脱碳反应",confidence:92,isActive:!0},{phase:"后期",action:"降低枪位减少氧气流量至35000 Nm³/h",reasoning:"接近终点,控制温度避免过热",confidence:88}];function B3e(){const[t,e]=O.useState(!1),[n,r]=O.useState(G8[1]);return d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-bold text-white mb-1 flex items-center gap-2",children:["智能转炉控制模型",d.jsx(B.div,{animate:{scale:[1,1.3,1],rotate:[0,180,360]},transition:{duration:3,repeat:1/0},children:d.jsx(Zu,{className:"w-6 h-6 text-orange-400"})})]}),d.jsx("p",{className:"text-sm text-slate-400",children:"数据驱动的转炉炼钢智能优化控制系统"})]}),d.jsx("div",{className:"flex gap-3",children:d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{e(!t),t?Ye.info("已切换到手动模式",{duration:2e3}):Ye.success("已切换到自动控制模式",{duration:2e3})},className:`px-4 py-2 rounded-lg text-white text-sm font-medium transition-all flex items-center gap-2 ${t?"bg-gradient-to-r from-green-600 to-emerald-600 shadow-lg shadow-green-500/20":"bg-slate-800/50 hover:bg-slate-800"}`,children:[t?d.jsx(Wd,{className:"w-4 h-4"}):d.jsx(Qp,{className:"w-4 h-4"}),t?"自动控制中":"手动模式"]})})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[{icon:yr,label:"吹炼时间",value:Ng.blowingTime,unit:"min",color:"from-blue-500 to-cyan-500"},{icon:hZ,label:"氧气消耗",value:Ng.oxygenConsumption,unit:"m³",color:"from-green-500 to-emerald-500"},{icon:Zu,label:"钢水温度",value:Ng.steelTemp,unit:"°C",color:"from-orange-500 to-red-500"},{icon:Oh,label:"碳含量",value:Ng.carbonContent,unit:"%",color:"from-purple-500 to-pink-500"}].map((i,a)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:a*.1},whileHover:{scale:1.05,y:-5},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("div",{className:`absolute top-0 right-0 w-24 h-24 bg-gradient-to-br ${i.color} opacity-10 rounded-full blur-2xl`}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:`w-12 h-12 rounded-lg bg-gradient-to-br ${i.color} flex items-center justify-center mb-3`,children:d.jsx(i.icon,{className:"w-6 h-6 text-white"})}),d.jsx("div",{className:"text-sm text-slate-400 mb-1",children:i.label}),d.jsxs("div",{className:"flex items-baseline gap-1",children:[d.jsx("span",{className:"text-2xl font-bold text-white",children:i.value}),d.jsx("span",{className:"text-sm text-slate-500",children:i.unit})]})]})]},i.label))}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:360},transition:{duration:3,repeat:1/0,ease:"linear"},children:d.jsx(Zu,{className:"w-5 h-5 text-orange-400"})}),"吹炼阶段进度"]}),d.jsxs("div",{className:"mb-6",children:[d.jsxs("div",{className:"flex justify-between text-sm text-slate-400 mb-2",children:[d.jsx("span",{children:"初期"}),d.jsx("span",{children:"中期"}),d.jsx("span",{children:"后期"})]}),d.jsxs("div",{className:"relative h-4 rounded-full bg-slate-800/50 overflow-hidden",children:[d.jsx(B.div,{initial:{width:"0%"},animate:{width:"55%"},transition:{duration:2,ease:"easeOut"},className:"absolute inset-y-0 left-0 rounded-full bg-gradient-to-r from-orange-500 via-yellow-500 to-green-500"}),d.jsx(B.div,{animate:{opacity:[.3,.6,.3]},transition:{duration:1.5,repeat:1/0},className:"absolute inset-y-0 w-8 bg-gradient-to-r from-transparent via-white/30 to-transparent",style:{left:"50%",transform:"translateX(-50%)"}})]}),d.jsxs("div",{className:"flex justify-between text-xs text-slate-500 mt-1",children:[d.jsx("span",{children:"0min"}),d.jsx("span",{className:"text-orange-400",children:"当前: 8min"}),d.jsx("span",{children:"15min"})]})]}),d.jsx("div",{className:"flex items-center justify-between gap-2",children:["初期","中期","后期"].map((i,a)=>{const s=a<1,o=a===1;return d.jsxs(B.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:.3+a*.1},className:`flex-1 p-3 rounded-lg text-center ${s?"bg-green-500/20 border border-green-500/50":o?"bg-blue-500/20 border-2 border-blue-500/50 shadow-lg shadow-blue-500/20":"bg-slate-800/50 border border-slate-700/50"}`,children:[d.jsx(B.div,{animate:o?{scale:[1,1.1,1]}:{},transition:{duration:1.5,repeat:1/0},className:`w-3 h-3 rounded-full mx-auto mb-2 ${s?"bg-green-500":o?"bg-blue-500":"bg-slate-600"}`}),d.jsx("div",{className:`text-sm font-medium ${s?"text-green-400":o?"text-blue-400":"text-slate-400"}`,children:i}),d.jsx("div",{className:"text-xs text-slate-500 mt-1",children:s?"已完成":o?"进行中":"待开始"})]},i)})}),d.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-3",children:[d.jsxs(B.div,{animate:{boxShadow:["0 0 10px rgba(239, 68, 68, 0.2)","0 0 20px rgba(239, 68, 68, 0.4)","0 0 10px rgba(239, 68, 68, 0.2)"]},transition:{duration:2,repeat:1/0},className:"p-3 rounded-lg bg-red-500/10 border border-red-500/30 text-center",children:[d.jsx("div",{className:"text-xs text-slate-400",children:"枪位"}),d.jsx("div",{className:"text-lg font-bold text-red-400",children:"2.5m"})]}),d.jsxs(B.div,{animate:{boxShadow:["0 0 10px rgba(59, 130, 246, 0.2)","0 0 20px rgba(59, 130, 246, 0.4)","0 0 10px rgba(59, 130, 246, 0.2)"]},transition:{duration:2,repeat:1/0,delay:.3},className:"p-3 rounded-lg bg-blue-500/10 border border-blue-500/30 text-center",children:[d.jsx("div",{className:"text-xs text-slate-400",children:"氧气流量"}),d.jsx("div",{className:"text-lg font-bold text-blue-400",children:"44000"})]}),d.jsxs(B.div,{animate:{boxShadow:["0 0 10px rgba(139, 92, 246, 0.2)","0 0 20px rgba(139, 92, 246, 0.4)","0 0 10px rgba(139, 92, 246, 0.2)"]},transition:{duration:2,repeat:1/0,delay:.6},className:"p-3 rounded-lg bg-purple-500/10 border border-purple-500/30 text-center",children:[d.jsx("div",{className:"text-xs text-slate-400",children:"石灰加入"}),d.jsx("div",{className:"text-lg font-bold text-purple-400",children:"280kg"})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"温度预测模型"}),d.jsx(Ci,{width:"100%",height:250,children:d.jsxs(Dd,{data:F3e,children:[d.jsx("defs",{children:d.jsxs("linearGradient",{id:"converterTempActualGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"#ef4444",stopOpacity:.3}),d.jsx("stop",{offset:"95%",stopColor:"#ef4444",stopOpacity:0})]})}),d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"time",stroke:"#94a3b8",fontSize:12,label:{value:"时间 (min)",position:"insideBottom",offset:-5,fill:"#94a3b8"}}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12,domain:[1550,1680]}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),d.jsx(gi,{type:"monotone",dataKey:"actual",name:"实际温度",stroke:"#ef4444",strokeWidth:3,dot:{r:4}}),d.jsx(gi,{type:"monotone",dataKey:"predicted",name:"预测温度",stroke:"#3b82f6",strokeWidth:2,strokeDasharray:"5 5",dot:{r:3}})]})}),d.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"预期终点温度"}),d.jsx("div",{className:"text-lg font-bold text-orange-400",children:"1665°C"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"预测误差"}),d.jsx("div",{className:"text-lg font-bold text-green-400",children:"±3°C"})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"脱碳预测模型"}),d.jsx(Ci,{width:"100%",height:250,children:d.jsxs(hP,{data:U3e,children:[d.jsx("defs",{children:d.jsxs("linearGradient",{id:"carbonGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"5%",stopColor:"#8b5cf6",stopOpacity:.3}),d.jsx("stop",{offset:"95%",stopColor:"#8b5cf6",stopOpacity:0})]})}),d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155",opacity:.3}),d.jsx(Ur,{dataKey:"time",stroke:"#94a3b8",fontSize:12,label:{value:"时间 (min)",position:"insideBottom",offset:-5,fill:"#94a3b8"}}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12,domain:[0,.5]}),d.jsx(Xn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}}),d.jsx(wa,{type:"monotone",dataKey:"actual",name:"实际碳含量",stroke:"#8b5cf6",fill:"url(#carbonGradient)",strokeWidth:3}),d.jsx(wa,{type:"monotone",dataKey:"predicted",name:"预测碳含量",stroke:"#3b82f6",fill:"none",strokeWidth:2,strokeDasharray:"5 5"})]})}),d.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"预期终点碳含量"}),d.jsx("div",{className:"text-lg font-bold text-purple-400",children:"0.03%"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:"脱碳速率"}),d.jsx("div",{className:"text-lg font-bold text-green-400",children:"0.025%/min"})]})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(B.div,{animate:{rotate:[0,10,-10,0]},transition:{duration:2,repeat:1/0},children:d.jsx(Ni,{className:"w-5 h-5 text-blue-400"})}),"智能控制建议"]}),d.jsx("div",{className:"space-y-3",children:G8.map((i,a)=>d.jsxs(B.div,{layout:!0,initial:{opacity:0,x:-30,scale:.95},animate:{opacity:1,x:0,scale:1},transition:{delay:.7+a*.1,type:"spring",stiffness:200},whileHover:{scale:1.02,boxShadow:i.isActive?"0 0 30px rgba(59, 130, 246, 0.3)":"0 0 15px rgba(100, 116, 139, 0.2)"},onClick:()=>r(i),className:`relative overflow-hidden rounded-lg p-4 cursor-pointer transition-all ${i.isActive?"bg-gradient-to-r from-blue-900/50 to-purple-900/50 border-2 border-blue-500/50 shadow-lg shadow-blue-500/20":"bg-slate-800/50 border border-slate-700/50 hover:border-slate-600/50"}`,children:[i.isActive&&d.jsx(B.div,{className:"absolute inset-0 opacity-20",animate:{background:["radial-gradient(circle at 0% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%)","radial-gradient(circle at 100% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 50%)","radial-gradient(circle at 0% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%)"]},transition:{duration:4,repeat:1/0}}),i.isActive&&d.jsx("div",{className:"absolute top-2 right-2",children:d.jsxs(B.div,{animate:{scale:[1,1.1,1],boxShadow:["0 0 10px rgba(34, 197, 94, 0.3)","0 0 20px rgba(34, 197, 94, 0.5)","0 0 10px rgba(34, 197, 94, 0.3)"]},transition:{duration:2,repeat:1/0},className:"px-2 py-1 rounded-full bg-green-500/20 border border-green-500/50 text-xs text-green-400 flex items-center gap-1",children:[d.jsx(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:1,repeat:1/0},className:"w-1.5 h-1.5 rounded-full bg-green-500"}),"执行中"]})}),d.jsxs("div",{className:"flex items-start gap-4 relative",children:[d.jsx(B.div,{animate:i.isActive?{rotate:[0,5,-5,0]}:{},transition:{duration:2,repeat:1/0},className:`p-3 rounded-lg ${i.isActive?"bg-blue-500/20":"bg-slate-700/50"}`,children:d.jsx(sd,{className:`w-6 h-6 ${i.isActive?"text-blue-400":"text-slate-400"}`})}),d.jsxs("div",{className:"flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("h3",{className:"font-semibold text-white",children:i.phase}),d.jsxs(B.span,{animate:{scale:[1,1.05,1]},transition:{duration:2,repeat:1/0},className:`px-2 py-0.5 rounded-full text-xs flex items-center gap-1 ${i.confidence>=90?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:[d.jsx(Ni,{className:"w-3 h-3"}),"置信度 ",i.confidence,"%"]})]}),d.jsx(B.p,{className:"text-sm text-white mb-2",animate:i.isActive?{opacity:[.8,1,.8]}:{},transition:{duration:2,repeat:1/0},children:i.action}),d.jsxs("p",{className:"text-xs text-slate-400 flex items-center gap-1",children:[d.jsx(qi,{className:"w-3 h-3"}),i.reasoning]}),i.isActive&&d.jsxs("div",{className:"mt-3 flex gap-2",children:[d.jsxs(B.button,{whileHover:{scale:1.05,boxShadow:"0 0 20px rgba(34, 197, 94, 0.4)"},whileTap:{scale:.95},onClick:()=>{Ye.success("控制指令已下发",{duration:2e3})},className:"px-3 py-1.5 rounded bg-green-600 hover:bg-green-700 text-white text-xs font-medium transition-colors flex items-center gap-1",children:[d.jsx(Cr,{className:"w-3 h-3"}),"确认执行"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.info("参数调整面板已打开",{duration:2e3})},className:"px-3 py-1.5 rounded bg-slate-700 hover:bg-slate-600 text-white text-xs font-medium transition-colors flex items-center gap-1",children:[d.jsx(sd,{className:"w-3 h-3"}),"调整参数"]})]})]})]})]},i.phase))})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{label:"溢渣风险",level:"低",value:"15%",color:"green"},{label:"回磷风险",level:"中",value:"35%",color:"yellow"},{label:"温度过冲",level:"低",value:"12%",color:"green"}].map((i,a)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8+a*.1},whileHover:{scale:1.05},className:`rounded-xl border backdrop-blur-sm p-4 ${i.color==="green"?"bg-green-900/20 border-green-500/50":i.color==="yellow"?"bg-yellow-900/20 border-yellow-500/50":"bg-red-900/20 border-red-500/50"}`,children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"text-sm font-medium text-white",children:i.label}),d.jsx(qi,{className:`w-5 h-5 ${i.color==="green"?"text-green-400":i.color==="yellow"?"text-yellow-400":"text-red-400"}`})]}),d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx("span",{className:`text-2xl font-bold ${i.color==="green"?"text-green-400":i.color==="yellow"?"text-yellow-400":"text-red-400"}`,children:i.value}),d.jsx("span",{className:`text-sm ${i.color==="green"?"text-green-400":i.color==="yellow"?"text-yellow-400":"text-red-400"}`,children:i.level})]})]},i.label))})]})}const W8=[{label:"本月",value:"2027-04"},{label:"本季度",value:"2027-Q2"},{label:"上半年",value:"2027-H1"},{label:"全年",value:"2027"}],z3e={"2027-04":{qualityImprovements:[{month:"4月1日",rate:95.5},{month:"4月8日",rate:95.8},{month:"4月15日",rate:96},{month:"4月22日",rate:96.2}],energySavings:[{category:"钢铁",before:145,after:140,saving:5},{category:"氧化铝",before:800,after:776,saving:24},{category:"电解铝",before:3375,after:3300,saving:75}],roiTrend:[{quarter:"4月1周",investment:300,return:200},{quarter:"4月2周",investment:350,return:350},{quarter:"4月3周",investment:400,return:550},{quarter:"4月4周",investment:450,return:700}],metrics:{targetRate:"116%",costSaving:"¥700万",roi:"142%",energyReduce:"2.8%"}},"2027-Q2":{qualityImprovements:[{month:"4月",rate:95.6},{month:"5月",rate:95.9},{month:"6月",rate:96.1}],energySavings:[{category:"钢铁",before:580,after:562,saving:18},{category:"氧化铝",before:3200,after:3104,saving:96},{category:"电解铝",before:13500,after:13200,saving:300}],roiTrend:[{quarter:"Q2-4月",investment:1200,return:1e3},{quarter:"Q2-5月",investment:1300,return:1500},{quarter:"Q2-6月",investment:1500,return:2e3}],metrics:{targetRate:"118%",costSaving:"¥2100万",roi:"148%",energyReduce:"3.0%"}},"2027-H1":{qualityImprovements:[{month:"1月",rate:94.5},{month:"2月",rate:94.8},{month:"3月",rate:95.2},{month:"4月",rate:95.6},{month:"5月",rate:95.9},{month:"6月",rate:96.1}],energySavings:[{category:"钢铁",before:870,after:843,saving:27},{category:"氧化铝",before:4800,after:4656,saving:144},{category:"电解铝",before:20250,after:19800,saving:450}],roiTrend:[{quarter:"Q1",investment:1200,return:800},{quarter:"Q2",investment:1500,return:1400},{quarter:"H1合计",investment:2700,return:2200}],metrics:{targetRate:"118%",costSaving:"¥2500万",roi:"152%",energyReduce:"3.1%"}},2027:{qualityImprovements:[{month:"Q1",rate:94.8},{month:"Q2",rate:96.1},{month:"Q3",rate:96.5},{month:"Q4",rate:96.8}],energySavings:[{category:"钢铁",before:1740,after:1686,saving:54},{category:"氧化铝",before:9600,after:9312,saving:288},{category:"电解铝",before:40500,after:39600,saving:900}],roiTrend:[{quarter:"Q1",investment:1200,return:800},{quarter:"Q2",investment:1500,return:1400},{quarter:"Q3",investment:1800,return:2200},{quarter:"Q4",investment:2100,return:3500}],metrics:{targetRate:"118%",costSaving:"¥2800万",roi:"156%",energyReduce:"3.2%"}}},q8=[{name:"研发投入",value:2500,color:"#ef4444"},{name:"设备采购",value:1800,color:"#f59e0b"},{name:"人员培训",value:500,color:"#eab308"},{name:"运营成本",value:800,color:"#84cc16"}];function $3e(){const[t,e]=O.useState(W8[2]),[n,r]=O.useState(0),i=z3e[t.value],a=s=>{e(s),r(o=>o+1),Ye.info(`已切换到${s.label}数据视图`,{duration:1500})};return d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"技术经济性分析报告生成系统"}),d.jsx("p",{className:"text-sm text-slate-400",children:"系统应用效果量化评估与投资回报分析"})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>Ye.info("周期选择功能已开放",{duration:2e3}),className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white text-sm font-medium transition-colors flex items-center gap-2",children:[d.jsx(EK,{className:"w-4 h-4"}),"选择周期"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.promise(new Promise(s=>setTimeout(s,2500)),{loading:`正在生成${t.label}经济分析报告...`,success:()=>`报告生成成功!已保存至 /reports/economic-${t.value}.pdf`,error:"报告生成失败"})},className:"px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center gap-2",children:[d.jsx(Fc,{className:"w-5 h-5"}),"生成报告"]})]})]}),d.jsx(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex gap-3",children:W8.map(s=>d.jsx("button",{onClick:()=>a(s),className:`px-6 py-3 rounded-lg transition-all ${t.value===s.value?"bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-lg shadow-blue-500/20":"bg-slate-800/50 text-slate-300 hover:bg-slate-800"}`,children:s.label},s.value))},n),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[{icon:ep,label:"目标达成率",value:i.metrics.targetRate,change:"+18%",color:"from-green-500 to-emerald-500"},{icon:R5,label:"成本节约",value:i.metrics.costSaving,change:"+40%",color:"from-blue-500 to-cyan-500"},{icon:Ni,label:"ROI",value:i.metrics.roi,change:"+36%",color:"from-purple-500 to-pink-500"},{icon:Qr,label:"能耗降低",value:i.metrics.energyReduce,change:"+0.7%",color:"from-orange-500 to-red-500"}].map((s,o)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o*.1},whileHover:{scale:1.05,y:-5},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("div",{className:`absolute top-0 right-0 w-24 h-24 bg-gradient-to-br ${s.color} opacity-10 rounded-full blur-2xl`}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:`w-12 h-12 rounded-lg bg-gradient-to-br ${s.color} flex items-center justify-center mb-3`,children:d.jsx(s.icon,{className:"w-6 h-6 text-white"})}),d.jsx("div",{className:"text-sm text-slate-400 mb-1",children:s.label}),d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx("span",{className:"text-2xl font-bold text-white",children:s.value}),d.jsxs("span",{className:"text-sm text-green-400 flex items-center gap-1",children:[d.jsx(Ni,{className:"w-3 h-3"}),s.change]})]})]})]},`${s.label}-${n}`))}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Ni,{className:"w-5 h-5 text-green-400"}),"质量提升趋势"]}),d.jsx("div",{className:"h-64",children:d.jsx(Ci,{width:"100%",height:"100%",children:d.jsxs(Dd,{data:i.qualityImprovements,children:[d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155"}),d.jsx(Ur,{dataKey:"month",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{domain:[93,98],stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"rgba(15, 23, 42, 0.9)",border:"1px solid #334155",borderRadius:"8px"}}),d.jsx(gi,{type:"monotone",dataKey:"rate",stroke:"#10b981",strokeWidth:3,dot:{fill:"#10b981",strokeWidth:2},activeDot:{r:6,fill:"#10b981"}})]})})})]},`quality-${n}`),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Qr,{className:"w-5 h-5 text-orange-400"}),"能耗节约对比 (单位: kWh)"]}),d.jsx("div",{className:"h-64",children:d.jsx(Ci,{width:"100%",height:"100%",children:d.jsxs(fP,{data:i.energySavings,children:[d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155"}),d.jsx(Ur,{dataKey:"category",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"rgba(15, 23, 42, 0.9)",border:"1px solid #334155",borderRadius:"8px"}}),d.jsx(ms,{}),d.jsx(Ms,{dataKey:"before",name:"改造前",fill:"#ef4444",radius:[4,4,0,0]}),d.jsx(Ms,{dataKey:"after",name:"改造后",fill:"#10b981",radius:[4,4,0,0]})]})})})]},`energy-${n}`),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(R5,{className:"w-5 h-5 text-yellow-400"}),"投资成本构成"]}),d.jsx("div",{className:"h-64 flex items-center justify-center",children:d.jsxs(v$,{children:[d.jsx(js,{data:q8,cx:"50%",cy:"50%",innerRadius:60,outerRadius:100,paddingAngle:5,dataKey:"value",children:q8.map((s,o)=>d.jsx(rm,{fill:s.color},`cell-${o}`))}),d.jsx(Xn,{contentStyle:{backgroundColor:"rgba(15, 23, 42, 0.9)",border:"1px solid #334155",borderRadius:"8px"},formatter:s=>[`¥${s}万`,""]}),d.jsx(ms,{})]})})]},`cost-${n}`),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h3",{className:"font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Ni,{className:"w-5 h-5 text-blue-400"}),"投资回报趋势"]}),d.jsx("div",{className:"h-64",children:d.jsx(Ci,{width:"100%",height:"100%",children:d.jsxs(Dd,{data:i.roiTrend,children:[d.jsx(Yi,{strokeDasharray:"3 3",stroke:"#334155"}),d.jsx(Ur,{dataKey:"quarter",stroke:"#94a3b8",fontSize:12}),d.jsx(Br,{stroke:"#94a3b8",fontSize:12}),d.jsx(Xn,{contentStyle:{backgroundColor:"rgba(15, 23, 42, 0.9)",border:"1px solid #334155",borderRadius:"8px"},formatter:s=>[`¥${s}万`,""]}),d.jsx(ms,{}),d.jsx(gi,{type:"monotone",dataKey:"investment",name:"投资",stroke:"#ef4444",strokeWidth:2}),d.jsx(gi,{type:"monotone",dataKey:"return",name:"回报",stroke:"#10b981",strokeWidth:2})]})})})]},`roi-${n}`)]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h3",{className:"font-semibold text-white mb-4",children:"效益明细表"}),d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-slate-700",children:[d.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-slate-400",children:"指标类别"}),d.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-slate-400",children:"指标名称"}),d.jsx("th",{className:"text-right py-3 px-4 text-sm font-medium text-slate-400",children:"实际值"}),d.jsx("th",{className:"text-right py-3 px-4 text-sm font-medium text-slate-400",children:"目标值"}),d.jsx("th",{className:"text-right py-3 px-4 text-sm font-medium text-slate-400",children:"达成状态"})]})}),d.jsxs("tbody",{children:[d.jsxs("tr",{className:"border-b border-slate-800",children:[d.jsx("td",{className:"py-3 px-4 text-sm text-slate-300",rowSpan:3,children:"质量指标"}),d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:"带钢一级品率提升"}),d.jsx("td",{className:"py-3 px-4 text-sm text-green-400 text-right",children:"+0.5%"}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-400 text-right",children:"+0.3%"}),d.jsx("td",{className:"py-3 px-4 text-right",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-green-400 text-xs",children:"超额完成"})})]}),d.jsxs("tr",{className:"border-b border-slate-800",children:[d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:"氧化铝溶出率"}),d.jsx("td",{className:"py-3 px-4 text-sm text-green-400 text-right",children:"94.2%"}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-400 text-right",children:"94%"}),d.jsx("td",{className:"py-3 px-4 text-right",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-green-400 text-xs",children:"超额完成"})})]}),d.jsxs("tr",{className:"border-b border-slate-800",children:[d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:"产品合格率"}),d.jsx("td",{className:"py-3 px-4 text-sm text-green-400 text-right",children:"99.2%"}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-400 text-right",children:"98.5%"}),d.jsx("td",{className:"py-3 px-4 text-right",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-green-400 text-xs",children:"超额完成"})})]}),d.jsxs("tr",{className:"border-b border-slate-800",children:[d.jsx("td",{className:"py-3 px-4 text-sm text-slate-300",rowSpan:3,children:"能耗指标"}),d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:"吨钢能耗下降"}),d.jsx("td",{className:"py-3 px-4 text-sm text-green-400 text-right",children:"3.2%"}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-400 text-right",children:"2.5%"}),d.jsx("td",{className:"py-3 px-4 text-right",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-green-400 text-xs",children:"超额完成"})})]}),d.jsxs("tr",{className:"border-b border-slate-800",children:[d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:"氧气放散减少"}),d.jsx("td",{className:"py-3 px-4 text-sm text-green-400 text-right",children:"8%"}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-400 text-right",children:"5%"}),d.jsx("td",{className:"py-3 px-4 text-right",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-green-400 text-xs",children:"超额完成"})})]}),d.jsxs("tr",{className:"border-b border-slate-800",children:[d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:"电解铝电耗"}),d.jsx("td",{className:"py-3 px-4 text-sm text-green-400 text-right",children:"13200 kWh/t"}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-400 text-right",children:"13300 kWh/t"}),d.jsx("td",{className:"py-3 px-4 text-right",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-green-400 text-xs",children:"超额完成"})})]}),d.jsxs("tr",{children:[d.jsx("td",{className:"py-3 px-4 text-sm text-slate-300",rowSpan:3,children:"经济指标"}),d.jsx("td",{className:"py-3 px-4 text-sm text-white",children:"年度成本节约"}),d.jsxs("td",{className:"py-3 px-4 text-sm text-green-400 text-right",children:["¥",i.metrics.costSaving]}),d.jsx("td",{className:"py-3 px-4 text-sm text-slate-400 text-right",children:"¥2000万"}),d.jsx("td",{className:"py-3 px-4 text-right",children:d.jsx("span",{className:"px-2 py-1 rounded-full bg-green-500/20 text-green-400 text-xs",children:"超额完成"})})]})]})]})})]},`table-${n}`)]})}const X8=[{id:1,entityA:"磨煤机跳闸",entityB:"给煤机跳闸",cosineDistance:.75,jaccardCoefficient:.45,recommendation:"不匹配",confidence:85,attributes:{entityA:["设备故障","煤粉系统","跳闸现象"],entityB:["设备故障","给煤系统","跳闸现象"]}},{id:2,entityA:"过热器故障",entityB:"过热器异常",cosineDistance:.92,jaccardCoefficient:.78,recommendation:"建议合并",confidence:95,attributes:{entityA:["换热设备","高温区域","故障状态"],entityB:["换热设备","高温区域","异常状态"]}},{id:3,entityA:"水冷壁温度过高",entityB:"水冷壁超温",cosineDistance:.88,jaccardCoefficient:.82,recommendation:"建议合并",confidence:92,attributes:{entityA:["水冷系统","温度异常","高温状态"],entityB:["水冷系统","温度异常","超温状态"]}},{id:4,entityA:"引风机故障",entityB:"送风机故障",cosineDistance:.68,jaccardCoefficient:.52,recommendation:"不匹配",confidence:78,attributes:{entityA:["通风设备","引风系统","故障状态"],entityB:["通风设备","送风系统","故障状态"]}}],V3e=[{time:"10:45",entityA:"省煤器堵灰",entityB:"省煤器堵塞",action:"已合并",operator:"系统"},{time:"10:30",entityA:"空预器漏风",entityB:"空气预热器漏风",action:"已合并",operator:"系统"},{time:"10:15",entityA:"炉膛负压高",entityB:"炉膛负压低",action:"已拒绝",operator:"人工"},{time:"10:00",entityA:"给水温度低",entityB:"给水温度偏低",action:"已合并",operator:"系统"}],xh={pending:156,merged:142,rejected:14,autoMerged:128,manualReview:14};function H3e(){const[t,e]=O.useState(X8[1]),[n,r]=O.useState(null),[i,a]=O.useState(null),[s,o]=O.useState(!1);O.useEffect(()=>{o(!0);const h=setTimeout(()=>o(!1),500);return()=>clearTimeout(h)},[t.id]);const c=h=>{r(h),a(h),Ye.promise(new Promise(f=>setTimeout(f,2e3)),{loading:"正在合并实体...",success:()=>(r(null),a(null),"实体合并成功!"),error:"合并失败"})},l=h=>{r(h),Ye.promise(new Promise(f=>setTimeout(f,1500)),{loading:"正在处理...",success:()=>(r(null),"已拒绝合并"),error:"操作失败"})};return d.jsxs("div",{className:"h-full p-6 space-y-6 overflow-y-auto",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-bold text-white mb-1 flex items-center gap-2",children:["知识融合与消歧系统",d.jsx(B.div,{animate:{rotate:360},transition:{duration:3,repeat:1/0,ease:"linear"},children:d.jsx(GM,{className:"w-6 h-6 text-cyan-400"})})]}),d.jsx("p",{className:"text-sm text-slate-400",children:"基于余弦距离与Jaccard系数的智能实体融合"})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.promise(new Promise(h=>setTimeout(h,1500)),{loading:"正在刷新融合队列...",success:()=>"队列已更新",error:"刷新失败"})},className:"px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white text-sm font-medium transition-colors flex items-center gap-2",children:[d.jsx(ps,{className:"w-4 h-4"}),"刷新队列"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>{Ye.promise(new Promise(h=>setTimeout(h,2e3)),{loading:"正在生成融合报告...",success:"报告导出成功!",error:"导出失败"})},className:"px-6 py-3 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-medium hover:shadow-lg hover:shadow-blue-500/20 transition-all flex items-center gap-2",children:[d.jsx(Fc,{className:"w-5 h-5"}),"导出报告"]})]})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[{label:"待融合实体",value:xh.pending,color:"from-blue-500 to-cyan-500",icon:Yh},{label:"已融合",value:xh.merged,color:"from-green-500 to-emerald-500",icon:Cr},{label:"已拒绝",value:xh.rejected,color:"from-red-500 to-pink-500",icon:C5},{label:"自动合并",value:xh.autoMerged,color:"from-purple-500 to-indigo-500",icon:ps},{label:"待确认",value:xh.manualReview,color:"from-yellow-500 to-orange-500",icon:Yh}].map((h,f)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0,scale:s?[1,1.05,1]:1},transition:{delay:f*.1,scale:{duration:.3}},whileHover:{scale:1.05,y:-5},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-4",children:[d.jsx(B.div,{className:`absolute -top-4 -right-4 w-16 h-16 bg-gradient-to-br ${h.color} opacity-10 rounded-full blur-xl`,animate:{scale:[1,1.2,1],opacity:[.1,.2,.1]},transition:{duration:3,repeat:1/0}}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:`w-10 h-10 rounded-lg bg-gradient-to-br ${h.color} flex items-center justify-center mb-3 shadow-lg`,children:d.jsx(h.icon,{className:"w-5 h-5 text-white"})}),d.jsx("div",{className:"text-xs text-slate-400 mb-1",children:h.label}),d.jsx(B.div,{initial:{scale:1.3,opacity:.5},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:300},className:"text-2xl font-bold text-white",children:h.value},h.value)]})]},h.label))}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:"待融合实体列表"}),X8.map((h,f)=>d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:f*.1},onClick:()=>e(h),className:`relative overflow-hidden rounded-xl backdrop-blur-sm p-6 cursor-pointer transition-all ${t.id===h.id?"bg-gradient-to-br from-blue-900/50 to-purple-900/50 border-2 border-blue-500/50 shadow-lg shadow-blue-500/20":"bg-slate-900/50 border border-slate-800/50 hover:border-slate-700/50"}`,children:[n===h.id&&d.jsx("div",{className:"absolute inset-0 bg-blue-500/10 flex items-center justify-center backdrop-blur-sm z-10",children:d.jsx(B.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:d.jsx(ps,{className:"w-8 h-8 text-blue-400"})})}),d.jsx(mi,{children:i===h.id&&d.jsxs(B.div,{initial:{opacity:0,scale:1},animate:{opacity:1,scale:1},exit:{opacity:0},className:"absolute inset-0 z-20 flex items-center justify-center",children:[d.jsx(B.div,{className:"absolute inset-0 bg-gradient-to-r from-green-500/30 via-transparent to-purple-500/30",animate:{x:["-100%","100%"]},transition:{duration:1,ease:"easeInOut"}}),d.jsxs(B.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{duration:.3},className:"relative flex items-center gap-2 px-4 py-2 rounded-full bg-green-500/80 text-white font-medium",children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:.5,repeat:1/0},children:d.jsx(GM,{className:"w-5 h-5"})}),d.jsx("span",{children:"正在合并..."})]})]})}),d.jsxs("div",{className:"flex items-start justify-between mb-4",children:[d.jsxs("div",{className:"flex-1",children:[d.jsxs(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-2 mb-2",children:[d.jsx(Qr,{className:"w-3 h-3 text-cyan-400"}),d.jsx("span",{className:"text-xs text-cyan-400",children:"待融合"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(B.span,{whileHover:{scale:1.05},className:"px-2 py-1 rounded bg-blue-500/20 text-xs text-blue-400 border border-blue-500/30",children:"A"}),d.jsx("span",{className:"text-white font-medium",children:h.entityA})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(B.span,{whileHover:{scale:1.05},className:"px-2 py-1 rounded bg-purple-500/20 text-xs text-purple-400 border border-purple-500/30",children:"B"}),d.jsx("span",{className:"text-white font-medium",children:h.entityB})]})]})]}),d.jsx(B.div,{animate:h.recommendation==="建议合并"?{boxShadow:["0 0 10px rgba(34, 197, 94, 0.3)","0 0 20px rgba(34, 197, 94, 0.6)","0 0 10px rgba(34, 197, 94, 0.3)"]}:{},transition:{duration:1.5,repeat:1/0},className:`px-3 py-1.5 rounded-lg border ${h.recommendation==="建议合并"?"bg-green-500/20 border-green-500/50 text-green-400":"bg-red-500/20 border-red-500/50 text-red-400"}`,children:d.jsx("span",{className:"text-xs font-semibold",children:h.recommendation})})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"p-3 rounded-lg bg-slate-800/50 relative overflow-hidden",children:[d.jsx(B.div,{className:"absolute inset-0 bg-gradient-to-r from-blue-500/10 to-transparent",animate:{x:["-100%","200%"]},transition:{duration:3,repeat:1/0,ease:"linear"}}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(ep,{className:"w-3 h-3 text-blue-400"}),d.jsx("span",{className:"text-xs text-slate-400",children:"余弦距离"})]}),d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx(B.span,{animate:h.cosineDistance>=.8?{textShadow:["0 0 10px rgba(34, 197, 94, 0.5)","0 0 20px rgba(34, 197, 94, 0.8)","0 0 10px rgba(34, 197, 94, 0.5)"]}:{},className:`text-xl font-bold ${h.cosineDistance>=.8?"text-green-400":"text-yellow-400"}`,children:h.cosineDistance.toFixed(2)}),d.jsx("span",{className:"text-xs text-slate-500",children:"阈值: 0.8"})]}),d.jsx("div",{className:"mt-2 w-full h-1.5 bg-slate-700 rounded-full overflow-hidden",children:d.jsxs(B.div,{initial:{width:0},animate:{width:`${h.cosineDistance*100}%`},transition:{duration:1,delay:.5},className:"h-full rounded-full relative overflow-hidden",children:[d.jsx("div",{className:`absolute inset-0 ${h.cosineDistance>=.8?"bg-gradient-to-r from-green-500 to-emerald-500":"bg-gradient-to-r from-yellow-500 to-orange-500"}`}),d.jsx(B.div,{className:"absolute inset-0 bg-white/30",animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}})]})})]})]}),d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:"p-3 rounded-lg bg-slate-800/50 relative overflow-hidden",children:[d.jsx(B.div,{className:"absolute inset-0 bg-gradient-to-r from-purple-500/10 to-transparent",animate:{x:["-100%","200%"]},transition:{duration:3,repeat:1/0,ease:"linear",delay:.5}}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(Qr,{className:"w-3 h-3 text-purple-400"}),d.jsx("span",{className:"text-xs text-slate-400",children:"Jaccard系数"})]}),d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx(B.span,{animate:h.jaccardCoefficient>=.6?{textShadow:["0 0 10px rgba(34, 197, 94, 0.5)","0 0 20px rgba(34, 197, 94, 0.8)","0 0 10px rgba(34, 197, 94, 0.5)"]}:{},className:`text-xl font-bold ${h.jaccardCoefficient>=.6?"text-green-400":"text-yellow-400"}`,children:h.jaccardCoefficient.toFixed(2)}),d.jsx("span",{className:"text-xs text-slate-500",children:"阈值: 0.6"})]}),d.jsx("div",{className:"mt-2 w-full h-1.5 bg-slate-700 rounded-full overflow-hidden",children:d.jsxs(B.div,{initial:{width:0},animate:{width:`${h.jaccardCoefficient*100}%`},transition:{duration:1,delay:.7},className:"h-full rounded-full relative overflow-hidden",children:[d.jsx("div",{className:`absolute inset-0 ${h.jaccardCoefficient>=.6?"bg-gradient-to-r from-green-500 to-emerald-500":"bg-gradient-to-r from-yellow-500 to-orange-500"}`}),d.jsx(B.div,{className:"absolute inset-0 bg-white/30",animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}})]})})]})]})]}),d.jsxs("div",{className:"flex gap-3",children:[d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:m=>{m.stopPropagation(),c(h.id)},disabled:n===h.id,className:"flex-1 px-4 py-2 rounded-lg bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white text-sm font-medium transition-all flex items-center justify-center gap-2 disabled:opacity-50",children:[d.jsx(Cr,{className:"w-4 h-4"}),"合并实体"]}),d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:m=>{m.stopPropagation(),l(h.id)},disabled:n===h.id,className:"flex-1 px-4 py-2 rounded-lg bg-slate-800/50 hover:bg-slate-800 text-white text-sm font-medium transition-colors flex items-center justify-center gap-2 disabled:opacity-50",children:[d.jsx(C5,{className:"w-4 h-4"}),"拒绝合并"]})]}),d.jsxs("div",{className:"mt-3 text-xs text-slate-500 flex items-center gap-2",children:[d.jsxs("span",{children:["置信度: ",h.confidence,"%"]}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:["ID: #",h.id]})]})]},h.id))]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"属性对比"}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-2",children:"实体 A 属性"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:t.attributes.entityA.map((h,f)=>d.jsx("span",{className:"px-2 py-1 rounded bg-blue-500/20 text-xs text-blue-400",children:h},f))})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm text-slate-400 mb-2",children:"实体 B 属性"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:t.attributes.entityB.map((h,f)=>d.jsx("span",{className:"px-2 py-1 rounded bg-purple-500/20 text-xs text-purple-400",children:h},f))})]})]})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(_s,{className:"w-4 h-4 text-slate-400"}),"融合历史"]}),d.jsxs(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},className:"flex items-center gap-1 text-xs text-slate-500",children:[d.jsx(yr,{className:"w-3 h-3"}),d.jsx("span",{children:"实时更新"})]})]}),d.jsx("div",{className:"space-y-3",children:V3e.map((h,f)=>d.jsxs(B.div,{initial:{opacity:0,y:10,x:-10},animate:{opacity:1,y:0,x:0},transition:{delay:.4+f*.05},whileHover:{x:5,backgroundColor:"rgba(51, 65, 85, 0.5)"},className:"p-3 rounded-lg bg-slate-800/50 transition-colors cursor-pointer",children:[d.jsxs("div",{className:"flex items-center justify-between mb-1",children:[d.jsxs(B.span,{animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0,delay:f*.2},className:"text-xs text-slate-500 flex items-center gap-1",children:[d.jsx(_s,{className:"w-3 h-3"}),h.time]}),d.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${h.action==="已合并"?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:h.action})]}),d.jsxs("div",{className:"text-sm text-white mb-1",children:[h.entityA," ↔ ",h.entityB]}),d.jsx("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(Ni,{className:"w-3 h-3"}),h.operator]})})]},f))})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"算法参数"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center mb-2",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"余弦距离阈值"}),d.jsx("span",{className:"text-sm text-white",children:"0.8"})]}),d.jsx("input",{type:"range",min:"0",max:"1",step:"0.01",defaultValue:"0.8",className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center mb-2",children:[d.jsx("span",{className:"text-sm text-slate-400",children:"Jaccard系数阈值"}),d.jsx("span",{className:"text-sm text-white",children:"0.6"})]}),d.jsx("input",{type:"range",min:"0",max:"1",step:"0.01",defaultValue:"0.6",className:"w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer"})]})]})]})]})]})]})}const Ql={fault:{label:"故障类型",color:"#ef4444",bgColor:"bg-red-500/20",borderColor:"border-red-500/50",textColor:"text-red-400"},symptom:{label:"故障现象",color:"#f59e0b",bgColor:"bg-yellow-500/20",borderColor:"border-yellow-500/50",textColor:"text-yellow-400"},cause:{label:"故障原因",color:"#3b82f6",bgColor:"bg-blue-500/20",borderColor:"border-blue-500/50",textColor:"text-blue-400"},solution:{label:"解决方案",color:"#10b981",bgColor:"bg-green-500/20",borderColor:"border-green-500/50",textColor:"text-green-400"},prevention:{label:"防范措施",color:"#a855f7",bgColor:"bg-purple-500/20",borderColor:"border-purple-500/50",textColor:"text-purple-400"}},G3e=["表现","由于","导致","对策","预防"],W3e=["给煤机表现出跳闸故障现象,由于皮带松紧不当导致设备停机。","电机过热会导致停机故障,对策是检查散热系统并清理风扇。","冷却壁水温差上升可能预示堵塞,预防措施是定期检查冷却水系统。"],q3e=[{text:"给煤机",type:"fault",start:0,end:3},{text:"跳闸",type:"symptom",start:5,end:7},{text:"皮带松紧不当",type:"cause",start:12,end:18}],X3e=[{source:"给煤机",target:"跳闸",type:"表现"},{source:"皮带松紧不当",target:"跳闸",type:"导致"}];function K3e(){const[t,e]=O.useState("给煤机表现出跳闸故障现象,由于皮带松紧不当导致设备停机。"),[n,r]=O.useState(q3e),[i,a]=O.useState(X3e),[s,o]=O.useState(!1),[c,l]=O.useState(!1),[h,f]=O.useState(0),[m,g]=O.useState({epoch:68,totalEpochs:100,loss:.023,f1:.91,precision:.93,recall:.89}),[b,y]=O.useState(!1),[v,w]=O.useState("extract"),_=()=>{if(!t.trim()){Ye.error("请输入文本内容");return}l(!0),r([]),a([]),y(!1),Ye.promise(new Promise(A=>setTimeout(A,2e3)),{loading:"正在抽取实体和关系...",success:()=>{l(!1);const A=[{text:"给煤机",type:"fault",start:0,end:3},{text:"跳闸",type:"symptom",start:5,end:7},{text:"皮带松紧不当",type:"cause",start:12,end:18},{text:"设备停机",type:"symptom",start:23,end:27}],N=[{source:"给煤机",target:"跳闸",type:"表现"},{source:"皮带松紧不当",target:"跳闸",type:"导致"},{source:"给煤机",target:"设备停机",type:"表现"}];return r(A),a(N),y(!0),"抽取完成!"},error:"抽取失败"})},E=()=>{if(o(!s),s)Ye.info("训练已暂停");else{Ye.success("开始模型训练...");let A=h;const N=setInterval(()=>{A+=Math.random()*2,A>=100&&(A=100,o(!1),clearInterval(N),Ye.success("模型训练完成!")),f(Math.min(A,100)),g(P=>({...P,epoch:Math.floor(A)+1,loss:Math.max(.01,.05-A*3e-4),f1:Math.min(.98,.85+A*.001),precision:Math.min(.97,.86+A*.001),recall:Math.min(.96,.84+A*.001)}))},500)}},M=A=>{e(A),y(!1),r([]),a([])},T=()=>{if(!b||n.length===0)return t;const A=[...n].sort((R,F)=>R.start-F.start),N=[];let P=0;return A.forEach(R=>{R.start>P&&N.push({text:t.slice(P,R.start)}),N.push({text:R.text,entity:R}),P=R.end}),P<t.length&&N.push({text:t.slice(P)}),N.map((R,F)=>{if(R.entity){const D=Ql[R.entity.type];return d.jsx(B.span,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},className:`${D.bgColor} ${D.borderColor} border rounded px-1 mx-0.5`,children:d.jsx("span",{className:`${D.textColor} font-medium`,children:R.text})},F)}return d.jsx("span",{className:"text-slate-300",children:R.text},F)})};return d.jsxs("div",{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white mb-1",children:"BERT-BiLSTM-CRF 实体关系抽取"}),d.jsx("p",{className:"text-sm text-slate-400",children:"基于深度学习的工业知识自动化抽取系统"})]}),d.jsx("div",{className:"flex items-center gap-3",children:d.jsxs(B.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-slate-800/50",children:[d.jsx(gl,{className:"w-4 h-4 text-purple-400"}),d.jsx("span",{className:"text-sm text-slate-300",children:"模型状态"}),d.jsx(B.div,{animate:{opacity:[.5,1,.5]},transition:{duration:1.5,repeat:1/0},className:"w-2 h-2 rounded-full bg-green-400"})]})})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("div",{className:"flex items-center justify-between mb-4",children:d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(nv,{className:"w-5 h-5 text-blue-400"}),"模型架构"]})}),d.jsx("div",{className:"flex items-center justify-between gap-2 overflow-x-auto pb-2",children:[{label:"输入文本",icon:Mc,color:"from-slate-500 to-slate-600"},{label:"BERT嵌入",icon:vl,color:"from-blue-500 to-blue-600"},{label:"BiLSTM",icon:nv,color:"from-purple-500 to-purple-600"},{label:"自注意力",icon:Qr,color:"from-yellow-500 to-yellow-600"},{label:"CRF输出",icon:ep,color:"from-green-500 to-green-600"}].map((A,N)=>d.jsxs("div",{className:"flex items-center",children:[d.jsxs(B.div,{whileHover:{scale:1.05,y:-3},className:`flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-gradient-to-br ${A.color} min-w-[100px]`,children:[d.jsx(A.icon,{className:"w-6 h-6 text-white"}),d.jsx("span",{className:"text-xs font-medium text-white",children:A.label})]}),N<4&&d.jsx(B.div,{animate:{x:[0,5,0]},transition:{duration:1,repeat:1/0},className:"mx-1",children:d.jsx(_h,{className:"w-4 h-4 text-slate-400"})})]},A.label))})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(Mc,{className:"w-5 h-5 text-cyan-400"}),"文本输入"]}),d.jsx("div",{className:"flex-1 h-px bg-slate-700"})]}),d.jsxs("div",{className:"mb-4",children:[d.jsx("label",{className:"text-sm text-slate-400 mb-2 block",children:"示例文本"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:W3e.map((A,N)=>d.jsxs(B.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>M(A),className:"text-xs px-3 py-1.5 rounded-lg bg-slate-800/50 text-slate-400 hover:text-white hover:bg-slate-800 transition-colors text-left",children:[A.slice(0,20),"..."]},N))})]}),d.jsxs("div",{className:"relative",children:[d.jsx("textarea",{value:t,onChange:A=>{e(A.target.value),y(!1)},placeholder:"请输入需要抽取的文本内容...",className:"w-full h-32 px-4 py-3 rounded-lg bg-slate-800/50 border border-slate-700/50 text-white placeholder-slate-500 resize-none focus:outline-none focus:border-blue-500/50 focus:ring-2 focus:ring-blue-500/20 transition-all"}),d.jsx(mi,{children:c&&d.jsx(B.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 flex items-center justify-center bg-slate-900/80 rounded-lg",children:d.jsx(B.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},className:"w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full"})})})]}),d.jsx("div",{className:"flex items-center gap-3 mt-4",children:d.jsxs(B.button,{whileHover:{scale:1.03},whileTap:{scale:.97},onClick:_,disabled:c,className:"flex items-center gap-2 px-5 py-2.5 rounded-lg bg-gradient-to-r from-blue-500 to-cyan-500 text-white font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:[c?d.jsx(B.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:d.jsx(CB,{className:"w-4 h-4"})}):d.jsx(ep,{className:"w-4 h-4"}),c?"抽取中...":"开始抽取"]})})]}),d.jsx(mi,{children:b&&d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(tv,{className:"w-5 h-5 text-green-400"}),"抽取结果"]}),d.jsxs(B.span,{initial:{scale:0},animate:{scale:1},className:"flex items-center gap-1 text-xs px-2 py-1 rounded bg-green-500/20 text-green-400",children:[d.jsx(tv,{className:"w-3 h-3"}),"抽取成功"]})]}),d.jsxs("div",{className:"mb-4 p-4 rounded-lg bg-slate-800/50",children:[d.jsx("label",{className:"text-xs text-slate-500 mb-2 block",children:"高亮文本"}),d.jsx("p",{className:"text-base leading-relaxed",children:T()})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{children:[d.jsxs("h3",{className:"text-sm font-medium text-white mb-3 flex items-center gap-2",children:[d.jsx(Qh,{className:"w-4 h-4 text-orange-400"}),"实体列表 (",n.length,")"]}),d.jsx("div",{className:"space-y-2",children:d.jsx(mi,{children:n.map((A,N)=>d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:N*.1},className:`flex items-center justify-between p-2 rounded-lg ${Ql[A.type].bgColor} border ${Ql[A.type].borderColor}`,children:[d.jsx("span",{className:"text-sm text-white font-mono",children:A.text}),d.jsx("span",{className:`text-xs px-2 py-0.5 rounded ${Ql[A.type].bgColor} ${Ql[A.type].textColor}`,children:Ql[A.type].label})]},`${A.text}-${N}`))})})]}),d.jsxs("div",{children:[d.jsxs("h3",{className:"text-sm font-medium text-white mb-3 flex items-center gap-2",children:[d.jsx(_h,{className:"w-4 h-4 text-purple-400"}),"关系列表 (",i.length,")"]}),d.jsx("div",{className:"space-y-2",children:d.jsx(mi,{children:i.map((A,N)=>d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:N*.1},className:"flex items-center gap-2 p-2 rounded-lg bg-slate-800/50 border border-slate-700/50",children:[d.jsx("span",{className:"text-sm text-cyan-400 font-mono",children:A.source}),d.jsx(B.span,{animate:{opacity:[.5,1,.5]},transition:{duration:1.5,repeat:1/0},className:"text-xs px-2 py-0.5 rounded bg-purple-500/20 text-purple-400",children:A.type}),d.jsx(_h,{className:"w-3 h-3 text-slate-500"}),d.jsx("span",{className:"text-sm text-cyan-400 font-mono",children:A.target})]},`${A.source}-${A.target}-${N}`))})})]})]})]})})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Ni,{className:"w-5 h-5 text-green-400"}),"训练状态"]}),d.jsxs("div",{className:"mb-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-sm mb-2",children:[d.jsx("span",{className:"text-slate-400",children:"训练进度"}),d.jsxs("span",{className:"text-white font-medium",children:[Math.round(h),"%"]})]}),d.jsx("div",{className:"h-3 bg-slate-800 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${h}%`},className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500 rounded-full relative",children:d.jsx(B.div,{className:"absolute inset-0 bg-white/30",animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}})})}),d.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Epoch ",m.epoch,"/",m.totalEpochs]})]}),d.jsx("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[{label:"Loss",value:m.loss.toFixed(3),color:"text-red-400"},{label:"F1",value:m.f1.toFixed(2),color:"text-green-400"},{label:"Precision",value:m.precision.toFixed(2),color:"text-blue-400"},{label:"Recall",value:m.recall.toFixed(2),color:"text-yellow-400"}].map(A=>d.jsxs(B.div,{animate:s?{scale:[1,1.02,1]}:{},transition:{duration:2,repeat:1/0},className:"p-3 rounded-lg bg-slate-800/50",children:[d.jsx("div",{className:"text-xs text-slate-500 mb-1",children:A.label}),d.jsx("div",{className:`text-lg font-bold ${A.color}`,children:A.value})]},A.label))}),d.jsx(B.button,{whileHover:{scale:1.03},whileTap:{scale:.97},onClick:E,className:`w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg font-medium ${s?"bg-red-500/20 text-red-400 border border-red-500/50":"bg-green-500/20 text-green-400 border border-green-500/50"}`,children:s?d.jsxs(d.Fragment,{children:[d.jsx(Qp,{className:"w-4 h-4"}),"暂停训练"]}):d.jsxs(d.Fragment,{children:[d.jsx(Wd,{className:"w-4 h-4"}),"开始训练"]})})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"实体类型"}),d.jsx("div",{className:"space-y-2",children:Object.entries(Ql).map(([A,N])=>d.jsxs(B.div,{whileHover:{scale:1.02,x:3},className:`flex items-center justify-between p-2 rounded-lg ${N.bgColor} border ${N.borderColor}`,children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 rounded",style:{backgroundColor:N.color}}),d.jsx("span",{className:"text-sm text-white",children:N.label})]}),d.jsxs("span",{className:`text-xs ${N.textColor}`,children:[n.filter(P=>P.type===A).length,"个"]})]},A))})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"关系类型"}),d.jsx("div",{className:"space-y-2",children:G3e.map((A,N)=>d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4+N*.05},className:"flex items-center gap-2 p-2 rounded-lg bg-slate-800/50",children:[d.jsx(_h,{className:"w-4 h-4 text-purple-400"}),d.jsx("span",{className:"text-sm text-white",children:A}),d.jsxs("span",{className:"ml-auto text-xs text-slate-500",children:[i.filter(P=>P.type===A).length,"条"]})]},A))})]})]})]})]})}const Y3e=[{id:"edge-01",name:"产线边缘节点1",location:"1号车间",status:"online",syncRate:99.9,latency:45,lastSync:"10:30:15",dataVolume:2.4,security:"secure"},{id:"edge-02",name:"产线边缘节点2",location:"2号车间",status:"online",syncRate:99.8,latency:52,lastSync:"10:29:58",dataVolume:1.8,security:"secure"},{id:"edge-03",name:"产线边缘节点3",location:"3号车间",status:"offline",syncRate:0,latency:0,lastSync:"10:15:30",dataVolume:0,security:"warning"},{id:"edge-04",name:"质检边缘节点",location:"质检中心",status:"syncing",syncRate:98.5,latency:38,lastSync:"10:30:02",dataVolume:3.2,security:"secure"},{id:"edge-05",name:"仓储边缘节点",location:"原料仓库",status:"online",syncRate:99.7,latency:61,lastSync:"10:28:44",dataVolume:1.1,security:"secure"}],Z3e=[{id:"sync-001",type:"bidirectional",status:"syncing",progress:68,dataSize:"256MB",startTime:"10:28:00",nodeId:"edge-01"},{id:"sync-002",type:"upload",status:"completed",progress:100,dataSize:"128MB",startTime:"10:25:00",endTime:"10:26:30",nodeId:"edge-02"},{id:"sync-003",type:"download",status:"pending",progress:0,dataSize:"512MB",startTime:"10:30:00",nodeId:"edge-04"},{id:"sync-004",type:"bidirectional",status:"failed",progress:45,dataSize:"1.2GB",startTime:"10:20:00",nodeId:"edge-03"}],J3e=[{time:"10:25",type:"login",message:"边缘节点 edge-01 安全登录",level:"info"},{time:"10:18",type:"sync",message:"数据同步加密完成 AES-256",level:"success"},{time:"10:15",type:"warning",message:"边缘节点 edge-03 连接中断",level:"warning"},{time:"10:10",type:"shield",message:"入侵检测系统扫描完成 - 无异常",level:"success"}];function Q3e(){const[t,e]=O.useState(Y3e),[n,r]=O.useState(Z3e),[i,a]=O.useState(8.5),[s,o]=O.useState(4),[c,l]=O.useState("secure");O.useEffect(()=>{const g=setInterval(()=>{a(b=>{const y=Math.random()*.1;return Math.min(100,b+y)})},3e3);return()=>clearInterval(g)},[]);const h=g=>{Ye.promise(new Promise(b=>setTimeout(b,2e3)),{loading:"正在发起同步...",success:"同步任务已创建",error:"同步失败"})},f=g=>{e(b=>b.map(y=>y.id===g?{...y,status:"syncing"}:y)),Ye.info("正在重新连接..."),setTimeout(()=>{e(b=>b.map(y=>y.id===g?{...y,status:"online",syncRate:98.5,latency:55}:y)),Ye.success("节点已重新连接")},3e3)},m=g=>{switch(g){case"online":return{bg:"bg-green-500/20",text:"text-green-400",border:"border-green-500/50",dot:"bg-green-400"};case"offline":return{bg:"bg-red-500/20",text:"text-red-400",border:"border-red-500/50",dot:"bg-red-400"};case"syncing":return{bg:"bg-blue-500/20",text:"text-blue-400",border:"border-blue-500/50",dot:"bg-blue-400"};default:return{bg:"bg-slate-500/20",text:"text-slate-400",border:"border-slate-500/50",dot:"bg-slate-400"}}};return d.jsxs("div",{className:"p-6 space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-bold text-white mb-1 flex items-center gap-2",children:[d.jsx(HM,{className:"w-6 h-6 text-cyan-400"}),"边缘-云协同数据同步系统"]}),d.jsx("p",{className:"text-sm text-slate-400",children:"硬件防火墙保障 · AES-256加密传输 · 边缘推理节点管理"})]}),d.jsx("div",{className:"flex items-center gap-3",children:d.jsxs(B.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:`flex items-center gap-2 px-3 py-1.5 rounded-lg ${c==="secure"?"bg-green-500/20":c==="warning"?"bg-yellow-500/20":"bg-red-500/20"}`,children:[d.jsx(g1,{className:`w-4 h-4 ${c==="secure"?"text-green-400":c==="warning"?"text-yellow-400":"text-red-400"}`}),d.jsx("span",{className:`text-sm ${c==="secure"?"text-green-400":c==="warning"?"text-yellow-400":"text-red-400"}`,children:c==="secure"?"安全状态正常":c==="warning"?"存在安全风险":"安全告警"})]})})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[{label:"边缘节点总数",value:"5",icon:jg,color:"from-blue-500 to-cyan-500",sub:"4在线 / 1离线"},{label:"今日同步量",value:`${i.toFixed(1)}GB`,icon:m1,color:"from-purple-500 to-pink-500",sub:"较昨日 +12.5%"},{label:"活跃连接",value:`${s}`,icon:iv,color:"from-green-500 to-emerald-500",sub:"实时连接数"},{label:"平均延迟",value:"49ms",icon:GY,color:"from-orange-500 to-red-500",sub:"边缘到云端"}].map((g,b)=>d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:b*.1},whileHover:{scale:1.03,y:-3},className:"relative overflow-hidden rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-5",children:[d.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${g.color} opacity-5`}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("div",{className:`w-12 h-12 rounded-lg bg-gradient-to-br ${g.color} flex items-center justify-center`,children:d.jsx(g.icon,{className:"w-6 h-6 text-white"})}),d.jsx(B.div,{animate:{scale:[1,1.1,1]},transition:{duration:2,repeat:1/0},children:d.jsx(yr,{className:"w-5 h-5 text-slate-400"})})]}),d.jsx("div",{className:"text-2xl font-bold text-white mb-1",children:g.value}),d.jsx("div",{className:"text-sm text-slate-400",children:g.label}),d.jsx("div",{className:"text-xs text-slate-500 mt-1",children:g.sub})]})]},g.label))}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[d.jsx(jg,{className:"w-5 h-5 text-blue-400"}),"边缘节点状态"]}),d.jsxs("span",{className:"text-sm text-slate-400",children:[t.filter(g=>g.status!=="offline").length,"/",t.length," 在线"]})]}),d.jsx("div",{className:"space-y-3",children:d.jsx(mi,{children:t.map((g,b)=>{const y=m(g.status);return d.jsxs(B.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{delay:b*.1},whileHover:{scale:1.01},className:`relative overflow-hidden rounded-lg bg-slate-800/50 border ${y.border} p-4`,children:[d.jsx(B.div,{className:`absolute inset-0 ${y.bg}`,initial:{opacity:0},whileHover:{opacity:1},transition:{duration:.2}}),d.jsxs("div",{className:"relative flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("div",{className:"relative",children:[d.jsx(B.div,{animate:g.status==="syncing"?{rotate:360}:{},transition:g.status==="syncing"?{duration:2,repeat:1/0,ease:"linear"}:{},className:`w-10 h-10 rounded-lg bg-gradient-to-br ${g.status==="online"?"from-green-500 to-emerald-600":g.status==="syncing"?"from-blue-500 to-cyan-600":"from-red-500 to-orange-600"} flex items-center justify-center`,children:g.status==="online"?d.jsx(iv,{className:"w-5 h-5 text-white"}):g.status==="syncing"?d.jsx(ps,{className:"w-5 h-5 text-white"}):d.jsx(OB,{className:"w-5 h-5 text-white"})}),g.status==="syncing"&&d.jsx(B.div,{className:"absolute inset-0 border-2 border-blue-400 rounded-lg",animate:{scale:[1,1.2,1],opacity:[1,0,1]},transition:{duration:1.5,repeat:1/0}})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h3",{className:"font-medium text-white",children:g.name}),d.jsx("span",{className:`text-xs px-2 py-0.5 rounded ${y.bg} ${y.text}`,children:g.location})]}),d.jsxs("div",{className:"flex items-center gap-4 mt-1 text-xs text-slate-400",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(_s,{className:"w-3 h-3"}),g.lastSync]}),d.jsxs("span",{children:["数据量: ",g.dataVolume,"GB"]})]})]})]}),d.jsxs("div",{className:"flex items-center gap-6",children:[g.status!=="offline"&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"text-right",children:[d.jsx("div",{className:"text-xs text-slate-500",children:"同步率"}),d.jsxs(B.div,{animate:g.status==="syncing"?{scale:[1,1.05,1]}:{},transition:{duration:1.5,repeat:1/0},className:`text-lg font-bold ${g.syncRate>=99?"text-green-400":"text-yellow-400"}`,children:[g.syncRate.toFixed(1),"%"]})]}),d.jsxs("div",{className:"text-right",children:[d.jsx("div",{className:"text-xs text-slate-500",children:"延迟"}),d.jsxs("div",{className:"text-lg font-bold text-white",children:[g.latency,"ms"]})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[g.status==="online"&&d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>h(g.id),className:"p-2 rounded-lg bg-blue-500/20 text-blue-400 hover:bg-blue-500/30",children:d.jsx(ps,{className:"w-4 h-4"})}),g.status==="offline"&&d.jsx(B.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>f(g.id),className:"p-2 rounded-lg bg-green-500/20 text-green-400 hover:bg-green-500/30",children:d.jsx(Qr,{className:"w-4 h-4"})}),d.jsx("div",{className:`p-2 rounded-lg ${g.security==="secure"?"bg-green-500/20 text-green-400":g.security==="warning"?"bg-yellow-500/20 text-yellow-400":"bg-red-500/20 text-red-400"}`,children:g.security==="secure"?d.jsx(O5,{className:"w-4 h-4"}):d.jsx(g1,{className:"w-4 h-4"})})]})]})]}),g.status==="syncing"&&d.jsx("div",{className:"mt-3 h-1 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:"0%"},animate:{width:"68%"},transition:{duration:2},className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500"})})]},g.id)})})})]}),d.jsxs(B.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(m1,{className:"w-5 h-5 text-purple-400"}),"同步任务队列"]}),d.jsx("div",{className:"space-y-3",children:n.map((g,b)=>d.jsxs(B.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3+b*.1},className:"flex items-center justify-between p-3 rounded-lg bg-slate-800/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center ${g.type==="upload"?"bg-blue-500/20 text-blue-400":g.type==="download"?"bg-green-500/20 text-green-400":"bg-purple-500/20 text-purple-400"}`,children:g.type==="upload"?d.jsx(Dy,{className:"w-4 h-4"}):g.type==="download"?d.jsx(Fc,{className:"w-4 h-4"}):d.jsx(m1,{className:"w-4 h-4"})}),d.jsxs("div",{children:[d.jsxs("div",{className:"text-sm text-white",children:["节点: ",g.nodeId]}),d.jsxs("div",{className:"text-xs text-slate-500",children:[g.dataSize," · ",g.startTime]})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("div",{className:"text-right",children:[d.jsx("div",{className:`text-xs ${g.status==="completed"?"text-green-400":g.status==="failed"?"text-red-400":g.status==="syncing"?"text-blue-400":"text-slate-400"}`,children:g.status==="completed"?"已完成":g.status==="failed"?"失败":g.status==="syncing"?"同步中":"等待中"}),g.status==="syncing"&&d.jsxs("div",{className:"text-xs text-blue-400",children:[g.progress,"%"]})]}),g.status==="syncing"&&d.jsx("div",{className:"w-20 h-2 bg-slate-700 rounded-full overflow-hidden",children:d.jsx(B.div,{initial:{width:0},animate:{width:`${g.progress}%`},className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500"})})]})]},g.id))})]})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.4},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(g1,{className:"w-5 h-5 text-green-400"}),"安全状态"]}),d.jsx("div",{className:"space-y-3",children:[{label:"硬件防火墙",status:"正常",level:"success",icon:O5},{label:"数据传输加密",status:"AES-256",level:"success",icon:j5},{label:"入侵检测",status:"无异常",level:"success",icon:Gd},{label:"身份认证",status:"已启用",level:"success",icon:j5}].map((g,b)=>d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.4+b*.1},whileHover:{scale:1.02},className:"flex items-center justify-between p-3 rounded-lg bg-slate-800/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-green-500/20 flex items-center justify-center",children:d.jsx(g.icon,{className:"w-4 h-4 text-green-400"})}),d.jsx("span",{className:"text-sm text-white",children:g.label})]}),d.jsx("span",{className:"text-xs px-2 py-1 rounded bg-green-500/20 text-green-400",children:g.status})]},g.label))})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.5},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsxs("h2",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[d.jsx(Oy,{className:"w-5 h-5 text-yellow-400"}),"安全事件"]}),d.jsx("div",{className:"space-y-2",children:J3e.map((g,b)=>d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.5+b*.1},className:`flex items-start gap-3 p-2 rounded-lg ${g.level==="success"?"bg-green-500/10":g.level==="warning"?"bg-yellow-500/10":"bg-blue-500/10"}`,children:[d.jsx("div",{className:`w-2 h-2 rounded-full mt-1.5 ${g.level==="success"?"bg-green-400":g.level==="warning"?"bg-yellow-400":"bg-blue-400"}`}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-xs text-slate-500",children:g.time}),d.jsx("div",{className:"text-sm text-white",children:g.message})]})]},b))})]}),d.jsxs(B.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.6},className:"rounded-xl bg-slate-900/50 border border-slate-800/50 backdrop-blur-sm p-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-white mb-4",children:"数据流向"}),d.jsxs("div",{className:"relative h-48",children:[d.jsx(B.div,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center",animate:{scale:[1,1.05,1]},transition:{duration:2,repeat:1/0},children:d.jsx(HM,{className:"w-8 h-8 text-white"})}),d.jsx(B.div,{className:"absolute top-1/4 left-4 w-12 h-12 rounded-full bg-gradient-to-br from-green-500 to-emerald-500 flex items-center justify-center",animate:{y:[0,5,0]},transition:{duration:2,repeat:1/0},children:d.jsx(jg,{className:"w-6 h-6 text-white"})}),d.jsx(B.div,{className:"absolute top-1/4 right-4 w-12 h-12 rounded-full bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center",animate:{y:[0,-5,0]},transition:{duration:2.5,repeat:1/0},children:d.jsx(PB,{className:"w-6 h-6 text-white"})}),d.jsx(B.div,{className:"absolute bottom-4 left-1/2 -translate-x-1/2 w-12 h-12 rounded-full bg-gradient-to-br from-orange-500 to-red-500 flex items-center justify-center",animate:{scale:[1,1.1,1]},transition:{duration:1.5,repeat:1/0},children:d.jsx(vl,{className:"w-6 h-6 text-white"})}),d.jsxs("svg",{className:"absolute inset-0 w-full h-full",children:[d.jsx(B.path,{d:"M 40 30 Q 100 80 160 30",stroke:"url(#syncGradient)",strokeWidth:"2",fill:"none",strokeDasharray:"5,5",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2,repeat:1/0}}),d.jsx(B.path,{d:"M 200 30 Q 260 80 320 30",stroke:"url(#syncGradient2)",strokeWidth:"2",fill:"none",strokeDasharray:"5,5",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2,repeat:1/0,delay:.5}}),d.jsx(B.path,{d:"M 100 130 Q 180 60 260 130",stroke:"url(#syncGradient3)",strokeWidth:"2",fill:"none",strokeDasharray:"5,5",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2,repeat:1/0,delay:1}}),d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"syncGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d.jsx("stop",{offset:"0%",stopColor:"#10b981"}),d.jsx("stop",{offset:"100%",stopColor:"#3b82f6"})]}),d.jsxs("linearGradient",{id:"syncGradient2",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d.jsx("stop",{offset:"0%",stopColor:"#8b5cf6"}),d.jsx("stop",{offset:"100%",stopColor:"#ec4899"})]}),d.jsxs("linearGradient",{id:"syncGradient3",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d.jsx("stop",{offset:"0%",stopColor:"#f59e0b"}),d.jsx("stop",{offset:"100%",stopColor:"#ef4444"})]})]})]})]})]})]})]})]})}function eRe(){const t=new Zn,e=new Oe({color:2771565,emissive:440020,emissiveIntensity:.15,roughness:.3,metalness:.8}),n=new at(1.2,1.2,4,32),r=new _e(n,e);r.castShadow=!0,r.receiveShadow=!0,t.add(r);const i=new Ga(1.2,32,16,0,Math.PI*2,0,Math.PI/2),a=new _e(i,e);a.position.y=2,a.castShadow=!0,t.add(a);const s=new Ga(1.2,32,16,0,Math.PI*2,Math.PI/2,Math.PI/2),o=new _e(s,e);o.position.y=-2,o.castShadow=!0,t.add(o);const c=new Oe({color:12632256,roughness:.2,metalness:.9}),l=new at(.08,.08,3.5,16),h=new _e(l,c);h.position.y=.3,t.add(h);for(let M=0;M<3;M++){const T=new cn(.1,.6,1.6),A=new _e(T,c);A.position.y=.3-M*1.1,A.rotation.x=Math.PI/2,t.add(A)}for(let M=0;M<4;M++){const T=M*Math.PI/2+Math.PI/4,A=new at(.1,.12,1.5,8),N=new Oe({color:4871528,roughness:.6,metalness:.5}),P=new _e(A,N);P.position.set(Math.cos(T)*1,-2.75,Math.sin(T)*1),P.castShadow=!0,t.add(P)}const f=new Oe({color:7438486,roughness:.4,metalness:.7}),m=new at(.15,.15,.4,16),g=new _e(m,f);g.position.set(.8,2.5,0),g.rotation.z=Math.PI/2,t.add(g);const b=new Oe({color:1712172,roughness:.8}),y=new cn(.8,.6,.1),v=new _e(y,b);v.position.set(1.25,.5,0),t.add(v);const w=new Oe({color:1096065,emissive:1096065,emissiveIntensity:.8}),_=new Ga(.08,16,16),E=new _e(_,w);return E.position.set(1.3,.6,.06),t.add(E),t}function tRe(){const t=new Zn,e=new Oe({color:2582345,emissive:1096065,emissiveIntensity:.1,transparent:!0,opacity:.95,roughness:.4,metalness:.6}),n=new at(2,2,1.5,32),r=new _e(n,e);r.castShadow=!0,r.receiveShadow=!0,t.add(r);const i=new Oe({color:4871528,roughness:.4,metalness:.6}),a=new zr(2,.12,16,32),s=new _e(a,i);s.position.y=.75,s.rotation.x=Math.PI/2,t.add(s);const o=new Oe({color:7438486,roughness:.4,metalness:.7}),c=new at(.25,.25,1,16),l=new _e(c,o);l.position.y=1.3,t.add(l);const h=new zr(1.8,.15,16,32,Math.PI),f=new _e(h,i);f.position.y=.5,f.rotation.x=Math.PI/2,t.add(f);for(let b=0;b<4;b++){const y=b*Math.PI/2,v=new cn(.2,1.2,.2),w=new Oe({color:4871528,roughness:.6}),_=new _e(v,w);_.position.set(Math.cos(y)*1.5,-1.35,Math.sin(y)*1.5),_.castShadow=!0,t.add(_)}const m=new at(.8,.4,.6,16),g=new _e(m,e);return g.position.y=-.9,t.add(g),t}function nRe(){const t=new Zn,e=new Oe({color:5972406,emissive:9133302,emissiveIntensity:.2,roughness:.3,metalness:.7}),n=new cn(1.2,1.4,1),r=new _e(n,e);r.castShadow=!0,r.receiveShadow=!0,t.add(r);const i=new Oe({color:8141549,roughness:.3,metalness:.5}),a=new at(.45,.45,.15,32),s=new _e(a,i);s.position.set(.65,0,0),s.rotation.z=Math.PI/2,t.add(s);const o=new Oe({color:12632256,roughness:.2,metalness:.9}),c=new zr(.35,.1,8,24),l=new _e(c,o);l.position.set(.5,0,0),l.rotation.y=Math.PI/2,t.add(l);const h=new Oe({color:2450411,emissive:3900150,emissiveIntensity:.15,roughness:.4,metalness:.6}),f=new at(.4,.4,1,24),m=new _e(f,h);m.position.set(-.2,.9,0),m.rotation.z=Math.PI/2,m.castShadow=!0,t.add(m);const g=new Oe({color:1982639,roughness:.5}),b=new cn(.05,.6,.6),y=new _e(b,g);y.position.set(-.7,.9,0),t.add(y);const v=new Oe({color:3621201,roughness:.6}),w=new cn(1.4,.2,1.2),_=new _e(w,v);_.position.y=-.8,_.castShadow=!0,t.add(_);const E=new Oe({color:6583435,roughness:.4,metalness:.6}),M=new at(.12,.12,.3,16),T=new _e(M,E);T.position.set(0,0,.6),T.rotation.x=Math.PI/2,t.add(T);const A=new _e(M,E);return A.position.set(0,0,-.6),A.rotation.x=Math.PI/2,t.add(A),t}function rRe(){const t=new Zn,e=new Oe({color:8330525,emissive:15680580,emissiveIntensity:.3,roughness:.6}),n=new cn(2,2.5,2),r=new _e(n,e);r.castShadow=!0,t.add(r);const i=new Oe({color:10033947,emissive:16347926,emissiveIntensity:.5,roughness:.5}),a=new cn(.1,1.8,1.5),s=new _e(a,i);s.position.set(1.05,-.2,0),t.add(s);const o=new Oe({color:16569165,emissive:16569165,emissiveIntensity:1,transparent:!0,opacity:.8}),c=new cn(.05,.6,.8),l=new _e(c,o);l.position.set(1.1,-.1,0),t.add(l);const h=new Oe({color:7877903,roughness:.5,metalness:.6}),f=new at(.3,.35,.8,16),m=new _e(f,h);m.position.set(-1.15,0,0),m.rotation.z=Math.PI/2,t.add(m);const g=new Oe({color:16347926,emissive:16347926,emissiveIntensity:1,transparent:!0,opacity:.7}),b=new kc(.25,.6,16),y=new _e(b,g);y.position.set(-.6,0,0),y.rotation.z=Math.PI/2,t.add(y);const v=new Oe({color:12632256,roughness:.2,metalness:.9}),w=new at(.05,.05,1,8),_=new _e(w,v);_.position.set(.5,1,.5),t.add(_);const E=new Oe({color:4937064,roughness:.6}),M=new at(.25,.3,1.5,16),T=new _e(M,E);T.position.set(-.5,2,-.5),t.add(T);for(let A=0;A<4;A++){const N=A<2?.7:-.7,P=A%2===0?.7:-.7,R=new cn(.15,1,.15),F=new Oe({color:3621201,roughness:.6}),D=new _e(R,F);D.position.set(N,-1.75,P),D.castShadow=!0,t.add(D)}return t}function iRe(){const t=new Zn,e=new Oe({color:561586,emissive:440020,emissiveIntensity:.15,roughness:.3,metalness:.7}),n=new at(.8,.8,3,24),r=new _e(n,e);r.rotation.z=Math.PI/2,r.castShadow=!0,t.add(r);const i=new Oe({color:12632256,roughness:.2,metalness:.9});for(let l=0;l<7;l++)for(let h=0;h<7;h++)if(l*7+h<37){const f=new at(.04,.04,2.8,8),m=new _e(f,i);m.rotation.z=Math.PI/2,m.position.set(0,(l-3)*.18,(h-3)*.18),t.add(m)}const a=new Oe({color:947344,roughness:.4,metalness:.6}),s=new Ga(.8,24,12,0,Math.PI*2,0,Math.PI/2),o=new _e(s,a);o.position.set(-1.5,0,0),o.rotation.z=-Math.PI/2,t.add(o);const c=new _e(s,a);c.position.set(1.5,0,0),c.rotation.z=Math.PI/2,t.add(c);for(let l=0;l<2;l++){const h=new at(.08,.1,1.2,8),f=new Oe({color:4937064,roughness:.6}),m=new _e(h,f);m.position.set(l===0?-1:1,-1.2,0),t.add(m)}return t}function aRe(){const t=new Zn,e=new Oe({color:1981023,emissive:3900150,emissiveIntensity:.1,roughness:.4,metalness:.7}),n=new at(1.5,1.5,3,32),r=new _e(n,e);r.castShadow=!0,r.receiveShadow=!0,t.add(r);const i=new kc(1.5,.8,32),a=new _e(i,e);a.position.y=1.9,t.add(a);const s=new kc(1.5,.8,32),o=new _e(s,e);o.position.y=-1.9,o.rotation.z=Math.PI,t.add(o);const c=new Oe({color:2278750,emissive:2278750,emissiveIntensity:.5,transparent:!0,opacity:.8}),l=new at(.05,.05,2.5,8),h=new _e(l,c);h.position.set(1.55,0,0),t.add(h);const f=new Oe({color:16436245,roughness:.5});for(let v=0;v<8;v++){const w=v*Math.PI/4,_=new at(.03,.03,.8,8),E=new _e(_,f);E.position.set(Math.cos(w)*1.7,2.2,Math.sin(w)*1.7),t.add(E)}const m=new Oe({color:7041664,roughness:.6}),g=new cn(.05,2,.05),b=new _e(g,m);b.position.set(1.3,1.5,1.55),t.add(b);const y=new _e(g,m);y.position.set(1.7,1.5,1.55),t.add(y);for(let v=0;v<8;v++){const w=new cn(.4,.05,.05),_=new _e(w,m);_.position.set(1.5,-.5+v*.5,1.55),t.add(_)}return t}function sRe(){const t=new Zn,e=new at(1.2,1.4,2.5,24),n=new Oe({color:6583435,metalness:.7,roughness:.3}),r=new _e(e,n);r.position.y=.25,r.castShadow=!0,t.add(r);const i=new at(1,1.2,.4,24),a=new Oe({color:4674921,metalness:.8,roughness:.2}),s=new _e(i,a);s.position.y=1.7,s.castShadow=!0,t.add(s);const o=new cn(.6,.8,.6),c=new Oe({color:3900150,metalness:.6,roughness:.4}),l=new _e(o,c);l.position.y=2.3,l.castShadow=!0,t.add(l);const h=new at(.08,.08,1.5,12),f=new Oe({color:9741240,metalness:.9,roughness:.2}),m=new _e(h,f);m.position.y=.8,m.castShadow=!0,t.add(m);const g=new zr(.5,.08,8,24),b=new Oe({color:16096779,metalness:.8,roughness:.2,emissive:16096779,emissiveIntensity:.2}),y=new _e(g,b);y.rotation.x=Math.PI/2,y.position.y=.3,y.castShadow=!0,y.name="impeller",t.add(y);const v=new at(.12,.12,.8,12),w=new Oe({color:9741240,metalness:.9,roughness:.1}),_=new _e(v,w);_.rotation.z=Math.PI/2,_.position.set(-1.4,.8,0),t.add(_);const E=new at(.15,.15,.6,12),M=new _e(E,w);return M.rotation.z=Math.PI/2,M.position.set(1.4,.2,0),t.add(M),t}function oRe(){const t=new Zn,e=new at(1.3,1.3,3.5,24),n=new Oe({color:7893356,metalness:.75,roughness:.25}),r=new _e(e,n);r.position.y=0,r.castShadow=!0,t.add(r);const i=new Ga(1.3,24,12,0,Math.PI*2,0,Math.PI/2),a=new Oe({color:9584654,metalness:.7,roughness:.3}),s=new _e(i,a);s.position.y=1.75,s.castShadow=!0,t.add(s);const o=new Ga(1.3,24,12,0,Math.PI*2,Math.PI/2,Math.PI/2),c=new _e(o,a);c.position.y=-1.75,c.castShadow=!0,t.add(c);const l=new zr(1.35,.08,8,32),h=new Oe({color:16096779,metalness:.9,roughness:.1,emissive:16096779,emissiveIntensity:.3}),f=new _e(l,h);f.rotation.x=Math.PI/2,f.position.y=.8,f.name="ring0",t.add(f);const m=f.clone();m.position.y=-.8,m.name="ring1",t.add(m);const g=new at(.18,.18,1.2,12),b=new Oe({color:14427686,metalness:.8,roughness:.2}),y=new _e(g,b);y.rotation.z=Math.PI/2,y.position.set(0,1.2,0),t.add(y);const v=new _e(g,b);v.rotation.z=Math.PI/2,v.position.set(0,-1.2,0),t.add(v);const w=new at(.1,.1,.8,12),_=new Oe({color:9741240,metalness:.9,roughness:.1}),E=new _e(w,_);E.position.set(0,0,1.4),t.add(E);const M=new _e(w,_);return M.position.set(0,0,-1.4),t.add(M),t}function lRe(){const t=new Zn,e=new at(1.5,1.2,2.8,32),n=new Oe({color:4674921,metalness:.6,roughness:.4}),r=new _e(e,n);r.position.y=0,r.castShadow=!0,t.add(r);const i=new at(1.2,.9,2.4,32),a=new Oe({color:1981023,metalness:.3,roughness:.7,transparent:!0,opacity:.8}),s=new _e(i,a);s.position.y=.1,t.add(s);const o=new kc(1,1.2,32),c=new Oe({color:3359061,metalness:.5,roughness:.5}),l=new _e(o,c);l.position.y=-1.6,l.castShadow=!0,t.add(l);const h=new at(.12,.12,1.5,12),f=new Oe({color:9741240,metalness:.9,roughness:.1}),m=new _e(h,f);m.position.set(0,2,0),m.castShadow=!0,t.add(m);const g=new zr(1.3,.08,8,32),b=new Oe({color:1096065,metalness:.8,roughness:.2,emissive:1096065,emissiveIntensity:.4}),y=new _e(g,b);return y.rotation.x=Math.PI/2,y.position.y=1,y.name="overflow",t.add(y),t}function cRe(){const t=new Zn,e=new at(1,1.2,4.5,24),n=new Oe({color:5395026,metalness:.7,roughness:.3}),r=new _e(e,n);r.position.y=0,r.castShadow=!0,t.add(r);const i=new at(1.3,1.5,3.5,24),a=new Oe({color:7566195,metalness:.8,roughness:.2,transparent:!0,opacity:.4}),s=new _e(i,a);s.position.y=0,t.add(s);const o=new at(.8,1,.6,24),c=new Oe({color:4144966,metalness:.8,roughness:.2}),l=new _e(o,c);l.position.y=2.5,l.castShadow=!0,t.add(l);const h=new at(.6,.8,.5,24),f=new _e(h,c);f.position.y=-2.3,f.castShadow=!0,t.add(f);for(let b=0;b<4;b++){const y=new zr(1.25,.06,8,32),v=new Oe({color:10592682,metalness:.9,roughness:.1}),w=new _e(y,v);w.rotation.x=Math.PI/2,w.position.y=-1.2+b*.8,t.add(w)}const m=new zr(.6,.05,8,32,Math.PI*3.5),g=new Oe({color:16096779,metalness:.9,roughness:.1});for(let b=0;b<3;b++){const y=new _e(m,g);y.position.y=-.5+b*.6,y.rotation.x=Math.PI/2,y.name=`coil${b}`,t.add(y)}return t}function uRe(){const t=new Zn,e=new at(1.4,1.4,3.2,24),n=new Oe({color:6583435,metalness:.7,roughness:.3}),r=new _e(e,n);r.position.y=0,r.castShadow=!0,t.add(r);const i=new at(.8,.8,2.8,16),a=new Oe({color:9741240,metalness:.9,roughness:.1}),s=new _e(i,a);s.position.y=0,t.add(s);for(let g=0;g<8;g++){const b=new at(.08,.08,2.5,8),y=new Oe({color:16096779,metalness:.8,roughness:.2,emissive:16096779,emissiveIntensity:.2}),v=g/8*Math.PI*2,w=.5,_=new _e(b,y);_.position.set(Math.cos(v)*w,0,Math.sin(v)*w),_.name=`tube_${g}`,t.add(_)}const o=new at(.25,.25,1.5,16),c=new Oe({color:9741240,metalness:.9,roughness:.1}),l=new _e(o,c);l.position.y=2.1,l.castShadow=!0,t.add(l);const h=new cn(1.5,1,.8),f=new Oe({color:4674921,metalness:.7,roughness:.3}),m=new _e(h,f);return m.position.set(0,-2,1.2),m.castShadow=!0,t.add(m),t}function dRe(){const t=new Zn,e=new cn(2.8,3,2.5),n=new Oe({color:7877903,metalness:.6,roughness:.5}),r=new _e(e,n);r.position.y=0,r.castShadow=!0,t.add(r);const i=new cn(2,2.2,1.5),a=new Oe({color:1841431,metalness:.4,roughness:.8}),s=new _e(i,a);s.position.set(0,-.2,.3),t.add(s);const o=new cn(1.6,1.6,.8),c=new Oe({color:16347926,metalness:.2,roughness:.8,emissive:15357964,emissiveIntensity:.8,transparent:!0,opacity:.9}),l=new _e(o,c);l.position.set(0,-.2,.5),l.name="fireGlow",t.add(l);const h=new at(.3,.4,2.5,16),f=new Oe({color:5722958,metalness:.5,roughness:.6}),m=new _e(h,f);m.position.set(.8,2.5,-.8),m.castShadow=!0,t.add(m);const g=new at(.35,.3,.4,16),b=new _e(g,f);b.position.set(.8,3.9,-.8),t.add(b);for(let _=0;_<3;_++){const E=new zr(1.45,.08,4,32),M=new Oe({color:9584654,metalness:.3,roughness:.9}),T=new _e(E,M);T.rotation.x=Math.PI/2,T.position.y=-.8+_*.8,t.add(T)}const y=new at(.12,.12,1.8,12),v=new Oe({color:6583435,metalness:.8,roughness:.2}),w=new _e(y,v);return w.rotation.z=Math.PI/2,w.position.set(0,-.5,1.4),t.add(w),t}function fRe(){const t=new Zn,e=new Oe({color:6583435,emissive:440020,emissiveIntensity:.15,roughness:.4,metalness:.6}),n=new Oe({color:4674921,emissive:561586,emissiveIntensity:.1,roughness:.3,metalness:.7}),r=new at(.18,.18,4,16),i=new _e(r,n);i.position.set(-1,2.5,0),i.rotation.z=Math.PI/2,t.add(i);const a=new at(.12,.12,1.5,12),s=new _e(a,e);s.position.set(-3,2.8,0),t.add(s);const o=new at(.15,.15,3,16),c=new _e(o,e);c.position.set(1.5,1.8,0),c.rotation.z=Math.PI/4,t.add(c);const l=new at(.1,.1,2,12),h=new _e(l,e);h.position.set(-2.5,1.5,0),h.rotation.z=Math.PI/2,t.add(h);const f=new at(.1,.1,2.5,12),m=new _e(f,e);m.position.set(.5,1.5,0),m.rotation.z=Math.PI/2,t.add(m);const g=new at(.1,.1,2,12),b=new _e(g,e);b.position.set(2.5,2,1),t.add(b);const y=new at(.1,.1,2,12),v=new _e(y,e);v.position.set(2.5,2,-1),t.add(v);const w=new at(.12,.12,3,12),_=new _e(w,e);_.position.set(4,2.5,0),_.rotation.z=Math.PI/2,t.add(_);const E=new Oe({color:16096779,emissive:16096779,emissiveIntensity:.3,roughness:.4}),M=new cn(.2,.2,.2);[[-2.5,2.5,0],[0,2.5,0],[2,2.5,0],[4,2.2,0]].forEach(R=>{const F=new _e(M,E);F.position.set(R[0],R[1],R[2]),t.add(F)});const A=new Oe({color:4937064,roughness:.6}),N=new cn(.1,.4,.1);return[[-2,1.5,.3],[-1,1.5,.3],[0,1.5,.3],[1.5,1.5,.3],[3,1.5,.3]].forEach(R=>{const F=new _e(N,A);F.position.set(R[0],R[1],R[2]),t.add(F)}),t}function hRe(){const t=O.useRef(null),e=O.useRef(null),[n,r]=O.useState(new Date),[i,a]=O.useState(!0),[s,o]=O.useState(null),[c]=O.useState([{id:1,level:"warning",message:"2#沉降槽效率偏低",time:"2分钟前"},{id:2,level:"info",message:"溶出反应器运行稳定",time:"15分钟前"},{id:3,level:"info",message:"循环泵维护周期提醒",time:"30分钟前"}]),l=O.useMemo(()=>[{id:"reactor-1",name:"溶出反应器 #1",type:"reactor",position:[-8,3,0],status:"running",temperature:258,pressure:4.5,flow:125,efficiency:96.2,color:440020},{id:"reactor-2",name:"溶出反应器 #2",type:"reactor",position:[-5.5,3,0],status:"running",temperature:255,pressure:4.3,flow:118,efficiency:94.8,color:440020},{id:"slurry-tank-1",name:"泥浆槽 #1",type:"slurryTank",position:[-3,1.5,0],status:"running",temperature:85,pressure:.5,flow:95,efficiency:93.5,color:9133302},{id:"slurry-tank-2",name:"泥浆槽 #2",type:"slurryTank",position:[-3,1.5,2.5],status:"running",temperature:82,pressure:.5,flow:90,efficiency:92.8,color:9133302},{id:"pressure-vessel-1",name:"压力容器 #1",type:"pressureVessel",position:[0,2,0],status:"running",temperature:150,pressure:3.2,flow:110,efficiency:95.1,color:14427686},{id:"pressure-vessel-2",name:"压力容器 #2",type:"pressureVessel",position:[0,2,2.5],status:"warning",temperature:165,pressure:3.5,flow:98,efficiency:91.2,color:16096779},{id:"tank-1",name:"沉降槽 #1",type:"tank",position:[3,2,0],status:"running",temperature:98,pressure:.8,flow:85,efficiency:92.5,color:1096065},{id:"tank-2",name:"沉降槽 #2",type:"tank",position:[3,2,2.5],status:"warning",temperature:105,pressure:.9,flow:72,efficiency:87.3,color:16096779},{id:"settling-tank-dt",name:"沉降槽 DT",type:"settlingTankDT",position:[3,2,-2.5],status:"running",temperature:95,pressure:.7,flow:88,efficiency:93.8,color:1096065},{id:"decomposition-tower-1",name:"分解塔 #1",type:"decompositionTower",position:[6,3,0],status:"running",temperature:200,pressure:1.5,flow:75,efficiency:94.5,color:7566195},{id:"evaporator-1",name:"蒸发器 #1",type:"evaporator",position:[6,3,2.5],status:"running",temperature:180,pressure:1.2,flow:95,efficiency:95.8,color:6583435},{id:"calcination-furnace-1",name:"煅烧炉 #1",type:"calcinationFurnace",position:[9,2.5,0],status:"running",temperature:1200,pressure:.5,flow:45,efficiency:94.2,color:7877903},{id:"pump-1",name:"循环泵 #1",type:"pump",position:[-6,-.5,0],status:"running",temperature:65,pressure:2.5,flow:180,efficiency:91.8,color:9133302},{id:"pump-2",name:"循环泵 #2",type:"pump",position:[-3.5,-.5,0],status:"running",temperature:68,pressure:2.3,flow:175,efficiency:90.5,color:9133302},{id:"heat-exchanger",name:"换热器 #1",type:"heatExchanger",position:[6,0,0],status:"running",temperature:180,pressure:1.2,flow:95,efficiency:95.8,color:561586},{id:"storage-1",name:"原料储罐 #1",type:"storage",position:[9,2.5,-2.5],status:"running",temperature:45,pressure:.3,flow:60,efficiency:98.1,color:3900150},{id:"furnace-1",name:"焙烧炉 #1",type:"furnace",position:[9,2.5,2.5],status:"running",temperature:1200,pressure:.5,flow:45,efficiency:94.2,color:15680580}],[]),h=O.useCallback(_=>{let E;switch(_.type){case"reactor":E=eRe();break;case"tank":E=tRe();break;case"pump":E=nRe();break;case"furnace":E=rRe();break;case"heatExchanger":E=iRe();break;case"storage":E=aRe();break;case"slurryTank":E=sRe();break;case"pressureVessel":E=oRe();break;case"settlingTankDT":E=lRe();break;case"decompositionTower":E=cRe();break;case"evaporator":E=uRe();break;case"calcinationFurnace":E=dRe();break;default:E=new Zn;const A=new Oe({color:8947848,roughness:.5}),N=new _e(new cn(1,1,1),A);E.add(N)}const M=_.status==="running"?1096065:_.status==="warning"?16096779:15680580,T=new Sc(M,1.5,5);return T.position.y=3,E.add(T),E.userData.deviceId=_.id,E.position.set(..._.position),E},[]),f=O.useCallback(()=>{if(!t.current||e.current)return;const _=new yC;_.background=new en(659226);const E=new li(50,t.current.clientWidth/t.current.clientHeight,.1,1e3);E.position.set(15,12,20),E.lookAt(0,2,0);const M=new TC({antialias:!0});M.setSize(t.current.clientWidth,t.current.clientHeight),M.setPixelRatio(Math.min(window.devicePixelRatio,2)),M.shadowMap.enabled=!0,M.shadowMap.type=Wh,M.toneMapping=oC,M.toneMappingExposure=1.2,t.current.appendChild(M.domElement);const T=new MC(4210784,.5);_.add(T);const A=new SC(16777215,1);A.position.set(20,30,20),A.castShadow=!0,A.shadow.mapSize.width=2048,A.shadow.mapSize.height=2048,A.shadow.camera.near=.5,A.shadow.camera.far=100,A.shadow.camera.left=-30,A.shadow.camera.right=30,A.shadow.camera.top=30,A.shadow.camera.bottom=-30,_.add(A);const N=new Sc(440020,.6,40);N.position.set(-15,10,10),_.add(N);const P=new Sc(1096065,.5,40);P.position.set(15,10,-10),_.add(P);const R=new Oe({color:1976635,roughness:.8}),F=new ym(50,50),D=new _e(F,R);D.rotation.x=-Math.PI/2,D.position.y=-.01,D.receiveShadow=!0,_.add(D);const L=new EC(50,50,3359061,1976635);L.position.y=0,_.add(L);const q=fRe();_.add(q);const I=new Map;l.forEach(H=>{const te=h(H);_.add(te),I.set(H.id,te)});const U=new STe,k=new nn,V=H=>{const te=M.domElement.getBoundingClientRect();k.x=(H.clientX-te.left)/te.width*2-1,k.y=-((H.clientY-te.top)/te.height)*2+1,U.setFromCamera(k,E);const we=U.intersectObjects(_.children,!0);for(const Ae of we){let ne=Ae.object;for(;ne;){if(ne.userData.deviceId){const de=l.find(pe=>pe.id===ne.userData.deviceId);de&&(o(de),Ye.info(`选中: ${de.name}`,{duration:1500}));return}ne=ne.parent}}};M.domElement.addEventListener("click",V),e.current={scene:_,camera:E,renderer:M,devices3D:I,animationId:0,isPlaying:!0};let $=0,Y=!0;const J=()=>{if(!e.current)return;const{scene:H,camera:te,renderer:we,devices3D:Ae,isPlaying:ne}=e.current;ne&&Y&&($+=.003,te.position.x=Math.sin($)*16,te.position.z=Math.cos($)*16,te.position.y=12+Math.sin(Date.now()*2e-4)*1.5,te.lookAt(0,0,0)),l.forEach(de=>{const pe=Ae.get(de.id);if(pe&&de.status==="running"&&(de.type==="reactor"&&pe.children[2]&&(pe.children[2].rotation.y+=.03),de.type==="pump"&&pe.children[2]&&(pe.children[2].rotation.x+=.05),de.type==="furnace"&&pe.children[5])){const fe=1+Math.sin(Date.now()*.01)*.1;pe.children[5].scale.set(fe,fe,fe)}}),e.current.animationId=requestAnimationFrame(J),we.render(H,te)};J();const W=()=>{if(!t.current||!e.current)return;const{camera:H,renderer:te}=e.current;H.aspect=t.current.clientWidth/t.current.clientHeight,H.updateProjectionMatrix(),te.setSize(t.current.clientWidth,t.current.clientHeight)};return window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W),M.domElement.removeEventListener("click",V)}},[h,l]);O.useEffect(()=>{const _=f();return()=>{_==null||_(),e.current&&(cancelAnimationFrame(e.current.animationId),e.current.renderer.dispose(),t.current&&t.current.removeChild(e.current.renderer.domElement),e.current=null)}},[f]),O.useEffect(()=>{const _=setInterval(()=>r(new Date),1e3);return()=>clearInterval(_)},[]);const m=()=>{e.current&&(e.current.isPlaying=!e.current.isPlaying,a(e.current.isPlaying),Ye.info(e.current.isPlaying?"自动旋转已开启":"自动旋转已暂停",{duration:1500}))},g=()=>{e.current&&(e.current.camera.position.set(15,12,20),e.current.camera.lookAt(0,2,0),Ye.info("视角已重置",{duration:1500}))},b=()=>{var _,E;t.current&&((E=(_=t.current).requestFullscreen)==null||E.call(_))},y=l.filter(_=>_.status==="running").length,v=l.filter(_=>_.status==="warning").length,w=(l.reduce((_,E)=>_+E.efficiency,0)/l.length).toFixed(1);return d.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-950 via-slate-900 to-slate-950 p-6 overflow-hidden",children:[d.jsx(B.div,{initial:{y:-20,opacity:0},animate:{y:0,opacity:1},className:"mb-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-cyan-500 via-blue-600 to-purple-600 flex items-center justify-center shadow-lg shadow-cyan-500/20",children:d.jsx(Iy,{className:"w-8 h-8 text-white"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-white tracking-wide",children:"氧化铝数字孪生工厂展示平台"}),d.jsx("p",{className:"text-slate-400 text-sm",children:"3D实时运行状态监控中心"})]})]}),d.jsxs("div",{className:"flex items-center gap-6",children:[d.jsxs("div",{className:"text-right",children:[d.jsx("div",{className:"text-white font-medium",children:n.toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric",weekday:"long"})}),d.jsx("div",{className:"text-cyan-400 text-2xl font-mono font-bold tracking-wider",children:n.toLocaleTimeString("zh-CN")})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-xl bg-emerald-500/20 border border-emerald-500/40",children:[d.jsx(B.div,{animate:{scale:[1,1.2,1]},transition:{duration:2,repeat:1/0},className:"w-3 h-3 rounded-full bg-emerald-400"}),d.jsx("span",{className:"text-emerald-400 font-medium",children:"系统正常"})]}),d.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-xl bg-amber-500/20 border border-amber-500/40",children:[d.jsx(qi,{className:"w-4 h-4 text-amber-400"}),d.jsxs("span",{className:"text-amber-400 font-medium",children:[v," 个预警"]})]})]})]})]})}),d.jsxs("div",{className:"flex gap-4 h-[calc(100vh-180px)]",children:[d.jsxs(B.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.3},className:"flex-1 relative rounded-2xl overflow-hidden border border-slate-700/50",children:[d.jsx("div",{ref:t,className:"w-full h-full"}),d.jsxs("div",{className:"absolute top-4 left-4 flex gap-2",children:[d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:m,className:`px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2 transition-all ${i?"bg-cyan-500/30 text-cyan-400 border border-cyan-500/50":"bg-slate-800/80 text-slate-300 border border-slate-600/50"}`,children:[i?d.jsx(Qp,{className:"w-4 h-4"}):d.jsx(Wd,{className:"w-4 h-4"}),i?"暂停旋转":"自动旋转"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:g,className:"px-4 py-2 rounded-lg text-sm font-medium bg-slate-800/80 text-slate-300 border border-slate-600/50 hover:bg-slate-700/80 transition-all flex items-center gap-2",children:[d.jsx(jY,{className:"w-4 h-4"}),"重置视角"]}),d.jsxs(B.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:b,className:"px-4 py-2 rounded-lg text-sm font-medium bg-slate-800/80 text-slate-300 border border-slate-600/50 hover:bg-slate-700/80 transition-all flex items-center gap-2",children:[d.jsx(Jh,{className:"w-4 h-4"}),"全屏"]})]}),d.jsx("div",{className:"absolute bottom-4 left-4 text-xs text-slate-500 bg-slate-900/80 px-3 py-1.5 rounded-lg",children:"点击设备查看详情 | 拖拽旋转视角 | 滚轮缩放"}),d.jsxs("div",{className:"absolute bottom-4 right-4 flex items-center gap-4 bg-slate-900/80 backdrop-blur-sm rounded-lg px-4 py-2",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-emerald-400"}),d.jsxs("span",{className:"text-slate-300 text-xs",children:["运行中 (",y,")"]})]}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-amber-400 animate-pulse"}),d.jsxs("span",{className:"text-slate-300 text-xs",children:["预警 (",v,")"]})]}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-3 h-3 rounded-full bg-red-400"}),d.jsx("span",{className:"text-slate-300 text-xs",children:"停止"})]})]})]}),d.jsxs(B.div,{initial:{x:50,opacity:0},animate:{x:0,opacity:1},transition:{delay:.4},className:"w-96 flex flex-col gap-4",children:[d.jsxs("div",{className:"bg-slate-800/60 backdrop-blur-xl rounded-2xl border border-slate-700/50 p-4 flex-1 overflow-hidden",children:[d.jsxs("h2",{className:"text-white font-semibold mb-4 flex items-center gap-2",children:[d.jsx(jh,{className:"w-5 h-5 text-cyan-400"}),"设备列表"]}),d.jsx("div",{className:"space-y-2 overflow-y-auto max-h-[calc(100%-40px)]",children:l.map(_=>d.jsxs(B.div,{whileHover:{scale:1.02,x:5},whileTap:{scale:.98},onClick:()=>{o(_),Ye.info(`选中: ${_.name}`,{duration:1500})},className:`p-3 rounded-xl border cursor-pointer transition-all ${(s==null?void 0:s.id)===_.id?"bg-cyan-500/20 border-cyan-500/50":_.status==="warning"?"bg-amber-500/10 border-amber-500/30 hover:border-amber-500/50":"bg-slate-700/50 border-slate-600/50 hover:border-cyan-500/50"}`,children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-2.5 h-2.5 rounded-full animate-pulse",style:{backgroundColor:_.status==="running"?"#10b981":_.status==="warning"?"#f59e0b":"#ef4444"}}),d.jsx("span",{className:"text-white text-sm font-medium",children:_.name})]}),d.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${_.status==="running"?"bg-emerald-500/20 text-emerald-400":_.status==="warning"?"bg-amber-500/20 text-amber-400":"bg-red-500/20 text-red-400"}`,children:_.status==="running"?"运行":_.status==="warning"?"预警":"停止"})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[d.jsxs("div",{className:"text-center p-1.5 rounded-lg bg-slate-900/50",children:[d.jsx(rv,{className:"w-3 h-3 text-red-400 mx-auto mb-1"}),d.jsxs("div",{className:"text-white font-mono",children:[_.temperature,"°C"]})]}),d.jsxs("div",{className:"text-center p-1.5 rounded-lg bg-slate-900/50",children:[d.jsx(Zh,{className:"w-3 h-3 text-blue-400 mx-auto mb-1"}),d.jsx("div",{className:"text-white font-mono",children:_.pressure})]}),d.jsxs("div",{className:"text-center p-1.5 rounded-lg bg-slate-900/50",children:[d.jsx(yr,{className:"w-3 h-3 text-emerald-400 mx-auto mb-1"}),d.jsxs("div",{className:"text-white font-mono",children:[_.efficiency,"%"]})]})]})]},_.id))})]}),d.jsxs("div",{className:"bg-slate-800/60 backdrop-blur-xl rounded-2xl border border-slate-700/50 p-4",children:[d.jsxs("h2",{className:"text-white font-semibold mb-4 flex items-center gap-2",children:[d.jsx(yr,{className:"w-5 h-5 text-emerald-400"}),"关键指标"]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"bg-gradient-to-br from-cyan-500/20 to-blue-500/20 rounded-xl p-3 border border-cyan-500/30",children:[d.jsx(Oh,{className:"w-5 h-5 text-cyan-400 mb-2"}),d.jsxs("div",{className:"text-2xl font-bold text-white",children:[w,"%"]}),d.jsx("div",{className:"text-slate-400 text-xs",children:"平均效率"})]}),d.jsxs("div",{className:"bg-gradient-to-br from-emerald-500/20 to-teal-500/20 rounded-xl p-3 border border-emerald-500/30",children:[d.jsx(Cr,{className:"w-5 h-5 text-emerald-400 mb-2"}),d.jsxs("div",{className:"text-2xl font-bold text-white",children:[y,"/",l.length]}),d.jsx("div",{className:"text-slate-400 text-xs",children:"设备运转"})]}),d.jsxs("div",{className:"bg-gradient-to-br from-amber-500/20 to-orange-500/20 rounded-xl p-3 border border-amber-500/30",children:[d.jsx(Qr,{className:"w-5 h-5 text-amber-400 mb-2"}),d.jsx("div",{className:"text-2xl font-bold text-white",children:"96.2%"}),d.jsx("div",{className:"text-slate-400 text-xs",children:"日产量完成"})]}),d.jsxs("div",{className:"bg-gradient-to-br from-violet-500/20 to-purple-500/20 rounded-xl p-3 border border-violet-500/30",children:[d.jsx(Jp,{className:"w-5 h-5 text-violet-400 mb-2"}),d.jsx("div",{className:"text-2xl font-bold text-white",children:"128"}),d.jsx("div",{className:"text-slate-400 text-xs",children:"连续运行(天)"})]})]})]}),d.jsxs("div",{className:"bg-slate-800/60 backdrop-blur-xl rounded-2xl border border-slate-700/50 p-4",children:[d.jsxs("h2",{className:"text-white font-semibold mb-4 flex items-center gap-2",children:[d.jsx(Oy,{className:"w-5 h-5 text-amber-400"}),"实时报警",d.jsxs("span",{className:"ml-auto text-xs text-slate-400 bg-slate-700/50 px-2 py-0.5 rounded-full",children:[c.length," 条"]})]}),d.jsx("div",{className:"space-y-2",children:c.map(_=>d.jsx("div",{className:`p-2 rounded-lg border ${_.level==="warning"?"bg-amber-500/10 border-amber-500/30":"bg-blue-500/10 border-blue-500/30"}`,children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(qi,{className:`w-3 h-3 flex-shrink-0 mt-0.5 ${_.level==="warning"?"text-amber-400":"text-blue-400"}`}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-white text-xs",children:_.message}),d.jsx("p",{className:"text-slate-500 text-[10px] mt-0.5",children:_.time})]})]})},_.id))})]})]})]})]})}const pRe=QX([{path:"/",Component:JZ,children:[{index:!0,Component:wbe},{path:"furnace-diagnosis",Component:Abe},{path:"knowledge-graph",Component:OMe},{path:"rag-system",Component:IMe},{path:"monitoring",Component:BMe},{path:"quality-tracing",Component:zMe},{path:"process-optimization",Component:QMe},{path:"model-management",Component:tEe},{path:"digital-twin",Component:E3e},{path:"data-collection",Component:P3e},{path:"data-governance",Component:R3e},{path:"edge-cloud-sync",Component:Q3e},{path:"knowledge-fusion",Component:H3e},{path:"entity-extraction",Component:K3e},{path:"prompt-engineering",Component:I3e},{path:"human-machine",Component:L3e},{path:"intelligent-converter",Component:B3e},{path:"economic-analysis",Component:$3e},{path:"industrial-dashboard",Component:hRe}]}]);function mRe(){return d.jsx(EX,{router:pRe})}UW.createRoot(document.getElementById("root")).render(d.jsx(mRe,{}));